Encode a `mktpair` field if passed in msg by caller
parent
17b976eb88
commit
55b6cba31e
|
@ -32,6 +32,7 @@ import pendulum
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from ..accounting._mktinfo import (
|
from ..accounting._mktinfo import (
|
||||||
|
MktPair,
|
||||||
Symbol,
|
Symbol,
|
||||||
)
|
)
|
||||||
from .types import Struct
|
from .types import Struct
|
||||||
|
@ -90,7 +91,7 @@ class Flume(Struct):
|
||||||
queuing properties.
|
queuing properties.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
symbol: Symbol
|
symbol: Symbol | MktPair
|
||||||
first_quote: dict
|
first_quote: dict
|
||||||
_rt_shm_token: _Token
|
_rt_shm_token: _Token
|
||||||
|
|
||||||
|
@ -178,7 +179,11 @@ class Flume(Struct):
|
||||||
|
|
||||||
# TODO: do we even need to convert to dict
|
# TODO: do we even need to convert to dict
|
||||||
# first now?
|
# first now?
|
||||||
|
# TODO: drop the former.
|
||||||
msg['symbol'] = msg['symbol'].to_dict()
|
msg['symbol'] = msg['symbol'].to_dict()
|
||||||
|
mktpair = msg.get('mktpair')
|
||||||
|
if mktpair:
|
||||||
|
msg['mktpair'] = mktpair.to_dict()
|
||||||
|
|
||||||
# can't serialize the stream or feed objects, it's expected
|
# can't serialize the stream or feed objects, it's expected
|
||||||
# you'll have a ref to it since this msg should be rxed on
|
# you'll have a ref to it since this msg should be rxed on
|
||||||
|
|
Loading…
Reference in New Issue