mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-16 05:03:55 +00:00
36 lines
902 B
Python
36 lines
902 B
Python
""" HTX exchange subclass """
|
|
import logging
|
|
from typing import Dict
|
|
|
|
from freqtrade.constants import BuySell
|
|
from freqtrade.exchange import Exchange
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
class Htx(Exchange):
|
|
"""
|
|
HTX exchange class. Contains adjustments needed for Freqtrade to work
|
|
with this exchange.
|
|
"""
|
|
|
|
_ft_has: Dict = {
|
|
"stoploss_on_exchange": True,
|
|
"stop_price_param": "stopPrice",
|
|
"stop_price_prop": "stopPrice",
|
|
"stoploss_order_types": {"limit": "stop-limit"},
|
|
"ohlcv_candle_limit": 1000,
|
|
"l2_limit_range": [5, 10, 20],
|
|
"l2_limit_range_required": False,
|
|
}
|
|
|
|
def _get_stop_params(self, side: BuySell, ordertype: str, stop_price: float) -> Dict:
|
|
|
|
params = self._params.copy()
|
|
params.update({
|
|
"stopPrice": stop_price,
|
|
"operator": "lte",
|
|
})
|
|
return params
|