Clarify some odd spots
parent
316137fdf2
commit
05d2985f5f
|
@ -41,7 +41,7 @@ _quote_dt = [
|
||||||
('Ask', 'f4'),
|
('Ask', 'f4'),
|
||||||
('Size', 'i8'),
|
('Size', 'i8'),
|
||||||
('Volume', 'i8'),
|
('Volume', 'i8'),
|
||||||
# ('Broker_time_ns', 'i64'),
|
# ('brokerd_ts', 'i64'),
|
||||||
# ('VWAP', 'f4')
|
# ('VWAP', 'f4')
|
||||||
]
|
]
|
||||||
_quote_tmp = {}.fromkeys(dict(_quote_dt).keys(), np.nan)
|
_quote_tmp = {}.fromkeys(dict(_quote_dt).keys(), np.nan)
|
||||||
|
@ -87,9 +87,8 @@ def quote_to_marketstore_structarray(
|
||||||
# pack into List[Tuple[str, Any]]
|
# pack into List[Tuple[str, Any]]
|
||||||
array_input = []
|
array_input = []
|
||||||
|
|
||||||
# insert 'Epoch' entry first
|
# insert 'Epoch' entry first and then 'Nanoseconds'.
|
||||||
array_input.append(int(secs))
|
array_input.append(int(secs))
|
||||||
# insert 'Nanoseconds' field
|
|
||||||
array_input.append(int(ns))
|
array_input.append(int(ns))
|
||||||
|
|
||||||
# append remaining fields
|
# append remaining fields
|
||||||
|
@ -97,7 +96,10 @@ def quote_to_marketstore_structarray(
|
||||||
if 'f' in dt:
|
if 'f' in dt:
|
||||||
none = np.nan
|
none = np.nan
|
||||||
else:
|
else:
|
||||||
|
# for ``np.int`` we use 0 as a null value
|
||||||
none = 0
|
none = 0
|
||||||
|
|
||||||
|
# casefold? see https://github.com/alpacahq/marketstore/issues/324
|
||||||
val = quote.get(name.casefold(), none)
|
val = quote.get(name.casefold(), none)
|
||||||
array_input.append(val)
|
array_input.append(val)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue