|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
#include <trade_api.hpp>
Public Attributes | |
| common::Required< std::string > | symbol |
| US stock ticker, e.g. | |
| common::Required< PlaceEquityOrderSideEnum > | side |
| BUY / SELL. | |
| common::Required< PlaceEquityOrderOrderTypeEnum > | order_type |
| MARKET / LIMIT. | |
| std::optional< std::string > | quote_asset = std::nullopt |
| Quote asset. Defaults to USDC; must be within the server's allowed set. | |
| std::optional< std::string > | price = std::nullopt |
| Required for LIMIT; forbidden for MARKET. Maximum 2 decimal places. | |
| std::optional< std::string > | quantity = std::nullopt |
| Required for LIMIT (both sides) and SELL MARKET; forbidden for BUY MARKET. | |
| std::optional< std::string > | notional = std::nullopt |
| Required for BUY MARKET; forbidden for LIMIT and SELL MARKET. | |
| std::optional< PlaceEquityOrderTimeInForceEnum > | time_in_force = std::nullopt |
| DAY (default) / GTC. | |
| std::optional< PlaceEquityOrderTradingSessionEnum > | trading_session = std::nullopt |
| RTH / EXTENDED / 24H. Required for LIMIT; forbidden for MARKET. | |
| std::optional< PlaceEquityOrderWalletTypeEnum > | wallet_type = std::nullopt |
| Payment wallet for BUY orders: CARD (default) / MAIN. | |
| std::optional< std::string > | client_order_id = std::nullopt |
| Client-supplied order id. Format ^[a-zA-Z0-9-_]{32,36}$. Auto-generated when omitted. | |
| std::optional< bool > | tokenize = std::nullopt |
| Whether to tokenize the purchased stock asset upon settlement. | |
| std::optional< PlaceEquityOrderTokenizedAssetSettleWalletTypeEnum > | tokenized_asset_settle_wallet_type = std::nullopt |
| Wallet that receives the tokenized asset minted after the order fills. | |
| std::optional< std::int64_t > | recv_window = std::nullopt |
| The value cannot be greater than 60000. | |
| common::Required<std::string> binance::stocks::rest_api::PlaceEquityOrderParams::symbol |
US stock ticker, e.g.
AAPL, TSLA. Must be a tradable US-equity symbol — verify via /sapi/v1/equity/market/exchangeInfo. Tokenization enablement (verifiable via /sapi/v1/equity/market/tokenized-assets) is not required; non-tokenized symbols are accepted and settle as traditional underlying-equity trades. The tokenize parameter only takes effect on tokenization-enabled symbols and is silently ignored otherwise.
| common::Required<PlaceEquityOrderSideEnum> binance::stocks::rest_api::PlaceEquityOrderParams::side |
BUY / SELL.
| common::Required<PlaceEquityOrderOrderTypeEnum> binance::stocks::rest_api::PlaceEquityOrderParams::order_type |
MARKET / LIMIT.
| std::optional<std::string> binance::stocks::rest_api::PlaceEquityOrderParams::quote_asset = std::nullopt |
Quote asset. Defaults to USDC; must be within the server's allowed set.
| std::optional<std::string> binance::stocks::rest_api::PlaceEquityOrderParams::price = std::nullopt |
Required for LIMIT; forbidden for MARKET. Maximum 2 decimal places.
| std::optional<std::string> binance::stocks::rest_api::PlaceEquityOrderParams::quantity = std::nullopt |
Required for LIMIT (both sides) and SELL MARKET; forbidden for BUY MARKET.
| std::optional<std::string> binance::stocks::rest_api::PlaceEquityOrderParams::notional = std::nullopt |
Required for BUY MARKET; forbidden for LIMIT and SELL MARKET.
| std::optional<PlaceEquityOrderTimeInForceEnum> binance::stocks::rest_api::PlaceEquityOrderParams::time_in_force = std::nullopt |
DAY (default) / GTC.
GTC is only supported for LIMIT orders; a fractional-share GTC order must be paired with tradingSession = EXTENDED or 24H.
| std::optional<PlaceEquityOrderTradingSessionEnum> binance::stocks::rest_api::PlaceEquityOrderParams::trading_session = std::nullopt |
RTH / EXTENDED / 24H. Required for LIMIT; forbidden for MARKET.
| std::optional<PlaceEquityOrderWalletTypeEnum> binance::stocks::rest_api::PlaceEquityOrderParams::wallet_type = std::nullopt |
Payment wallet for BUY orders: CARD (default) / MAIN.
SELL orders always settle to CARD.
| std::optional<std::string> binance::stocks::rest_api::PlaceEquityOrderParams::client_order_id = std::nullopt |
Client-supplied order id. Format ^[a-zA-Z0-9-_]{32,36}$. Auto-generated when omitted.
| std::optional<bool> binance::stocks::rest_api::PlaceEquityOrderParams::tokenize = std::nullopt |
Whether to tokenize the purchased stock asset upon settlement.
Default true. Only takes effect when the symbol is tokenization-enabled (check via /market/tokenized-assets); silently ignored for non-tokenized symbols, which always settle as traditional underlying-equity trades.
| std::optional<PlaceEquityOrderTokenizedAssetSettleWalletTypeEnum> binance::stocks::rest_api::PlaceEquityOrderParams::tokenized_asset_settle_wallet_type = std::nullopt |
Wallet that receives the tokenized asset minted after the order fills.
MAIN = Spot wallet, CARD = Funding wallet. Default CARD. Only applies when side = BUY and tokenize = true; ignored for SELL or tokenize = false. If MAIN is sent while Spot wallet settlement is not enabled, the request is rejected as an illegal parameter.
| std::optional<std::int64_t> binance::stocks::rest_api::PlaceEquityOrderParams::recv_window = std::nullopt |
The value cannot be greater than 60000.