mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Add test which verifies #8680 won't happen again
This commit is contained in:
@@ -43,6 +43,10 @@ EXCHANGES = {
|
|||||||
'hasQuoteVolumeFutures': True,
|
'hasQuoteVolumeFutures': True,
|
||||||
'leverage_tiers_public': False,
|
'leverage_tiers_public': False,
|
||||||
'leverage_in_spot_market': False,
|
'leverage_in_spot_market': False,
|
||||||
|
'private_methods': [
|
||||||
|
'fapiPrivateGetPositionSideDual',
|
||||||
|
'fapiPrivateGetMultiAssetsMargin'
|
||||||
|
],
|
||||||
'sample_order': [{
|
'sample_order': [{
|
||||||
"symbol": "SOLUSDT",
|
"symbol": "SOLUSDT",
|
||||||
"orderId": 3551312894,
|
"orderId": 3551312894,
|
||||||
@@ -221,6 +225,7 @@ EXCHANGES = {
|
|||||||
'hasQuoteVolumeFutures': False,
|
'hasQuoteVolumeFutures': False,
|
||||||
'leverage_tiers_public': True,
|
'leverage_tiers_public': True,
|
||||||
'leverage_in_spot_market': True,
|
'leverage_in_spot_market': True,
|
||||||
|
'private_methods': ['fetch_accounts'],
|
||||||
},
|
},
|
||||||
'bybit': {
|
'bybit': {
|
||||||
'pair': 'BTC/USDT',
|
'pair': 'BTC/USDT',
|
||||||
@@ -756,3 +761,8 @@ class TestCCXTExchange():
|
|||||||
max_stake_amount = futures.get_max_pair_stake_amount(futures_pair, 40000)
|
max_stake_amount = futures.get_max_pair_stake_amount(futures_pair, 40000)
|
||||||
assert (isinstance(max_stake_amount, float))
|
assert (isinstance(max_stake_amount, float))
|
||||||
assert max_stake_amount >= 0.0
|
assert max_stake_amount >= 0.0
|
||||||
|
|
||||||
|
def test_private_method_presence(self, exchange: EXCHANGE_FIXTURE_TYPE):
|
||||||
|
exch, exchangename = exchange
|
||||||
|
for method in EXCHANGES[exchangename].get('private_methods', []):
|
||||||
|
assert hasattr(exch._api, method)
|
||||||
|
|||||||
Reference in New Issue
Block a user