@@ -31,7 +31,7 @@ cdef void trade_default_listener(int event_type,
3131 events[i] = TradeTuple(symbol = unicode_from_dxf_const_string_t(symbol_name),
3232 sequence = trades[i].sequence,
3333 price = trades[i].price,
34- exchange_code = unicode_from_dxf_const_string_t(& trades[i].exchange_code),
34+ exchange_code = unicode_from_dxf_const_string_t(& trades[i].exchange_code, size = 1 ),
3535 size = trades[i].size,
3636 tick = trades[i].tick,
3737 change = trades[i].change,
@@ -66,11 +66,13 @@ cdef void quote_default_listener(int event_type,
6666 time = quotes[i].time,
6767 time_nanos = quotes[i].time_nanos,
6868 bid_time = quotes[i].bid_time,
69- bid_exchange_code = unicode_from_dxf_const_string_t(& quotes[i].bid_exchange_code),
69+ bid_exchange_code = unicode_from_dxf_const_string_t(& quotes[i].bid_exchange_code,
70+ size = 1 ),
7071 bid_price = quotes[i].bid_price,
7172 bid_size = quotes[i].bid_size,
7273 ask_time = quotes[i].ask_time,
73- ask_exchange_code = unicode_from_dxf_const_string_t(& quotes[i].ask_exchange_code),
74+ ask_exchange_code = unicode_from_dxf_const_string_t(& quotes[i].ask_exchange_code,
75+ size = 1 ),
7476 ask_price = quotes[i].ask_price,
7577 ask_size = quotes[i].ask_size,
7678 scope = < int > quotes[i].scope)
@@ -102,7 +104,7 @@ cdef void summary_default_listener(int event_type, dxf_const_string_t symbol_nam
102104 prev_day_volume = summary[i].prev_day_volume,
103105 open_interest = summary[i].open_interest,
104106 raw_flags = summary[i].raw_flags,
105- exchange_code = unicode_from_dxf_const_string_t(& summary[i].exchange_code),
107+ exchange_code = unicode_from_dxf_const_string_t(& summary[i].exchange_code, size = 1 ),
106108 day_close_price_type = summary[i].day_close_price_type,
107109 prev_day_close_price_type = summary[i].prev_day_close_price_type,
108110 scope = summary[i].scope)
@@ -166,7 +168,7 @@ cdef void time_and_sale_default_listener(int event_type,
166168 event_flags = tns[i].event_flags,
167169 index = tns[i].index,
168170 time = tns[i].time,
169- exchange_code = unicode_from_dxf_const_string_t(& tns[i].exchange_code),
171+ exchange_code = unicode_from_dxf_const_string_t(& tns[i].exchange_code, size = 1 ),
170172 price = tns[i].price,
171173 size = tns[i].size,
172174 bid_price = tns[i].bid_price,
@@ -243,8 +245,8 @@ cdef void order_default_listener(int event_type,
243245 count = order[i].count,
244246 scope = order[i].scope,
245247 side = order[i].side,
246- exchange_code = unicode_from_dxf_const_string_t(& order[i].exchange_code),
247- source = unicode_from_dxf_const_string_t(& order[i].source[DXF_RECORD_SUFFIX_SIZE ]),
248+ exchange_code = unicode_from_dxf_const_string_t(& order[i].exchange_code, size = 1 ),
249+ source = unicode_from_dxf_const_string_t(& order[i].source[0 ]),
248250 market_maker = unicode_from_dxf_const_string_t(order[i].market_maker),
249251 spread_symbol = unicode_from_dxf_const_string_t(order[i].spread_symbol))
250252 py_data.cython_internal_update_method(events)
0 commit comments