|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
DerivativesTradingUsdsFutures REST API client. More...
#include <rest_api.hpp>
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 Usds 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. | |
DerivativesTradingUsdsFutures 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.
|
explicit |
Throws common::ConfigError if the configuration is invalid.
|
staticnodiscard |
A client for config.base_path, production when it is not set.
|
staticnodiscard |
A client for production (Derivatives Trading Usds Futures REST API).
|
staticnodiscard |
A client for the testnet.
|
staticnodiscard |
A client for the demo environment.
|
nodiscardnoexcept |
|
inlinenodiscard |
Calls an endpoint the SDK does not wrap yet. T may be boost::json::value.
|
inlinenodiscard |
Like send_request, but signed (adds timestamp and signature).
|
inline |
|
inline |
|
inlinenodiscard |
Account Information V2 (USER_DATA).
GET /fapi/v2/account.
Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
Weight(IP): 5
Security Type: USER_DATA
|
inline |
Asynchronous account_information_v2().
|
inlinenodiscard |
Account Information V3 (USER_DATA).
GET /fapi/v3/account.
Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
Weight(IP): 5
Security Type: USER_DATA
|
inline |
Asynchronous account_information_v3().
|
inlinenodiscard |
Futures Account Balance V2 (USER_DATA).
GET /fapi/v2/balance.
Query account balance information.
Weight(IP): 5
Security Type: USER_DATA
|
inline |
Asynchronous futures_account_balance_v2().
|
inlinenodiscard |
Futures Account Balance V3 (USER_DATA).
GET /fapi/v3/balance.
Query account balance information.
Weight(IP): 5
Security Type: USER_DATA
|
inline |
Asynchronous futures_account_balance_v3().
|
inlinenodiscard |
Futures Account Configuration (USER_DATA).
GET /fapi/v1/accountConfig.
Query account configuration
Weight(IP): 5
Security Type: USER_DATA
|
inline |
Asynchronous futures_account_configuration().
|
inlinenodiscard |
Futures Trading Quantitative Rules Indicators (USER_DATA).
GET /fapi/v1/apiTradingStatus.
Futures trading quantitative rules indicators, for more information on this, please refer to the Futures Trading Quantitative Rules
Weight: - 1 for a single symbol
Security Type: USER_DATA
|
inline |
Asynchronous futures_trading_quantitative_rules_indicators().
|
inlinenodiscard |
Get BNB Burn Status (USER_DATA).
GET /fapi/v1/feeBurn.
Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off )
Weight(IP): 30
Security Type: USER_DATA
|
inline |
Asynchronous get_bnb_burn_status().
|
inlinenodiscard |
Toggle BNB Burn On Futures Trade (TRADE).
POST /fapi/v1/feeBurn.
Change user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) on EVERY symbol
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous toggle_bnb_burn_on_futures_trade().
|
inlinenodiscard |
Get Current Multi-Assets Mode (USER_DATA).
GET /fapi/v1/multiAssetsMargin.
Get user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol
Weight(IP): 30
Security Type: USER_DATA
|
inline |
Asynchronous get_current_multi_assets_mode().
|
inlinenodiscard |
Get Current Position Mode (USER_DATA).
GET /fapi/v1/positionSide/dual.
Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol
Weight(IP): 30
Security Type: USER_DATA
|
inline |
Asynchronous get_current_position_mode().
|
inlinenodiscard |
Get Download Id For Futures Order History (USER_DATA).
GET /fapi/v1/order/asyn.
Get Download Id For Futures Order History
Weight(IP): 1000
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_download_id_for_futures_order_history().
|
inlinenodiscard |
Get Download Id For Futures Trade History (USER_DATA).
GET /fapi/v1/trade/asyn.
Get download id for futures trade history
Weight(IP): 1000
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_download_id_for_futures_trade_history().
|
inlinenodiscard |
Get Download Id For Futures Transaction History (USER_DATA).
GET /fapi/v1/income/asyn.
Get download id for futures transaction history
Weight(IP): 1000
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_download_id_for_futures_transaction_history().
|
inlinenodiscard |
Get Futures Order History Download Link by Id (USER_DATA).
GET /fapi/v1/order/asyn/id.
Get futures order history download link by Id
Weight(IP): 10
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_futures_order_history_download_link_by_id().
|
inlinenodiscard |
Get Futures Trade Download Link by Id (USER_DATA).
GET /fapi/v1/trade/asyn/id.
Get futures trade download link by Id
Weight(IP): 10
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_futures_trade_download_link_by_id().
|
inlinenodiscard |
Get Futures Transaction History Download Link by Id (USER_DATA).
GET /fapi/v1/income/asyn/id.
Get futures transaction history download link by Id
Weight(IP): 10
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_futures_transaction_history_download_link_by_id().
|
inlinenodiscard |
Get Income History (USER_DATA).
GET /fapi/v1/income.
Query income history
Weight(IP): 30
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_income_history().
|
inlinenodiscard |
Notional and Leverage Brackets (USER_DATA).
GET /fapi/v1/leverageBracket.
Query user notional and leverage bracket on speicfic symbol
Weight(IP): 1
Security Type: USER_DATA
|
inline |
Asynchronous notional_and_leverage_brackets().
|
inlinenodiscard |
Query User Rate Limit (USER_DATA).
GET /fapi/v1/rateLimit/order.
Query User Rate Limit
Weight(IP): 1
Security Type: USER_DATA
|
inline |
Asynchronous query_user_rate_limit().
|
inlinenodiscard |
Symbol Configuration (USER_DATA).
GET /fapi/v1/symbolConfig.
Get current account symbol configuration.
Weight(IP): 5
Security Type: USER_DATA
|
inline |
Asynchronous symbol_configuration().
|
inlinenodiscard |
User Commission Rate (USER_DATA).
GET /fapi/v1/commissionRate.
Get User Commission Rate
Weight(IP): 20
Security Type: USER_DATA
|
inline |
Asynchronous user_commission_rate().
|
inlinenodiscard |
Accept the offered quote (USER_DATA).
POST /fapi/v1/convert/acceptQuote.
Accept the offered quote by quote ID.
Weight(IP): 200
Security Type: USER_DATA
|
inline |
Asynchronous accept_the_offered_quote().
|
inlinenodiscard |
List All Convert Pairs.
GET /fapi/v1/convert/exchangeInfo.
Query for all convertible token pairs and the tokens’ respective upper/lower limits
Weight(IP): 20
Notes:
|
inline |
Asynchronous list_all_convert_pairs().
|
inlinenodiscard |
Order status (USER_DATA).
GET /fapi/v1/convert/orderStatus.
Query order status by order ID.
Weight(IP): 50
Security Type: USER_DATA
|
inline |
Asynchronous order_status().
|
inlinenodiscard |
Send Quote Request (USER_DATA).
POST /fapi/v1/convert/getQuote.
Request a quote for the requested token pairs
Weight: 50(IP) 360/hour, 500/day
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous send_quote_request().
|
inlinenodiscard |
ADL Risk.
GET /fapi/v1/symbolAdlRisk.
Query the symbol-level ADL risk rating.
The ADL risk rating measures the likelihood of ADL during liquidation, and the rating takes into account the insurance fund balance, position concentration on the symbol, order book depth, price volatility, average leverage, unrealized PnL, and margin utilization at the symbol level.
The rating can be high, medium and low, and is updated every 30 minutes.
Weight(IP): 1
|
inline |
Asynchronous adl_risk().
|
inlinenodiscard |
Multi-Assets Mode Asset Index.
GET /fapi/v1/assetIndex.
Asset index price.
CM-UM Integration (Effective 2026-06-30): Renamed from Multi-Assets Mode Asset Index. The response now additionally pushes COIN-M settlement-asset price index entries (e.g., BTCUSD, ETHUSD, BNBUSD). The endpoint path /fapi/v1/assetIndex is unchanged.
Weight: 1 for a single symbol; 10 when the symbol parameter is omitted
|
inline |
Asynchronous asset_index().
|
inlinenodiscard |
Basis.
GET /futures/data/basis.
Query future basis
Weight(IP): 0
Notes:
|
inline |
Asynchronous basis().
|
inlinenodiscard |
Check Server Time.
GET /fapi/v1/time.
Test connectivity to the Rest API and get the current server time.
Weight(IP): 1
|
inline |
Asynchronous check_server_time().
|
inlinenodiscard |
Composite Index Symbol Information.
GET /fapi/v1/indexInfo.
Query composite index symbol information
Weight(IP): 1
Notes:
|
inline |
Asynchronous composite_index_symbol_information().
|
inlinenodiscard |
Compressed/Aggregate Trades List.
GET /fapi/v1/aggTrades.
Get compressed, aggregate market trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated.
Retail Price Improvement(RPI) orders are aggregated and without special tags to be distinguished.
Weight(IP): 20
Notes:
|
inline |
Asynchronous compressed_aggregate_trades_list().
|
inlinenodiscard |
Continuous Contract Kline/Candlestick Data.
GET /fapi/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:
|
inline |
Asynchronous continuous_contract_kline_candlestick_data().
|
inlinenodiscard |
Exchange Information.
GET /fapi/v1/exchangeInfo.
Current exchange trading rules and symbol information
Weight(IP): 1
|
inline |
Asynchronous exchange_information().
|
inlinenodiscard |
Get Funding Rate History.
GET /fapi/v1/fundingRate.
Get Funding Rate History
Weight: When limit ≤ 200: share 500/5min/IP rate limit with GET /fapi/v1/fundingInfo
When limit > 200: 100/5min/IP rate limit
Notes:
|
inline |
Asynchronous get_funding_rate_history().
|
inlinenodiscard |
Get Funding Rate Info.
GET /fapi/v1/fundingInfo.
Query funding rate info for symbols that had FundingRateCap/FundingRateFloor / fundingIntervalHours adjustment
Weight: 0
share 500/5min/IP rate limit with GET /fapi/v1/fundingRate
|
inline |
Asynchronous get_funding_rate_info().
|
inlinenodiscard |
Index Price Kline/Candlestick Data.
GET /fapi/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:
|
inline |
Asynchronous index_price_kline_candlestick_data().
|
inlinenodiscard |
Kline/Candlestick Data.
GET /fapi/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:
|
inline |
Asynchronous kline_candlestick_data().
|
inlinenodiscard |
Long/Short Ratio.
GET /futures/data/globalLongShortAccountRatio.
Query symbol Long/Short Ratio
Weight(IP): 0
Notes:
|
inline |
Asynchronous long_short_ratio().
|
inlinenodiscard |
Mark Price.
GET /fapi/v1/premiumIndex.
Mark Price and Funding Rate
Weight: 1 with symbol, **10** without symbol
|
inline |
Asynchronous mark_price().
|
inlinenodiscard |
Mark Price Kline/Candlestick Data.
GET /fapi/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:
|
inline |
Asynchronous mark_price_kline_candlestick_data().
|
inlinenodiscard |
Old Trades Lookup (MARKET_DATA).
GET /fapi/v1/historicalTrades.
Get older market historical trades.
Weight(IP): 200
Security Type: MARKET_DATA
Notes:
|
inline |
Asynchronous old_trades_lookup().
|
inlinenodiscard |
Open Interest.
GET /fapi/v1/openInterest.
Get present open interest of a specific symbol.
Weight(IP): 1
|
inline |
Asynchronous open_interest().
|
inlinenodiscard |
Open Interest Statistics.
GET /futures/data/openInterestHist.
Open Interest Statistics
Weight(IP): 0
Notes:
|
inline |
Asynchronous open_interest_statistics().
|
inlinenodiscard |
Order Book.
GET /fapi/v1/depth.
Query symbol orderbook
Retail Price Improvement(RPI) orders are not visible and excluded in the response message.
Weight: Adjusted based on the limit:
| Limit | Weight |
|---|---|
| 5, 10, 20, 50 | 2 |
| 100 | 5 |
| 500 | 10 |
| 1000 | 20 |
|
inline |
Asynchronous order_book().
|
inlinenodiscard |
Premium index Kline Data.
GET /fapi/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:
|
inline |
Asynchronous premium_index_kline_data().
|
inlinenodiscard |
Quarterly Contract Settlement Price.
GET /futures/data/delivery-price.
Latest price for a symbol or symbols.
Weight(IP): 0
|
inline |
Asynchronous quarterly_contract_settlement_price().
|
inlinenodiscard |
Query Index Price Constituents.
GET /fapi/v1/constituents.
Query index price constituents
Note: Prices from constituents of TradFi perps will be hiden and displayed as -1.
Weight(IP): 2
|
inline |
Asynchronous query_index_price_constituents().
|
inlinenodiscard |
Query Insurance Fund Balance Snapshot.
GET /fapi/v1/insuranceBalance.
Query Insurance Fund Balance Snapshot
Weight(IP): 1
|
inline |
Asynchronous query_insurance_fund_balance_snapshot().
|
inlinenodiscard |
Recent Trades List.
GET /fapi/v1/trades.
Get recent market trades
Weight(IP): 5
Notes:
|
inline |
Asynchronous recent_trades_list().
|
inlinenodiscard |
RPI Order Book.
GET /fapi/v1/rpiDepth.
Query symbol orderbook with RPI orders
RPI(Retail Price Improvement) orders are included and aggreated in the response message. Crossed price levels are hidden and invisible.
Weight: Adjusted based on the limit:
| Limit | Weight |
|---|---|
| 1000 | 20 |
|
inline |
Asynchronous rpi_order_book().
|
inlinenodiscard |
Symbol Order Book Ticker.
GET /fapi/v1/ticker/bookTicker.
Best price/qty on the order book for a symbol or symbols.
Retail Price Improvement(RPI) orders are not visible and excluded in the response message.
Weight: 2 for a single symbol; 5 when the symbol parameter is omitted
Notes:
|
inline |
Asynchronous symbol_order_book_ticker().
|
inlinenodiscard |
Symbol Price Ticker.
GET /fapi/v1/ticker/price.
Latest price for a symbol or symbols.
Weight: 1 for a single symbol; 2 when the symbol parameter is omitted
Notes:
Deprecated: this endpoint may be removed in a future version.
|
inline |
Asynchronous symbol_price_ticker().
|
inlinenodiscard |
Symbol Price Ticker V2.
GET /fapi/v2/ticker/price.
Latest price for a symbol or symbols.
Weight: 1 for a single symbol; 2 when the symbol parameter is omitted
Notes:
|
inline |
Asynchronous symbol_price_ticker_v2().
|
inlinenodiscard |
Taker Buy/Sell Volume.
GET /futures/data/takerlongshortRatio.
Taker Buy/Sell Volume
Weight(IP): 0
Notes:
|
inline |
Asynchronous taker_buy_sell_volume().
|
inlinenodiscard |
Test Connectivity.
GET /fapi/v1/ping.
Test connectivity to the Rest API.
Weight(IP): 1
|
inline |
Asynchronous test_connectivity().
|
inlinenodiscard |
24hr Ticker Price Change Statistics
GET /fapi/v1/ticker/24hr.
24 hour rolling window price change statistics. Careful when accessing this with no symbol.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Notes:
|
inline |
Asynchronous ticker24hr_price_change_statistics().
|
inlinenodiscard |
Top Trader Long/Short Account Ratio (MARKET_DATA).
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 %
Security Type: MARKET_DATA
Notes:
|
inline |
Asynchronous top_trader_long_short_ratio_accounts().
|
inlinenodiscard |
Top Trader Long/Short Position Ratio (MARKET_DATA).
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): 0
Security Type: MARKET_DATA
Notes:
|
inline |
Asynchronous top_trader_long_short_ratio_positions().
|
inlinenodiscard |
Trading Schedule.
GET /fapi/v1/tradingSchedule.
Trading session schedules for the underlying assets of TradFi Perps are provided for a one-week period forward and one-week period backward starting from the day prior to the query time, covering the U.S. equity market, Korean equity market, Hong Kong equity market, China equity market, the commodity market, and the FX market.
Session types per market:
Weight(IP): 5
|
inline |
Asynchronous trading_schedule().
|
inlinenodiscard |
Classic Portfolio Margin Account Information (USER_DATA).
GET /fapi/v1/pmAccountInfo.
Get Classic Portfolio Margin current account information.
Weight(IP): 5
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous classic_portfolio_margin_account_information().
|
inlinenodiscard |
Account Trade List (USER_DATA).
GET /fapi/v1/userTrades.
Get trades for a specific account and symbol.
Weight(IP): 5
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous account_trade_list().
|
inlinenodiscard |
All Orders (USER_DATA).
GET /fapi/v1/allOrders.
Get all account orders; active, canceled, or filled.
Weight(IP): 5
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous all_orders().
|
inlinenodiscard |
Auto-Cancel All Open Orders (TRADE).
POST /fapi/v1/countdownCancelAll.
Cancel all open orders of the specified symbol at the end of the specified countdown.
The endpoint should be called repeatedly as heartbeats so that the existing countdown time can be canceled and replaced by a new one.
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.
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.
Weight(IP): 10
Security Type: TRADE
|
inline |
Asynchronous auto_cancel_all_open_orders().
|
inlinenodiscard |
Cancel Algo Order (TRADE).
DELETE /fapi/v1/algoOrder.
Cancel an active algo (conditional) order, including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures.
Weight(IP): 1
Security Type: TRADE
Notes:
|
inline |
Asynchronous cancel_algo_order().
|
inlinenodiscard |
New Algo Order (TRADE).
POST /fapi/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 USD-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:
|
inline |
Asynchronous new_algo_order().
|
inlinenodiscard |
Query Algo Order (USER_DATA).
GET /fapi/v1/algoOrder.
Check the status of an algo (conditional) order, such as TP/SL (Take Profit / Stop Loss) or trailing stop orders on USD-M Futures.
Weight(IP): 1
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous query_algo_order().
|
inlinenodiscard |
Cancel All Algo Open Orders (TRADE).
DELETE /fapi/v1/algoOpenOrders.
Cancel all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures.
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous cancel_all_algo_open_orders().
|
inlinenodiscard |
Cancel All Open Orders (TRADE).
DELETE /fapi/v1/allOpenOrders.
Cancel All Open Orders
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous cancel_all_open_orders().
|
inlinenodiscard |
Cancel Multiple Orders (TRADE).
DELETE /fapi/v1/batchOrders.
Cancel Multiple Orders
Weight(IP): 1
Security Type: TRADE
Notes:
|
inline |
Asynchronous cancel_multiple_orders().
|
inlinenodiscard |
Modify Multiple Orders (TRADE).
PUT /fapi/v1/batchOrders.
Modify Multiple Orders (TRADE)
Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m);
Security Type: TRADE
Notes:
|
inline |
Asynchronous modify_multiple_orders().
|
inlinenodiscard |
Place Multiple Orders (TRADE).
POST /fapi/v1/batchOrders.
Place Multiple Orders
Weight: 5 on 10s order rate limit(X-MBX-ORDER-COUNT-10S); 1 on 1min order rate limit(X-MBX-ORDER-COUNT-1M); 5 on IP rate limit(x-mbx-used-weight-1m);
Security Type: TRADE
Notes:
|
inline |
Asynchronous place_multiple_orders().
|
inlinenodiscard |
Cancel Order (TRADE).
DELETE /fapi/v1/order.
Cancel an active order.
Weight(IP): 1
Security Type: TRADE
Notes:
|
inline |
Asynchronous cancel_order().
|
inlinenodiscard |
Modify Order (TRADE).
PUT /fapi/v1/order.
Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue
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:
|
inline |
Asynchronous modify_order().
|
inlinenodiscard |
New Order (TRADE).
POST /fapi/v1/order.
Send in a new order.
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: Additional mandatory parameters based on type:
| Type | Additional mandatory parameters |
|---|---|
| LIMIT | timeInForce, quantity, price |
| MARKET | quantity |
|
inline |
Asynchronous new_order().
|
inlinenodiscard |
Query Order (USER_DATA).
GET /fapi/v1/order.
Check an order's status.
Weight(IP): 1
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous query_order().
|
inlinenodiscard |
Change Initial Leverage (TRADE).
POST /fapi/v1/leverage.
Change user's initial leverage of specific symbol market.
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous change_initial_leverage().
|
inlinenodiscard |
Change Margin Type (TRADE).
POST /fapi/v1/marginType.
Change symbol level margin type
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous change_margin_type().
|
inlinenodiscard |
Change Multi-Assets Mode (TRADE).
POST /fapi/v1/multiAssetsMargin.
Change user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on Every symbol
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous change_multi_assets_mode().
|
inlinenodiscard |
Change Position Mode (TRADE).
POST /fapi/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:
Weight(IP): 1
Security Type: TRADE
|
inline |
Asynchronous change_position_mode().
|
inlinenodiscard |
Current All Algo Open Orders (USER_DATA).
GET /fapi/v1/openAlgoOrders.
Get all open algo (conditional) orders on a symbol, including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-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:
|
inline |
Asynchronous current_all_algo_open_orders().
|
inlinenodiscard |
Current All Open Orders (USER_DATA).
GET /fapi/v1/openOrders.
Get all open orders on a symbol.
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:
|
inline |
Asynchronous current_all_open_orders().
|
inlinenodiscard |
Futures TradFi Perps Contract (USER_DATA).
POST /fapi/v1/stock/contract.
Sign TradFi-Perps agreement contract
Weight(IP): 50
Security Type: USER_DATA
|
inline |
Asynchronous futures_tradfi_perps_contract().
|
inlinenodiscard |
Get Order Modify History (USER_DATA).
GET /fapi/v1/orderAmendment.
Get order modification history
Weight(IP): 1
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous get_order_modify_history().
|
inlinenodiscard |
Get Position Margin Change History (TRADE).
GET /fapi/v1/positionMargin/history.
Get Position Margin Change History
Weight(IP): 1
Security Type: TRADE
Notes:
|
inline |
Asynchronous get_position_margin_change_history().
|
inlinenodiscard |
Modify Isolated Position Margin (TRADE).
POST /fapi/v1/positionMargin.
Modify Isolated Position Margin
Weight(IP): 1
Security Type: TRADE
Notes:
|
inline |
Asynchronous modify_isolated_position_margin().
|
inlinenodiscard |
Position ADL Quantile Estimation (USER_DATA).
GET /fapi/v1/adlQuantile.
Position ADL Quantile Estimation
Weight(IP): 5
Security Type: USER_DATA
|
inline |
Asynchronous position_adl_quantile_estimation().
|
inlinenodiscard |
Position Information V2 (USER_DATA).
GET /fapi/v2/positionRisk.
Get current position information.
Weight(IP): 5
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous position_information_v2().
|
inlinenodiscard |
Position Information V3 (USER_DATA).
GET /fapi/v3/positionRisk.
Get current position information(only symbol that has position or open orders will be returned).
Weight(IP): 5
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous position_information_v3().
|
inlinenodiscard |
Query All Algo Orders (USER_DATA).
GET /fapi/v1/allAlgoOrders.
Get all algo (conditional) orders — active, CANCELED, TRIGGERED, or FINISHED — including TP/SL (Take Profit / Stop Loss) and trailing stop orders on USD-M Futures.
Weight(IP): 5
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous query_all_algo_orders().
|
inlinenodiscard |
Query Current Open Order (USER_DATA).
GET /fapi/v1/openOrder.
Query open order
Weight(IP): 1
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous query_current_open_order().
|
inlinenodiscard |
Test Order (TRADE).
POST /fapi/v1/order/test.
Testing order request, this order will not be submitted to matching engine
Security Type: TRADE
Notes: Additional mandatory parameters based on type:
| Type | Additional mandatory parameters |
|---|---|
| LIMIT | timeInForce, quantity, price |
| MARKET | quantity |
| STOP/TAKE_PROFIT | quantity, price, stopPrice |
| STOP_MARKET/TAKE_PROFIT_MARKET | stopPrice |
| TRAILING_STOP_MARKET | callbackRate |
|
inline |
Asynchronous test_order().
|
inlinenodiscard |
User's Force Orders (USER_DATA).
GET /fapi/v1/forceOrders.
Query user's Force Orders
Weight: 20 with symbol, 50 without symbol
Security Type: USER_DATA
Notes:
|
inline |
Asynchronous users_force_orders().
|
inlinenodiscard |
Close User Data Stream (USER_STREAM).
DELETE /fapi/v1/listenKey.
Close out a user data stream.
Weight(IP): 1
Security Type: USER_STREAM
|
inline |
Asynchronous close_user_data_stream().
|
inlinenodiscard |
Keepalive User Data Stream (USER_STREAM).
PUT /fapi/v1/listenKey.
Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 60 minutes.
Weight(IP): 1
Security Type: USER_STREAM
|
inline |
Asynchronous keepalive_user_data_stream().
|
inlinenodiscard |
Start User Data Stream (USER_STREAM).
POST /fapi/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
|
inline |
Asynchronous start_user_data_stream().