- added spread filter

- minimum value to volume pairlist
This commit is contained in:
untoreh
2020-02-03 07:44:17 +01:00
parent 2396f35586
commit aa54fd2251
7 changed files with 132 additions and 5 deletions

View File

@@ -640,6 +640,31 @@ def shitcoinmarkets(markets):
},
'info': {},
},
'NANO/USDT': {
"percentage": True,
"tierBased": False,
"taker": 0.001,
"maker": 0.001,
"precision": {
"base": 8,
"quote": 8,
"amount": 2,
"price": 4
},
"limits": {
},
"id": "NANOUSDT",
"symbol": "NANO/USDT",
"base": "NANO",
"quote": "USDT",
"baseId": "NANO",
"quoteId": "USDT",
"info": {},
"type": "spot",
"spot": True,
"future": False,
"active": True
},
})
return shitmarkets
@@ -1114,6 +1139,28 @@ def tickers():
'quoteVolume': 1154.19266394,
'info': {}
},
"NANO/USDT": {
"symbol": "NANO/USDT",
"timestamp": 1580469388244,
"datetime": "2020-01-31T11:16:28.244Z",
"high": 0.7519,
"low": 0.7154,
"bid": 0.7305,
"bidVolume": 300.3,
"ask": 0.7342,
"askVolume": 15.14,
"vwap": 0.73645591,
"open": 0.7154,
"close": 0.7342,
"last": 0.7342,
"previousClose": 0.7189,
"change": 0.0188,
"percentage": 2.628,
"average": None,
"baseVolume": 439472.44,
"quoteVolume": 323652.075405,
"info": {}
},
})

View File

@@ -141,7 +141,7 @@ def test_VolumePairList_refresh_empty(mocker, markets_empty, whitelist_conf):
([{"method": "VolumePairList", "number_assets": 5, "sort_key": "bidVolume"}],
"BTC", ['HOT/BTC', 'FUEL/BTC', 'XRP/BTC', 'LTC/BTC', 'TKN/BTC']),
([{"method": "VolumePairList", "number_assets": 5, "sort_key": "quoteVolume"}],
"USDT", ['ETH/USDT']),
"USDT", ['ETH/USDT', 'NANO/USDT']),
# No pair for ETH ...
([{"method": "VolumePairList", "number_assets": 5, "sort_key": "quoteVolume"}],
"ETH", []),
@@ -160,6 +160,10 @@ def test_VolumePairList_refresh_empty(mocker, markets_empty, whitelist_conf):
{"method": "PrecisionFilter"},
{"method": "PriceFilter", "low_price_ratio": 0.02}
], "BTC", ['ETH/BTC', 'TKN/BTC', 'LTC/BTC', 'XRP/BTC']),
# HOT and XRP are removed because below 1250 quoteVolume
([{"method": "VolumePairList", "number_assets": 5,
"sort_key": "quoteVolume", "min_value": 1250}],
"BTC", ['ETH/BTC', 'TKN/BTC', 'LTC/BTC']),
# StaticPairlist Only
([{"method": "StaticPairList"},
], "BTC", ['ETH/BTC', 'TKN/BTC']),
@@ -167,6 +171,10 @@ def test_VolumePairList_refresh_empty(mocker, markets_empty, whitelist_conf):
([{"method": "StaticPairList"},
{"method": "VolumePairList", "number_assets": 5, "sort_key": "bidVolume"},
], "BTC", ['TKN/BTC', 'ETH/BTC']),
# SpreadFilter
([{"method": "VolumePairList", "number_assets": 5, "sort_key": "quoteVolume"},
{"method": "SpreadFilter", "max_spread": 0.005}
], "USDT", ['ETH/USDT']),
])
def test_VolumePairList_whitelist_gen(mocker, whitelist_conf, shitcoinmarkets, tickers,
pairlists, base_currency, whitelist_result,