TT CORE SDK
0.1
TT CORE SDK documentation
|
Represents the current state of the order. More...
#include <orders.hpp>
Public Member Functions | |
OrderHandle (OrderManager &manager, const order_profile &profile) | |
OrderHandle ctor. More... | |
OrderHandle (std::unique_ptr< OrderHandleImpl > &&) | |
OrderHandle ctor (Internal use only) More... | |
~OrderHandle (void) noexcept | |
OrderHandle dtor. More... | |
const std::string & | GetOrderId (void) const noexcept |
TT Order Id. More... | |
double | GetPrice (void) const noexcept |
Order price (NAN if not available) More... | |
int32_t | GetOrderQuantity (void) const noexcept |
Order quantity (0 if not available) More... | |
int32_t | GetWorkingQuantity (void) const noexcept |
Quantity working in the market (0 if not available) More... | |
void | ChangeOrder (change_request &request) |
Change the order. More... | |
void | ChangePrice (double price, uint32_t request_id=0) |
Change the order price. More... | |
void | ChangeQuantity (int32_t quantity, uint32_t request_id=0) |
Change the order quantity. More... | |
void | ChangePriceQuantity (double price, int32_t quantity, uint32_t request_id=0) |
Change the order price and quantity. More... | |
void | DeleteOrder (uint32_t request_id=0) |
Delete the order from the market. More... | |
OrderHandle (const OrderHandle &)=delete | |
Copy/Move disabled. More... | |
OrderHandle & | operator= (const OrderHandle &)=delete |
OrderHandle (OrderHandle &&)=delete | |
OrderHandle & | operator= (OrderHandle &&)=delete |
Friends | |
class | OrderManager |
class | OrderManagerImpl |
class | SharedOrderManagerImpl |
Represents the current state of the order.
Order handles provide an interface with how to interact with the order. CoreSDK maintains an internal cache of the working orders, therefore requiring an OrderHandle be encapsulated in a std::shared_ptr.
Definition at line 65 of file orders.hpp.
|
explicit |
OrderHandle ctor.
Constructs the object using the definition provided by the order_profile Struct. The order is NOT submitted upon construction, that is done via the OrderManager. Once the order is working, methods to change/delete the order will become active.
[in] | manager | OrderManager responsible for submission |
[in] | profile | Profile defining the order |
std::runtime_error | OrderHandle failed to be constructed |
|
explicit |
OrderHandle ctor (Internal use only)
|
noexcept |
OrderHandle dtor.
|
delete |
Copy/Move disabled.
|
delete |
void tt_core_sdk::OrderHandle::ChangeOrder | ( | change_request & | request | ) |
Change the order.
Change is performed in accordance to the values in the provided request. CoreSDK will populate the request_time field.
[in] | request | Change request profile |
void tt_core_sdk::OrderHandle::ChangePrice | ( | double | price, |
uint32_t | request_id = 0 |
||
) |
Change the order price.
[in] | price | Change price |
[in] | request_id | Id echoed back on acknowledgement |
void tt_core_sdk::OrderHandle::ChangePriceQuantity | ( | double | price, |
int32_t | quantity, | ||
uint32_t | request_id = 0 |
||
) |
Change the order price and quantity.
[in] | price | Change price |
[in] | quantity | Change quantity |
[in] | request_id | Id echoed back on acknowledgement |
void tt_core_sdk::OrderHandle::ChangeQuantity | ( | int32_t | quantity, |
uint32_t | request_id = 0 |
||
) |
Change the order quantity.
[in] | quantity | Change quantity |
[in] | request_id | Id echoed back on acknowledgement |
void tt_core_sdk::OrderHandle::DeleteOrder | ( | uint32_t | request_id = 0 | ) |
Delete the order from the market.
[in] | request_id | Id echoed back on acknowledgement |
|
noexcept |
TT Order Id.
|
noexcept |
Order quantity (0 if not available)
|
noexcept |
Order price (NAN if not available)
|
noexcept |
Quantity working in the market (0 if not available)
|
delete |
|
delete |
|
friend |
Definition at line 131 of file orders.hpp.
|
friend |
Definition at line 132 of file orders.hpp.
|
friend |
Definition at line 133 of file orders.hpp.