'ohlc' pubsub message has period
This commit is contained in:
@@ -506,11 +506,8 @@ def pub_ohlc(_series:str, key: OHLCKey, bars: list[NativeOHLC]):
|
|||||||
pool_addr, period = key
|
pool_addr, period = key
|
||||||
chain_id = current_chain.get().chain_id
|
chain_id = current_chain.get().chain_id
|
||||||
period = period_name(period)
|
period = period_name(period)
|
||||||
return (
|
key = f'{pool_addr}|{period}'
|
||||||
f'{chain_id}|{pool_addr}|{period}', # channel name is like 0x...|1m
|
return f'{chain_id}|{key}', 'ohlc', (chain_id, key, [b.ohlc for b in bars])
|
||||||
'ohlc',
|
|
||||||
(chain_id, pool_addr, period, [b.ohlc for b in bars])
|
|
||||||
)
|
|
||||||
|
|
||||||
def ohlc_key_to_str(k):
|
def ohlc_key_to_str(k):
|
||||||
return f'{k[0]}|{period_name(k[1])}'
|
return f'{k[0]}|{period_name(k[1])}'
|
||||||
|
|||||||
Reference in New Issue
Block a user