refactor: Split MarketDataGateway up into providers/sources
MarketDataGateway still exists, but is greatly simplified. It creates several `IMarketDataProvider`s, each of which generates a list of `IMarketDataSource`s. The market data sources provide market data to an `IMarketDataListener`. * EmumbaMarketDataProvider * CCApiMarketDataProvider * PyMarketDataProvider * OnixsMarketDataProvider * ReplayMarketDataProvider As a side effect, individual py market data sources are now explicitly limited to a single venue (it probably should have been this way all along, since the shared memory writers do not expect updates to involve multiple venues).
This commit is contained in:
1 parent
d68fe93422
commit
0aaa6e18fd
60 files changed
+1724
-758
No files matched your search
@@ -37,9 +37,6 @@ namespace py = pybind11;
|
||||
// Binds getter -> <name>, and setter -> set_<name>.
|
||||
#define PROP(type, name) \
|
||||
def(_STR(name), &type::name).def(_STR(set_##name), &type::set_##name)
|
||||
// namespace blah {
|
||||
// typedef bts::md::py_interop::PyBookSide & (bts::md::py_interop::PyBook::*bids());
|
||||
// }
|
||||
|
||||
// Define python module with c++ classes.
|
||||
PYBIND11_MODULE(python_md_module, m) {
|
||||
@@ -93,6 +90,7 @@ PYBIND11_MODULE(python_md_module, m) {
|
||||
py::class_<bts::md::py_interop::PyBook>(m, "PyBook")
|
||||
.def(py::init<>())
|
||||
.PROP(PyBook, venue)
|
||||
.PROP(PyBook, security_type)
|
||||
.PROP(PyBook, exchange_security_id)
|
||||
.EXPLICIT_DEF(PyBook, bids, BookSideGetter)
|
||||
.DEF(PyBook, set_bids)
|
||||
@@ -110,6 +108,7 @@ PYBIND11_MODULE(python_md_module, m) {
|
||||
py::class_<PyTrade>(m, "PyTrade")
|
||||
.def(py::init<>())
|
||||
.PROP(PyTrade, venue)
|
||||
.PROP(PyTrade, security_type)
|
||||
.PROP(PyTrade, exchange_security_id)
|
||||
.PROP(PyTrade, price)
|
||||
.PROP(PyTrade, quantity)
|
||||
@@ -142,5 +141,6 @@ PYBIND11_MODULE(python_md_module, m) {
|
||||
}
|
||||
|
||||
#undef PROP
|
||||
#undef EXPLICIT_DEF
|
||||
#undef DEF
|
||||
#undef _STR
|
||||
Reference in new issue
Block a user