|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
#include <trade_api.hpp>
Public Attributes | |
| common::Required< NewAlgoOrderAlgoTypeEnum > | algo_type |
| Only support CONDITIONAL. | |
| common::Required< std::string > | symbol |
| Symbol. | |
| common::Required< NewAlgoOrderSideEnum > | side |
| Side. | |
| common::Required< NewAlgoOrderTypeEnum > | type |
| For CONDITIONAL algoType, STOP_MARKET/TAKE_PROFIT_MARKET/STOP/TAKE_PROFIT/TRAILING_STOP_MARKET as order type. | |
| std::optional< std::string > | id = std::nullopt |
| Id. | |
| std::optional< NewAlgoOrderPositionSideEnum > | position_side = std::nullopt |
| Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. | |
| std::optional< NewAlgoOrderTimeInForceEnum > | time_in_force = std::nullopt |
| IOC or GTC or FOK or GTX or GTD, default GTC | |
| std::optional< common::Decimal > | quantity = std::nullopt |
| Cannot be sent with closePosition=true(Close-All). | |
| std::optional< common::Decimal > | price = std::nullopt |
| Price. | |
| std::optional< common::Decimal > | trigger_price = std::nullopt |
| Trigger Price. | |
| std::optional< NewAlgoOrderWorkingTypeEnum > | working_type = std::nullopt |
| triggerPrice triggered by: MARK_PRICE, CONTRACT_PRICE. Default CONTRACT_PRICE | |
| std::optional< NewAlgoOrderPriceMatchEnum > | price_match = std::nullopt |
| only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can't be passed together with price | |
| std::optional< NewAlgoOrderClosePositionEnum > | close_position = std::nullopt |
| Close-All,used with STOP_MARKET or TAKE_PROFIT_MARKET. | |
| std::optional< NewAlgoOrderPriceProtectEnum > | price_protect = std::nullopt |
| Used with STOP_MARKET or TAKE_PROFIT_MARKET order. | |
| std::optional< NewAlgoOrderReduceOnlyEnum > | reduce_only = std::nullopt |
| Cannot be sent in Hedge Mode; cannot be sent with closePosition=true. | |
| std::optional< common::Decimal > | activate_price = std::nullopt |
| Used with TRAILING_STOP_MARKET orders, default as the latest price(supporting different
workingType). | |
| std::optional< common::Decimal > | callback_rate = std::nullopt |
| Used with TRAILING_STOP_MARKET orders. | |
| std::optional< std::string > | client_algo_id = std::nullopt |
| A unique id among open orders. | |
| std::optional< NewAlgoOrderNewOrderRespTypeEnum > | new_order_resp_type = std::nullopt |
| "ACK", "RESULT", default "ACK" | |
| std::optional< NewAlgoOrderSelfTradePreventionModeEnum > | self_trade_prevention_mode |
| EXPIRE_TAKER: expire taker order when STP triggers/ EXPIRE_MAKER: expire taker order when STP triggers/ EXPIRE_BOTH: expire both orders when STP triggers; default NONE | |
| std::optional< std::int64_t > | good_till_date = std::nullopt |
| order cancel time for timeInForce GTD, mandatory when timeInforce set to GTD; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000 | |
| std::optional< std::int64_t > | recv_window = std::nullopt |
| Recv Window. | |
| common::Required<NewAlgoOrderAlgoTypeEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::algo_type |
Only support CONDITIONAL.
| common::Required<std::string> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::symbol |
Symbol.
| common::Required<NewAlgoOrderSideEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::side |
Side.
| common::Required<NewAlgoOrderTypeEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::type |
For CONDITIONAL algoType, STOP_MARKET/TAKE_PROFIT_MARKET/STOP/TAKE_PROFIT/TRAILING_STOP_MARKET as order type.
| std::optional<std::string> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::id = std::nullopt |
Id.
| std::optional<NewAlgoOrderPositionSideEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::position_side = std::nullopt |
Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode.
| std::optional<NewAlgoOrderTimeInForceEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::time_in_force = std::nullopt |
IOC or GTC or FOK or GTX or GTD, default GTC
| std::optional<common::Decimal> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::quantity = std::nullopt |
Cannot be sent with closePosition=true(Close-All).
| std::optional<common::Decimal> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::price = std::nullopt |
Price.
| std::optional<common::Decimal> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::trigger_price = std::nullopt |
Trigger Price.
| std::optional<NewAlgoOrderWorkingTypeEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::working_type = std::nullopt |
triggerPrice triggered by: MARK_PRICE, CONTRACT_PRICE. Default CONTRACT_PRICE
| std::optional<NewAlgoOrderPriceMatchEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::price_match = std::nullopt |
only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can't be passed together with price
| std::optional<NewAlgoOrderClosePositionEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::close_position = std::nullopt |
Close-All,used with STOP_MARKET or TAKE_PROFIT_MARKET.
| std::optional<NewAlgoOrderPriceProtectEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::price_protect = std::nullopt |
Used with STOP_MARKET or TAKE_PROFIT_MARKET order.
when price reaches the triggerPrice ,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the Price Protection Threshold of the symbol.
| std::optional<NewAlgoOrderReduceOnlyEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::reduce_only = std::nullopt |
Cannot be sent in Hedge Mode; cannot be sent with closePosition=true.
| std::optional<common::Decimal> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::activate_price = std::nullopt |
Used with TRAILING_STOP_MARKET orders, default as the latest price(supporting different workingType).
| std::optional<common::Decimal> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::callback_rate = std::nullopt |
Used with TRAILING_STOP_MARKET orders.
| std::optional<std::string> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::client_algo_id = std::nullopt |
A unique id among open orders.
Automatically generated if not sent. Can only be string following the rule: ^[\.A-Z\:/a-z0-9_-]{1,36}$
| std::optional<NewAlgoOrderNewOrderRespTypeEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::new_order_resp_type = std::nullopt |
"ACK", "RESULT", default "ACK"
| std::optional<NewAlgoOrderSelfTradePreventionModeEnum> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::self_trade_prevention_mode |
EXPIRE_TAKER: expire taker order when STP triggers/ EXPIRE_MAKER: expire taker order when STP triggers/ EXPIRE_BOTH: expire both orders when STP triggers; default NONE
| std::optional<std::int64_t> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::good_till_date = std::nullopt |
order cancel time for timeInForce GTD, mandatory when timeInforce set to GTD; order the timestamp only retains second-level precision, ms part will be ignored; The goodTillDate timestamp must be greater than the current time plus 600 seconds and smaller than 253402300799000
| std::optional<std::int64_t> binance::derivatives_trading_usds_futures::websocket_api::NewAlgoOrderParams::recv_window = std::nullopt |
Recv Window.