Merge branch 'leverage-tiers' of https://github.com/samgermain/freqtrade into leverage-tiers
This commit is contained in:
commit
ae249a0f97
@ -77,11 +77,17 @@ class Okx(Exchange):
|
||||
|
||||
tiers: Dict[str, List[Dict]] = {}
|
||||
|
||||
# Be verbose here, as this delays startup by ~1 minute.
|
||||
logger.info(
|
||||
f"Initializing leverage_tiers for {len(symbols)} markets. "
|
||||
"This will take about a minute.")
|
||||
|
||||
for symbol in symbols:
|
||||
res = self._api.fetchLeverageTiers(symbol)
|
||||
tiers[symbol] = []
|
||||
for tier in res[symbol]:
|
||||
tiers[symbol].append(self.parse_leverage_tier(tier))
|
||||
logger.info(f"Done initializing {len(symbols)} markets.")
|
||||
|
||||
return tiers
|
||||
else:
|
||||
|
@ -2,7 +2,7 @@ numpy==1.22.2
|
||||
pandas==1.4.0
|
||||
pandas-ta==0.3.14b
|
||||
|
||||
ccxt==1.72.36
|
||||
ccxt==1.73.3
|
||||
# Pin cryptography for now due to rust build errors with piwheels
|
||||
cryptography==36.0.1
|
||||
aiohttp==3.8.1
|
||||
|
2
setup.py
2
setup.py
@ -42,7 +42,7 @@ setup(
|
||||
],
|
||||
install_requires=[
|
||||
# from requirements.txt
|
||||
'ccxt>=1.72.29',
|
||||
'ccxt>=1.73.1',
|
||||
'SQLAlchemy',
|
||||
'python-telegram-bot>=13.4',
|
||||
'arrow>=0.17.0',
|
||||
|
@ -329,7 +329,7 @@ class TestCCXTExchange():
|
||||
assert 0 < exchange.get_fee(pair, 'market', 'buy') < threshold
|
||||
assert 0 < exchange.get_fee(pair, 'market', 'sell') < threshold
|
||||
|
||||
def test_get_max_leverage_spot(self, exchange):
|
||||
def test_ccxt_get_max_leverage_spot(self, exchange):
|
||||
spot, spot_name = exchange
|
||||
if spot:
|
||||
leverage_in_market_spot = EXCHANGES[spot_name]['leverage_in_market']['spot']
|
||||
@ -339,7 +339,7 @@ class TestCCXTExchange():
|
||||
assert (isinstance(spot_leverage, float) or isinstance(spot_leverage, int))
|
||||
assert spot_leverage >= 1.0
|
||||
|
||||
def test_get_max_leverage_futures(self, exchange_futures):
|
||||
def test_ccxt_get_max_leverage_futures(self, exchange_futures):
|
||||
futures, futures_name = exchange_futures
|
||||
# TODO-lev: binance, gateio, and okx test
|
||||
if futures:
|
||||
@ -364,17 +364,17 @@ class TestCCXTExchange():
|
||||
assert (isinstance(contract_size, float) or isinstance(contract_size, int))
|
||||
assert contract_size >= 0.0
|
||||
|
||||
# def test_get_liquidation_price_compat():
|
||||
# def test_ccxt_get_liquidation_price():
|
||||
# return # TODO-lev
|
||||
|
||||
# def test_liquidation_price_compat():
|
||||
# def test_ccxt_liquidation_price():
|
||||
# return # TODO-lev
|
||||
|
||||
# def test_get_max_pair_stake_amount_compat():
|
||||
# def test_ccxt_get_max_pair_stake_amount():
|
||||
# return # TODO-lev
|
||||
|
||||
# def test_load_leverage_tiers_compat():
|
||||
# def test_ccxt_load_leverage_tiers():
|
||||
# return # TODO-lev
|
||||
|
||||
# def test_get_maintenance_ratio_and_amt_compat():
|
||||
# def test_ccxt_get_maintenance_ratio_and_amt():
|
||||
# return # TODO-lev
|
||||
|
Loading…
Reference in New Issue
Block a user