|
14 | 14 | from databento.live import DBNRecord |
15 | 15 |
|
16 | 16 |
|
| 17 | +DEFINITION_TYPE_MAX_MAP = { |
| 18 | + x[0]: np.iinfo(x[1]).max |
| 19 | + for x in InstrumentDefMsg._dtypes |
| 20 | + if not isinstance(x[1], str) |
| 21 | +} |
| 22 | + |
17 | 23 | SCHEMA_STRUCT_MAP: dict[Schema, type[DBNRecord]] = { |
18 | 24 | Schema.DEFINITION: InstrumentDefMsg, |
19 | 25 | Schema.IMBALANCE: ImbalanceMsg, |
|
51 | 57 | Schema.STATISTICS: StatMsg._dtypes, |
52 | 58 | } |
53 | 59 |
|
54 | | -DEFINITION_CHARARRAY_COLUMNS = [ |
55 | | - "currency", |
56 | | - "settl_currency", |
57 | | - "secsubtype", |
58 | | - "raw_symbol", |
59 | | - "group", |
60 | | - "exchange", |
61 | | - "asset", |
62 | | - "cfi", |
63 | | - "security_type", |
64 | | - "unit_of_measure", |
65 | | - "underlying", |
66 | | - "strike_price_currency", |
67 | | - "instrument_class", |
68 | | - "match_algorithm", |
69 | | - "security_update_action", |
70 | | - "user_defined_instrument", |
71 | | -] |
72 | | - |
73 | | -DEFINITION_PRICE_COLUMNS = [ |
74 | | - "min_price_increment", |
75 | | - "high_limit_price", |
76 | | - "low_limit_price", |
77 | | - "max_price_variation", |
78 | | - "trading_reference_price", |
79 | | - "min_price_increment_amount", |
80 | | - "price_ratio", |
81 | | - "strike_price", |
82 | | -] |
83 | | - |
84 | | -DEFINITION_TYPE_MAX_MAP = { |
85 | | - x[0]: np.iinfo(x[1]).max |
86 | | - for x in InstrumentDefMsg._dtypes |
87 | | - if not isinstance(x[1], str) |
88 | | -} |
89 | | - |
90 | 60 | SCHEMA_COLUMNS = { |
91 | 61 | Schema.MBO: MBOMsg._ordered_fields, |
92 | 62 | Schema.MBP_1: MBP1Msg._ordered_fields, |
|
0 commit comments