34 void subscribe(
const std::vector<TopicType>& topics,
48 const std::optional<GetHistoryExecutionsOptions>& opts,
53 const std::optional<GetTodayExecutionsOptions>& opts,
58 const std::optional<GetHistoryOrdersOptions>& opts,
63 const std::optional<GetTodayOrdersOptions>& opts,
81 const std::string& currency,
95 const std::optional<GetFundPositionsOptions>& opts,
100 const std::optional<GetStockPositionsOptions>& opts,
Definition: config.hpp:16
Trade context.
Definition: trade_context.hpp:16
void history_orders(const std::optional< GetHistoryOrdersOptions > &opts, AsyncCallback< TradeContext, std::vector< Order >> callback) const
Get history orders.
void set_on_order_changed(PushCallback< TradeContext, PushOrderChanged > callback) const
void estimate_max_purchase_quantity(const EstimateMaxPurchaseQuantityOptions &opts, AsyncCallback< TradeContext, EstimateMaxPurchaseQuantityResponse > callback) const
void account_balance(const std::string ¤cy, AsyncCallback< TradeContext, std::vector< AccountBalance >> callback) const
Get account balance with currency.
void stock_positions(const std::optional< GetStockPositionsOptions > &opts, AsyncCallback< TradeContext, StockPositionsResponse > callback) const
Get stock positions.
TradeContext(const TradeContext &ctx)
void history_executions(const std::optional< GetHistoryExecutionsOptions > &opts, AsyncCallback< TradeContext, std::vector< Execution >> callback) const
Get history executions.
void unsubscribe(const std::vector< TopicType > &topics, AsyncCallback< TradeContext, void > callback) const
Unsubscribe.
void account_balance(const GetCashFlowOptions &opts, AsyncCallback< TradeContext, std::vector< CashFlow >> callback) const
Get cash flow.
TradeContext & operator=(const TradeContext &ctx)
void account_balance(AsyncCallback< TradeContext, std::vector< AccountBalance >> callback) const
Get account balance.
void margin_ratio(const std::string &symbol, AsyncCallback< TradeContext, MarginRatio > callback) const
Get margin ratio.
TradeContext(TradeContext &&ctx)
TradeContext(const lb_trade_context_t *ctx)
void subscribe(const std::vector< TopicType > &topics, AsyncCallback< TradeContext, void > callback) const
Subscribe.
void submit_order(const SubmitOrderOptions &opts, AsyncCallback< TradeContext, SubmitOrderResponse > callback) const
Submit order.
void today_orders(const std::optional< GetTodayOrdersOptions > &opts, AsyncCallback< TradeContext, std::vector< Order >> callback) const
Get history orders.
void fund_positions(const std::optional< GetFundPositionsOptions > &opts, AsyncCallback< TradeContext, FundPositionsResponse > callback) const
Get fund positions.
void today_executions(const std::optional< GetTodayExecutionsOptions > &opts, AsyncCallback< TradeContext, std::vector< Execution >> callback) const
Get today executions.
static TradeContext create(const Config &config)
void cancel_order(const std::string &order_id, AsyncCallback< TradeContext, void > callback) const
Cancel order.
void order_detail(const std::string &order_id, AsyncCallback< TradeContext, OrderDetail > callback) const
Get order detail.
void replace_order(const ReplaceOrderOptions &opts, AsyncCallback< TradeContext, void > callback) const
Replace order.
Definition: async_result.hpp:8
std::function< void(PushEvent< Ctx, T >)> PushCallback
Definition: push.hpp:27
std::function< void(AsyncResult< Ctx, T >)> AsyncCallback
Definition: async_result.hpp:48
Options for estimate maximum purchase quantity.
Definition: types.hpp:2057
Options for submit order request.
Definition: types.hpp:1777
Options for replace order request.
Definition: types.hpp:1609
Options for submit order request.
Definition: types.hpp:1636
struct lb_trade_context_t lb_trade_context_t
Definition: trade_context.hpp:9