remove markets changes
This commit is contained in:
@@ -375,6 +375,78 @@ def markets():
|
||||
},
|
||||
},
|
||||
'info': '',
|
||||
},
|
||||
{
|
||||
'id': 'BTTBTC',
|
||||
'symbol': 'BTT/BTC',
|
||||
'base': 'BTT',
|
||||
'quote': 'BTC',
|
||||
'active': True,
|
||||
'precision': {
|
||||
'base': 8,
|
||||
'quote': 8,
|
||||
'amount': 0,
|
||||
'price': 8
|
||||
},
|
||||
'limits': {
|
||||
'amount': {
|
||||
'min': 1.0,
|
||||
'max': 90000000.0
|
||||
},
|
||||
'price': {
|
||||
'min': None,
|
||||
'max': None
|
||||
},
|
||||
'cost': {
|
||||
'min': 0.001,
|
||||
'max': None
|
||||
}
|
||||
},
|
||||
'info': "",
|
||||
},
|
||||
{
|
||||
'id': 'USDT-ETH',
|
||||
'symbol': 'ETH/USDT',
|
||||
'base': 'ETH',
|
||||
'quote': 'USDT',
|
||||
'precision': {
|
||||
'amount': 8,
|
||||
'price': 8
|
||||
},
|
||||
'limits': {
|
||||
'amount': {
|
||||
'min': 0.02214286,
|
||||
'max': None
|
||||
},
|
||||
'price': {
|
||||
'min': 1e-08,
|
||||
'max': None
|
||||
}
|
||||
},
|
||||
'active': True,
|
||||
'info': ""
|
||||
},
|
||||
{
|
||||
'id': 'USDT-LTC',
|
||||
'symbol': 'LTC/USDT',
|
||||
'base': 'LTC',
|
||||
'quote': 'USDT',
|
||||
'active': True,
|
||||
'precision': {
|
||||
'amount': 8,
|
||||
'price': 8
|
||||
},
|
||||
'limits': {
|
||||
'amount': {
|
||||
'min': 0.06646786,
|
||||
'max': None
|
||||
},
|
||||
'price': {
|
||||
'min': 1e-08,
|
||||
'max': None
|
||||
}
|
||||
},
|
||||
'info': ""
|
||||
}
|
||||
])
|
||||
|
||||
@@ -642,6 +714,28 @@ def tickers():
|
||||
'quoteVolume': 1401.65697943,
|
||||
'info': {}
|
||||
},
|
||||
'BTT/BTC': {
|
||||
'symbol': 'BTT/BTC',
|
||||
'timestamp': 1550936557206,
|
||||
'datetime': '2019-02-23T15:42:37.206Z',
|
||||
'high': 0.00000026,
|
||||
'low': 0.00000024,
|
||||
'bid': 0.00000024,
|
||||
'bidVolume': 2446894197.0,
|
||||
'ask': 0.00000025,
|
||||
'askVolume': 2447913837.0,
|
||||
'vwap': 0.00000025,
|
||||
'open': 0.00000026,
|
||||
'close': 0.00000024,
|
||||
'last': 0.00000024,
|
||||
'previousClose': 0.00000026,
|
||||
'change': -0.00000002,
|
||||
'percentage': -7.692,
|
||||
'average': None,
|
||||
'baseVolume': 4886464537.0,
|
||||
'quoteVolume': 1215.14489611,
|
||||
'info': {}
|
||||
},
|
||||
'ETH/USDT': {
|
||||
'symbol': 'ETH/USDT',
|
||||
'timestamp': 1522014804118,
|
||||
|
@@ -1264,7 +1264,7 @@ def test_get_markets(default_conf, mocker, markets):
|
||||
exchange = get_patched_exchange(mocker, default_conf, api_mock)
|
||||
ret = exchange.get_markets()
|
||||
assert isinstance(ret, list)
|
||||
assert len(ret) == 6
|
||||
assert len(ret) == 9
|
||||
|
||||
assert ret[0]["id"] == "ethbtc"
|
||||
assert ret[0]["symbol"] == "ETH/BTC"
|
||||
|
@@ -80,7 +80,7 @@ def test_refresh_pairlist_dynamic(mocker, markets, tickers, whitelist_conf):
|
||||
freqtradebot = get_patched_freqtradebot(mocker, whitelist_conf)
|
||||
|
||||
# argument: use the whitelist dynamically by exchange-volume
|
||||
whitelist = ['ETH/BTC', 'TKN/BTC']
|
||||
whitelist = ['ETH/BTC', 'TKN/BTC', 'BTT/BTC']
|
||||
freqtradebot.pairlists.refresh_pairlist()
|
||||
|
||||
assert whitelist == freqtradebot.pairlists.whitelist
|
||||
@@ -116,17 +116,19 @@ def test_VolumePairList_whitelist_gen(mocker, whitelist_conf, markets, tickers)
|
||||
|
||||
# Test to retrieved BTC sorted on quoteVolume (default)
|
||||
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='BTC', key='quoteVolume')
|
||||
assert whitelist == ['ETH/BTC', 'TKN/BTC', 'BLK/BTC', 'LTC/BTC']
|
||||
assert whitelist == ['ETH/BTC', 'TKN/BTC', 'BTT/BTC']
|
||||
|
||||
# Test to retrieve BTC sorted on bidVolume
|
||||
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='BTC', key='bidVolume')
|
||||
assert whitelist == ['LTC/BTC', 'TKN/BTC', 'ETH/BTC', 'BLK/BTC']
|
||||
assert whitelist == ['BTT/BTC', 'TKN/BTC', 'ETH/BTC']
|
||||
|
||||
# Test with USDT sorted on quoteVolume (default)
|
||||
freqtrade.config['stake_currency'] = 'USDT' # this has to be set, otherwise markets are removed
|
||||
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='USDT', key='quoteVolume')
|
||||
assert whitelist == ['TKN/USDT', 'ETH/USDT', 'LTC/USDT', 'BLK/USDT']
|
||||
assert whitelist == ['ETH/USDT', 'LTC/USDT']
|
||||
|
||||
# Test with ETH (our fixture does not have ETH, so result should be empty)
|
||||
freqtrade.config['stake_currency'] = 'ETH'
|
||||
whitelist = freqtrade.pairlists._gen_pair_whitelist(base_currency='ETH', key='quoteVolume')
|
||||
assert whitelist == []
|
||||
|
||||
|
Reference in New Issue
Block a user