|
17 | 17 |
|
18 | 18 | logger = logging.getLogger(__name__) |
19 | 19 |
|
20 | | -DBNRecord = ( |
21 | | - databento_dbn.BBOMsg |
22 | | - | databento_dbn.CBBOMsg |
23 | | - | databento_dbn.CMBP1Msg |
24 | | - | databento_dbn.MBOMsg |
25 | | - | databento_dbn.MBP1Msg |
26 | | - | databento_dbn.MBP10Msg |
27 | | - | databento_dbn.TradeMsg |
28 | | - | databento_dbn.OHLCVMsg |
29 | | - | databento_dbn.ImbalanceMsg |
30 | | - | databento_dbn.InstrumentDefMsg |
31 | | - | databento_dbn.InstrumentDefMsgV1 |
32 | | - | databento_dbn.InstrumentDefMsgV2 |
33 | | - | databento_dbn.StatMsg |
34 | | - | databento_dbn.StatMsgV1 |
35 | | - | databento_dbn.StatusMsg |
36 | | - | databento_dbn.SymbolMappingMsg |
37 | | - | databento_dbn.SymbolMappingMsgV1 |
38 | | - | databento_dbn.SystemMsg |
39 | | - | databento_dbn.SystemMsgV1 |
40 | | - | databento_dbn.ErrorMsg |
41 | | - | databento_dbn.ErrorMsgV1 |
42 | | -) |
43 | | - |
44 | 20 | _T = TypeVar("_T") |
45 | 21 |
|
46 | 22 |
|
@@ -95,7 +71,7 @@ class MappingIntervalDict(TypedDict): |
95 | 71 | symbol: str |
96 | 72 |
|
97 | 73 |
|
98 | | -RecordCallback = Callable[[DBNRecord], None] |
| 74 | +RecordCallback = Callable[[databento_dbn.DBNRecord], None] |
99 | 75 | ExceptionCallback = Callable[[Exception], None] |
100 | 76 | ReconnectCallback = Callable[[pd.Timestamp, pd.Timestamp], None] |
101 | 77 |
|
@@ -243,7 +219,7 @@ def callback_name(self) -> str: |
243 | 219 | def exc_callback_name(self) -> str: |
244 | 220 | return getattr(self._exc_fn, "__name__", str(self._exc_fn)) |
245 | 221 |
|
246 | | - def call(self, record: DBNRecord) -> None: |
| 222 | + def call(self, record: databento_dbn.DBNRecord) -> None: |
247 | 223 | """ |
248 | 224 | Execute the callback function, passing `record` in as the first |
249 | 225 | argument. Any exceptions encountered will be dispatched to the |
|
0 commit comments