Broadcast all tick types to subs, not just trades

cached_feeds
Tyler Goodlet 2021-03-30 10:56:19 -04:00
parent 5fc2aba3ed
commit 4f51ca74f4
1 changed files with 35 additions and 32 deletions

View File

@ -206,7 +206,6 @@ async def allocate_persistent_feed(
bus.feeds[symbol] = (cs, init_msg, first_quote)
with cs:
if opened:
# start history backfill task
# ``backfill_bars()`` is a required backend func
@ -246,7 +245,11 @@ async def allocate_persistent_feed(
# while another consumer is serviced..
# start writing the shm buffer with appropriate trade data
for tick in iterticks(quote, types=('trade', 'utrade',)):
for tick in quote['ticks']:
# write trade events to shm last OHLC sample
if tick['type'] in ('trade', 'utrade'):
last = tick['price']
# update last entry