Also log the payload

bar_select
Tyler Goodlet 2020-07-31 00:10:47 -04:00
parent 46c804db0b
commit cb8215c203
1 changed files with 3 additions and 2 deletions

View File

@ -142,8 +142,7 @@ async def stream_poll_requests(
# to the last quote received # to the last quote received
new = set(quote.items()) - set(last.items()) new = set(quote.items()) - set(last.items())
if new: if new:
log.info( log.info(f"New quote {symbol}:\n{new}")
f"New quote {quote['symbol']}:\n{new}")
_cache[symbol] = quote _cache[symbol] = quote
# only ship diff updates and other required fields # only ship diff updates and other required fields
@ -171,6 +170,8 @@ async def stream_poll_requests(
# XXX: very questrade specific # XXX: very questrade specific
payload['size'] = quote['lastTradeSize'] payload['size'] = quote['lastTradeSize']
log.info(f"New paylod {symbol}:\n{payload}")
# XXX: we append to a list for the options case where the # XXX: we append to a list for the options case where the
# subscription topic (key) is the same for all # subscription topic (key) is the same for all
# expiries even though this is uncessary for the # expiries even though this is uncessary for the