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

DerivativesTradingCoinFutures REST API client. More...

#include <rest_api.hpp>

Public Member Functions

 RestApi (common::RestApiConfig configuration)
 Throws common::ConfigError if the configuration is invalid.
const common::RestApiConfig & configuration () const noexcept
template<class T>
common::RestApiResponse< T > send_request (std::string endpoint, common::HttpMethod method, common::Params query={}, common::Params body={}) const
 Calls an endpoint the SDK does not wrap yet. T may be boost::json::value.
template<class T>
common::RestApiResponse< T > send_signed_request (std::string endpoint, common::HttpMethod method, common::Params query={}, common::Params body={}) const
 Like send_request, but signed (adds timestamp and signature).
template<class T, class CompletionToken>
auto async_send_request (std::string endpoint, common::HttpMethod method, common::Params query, common::Params body, CompletionToken &&token) const
template<class T, class CompletionToken>
auto async_send_signed_request (std::string endpoint, common::HttpMethod method, common::Params query, common::Params body, CompletionToken &&token) const
common::RestApiResponse< AccountInformationResponse > account_information (const AccountInformationParams &params={}) const
 Account Information (USER_DATA).
template<class CompletionToken>
auto async_account_information (const AccountInformationParams &params, CompletionToken &&token) const
 Asynchronous account_information().
common::RestApiResponse< std::vector< FuturesAccountBalanceResponseInner > > futures_account_balance (const FuturesAccountBalanceParams &params={}) const
 Futures Account Balance (USER_DATA).
template<class CompletionToken>
auto async_futures_account_balance (const FuturesAccountBalanceParams &params, CompletionToken &&token) const
 Asynchronous futures_account_balance().
common::RestApiResponse< GetCurrentPositionModeResponse > get_current_position_mode (const GetCurrentPositionModeParams &params={}) const
 Get Current Position Mode (USER_DATA).
template<class CompletionToken>
auto async_get_current_position_mode (const GetCurrentPositionModeParams &params, CompletionToken &&token) const
 Asynchronous get_current_position_mode().
common::RestApiResponse< GetDownloadIdForFuturesOrderHistoryResponse > get_download_id_for_futures_order_history (const GetDownloadIdForFuturesOrderHistoryParams &params) const
 Get Download Id For Futures Order History (USER_DATA).
template<class CompletionToken>
auto async_get_download_id_for_futures_order_history (const GetDownloadIdForFuturesOrderHistoryParams &params, CompletionToken &&token) const
 Asynchronous get_download_id_for_futures_order_history().
common::RestApiResponse< GetDownloadIdForFuturesTradeHistoryResponse > get_download_id_for_futures_trade_history (const GetDownloadIdForFuturesTradeHistoryParams &params) const
 Get Download Id For Futures Trade History (USER_DATA).
template<class CompletionToken>
auto async_get_download_id_for_futures_trade_history (const GetDownloadIdForFuturesTradeHistoryParams &params, CompletionToken &&token) const
 Asynchronous get_download_id_for_futures_trade_history().
common::RestApiResponse< GetDownloadIdForFuturesTransactionHistoryResponse > get_download_id_for_futures_transaction_history (const GetDownloadIdForFuturesTransactionHistoryParams &params) const
 Get Download Id For Futures Transaction History (USER_DATA).
template<class CompletionToken>
auto async_get_download_id_for_futures_transaction_history (const GetDownloadIdForFuturesTransactionHistoryParams &params, CompletionToken &&token) const
 Asynchronous get_download_id_for_futures_transaction_history().
common::RestApiResponse< GetFuturesOrderHistoryDownloadLinkByIdResponse > get_futures_order_history_download_link_by_id (const GetFuturesOrderHistoryDownloadLinkByIdParams &params) const
 Get Futures Order History Download Link by Id (USER_DATA).
template<class CompletionToken>
auto async_get_futures_order_history_download_link_by_id (const GetFuturesOrderHistoryDownloadLinkByIdParams &params, CompletionToken &&token) const
 Asynchronous get_futures_order_history_download_link_by_id().
common::RestApiResponse< GetFuturesTradeDownloadLinkByIdResponse > get_futures_trade_download_link_by_id (const GetFuturesTradeDownloadLinkByIdParams &params) const
 Get Futures Trade Download Link by Id (USER_DATA).
template<class CompletionToken>
auto async_get_futures_trade_download_link_by_id (const GetFuturesTradeDownloadLinkByIdParams &params, CompletionToken &&token) const
 Asynchronous get_futures_trade_download_link_by_id().
common::RestApiResponse< GetFuturesTransactionHistoryDownloadLinkByIdResponse > get_futures_transaction_history_download_link_by_id (const GetFuturesTransactionHistoryDownloadLinkByIdParams &params) const
 Get Futures Transaction History Download Link by Id (USER_DATA).
template<class CompletionToken>
auto async_get_futures_transaction_history_download_link_by_id (const GetFuturesTransactionHistoryDownloadLinkByIdParams &params, CompletionToken &&token) const
 Asynchronous get_futures_transaction_history_download_link_by_id().
common::RestApiResponse< std::vector< GetIncomeHistoryResponseInner > > get_income_history (const GetIncomeHistoryParams &params={}) const
 Get Income History (USER_DATA).
template<class CompletionToken>
auto async_get_income_history (const GetIncomeHistoryParams &params, CompletionToken &&token) const
 Asynchronous get_income_history().
common::RestApiResponse< std::vector< NotionalBracketForPairResponseInner > > notional_bracket_for_pair (const NotionalBracketForPairParams &params={}) const
 Notional Bracket for Pair (USER_DATA).
template<class CompletionToken>
auto async_notional_bracket_for_pair (const NotionalBracketForPairParams &params, CompletionToken &&token) const
 Asynchronous notional_bracket_for_pair().
common::RestApiResponse< std::vector< NotionalBracketForSymbolResponseInner > > notional_bracket_for_symbol (const NotionalBracketForSymbolParams &params={}) const
 Notional Bracket for Symbol (USER_DATA).
template<class CompletionToken>
auto async_notional_bracket_for_symbol (const NotionalBracketForSymbolParams &params, CompletionToken &&token) const
 Asynchronous notional_bracket_for_symbol().
common::RestApiResponse< UserCommissionRateResponse > user_commission_rate (const UserCommissionRateParams &params) const
 User Commission Rate (USER_DATA).
template<class CompletionToken>
auto async_user_commission_rate (const UserCommissionRateParams &params, CompletionToken &&token) const
 Asynchronous user_commission_rate().
common::RestApiResponse< std::vector< BasisResponseInner > > basis (const BasisParams &params) const
 Basis.
template<class CompletionToken>
auto async_basis (const BasisParams &params, CompletionToken &&token) const
 Asynchronous basis().
common::RestApiResponse< CheckServerTimeResponse > check_server_time () const
 Check Server time.
template<class CompletionToken>
auto async_check_server_time (CompletionToken &&token) const
 Asynchronous check_server_time().
common::RestApiResponse< std::vector< CompressedAggregateTradesListResponseInner > > compressed_aggregate_trades_list (const CompressedAggregateTradesListParams &params) const
 Compressed/Aggregate Trades List.
template<class CompletionToken>
auto async_compressed_aggregate_trades_list (const CompressedAggregateTradesListParams &params, CompletionToken &&token) const
 Asynchronous compressed_aggregate_trades_list().
common::RestApiResponse< std::vector< std::vector< ContinuousContractKlineCandlestickDataItemInner > > > continuous_contract_kline_candlestick_data (const ContinuousContractKlineCandlestickDataParams &params) const
 Continuous Contract Kline/Candlestick Data.
template<class CompletionToken>
auto async_continuous_contract_kline_candlestick_data (const ContinuousContractKlineCandlestickDataParams &params, CompletionToken &&token) const
 Asynchronous continuous_contract_kline_candlestick_data().
common::RestApiResponse< ExchangeInformationResponse > exchange_information () const
 Exchange Information.
template<class CompletionToken>
auto async_exchange_information (CompletionToken &&token) const
 Asynchronous exchange_information().
common::RestApiResponse< std::vector< GetFundingRateHistoryOfPerpetualFuturesResponseInner > > get_funding_rate_history_of_perpetual_futures (const GetFundingRateHistoryOfPerpetualFuturesParams &params) const
 Get Funding Rate History of Perpetual Futures.
template<class CompletionToken>
auto async_get_funding_rate_history_of_perpetual_futures (const GetFundingRateHistoryOfPerpetualFuturesParams &params, CompletionToken &&token) const
 Asynchronous get_funding_rate_history_of_perpetual_futures().
common::RestApiResponse< std::vector< GetFundingRateInfoResponseInner > > get_funding_rate_info () const
 Get Funding Rate Info.
template<class CompletionToken>
auto async_get_funding_rate_info (CompletionToken &&token) const
 Asynchronous get_funding_rate_info().
common::RestApiResponse< std::vector< IndexPriceAndMarkPriceResponseInner > > index_price_and_mark_price (const IndexPriceAndMarkPriceParams &params={}) const
 Index Price and Mark Price.
template<class CompletionToken>
auto async_index_price_and_mark_price (const IndexPriceAndMarkPriceParams &params, CompletionToken &&token) const
 Asynchronous index_price_and_mark_price().
common::RestApiResponse< std::vector< std::vector< IndexPriceKlineCandlestickDataItemInner > > > index_price_kline_candlestick_data (const IndexPriceKlineCandlestickDataParams &params) const
 Index Price Kline/Candlestick Data.
template<class CompletionToken>
auto async_index_price_kline_candlestick_data (const IndexPriceKlineCandlestickDataParams &params, CompletionToken &&token) const
 Asynchronous index_price_kline_candlestick_data().
common::RestApiResponse< std::vector< std::vector< ContinuousContractKlineCandlestickDataItemInner > > > kline_candlestick_data (const KlineCandlestickDataParams &params) const
 Kline/Candlestick Data.
template<class CompletionToken>
auto async_kline_candlestick_data (const KlineCandlestickDataParams &params, CompletionToken &&token) const
 Asynchronous kline_candlestick_data().
common::RestApiResponse< std::vector< LongShortRatioResponseInner > > long_short_ratio (const LongShortRatioParams &params) const
 Long/Short Ratio.
template<class CompletionToken>
auto async_long_short_ratio (const LongShortRatioParams &params, CompletionToken &&token) const
 Asynchronous long_short_ratio().
common::RestApiResponse< std::vector< std::vector< IndexPriceKlineCandlestickDataItemInner > > > mark_price_kline_candlestick_data (const MarkPriceKlineCandlestickDataParams &params) const
 Mark Price Kline/Candlestick Data.
template<class CompletionToken>
auto async_mark_price_kline_candlestick_data (const MarkPriceKlineCandlestickDataParams &params, CompletionToken &&token) const
 Asynchronous mark_price_kline_candlestick_data().
common::RestApiResponse< std::vector< OldTradesLookupResponseInner > > old_trades_lookup (const OldTradesLookupParams &params) const
 Old Trades Lookup (MARKET_DATA).
template<class CompletionToken>
auto async_old_trades_lookup (const OldTradesLookupParams &params, CompletionToken &&token) const
 Asynchronous old_trades_lookup().
common::RestApiResponse< OpenInterestResponse > open_interest (const OpenInterestParams &params) const
 Open Interest.
template<class CompletionToken>
auto async_open_interest (const OpenInterestParams &params, CompletionToken &&token) const
 Asynchronous open_interest().
common::RestApiResponse< std::vector< OpenInterestStatisticsResponseInner > > open_interest_statistics (const OpenInterestStatisticsParams &params) const
 Open Interest Statistics.
template<class CompletionToken>
auto async_open_interest_statistics (const OpenInterestStatisticsParams &params, CompletionToken &&token) const
 Asynchronous open_interest_statistics().
common::RestApiResponse< OrderBookResponse > order_book (const OrderBookParams &params) const
 Order Book.
template<class CompletionToken>
auto async_order_book (const OrderBookParams &params, CompletionToken &&token) const
 Asynchronous order_book().
common::RestApiResponse< std::vector< std::vector< PremiumIndexKlineDataItemInner > > > premium_index_kline_data (const PremiumIndexKlineDataParams &params) const
 Premium index Kline Data.
template<class CompletionToken>
auto async_premium_index_kline_data (const PremiumIndexKlineDataParams &params, CompletionToken &&token) const
 Asynchronous premium_index_kline_data().
common::RestApiResponse< QueryIndexPriceConstituentsResponse > query_index_price_constituents (const QueryIndexPriceConstituentsParams &params) const
 Query Index Price Constituents.
template<class CompletionToken>
auto async_query_index_price_constituents (const QueryIndexPriceConstituentsParams &params, CompletionToken &&token) const
 Asynchronous query_index_price_constituents().
common::RestApiResponse< std::vector< RecentTradesListResponseInner > > recent_trades_list (const RecentTradesListParams &params) const
 Recent Trades List.
template<class CompletionToken>
auto async_recent_trades_list (const RecentTradesListParams &params, CompletionToken &&token) const
 Asynchronous recent_trades_list().
common::RestApiResponse< std::vector< SymbolOrderBookTickerResponseInner > > symbol_order_book_ticker (const SymbolOrderBookTickerParams &params={}) const
 Symbol Order Book Ticker.
template<class CompletionToken>
auto async_symbol_order_book_ticker (const SymbolOrderBookTickerParams &params, CompletionToken &&token) const
 Asynchronous symbol_order_book_ticker().
common::RestApiResponse< std::vector< SymbolPriceTickerResponseInner > > symbol_price_ticker (const SymbolPriceTickerParams &params={}) const
 Symbol Price Ticker.
template<class CompletionToken>
auto async_symbol_price_ticker (const SymbolPriceTickerParams &params, CompletionToken &&token) const
 Asynchronous symbol_price_ticker().
common::RestApiResponse< std::vector< TakerBuySellVolumeResponseInner > > taker_buy_sell_volume (const TakerBuySellVolumeParams &params) const
 Taker Buy/Sell Volume.
template<class CompletionToken>
auto async_taker_buy_sell_volume (const TakerBuySellVolumeParams &params, CompletionToken &&token) const
 Asynchronous taker_buy_sell_volume().
common::RestApiResponse< boost::json::value > test_connectivity () const
 Test Connectivity.
template<class CompletionToken>
auto async_test_connectivity (CompletionToken &&token) const
 Asynchronous test_connectivity().
common::RestApiResponse< std::vector< Ticker24hrPriceChangeStatisticsResponseInner > > ticker24hr_price_change_statistics (const Ticker24hrPriceChangeStatisticsParams &params={}) const
 24hr Ticker Price Change Statistics
template<class CompletionToken>
auto async_ticker24hr_price_change_statistics (const Ticker24hrPriceChangeStatisticsParams &params, CompletionToken &&token) const
 Asynchronous ticker24hr_price_change_statistics().
common::RestApiResponse< std::vector< TopTraderLongShortRatioAccountsResponseInner > > top_trader_long_short_ratio_accounts (const TopTraderLongShortRatioAccountsParams &params) const
 Top Trader Long/Short Account Ratio.
template<class CompletionToken>
auto async_top_trader_long_short_ratio_accounts (const TopTraderLongShortRatioAccountsParams &params, CompletionToken &&token) const
 Asynchronous top_trader_long_short_ratio_accounts().
common::RestApiResponse< std::vector< TopTraderLongShortRatioPositionsResponseInner > > top_trader_long_short_ratio_positions (const TopTraderLongShortRatioPositionsParams &params) const
 Top Trader Long/Short Position Ratio.
template<class CompletionToken>
auto async_top_trader_long_short_ratio_positions (const TopTraderLongShortRatioPositionsParams &params, CompletionToken &&token) const
 Asynchronous top_trader_long_short_ratio_positions().
common::RestApiResponse< std::vector< AccountTradeListResponseInner > > account_trade_list (const AccountTradeListParams &params={}) const
 Account Trade List (USER_DATA).
template<class CompletionToken>
auto async_account_trade_list (const AccountTradeListParams &params, CompletionToken &&token) const
 Asynchronous account_trade_list().
common::RestApiResponse< std::vector< AllOrdersResponseInner > > all_orders (const AllOrdersParams &params={}) const
 All Orders (USER_DATA).
template<class CompletionToken>
auto async_all_orders (const AllOrdersParams &params, CompletionToken &&token) const
 Asynchronous all_orders().
common::RestApiResponse< AutoCancelAllOpenOrdersResponse > auto_cancel_all_open_orders (const AutoCancelAllOpenOrdersParams &params) const
 Auto-Cancel All Open Orders (TRADE).
template<class CompletionToken>
auto async_auto_cancel_all_open_orders (const AutoCancelAllOpenOrdersParams &params, CompletionToken &&token) const
 Asynchronous auto_cancel_all_open_orders().
common::RestApiResponse< CancelAlgoOrderResponse > cancel_algo_order (const CancelAlgoOrderParams &params={}) const
 Cancel Algo Order (TRADE).
template<class CompletionToken>
auto async_cancel_algo_order (const CancelAlgoOrderParams &params, CompletionToken &&token) const
 Asynchronous cancel_algo_order().
common::RestApiResponse< NewAlgoOrderResponse > new_algo_order (const NewAlgoOrderParams &params) const
 New Algo Order (TRADE).
template<class CompletionToken>
auto async_new_algo_order (const NewAlgoOrderParams &params, CompletionToken &&token) const
 Asynchronous new_algo_order().
common::RestApiResponse< QueryAlgoOrderResponse > query_algo_order (const QueryAlgoOrderParams &params={}) const
 Query Algo Order (USER_DATA).
template<class CompletionToken>
auto async_query_algo_order (const QueryAlgoOrderParams &params, CompletionToken &&token) const
 Asynchronous query_algo_order().
common::RestApiResponse< CancelAllAlgoOpenOrdersResponse > cancel_all_algo_open_orders (const CancelAllAlgoOpenOrdersParams &params) const
 Cancel All Algo Open Orders (TRADE).
template<class CompletionToken>
auto async_cancel_all_algo_open_orders (const CancelAllAlgoOpenOrdersParams &params, CompletionToken &&token) const
 Asynchronous cancel_all_algo_open_orders().
common::RestApiResponse< CancelAllOpenOrdersResponse > cancel_all_open_orders (const CancelAllOpenOrdersParams &params) const
 Cancel All Open Orders (TRADE).
template<class CompletionToken>
auto async_cancel_all_open_orders (const CancelAllOpenOrdersParams &params, CompletionToken &&token) const
 Asynchronous cancel_all_open_orders().
common::RestApiResponse< std::vector< CancelMultipleOrdersResponseInner > > cancel_multiple_orders (const CancelMultipleOrdersParams &params) const
 Cancel Multiple Orders (TRADE).
template<class CompletionToken>
auto async_cancel_multiple_orders (const CancelMultipleOrdersParams &params, CompletionToken &&token) const
 Asynchronous cancel_multiple_orders().
common::RestApiResponse< std::vector< ModifyMultipleOrdersResponseInner > > modify_multiple_orders (const ModifyMultipleOrdersParams &params) const
 Modify Multiple Orders (TRADE).
template<class CompletionToken>
auto async_modify_multiple_orders (const ModifyMultipleOrdersParams &params, CompletionToken &&token) const
 Asynchronous modify_multiple_orders().
common::RestApiResponse< std::vector< PlaceMultipleOrdersResponseInner > > place_multiple_orders (const PlaceMultipleOrdersParams &params) const
 Place Multiple Orders (TRADE).
template<class CompletionToken>
auto async_place_multiple_orders (const PlaceMultipleOrdersParams &params, CompletionToken &&token) const
 Asynchronous place_multiple_orders().
common::RestApiResponse< CancelOrderResponse > cancel_order (const CancelOrderParams &params) const
 Cancel Order (TRADE).
template<class CompletionToken>
auto async_cancel_order (const CancelOrderParams &params, CompletionToken &&token) const
 Asynchronous cancel_order().
common::RestApiResponse< ModifyOrderResponse > modify_order (const ModifyOrderParams &params) const
 Modify Order (TRADE).
template<class CompletionToken>
auto async_modify_order (const ModifyOrderParams &params, CompletionToken &&token) const
 Asynchronous modify_order().
common::RestApiResponse< NewOrderResponse > new_order (const NewOrderParams &params) const
 New Order (TRADE).
template<class CompletionToken>
auto async_new_order (const NewOrderParams &params, CompletionToken &&token) const
 Asynchronous new_order().
common::RestApiResponse< QueryOrderResponse > query_order (const QueryOrderParams &params) const
 Query Order (USER_DATA).
template<class CompletionToken>
auto async_query_order (const QueryOrderParams &params, CompletionToken &&token) const
 Asynchronous query_order().
common::RestApiResponse< ChangeInitialLeverageResponse > change_initial_leverage (const ChangeInitialLeverageParams &params) const
 Change Initial Leverage (TRADE).
template<class CompletionToken>
auto async_change_initial_leverage (const ChangeInitialLeverageParams &params, CompletionToken &&token) const
 Asynchronous change_initial_leverage().
common::RestApiResponse< ChangeMarginTypeResponse > change_margin_type (const ChangeMarginTypeParams &params) const
 Change Margin Type (TRADE).
template<class CompletionToken>
auto async_change_margin_type (const ChangeMarginTypeParams &params, CompletionToken &&token) const
 Asynchronous change_margin_type().
common::RestApiResponse< ChangePositionModeResponse > change_position_mode (const ChangePositionModeParams &params) const
 Change Position Mode (TRADE).
template<class CompletionToken>
auto async_change_position_mode (const ChangePositionModeParams &params, CompletionToken &&token) const
 Asynchronous change_position_mode().
common::RestApiResponse< std::vector< CurrentAllAlgoOpenOrdersResponseInner > > current_all_algo_open_orders (const CurrentAllAlgoOpenOrdersParams &params={}) const
 Current All Algo Open Orders (USER_DATA).
template<class CompletionToken>
auto async_current_all_algo_open_orders (const CurrentAllAlgoOpenOrdersParams &params, CompletionToken &&token) const
 Asynchronous current_all_algo_open_orders().
common::RestApiResponse< std::vector< CurrentAllOpenOrdersResponseInner > > current_all_open_orders (const CurrentAllOpenOrdersParams &params={}) const
 Current All Open Orders (USER_DATA).
template<class CompletionToken>
auto async_current_all_open_orders (const CurrentAllOpenOrdersParams &params, CompletionToken &&token) const
 Asynchronous current_all_open_orders().
common::RestApiResponse< std::vector< GetOrderModifyHistoryResponseInner > > get_order_modify_history (const GetOrderModifyHistoryParams &params) const
 Get Order Modify History (USER_DATA).
template<class CompletionToken>
auto async_get_order_modify_history (const GetOrderModifyHistoryParams &params, CompletionToken &&token) const
 Asynchronous get_order_modify_history().
common::RestApiResponse< std::vector< GetPositionMarginChangeHistoryResponseInner > > get_position_margin_change_history (const GetPositionMarginChangeHistoryParams &params) const
 Get Position Margin Change History (TRADE).
template<class CompletionToken>
auto async_get_position_margin_change_history (const GetPositionMarginChangeHistoryParams &params, CompletionToken &&token) const
 Asynchronous get_position_margin_change_history().
common::RestApiResponse< ModifyIsolatedPositionMarginResponse > modify_isolated_position_margin (const ModifyIsolatedPositionMarginParams &params) const
 Modify Isolated Position Margin (TRADE).
template<class CompletionToken>
auto async_modify_isolated_position_margin (const ModifyIsolatedPositionMarginParams &params, CompletionToken &&token) const
 Asynchronous modify_isolated_position_margin().
common::RestApiResponse< std::vector< PositionAdlQuantileEstimationResponseInner > > position_adl_quantile_estimation (const PositionAdlQuantileEstimationParams &params={}) const
 Position ADL Quantile Estimation (USER_DATA).
template<class CompletionToken>
auto async_position_adl_quantile_estimation (const PositionAdlQuantileEstimationParams &params, CompletionToken &&token) const
 Asynchronous position_adl_quantile_estimation().
common::RestApiResponse< std::vector< PositionInformationResponseInner > > position_information (const PositionInformationParams &params={}) const
 Position Information (USER_DATA).
template<class CompletionToken>
auto async_position_information (const PositionInformationParams &params, CompletionToken &&token) const
 Asynchronous position_information().
common::RestApiResponse< std::vector< QueryAllAlgoOrdersResponseInner > > query_all_algo_orders (const QueryAllAlgoOrdersParams &params) const
 Query All Algo Orders (USER_DATA).
template<class CompletionToken>
auto async_query_all_algo_orders (const QueryAllAlgoOrdersParams &params, CompletionToken &&token) const
 Asynchronous query_all_algo_orders().
common::RestApiResponse< QueryCurrentOpenOrderResponse > query_current_open_order (const QueryCurrentOpenOrderParams &params) const
 Query Current Open Order (USER_DATA).
template<class CompletionToken>
auto async_query_current_open_order (const QueryCurrentOpenOrderParams &params, CompletionToken &&token) const
 Asynchronous query_current_open_order().
common::RestApiResponse< std::vector< UsersForceOrdersResponseInner > > users_force_orders (const UsersForceOrdersParams &params={}) const
 User's Force Orders (USER_DATA).
template<class CompletionToken>
auto async_users_force_orders (const UsersForceOrdersParams &params, CompletionToken &&token) const
 Asynchronous users_force_orders().
common::RestApiResponse< boost::json::value > close_user_data_stream () const
 Close User Data Stream (USER_STREAM).
template<class CompletionToken>
auto async_close_user_data_stream (CompletionToken &&token) const
 Asynchronous close_user_data_stream().
common::RestApiResponse< KeepaliveUserDataStreamResponse > keepalive_user_data_stream () const
 Keepalive User Data Stream (USER_STREAM).
template<class CompletionToken>
auto async_keepalive_user_data_stream (CompletionToken &&token) const
 Asynchronous keepalive_user_data_stream().
common::RestApiResponse< StartUserDataStreamResponse > start_user_data_stream () const
 Start User Data Stream (USER_STREAM).
template<class CompletionToken>
auto async_start_user_data_stream (CompletionToken &&token) const
 Asynchronous start_user_data_stream().

Static Public Member Functions

static RestApi from_config (common::RestApiConfig config)
 A client for config.base_path, production when it is not set.
static RestApi production (common::RestApiConfig config)
 A client for production (Derivatives Trading Coin Futures REST API).
static RestApi testnet (common::RestApiConfig config)
 A client for the testnet.
static RestApi demo (common::RestApiConfig config)
 A client for the demo environment.

Detailed Description

DerivativesTradingCoinFutures REST API client.

Cheap to copy: copies share one common::RestClient (connection pool and executor).

Every endpoint has a blocking form (name(params)) and an asynchronous form (async_name(params, token)) that accepts any Asio completion token.

Constructor & Destructor Documentation

◆ RestApi()

binance::derivatives_trading_coin_futures::rest_api::RestApi::RestApi ( common::RestApiConfig configuration)
explicit

Throws common::ConfigError if the configuration is invalid.

Member Function Documentation

◆ from_config()

RestApi binance::derivatives_trading_coin_futures::rest_api::RestApi::from_config ( common::RestApiConfig config)
staticnodiscard

A client for config.base_path, production when it is not set.

◆ production()

RestApi binance::derivatives_trading_coin_futures::rest_api::RestApi::production ( common::RestApiConfig config)
staticnodiscard

A client for production (Derivatives Trading Coin Futures REST API).

◆ testnet()

RestApi binance::derivatives_trading_coin_futures::rest_api::RestApi::testnet ( common::RestApiConfig config)
staticnodiscard

A client for the testnet.

◆ demo()

RestApi binance::derivatives_trading_coin_futures::rest_api::RestApi::demo ( common::RestApiConfig config)
staticnodiscard

A client for the demo environment.

◆ configuration()

const common::RestApiConfig & binance::derivatives_trading_coin_futures::rest_api::RestApi::configuration ( ) const
nodiscardnoexcept

◆ send_request()

template<class T>
common::RestApiResponse< T > binance::derivatives_trading_coin_futures::rest_api::RestApi::send_request ( std::string endpoint,
common::HttpMethod method,
common::Params query = {},
common::Params body = {} ) const
inlinenodiscard

Calls an endpoint the SDK does not wrap yet. T may be boost::json::value.

◆ send_signed_request()

template<class T>
common::RestApiResponse< T > binance::derivatives_trading_coin_futures::rest_api::RestApi::send_signed_request ( std::string endpoint,
common::HttpMethod method,
common::Params query = {},
common::Params body = {} ) const
inlinenodiscard

Like send_request, but signed (adds timestamp and signature).

◆ async_send_request()

template<class T, class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_send_request ( std::string endpoint,
common::HttpMethod method,
common::Params query,
common::Params body,
CompletionToken && token ) const
inline

◆ async_send_signed_request()

template<class T, class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_send_signed_request ( std::string endpoint,
common::HttpMethod method,
common::Params query,
common::Params body,
CompletionToken && token ) const
inline

◆ account_information()

common::RestApiResponse< AccountInformationResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::account_information ( const AccountInformationParams & params = {}) const
inlinenodiscard

Account Information (USER_DATA).

GET /dapi/v1/account.

Get current account information.

Weight(IP): 5

Security Type: USER_DATA

Notes:

  • for One-way Mode user, the "positions" will only show the "BOTH" positions
  • for Hedge Mode user, the "positions" will show "BOTH", "LONG", and "SHORT" positions.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#account-information

◆ async_account_information()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_account_information ( const AccountInformationParams & params,
CompletionToken && token ) const
inline

Asynchronous account_information().

◆ futures_account_balance()

common::RestApiResponse< std::vector< FuturesAccountBalanceResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::futures_account_balance ( const FuturesAccountBalanceParams & params = {}) const
inlinenodiscard

Futures Account Balance (USER_DATA).

GET /dapi/v1/balance.

Check futures account balance

Weight(IP): 1

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#futures-account-balance

◆ async_futures_account_balance()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_futures_account_balance ( const FuturesAccountBalanceParams & params,
CompletionToken && token ) const
inline

◆ get_current_position_mode()

common::RestApiResponse< GetCurrentPositionModeResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_current_position_mode ( const GetCurrentPositionModeParams & params = {}) const
inlinenodiscard

Get Current Position Mode (USER_DATA).

GET /dapi/v1/positionSide/dual.

Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol

Weight(IP): 30

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-current-position-mode

◆ async_get_current_position_mode()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_current_position_mode ( const GetCurrentPositionModeParams & params,
CompletionToken && token ) const
inline

◆ get_download_id_for_futures_order_history()

common::RestApiResponse< GetDownloadIdForFuturesOrderHistoryResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_download_id_for_futures_order_history ( const GetDownloadIdForFuturesOrderHistoryParams & params) const
inlinenodiscard

Get Download Id For Futures Order History (USER_DATA).

GET /dapi/v1/order/asyn.

Get Download Id For Futures Order History

Weight(IP): 1000

Security Type: USER_DATA

Notes:

  • Request Limitation is 8 times per month, shared by front end download page and rest api
  • This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd call within the same minute will trigger a ban.
  • The time between startTime and endTime can not be longer than 1 year

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-order-history

◆ async_get_download_id_for_futures_order_history()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_download_id_for_futures_order_history ( const GetDownloadIdForFuturesOrderHistoryParams & params,
CompletionToken && token ) const
inline

◆ get_download_id_for_futures_trade_history()

common::RestApiResponse< GetDownloadIdForFuturesTradeHistoryResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_download_id_for_futures_trade_history ( const GetDownloadIdForFuturesTradeHistoryParams & params) const
inlinenodiscard

Get Download Id For Futures Trade History (USER_DATA).

GET /dapi/v1/trade/asyn.

Get download id for futures trade history

Weight(IP): 1000

Security Type: USER_DATA

Notes:

  • Request Limitation is 8 times per month, shared by front end download page and rest api
  • This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd call within the same minute will trigger a ban.
  • The time between startTime and endTime can not be longer than 1 year

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-trade-history

◆ async_get_download_id_for_futures_trade_history()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_download_id_for_futures_trade_history ( const GetDownloadIdForFuturesTradeHistoryParams & params,
CompletionToken && token ) const
inline

◆ get_download_id_for_futures_transaction_history()

common::RestApiResponse< GetDownloadIdForFuturesTransactionHistoryResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_download_id_for_futures_transaction_history ( const GetDownloadIdForFuturesTransactionHistoryParams & params) const
inlinenodiscard

Get Download Id For Futures Transaction History (USER_DATA).

GET /dapi/v1/income/asyn.

Get download id for futures transaction history

Weight(IP): 1000

Security Type: USER_DATA

Notes:

  • The request limit is 100 times per month, shared across the front end download page and rest api, as well as between USDⓈ-M and COIN-M contracts.
  • This endpoint uses the IP rate limit bucket and costs 1000 weight per call. The maximum is 2 calls per minute; the 3rd call within the same minute will trigger a ban.
  • The time between startTime and endTime can not be longer than 1 year

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-download-id-for-futures-transaction-history

◆ async_get_download_id_for_futures_transaction_history()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_download_id_for_futures_transaction_history ( const GetDownloadIdForFuturesTransactionHistoryParams & params,
CompletionToken && token ) const
inline

◆ get_futures_order_history_download_link_by_id()

common::RestApiResponse< GetFuturesOrderHistoryDownloadLinkByIdResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_futures_order_history_download_link_by_id ( const GetFuturesOrderHistoryDownloadLinkByIdParams & params) const
inlinenodiscard

Get Futures Order History Download Link by Id (USER_DATA).

GET /dapi/v1/order/asyn/id.

Get futures order history download link by Id

Weight(IP): 5

Security Type: USER_DATA

Notes:

  • Download link expiration: 7 days

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-order-history-download-link-by-id

◆ async_get_futures_order_history_download_link_by_id()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_futures_order_history_download_link_by_id ( const GetFuturesOrderHistoryDownloadLinkByIdParams & params,
CompletionToken && token ) const
inline

◆ get_futures_trade_download_link_by_id()

common::RestApiResponse< GetFuturesTradeDownloadLinkByIdResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_futures_trade_download_link_by_id ( const GetFuturesTradeDownloadLinkByIdParams & params) const
inlinenodiscard

Get Futures Trade Download Link by Id (USER_DATA).

GET /dapi/v1/trade/asyn/id.

Get futures trade download link by Id

Weight(IP): 5

Security Type: USER_DATA

Notes:

  • Download link expiration: 7 days

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-trade-download-link-by-id

◆ async_get_futures_trade_download_link_by_id()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_futures_trade_download_link_by_id ( const GetFuturesTradeDownloadLinkByIdParams & params,
CompletionToken && token ) const
inline

◆ get_futures_transaction_history_download_link_by_id()

common::RestApiResponse< GetFuturesTransactionHistoryDownloadLinkByIdResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_futures_transaction_history_download_link_by_id ( const GetFuturesTransactionHistoryDownloadLinkByIdParams & params) const
inlinenodiscard

Get Futures Transaction History Download Link by Id (USER_DATA).

GET /dapi/v1/income/asyn/id.

Get futures transaction history download link by Id

Weight(IP): 5

Security Type: USER_DATA

Notes:

  • Download link expiration: 7 days

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-futures-transaction-history-download-link-by-id

◆ async_get_futures_transaction_history_download_link_by_id()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_futures_transaction_history_download_link_by_id ( const GetFuturesTransactionHistoryDownloadLinkByIdParams & params,
CompletionToken && token ) const
inline

◆ get_income_history()

common::RestApiResponse< std::vector< GetIncomeHistoryResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_income_history ( const GetIncomeHistoryParams & params = {}) const
inlinenodiscard

Get Income History (USER_DATA).

GET /dapi/v1/income.

Get income history

Weight(IP): 20

Security Type: USER_DATA

Notes:

  • If incomeType is not sent, all kinds of flow will be returned
  • "trandId" is unique in the same "incomeType" for a user
  • The time between startTime and endTime can not be longer than 1 year

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#get-income-history

◆ async_get_income_history()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_income_history ( const GetIncomeHistoryParams & params,
CompletionToken && token ) const
inline

Asynchronous get_income_history().

◆ notional_bracket_for_pair()

common::RestApiResponse< std::vector< NotionalBracketForPairResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::notional_bracket_for_pair ( const NotionalBracketForPairParams & params = {}) const
inlinenodiscard

Notional Bracket for Pair (USER_DATA).

GET /dapi/v1/leverageBracket.

Not recommended to continue using this v1 endpoint

Get the pair's default notional bracket list, may return ambiguous values when there have been multiple different symbol brackets under the pair, suggest using the following GET /dapi/v2/leverageBracket query instead to get the specific symbol notional bracket list.

Weight(IP): 1

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-pair

◆ async_notional_bracket_for_pair()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_notional_bracket_for_pair ( const NotionalBracketForPairParams & params,
CompletionToken && token ) const
inline

◆ notional_bracket_for_symbol()

common::RestApiResponse< std::vector< NotionalBracketForSymbolResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::notional_bracket_for_symbol ( const NotionalBracketForSymbolParams & params = {}) const
inlinenodiscard

Notional Bracket for Symbol (USER_DATA).

GET /dapi/v2/leverageBracket.

Get the symbol's notional bracket list.

Weight: 1 (after CM migration: 1 with symbol / 2 without symbol)

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#notional-bracket-for-symbol

◆ async_notional_bracket_for_symbol()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_notional_bracket_for_symbol ( const NotionalBracketForSymbolParams & params,
CompletionToken && token ) const
inline

◆ user_commission_rate()

common::RestApiResponse< UserCommissionRateResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::user_commission_rate ( const UserCommissionRateParams & params) const
inlinenodiscard

User Commission Rate (USER_DATA).

GET /dapi/v1/commissionRate.

Query user commission rate

Weight(IP): 20

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/account#user-commission-rate

◆ async_user_commission_rate()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_user_commission_rate ( const UserCommissionRateParams & params,
CompletionToken && token ) const
inline

Asynchronous user_commission_rate().

◆ basis()

common::RestApiResponse< std::vector< BasisResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::basis ( const BasisParams & params) const
inlinenodiscard

Basis.

GET /futures/data/basis.

Query basis

Weight(IP): 1

Notes:

  • If startTime and endTime are not sent, the most recent data is returned.
  • Only the data of the latest 30 days is available.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#basis

◆ async_basis()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_basis ( const BasisParams & params,
CompletionToken && token ) const
inline

Asynchronous basis().

◆ check_server_time()

common::RestApiResponse< CheckServerTimeResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::check_server_time ( ) const
inlinenodiscard

Check Server time.

GET /dapi/v1/time.

Test connectivity to the Rest API and get the current server time.

Weight(IP): 1

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#check-server-time

◆ async_check_server_time()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_check_server_time ( CompletionToken && token) const
inline

Asynchronous check_server_time().

◆ compressed_aggregate_trades_list()

common::RestApiResponse< std::vector< CompressedAggregateTradesListResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::compressed_aggregate_trades_list ( const CompressedAggregateTradesListParams & params) const
inlinenodiscard

Compressed/Aggregate Trades List.

GET /dapi/v1/aggTrades.

Get compressed, aggregate trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated.

Weight(IP): 20

Notes:

  • only trade histories within the past 48 hours (counted from now) can be queried
  • If both startTime and endTime are sent, time between startTime and endTime must be less than 1 hour.
  • If fromId, startTime, and endTime are not sent, the most recent aggregate trades will be returned.
  • Only market trades will be aggregated and returned, which means the insurance fund trades and ADL trades won't be aggregated.
  • Sending both startTime/endTime and fromId might cause response timeout, please send either fromId or startTime/endTime

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#compressed-aggregate-trades-list

◆ async_compressed_aggregate_trades_list()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_compressed_aggregate_trades_list ( const CompressedAggregateTradesListParams & params,
CompletionToken && token ) const
inline

◆ continuous_contract_kline_candlestick_data()

common::RestApiResponse< std::vector< std::vector< ContinuousContractKlineCandlestickDataItemInner > > > binance::derivatives_trading_coin_futures::rest_api::RestApi::continuous_contract_kline_candlestick_data ( const ContinuousContractKlineCandlestickDataParams & params) const
inlinenodiscard

Continuous Contract Kline/Candlestick Data.

GET /dapi/v1/continuousKlines.

Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.

Weight: based on parameter LIMIT

LIMIT weight
[1,100) 1
[100, 500) 2
[500, 1000] 5
> 1000 10

Notes:

  • The difference between startTime and endTime can only be up to 200 days
  • Between startTime and endTime, the most recent limit data from endTime will be returned:
    • If startTime and endTime are not sent, current timestamp will be set as endTime, and the most recent data will be returned.
    • If startTime is sent only, the timestamp of 200 days after startTime will be set as endTime(up to the current time)
    • If endTime is sent only, the timestamp of 200 days before endTime will be set as startTime

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#continuous-contract-kline-candlestick-data

◆ async_continuous_contract_kline_candlestick_data()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_continuous_contract_kline_candlestick_data ( const ContinuousContractKlineCandlestickDataParams & params,
CompletionToken && token ) const
inline

◆ exchange_information()

common::RestApiResponse< ExchangeInformationResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::exchange_information ( ) const
inlinenodiscard

Exchange Information.

GET /dapi/v1/exchangeInfo.

Current exchange trading rules and symbol information

Weight(IP): 1

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#exchange-information

◆ async_exchange_information()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_exchange_information ( CompletionToken && token) const
inline

Asynchronous exchange_information().

◆ get_funding_rate_history_of_perpetual_futures()

common::RestApiResponse< std::vector< GetFundingRateHistoryOfPerpetualFuturesResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_funding_rate_history_of_perpetual_futures ( const GetFundingRateHistoryOfPerpetualFuturesParams & params) const
inlinenodiscard

Get Funding Rate History of Perpetual Futures.

GET /dapi/v1/fundingRate.

Get Funding Rate History of Perpetual Futures

Weight(IP): 1

Notes:

  • empty array will be returned for delivery symbols.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-history-of-perpetual-futures

◆ async_get_funding_rate_history_of_perpetual_futures()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_funding_rate_history_of_perpetual_futures ( const GetFundingRateHistoryOfPerpetualFuturesParams & params,
CompletionToken && token ) const
inline

◆ get_funding_rate_info()

common::RestApiResponse< std::vector< GetFundingRateInfoResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_funding_rate_info ( ) const
inlinenodiscard

Get Funding Rate Info.

GET /dapi/v1/fundingInfo.

Query funding rate info for symbols that had FundingRateCap/FundingRateFloor/fundingIntervalHours adjustment

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#get-funding-rate-info

◆ async_get_funding_rate_info()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_funding_rate_info ( CompletionToken && token) const
inline

Asynchronous get_funding_rate_info().

◆ index_price_and_mark_price()

common::RestApiResponse< std::vector< IndexPriceAndMarkPriceResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::index_price_and_mark_price ( const IndexPriceAndMarkPriceParams & params = {}) const
inlinenodiscard

Index Price and Mark Price.

GET /dapi/v1/premiumIndex.

Query index price and mark price

Weight(IP): 10

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-and-mark-price

◆ async_index_price_and_mark_price()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_index_price_and_mark_price ( const IndexPriceAndMarkPriceParams & params,
CompletionToken && token ) const
inline

◆ index_price_kline_candlestick_data()

common::RestApiResponse< std::vector< std::vector< IndexPriceKlineCandlestickDataItemInner > > > binance::derivatives_trading_coin_futures::rest_api::RestApi::index_price_kline_candlestick_data ( const IndexPriceKlineCandlestickDataParams & params) const
inlinenodiscard

Index Price Kline/Candlestick Data.

GET /dapi/v1/indexPriceKlines.

Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by their open time.

Weight: Based on parameter LIMIT

LIMIT weight
[1,100) 1
[100, 500) 2
[500, 1000] 5
> 1000 10

Notes:

  • The difference between startTime and endTime can only be up to 200 days
  • Between startTime and endTime, the most recent limit data from endTime will be returned:
    • If startTime and endTime are not sent, current timestamp will be set as endTime, and the most recent data will be returned.
    • If startTime is sent only, the timestamp of 200 days after startTime will be set as endTime(up to the current time)
    • If endTime is sent only, the timestamp of 200 days before endTime will be set as startTime

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#index-price-kline-candlestick-data

◆ async_index_price_kline_candlestick_data()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_index_price_kline_candlestick_data ( const IndexPriceKlineCandlestickDataParams & params,
CompletionToken && token ) const
inline

◆ kline_candlestick_data()

common::RestApiResponse< std::vector< std::vector< ContinuousContractKlineCandlestickDataItemInner > > > binance::derivatives_trading_coin_futures::rest_api::RestApi::kline_candlestick_data ( const KlineCandlestickDataParams & params) const
inlinenodiscard

Kline/Candlestick Data.

GET /dapi/v1/klines.

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.

Weight: Based on parameter LIMIT

LIMIT weight
[1,100) 1
[100, 500) 2
[500, 1000] 5
> 1000 10

Notes:

  • The difference between startTime and endTime can only be up to 200 days
  • Between startTime and endTime, the most recent limit data from endTime will be returned:
    • If startTime and endTime are not sent, current timestamp will be set as endTime, and the most recent data will be returned.
    • If startTime is sent only, the timestamp of 200 days after startTime will be set as endTime(up to the current time)
    • If endTime is sent only, the timestamp of 200 days before endTime will be set as startTime

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#kline-candlestick-data

◆ async_kline_candlestick_data()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_kline_candlestick_data ( const KlineCandlestickDataParams & params,
CompletionToken && token ) const
inline

Asynchronous kline_candlestick_data().

◆ long_short_ratio()

common::RestApiResponse< std::vector< LongShortRatioResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::long_short_ratio ( const LongShortRatioParams & params) const
inlinenodiscard

Long/Short Ratio.

GET /futures/data/globalLongShortAccountRatio.

Query symbol Long/Short Ratio

Weight(IP): 1

Notes:

  • If startTime and endTime are not sent, the most recent data is returned.
  • Only the data of the latest 30 days is available.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#long-short-ratio

◆ async_long_short_ratio()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_long_short_ratio ( const LongShortRatioParams & params,
CompletionToken && token ) const
inline

Asynchronous long_short_ratio().

◆ mark_price_kline_candlestick_data()

common::RestApiResponse< std::vector< std::vector< IndexPriceKlineCandlestickDataItemInner > > > binance::derivatives_trading_coin_futures::rest_api::RestApi::mark_price_kline_candlestick_data ( const MarkPriceKlineCandlestickDataParams & params) const
inlinenodiscard

Mark Price Kline/Candlestick Data.

GET /dapi/v1/markPriceKlines.

Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by their open time.

Weight: Based on parameter LIMIT

LIMIT weight
[1,100) 1
[100, 500) 2
[500, 1000] 5
> 1000 10

Notes:

  • The difference between startTime and endTime can only be up to 200 days
  • Between startTime and endTime, the most recent limit data from endTime will be returned:
    • If startTime and endTime are not sent, current timestamp will be set as endTime, and the most recent data will be returned.
    • If startTime is sent only, the timestamp of 200 days after startTime will be set as endTime(up to the current time)
    • If endTime is sent only, the timestamp of 200 days before endTime will be set as startTime

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#mark-price-kline-candlestick-data

◆ async_mark_price_kline_candlestick_data()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_mark_price_kline_candlestick_data ( const MarkPriceKlineCandlestickDataParams & params,
CompletionToken && token ) const
inline

◆ old_trades_lookup()

common::RestApiResponse< std::vector< OldTradesLookupResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::old_trades_lookup ( const OldTradesLookupParams & params) const
inlinenodiscard

Old Trades Lookup (MARKET_DATA).

GET /dapi/v1/historicalTrades.

Get older market historical trades.

Weight(IP): 200

Security Type: MARKET_DATA

Notes:

  • Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned.
  • Only supports data from within the last one month

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#old-trades-lookup

◆ async_old_trades_lookup()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_old_trades_lookup ( const OldTradesLookupParams & params,
CompletionToken && token ) const
inline

Asynchronous old_trades_lookup().

◆ open_interest()

common::RestApiResponse< OpenInterestResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::open_interest ( const OpenInterestParams & params) const
inlinenodiscard

Open Interest.

GET /dapi/v1/openInterest.

Get present open interest of a specific symbol.

Weight(IP): 1

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest

◆ async_open_interest()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_open_interest ( const OpenInterestParams & params,
CompletionToken && token ) const
inline

Asynchronous open_interest().

◆ open_interest_statistics()

common::RestApiResponse< std::vector< OpenInterestStatisticsResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::open_interest_statistics ( const OpenInterestStatisticsParams & params) const
inlinenodiscard

Open Interest Statistics.

GET /futures/data/openInterestHist.

Query open interest stats

Weight(IP): 1

Notes:

  • If startTime and endTime are not sent, the most recent data is returned.
  • Only the data of the latest 30 days is available.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#open-interest-statistics

◆ async_open_interest_statistics()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_open_interest_statistics ( const OpenInterestStatisticsParams & params,
CompletionToken && token ) const
inline

◆ order_book()

common::RestApiResponse< OrderBookResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::order_book ( const OrderBookParams & params) const
inlinenodiscard

Order Book.

GET /dapi/v1/depth.

Query orderbook on specific symbol

Weight: Adjusted based on the limit:

Limit Weight
5, 10, 20, 50 2
100 5
500 10
1000 20

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#order-book

◆ async_order_book()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_order_book ( const OrderBookParams & params,
CompletionToken && token ) const
inline

Asynchronous order_book().

◆ premium_index_kline_data()

common::RestApiResponse< std::vector< std::vector< PremiumIndexKlineDataItemInner > > > binance::derivatives_trading_coin_futures::rest_api::RestApi::premium_index_kline_data ( const PremiumIndexKlineDataParams & params) const
inlinenodiscard

Premium index Kline Data.

GET /dapi/v1/premiumIndexKlines.

Premium index kline bars of a symbol. Klines are uniquely identified by their open time.

Weight: Based on parameter LIMIT

LIMIT weight
[1,100) 1
[100, 500) 2
[500, 1000] 5
> 1000 10

Notes:

  • If startTime and endTime are not sent, the most recent klines are returned.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#premium-index-kline-data

◆ async_premium_index_kline_data()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_premium_index_kline_data ( const PremiumIndexKlineDataParams & params,
CompletionToken && token ) const
inline

◆ query_index_price_constituents()

common::RestApiResponse< QueryIndexPriceConstituentsResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::query_index_price_constituents ( const QueryIndexPriceConstituentsParams & params) const
inlinenodiscard

Query Index Price Constituents.

GET /dapi/v1/constituents.

Query index price constituents

Weight(IP): 1

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#query-index-price-constituents

◆ async_query_index_price_constituents()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_query_index_price_constituents ( const QueryIndexPriceConstituentsParams & params,
CompletionToken && token ) const
inline

◆ recent_trades_list()

common::RestApiResponse< std::vector< RecentTradesListResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::recent_trades_list ( const RecentTradesListParams & params) const
inlinenodiscard

Recent Trades List.

GET /dapi/v1/trades.

Get recent market trades

Weight(IP): 5

Notes:

  • Market trades means trades filled in the order book. Only market trades will be returned, which means the insurance fund trades and ADL trades won't be returned.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#recent-trades-list

◆ async_recent_trades_list()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_recent_trades_list ( const RecentTradesListParams & params,
CompletionToken && token ) const
inline

Asynchronous recent_trades_list().

◆ symbol_order_book_ticker()

common::RestApiResponse< std::vector< SymbolOrderBookTickerResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::symbol_order_book_ticker ( const SymbolOrderBookTickerParams & params = {}) const
inlinenodiscard

Symbol Order Book Ticker.

GET /dapi/v1/ticker/bookTicker.

Best price/qty on the order book for a symbol or symbols.

Weight: 2 for a single symbol, 5 when the symbol parameter is omitted

Notes:

  • Symbol and pair cannot be sent together
  • If a pair is sent,tickers for all symbols of the pair will be returned
  • If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-order-book-ticker

◆ async_symbol_order_book_ticker()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_symbol_order_book_ticker ( const SymbolOrderBookTickerParams & params,
CompletionToken && token ) const
inline

◆ symbol_price_ticker()

common::RestApiResponse< std::vector< SymbolPriceTickerResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::symbol_price_ticker ( const SymbolPriceTickerParams & params = {}) const
inlinenodiscard

Symbol Price Ticker.

GET /dapi/v1/ticker/price.

Latest price for a symbol or symbols.

Weight: 1 for a single symbol, 2 when the symbol parameter is omitted

Notes:

  • Symbol and pair cannot be sent together
  • If a pair is sent,tickers for all symbols of the pair will be returned
  • If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#symbol-price-ticker

◆ async_symbol_price_ticker()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_symbol_price_ticker ( const SymbolPriceTickerParams & params,
CompletionToken && token ) const
inline

Asynchronous symbol_price_ticker().

◆ taker_buy_sell_volume()

common::RestApiResponse< std::vector< TakerBuySellVolumeResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::taker_buy_sell_volume ( const TakerBuySellVolumeParams & params) const
inlinenodiscard

Taker Buy/Sell Volume.

GET /futures/data/takerBuySellVol.

Taker Buy Volume: the total volume of buy orders filled by takers within the period.

Taker Sell Volume: the total volume of sell orders filled by takers within the period.

Weight(IP): 1

Notes:

  • If startTime and endTime are not sent, the most recent data is returned.
  • Only the data of the latest 30 days is available.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#taker-buy-sell-volume

◆ async_taker_buy_sell_volume()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_taker_buy_sell_volume ( const TakerBuySellVolumeParams & params,
CompletionToken && token ) const
inline

Asynchronous taker_buy_sell_volume().

◆ test_connectivity()

common::RestApiResponse< boost::json::value > binance::derivatives_trading_coin_futures::rest_api::RestApi::test_connectivity ( ) const
inlinenodiscard

Test Connectivity.

GET /dapi/v1/ping.

Test connectivity to the Rest API.

Weight(IP): 1

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#test-connectivity

◆ async_test_connectivity()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_test_connectivity ( CompletionToken && token) const
inline

Asynchronous test_connectivity().

◆ ticker24hr_price_change_statistics()

common::RestApiResponse< std::vector< Ticker24hrPriceChangeStatisticsResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::ticker24hr_price_change_statistics ( const Ticker24hrPriceChangeStatisticsParams & params = {}) const
inlinenodiscard

24hr Ticker Price Change Statistics

GET /dapi/v1/ticker/24hr.

24 hour rolling window price change statistics.

Weight: 1 for a single symbol, 40 when the symbol parameter is omitted Careful when accessing this with no symbol.

Notes:

  • Symbol and pair cannot be sent together
  • If a pair is sent,tickers for all symbols of the pair will be returned
  • If either a pair or symbol is sent, tickers for all symbols of all pairs will be returned

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#ticker24hr-price-change-statistics

◆ async_ticker24hr_price_change_statistics()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_ticker24hr_price_change_statistics ( const Ticker24hrPriceChangeStatisticsParams & params,
CompletionToken && token ) const
inline

◆ top_trader_long_short_ratio_accounts()

common::RestApiResponse< std::vector< TopTraderLongShortRatioAccountsResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::top_trader_long_short_ratio_accounts ( const TopTraderLongShortRatioAccountsParams & params) const
inlinenodiscard

Top Trader Long/Short Account Ratio.

GET /futures/data/topLongShortAccountRatio.

The proportion of net long and net short accounts to total accounts of the top 20% users with the highest margin balance. Each account is counted once only.

Long Account % = Accounts of top traders with net long positions / Total accounts of top traders with open positions

Short Account % = Accounts of top traders with net short positions / Total accounts of top traders with open positions

Long/Short Ratio (Accounts) = Long Account % / Short Account %

Weight(IP): 1

Security Type: Accounts

Notes:

  • If startTime and endTime are not sent, the most recent data is returned.
  • Only the data of the latest 30 days is available.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-accounts

◆ async_top_trader_long_short_ratio_accounts()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_top_trader_long_short_ratio_accounts ( const TopTraderLongShortRatioAccountsParams & params,
CompletionToken && token ) const
inline

◆ top_trader_long_short_ratio_positions()

common::RestApiResponse< std::vector< TopTraderLongShortRatioPositionsResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::top_trader_long_short_ratio_positions ( const TopTraderLongShortRatioPositionsParams & params) const
inlinenodiscard

Top Trader Long/Short Position Ratio.

GET /futures/data/topLongShortPositionRatio.

The proportion of net long and net short positions to total open positions of the top 20% users with the highest margin balance.

Long Position % = Long positions of top traders / Total open positions of top traders

Short Position % = Short positions of top traders / Total open positions of top traders

Long/Short Ratio (Positions) = Long Position % / Short Position %

Weight(IP): 1

Security Type: Positions

Notes:

  • If startTime and endTime are not sent, the most recent data is returned.
  • Only the data of the latest 30 days is available.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/market-data#top-trader-long-short-ratio-positions

◆ async_top_trader_long_short_ratio_positions()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_top_trader_long_short_ratio_positions ( const TopTraderLongShortRatioPositionsParams & params,
CompletionToken && token ) const
inline

◆ account_trade_list()

common::RestApiResponse< std::vector< AccountTradeListResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::account_trade_list ( const AccountTradeListParams & params = {}) const
inlinenodiscard

Account Trade List (USER_DATA).

GET /dapi/v1/userTrades.

Get trades for a specific account and symbol.

Weight: 20 with symbol,**40** with pair (after CM migration: 5 flat)

Security Type: USER_DATA

Notes:

  • Either symbol or pair must be sent
  • Symbol and pair cannot be sent together
  • Pair and fromId cannot be sent together
  • OrderId can only be sent together with symbol
  • If a pair is sent,tickers for all symbols of the pair will be returned
  • The parameter fromId cannot be sent with startTime or endTime
  • If startTime and endTime are both not sent, then the last 7 days' data will be returned.
  • The time between startTime and endTime cannot be longer than 7 days.
  • Only support querying trade in the past 3 months

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#account-trade-list

◆ async_account_trade_list()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_account_trade_list ( const AccountTradeListParams & params,
CompletionToken && token ) const
inline

Asynchronous account_trade_list().

◆ all_orders()

common::RestApiResponse< std::vector< AllOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::all_orders ( const AllOrdersParams & params = {}) const
inlinenodiscard

All Orders (USER_DATA).

GET /dapi/v1/allOrders.

Get all account orders; active, canceled, or filled.

  • These orders will not be found:
    • order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days < current time
    • order create time + 90 days < current time

Weight: 20 with symbol, 40 with pair (after CM migration: 5 flat)

Security Type: USER_DATA

Notes:

  • Either symbol or pair must be sent.
  • pair can't be sent with orderId
  • If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.
  • If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.
  • The query time period must be less then 7 days( default as the recent 7 days).

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#all-orders

◆ async_all_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_all_orders ( const AllOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous all_orders().

◆ auto_cancel_all_open_orders()

common::RestApiResponse< AutoCancelAllOpenOrdersResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::auto_cancel_all_open_orders ( const AutoCancelAllOpenOrdersParams & params) const
inlinenodiscard

Auto-Cancel All Open Orders (TRADE).

POST /dapi/v1/countdownCancelAll.

Cancel all open orders of the specified symbol at the end of the specified countdown. This rest endpoint means to ensure your open orders are canceled in case of an outage. The endpoint should be called repeatedly as heartbeats so that the existing countdown time can be canceled and repalced by a new one. The system will check all countdowns approximately every 10 milliseconds, so please note that sufficient redundancy should be considered when using this function. We do not recommend setting the countdown time to be too precise or too small.

  • Example usage:

Call this endpoint at 30s intervals with an countdownTime of 120000 (120s).

If this endpoint is not called within 120 seconds, all your orders of the specified symbol will be automatically canceled.

If this endpoint is called with an countdownTime of 0, the countdown timer will be stopped.

Weight(IP): 10

Security Type: TRADE

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#auto-cancel-all-open-orders

◆ async_auto_cancel_all_open_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_auto_cancel_all_open_orders ( const AutoCancelAllOpenOrdersParams & params,
CompletionToken && token ) const
inline

◆ cancel_algo_order()

common::RestApiResponse< CancelAlgoOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::cancel_algo_order ( const CancelAlgoOrderParams & params = {}) const
inlinenodiscard

Cancel Algo Order (TRADE).

DELETE /dapi/v1/algoOrder.

Cancel an active algo (conditional) order, including TP/SL (Take Profit / Stop Loss) and trailing stop orders on COIN-M Futures.

Weight(IP): 1

Security Type: TRADE

Notes:

  • Either algoId or clientAlgoId must be sent.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-algo-order

◆ async_cancel_algo_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_cancel_algo_order ( const CancelAlgoOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous cancel_algo_order().

◆ new_algo_order()

common::RestApiResponse< NewAlgoOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::new_algo_order ( const NewAlgoOrderParams & params) const
inlinenodiscard

New Algo Order (TRADE).

POST /dapi/v1/algoOrder.

Send in a new algo (conditional) order. Use this endpoint to place TP/SL (Take Profit / Stop Loss) and trailing stop orders on COIN-M Futures. Supported order types under algoType=CONDITIONAL are STOP_MARKET, TAKE_PROFIT_MARKET, STOP, TAKE_PROFIT, and TRAILING_STOP_MARKET.

Weight: 1 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 0 on IP rate limit(x-mbx-used-weight-1m)

Security Type: TRADE

Notes:

  • Algo order with type STOP, parameter timeInForce can be sent (default GTC).
  • Algo order with type TAKE_PROFIT, parameter timeInForce can be sent ( default GTC).
  • Condition orders will be triggered when:
    • If parameterpriceProtectis sent as true:
      • when price reaches the triggerPrice ,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol
      • "triggerProtect" of a symbol can be got from GET /dapi/v1/exchangeInfo
    • STOP, STOP_MARKET:
      • BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= triggerPrice
      • SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= triggerPrice
    • TAKE_PROFIT, TAKE_PROFIT_MARKET:
      • BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= triggerPrice
      • SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= triggerPrice
    • TRAILING_STOP_MARKET:
      • BUY: the lowest price after order placed <= activatePrice, and the latest price >= the lowest price * (1 + callbackRate)
      • SELL: the highest price after order placed >= activatePrice, and the latest price <= the highest price * (1 - callbackRate)
  • For TRAILING_STOP_MARKET, if you got such error code. > {"code": -2021, "msg": "Order would immediately trigger."} > means that the parameters you send do not meet the following requirements:
    • BUY: activatePrice should be smaller than latest price.
    • SELL: activatePrice should be larger than latest price.
  • STOP_MARKET, TAKE_PROFIT_MARKET with closePosition=true:
    • Follow the same rules for condition orders.
    • If triggered,**close all** current long position( if SELL) or current short position( if BUY).
    • Cannot be used with quantity parameter
    • Cannot be used with reduceOnly parameter
    • In Hedge Mode,cannot be used with BUY orders in LONG position side. and cannot be used with SELL orders in SHORT position side
  • selfTradePreventionMode is only effective when timeInForce set to IOC or GTC.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#new-algo-order

◆ async_new_algo_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_new_algo_order ( const NewAlgoOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous new_algo_order().

◆ query_algo_order()

common::RestApiResponse< QueryAlgoOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::query_algo_order ( const QueryAlgoOrderParams & params = {}) const
inlinenodiscard

Query Algo Order (USER_DATA).

GET /dapi/v1/algoOrder.

Check the status of an algo (conditional) order, such as TP/SL (Take Profit / Stop Loss) or trailing stop orders on COIN-M Futures.

  • These orders will not be found:
    • order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days < current time
    • order create time + 90 days < current time

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • Either algoId or clientAlgoId must be sent.
  • algoId is self-increment for each specific symbol

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-algo-order

◆ async_query_algo_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_query_algo_order ( const QueryAlgoOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous query_algo_order().

◆ cancel_all_algo_open_orders()

common::RestApiResponse< CancelAllAlgoOpenOrdersResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::cancel_all_algo_open_orders ( const CancelAllAlgoOpenOrdersParams & params) const
inlinenodiscard

Cancel All Algo Open Orders (TRADE).

DELETE /dapi/v1/algoOpenOrders.

Cancel all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop Loss) and trailing stop orders on COIN-M Futures.

Weight(IP): 1

Security Type: TRADE

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-all-algo-open-orders

◆ async_cancel_all_algo_open_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_cancel_all_algo_open_orders ( const CancelAllAlgoOpenOrdersParams & params,
CompletionToken && token ) const
inline

◆ cancel_all_open_orders()

common::RestApiResponse< CancelAllOpenOrdersResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::cancel_all_open_orders ( const CancelAllOpenOrdersParams & params) const
inlinenodiscard

Cancel All Open Orders (TRADE).

DELETE /dapi/v1/allOpenOrders.

Cancel All Open Orders

Weight(IP): 1

Security Type: TRADE

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-all-open-orders

◆ async_cancel_all_open_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_cancel_all_open_orders ( const CancelAllOpenOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous cancel_all_open_orders().

◆ cancel_multiple_orders()

common::RestApiResponse< std::vector< CancelMultipleOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::cancel_multiple_orders ( const CancelMultipleOrdersParams & params) const
inlinenodiscard

Cancel Multiple Orders (TRADE).

DELETE /dapi/v1/batchOrders.

Cancel Multiple Orders

Weight(IP): 1

Security Type: TRADE

Notes:

  • Either orderIdList or origClientOrderIdList must be sent.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-multiple-orders

◆ async_cancel_multiple_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_cancel_multiple_orders ( const CancelMultipleOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous cancel_multiple_orders().

◆ modify_multiple_orders()

common::RestApiResponse< std::vector< ModifyMultipleOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::modify_multiple_orders ( const ModifyMultipleOrdersParams & params) const
inlinenodiscard

Modify Multiple Orders (TRADE).

PUT /dapi/v1/batchOrders.

Modify Multiple Orders

Weight(IP): 5

Security Type: TRADE

Notes:

  • Parameter rules are same with Modify Order
  • Batch modify orders are processed concurrently, and the order of matching is not guaranteed.
  • The order of returned contents for batch modify orders is the same as the order of the order list.
  • One order can only be modfied for less than 10000 times
  • modifyId is an optional user-defined identifier passed through as-is; the server does not validate its uniqueness. If omitted, it is not included in the response.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-multiple-orders

◆ async_modify_multiple_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_modify_multiple_orders ( const ModifyMultipleOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous modify_multiple_orders().

◆ place_multiple_orders()

common::RestApiResponse< std::vector< PlaceMultipleOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::place_multiple_orders ( const PlaceMultipleOrdersParams & params) const
inlinenodiscard

Place Multiple Orders (TRADE).

POST /dapi/v1/batchOrders.

Place multiple orders

  • Parameter rules are same with New Order
  • Batch orders are processed concurrently, and the order of matching is not guaranteed.
  • The order of returned contents for batch orders is the same as the order of the order list.

Weight(IP): 5

Security Type: TRADE

Notes:

  • batchOrders must be a JSON array of order parameter objects.
  • Example: /dapi/v1/batchOrders?batchOrders=[{"type":"LIMIT","timeInForce":"GTC","symbol":"BTCUSD_PERP","side":"BUY","price":"10001","quantity":"1"}]

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#place-multiple-orders

◆ async_place_multiple_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_place_multiple_orders ( const PlaceMultipleOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous place_multiple_orders().

◆ cancel_order()

common::RestApiResponse< CancelOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::cancel_order ( const CancelOrderParams & params) const
inlinenodiscard

Cancel Order (TRADE).

DELETE /dapi/v1/order.

Cancel an active order.

Weight(IP): 1

Security Type: TRADE

Notes:

  • Either orderId or origClientOrderId must be sent.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#cancel-order

◆ async_cancel_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_cancel_order ( const CancelOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous cancel_order().

◆ modify_order()

common::RestApiResponse< ModifyOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::modify_order ( const ModifyOrderParams & params) const
inlinenodiscard

Modify Order (TRADE).

PUT /dapi/v1/order.

Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue

Weight(IP): 0

Security Type: TRADE

Notes:

  • Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
  • Either quantity or price must be sent. (After CM migration, both quantity and price are required.)
  • When the new quantity or price doesn't satisfy PRICE_FILTER / PERCENT_FILTER / LOT_SIZE, amendment will be rejected and the order will stay as it is.
  • However the order will be cancelled by the amendment in the following situations:
    • when the order is in partially filled status and the new quantity <= executedQty
    • When the order is GTX and the new price will cause it to be executed immediately
  • One order can only be modfied for less than 10000 times

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-order

◆ async_modify_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_modify_order ( const ModifyOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous modify_order().

◆ new_order()

common::RestApiResponse< NewOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::new_order ( const NewOrderParams & params) const
inlinenodiscard

New Order (TRADE).

POST /dapi/v1/order.

Send in a new order.

Weight: 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M) 0 on IP rate limit(x-mbx-used-weight-1m)

Security Type: TRADE

Notes:

  • Additional mandatory parameters based on type:
    • Order with type STOP, parameter timeInForce can be sent ( default GTC).
    • Order with type TAKE_PROFIT, parameter timeInForce can be sent ( default GTC).
    • Condition orders will be triggered when:
    • If parameterpriceProtectis sent as true:
    • when price reaches the stopPrice ,the difference rate between "MARK_PRICE" and "CONTRACT_PRICE" cannot be larger than the "triggerProtect" of the symbol
    • "triggerProtect" of a symbol can be got from GET /dapi/v1/exchangeInfo
    • STOP, STOP_MARKET:
    • BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
    • SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
    • TAKE_PROFIT, TAKE_PROFIT_MARKET:
    • BUY: latest price ("MARK_PRICE" or "CONTRACT_PRICE") <= stopPrice
    • SELL: latest price ("MARK_PRICE" or "CONTRACT_PRICE") >= stopPrice
    • TRAILING_STOP_MARKET:
    • BUY: the lowest price after order placed <= activationPrice, and the latest price >= the lowest price * (1 + callbackRate)
    • SELL: the highest price after order placed >= activationPrice, and the latest price <= the highest price * (1 - callbackRate)
    • For TRAILING_STOP_MARKET, if you got such error code. > {"code": -2021, "msg": "Order would immediately trigger."} > means that the parameters you send do not meet the following requirements:
    • BUY: activationPrice should be smaller than latest price.
    • SELL: activationPrice should be larger than latest price.
    • If newOrderRespType is sent as RESULT :
    • MARKET order: the final FILLED result of the order will be return directly.
    • LIMIT order with special timeInForce: the final status result of the order(FILLED or EXPIRED) will be returned directly.
    • STOP_MARKET, TAKE_PROFIT_MARKET with closePosition=true:
    • Follow the same rules for condition orders.
    • If triggered,close all current long position( if SELL) or current short position( if BUY).
    • Cannot be used with quantity parameter
    • Cannot be used with reduceOnly parameter
    • In Hedge Mode,cannot be used with BUY orders in LONG position side. and cannot be used with SELL orders in SHORT position side
    • selfTradePreventionMode is only effective when timeInForce set to IOC or GTC.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#new-order

◆ async_new_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_new_order ( const NewOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous new_order().

◆ query_order()

common::RestApiResponse< QueryOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::query_order ( const QueryOrderParams & params) const
inlinenodiscard

Query Order (USER_DATA).

GET /dapi/v1/order.

Check an order's status.

  • These orders will not be found:
    • order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days < current time
    • order create time + 90 days < current time

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • Either orderId or origClientOrderId must be sent.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-order

◆ async_query_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_query_order ( const QueryOrderParams & params,
CompletionToken && token ) const
inline

Asynchronous query_order().

◆ change_initial_leverage()

common::RestApiResponse< ChangeInitialLeverageResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::change_initial_leverage ( const ChangeInitialLeverageParams & params) const
inlinenodiscard

Change Initial Leverage (TRADE).

POST /dapi/v1/leverage.

Change user's initial leverage in the specific symbol market.

For Hedge Mode, LONG and SHORT positions of one symbol use the same initial leverage and share a total notional value.

Weight(IP): 1

Security Type: TRADE

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-initial-leverage

◆ async_change_initial_leverage()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_change_initial_leverage ( const ChangeInitialLeverageParams & params,
CompletionToken && token ) const
inline

◆ change_margin_type()

common::RestApiResponse< ChangeMarginTypeResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::change_margin_type ( const ChangeMarginTypeParams & params) const
inlinenodiscard

Change Margin Type (TRADE).

POST /dapi/v1/marginType.

Change user's margin type in the specific symbol market.For Hedge Mode, LONG and SHORT positions of one symbol use the same margin type.

With ISOLATED margin type, margins of the LONG and SHORT positions are isolated from each other.

Weight(IP): 1

Security Type: TRADE

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-margin-type

◆ async_change_margin_type()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_change_margin_type ( const ChangeMarginTypeParams & params,
CompletionToken && token ) const
inline

Asynchronous change_margin_type().

◆ change_position_mode()

common::RestApiResponse< ChangePositionModeResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::change_position_mode ( const ChangePositionModeParams & params) const
inlinenodiscard

Change Position Mode (TRADE).

POST /dapi/v1/positionSide/dual.

Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol.

After CM migration, UM and CM share the same dualSidePosition setting. Calling this endpoint flips both UM and CM at once. If either side has any open order or open position, the change is rejected:

  • -4067 (open orders exist)
  • -4068 (open position exists)

Weight(IP): 1

Security Type: TRADE

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#change-position-mode

◆ async_change_position_mode()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_change_position_mode ( const ChangePositionModeParams & params,
CompletionToken && token ) const
inline

Asynchronous change_position_mode().

◆ current_all_algo_open_orders()

common::RestApiResponse< std::vector< CurrentAllAlgoOpenOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::current_all_algo_open_orders ( const CurrentAllAlgoOpenOrdersParams & params = {}) const
inlinenodiscard

Current All Algo Open Orders (USER_DATA).

GET /dapi/v1/openAlgoOrders.

Get all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop Loss) and trailing stop orders on COIN-M Futures.

Weight: 1 for a single symbol; 40 when the symbol parameter is omitted

Careful when accessing this with no symbol.

Security Type: USER_DATA

Notes:

  • If the symbol is not sent, orders for all symbols will be returned in an array.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#current-all-algo-open-orders

◆ async_current_all_algo_open_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_current_all_algo_open_orders ( const CurrentAllAlgoOpenOrdersParams & params,
CompletionToken && token ) const
inline

◆ current_all_open_orders()

common::RestApiResponse< std::vector< CurrentAllOpenOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::current_all_open_orders ( const CurrentAllOpenOrdersParams & params = {}) const
inlinenodiscard

Current All Open Orders (USER_DATA).

GET /dapi/v1/openOrders.

Get all open orders on a symbol. Careful when accessing this with no symbol.

Weight(IP): null

Weight: 1 for a single symbol, 40 for mutltiple symbols

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#current-all-open-orders

◆ async_current_all_open_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_current_all_open_orders ( const CurrentAllOpenOrdersParams & params,
CompletionToken && token ) const
inline

◆ get_order_modify_history()

common::RestApiResponse< std::vector< GetOrderModifyHistoryResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_order_modify_history ( const GetOrderModifyHistoryParams & params) const
inlinenodiscard

Get Order Modify History (USER_DATA).

GET /dapi/v1/orderAmendment.

Get order modification history

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • Either orderId or origClientOrderId must be sent, and the orderId will prevail if both are sent.
  • Order modify history longer than 3 month is not avaliable

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-order-modify-history

◆ async_get_order_modify_history()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_order_modify_history ( const GetOrderModifyHistoryParams & params,
CompletionToken && token ) const
inline

◆ get_position_margin_change_history()

common::RestApiResponse< std::vector< GetPositionMarginChangeHistoryResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::get_position_margin_change_history ( const GetPositionMarginChangeHistoryParams & params) const
inlinenodiscard

Get Position Margin Change History (TRADE).

GET /dapi/v1/positionMargin/history.

Get position margin change history

Weight(IP): 1

Security Type: TRADE

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#get-position-margin-change-history

◆ async_get_position_margin_change_history()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_get_position_margin_change_history ( const GetPositionMarginChangeHistoryParams & params,
CompletionToken && token ) const
inline

◆ modify_isolated_position_margin()

common::RestApiResponse< ModifyIsolatedPositionMarginResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::modify_isolated_position_margin ( const ModifyIsolatedPositionMarginParams & params) const
inlinenodiscard

Modify Isolated Position Margin (TRADE).

POST /dapi/v1/positionMargin.

Modify Isolated Position Margin

Weight(IP): 1

Security Type: TRADE

Notes:

  • Only for isolated symbol

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#modify-isolated-position-margin

◆ async_modify_isolated_position_margin()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_modify_isolated_position_margin ( const ModifyIsolatedPositionMarginParams & params,
CompletionToken && token ) const
inline

◆ position_adl_quantile_estimation()

common::RestApiResponse< std::vector< PositionAdlQuantileEstimationResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::position_adl_quantile_estimation ( const PositionAdlQuantileEstimationParams & params = {}) const
inlinenodiscard

Position ADL Quantile Estimation (USER_DATA).

GET /dapi/v1/adlQuantile.

Query position ADL quantile estimation

  • Values update every 30s.
  • Values 0, 1, 2, 3, 4 shows the queue position and possibility of ADL from low to high.
  • For positions of the symbol are in One-way Mode or isolated margined in Hedge Mode, "LONG", "SHORT", and "BOTH" will be returned to show the positions' adl quantiles of different position sides.
  • If the positions of the symbol are crossed margined in Hedge Mode:
    • "HEDGE" as a sign will be returned instead of "BOTH";
    • A same value caculated on unrealized pnls on long and short sides' positions will be shown for "LONG" and "SHORT" when there are positions in both of long and short sides.

Weight(IP): 5

Security Type: USER_DATA

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-adl-quantile-estimation

◆ async_position_adl_quantile_estimation()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_position_adl_quantile_estimation ( const PositionAdlQuantileEstimationParams & params,
CompletionToken && token ) const
inline

◆ position_information()

common::RestApiResponse< std::vector< PositionInformationResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::position_information ( const PositionInformationParams & params = {}) const
inlinenodiscard

Position Information (USER_DATA).

GET /dapi/v1/positionRisk.

Get current account information.

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • If neither marginAsset nor pair is sent, positions of all symbols with TRADING status will be returned.
  • for One-way Mode user, the response will only show the "BOTH" positions
  • for Hedge Mode user, the response will show "BOTH", "LONG", and "SHORT" positions. Note > Please use with user data stream ACCOUNT_UPDATE to meet your timeliness and accuracy needs.
  • Please use with user data stream ACCOUNT_UPDATE to meet your timeliness and accuracy needs.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#position-information

◆ async_position_information()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_position_information ( const PositionInformationParams & params,
CompletionToken && token ) const
inline

Asynchronous position_information().

◆ query_all_algo_orders()

common::RestApiResponse< std::vector< QueryAllAlgoOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::query_all_algo_orders ( const QueryAllAlgoOrdersParams & params) const
inlinenodiscard

Query All Algo Orders (USER_DATA).

GET /dapi/v1/allAlgoOrders.

Get all algo (conditional) orders — active, CANCELED, TRIGGERED, or FINISHED — including TP/SL (Take Profit / Stop Loss) and trailing stop orders on COIN-M Futures.

  • These orders will not be found:
    • order status is CANCELED or EXPIRED AND order has NO filled trade AND created time + 3 days < current time
    • order create time + 90 days < current time

Weight(IP): 5

Security Type: USER_DATA

Notes:

  • If algoId is set, it will get orders >= that algoId. Otherwise most recent orders are returned.
  • The query time period must be less than 7 days( default as the recent 7 days).

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-all-algo-orders

◆ async_query_all_algo_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_query_all_algo_orders ( const QueryAllAlgoOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous query_all_algo_orders().

◆ query_current_open_order()

common::RestApiResponse< QueryCurrentOpenOrderResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::query_current_open_order ( const QueryCurrentOpenOrderParams & params) const
inlinenodiscard

Query Current Open Order (USER_DATA).

GET /dapi/v1/openOrder.

Query Current Open Order

Weight(IP): 1

Security Type: USER_DATA

Notes:

  • EitherorderId or origClientOrderId must be sent
  • If the queried order has been filled or cancelled, the error message "Order does not exist" will be returned.

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#query-current-open-order

◆ async_query_current_open_order()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_query_current_open_order ( const QueryCurrentOpenOrderParams & params,
CompletionToken && token ) const
inline

◆ users_force_orders()

common::RestApiResponse< std::vector< UsersForceOrdersResponseInner > > binance::derivatives_trading_coin_futures::rest_api::RestApi::users_force_orders ( const UsersForceOrdersParams & params = {}) const
inlinenodiscard

User's Force Orders (USER_DATA).

GET /dapi/v1/forceOrders.

User's Force Orders

Weight: 20 (after CM migration: 20 with symbol / 50 without symbol)

Security Type: USER_DATA

Notes:

  • If "autoCloseType" is not sent, orders with both of the types will be returned
  • Only support querying data in the past 90 days

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/trade#users-force-orders

◆ async_users_force_orders()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_users_force_orders ( const UsersForceOrdersParams & params,
CompletionToken && token ) const
inline

Asynchronous users_force_orders().

◆ close_user_data_stream()

common::RestApiResponse< boost::json::value > binance::derivatives_trading_coin_futures::rest_api::RestApi::close_user_data_stream ( ) const
inlinenodiscard

Close User Data Stream (USER_STREAM).

DELETE /dapi/v1/listenKey.

Close out a user data stream.

Weight(IP): 1

Security Type: USER_STREAM

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#close-user-data-stream

◆ async_close_user_data_stream()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_close_user_data_stream ( CompletionToken && token) const
inline

Asynchronous close_user_data_stream().

◆ keepalive_user_data_stream()

common::RestApiResponse< KeepaliveUserDataStreamResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::keepalive_user_data_stream ( ) const
inlinenodiscard

Keepalive User Data Stream (USER_STREAM).

PUT /dapi/v1/listenKey.

Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes.

Weight(IP): 1

Security Type: USER_STREAM

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#keepalive-user-data-stream

◆ async_keepalive_user_data_stream()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_keepalive_user_data_stream ( CompletionToken && token) const
inline

◆ start_user_data_stream()

common::RestApiResponse< StartUserDataStreamResponse > binance::derivatives_trading_coin_futures::rest_api::RestApi::start_user_data_stream ( ) const
inlinenodiscard

Start User Data Stream (USER_STREAM).

POST /dapi/v1/listenKey.

Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity will be extended for 60 minutes.

Weight(IP): 1

Security Type: USER_STREAM

See https://developers.binance.com/en/docs/catalog/core-trading-derivatives-trading-coin-m-futures/api/rest-api/user-data-streams#start-user-data-stream

◆ async_start_user_data_stream()

template<class CompletionToken>
auto binance::derivatives_trading_coin_futures::rest_api::RestApi::async_start_user_data_stream ( CompletionToken && token) const
inline

Asynchronous start_user_data_stream().