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
@@ -20,19 +20,32 @@ class PyBook {
|
||||
const std::string &venue() const;
|
||||
void set_venue(std::string value);
|
||||
|
||||
/**
|
||||
* @brief Gets the name of the security type (e.g., "SPOT", "FUTURE", "OPTION").
|
||||
*
|
||||
* @return const std::string& The name of the security type.
|
||||
*/
|
||||
const std::string &security_type() const;
|
||||
/**
|
||||
* @brief Sets the security type.
|
||||
*
|
||||
* @param value The new security type (should be "SPOT", "FUTURE", or "OPTION").
|
||||
*/
|
||||
void set_security_type(std::string value);
|
||||
|
||||
/**
|
||||
* @brief Gets the exchange security id. This is typically the security's name
|
||||
* (e.g., "BTS-PERPETUAL", or "ESH5").
|
||||
*
|
||||
* @note Must be unique for each security at a particular venue (i.e., a single
|
||||
* venue cannot have 2 securities with the same name).
|
||||
* @note Should be unique for each security at a particular venue (i.e., a single
|
||||
* venue cannot have 2 securities with the same name). MUST be unique for each security
|
||||
* of the same type (e.g., SPOT, FUTURE, OPTION) at a particular venue.
|
||||
*
|
||||
* @note There is no "security_id" member because that is an internal id that
|
||||
* we generate elsewhere in c++ code. The python plugins just need to set the
|
||||
* venue and exchange_security_id.
|
||||
*/
|
||||
const std::string &exchange_security_id() const;
|
||||
|
||||
/**
|
||||
* @brief Sets the exchange security id.
|
||||
*
|
||||
@@ -57,6 +70,7 @@ class PyBook {
|
||||
|
||||
private:
|
||||
std::string venue_;
|
||||
std::string security_type_;
|
||||
std::string exchange_security_id_;
|
||||
PyBookSide bids_;
|
||||
PyBookSide asks_;
|
||||
@@ -69,6 +83,13 @@ class PyBook {
|
||||
inline const std::string &PyBook::venue() const { return venue_; }
|
||||
inline void PyBook::set_venue(std::string value) { venue_ = std::move(value); }
|
||||
|
||||
inline const std::string &PyBook::security_type() const {
|
||||
return security_type_;
|
||||
}
|
||||
inline void PyBook::set_security_type(std::string value) {
|
||||
security_type_ = std::move(value);
|
||||
}
|
||||
|
||||
inline const std::string &PyBook::exchange_security_id() const {
|
||||
return exchange_security_id_;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user