Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
Loading...
Searching...
No Matches
binance::derivatives_trading_coin_futures::rest_api::NewOrderParams Struct Reference

#include <trade_api.hpp>

Public Attributes

common::Required< std::string > symbol
 Symbol.
common::Required< NewOrderSideEnum > side
common::Required< NewOrderTypeEnum > type
 After CM migration, stop-type values (STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET) are no longer accepted by this endpoint and will return -4120.
std::optional< NewOrderPositionSideEnum > position_side = std::nullopt
 Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode.
std::optional< NewOrderReduceOnlyEnum > reduce_only = std::nullopt
 "true" or "false".
std::optional< common::Decimal > quantity = std::nullopt
 quantity measured by contract number, Cannot be sent with closePosition=true
std::optional< common::Decimal > price = std::nullopt
 Order price.
std::optional< std::string > new_client_order_id = std::nullopt
 A unique id among open orders.
std::optional< common::Decimal > stop_price = std::nullopt
 Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders.
std::optional< std::string > close_position = std::nullopt
 true, false;Close-All,used with STOP_MARKET or TAKE_PROFIT_MARKET.
std::optional< common::Decimal > activation_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, min 0.1, max 10 where 1 for 1%.
std::optional< NewOrderTimeInForceEnum > time_in_force = std::nullopt
std::optional< NewOrderWorkingTypeEnum > working_type = std::nullopt
 'stopPrice triggered by: "MARK_PRICE", "CONTRACT_PRICE".
std::optional< NewOrderPriceProtectEnum > price_protect = std::nullopt
 "true" or "false". Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders.
std::optional< NewOrderNewOrderRespTypeEnum > new_order_resp_type = std::nullopt
std::optional< NewOrderPriceMatchEnum > price_match = std::nullopt
 only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can't be passed together with price
std::optional< NewOrderSelfTradePreventionModeEnum > self_trade_prevention_mode = std::nullopt
 EXPIRE_TAKER: expire taker order when STP triggers/ EXPIRE_MAKER: expire taker order when STP triggers/ EXPIRE_BOTH: expire both orders when STP triggers
std::optional< std::int64_t > recv_window = std::nullopt

Member Data Documentation

◆ symbol

common::Required<std::string> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::symbol

Symbol.

◆ side

common::Required<NewOrderSideEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::side

◆ type

common::Required<NewOrderTypeEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::type

After CM migration, stop-type values (STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET) are no longer accepted by this endpoint and will return -4120.

Use the new /dapi/v1/algoOrder endpoint instead.

◆ position_side

std::optional<NewOrderPositionSideEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::position_side = std::nullopt

Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode.

It must be sent in Hedge Mode.

◆ reduce_only

std::optional<NewOrderReduceOnlyEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::reduce_only = std::nullopt

"true" or "false".

Cannot be sent in Hedge Mode; cannot be sent with closePosition=true(Close-All)

◆ quantity

std::optional<common::Decimal> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::quantity = std::nullopt

quantity measured by contract number, Cannot be sent with closePosition=true

◆ price

std::optional<common::Decimal> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::price = std::nullopt

Order price.

◆ new_client_order_id

std::optional<std::string> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::new_client_order_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}$

◆ stop_price

std::optional<common::Decimal> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::stop_price = std::nullopt

Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders.

◆ close_position

std::optional<std::string> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::close_position = std::nullopt

true, false;Close-All,used with STOP_MARKET or TAKE_PROFIT_MARKET.

◆ activation_price

std::optional<common::Decimal> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::activation_price = std::nullopt

Used with TRAILING_STOP_MARKET orders, default as the latest price(supporting different workingType).

◆ callback_rate

std::optional<common::Decimal> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::callback_rate = std::nullopt

Used with TRAILING_STOP_MARKET orders, min 0.1, max 10 where 1 for 1%.

◆ time_in_force

std::optional<NewOrderTimeInForceEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::time_in_force = std::nullopt

◆ working_type

std::optional<NewOrderWorkingTypeEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::working_type = std::nullopt

'stopPrice triggered by: "MARK_PRICE", "CONTRACT_PRICE".

◆ price_protect

std::optional<NewOrderPriceProtectEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::price_protect = std::nullopt

"true" or "false". Used with STOP/STOP_MARKET or TAKE_PROFIT/TAKE_PROFIT_MARKET orders.

◆ new_order_resp_type

std::optional<NewOrderNewOrderRespTypeEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::new_order_resp_type = std::nullopt

◆ price_match

std::optional<NewOrderPriceMatchEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::price_match = std::nullopt

only avaliable for LIMIT/STOP/TAKE_PROFIT order; Can't be passed together with price

◆ self_trade_prevention_mode

std::optional<NewOrderSelfTradePreventionModeEnum> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::self_trade_prevention_mode = std::nullopt

EXPIRE_TAKER: expire taker order when STP triggers/ EXPIRE_MAKER: expire taker order when STP triggers/ EXPIRE_BOTH: expire both orders when STP triggers

◆ recv_window

std::optional<std::int64_t> binance::derivatives_trading_coin_futures::rest_api::NewOrderParams::recv_window = std::nullopt