Add more 'bad' characters that appear in the market symbols on some exchanges
This commit is contained in:
parent
489177cb4c
commit
5812052d61
@ -225,7 +225,7 @@ def refresh_data(datadir: Path,
|
|||||||
|
|
||||||
|
|
||||||
def pair_to_filename(pair: str) -> str:
|
def pair_to_filename(pair: str) -> str:
|
||||||
for ch in ['/', ' ', '.']:
|
for ch in ['/', '-', ' ', '.', '@', '$', '+', ':']:
|
||||||
pair = pair.replace(ch, '_')
|
pair = pair.replace(ch, '_')
|
||||||
return pair
|
return pair
|
||||||
|
|
||||||
|
@ -152,6 +152,13 @@ def test_testdata_path(testdatadir) -> None:
|
|||||||
("ETHH20", 'ETHH20'),
|
("ETHH20", 'ETHH20'),
|
||||||
(".XBTBON2H", '_XBTBON2H'),
|
(".XBTBON2H", '_XBTBON2H'),
|
||||||
("ETHUSD.d", 'ETHUSD_d'),
|
("ETHUSD.d", 'ETHUSD_d'),
|
||||||
|
("ADA-0327", 'ADA_0327'),
|
||||||
|
("BTC-USD-200110", 'BTC_USD_200110'),
|
||||||
|
("F-AKRO/USDT", 'F_AKRO_USDT'),
|
||||||
|
("LC+/ETH", 'LC__ETH'),
|
||||||
|
("CMT@18/ETH", 'CMT_18_ETH'),
|
||||||
|
("LBTC:1022/SAI", 'LBTC_1022_SAI'),
|
||||||
|
("$PAC/BTC", '_PAC_BTC'),
|
||||||
])
|
])
|
||||||
def test_pair_to_filename(pair, expected_result):
|
def test_pair_to_filename(pair, expected_result):
|
||||||
pair_s = pair_to_filename(pair)
|
pair_s = pair_to_filename(pair)
|
||||||
|
Loading…
Reference in New Issue
Block a user