Just do a naive lookup for symbol normalization
parent
f65f56ec75
commit
f6888057c3
|
@ -450,11 +450,13 @@ def normalize_symbol(
|
|||
Normalize symbol names to to a 3x3 pair.
|
||||
|
||||
'''
|
||||
remap = {
|
||||
'XXBTZEUR': 'XBTEUR',
|
||||
'XXMRZEUR': 'XMREUR',
|
||||
}
|
||||
symlen = len(ticker)
|
||||
if symlen != 6:
|
||||
for sym in ['XXBT', 'XXMR', 'ZEUR']:
|
||||
if sym in ticker:
|
||||
ticker = ticker.replace(sym, sym[1:])
|
||||
ticker = remap[ticker]
|
||||
else:
|
||||
raise ValueError(f'Unhandled symbol: {ticker}')
|
||||
|
||||
|
|
Loading…
Reference in New Issue