@@ -19,11 +19,11 @@ from nautilus_trader.common.clock cimport Clock
19
19
from nautilus_trader.common.logging cimport LoggerAdapter
20
20
from nautilus_trader.common.uuid cimport UUIDFactory
21
21
from nautilus_trader.core.uuid cimport UUID
22
+ from nautilus_trader.data.base cimport DataType
22
23
from nautilus_trader.data.engine cimport DataEngine
23
24
from nautilus_trader.model.bar cimport Bar
24
25
from nautilus_trader.model.bar cimport BarType
25
26
from nautilus_trader.model.identifiers cimport Symbol
26
- from nautilus_trader.model.identifiers cimport Venue
27
27
from nautilus_trader.model.instrument cimport Instrument
28
28
from nautilus_trader.model.order_book cimport OrderBook
29
29
from nautilus_trader.model.tick cimport QuoteTick
@@ -37,18 +37,35 @@ cdef class DataClient:
37
37
cdef DataEngine _engine
38
38
cdef dict _config
39
39
40
- cdef readonly Venue venue
40
+ cdef readonly str name
41
41
""" The clients venue.\n\n :returns: `Venue`"""
42
42
cdef readonly bint is_connected
43
43
""" If the client is connected.\n\n :returns: `bool`"""
44
44
45
- cpdef list unavailable_methods(self )
46
-
47
45
cpdef void connect(self ) except *
48
46
cpdef void disconnect(self ) except *
49
47
cpdef void reset(self ) except *
50
48
cpdef void dispose(self ) except *
51
49
50
+ # -- SUBSCRIPTIONS ---------------------------------------------------------------------------------
51
+
52
+ cpdef void subscribe(self , DataType data_type) except *
53
+ cpdef void unsubscribe(self , DataType data_type) except *
54
+
55
+ # -- REQUEST HANDLERS ------------------------------------------------------------------------------
56
+
57
+ cpdef void request(self , DataType data_type, UUID correlation_id) except *
58
+
59
+ # -- DATA HANDLERS ---------------------------------------------------------------------------------
60
+
61
+ cdef void _handle_data(self , DataType data_type, data) except *
62
+ cdef void _handle_data_response(self , DataType data_type, data, UUID correlation_id) except *
63
+
64
+
65
+ cdef class MarketDataClient(DataClient):
66
+
67
+ cpdef list unavailable_methods(self )
68
+
52
69
# -- SUBSCRIPTIONS ---------------------------------------------------------------------------------
53
70
54
71
cpdef void subscribe_instrument(self , Symbol symbol) except *
0 commit comments