Honestly, f$@%! you cz...

cz_post_ftx
Tyler Goodlet 2022-12-07 16:18:00 -05:00
parent 5915cf3acf
commit 5c459f21be
1 changed files with 10 additions and 2 deletions

View File

@ -460,11 +460,19 @@ async def stream_quotes(
syminfo = Pair(**d) # validation
si = sym_infos[sym] = syminfo.to_dict()
filters = {}
for entry in syminfo.filters:
ftype = entry.pop('filterType')
filters[ftype] = entry
# XXX: after manually inspecting the response format we
# just directly pick out the info we need
si['price_tick_size'] = float(syminfo.filters[0]['tickSize'])
si['lot_tick_size'] = float(syminfo.filters[2]['stepSize'])
si['price_tick_size'] = float(
filters['PRICE_FILTER']['tickSize']
)
si['lot_tick_size'] = float(
filters['LOT_SIZE']['stepSize']
)
si['asset_type'] = 'crypto'
symbol = symbols[0]