stream_quotes now using FeedInit
parent
1f4a5b80c4
commit
ea6126d310
|
@ -34,7 +34,6 @@ from rapidfuzz import process as fuzzy
|
|||
import numpy as np
|
||||
import tractor
|
||||
|
||||
from piker.accounting import MktPair
|
||||
from piker.accounting import (
|
||||
MktPair,
|
||||
unpack_fqme,
|
||||
|
@ -213,29 +212,19 @@ async def stream_quotes(
|
|||
|
||||
sym = symbols[0]
|
||||
|
||||
#init_msgs: list[FeedInit] = []
|
||||
init_msgs: list[FeedInit] = []
|
||||
|
||||
async with (
|
||||
open_cached_client('deribit') as client,
|
||||
send_chan as send_chan
|
||||
):
|
||||
|
||||
init_msgs = {
|
||||
# pass back token, and bool, signalling if we're the writer
|
||||
# and that history has been written
|
||||
sym: {
|
||||
'symbol_info': {
|
||||
'asset_type': 'option',
|
||||
'price_tick_size': 0.0005
|
||||
},
|
||||
'shm_write_opts': {
|
||||
'sum_tick_vml': True,
|
||||
'has_vlm': True
|
||||
},
|
||||
'fqsn': sym,
|
||||
},
|
||||
}
|
||||
mkt, pair = await get_mkt_info(sym)
|
||||
|
||||
# build out init msgs according to latest spec
|
||||
init_msgs.append(
|
||||
FeedInit(mkt_info=mkt)
|
||||
)
|
||||
nsym = piker_sym_to_cb_sym(sym.split('.')[0])
|
||||
|
||||
async with maybe_open_price_feed(sym) as stream:
|
||||
|
|
Loading…
Reference in New Issue