#include <orderbook_publisher.hpp>
◆ OrderbookPublisher()
| exchange::server::OrderbookPublisher::OrderbookPublisher |
( |
ActionSpmcReceiver && | actionReceiver | ) |
|
|
explicit |
◆ getL1Data()
| L1Data exchange::server::OrderbookPublisher::getL1Data |
( |
SecurityId | securityId | ) |
const |
|
nodiscard |
Compute the L1 data for a given security.
- Parameters
-
| securityId | The security for which to compute the L1 data. |
- Returns
- The L1 data of that security's orderbook, consisting of best buy/sell price and quantity, as well as the price and quantity of the most recent trade.
◆ getL2Data()
| L2Data exchange::server::OrderbookPublisher::getL2Data |
( |
SecurityId | securityId, |
|
|
uint8_t | numberOfLevels ) const |
|
nodiscard |
Compute the L2 data for a given security, with a given number of levels.
- Parameters
-
| securityId | The security for which to compute the L2 data. |
| numberOfLevels | The number of levels (price, quantity pairs) to compute for each of the buy and sell books. At most 10 (guaranteed by the gateway). |
- Returns
- The L2 data, which contains the price and quantity pairs for the best numberOfLevels levels.
◆ loop()
| void exchange::server::OrderbookPublisher::loop |
( |
| ) |
|
Perform one iteration of the orderbook publisher's workflow, which consumes one action from the SPMC queue and updates its internal state.
◆ processAction()
| void exchange::server::OrderbookPublisher::processAction |
( |
const Action & | action | ) |
|
Update the internal orderbook of the publisher based on an update from the matching engine.
- Parameters
-
| action | The modification to the orderbook state, coming from the SPMC queue. |
The documentation for this class was generated from the following files: