TT CORE SDK
0.1
TT CORE SDK documentation
|
Manages a set of orders and delivers order notifications. More...
#include <orders.hpp>
Public Member Functions | |
OrderManager (void) | |
OrderManager default ctor. More... | |
~OrderManager (void) noexcept | |
OrderManager dtor. More... | |
void | Subscribe (const std::shared_ptr< OrderEventListener > &listener) noexcept |
Subscribe for order events. More... | |
void | PlaceOrder (std::shared_ptr< OrderHandle > &handle, uint32_t request_id=0) |
Place an order. More... | |
void | DownloadFills (uint8_t days=7, market market_id=market::INVALID, uint64_t account=0, uint32_t request_id=0) |
Download historical fills. More... | |
void | DownloadOrderBook (uint32_t request_id=0) |
Download the current order book. More... | |
OrderManager (const OrderManager &)=delete | |
Non-copy, move enabled. More... | |
OrderManager & | operator= (const OrderManager &)=delete |
OrderManager (OrderManager &&)=default | |
OrderManager & | operator= (OrderManager &&)=default |
Friends | |
class | OrderHandle |
Manages a set of orders and delivers order notifications.
Each instance will manage orders submitted through it. A listener can be registered to recieve all events for the orders it manages.
Definition at line 410 of file orders.hpp.
tt_core_sdk::OrderManager::OrderManager | ( | void | ) |
OrderManager default ctor.
|
noexcept |
OrderManager dtor.
|
delete |
Non-copy, move enabled.
|
default |
void tt_core_sdk::OrderManager::DownloadFills | ( | uint8_t | days = 7 , |
market | market_id = market::INVALID , |
||
uint64_t | account = 0 , |
||
uint32_t | request_id = 0 |
||
) |
Download historical fills.
Result will be delivered through the OrderEventListener.
[in] | days | Number of days in the past to query |
[in] | market_id | Specific market (INVALID for all markets) |
[in] | account | Fill account (0 for all accounts) |
[in] | request_id | Optional request id returned on the event |
std::runtime_error | CoreSDK not initialized |
std::runtime_error | Download already in progress |
std::runtime_error | No OrderEventListener attached |
void tt_core_sdk::OrderManager::DownloadOrderBook | ( | uint32_t | request_id = 0 | ) |
Download the current order book.
Result will be delivered through the OrderEventListener.
[in] | request_id | Optional request id returned on the event |
|
delete |
|
default |
void tt_core_sdk::OrderManager::PlaceOrder | ( | std::shared_ptr< OrderHandle > & | handle, |
uint32_t | request_id = 0 |
||
) |
Place an order.
Result of the order submission will be delivered through the OrderEventListener. OrderHandle Class will be cached upon success.
[in] | handle | OrderHandle |
[in] | request_id | Optional request id returned on the event |
|
noexcept |
Subscribe for order events.
All events pertaining to orders submitted through the instance will be delivered to the provided listener. Events are delivered on a thread managed by the SDK, so it's highly recommended the implementation within the callbacks be lean as it may have an impact on order submission/delivery times. Listener should always be kept in scope.
[in] | listener | User defined class inheriting from OrderEventListener |
|
friend |
Definition at line 462 of file orders.hpp.