@@ -40,7 +40,7 @@ def get_deriv_ba_types(level: int) -> List[Tuple[str, Union[type, str]]]:
4040 ("length" , np .uint8 ),
4141 ("rtype" , np .uint8 ),
4242 ("publisher_id" , np .uint16 ),
43- ("product_id " , np .uint32 ),
43+ ("instrument_id " , np .uint32 ),
4444 ("ts_event" , np .uint64 ),
4545]
4646
@@ -78,14 +78,6 @@ def get_deriv_ba_types(level: int) -> List[Tuple[str, Union[type, str]]]:
7878 ("volume" , np .int64 ),
7979]
8080
81- STATUS_MSG : List [Tuple [str , Union [type , str ]]] = RECORD_HEADER + [
82- ("ts_recv" , np .uint64 ),
83- ("group" , "S1" ), # 1 byte chararray
84- ("trading_status" , np .uint8 ),
85- ("halt_reason" , np .uint8 ),
86- ("trading_event" , np .uint8 ),
87- ]
88-
8981DEFINITION_MSG : List [Tuple [str , Union [type , str ]]] = RECORD_HEADER + [
9082 ("ts_recv" , np .uint64 ),
9183 ("min_price_increment" , np .int64 ),
@@ -199,23 +191,11 @@ def get_deriv_ba_types(level: int) -> List[Tuple[str, Union[type, str]]]:
199191 Schema .OHLCV_1M : OHLCV_MSG ,
200192 Schema .OHLCV_1H : OHLCV_MSG ,
201193 Schema .OHLCV_1D : OHLCV_MSG ,
202- Schema .STATUS : STATUS_MSG ,
203194 Schema .DEFINITION : DEFINITION_MSG ,
204195 Schema .IMBALANCE : IMBALANCE_MSG ,
205- Schema .GATEWAY_ERROR : RECORD_HEADER
206- + [
207- ("error" , "S64" ),
208- ],
209- Schema .SYMBOL_MAPPING : RECORD_HEADER
210- + [
211- ("stype_in_symbol" , "S22" ),
212- ("stype_out_symbol" , "S22" ),
213- ("dummy" , "S4" ),
214- ("start_ts" , np .uint64 ),
215- ("end_ts" , np .uint64 ),
216- ],
217196}
218197
198+
219199DEFINITION_CHARARRAY_COLUMNS = [
220200 "currency" ,
221201 "settl_currency" ,
@@ -271,7 +251,7 @@ def get_deriv_ba_fields(level: int) -> List[str]:
271251 "ts_event" ,
272252 "ts_in_delta" ,
273253 "publisher_id" ,
274- "product_id " ,
254+ "instrument_id " ,
275255 "action" ,
276256 "side" ,
277257 "depth" ,
@@ -283,15 +263,14 @@ def get_deriv_ba_fields(level: int) -> List[str]:
283263
284264OHLCV_HEADER_COLUMNS = [
285265 "publisher_id" ,
286- "product_id " ,
266+ "instrument_id " ,
287267 "open" ,
288268 "high" ,
289269 "low" ,
290270 "close" ,
291271 "volume" ,
292272]
293273
294- STATUS_DROP_COLUMNS = ["ts_recv" ]
295274DEFINITION_DROP_COLUMNS = [
296275 "ts_recv" ,
297276 "length" ,
@@ -309,10 +288,6 @@ def get_deriv_ba_fields(level: int) -> List[str]:
309288 "dummy" ,
310289]
311290
312- STATUS_COLUMNS = [
313- x for x in (np .dtype (STATUS_MSG ).names or ()) if x not in STATUS_DROP_COLUMNS
314- ]
315-
316291DEFINITION_COLUMNS = [
317292 x
318293 for x in (np .dtype (DEFINITION_MSG ).names or ())
@@ -323,14 +298,13 @@ def get_deriv_ba_fields(level: int) -> List[str]:
323298 x for x in (np .dtype (IMBALANCE_MSG ).names or ()) if x not in IMBALANCE_DROP_COLUMNS
324299]
325300
326-
327301COLUMNS = {
328302 Schema .MBO : [
329303 "ts_event" ,
330304 "ts_in_delta" ,
331305 "publisher_id" ,
332306 "channel_id" ,
333- "product_id " ,
307+ "instrument_id " ,
334308 "order_id" ,
335309 "action" ,
336310 "side" ,
@@ -357,7 +331,6 @@ def get_deriv_ba_fields(level: int) -> List[str]:
357331 Schema .OHLCV_1M : OHLCV_HEADER_COLUMNS ,
358332 Schema .OHLCV_1H : OHLCV_HEADER_COLUMNS ,
359333 Schema .OHLCV_1D : OHLCV_HEADER_COLUMNS ,
360- Schema .STATUS : STATUS_COLUMNS ,
361334 Schema .DEFINITION : DEFINITION_COLUMNS ,
362335 Schema .IMBALANCE : IMBALANCE_COLUMNS ,
363336}
0 commit comments