# Binance > OpenAPI Specifications for the Binance Public Spot API API documents: - [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) (340 operations) MCP endpoint: https://binance.mcp.junct.dev/mcp Domain: exchange Auth: api-key ## Tools ## Read ### get_sapi_v1_system_status [DISCOVERY] System Status (System) — Fetch system status. Weight(IP): 1 Returns: { status: number, msg: string }. _No parameters required._ > Call this first to discover valid IDs/slugs. ### get_sapi_v1_capital_contract_convertible_coins [DISCOVERY] Query auto-converting stable coins (USER_DATA) — Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' Returns: { convertEnabled: boolean, coins: string[], exchangeRates: { USDC: string, TUSD: string, USDP: string } }. _No parameters required._ > Call this first to discover valid IDs/slugs. ### get_api_v3_ping Test Connectivity — Test connectivity to the Rest API. Weight(IP): 1 _No parameters required._ ### get_api_v3_time Check Server Time — Test connectivity to the Rest API and get the current server time. Weight(IP): 1 Returns: { serverTime: number }. _No parameters required._ ### get_api_v3_exchange_info [DISCOVERY] Exchange Information — Current exchange trading rules and symbol information - If any symbol provided in either symbol or symbols do not exist, the endpoint will throw an error. - All parameters are optional. - permissions can support single or multiple values (e.g. SPOT, ["MARGIN","LEVERAGED"]) - If permissions parameter not provided, the default values will be ["SPOT","MARGIN","LEVERAGED"]. - To display all permissions you need to specify them explicitly. (e.g. SPOT, MARGIN,...) Examples of Symbol Permissions Interpretation from the Response: - [["A","B"]] means you may place an order if you **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `symbols` (string, optional): query parameter: symbols (string) - `permissions` (string, optional): query parameter: permissions (string) ### get_api_v3_depth Order Book — | Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | Returns: { lastUpdateId: number, bids: string[][], asks: string[][] }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `limit` (number, optional): If limit > 5000, then the response will truncate to 5000 ### get_api_v3_trades Recent Trades List — Get recent trades. Weight(IP): 10 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `limit` (number, optional): Default 500; max 1000. ### get_api_v3_historical_trades Old Trade Lookup — Get older market trades. Weight(IP): 10 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `limit` (number, optional): Default 500; max 1000. - `fromId` (number, optional): Trade id to fetch from. Default gets most recent trades. ### get_api_v3_agg_trades Compressed/Aggregate Trades List — Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = '0' // price q = '0' // qty f = -1 // first_trade_id l = -1 // last_trade_id Weight(IP): 2 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `fromId` (number, optional): Trade id to fetch from. Default gets most recent trades. - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 500; max 1000. ### get_api_v3_klines Kline/Candlestick Data — Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - If `startTime` and `endTime` are not sent, the most recent klines are returned. Weight(IP): 2 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `interval` (string, required): kline intervals - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `timeZone` (string, optional): Default: 0 (UTC) - `limit` (number, optional): Default 500; max 1000. ### get_api_v3_ui_klines UIKlines — The request is similar to klines having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `interval` (string, required): kline intervals - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `timeZone` (string, optional): Default: 0 (UTC) - `limit` (number, optional): Default 500; max 1000. ### get_api_v3_avg_price Current Average Price — Current average price for a symbol. Weight(IP): 2 Returns: { mins: number, price: string, closeTime: number }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT ### get_api_v3_ticker_24hr 24hr Ticker Price Change Statistics — 24 hour rolling window price change statistics. Careful when accessing this with no symbol. - If the symbol is not sent, tickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `80` when the symbol parameter is omitted; **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `symbols` (string, optional): query parameter: symbols (string) - `type` (string, optional): Supported values: FULL or MINI. If none provided, the default is FULL ### get_api_v3_ticker_trading_day Trading Day Ticker — Price change statistics for a trading day. Notes: - Supported values for timeZone: - Hours and minutes (e.g. -1:00, 05:45) - Only hours (e.g. 0, 8, 4) Weight: - `4` for each requested symbol. - The weight for this request will cap at `200` once the number of symbols in the request is more than `50`. **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `symbols` (string, optional): query parameter: symbols (string) - `timeZone` (string, optional): Default: 0 (UTC) - `type` (string, optional): Supported values: FULL or MINI. If none provided, the default is FULL ### get_api_v3_ticker_price Symbol Price Ticker — Latest price for a symbol or symbols. - If the symbol is not sent, prices for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `symbols` (string, optional): query parameter: symbols (string) ### get_api_v3_ticker_book_ticker [DISCOVERY] Symbol Order Book Ticker — Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `symbols` (string, optional): query parameter: symbols (string) ### get_api_v3_ticker [DISCOVERY] Rolling window price change statistics — The window used to compute statistics is typically slightly wider than requested windowSize. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested. E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC) Weight(IP): 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 20 **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `symbols` (string, optional): query parameter: symbols (string) - `windowSize` (string, optional): Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed) - `type` (string, optional): Supported values: FULL or MINI. If none provided, the default is FULL ### get_api_v3_order Query Order (USER_DATA) — Check an order's status. - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 4 Returns: { symbol: string, orderId: number, orderListId: number, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `orderId` (number, optional): Order id - `origClientOrderId` (string, optional): Order id from client - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_open_orders Current Open Orders (USER_DATA) — Get all open orders on a symbol. Careful when accessing this with no symbol. Weight(IP): - `6` for a single symbol; - `80` when the symbol parameter is omitted; **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_all_orders All Orders (USER_DATA) — Get all account orders; active, canceled, or filled.. - If `orderId` is set, it will get orders >= that `orderId`. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. - If `startTime` and/or `endTime` provided, `orderId` is not required Weight(IP): 20 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `orderId` (number, optional): Order id - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_order_list [DISCOVERY] Query OCO (USER_DATA) — Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 Returns: { orderListId: number, contingencyType: string, listStatusType: string, ... }. **Parameters:** - `orderListId` (number, optional): Order list id - `origClientOrderId` (string, optional): Order id from client - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_all_order_list [DISCOVERY] Query all OCO (USER_DATA) — Retrieves all OCO based on provided optional parameters Weight(IP): 20 **Parameters:** - `fromId` (number, optional): Trade id to fetch from. Default gets most recent trades. - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_open_order_list [DISCOVERY] Query Open OCO (USER_DATA) — Weight(IP): 6 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_account Account Information (USER_DATA) — Get current account information. Weight(IP): 20 Returns: { makerCommission: number, takerCommission: number, buyerCommission: number, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_my_trades Account Trade List (USER_DATA) — Get trades for a specific account and symbol. If `fromId` is set, it will get id >= that `fromId`. Otherwise most recent orders are returned. The time between startTime and endTime can't be longer than 24 hours. These are the supported combinations of all parameters: symbol symbol + orderId symbol + startTime symbol + endTime symbol + fromId symbol + startTime + endTime symbol+ orderId + fromId Weight(IP): 20 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `orderId` (number, optional): This can only be used in combination with symbol. - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `fromId` (number, optional): Trade id to fetch from. Default gets most recent trades. - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_rate_limit_order Query Current Order Count Usage (TRADE) — Displays the user's current order count usage for all intervals. Weight(IP): 40 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_my_prevented_matches Query Prevented Matches — Displays the list of orders that were expired because of STP. For additional information on what a Prevented match is, as well as Self Trade Prevention (STP), please refer to our STP FAQ page. These are the combinations supported: * symbol + preventedMatchId * symbol + orderId * symbol + orderId + fromPreventedMatchId (limit will default to 500) * symbol + orderId + fromPreventedMatchId + limit Weight(IP): Case Weight If symbol is invalid: 2 Querying by preventedMatchId: 2 Querying by orderId: 20 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `preventedMatchId` (number, optional): query parameter: preventedMatchId (number) - `orderId` (number, optional): Order id - `fromPreventedMatchId` (number, optional): query parameter: fromPreventedMatchId (number) - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_my_allocations Query Allocations (USER_DATA) — Retrieves allocations resulting from SOR order placement. Weight: 20 Supported parameter combinations: Parameters Response symbol allocations from oldest to newest symbol + startTime oldest allocations since startTime symbol + endTime newest allocations until endTime symbol + startTime + endTime allocations within the time range symbol + fromAllocationId allocations by allocation ID symbol + orderId allocations related to an order starting with oldest symbol + orderId + fromAllocationId allocations related to an order by allocation ID Note: The time between star PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `fromAllocationId` (number, optional): query parameter: fromAllocationId (number) - `limit` (number, optional): Default 500; max 1000. - `orderId` (number, optional): Order id - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_api_v3_account_commission Query Commission Rates (USER_DATA) — Get current account commission rates. Weight: 20 Returns: { symbol: string, standardCommission: { maker: string, taker: string, buyer: string, seller: string }, taxCommission: { maker: string, taker: string, buyer: string, seller: string }, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_borrow_repay Query borrow/repay records in Margin account(USER_DATA) — Query borrow/repay records in Margin account - txId or startTime must be sent. txId takes precedence. Response in descending order - If an asset is sent, data within 30 days before endTime; If an asset is not sent, data within 7 days before endTime - If neither startTime nor endTime is sent, the recent 7-day data will be returned. - startTime set as endTime - 7 days by default, endTime set as current time by default Weight(IP): 10 Returns: { rows: { isolatedSymbol: string, amount: string, asset: string, interest: string, principal: stri **Parameters:** - `asset` (string, required): query parameter: asset (string) - `isolatedSymbol` (string, optional): Isolated symbol - `txId` (number, optional): tranId in POST /sapi/v1/margin/loan - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `type` (string, required): BORROW or REPAY - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_transfer Get Cross Margin Transfer History (USER_DATA) — - Response in descending order - Returns data for last 7 days by default - Set `archived` to `true` to query data from 6 months ago Weight(IP): 1 Returns: { rows: { amount: string, asset: string, status: string, timestamp: number, txId: number, type: string }[], total: number }. **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `type` (string, optional): query parameter: type ("ROLL_IN" | "ROLL_OUT") - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `isolatedSymbol` (string, optional): Isolated symbol - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_all_assets [DISCOVERY] Get All Margin Assets (MARKET_DATA) — Weight(IP): 1 **Parameters:** - `asset` (string, required): query parameter: asset (string) ### get_sapi_v1_margin_all_pairs [DISCOVERY] Get All Cross Margin Pairs (MARKET_DATA) — Weight(IP): 1 **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT ### get_sapi_v1_margin_price_index Query Margin PriceIndex (MARKET_DATA) — Weight(IP): 10 Returns: { calcTime: number, price: string, symbol: string }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT ### get_sapi_v1_margin_order Query Margin Account's Order (USER_DATA) — - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10 Returns: { clientOrderId: string, cummulativeQuoteQty: string, executedQty: string, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `orderId` (number, optional): Order id - `origClientOrderId` (string, optional): Order id from client - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_interest_history Get Interest History (USER_DATA) — - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1 Returns: { rows: { isolatedSymbol: string, asset: string, interest: string, interestAccuredTime: number, interestRate: string **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `isolatedSymbol` (string, optional): Isolated symbol - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `archived` (string, optional): Default: false. Set to true for archived data from 6 months ago - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_force_liquidation_rec Get Force Liquidation Record (USER_DATA) — - Response in descending order Weight(IP): 1 Returns: { rows: { avgPrice: string, executedQty: string, orderId: number, price: string, qty: string, side: string, ... }[], total: number }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `isolatedSymbol` (string, optional): Isolated symbol - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_account Query Cross Margin Account Details (USER_DATA) — Weight(IP): 10 Returns: { created: boolean, borrowEnabled: boolean, marginLevel: string, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_open_orders Query Margin Account's Open Orders (USER_DATA) — - If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated ="TRUE", symbol must be sent. Weight(IP): 10 **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_all_orders Query Margin Account's All Orders (USER_DATA) — - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `orderId` (number, optional): Order id - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_order_list [DISCOVERY] Query Margin Account's OCO (USER_DATA) — Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 Returns: { orderListId: number, contingencyType: string, listStatusType: string, ... }. **Parameters:** - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `symbol` (string, optional): Mandatory for isolated margin, not supported for cross margin - `orderListId` (number, optional): Order list id - `origClientOrderId` (string, optional): Order id from client - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_all_order_list [DISCOVERY] Query Margin Account's all OCO (USER_DATA) — Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 **Parameters:** - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `symbol` (string, optional): Mandatory for isolated margin, not supported for cross margin - `fromId` (string, optional): If supplied, neither `startTime` or `endTime` can be provided - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default Value: 500; Max Value: 1000 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_open_order_list [DISCOVERY] Query Margin Account's Open OCO (USER_DATA) — Weight(IP): 10 **Parameters:** - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `symbol` (string, optional): Mandatory for isolated margin, not supported for cross margin - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_my_trades Query Margin Account's Trade List (USER_DATA) — - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `fromId` (number, optional): Trade id to fetch from. Default gets most recent trades. - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_max_borrowable Query Max Borrow (USER_DATA) — - If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50 Returns: { amount: string, borrowLimit: string }. **Parameters:** - `asset` (string, required): query parameter: asset (string) - `isolatedSymbol` (string, optional): Isolated symbol - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_max_transferable Query Max Transfer-Out Amount (USER_DATA) — - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 Returns: { amount: string, borrowLimit: string }. **Parameters:** - `asset` (string, required): query parameter: asset (string) - `isolatedSymbol` (string, optional): Isolated symbol - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_trade_coeff Get Summary of Margin account (USER_DATA) — Get personal margin level information Weight(IP): 10 Returns: { normalBar: string, marginCallBar: string, forceLiquidationBar: string }. **Parameters:** - `email` (string, required): Email Address - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_isolated_account Query Isolated Margin Account Info (USER_DATA) — - If "symbols" is not sent, all isolated assets will be returned. - If "symbols" is sent, only the isolated assets of the sent symbols will be returned. Weight(IP): 10 Returns: { assets: { baseAsset: { asset: string, borrowEnabled: boolean, borrowed: string, free: string, interest: string, locked: string, ... }, quoteAsset: { asset: string, borrowEnabled: boolean, borrowed: string, free: string, interest: string, locked: string, ... }, symbol: string, isolatedCreated: boolean, enabled: boolean, marginLevel: string, ... }[], totalAssetOfBtc: stri **Parameters:** - `symbols` (string, optional): Max 5 symbols can be sent; separated by ',' - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_isolated_account_limit Query Enabled Isolated Margin Account Limit (USER_DATA) — Query enabled isolated margin account limit. Weight(IP): 1 Returns: { enabledAccount: number, maxAccount: number }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_isolated_all_pairs [DISCOVERY] Get All Isolated Margin Symbol(USER_DATA) — Weight(IP): 10 **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_bnb_burn Get BNB Burn Status(USER_DATA) — Weight(IP): 1 Returns: { spotBNBBurn: boolean, interestBNBBurn: boolean }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_interest_rate_history Margin Interest Rate History (USER_DATA) — The max interval between startTime and endTime is 30 days. Weight(IP): 1 **Parameters:** - `asset` (string, required): query parameter: asset (string) - `vipLevel` (number, optional): Defaults to user's vip level - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_cross_margin_data Query Cross Margin Fee Data (USER_DATA) — Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted **Parameters:** - `vipLevel` (number, optional): Defaults to user's vip level - `coin` (string, optional): Coin name - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_isolated_margin_data Query Isolated Margin Fee Data (USER_DATA) — Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted **Parameters:** - `vipLevel` (number, optional): Defaults to user's vip level - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_isolated_margin_tier Query Isolated Margin Tier Data (USER_DATA) — Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `tier` (string, optional): All margin tier data will be returned if tier is omitted - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_rate_limit_order Query Current Margin Order Count Usage (TRADE) — Displays the user's current margin order count usage for all intervals. Weight(IP): 20 **Parameters:** - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `symbol` (string, optional): isolated symbol, mandatory for isolated margin - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_cross_margin_collateral_ratio Cross margin collateral ratio (MARKET_DATA) — Weight(IP): 100 _No parameters required._ ### get_sapi_v1_margin_exchange_small_liability Get Small Liability Exchange Coin List (USER_DATA) — Query the coins which can be small liability exchange Weight(UID): 100 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_exchange_small_liability_history Get Small Liability Exchange History (USER_DATA) — Get Small liability Exchange History Weight(UID): 100 Returns: { total: number, rows: { asset: string, amount: string, targetAsset: string, targetAmount: string, bizType: string, timestamp: number }[] }. **Parameters:** - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_next_hourly_interest_rate Get a future hourly interest rate (USER_DATA) — Get user the next hourly estimate interest Weight(UID): 100 **Parameters:** - `assets` (string, optional): List of assets, separated by commas, up to 20 - `isIsolated` (string, optional): for isolated margin or not, "TRUE", "FALSE" - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_capital_flow Get cross or isolated margin capital flow(USER_DATA) — Get cross or isolated margin capital flow Weight(IP): 100 **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `symbol` (string, optional): Required when querying isolated data - `type` (string, optional): query parameter: type ("TRANSFER" | "BORROW" | "REPAY" | "BUY_INCOME" | "BUY_EXPENSE" | "SELL_INCOME" | "SELL_EXPENSE" | "TRADING_COMMISSION" | "BUY_LIQUIDATION" | "SELL_LIQUIDATION" | "REPAY_LIQUIDATION" | "OTHER_LIQUIDATION" | "LIQUIDATION_FEE" | "SMALL_BALANCE_CONVERT" | "COMMISSION_RETURN" | "SMALL_CONVERT") - `startTime` (number, optional): Only supports querying the data of the last 90 days - `endTime` (number, optional): UTC timestamp in ms - `fromId` (number, optional): If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned - `limit` (number, optional): The number of data items returned each time is limited. Default 500; Max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_delist_schedule Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) — Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_available_inventory Query Margin Available Inventory (USER_DATA) — Margin available Inventory query Weight(UID): 50 Returns: { assets: { MATIC: string, STPT: string, TVK: string, SHIB: string }, updateTime: number }. **Parameters:** - `type` (string, required): query parameter: type ("MARGIN" | "ISOLATED") - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_margin_leverage_bracket Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) — Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 _No parameters required._ ### get_sapi_v1_capital_config_getall All Coins' Information (USER_DATA) — Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_account_snapshot Daily Account Snapshot (USER_DATA) — - The query time period must be less than 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default Weight(IP): 2400 **Parameters:** - `type` (string, required): query parameter: type ("SPOT" | "MARGIN" | "FUTURES") - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): query parameter: limit (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_capital_deposit_hisrec Deposit History(supporting network) (USER_DATA) — Fetch deposit history. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. Weight(IP): 1 **Parameters:** - `coin` (string, optional): Coin name - `status` (number, optional): * `0` - pending * `6` - credited but cannot withdraw * `1` - success - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `offset` (number, optional): query parameter: offset (number) - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_capital_withdraw_history Withdraw History (supporting network) (USER_DATA) — Fetch withdraw history. This endpoint specifically uses per second UID rate limit, user's total second level IP rate limit is 180000/second. Response from the endpoint contains header key X-SAPI-USED-UID-WEIGHT-1S, which defines weight used by the current IP. - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days - If withdraw **Parameters:** - `coin` (string, optional): Coin name - `withdrawOrderId` (string, optional): query parameter: withdrawOrderId (string) - `status` (number, optional): * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `offset` (number, optional): query parameter: offset (number) - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_capital_deposit_address Deposit Address (supporting network) (USER_DATA) — Fetch deposit address with network. - If network is not send, return with default network of the coin. - You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256). Weight(IP): 10 Returns: { address: string, coin: string, tag: string, ... }. **Parameters:** - `coin` (string, required): Coin name - `network` (string, optional): query parameter: network (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_account_status Account Status (USER_DATA) — Fetch account status detail. Weight(IP): 1 Returns: { data: string }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_account_api_trading_status Account API Trading Status (USER_DATA) — Fetch account API trading status with details. Weight(IP): 1 Returns: { data: { isLocked: boolean, plannedRecoverTime: number, triggerCondition: { GCR: number, IFER: number, UFR: number }, indicators: { BTCUSDT: { i: string, c: number, v: number, t: number }[] }, updateTime: number } }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_dribblet DustLog(USER_DATA) — Weight(IP): 1 Returns: { total: number, userAssetDribblets: { operateTime: number, totalTransferedAmount: string, totalServiceChargeAmount: string, transId: number, userAssetDribbletDetails: { transId: number, serviceChargeAmount: string, amount: string, operateTime: number, transferedAmount: string, fromAsset: string }[] }[] }. **Parameters:** - `accountType` (string, optional): SPOT or MARGIN, default SPOT - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_asset_dividend Asset Dividend Record (USER_DATA) — Query asset Dividend Record Weight(IP): 10 Returns: { rows: { id: number, amount: string, asset: string, divTime: number, enInfo: string, tranId: number }[], total: number }. **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): query parameter: limit (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_asset_detail Asset Detail (USER_DATA) — Fetch details of assets supported on Binance. - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. Weight(IP): 1 Returns: { CTR: { minWithdrawAmount: string, depositStatus: boolean, withdrawFee: number, withdrawStatus: boolean, depositTip: string } }. **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_trade_fee Trade Fee (USER_DATA) — Fetch trade fee Weight(IP): 1 **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_transfer Query User Universal Transfer History (USER_DATA) — - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 1 Returns: { total: number, rows: { asset: string, amount: string, type: string, status: string, tranId: number, timestamp: number }[] }. **Parameters:** - `type` (string, required): Universal transfer type - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `fromSymbol` (string, optional): Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` (string, optional): Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_convert_transfer_query_by_page Query Convert Transfer (USER_DATA) — Weight(UID): 5 Returns: { total: number, rows: { tranId: number, type: number, time: number, deductedAsset: string, deductedAmount: string, targetAsset: string, ... }[] }. **Parameters:** - `tranId` (number, optional): The transaction id - `asset` (string, optional): If it is blank, we will match deducted asset and target asset. - `startTime` (number, required): UTC timestamp in ms - `endTime` (number, required): UTC timestamp in ms - `accountType` (string, optional): MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_ledger_transfer_cloud_mining_query_by_page Get Cloud-Mining payment and refund history (USER_DATA) — The query of Cloud-Mining payment and refund history Weight(UID): 600 Returns: { total: number, rows: { createTime: number, tranId: number, type: number, asset: string, amount: string, status: string }[] }. **Parameters:** - `tranId` (number, optional): The transaction id - `clientTranId` (string, optional): The unique flag - `asset` (string, optional): If it is blank, we will query all assets - `startTime` (number, required): UTC timestamp in ms - `endTime` (number, required): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_account_api_restrictions Get API Key Permission (USER_DATA) — Weight(IP): 1 Returns: { ipRestrict: boolean, createTime: number, enableInternalTransfer: boolean, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_list [DISCOVERY] Query Sub-account List (For Master Account) — Weight(IP): 1 Returns: { subAccounts: { email: string, isFreeze: boolean, createTime: number, isManagedSubAccount: boolean, isAssetManagementSubAccount: boolean }[] }. **Parameters:** - `email` (string, optional): Sub-account email - `isFreeze` (string, optional): query parameter: isFreeze ("true" | "false") - `page` (number, optional): Default 1 - `limit` (number, optional): Default 1; max 200 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_sub_transfer_history Sub-account Spot Asset Transfer History (For Master Account) — - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 **Parameters:** - `fromEmail` (string, optional): Sub-account email - `toEmail` (string, optional): Sub-account email - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `limit` (number, optional): Default 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_futures_internal_transfer Sub-account Futures Asset Transfer History (For Master Account) — Weight(IP): 1 Returns: { success: boolean, futuresType: number, transfers: { from: string, to: string, asset: string, qty: string, tranId: number, time: number }[] }. **Parameters:** - `email` (string, required): Sub-account email - `futuresType` (number, required): 1:USDT-margined Futures, 2: Coin-margined Futures - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `limit` (number, optional): Default value: 50, Max value: 500 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v3_sub_account_assets [DISCOVERY] Sub-account Assets (For Master Account) — Fetch sub-account assets Weight(IP): 1 Returns: { balances: { asset: string, free: number, locked: number }[] }. **Parameters:** - `email` (string, required): Sub-account email - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_spot_summary Sub-account Spot Assets Summary (For Master Account) — Get BTC valued asset summary of subaccounts. Weight(IP): 1 Returns: { totalCount: number, masterAccountTotalAsset: string, spotSubUserAssetBtcVoList: { email: string, totalAsset: string }[] }. **Parameters:** - `email` (string, optional): Sub-account email - `page` (number, optional): Default 1 - `size` (number, optional): Default:10 Max:20 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_capital_deposit_sub_address Sub-account Spot Assets Summary (For Master Account) — Fetch sub-account deposit address Weight(IP): 1 Returns: { address: string, coin: string, tag: string, ... }. **Parameters:** - `email` (string, required): Sub-account email - `coin` (string, required): Coin name - `network` (string, optional): query parameter: network (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_capital_deposit_sub_hisrec Sub-account Deposit History (For Master Account) — Fetch sub-account deposit history Weight(IP): 1 **Parameters:** - `email` (string, required): Sub-account email - `coin` (string, optional): Coin name - `status` (number, optional): 0(0:pending,6: credited but cannot withdraw, 1:success) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): query parameter: limit (number) - `offset` (number, optional): query parameter: offset (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_wallet_balance Query User Wallet Balance (USER_DATA) — Query User Wallet Balance Weight(IP): 60 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_asset_custody_transfer_history Query User Delegation History(For Master Account) (USER_DATA) — Query User Delegation History Weight(IP): 60 Returns: { total: number, rows: { clientTranId: string, transferType: string, asset: string, amount: string, time: number }[] }. **Parameters:** - `email` (string, required): query parameter: email (string) - `startTime` (number, required): query parameter: startTime (number) - `endTime` (number, required): query parameter: endTime (number) - `type` (string, optional): query parameter: type (string) - `asset` (string, required): query parameter: asset (string) - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_capital_deposit_address_list [DISCOVERY] Fetch deposit address list with network (USER_DATA) — Fetch deposit address list with network. Weight(IP): 10 **Parameters:** - `coin` (string, required): query parameter: coin (string) - `network` (string, optional): query parameter: network (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_spot_delist_schedule Get symbols delist schedule for spot (MARKET_DATA) — Get symbols delist schedule for spot Weight(IP): 100 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_capital_withdraw_address_list [DISCOVERY] Fetch withdraw address list (USER_DATA) — Fetch withdraw address list Weight(IP): 10 _No parameters required._ ### get_sapi_v1_account_info Account info (USER_DATA) — Fetch account info detail. Weight(IP): 1 Returns: { vipLevel: number, isMarginEnabled: boolean, isFutureEnabled: boolean }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_status Sub-account's Status on Margin/Futures (For Master Account) — - If no `email` sent, all sub-accounts' information will be returned. Weight(IP): 10 **Parameters:** - `email` (string, optional): Sub-account email - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_margin_account Detail on Sub-account's Margin Account (For Master Account) — Weight(IP): 10 Returns: { email: string, marginLevel: string, totalAssetOfBtc: string, ... }. **Parameters:** - `email` (string, required): Sub-account email - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_margin_account_summary Summary of Sub-account's Margin Account (For Master Account) — Weight(IP): 10 Returns: { totalAssetOfBtc: string, totalLiabilityOfBtc: string, totalNetAssetOfBtc: string, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_futures_account Detail on Sub-account's Futures Account (For Master Account) — Weight(IP): 10 Returns: { email: string, asset: string, assets: { asset: string, initialMargin: string, maintenanceMargin: string, marginBalance: string, maxWithdrawAmount: string, openOrderInitialMargin: string, ... }[], ... }. **Parameters:** - `email` (string, required): query parameter: email (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_futures_account_summary Summary of Sub-account's Futures Account (For Master Account) — Weight(IP): 1 Returns: { totalInitialMargin: string, totalMaintenanceMargin: string, totalMarginBalance: string, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_futures_position_risk Futures Position-Risk of Sub-account (For Master Account) — Weight(IP): 10 **Parameters:** - `email` (string, required): Sub-account email - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_transfer_sub_user_history Sub-account Transfer History (For Sub-account) — - If `type` is not sent, the records of type 2: transfer out will be returned by default. - If `startTime` and `endTime` are not sent, the recent 30-day data will be returned. Weight(IP): 1 **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `type` (number, optional): * `1` - transfer in * `2` - transfer out - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_universal_transfer Universal Transfer History (For Master Account) — - `fromEmail` and `toEmail` cannot be sent at the same time. - Return `fromEmail` equal master account email by default. - The query time period must be less then 30 days. - If startTime and endTime not sent, return records of the last 30 days by default. Weight(IP): 1 **Parameters:** - `fromEmail` (string, optional): Sub-account email - `toEmail` (string, optional): Sub-account email - `clientTranId` (string, optional): query parameter: clientTranId (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `limit` (number, optional): Default 500, Max 500 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_sub_account_futures_account Detail on Sub-account's Futures Account V2 (For Master Account) — Weight(IP): 1 **Parameters:** - `email` (string, required): Sub-account email - `futuresType` (number, required): * `1` - USDT Margined Futures * `2` - COIN Margined Futures - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_sub_account_futures_account_summary Summary of Sub-account's Futures Account V2 (For Master Account) — Weight(IP): 10 **Parameters:** - `futuresType` (number, required): * `1` - USDT Margined Futures * `2` - COIN Margined Futures - `page` (number, optional): Default 1 - `limit` (number, optional): Default 10, Max 20 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_sub_account_futures_position_risk Futures Position-Risk of Sub-account V2 (For Master Account) — Weight(IP): 1 **Parameters:** - `email` (string, required): Sub-account email - `futuresType` (number, required): * `1` - USDT Margined Futures * `2` - COIN Margined Futures - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_asset Managed sub-account asset details(For Investor Master Account) — Weight(IP): 1 **Parameters:** - `email` (string, required): Sub-account email - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_account_snapshot Managed sub-account snapshot (For Investor Master Account) — - The query time period must be less then 30 days - Support query within the last one month only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 2400 Returns: { code: number, msg: string, snapshotVos: { data: { balances: { asset: unknown, free: unknown, locked: unknown }[], totalAssetOfBtc: string }, type: string, updateTime: number }[] }. **Parameters:** - `email` (string, required): Sub-account email - `type` (string, required): "SPOT", "MARGIN"(cross), "FUTURES"(UM) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): min 7, max 30, default 7 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_query_trans_log_for_investor Query Managed Sub Account Transfer Log (For Investor Master Account) — Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Weight(IP): 1 Returns: { count: number, managerSubTransferHistoryVos: { fromEmail: string, fromAccountType: string, toEmail: string, toAccountType: string, asset: string, amount: string, ... }[] }. **Parameters:** - `email` (string, required): query parameter: email (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `limit` (number, optional): Default 500; max 1000. - `transfers` (string, optional): Transfer Direction (FROM/TO) - `transferFunctionAccountType` (string, optional): Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_query_trans_log_for_trade_parent Query Managed Sub Account Transfer Log (For Trading Team Master Account) — Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team Weight(IP): 60 Returns: { count: number, managerSubTransferHistoryVos: { fromEmail: string, fromAccountType: string, toEmail: string, toAccountType: string, asset: string, amount: string, ... }[] }. **Parameters:** - `email` (string, required): query parameter: email (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `limit` (number, optional): Default 500; max 1000. - `transfers` (string, optional): Transfer Direction (FROM/TO) - `transferFunctionAccountType` (string, optional): Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_fetch_future_asset Query Managed Sub-account Futures Asset Details (For Investor Master Account) — Investor can use this api to query managed sub account futures asset details Returns: { code: number, message: string, snapshotVos: { type: string, updateTime: number, data: { assets: { asset: unknown, marginBalance: unknown, walletBalance: unknown }[], position: { symbol: unknown, entryPrice: unknown, markPrice: unknown, positionAmt: unknown }[] } }[] }. **Parameters:** - `email` (string, required): query parameter: email (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_margin_asset Query Managed Sub-account Margin Asset Details (For Investor Master Account) — Investor can use this api to query managed sub account margin asset details Returns: { marginLevel: string, totalAssetOfBtc: string, totalLiabilityOfBtc: string, ... }. **Parameters:** - `email` (string, required): query parameter: email (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_info Query Managed Sub-account List (For Investor) — Get investor's managed sub-account list. Weight(UID): 60 Returns: { total: number, managerSubUserInfoVoList: { rootUserId: number, managersubUserId: number, bindParentUserId: number, email: string, insertTimeStamp: number, bindParentEmail: string, ... }[] }. **Parameters:** - `email` (string, required): query parameter: email (string) - `page` (number, optional): Default 1 - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_deposit_address Get Managed Sub-account Deposit Address (For Investor Master Account) — Get investor's managed sub-account deposit address Weight(UID): 1 Returns: { coin: string, address: string, tag: string, ... }. **Parameters:** - `email` (string, required): query parameter: email (string) - `coin` (string, required): Coin name - `network` (string, optional): query parameter: network (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_managed_subaccount_query_trans_log Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) — Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 Returns: { count: number, managerSubTransferHistoryVos: { fromEmail: string, fromAccountType: string, toEmail: string, toAccountType: string, asset: string, amount: string, ... }[] }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `limit` (number, optional): Default 500; max 1000. - `transfers` (string, required): Transfer Direction - `transferFunctionAccountType` (string, required): Transfer function account type - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_sub_account_api_ip_restriction Get IP Restriction for a Sub-account API Key (For Master Account) — Weight(UID): 3000 Returns: { ipRestrict: string, ipList: string[], updateTime: number, ... }. **Parameters:** - `email` (string, required): Sub-account email - `subAccountApiKey` (string, required): query parameter: subAccountApiKey (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_sub_account_transaction_statistics Query Sub-account Transaction Statistics (For Master Account) — Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 Returns: { recent30BtcTotal: string, recent30BtcFuturesTotal: string, recent30BtcMarginTotal: string, ... }. **Parameters:** - `email` (string, required): query parameter: email (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v4_sub_account_assets [DISCOVERY] Query Sub-account Assets (For Master Account) — Fetch sub-account assets Weight(UID): 60 Returns: { balances: { asset: string, free: string, locked: string }[] }. **Parameters:** - `email` (string, required): query parameter: email (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_fiat_orders Fiat Deposit/Withdraw History (USER_DATA) — - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(UID): 90000 Returns: { code: string, message: string, data: { orderNo: string, fiatCurrency: string, indicatedAmount: string, amount: string, totalFee: string, method: string, ... }[], ... }. **Parameters:** - `transactionType` (number, required): * `0` - deposit * `1` - withdraw - `beginTime` (number, optional): query parameter: beginTime (number) - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `rows` (number, optional): Default 100, max 500 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_fiat_payments Fiat Payments History (USER_DATA) — - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 Returns: { code: string, message: string, data: { orderNo: string, sourceAmount: string, fiatCurrency: string, obtainAmount: string, cryptoCurrency: string, totalFee: string, ... }[], ... }. **Parameters:** - `transactionType` (number, required): * `0` - deposit * `1` - withdraw - `beginTime` (number, optional): query parameter: beginTime (number) - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `rows` (number, optional): Default 100, max 500 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_project_list [DISCOVERY] Get Fixed/Activity Project List(USER_DATA) — Weight(IP): 1 **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `type` (string, required): query parameter: type ("ACTIVITY" | "CUSTOMIZED_FIXED") - `status` (string, optional): Default `ALL` - `isSortAsc` (boolean, optional): default "true" - `sortBy` (string, optional): Default `START_TIME` - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_project_position_list [DISCOVERY] Get Fixed/Activity Project Position (USER_DATA) — Weight(IP): 1 **Parameters:** - `asset` (string, required): query parameter: asset (string) - `projectId` (string, optional): query parameter: projectId (string) - `status` (string, optional): Default `ALL` - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_pub_algo_list [DISCOVERY] Acquiring Algorithm (MARKET_DATA) — Weight(IP): 1 Returns: { code: number, msg: string, data: { algoName: string, algoId: number, poolIndex: number, unit: string }[] }. _No parameters required._ ### get_sapi_v1_mining_pub_coin_list [DISCOVERY] Acquiring CoinName (MARKET_DATA) — Weight(IP): 1 Returns: { code: number, msg: string, data: { coinName: string, coinId: number, poolIndex: number, algoId: number, algoName: string }[] }. _No parameters required._ ### get_sapi_v1_mining_worker_detail Request for Detail Miner List (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { workerName: string, type: string, hashrateDatas: { time: number, hashrate: string, reject: number }[] }[] }. **Parameters:** - `algo` (string, required): Algorithm(sha256) - `userName` (string, required): Mining Account - `workerName` (string, required): Miner’s name - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_worker_list [DISCOVERY] Request for Miner List (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { workerDatas: { workerId: string, workerName: string, status: number, hashRate: number, dayHashRate: number, rejectRate: number, ... }[], totalNum: number, pageSize: number } }. **Parameters:** - `algo` (string, required): Algorithm(sha256) - `userName` (string, required): Mining Account - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `sort` (number, optional): sort sequence(default=0)0 positive sequence, 1 negative sequence - `sortColumn` (number, optional): Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time - `workerStatus` (number, optional): miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_payment_list [DISCOVERY] Earnings List (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { accountProfits: { time: number, type: number, hashTransfer: number, transferAmount: number, dayHashRate: number, profitAmount: number, ... }[], totalNum: number, pageSize: number } }. **Parameters:** - `algo` (string, required): Algorithm(sha256) - `userName` (string, required): Mining Account - `coin` (string, optional): Coin name - `startDate` (string, optional): Search date, millisecond timestamp, while empty query all - `endDate` (string, optional): Search date, millisecond timestamp, while empty query all - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `pageSize` (string, optional): Number of pages, minimum 10, maximum 200 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_payment_other Extra Bonus List (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { otherProfits: { time: number, coinName: string, type: number, profitAmount: number, status: number }[], totalNum: number, pageSize: number } }. **Parameters:** - `algo` (string, required): Algorithm(sha256) - `userName` (string, required): Mining Account - `coin` (string, optional): Coin name - `startDate` (string, optional): Search date, millisecond timestamp, while empty query all - `endDate` (string, optional): Search date, millisecond timestamp, while empty query all - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `pageSize` (string, optional): Number of pages, minimum 10, maximum 200 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_hash_transfer_config_details_list [DISCOVERY] Hashrate Resale List (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { configDetails: { configId: number, poolUsername: string, toPoolUsername: string, algoName: string, hashRate: number, startDay: number, ... }[], totalNum: number, pageSize: number } }. **Parameters:** - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `pageSize` (string, optional): Number of pages, minimum 10, maximum 200 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_hash_transfer_profit_details Hashrate Resale Details (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { profitTransferDetails: { poolUsername: string, toPoolUsername: string, algoName: string, hashRate: number, day: number, amount: number, ... }[], totalNum: number, pageSize: number } }. **Parameters:** - `configId` (string, required): Mining ID - `userName` (string, required): Mining Account - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `pageSize` (string, optional): Number of pages, minimum 10, maximum 200 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_statistics_user_status Statistic List (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { fifteenMinHashRate: string, dayHashRate: string, validNum: number, invalidNum: number, profitToday: { BTC: string, BSV: string, BCH: string }, profitYesterday: { BTC: string, BSV: string, BCH: string }, ... } }. **Parameters:** - `algo` (string, required): Algorithm(sha256) - `userName` (string, required): Mining Account - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_statistics_user_list [DISCOVERY] Account List (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { type: string, userName: string, list: { time: number, hashrate: string, reject: string }[] }[] }. **Parameters:** - `algo` (string, required): Algorithm(sha256) - `userName` (string, required): Mining Account - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_mining_payment_uid Mining Account Earning (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: { accountProfits: { time: number, coinName: string, type: number, puid: number, subName: string, amount: number }[], totalNum: number, pageSize: number } }. **Parameters:** - `algo` (string, required): Algorithm(sha256) - `startDate` (string, optional): Search date, millisecond timestamp, while empty query all - `endDate` (string, optional): Search date, millisecond timestamp, while empty query all - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `pageSize` (string, optional): Number of pages, minimum 10, maximum 200 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_futures_transfer Get Future Account Transaction History List (USER_DATA) — Weight(IP): 10 Returns: { rows: { asset: string, tranId: number, amount: string, type: string, timestamp: number, status: string }[], total: number }. **Parameters:** - `asset` (string, required): query parameter: asset (string) - `startTime` (number, required): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_futures_hist_data_link Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) — Weight(IP): 1 Returns: { data: { day: string, url: string }[] }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): query parameter: symbol (string) - `dataType` (string, required): query parameter: dataType ("T_DEPTH" | "S_DEPTH") - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_algo_futures_open_orders Query Current Algo Open Orders (USER_DATA) — - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 Returns: { total: number, orders: { algoId: number, symbol: string, side: string, positionSide: string, totalQty: string, executedQty: string, ... }[] }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_algo_futures_historical_orders Query Historical Algo Orders (USER_DATA) — - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 Returns: { total: number, orders: { algoId: number, symbol: string, side: string, positionSide: string, totalQty: string, executedQty: string, ... }[] }. **Parameters:** - `symbol` (string, optional): Trading symbol, e.g. BNBUSDT - `side` (string, optional): query parameter: side ("SELL" | "BUY") - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `pageSize` (string, optional): MIN 1, MAX 100; Default 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_algo_futures_sub_orders Query Sub Orders (USER_DATA) — - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 Returns: { total: number, executedQty: string, executedAmt: string, ... }. **Parameters:** - `algoId` (number, required): query parameter: algoId (number) - `page` (number, optional): Default 1 - `pageSize` (string, optional): MIN 1, MAX 100; Default 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_algo_spot_open_orders Query Current Algo Open Orders — Get all open SPOT TWAP orders Weight(IP): 1 Returns: { total: number, orders: { algoId: number, symbol: string, side: string, totalQty: string, executedQty: string, executedAmt: string, ... }[] }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_algo_spot_historical_orders Query Historical Algo Orders — Get all historical SPOT TWAP orders Weight(IP): 1 Returns: { total: number, orders: { algoId: number, symbol: string, side: string, totalQty: string, executedQty: string, executedAmt: string, ... }[] }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `pageSize` (string, optional): MIN 1, MAX 100; Default 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_algo_spot_sub_orders Query Sub Orders — Get respective sub orders for a specified algoId Weight(IP): 1 Returns: { total: number, executedQty: string, executedAmt: string, ... }. **Parameters:** - `algoId` (number, required): query parameter: algoId (number) - `page` (number, optional): Default 1 - `pageSize` (string, optional): MIN 1, MAX 100; Default 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_portfolio_account Portfolio Margin Account (USER_DATA) — Get the account info 'Weight(IP): 1' Returns: { uniMMR: string, accountEquity: string, actualEquity: string, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_portfolio_collateral_rate Portfolio Margin Collateral Rate (MARKET_DATA) — Portfolio Margin Collateral Rate. Weight(IP): 50 _No parameters required._ ### get_sapi_v2_portfolio_collateral_rate Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) — Portfolio Margin PRO Tiered Collateral Rate Weight(IP): 50 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_portfolio_pm_loan Portfolio Margin Bankruptcy Loan Amount (USER_DATA) — Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 Returns: { asset: string, amount: string }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_portfolio_interest_history Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) — Query interest history of negative balance for portfolio margin. Weight(IP): 50 **Parameters:** - `asset` (string, required): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_portfolio_asset_index_price Query Portfolio Margin Asset Index Price (MARKET_DATA) — Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset **Parameters:** - `asset` (string, optional): query parameter: asset (string) ### get_sapi_v1_portfolio_repay_futures_switch Get Auto-repay-futures Status (USER_DATA) — Query Auto-repay-futures Status Weight(IP): 30 Returns: { autoRepay: boolean }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_portfolio_margin_asset_leverage Get Portfolio Margin Asset Leverage (USER_DATA) — Weight(IP): 50 _No parameters required._ ### get_sapi_v1_blvt_token_info BLVT Info (MARKET_DATA) — Weight(IP): 1 **Parameters:** - `tokenName` (string, optional): BTCDOWN, BTCUP ### get_sapi_v1_blvt_subscribe_record Query Subscription Record (USER_DATA) — - Only the data of the latest 90 days is available Weight(IP): 1 Returns: { id: number, tokenName: string, amount: string, ... }. **Parameters:** - `tokenName` (string, optional): BTCDOWN, BTCUP - `id` (number, optional): query parameter: id (number) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_blvt_redeem_record Redemption Record (USER_DATA) — - Only the data of the latest 90 days is available Weight(IP): 1 **Parameters:** - `tokenName` (string, optional): BTCDOWN, BTCUP - `id` (number, optional): query parameter: id (number) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): default 1000, max 1000 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_blvt_user_limit BLVT User Limit Info (USER_DATA) — Weight(IP): 1 **Parameters:** - `tokenName` (string, optional): BTCDOWN, BTCUP - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_c2c_order_match_list_user_order_history Get C2C Trade History (USER_DATA) — - If startTimestamp and endTimestamp are not sent, the recent 30-day data will be returned. - The max interval between startTimestamp and endTimestamp is 30 days. Weight(IP): 1 Returns: { code: string, message: string, data: { orderNumber: string, advNo: string, tradeType: string, asset: string, fiat: string, fiatSymbol: string, ... }[], ... }. **Parameters:** - `tradeType` (string, required): query parameter: tradeType ("BUY" | "SELL") - `startTimestamp` (number, optional): UTC timestamp in ms - `endTimestamp` (number, optional): UTC timestamp in ms - `page` (number, optional): Default 1 - `rows` (number, optional): default 100, max 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_vip_ongoing_orders Get VIP Loan Ongoing Orders (USER_DATA) — VIP loan is available for VIP users only. Weight(IP): 400 Returns: { rows: { orderId: number, loanCoin: string, totalDebt: string, residualInterest: string, collateralAccountId: string, collateralCoin: string, ... }[], total: number }. **Parameters:** - `orderId` (number, optional): Order id - `collateralAccountId` (number, optional): query parameter: collateralAccountId (number) - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): Default 10; max 100. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_vip_repay_history Get VIP Loan Repayment History (USER_DATA) — VIP loan is available for VIP users only. Weight(IP): 400 Returns: { rows: { loanCoin: string, repayAmount: string, collateralCoin: string, repayStatus: string, repayTime: string, orderId: string }[], total: number }. **Parameters:** - `orderId` (number, optional): Order id - `loanCoin` (string, optional): Coin loaned - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): Default 10; max 100. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_vip_collateral_account Check Locked Value of VIP Collateral Account (USER_DATA) — VIP loan is available for VIP users only. Weight(IP): 6000 Returns: { rows: { collateralAccountId: string, collateralCoin: string, collateralValue: string }[], total: number }. **Parameters:** - `orderId` (number, optional): Order id - `collateralAccountId` (number, optional): query parameter: collateralAccountId (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_vip_loanable_data Get Loanable Assets Data — Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 Returns: { total: number, rows: { loanCoin: string, _flexibleDailyInterestRate: string, _flexibleYearlyInterestRate: string, _30dDailyInterestRate: string, _30dYearlyInterestRate: string, _60dDailyInterestRate: string, ... }[] }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `vipLevel` (number, optional): Defaults to user's vip level - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_vip_collateral_data Get Collateral Asset Data (USER_DATA) — Get collateral asset data. Weight(IP): 400 Returns: { rows: { collateralCoin: string, _1stCollateralRatio: string, _1stCollateralRange: string, _2ndCollateralRatio: string, _2ndCollateralRange: string, _3rdCollateralRatio: string, ... }[], total: number }. **Parameters:** - `collateralCoin` (string, optional): Coin used as collateral - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_vip_request_data Query Application Status (USER_DATA) — Get Application Status Weight(UID): 400 Returns: { total: number, rows: { loanAccountId: string, orderId: string, requestId: string, loanCoin: string, loanAmount: string, collateralAccountId: string, ... }[] }. **Parameters:** - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_vip_request_interest_rate Get Borrow Interest Rate (USER_DATA) — Get borrow interest rate. Weight(UID): 400 **Parameters:** - `loanCoin` (string, optional): Max 10 assets, Multiple split by "," - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_income Get Crypto Loans Income History (USER_DATA) — - If startTime and endTime are not sent, the recent 7-day data will be returned. - The max interval between startTime and endTime is 30 days. Weight(UID): 6000 **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `type` (string, optional): All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): default 20, max 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_borrow_history Get Crypto Loans Borrow History (USER_DATA) — - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 Returns: { rows: { orderId: number, loanCoin: string, initialLoanAmount: string, hourlyInterestRate: string, loanTerm: string, collateralCoin: string, ... }[], total: number }. **Parameters:** - `orderId` (number, optional): orderId in POST /sapi/v1/loan/borrow - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): default 10, max 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_ongoing_orders Get Loan Ongoing Orders (USER_DATA) — Weight(IP): 300 Returns: { rows: { orderId: number, loanCoin: string, totalDebt: string, residualInterest: string, collateralCoin: string, collateralAmount: string, ... }[], total: number }. **Parameters:** - `orderId` (number, optional): orderId in POST /sapi/v1/loan/borrow - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `current` (number, optional): Current querying page. Start from 1; default:1, max:1000 - `limit` (number, optional): default 10, max 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_repay_history Get Loan Repayment History (USER_DATA) — If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 Returns: { rows: { loanCoin: string, repayAmount: string, collateralCoin: string, collateralUsed: string, collateralReturn: string, repayType: string, ... }[], total: number }. **Parameters:** - `orderId` (number, optional): Order ID - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): default 10, max 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_ltv_adjustment_history Get Loan LTV Adjustment History (USER_DATA) — If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 Returns: { rows: { loanCoin: string, collateralCoin: string, direction: string, amount: string, preLTV: string, afterLTV: string, ... }[], total: number }. **Parameters:** - `orderId` (number, optional): Order ID - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): default 10, max 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_loanable_data Get Loanable Assets Data (USER_DATA) — Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 Returns: { rows: { loanCoin: string, _7dHourlyInterestRate: string, _7dDailyInterestRate: string, _14dHourlyInterestRate: string, _14dDailyInterestRate: string, _30dHourlyInterestRate: string, ... }[], total: number }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `vipLevel` (number, optional): Defaults to user's vip level - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_collateral_data Get Collateral Assets Data (USER_DATA) — Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 Returns: { rows: { collateralCoin: string, initialLTV: string, marginCallLTV: string, liquidationLTV: string, maxLimit: string, vipLevel: number }[], total: number }. **Parameters:** - `collateralCoin` (string, optional): Coin used as collateral - `vipLevel` (number, optional): Defaults to user's vip level - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_loan_repay_collateral_rate Check Collateral Repay Rate (USER_DATA) — Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 Returns: { loanCoin: string, collateralCoin: string, repayAmount: string, ... }. **Parameters:** - `loanCoin` (string, required): Coin loaned - `collateralCoin` (string, required): Coin used as collateral - `repayAmount` (number, required): repay amount of loanCoin - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_loan_flexible_ongoing_orders Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) — Weight(IP): 300 Returns: { total: number, rows: { loanCoin: string, totalDebt: string, collateralCoin: string, collateralAmount: string, currentLTV: string }[] }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_loan_flexible_borrow_history Borrow - Get Flexible Loan Borrow History (USER_DATA) — - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 Returns: { total: number, rows: { loanCoin: string, initialLoanAmount: string, collateralCoin: string, initialCollateralAmount: string, borrowTime: number, status: string }[] }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_loan_flexible_repay_history Repay - Get Flexible Loan Repayment History (USER_DATA) — - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 Returns: { rows: { loanCoin: string, repayAmount: string, collateralCoin: string, collateralReturn: string, repayStatus: string, repayTime: number }[], total: number }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_loan_flexible_ltv_adjustment_history Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) — - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 Returns: { rows: { loanCoin: string, collateralCoin: string, direction: string, collateralAmount: string, preLTV: string, afterLTV: string, ... }[], total: number }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `limit` (number, optional): Default 500; max 1000. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_loan_flexible_loanable_data Get Flexible Loan Assets Data (USER_DATA) — Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 Returns: { rows: { loanCoin: string, flexibleInterestRate: string, flexibleMinLimit: string, flexibleMaxLimit: string }[], total: number }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_loan_flexible_collateral_data Get Flexible Loan Collateral Assets Data (USER_DATA) — Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 Returns: { rows: { collateralCoin: string, initialLTV: string, marginCallLTV: string, liquidationLTV: string, maxLimit: string }[], total: number }. **Parameters:** - `collateralCoin` (string, optional): Coin used as collateral - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_pay_transactions Get Pay Trade History (USER_DATA) — - If startTime and endTime are not sent, the recent 90 days' data will be returned. - The max interval between startTime and endTime is 90 days. - Support for querying orders within the last 18 months. Weight(UID): 3000 Returns: { code: string, message: string, data: { orderType: string, transactionId: string, transactionTime: number, amount: string, currency: string, walletType: number, ... }[], ... }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): default 100, max 100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_convert_exchange_info [DISCOVERY] List All Convert Pairs — Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 **Parameters:** - `fromAsset` (string, optional): User spends coin - `toAsset` (string, optional): User receives coin ### get_sapi_v1_convert_asset_info Query order quantity precision per asset (USER_DATA) — Query for supported asset precision information Weight(IP): 100 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_convert_order_status Order status (USER_DATA) — Query order status by order ID. Weight(UID): 100 Returns: { orderId: number, orderStatus: string, fromAsset: string, ... }. **Parameters:** - `orderId` (string, optional): query parameter: orderId (string) - `quoteId` (string, optional): query parameter: quoteId (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_convert_limit_query_open_orders Query limit open orders (USER_DATA) — Enable users to query for all existing limit orders Weight(UID): 3000 Returns: { list: { quoteId: string, orderId: number, orderStatus: string, fromAsset: string, fromAmount: string, toAsset: string, ... }[] }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_convert_trade_flow Get Convert Trade History (USER_DATA) — - The max interval between startTime and endTime is 30 days. Weight(UID): 3000 Returns: { list: { quoteId: string, orderId: number, orderStatus: string, fromAsset: string, fromAmount: string, toAsset: string, ... }[], startTime: number, endTime: number, ... }. **Parameters:** - `startTime` (number, required): UTC timestamp in ms - `endTime` (number, required): UTC timestamp in ms - `limit` (number, optional): default 100, max 1000 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_rebate_tax_query Get Spot Rebate History Records (USER_DATA) — - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. - The earliest startTime is supported on June 10, 2020 Weight(UID): 3000 Returns: { status: string, type: string, code: string, ... }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `page` (number, optional): default 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_nft_history_transactions Get NFT Transaction History (USER_DATA) — - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 Returns: { total: number, list: { orderNo: string, tokens: { network: string, tokenId: string, contractAddress: string }[], tradeTime: number, tradeAmount: string, tradeCurrency: string }[] }. **Parameters:** - `orderType` (number, required): 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 50, Max 50 - `page` (number, optional): Default 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_nft_history_deposit Get NFT Deposit History(USER_DATA) — - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 Returns: { total: number, list: { network: string, txID: number, contractAdrress: string, tokenId: string, timestamp: number }[] }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 50, Max 50 - `page` (number, optional): Default 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_nft_history_withdraw Get NFT Withdraw History (USER_DATA) — - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 Returns: { total: number, list: { network: string, txID: string, contractAdrress: string, tokenId: string, timestamp: number, fee: number, ... }[] }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `limit` (number, optional): Default 50, Max 50 - `page` (number, optional): Default 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_nft_user_get_asset Get NFT Asset (USER_DATA) — Weight(UID): 3000 Returns: { total: number, list: { network: string, contractAddress: string, tokenId: string }[] }. **Parameters:** - `limit` (number, optional): Default 50, Max 50 - `page` (number, optional): Default 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_giftcard_verify Verify a Binance Code (USER_DATA) — This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number. Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour. Weight(IP): 1 Returns: { code: string, message: string, data: { valid: boolean, token: string, amount: string }, ... }. **Parameters:** - `referenceNo` (string, required): reference number - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_giftcard_cryptography_rsa_public_key Fetch RSA Public Key (USER_DATA) — This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day. Weight(IP): 1 Returns: { code: string, message: string, data: string, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_giftcard_buy_code_token_limit Fetch Token Limit (USER_DATA) — This API is to help you verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and it's limitation. Weight(IP): 1 Returns: { code: string, message: string, data: { coin: string, fromMin: string, fromMax: string }, ... }. **Parameters:** - `baseToken` (string, required): The token you want to pay, example BUSD - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_target_asset_list [DISCOVERY] Get target asset list (USER_DATA) — Weight(IP): 1 Returns: { targetAssets: string, autoInvestAssetList: { targetAsset: string, roiAndDimensionTypeList: { simulateRoi: string, dimensionValue: string, dimensionUnit: string }[] }[] }. **Parameters:** - `targetAsset` (string, optional): query parameter: targetAsset (string) - `size` (number, optional): Default:10 Max:100 - `current` (number, optional): Current querying page. Start from 1. Default:1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_target_asset_roi_list [DISCOVERY] Get target asset ROI data (USER_DATA) — ROI return list for target asset Weight(IP): 1 **Parameters:** - `targetAsset` (string, required): query parameter: targetAsset (string) - `hisRoiType` (string, required): query parameter: hisRoiType (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_all_asset Query all source asset and target asset (USER_DATA) — Query all source assets and target assets Weight(IP): 1 Returns: { targetAssets: string[], sourceAssets: string[] }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_source_asset_list [DISCOVERY] Query source asset list (USER_DATA) — Query Source Asset to be used for investment Weight(IP): 1 Returns: { feeRate: string, sourceAssets: { sourceAsset: string, assetMinAmount: string, assetMaxAmount: string, scale: string, flexibleAmount: string }[] }. **Parameters:** - `targetAsset` (string, optional): query parameter: targetAsset (string) - `indexId` (number, optional): query parameter: indexId (number) - `usageType` (string, required): query parameter: usageType (string) - `flexibleAllowedToUse` (boolean, optional): query parameter: flexibleAllowedToUse (boolean) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_plan_list [DISCOVERY] Get list of plans — Query plan lists Weight(IP): 1 Returns: { planValueInUSD: string, planValueInBTC: string, pnlInUSD: string, ... }. **Parameters:** - `planType` (string, required): query parameter: planType (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_plan_id Query holding details of the plan — Query holding details of the plan Weight(IP): 1 Returns: { planValueInUSD: string, planValueInBTC: string, pnlInUSD: string, ... }. **Parameters:** - `planId` (number, optional): query parameter: planId (number) - `requestId` (string, optional): query parameter: requestId (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_history_list [DISCOVERY] Query subscription transaction history — Query subscription transaction history of a plan Weight(IP): 1 **Parameters:** - `planId` (number, optional): query parameter: planId (number) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `targetAsset` (number, optional): query parameter: targetAsset (number) - `planType` (string, optional): query parameter: planType ("SINGLE" | "PORTFOLIO" | "INDEX" | "ALL") - `size` (number, optional): Default:10 Max:100 - `current` (number, optional): Current querying page. Start from 1. Default:1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_index_info Query Index Details(USER_DATA) — Query index details Weight(IP): 1 Returns: { indexId: number, indexName: string, status: string, ... }. **Parameters:** - `indexId` (number, required): query parameter: indexId (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_index_user_summary Query Index Linked Plan Position Details(USER_DATA) — Details on users Index-Linked plan position details Weight(IP): 1 Returns: { indexId: number, totalInvestedInUSD: string, currentInvestedInUSD: string, ... }. **Parameters:** - `indexId` (number, required): query parameter: indexId (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_one_off_status Query One-Time Transaction Status (USER_DATA) — Transaction status for one-time transaction Weight(IP): 1 Returns: { transactionId: number, status: string }. **Parameters:** - `transactionId` (number, required): query parameter: transactionId (number) - `requestId` (string, optional): query parameter: requestId (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_redeem_history Index Linked Plan Redemption History (USER_DATA) — Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 **Parameters:** - `requestId` (number, required): query parameter: requestId (number) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `asset` (string, optional): query parameter: asset (string) - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_lending_auto_invest_rebalance_history Index Linked Plan Rebalance Details (USER_DATA) — Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_eth_history_staking_history Get ETH staking history (USER_DATA) — - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 Returns: { rows: { time: number, asset: string, amount: string, status: string, distributeAmount: string, conversionRatio: string }[], total: number }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_eth_history_redemption_history Get ETH redemption history (USER_DATA) — - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 Returns: { rows: { time: number, arrivalTime: number, asset: string, amount: string, status: string, distributeAsset: string, ... }[], total: number }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_eth_history_rewards_history Get BETH rewards distribution history(USER_DATA) — - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 Returns: { rows: { time: number, asset: string, holding: string, amount: string, annualPercentageRate: string, status: string }[], total: number }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_eth_quota Get current ETH staking quota (USER_DATA) — Weight(IP): 150 Returns: { leftStakingPersonalQuota: string, leftRedemptionPersonalQuota: string }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_eth_history_rate_history Get WBETH Rate History (USER_DATA) — - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 Returns: { rows: { annualPercentageRate: string, exchangeRate: string, time: number }[], total: number }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v2_eth_staking_account ETH Staking account V2(USER_DATA) — Weight(IP): 150 Returns: { holdingInETH: string, holdings: { wbethAmount: string, bethAmount: string }, thirtyDaysProfitInETH: string, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_wbeth_history_wrap_history Get WBETH wrap history (USER_DATA) — - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 Returns: { rows: { time: number, fromAsset: string, fromAmount: string, toAsset: string, toAmount: string, exchangeRate: string, ... }[], total: number }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_wbeth_history_unwrap_history Get WBETH unwrap history (USER_DATA) — - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 Returns: { rows: { time: number, fromAsset: string, fromAmount: string, toAsset: string, toAmount: string, exchangeRate: string, ... }[], total: number }. **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_eth_staking_eth_history_wbeth_rewards_history Get WBETH rewards history(USER_DATA) — - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 Returns: { estRewardsInETH: string, rows: { time: number, amountInETH: string, holding: string, holdingInETH: string, annualPercentageRate: string }[], total: number } **Parameters:** - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_copy_trading_futures_user_status Get Futures Lead Trader Status(TRADE) — Get Futures Lead Trader Status Weight(UID): 20 Returns: { code: string, message: string, data: { isLeadTrader: boolean, time: number }, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_copy_trading_futures_lead_symbol Get Futures Lead Trading Symbol Whitelist(USER_DATA) — Get Futures Lead Trading Symbol Whitelist Weight(IP): 20 Returns: { code: string, message: string, data: { symbol: string, baseAsset: string, quoteAsset: string } }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_list [DISCOVERY] Get Simple Earn Flexible Product List (USER_DATA) — Get available Simple Earn flexible product list Weight(IP): 150 Returns: { rows: { asset: string, latestAnnualPercentageRate: string, tierAnnualPercentageRate: { 0-5BTC: number, 5-10BTC: number }, airDropPercentageRate: string, canPurchase: boolean, canRedeem: boolean, ... }[], total: number }. **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_locked_list [DISCOVERY] Get Simple Earn Locked Product List (USER_DATA) — Weight(IP): 150 Returns: { rows: { projectId: string, detail: { asset: string, rewardAsset: string, duration: number, renewable: boolean, isSoldOut: boolean, apr: string, ... }, quota: { totalPersonalQuota: string, minimum: string } }[], total: number }. **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_position Get Flexible Product Position (USER_DATA) — Weight(IP): 150 Returns: { rows: { totalAmount: string, tierAnnualPercentageRate: { 0-5BTC: number, 5-10BTC: number }, latestAnnualPercentageRate: string, yesterdayAirdropPercentageRate: string, asset: string, airDropAsset: string, ... }[], total: number }. **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `productId` (string, optional): query parameter: productId (string) - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_locked_position Get Locked Product Position (USER_DATA) — Weight(IP): 150 Returns: { rows: { positionId: string, parentPositionId: string, projectId: string, asset: string, amount: string, purchaseTime: string, ... }[], total: number }. **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `positionId` (string, optional): query parameter: positionId (string) - `projectId` (string, optional): query parameter: projectId (string) - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_account Simple Account (USER_DATA) — Weight(IP): 150 Returns: { totalAmountInBTC: string, totalAmountInUSDT: string, totalFlexibleAmountInBTC: string, ... }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_history_subscription_record Get Flexible Subscription Record (USER_DATA) — Weight(IP): 150 Returns: { rows: { amount: string, asset: string, time: number, purchaseId: number, productId: string, type: string, ... }[], total: number }. **Parameters:** - `productId` (string, optional): query parameter: productId (string) - `purchaseId` (string, optional): query parameter: purchaseId (string) - `asset` (string, optional): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_locked_history_subscription_record Get Locked Subscription Record (USER_DATA) — Weight(IP): 150 Returns: { rows: { positionId: string, purchaseId: number, projectId: string, time: number, asset: string, amount: string, ... }[], total: number }. **Parameters:** - `purchaseId` (string, optional): query parameter: purchaseId (string) - `asset` (string, optional): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_history_redemption_record Get Flexible Redemption Record (USER_DATA) — Weight(IP): 150 Returns: { rows: { amount: string, asset: string, time: number, projectId: string, redeemId: number, destAccount: string, ... }[], total: number }. **Parameters:** - `productId` (string, optional): query parameter: productId (string) - `redeemId` (string, optional): query parameter: redeemId (string) - `asset` (string, optional): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 ### get_sapi_v1_simple_earn_locked_history_redemption_record Get Locked Redemption Record (USER_DATA) — Weight(IP): 150 Returns: { rows: { positionId: string, redeemId: number, time: number, asset: string, lockPeriod: string, amount: string, ... }[], total: number }. **Parameters:** - `positionId` (string, optional): query parameter: positionId (string) - `redeemId` (string, optional): query parameter: redeemId (string) - `asset` (string, optional): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_history_rewards_record Get Flexible Rewards History (USER_DATA) — Weight(IP): 150 Returns: { rows: { asset: string, rewards: string, projectId: string, type: string, time: number }[], total: number }. **Parameters:** - `productId` (string, optional): query parameter: productId (string) - `asset` (string, optional): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `type` (string, required): "BONUS", "REALTIME", "REWARDS" ### get_sapi_v1_simple_earn_locked_history_rewards_record Get Locked Rewards History (USER_DATA) — Weight(IP): 150 Returns: { rows: { positionId: string, time: number, asset: string, lockPeriod: string, amount: string }[], total: number }. **Parameters:** - `positionId` (string, optional): query parameter: positionId (string) - `asset` (string, optional): query parameter: asset (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_personal_left_quota Get Flexible Personal Left Quota (USER_DATA) — Weight(IP): 150 Returns: { leftPersonalQuota: string }. **Parameters:** - `productId` (string, required): query parameter: productId (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_locked_personal_left_quota Get Locked Personal Left Quota (USER_DATA) — Weight(IP): 150 Returns: { leftPersonalQuota: string }. **Parameters:** - `projectId` (string, required): query parameter: projectId (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_subscription_preview Get Flexible Subscription Preview (USER_DATA) — Weight(IP): 150 Returns: { totalAmount: string, rewardAsset: string, airDropAsset: string, ... }. **Parameters:** - `productId` (string, required): query parameter: productId (string) - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_locked_subscription_preview Get Locked Subscription Preview (USER_DATA) — Weight(IP): 150 **Parameters:** - `projectId` (string, required): query parameter: projectId (string) - `amount` (number, required): query parameter: amount (number) - `autoSubscribe` (boolean, optional): true or false, default true. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_locked_set_redeem_option Set Locked Product Redeem Option(USER_DATA) — Set redeem option for Locked product Weight(IP): 50 Returns: { success: boolean }. **Parameters:** - `positionId` (string, required): query parameter: positionId (string) - `redeemTo` (string, optional): SPOT,FLEXIBLE, default FLEXIBLE - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_history_rate_history Get Rate History (USER_DATA) — Weight(IP): 150 Returns: { rows: { productId: string, asset: string, annualPercentageRate: string, time: number }[], total: number }. **Parameters:** - `productId` (string, required): query parameter: productId (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_simple_earn_flexible_history_collateral_record Get Collateral Record (USER_DATA) — Weight(IP): 150 Returns: { rows: { amount: string, productId: string, asset: string, createTime: number, type: string, productName: string, ... }[], total: number }. **Parameters:** - `productId` (string, optional): query parameter: productId (string) - `startTime` (number, optional): UTC timestamp in ms - `endTime` (number, optional): UTC timestamp in ms - `current` (number, optional): Current querying page. Start from 1. Default:1 - `size` (number, optional): Default:10 Max:100 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_dci_product_list [DISCOVERY] Get Dual Investment product list(USER_DATA) — Get Dual Investment product list Weight(IP): 1 Returns: { total: number, list: { id: string, investCoin: string, exercisedCoin: string, strikePrice: string, duration: number, settleDate: number, ... }[] }. **Parameters:** - `optionType` (string, required): Input CALL or PUT - `exercisedCoin` (string, required): Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; - `investCoin` (string, required): Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; - `pageSize` (string, optional): MIN 1, MAX 100; Default 100 - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_dci_product_positions Get Dual Investment positions(USER_DATA) — Get Dual Investment positions (batch) Weight(IP): 1 Returns: { total: number, list: { id: string, investCoin: string, exercisedCoin: string, subscriptionAmount: string, strikePrice: string, duration: number, ... }[] }. **Parameters:** - `status` (string, optional): - PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status. - `pageSize` (string, optional): MIN 1, MAX 100; Default 100 - `pageIndex` (number, optional): Page number, default is first page, start form 1 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### get_sapi_v1_dci_product_accounts Check Dual Investment accounts(USER_DATA) — Check Dual Investment accounts Weight(IP): 1 Returns: { totalAmountInBTC: string, totalAmountInUSDT: string }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ## Write ### post_api_v3_order_test Test New Order (TRADE) — Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `type` (string, required): Order type - `timeInForce` (string, optional): Order time in force - `quantity` (number, optional): Order quantity - `quoteOrderQty` (number, optional): Quote quantity - `price` (number, optional): Order price - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `strategyId` (number, optional): query parameter: strategyId (number) - `strategyType` (number, optional): The value cannot be less than 1000000. - `stopPrice` (number, optional): Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. - `trailingDelta` (number, optional): Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. - `icebergQty` (number, optional): Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. - `newOrderRespType` (string, optional): Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `computeCommissionRates` (boolean, optional): Default: false - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_order New Order (TRADE) — Send in a new order. - `LIMIT_MAKER` are `LIMIT` orders that will be rejected if they would immediately match and trade as a taker. - `STOP_LOSS` and `TAKE_PROFIT` will execute a `MARKET` order when the `stopPrice` is reached. - Any `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by sending an `icebergQty`. - Any order with an `icebergQty` MUST have `timeInForce` set to `GTC`. - `MARKET` orders using `quantity` specifies how much a user wants to buy or sell based on the market price. - `MARKET` orders using `quoteOrderQty` specifies the amount the user want PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `type` (string, required): Order type - `timeInForce` (string, optional): Order time in force - `quantity` (number, optional): Order quantity - `quoteOrderQty` (number, optional): Quote quantity - `price` (number, optional): Order price - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `strategyId` (number, optional): query parameter: strategyId (number) - `strategyType` (number, optional): The value cannot be less than 1000000. - `stopPrice` (number, optional): Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. - `trailingDelta` (number, optional): Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. - `icebergQty` (number, optional): Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. - `newOrderRespType` (string, optional): Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_api_v3_order Cancel Order (TRADE) — Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 Returns: { symbol: string, origClientOrderId: string, orderId: number, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `orderId` (number, optional): Order id - `origClientOrderId` (string, optional): Order id from client - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `cancelRestrictions` (string, optional): query parameter: cancelRestrictions ("ONLY_NEW" | "ONLY_PARTIALLY_FILLED") - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_order_cancel_replace Cancel an Existing Order and Send a New Order (Trade) — Cancels an existing order and places a new order on the same symbol. Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs. A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1. Weight(IP): 1 Returns: { cancelResult: string, newOrderResult: string, cancelResponse: { symbol: string, origClientOrderId: string, orderId: number, orderListId: number, clientOrderId: string, price: string, ... }, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `type` (string, required): Order type - `cancelReplaceMode` (string, required): - `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails. - `cancelRestrictions` (string, optional): query parameter: cancelRestrictions ("ONLY_NEW" | "ONLY_PARTIALLY_FILLED") - `timeInForce` (string, optional): Order time in force - `quantity` (number, optional): Order quantity - `quoteOrderQty` (number, optional): Quote quantity - `price` (number, optional): Order price - `cancelNewClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `cancelOrigClientOrderId` (string, optional): Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. - `cancelOrderId` (number, optional): Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `strategyId` (number, optional): query parameter: strategyId (number) - `strategyType` (number, optional): The value cannot be less than 1000000. - `stopPrice` (number, optional): Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. - `trailingDelta` (number, optional): Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. - `icebergQty` (number, optional): Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. - `newOrderRespType` (string, optional): Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_api_v3_open_orders Cancel all Open Orders on a Symbol (TRADE) — Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_order_list_oco New Order list - OCO (TRADE) — Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other. - An `OCO` has 2 orders called the above order and below order. - One of the orders must be a `LIMIT_MAKER` order and the other must be `STOP_LOSS` or`STOP_LOSS_LIMIT` order. - Price restrictions: - If the `OCO` is on the `SELL` side: `LIMIT_MAKER` price > Last Traded Price > stopPrice - If the `OCO` is on the `BUY` side: `LIMIT_MAKER` price < Last Traded Price < stopPrice - OCOs add 2 orders to the unfilled order count, `EXCHANGE_MAX_ORDERS` filter, and the PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `listClientOrderId` (string, optional): Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `aboveClientOrderId` and the `belowCLientOrderId`. - `side` (string, required): query parameter: side ("SELL" | "BUY") - `quantity` (number, required): query parameter: quantity (number) - `aboveType` (string, required): Supported values : `STOP_LOSS_LIMIT`, `STOP_LOSS`, `LIMIT_MAKER` - `aboveClientOrderId` (string, optional): Arbitrary unique ID among open orders for the above order. Automatically generated if not sent - `aboveIcebergQty` (number, optional): Note that this can only be used if `aboveTimeInForce` is `GTC`. - `abovePrice` (number, optional): query parameter: abovePrice (number) - `aboveStopPrice` (number, optional): Can be used if `aboveType` is `STOP_LOSS` or `STOP_LOSS_LIMIT`. Either `aboveStopPrice` or `aboveTrailingDelta` or both, must be specified. - `aboveTrailingDelta` (number, optional): query parameter: aboveTrailingDelta (number) - `aboveTimeInForce` (string, optional): Required if the `aboveType` is `STOP_LOSS_LIMIT`. - `aboveStrategyId` (number, optional): Arbitrary numeric value identifying the above order within an order strategy. - `aboveStrategyType` (number, optional): Arbitrary numeric value identifying the above order strategy. Values smaller than 1000000 are reserved and cannot be used. - `belowType` (string, required): Supported values : `STOP_LOSS_LIMIT`, `STOP_LOSS`, `LIMIT_MAKER` - `belowClientOrderId` (string, optional): Arbitrary unique ID among open orders for the below order. Automatically generated if not sent - `belowIcebergQty` (number, optional): Note that this can only be used if `belowTimeInForce` is `GTC`. - `belowPrice` (number, optional): Can be used if `belowType` is `STOP_LOSS_LIMIT` or `LIMIT_MAKER` to specify the limit price. - `belowStopPrice` (number, optional): Can be used if `belowType` is `STOP_LOSS` or `STOP_LOSS_LIMIT`. Either `belowStopPrice` or `belowTrailingDelta` or both, must be specified. - `belowTrailingDelta` (number, optional): query parameter: belowTrailingDelta (number) - `belowTimeInForce` (string, optional): Required if the `belowType` is `STOP_LOSS_LIMIT`. - `belowStrategyId` (number, optional): Arbitrary numeric value identifying the below order within an order strategy. - `belowStrategyType` (number, optional): Arbitrary numeric value identifying the below order strategy. Values smaller than 1000000 are reserved and cannot be used. - `newOrderRespType` (string, optional): Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_order_list_oto New Order List - OTO (TRADE) — Places an `OTO`. - An `OTO` (One-Triggers-the-Other) is an order list comprised of 2 orders. - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The second order is called the pending order. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets fully filled. - If either the working order or the pending order is cancelled individually, the other order in the order l PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `listClientOrderId` (string, optional): Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. - `newOrderRespType` (string, optional): Set the response JSON. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `workingType` (string, required): Supported values: LIMIT,LIMIT_MAKER - `workingSide` (string, required): BUY,SELL - `workingClientOrderId` (string, optional): Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. - `workingPrice` (number, required): query parameter: workingPrice (number) - `workingQuantity` (number, required): Sets the quantity for the working order. - `workingIcebergQty` (number, required): This can only be used if workingTimeInForce is GTC. - `workingTimeInForce` (string, optional): GTC, IOC, FOK - `workingStrategyId` (number, optional): Arbitrary numeric value identifying the working order within an order strategy. - `workingStrategyType` (number, optional): Arbitrary numeric value identifying the working order strategy. Values smaller than 1000000 are reserved and cannot be used. - `pendingType` (string, required): Supported values: Order Types Note that MARKET orders using quoteOrderQty are not supported. - `pendingSide` (string, required): BUY,SELL - `pendingClientOrderId` (string, optional): Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. - `pendingPrice` (number, optional): query parameter: pendingPrice (number) - `pendingStopPrice` (number, optional): query parameter: pendingStopPrice (number) - `pendingTrailingDelta` (number, optional): query parameter: pendingTrailingDelta (number) - `pendingQuantity` (number, required): Sets the quantity for the pending order. - `pendingIcebergQty` (number, optional): This can only be used if pendingTimeInForce is GTC. - `pendingTimeInForce` (string, optional): GTC, IOC, FOK - `pendingStrategyId` (number, optional): Arbitrary numeric value identifying the pending order within an order strategy. - `pendingStrategyType` (number, optional): Arbitrary numeric value identifying the pending order strategy. Values smaller than 1000000 are reserved and cannot be used. - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_order_list_otoco New Order List - OTOCO (TRADE) — Place an `OTOCO`. - An `OTOCO` (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the `OTO`. - `OTOCO` has 2 pending orders (pending above and pending below), forming an `OCO` pair. The pending orders are only placed on the order book when the working order gets fully filled. - The rules of the pending above and pending below follow the same rule PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `listClientOrderId` (string, optional): Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. - `newOrderRespType` (string, optional): Set the response JSON. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `workingType` (string, required): Supported values: LIMIT,LIMIT_MAKER - `workingSide` (string, required): BUY,SELL - `workingClientOrderId` (string, optional): Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. - `workingPrice` (number, required): query parameter: workingPrice (number) - `workingQuantity` (number, required): Sets the quantity for the working order. - `workingIcebergQty` (number, required): This can only be used if workingTimeInForce is GTC. - `workingTimeInForce` (string, optional): GTC, IOC, FOK - `workingStrategyId` (number, optional): Arbitrary numeric value identifying the working order within an order strategy. - `workingStrategyType` (number, optional): Arbitrary numeric value identifying the working order strategy. Values smaller than 1000000 are reserved and cannot be used. - `pendingSide` (string, required): BUY,SELL - `pendingQuantity` (number, required): Sets the quantity for the pending order. - `pendingAboveType` (string, required): Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT - `pendingAboveClientOrderId` (string, optional): Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. - `pendingAbovePrice` (number, optional): query parameter: pendingAbovePrice (number) - `pendingAboveStopPrice` (number, optional): query parameter: pendingAboveStopPrice (number) - `pendingAboveTrailingDelta` (number, optional): query parameter: pendingAboveTrailingDelta (number) - `pendingAboveIcebergQty` (number, optional): This can only be used if pendingAboveTimeInForce is GTC. - `pendingAboveTimeInForce` (string, optional): query parameter: pendingAboveTimeInForce ("GTC" | "IOC" | "FOK") - `pendingAboveStrategyId` (number, optional): Arbitrary numeric value identifying the pending above order within an order strategy. - `pendingAboveStrategyType` (number, optional): Arbitrary numeric value identifying the pending above order strategy. Values smaller than 1000000 are reserved and cannot be used. - `pendingBelowType` (string, optional): Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT - `pendingBelowClientOrderId` (string, optional): Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. - `pendingBelowPrice` (number, optional): query parameter: pendingBelowPrice (number) - `pendingBelowStopPrice` (number, optional): query parameter: pendingBelowStopPrice (number) - `pendingBelowTrailingDelta` (number, optional): query parameter: pendingBelowTrailingDelta (number) - `pendingBelowIcebergQty` (number, optional): This can only be used if pendingBelowTimeInForce is GTC. - `pendingBelowTimeInForce` (string, optional): query parameter: pendingBelowTimeInForce ("GTC" | "IOC" | "FOK") - `pendingBelowStrategyId` (number, optional): Arbitrary numeric value identifying the pending below order within an order strategy. - `pendingBelowStrategyType` (number, optional): Arbitrary numeric value identifying the pending below order strategy. Values smaller than 1000000 are reserved and cannot be used. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_api_v3_order_list [DISCOVERY] Cancel OCO (TRADE) — Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 Returns: { orderListId: number, contingencyType: string, listStatusType: string, ... }. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `orderListId` (number, optional): Order list id - `listClientOrderId` (string, optional): A unique Id for the entire orderList - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_sor_order New order using SOR (TRADE) — Weight(IP): 6 Returns: { symbol: string, orderId: number, orderListId: number, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `type` (string, required): Order type - `timeInForce` (string, optional): Order time in force - `quantity` (number, required): query parameter: quantity (number) - `price` (number, optional): query parameter: price (number) - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `strategyId` (number, optional): query parameter: strategyId (number) - `strategyType` (number, optional): The value cannot be less than 1000000. - `icebergQty` (number, optional): Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. - `newOrderRespType` (string, optional): Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_sor_order_test Test new order using SOR (TRADE) — Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `type` (string, required): Order type - `timeInForce` (string, optional): Order time in force - `quantity` (number, required): query parameter: quantity (number) - `price` (number, optional): query parameter: price (number) - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `strategyId` (number, optional): query parameter: strategyId (number) - `strategyType` (number, optional): The value cannot be less than 1000000. - `icebergQty` (number, optional): Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. - `newOrderRespType` (string, optional): Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `computeCommissionRates` (boolean, optional): Default: false - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_borrow_repay Margin account borrow/repay(MARGIN) — Margin account borrow/repay(MARGIN) Weight(UID): 3000 Returns: { tranId: number }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `asset` (string, required): query parameter: asset (string) - `isIsolated` (string, required): TRUE for isolated margin, FALSE for crossed margin - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `amount` (number, required): query parameter: amount (number) - `type` (string, required): BORROW or REPAY - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_order Margin Account New Order (TRADE) — Post a new order for margin account. Weight(UID): 6 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `side` (string, required): query parameter: side ("SELL" | "BUY") - `type` (string, required): Order type - `quantity` (number, required): query parameter: quantity (number) - `quoteOrderQty` (number, optional): Quote quantity - `price` (number, optional): Order price - `stopPrice` (number, optional): Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `icebergQty` (number, optional): Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. - `newOrderRespType` (string, optional): Set the response JSON. - `sideEffectType` (string, optional): Default `NO_SIDE_EFFECT` - `timeInForce` (string, optional): Order time in force - `autoRepayAtCancel` (boolean, required): query parameter: autoRepayAtCancel (boolean) - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_sapi_v1_margin_order Margin Account Cancel Order (TRADE) — Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 Returns: { symbol: string, orderId: number, origClientOrderId: string, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `orderId` (number, optional): Order id - `origClientOrderId` (string, optional): Order id from client - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_sapi_v1_margin_open_orders Margin Account Cancel all Open Orders on a Symbol (TRADE) — - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_order_oco Margin Account New OCO (TRADE) — Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6 Returns: { orderListId: number, contingencyType: string, listStatusType: string, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `listClientOrderId` (string, optional): A unique Id for the entire orderList - `side` (string, required): query parameter: side ("SELL" | "BUY") - `quantity` (number, required): query parameter: quantity (number) - `limitClientOrderId` (string, optional): A unique Id for the limit order - `price` (number, required): Order price - `limitIcebergQty` (number, optional): query parameter: limitIcebergQty (number) - `stopClientOrderId` (string, optional): A unique Id for the stop loss/stop loss limit leg - `stopPrice` (number, required): query parameter: stopPrice (number) - `stopLimitPrice` (number, optional): If provided, stopLimitTimeInForce is required. - `stopIcebergQty` (number, optional): query parameter: stopIcebergQty (number) - `stopLimitTimeInForce` (string, optional): query parameter: stopLimitTimeInForce ("GTC" | "FOK" | "IOC") - `newOrderRespType` (string, optional): Set the response JSON. - `sideEffectType` (string, optional): Default `NO_SIDE_EFFECT` - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_sapi_v1_margin_order_list [DISCOVERY] Margin Account Cancel OCO (TRADE) — Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1 Returns: { orderListId: number, contingencyType: string, listStatusType: string, ... }. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `orderListId` (number, optional): Order list id - `listClientOrderId` (string, optional): A unique Id for the entire orderList - `newClientOrderId` (string, optional): Used to uniquely identify this cancel. Automatically generated by default - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_isolated_account Enable Isolated Margin Account (TRADE) — Enable isolated margin account for a specific symbol. Weight(UID): 300 Returns: { success: boolean, symbol: string }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_sapi_v1_margin_isolated_account Disable Isolated Margin Account (TRADE) — Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 Returns: { success: boolean, symbol: string }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_bnb_burn Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) — - "spotBNBBurn" and "interestBNBBurn" should be sent at least one. Weight(IP): 1 Returns: { spotBNBBurn: boolean, interestBNBBurn: boolean }. **Parameters:** - `spotBNBBurn` (string, optional): Determines whether to use BNB to pay for trading fees on SPOT - `interestBNBBurn` (string, optional): Determines whether to use BNB to pay for margin loan's interest - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_manual_liquidation Margin manual liquidation(MARGIN) — Margin manual liquidation Weight(UID): 3000 **Parameters:** - `type` (string, required): query parameter: type ("MARGIN" | "ISOLATED") - `symbol` (string, optional): query parameter: symbol (string) - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_order_oto Margin Account New OTO (TRADE) — Post a new `OTO` order for margin account: - An `OTO` (One-Triggers-the-Other) is an order list comprised of 2 orders - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The second order is called the pending order. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets fully filled. - If either the working order or the pending order is cancelled individually, the PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `listClientOrderId` (string, optional): Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. - `newOrderRespType` (string, optional): Set the response JSON. - `sideEffectType` (string, optional): Default `NO_SIDE_EFFECT` - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `autoRepayAtCancel` (boolean, optional): Only when MARGIN_BUY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true - `workingType` (string, required): Supported values: LIMIT,LIMIT_MAKER - `workingSide` (string, required): BUY,SELL - `workingClientOrderId` (string, optional): Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. - `workingPrice` (number, required): query parameter: workingPrice (number) - `workingQuantity` (number, required): Sets the quantity for the working order. - `workingIcebergQty` (number, required): This can only be used if workingTimeInForce is GTC. - `workingTimeInForce` (string, optional): GTC, IOC, FOK - `pendingType` (string, required): Supported values: Order Types Note that MARKET orders using quoteOrderQty are not supported. - `pendingSide` (string, required): BUY,SELL - `pendingClientOrderId` (string, optional): Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. - `pendingPrice` (number, optional): query parameter: pendingPrice (number) - `pendingStopPrice` (number, optional): query parameter: pendingStopPrice (number) - `pendingTrailingDelta` (number, optional): query parameter: pendingTrailingDelta (number) - `pendingQuantity` (number, required): Sets the quantity for the pending order. - `pendingIcebergQty` (number, optional): This can only be used if pendingTimeInForce is GTC. - `pendingTimeInForce` (string, optional): GTC, IOC, FOK - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_order_otoco Margin Account New OTOCO (TRADE) — Post a new `OTOCO` order for margin account: - An `OTOCO` (One-Triggers-the-Other-Cancel-the-Other) is an order list comprised of 3 orders - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the `OTO`. - `OTOCO` has 2 pending orders (pending above and pending below), forming an `OCO` pair. The pending orders are only placed on the order book when the working order gets fully filled. - The rules of the pending above and p PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `isIsolated` (string, optional): * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin - `sideEffectType` (string, optional): Default `NO_SIDE_EFFECT` - `autoRepayAtCancel` (boolean, optional): Only when MARGIN_BUY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true - `listClientOrderId` (string, optional): Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. - `newOrderRespType` (string, optional): Set the response JSON. - `selfTradePreventionMode` (string, optional): The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. - `workingType` (string, required): Supported values: LIMIT,LIMIT_MAKER - `workingSide` (string, required): BUY,SELL - `workingClientOrderId` (string, optional): Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. - `workingPrice` (number, required): query parameter: workingPrice (number) - `workingQuantity` (number, required): Sets the quantity for the working order. - `workingIcebergQty` (number, required): This can only be used if workingTimeInForce is GTC. - `workingTimeInForce` (string, optional): GTC, IOC, FOK - `pendingSide` (string, required): BUY,SELL - `pendingQuantity` (number, required): Sets the quantity for the pending order. - `pendingAboveType` (string, required): Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT - `pendingAboveClientOrderId` (string, optional): Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. - `pendingAbovePrice` (number, optional): query parameter: pendingAbovePrice (number) - `pendingAboveStopPrice` (number, optional): query parameter: pendingAboveStopPrice (number) - `pendingAboveTrailingDelta` (number, optional): query parameter: pendingAboveTrailingDelta (number) - `pendingAboveIcebergQty` (number, optional): This can only be used if pendingAboveTimeInForce is GTC. - `pendingAboveTimeInForce` (string, optional): query parameter: pendingAboveTimeInForce ("GTC" | "IOC" | "FOK") - `pendingBelowType` (string, optional): Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT - `pendingBelowClientOrderId` (string, optional): Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. - `pendingBelowPrice` (number, optional): query parameter: pendingBelowPrice (number) - `pendingBelowStopPrice` (number, optional): query parameter: pendingBelowStopPrice (number) - `pendingBelowTrailingDelta` (number, optional): query parameter: pendingBelowTrailingDelta (number) - `pendingBelowIcebergQty` (number, optional): This can only be used if pendingBelowTimeInForce is GTC. - `pendingBelowTimeInForce` (string, optional): query parameter: pendingBelowTimeInForce ("GTC" | "IOC" | "FOK") - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_margin_max_leverage Adjust cross margin max leverage (USER_DATA) — Adjust cross margin max leverage Weight(UID): 3000 Returns: { success: boolean }. **Parameters:** - `maxLeverage` (number, required): Can only adjust 3 or 5 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_account_disable_fast_withdraw_switch Disable Fast Withdraw Switch (USER_DATA) — - This request will disable fastwithdraw switch under your account. - You need to enable "trade" option for the api key which requests this endpoint. Weight(IP): 1 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_account_enable_fast_withdraw_switch Enable Fast Withdraw Switch (USER_DATA) — - This request will enable fastwithdraw switch under your account. You need to enable "trade" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight(IP): 1 **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_capital_withdraw_apply Withdraw (USER_DATA) — Submit a withdraw request. - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. Weight(IP): 1 Returns: { id: string }. **Parameters:** - `coin` (string, required): Coin name - `withdrawOrderId` (string, optional): Client id for withdraw - `network` (string, optional): query parameter: network (string) - `address` (string, required): query parameter: address (string) - `addressTag` (string, optional): Secondary address identifier for coins like XRP,XMR etc. - `amount` (number, required): query parameter: amount (number) - `transactionFeeFlag` (boolean, optional): When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. - `name` (string, optional): query parameter: name (string) - `walletType` (number, optional): The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_asset_dust_btc Get Assets That Can Be Converted Into BNB (USER_DATA) — Weight(IP): 1 Returns: { details: { asset: string, assetFullName: string, amountFree: string, toBTC: string, toBNB: string, toBNBOffExchange: string, ... }[], totalTransferBtc: string, totalTransferBNB: string, ... }. **Parameters:** - `accountType` (string, optional): SPOT or MARGIN, default SPOT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_asset_dust Dust Transfer (USER_DATA) — Convert dust assets to BNB. Weight(UID): 10 Returns: { totalServiceCharge: string, totalTransfered: string, transferResult: { amount: string, fromAsset: string, operateTime: number, serviceChargeAmount: string, tranId: number, transferedAmount: string }[] }. **Parameters:** - `asset` (array, required): The asset being converted. For example, asset=BTC&asset=USDT - `accountType` (string, optional): SPOT or MARGIN, default SPOT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_asset_transfer User Universal Transfer (USER_DATA) — You need to enable `Permits Universal Transfer` option for the api key which requests this endpoint. - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN ENUM of transfer types: - MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account - MAIN_CMFUTURE Spot account transfer to COIN-M Futures account - MAIN_MARGIN Spot account transfer to Margin(cross)account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot **Parameters:** - `type` (string, required): Universal transfer type - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `fromSymbol` (string, optional): Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` (string, optional): Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_asset_get_funding_asset Funding Wallet (USER_DATA) — - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `needBtcValuation` (string, optional): query parameter: needBtcValuation ("true" | "false") - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v3_asset_get_user_asset User Asset (USER_DATA) — Get user assets, just for positive data. Weight(IP): 5 **Parameters:** - `asset` (string, optional): query parameter: asset (string) - `needBtcValuation` (string, optional): query parameter: needBtcValuation ("true" | "false") - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_asset_convert_transfer Convert Transfer (USER_DATA) — Convert transfer, convert between BUSD and stablecoins. If the clientId has been used before, will not do the convert transfer, the original transfer will be returned. Weight(UID): 5 Returns: { tranId: number, status: string }. **Parameters:** - `clientTranId` (string, required): The unique flag, the min length is 20 - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `targetAsset` (string, required): Target asset you want to convert - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_capital_contract_convertible_coins [DISCOVERY] Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) — User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' **Parameters:** - `coin` (string, required): Must be USDC, USDP or TUSD - `enable` (boolean, required): true: turn on the auto-conversion. false: turn off the auto-conversion ### post_sapi_v1_sub_account_virtual_sub_account Create a Virtual Sub-account(For Master Account) — - This request will generate a virtual sub account under your master account. - You need to enable "trade" option for the api key which requests this endpoint. Weight(IP): 1 Returns: { email: string }. **Parameters:** - `subAccountString` (string, required): Please input a string. We will create a virtual email using that string for you to register - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_futures_internal_transfer Sub-account Futures Asset Transfer (For Master Account) — - Master account can transfer max 2000 times a minute Weight(IP): 1 Returns: { success: boolean, txnId: string }. **Parameters:** - `fromEmail` (string, required): Sender email - `toEmail` (string, required): Recipient email - `futuresType` (number, required): 1:USDT-margined Futures,2: Coin-margined Futures - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_capital_deposit_credit_apply One click arrival deposit apply (USER_DATA) — Apply deposit credit for expired address (One click arrival) Weight(IP): 1 Returns: { code: string, message: string, data: boolean, ... }. **Parameters:** - `depositId` (number, optional): Deposit record Id, priority use - `txId` (string, optional): Deposit txId, used when depositId is not specified - `subAccountId` (number, optional): query parameter: subAccountId (number) - `subUserId` (number, optional): query parameter: subUserId (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_margin_enable Enable Margin for Sub-account (For Master Account) — Weight(IP): 1 Returns: { email: string, isMarginEnabled: boolean }. **Parameters:** - `email` (string, required): Sub-account email - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_futures_enable Enable Futures for Sub-account (For Master Account) — Weight(IP): 1 Returns: { email: string, isFuturesEnabled: boolean }. **Parameters:** - `email` (string, required): Sub-account email - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_futures_transfer Transfer for Sub-account (For Master Account) — Weight(IP): 1 Returns: { txnId: string }. **Parameters:** - `email` (string, required): Sub-account email - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `type` (number, required): * `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_margin_transfer Margin Transfer for Sub-account (For Master Account) — Weight(IP): 1 Returns: { txnId: string }. **Parameters:** - `email` (string, required): Sub-account email - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `type` (number, required): * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_transfer_sub_to_sub Transfer to Sub-account of Same Master (For Sub-account) — Weight(IP): 1 Returns: { txnId: string }. **Parameters:** - `toEmail` (string, required): Recipient email - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_transfer_sub_to_master Transfer to Master (For Sub-account) — Weight(IP): 1 Returns: { txnId: string }. **Parameters:** - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_universal_transfer Universal Transfer (For Master Account) — - You need to enable "internal transfer" option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN - Sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN transfer to master account SPOT - Transfer between two sub-account SPOT accounts Weight(IP): 1 Returns: { tranId: number, **Parameters:** - `fromEmail` (string, optional): Sub-account email - `toEmail` (string, optional): Sub-account email - `fromAccountType` (string, required): query parameter: fromAccountType ("SPOT" | "USDT_FUTURE" | "COIN_FUTURE" | "MARGIN" | "ISOLATED_MARGIN") - `toAccountType` (string, required): query parameter: toAccountType ("SPOT" | "USDT_FUTURE" | "COIN_FUTURE" | "MARGIN" | "ISOLATED_MARGIN") - `clientTranId` (string, optional): query parameter: clientTranId (string) - `symbol` (string, optional): Only supported under ISOLATED_MARGIN type - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_blvt_enable Enable Leverage Token for Sub-account (For Master Account) — Weight(IP): 1 Returns: { email: string, enableBlvt: boolean }. **Parameters:** - `email` (string, required): Sub-account email - `enableBlvt` (boolean, required): Only true for now - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_managed_subaccount_deposit Deposit assets into the managed sub-account(For Investor Master Account) — Weight(IP): 1 Returns: { tranId: number }. **Parameters:** - `toEmail` (string, required): Recipient email - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_managed_subaccount_withdraw Withdrawl assets from the managed sub-account(For Investor Master Account) — Weight(IP): 1 Returns: { tranId: number }. **Parameters:** - `fromEmail` (string, required): Sender email - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `transferDate` (number, optional): Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_sapi_v1_sub_account_sub_account_api_ip_restriction_ip Delete IP List for a Sub-account API Key (For Master Account) — Weight(UID): 3000 Returns: { ipRestrict: string, ipList: string[], updateTime: number, ... }. **Parameters:** - `email` (string, required): Sub-account email - `subAccountApiKey` (string, required): query parameter: subAccountApiKey (string) - `ipAddress` (string, optional): Can be added in batches, separated by commas - `thirdPartyName` (string, optional): third party IP list name - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_sub_account_eoptions_enable Enable Options for Sub-account (For Master Account)(USER_DATA) — Enable Options for Sub-account (For Master Account). Weight(IP): 1 Returns: { email: string, isEOptionsEnabled: boolean }. **Parameters:** - `email` (string, required): query parameter: email (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v2_sub_account_sub_account_api_ip_restriction Update IP Restriction for Sub-Account API key (For Master Account) — Update IP Restriction for Sub-Account API key Weight(UID): 3000 Returns: { status: string, ipList: string[], updateTime: number, ... }. **Parameters:** - `email` (string, required): Sub-account email - `subAccountApiKey` (string, required): query parameter: subAccountApiKey (string) - `status` (string, required): IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only - `thirdPartyName` (string, optional): third party IP list name - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_api_v3_user_data_stream Create a ListenKey (USER_STREAM) — 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: 2 Returns: { listenKey: string }. _No parameters required._ ### put_api_v3_user_data_stream Ping/Keep-alive a ListenKey (USER_STREAM) — 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 30 minutes. Weight: 2 **Parameters:** - `listenKey` (string, optional): User websocket listen key ### delete_api_v3_user_data_stream Close a ListenKey (USER_STREAM) — Close out a user data stream. Weight: 2 **Parameters:** - `listenKey` (string, optional): User websocket listen key ### post_sapi_v1_user_data_stream Create a ListenKey (USER_STREAM) — 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: 1 Returns: { listenKey: string }. _No parameters required._ ### put_sapi_v1_user_data_stream Ping/Keep-alive a ListenKey (USER_STREAM) — 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 30 minutes. Weight: 1 **Parameters:** - `listenKey` (string, optional): User websocket listen key ### delete_sapi_v1_user_data_stream Close a ListenKey (USER_STREAM) — Close out a user data stream. Weight: 1 **Parameters:** - `listenKey` (string, optional): User websocket listen key ### post_sapi_v1_user_data_stream_isolated Generate a Listen Key (USER_STREAM) — 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: 1 Returns: { listenKey: string }. _No parameters required._ ### put_sapi_v1_user_data_stream_isolated Ping/Keep-alive a Listen Key (USER_STREAM) — 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 30 minutes. Weight: 1 **Parameters:** - `listenKey` (string, optional): User websocket listen key ### delete_sapi_v1_user_data_stream_isolated Close a ListenKey (USER_STREAM) — Close out a user data stream. Weight: 1 **Parameters:** - `listenKey` (string, optional): User websocket listen key ### post_sapi_v1_lending_customized_fixed_purchase Purchase Fixed/Activity Project (USER_DATA) — Weight(IP): 1 Returns: { purchaseId: string }. **Parameters:** - `projectId` (string, required): query parameter: projectId (string) - `lot` (string, required): query parameter: lot (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_lending_position_changed Change Fixed/Activity Position to Daily Position (USER_DATA) — - PositionId is mandatory parameter for fixed position. Weight(IP): 1 Returns: { dailyPurchaseId: number, success: boolean, time: number }. **Parameters:** - `projectId` (string, required): query parameter: projectId (string) - `lot` (string, required): query parameter: lot (string) - `positionId` (string, optional): query parameter: positionId (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_mining_hash_transfer_config Hashrate Resale Request (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: number }. **Parameters:** - `userName` (string, required): Mining Account - `algo` (string, required): Algorithm(sha256) - `startDate` (string, optional): Search date, millisecond timestamp, while empty query all - `endDate` (string, optional): Search date, millisecond timestamp, while empty query all - `toPoolUser` (string, required): Mining Account - `hashRate` (string, required): Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_mining_hash_transfer_config_cancel Cancel Hashrate Resale configuration (USER_DATA) — Weight(IP): 5 Returns: { code: number, msg: string, data: boolean }. **Parameters:** - `configId` (string, required): Mining ID - `userName` (string, required): Mining Account - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_futures_transfer New Future Account Transfer (USER_DATA) — Execute transfer between spot account and futures account. Weight(IP): 1 Returns: { tranId: number }. **Parameters:** - `asset` (string, required): query parameter: asset (string) - `amount` (number, required): query parameter: amount (number) - `type` (number, required): 1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_algo_futures_new_order_vp Volume Participation(VP) New Order (TRADE) — Send in a VP new order. Only support on USDⓈ-M Contracts. - You need to enable `Futures Trading Permission` for the api key which requests this endpoint. - Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving "success": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `positionSide` (string, optional): Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. - `quantity` (number, required): Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT - `urgency` (string, required): Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH - `clientAlgoId` (string, optional): A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value - `reduceOnly` (boolean, optional): 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position - `limitPrice` (number, optional): Limit price of the order; If it is not sent, will place order by market price by default - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_algo_futures_new_order_twap Time-Weighted Average Price(Twap) New Order (TRADE) — Send in a Twap new order. Only support on USDⓈ-M Contracts. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving "success": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/fu PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `positionSide` (string, optional): Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. - `quantity` (number, required): Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT - `duration` (number, required): Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h - `clientAlgoId` (string, optional): A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value - `reduceOnly` (boolean, optional): 'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position - `limitPrice` (number, optional): Limit price of the order; If it is not sent, will place order by market price by default - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_sapi_v1_algo_futures_order Cancel Algo Order(TRADE) — Cancel an active order. - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 Returns: { algoId: number, success: boolean, code: number, ... }. **Parameters:** - `algoId` (number, required): Eg. 14511 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_algo_spot_new_order_twap Time-Weighted Average Price (Twap) New Order — Place a new spot TWAP order with Algo service. Weight(UID): 3000 Returns: { clientAlgoId: string, success: boolean, code: number, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `symbol` (string, required): Trading symbol, e.g. BNBUSDT - `side` (string, required): query parameter: side ("SELL" | "BUY") - `quantity` (number, required): query parameter: quantity (number) - `duration` (number, required): query parameter: duration (number) - `clientAlgoId` (string, optional): query parameter: clientAlgoId (string) - `limitPrice` (number, optional): query parameter: limitPrice (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### delete_sapi_v1_algo_spot_order Cancel Algo Order — Cancel an open TWAP order Weight(IP): 1 Returns: { algoId: number, success: boolean, code: number, ... }. **Parameters:** - `algoId` (number, required): query parameter: algoId (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_portfolio_repay Portfolio Margin Bankruptcy Loan Repay (USER_DATA) — Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 Returns: { tranId: number }. **Parameters:** - `from` (string, optional): query parameter: from (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_portfolio_auto_collection Fund Auto-collection (USER_DATA) — Transfers all assets from Futures Account to Margin account Weight(IP): 1500 Returns: { msg: string }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_portfolio_bnb_transfer BNB Transfer (USER_DATA) — BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 Returns: { tranId: number }. **Parameters:** - `transferSide` (string, required): query parameter: transferSide ("TO_UM" | "FROM_UM") - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_portfolio_repay_futures_switch Change Auto-repay-futures Status (USER_DATA) — Change Auto-repay-futures Status Weight(IP): 1500 Returns: { msg: string }. **Parameters:** - `autoRepay` (boolean, required): query parameter: autoRepay (boolean) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_portfolio_repay_futures_negative_balance Repay futures Negative Balance (USER_DATA) — Repay futures Negative Balance Weight(IP): 1500 Returns: { msg: string }. **Parameters:** - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_portfolio_asset_collection Fund Collection by Asset (USER_DATA) — Transfers specific asset from Futures Account to Margin account Weight(IP): 60 Returns: { msg: string }. **Parameters:** - `asset` (string, required): query parameter: asset (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_blvt_subscribe Subscribe BLVT (USER_DATA) — Weight(IP): 1 Returns: { id: number, status: string, tokenName: string, ... }. **Parameters:** - `tokenName` (string, required): BTCDOWN, BTCUP - `cost` (number, required): Spot balance - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_blvt_redeem Redeem BLVT (USER_DATA) — Weight(IP): 1 Returns: { id: number, status: string, tokenName: string, ... }. **Parameters:** - `tokenName` (string, required): BTCDOWN, BTCUP - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_loan_vip_repay VIP Loan Repay (TRADE) — VIP loan is available for VIP users only. Weight(UID): 6000 Returns: { loanCoin: string, repayAmount: string, remainingPrincipal: string, ... }. **Parameters:** - `orderId` (number, optional): Order id - `amount` (number, required): query parameter: amount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_loan_vip_borrow VIP Loan Borrow — VIP loan is available for VIP users only. Weight(UID): 6000 Returns: { loanAccountId: string, requestId: string, loanCoin: string, ... }. **Parameters:** - `loanAccountId` (number, required): query parameter: loanAccountId (number) - `loanCoin` (string, optional): Coin loaned - `loanAmount` (number, required): query parameter: loanAmount (number) - `collateralAccountId` (string, required): query parameter: collateralAccountId (string) - `collateralCoin` (string, required): query parameter: collateralCoin (string) - `isFlexibleRate` (string, required): query parameter: isFlexibleRate ("TRUE" | "FALSE") - `loanTerm` (number, optional): query parameter: loanTerm (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_loan_vip_renew VIP Loan Renew — VIP loan is available for VIP users only. Weight(UID): 6000 Returns: { loanAccountId: string, loanCoin: string, loanAmount: string, ... }. **Parameters:** - `orderId` (number, optional): Order id - `loanTerm` (number, optional): query parameter: loanTerm (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_loan_borrow Crypto Loan Borrow (TRADE) — Weight(UID): 6000 Returns: { loanCoin: string, loanAmount: string, collateralCoin: string, ... }. **Parameters:** - `loanCoin` (string, required): Coin loaned - `loanAmount` (number, optional): Loan amount - `collateralCoin` (string, required): Coin used as collateral - `collateralAmount` (number, optional): query parameter: collateralAmount (number) - `loanTerm` (number, required): 7/14/30/90/180 days - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_loan_repay Crypto Loan Repay (TRADE) — Weight(UID): 6000 **Parameters:** - `orderId` (number, required): Order ID - `amount` (number, required): Repayment Amount - `type` (number, optional): Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'. - `collateralReturn` (boolean, optional): Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_loan_adjust_ltv Crypto Loan Adjust LTV (TRADE) — Weight(UID): 6000 Returns: { loanCoin: string, collateralCoin: string, direction: string, ... }. **Parameters:** - `orderId` (number, required): Order ID - `amount` (number, required): Amount - `direction` (string, required): 'ADDITIONAL', 'REDUCED' - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_loan_customize_margin_call Crypto Loan Customize Margin Call (TRADE) — Customize margin call for ongoing orders only. Weight(UID): 6000 Returns: { rows: { orderId: string, collateralCoin: string, preMarginCall: string, afterMarginCall: string, customizeTime: number }[], total: number }. **Parameters:** - `orderId` (number, optional): Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. - `collateralCoin` (string, optional): Coin used as collateral - `marginCall` (number, required): query parameter: marginCall (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v2_loan_flexible_borrow Borrow - Flexible Loan Borrow (TRADE) — - Only available for master account Weight(UID): 6000 Returns: { loanCoin: string, loanAmount: string, collateralCoin: string, ... }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `loanAmount` (number, optional): Loan amount - `collateralCoin` (string, optional): Coin used as collateral - `collateralAmount` (number, optional): query parameter: collateralAmount (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v2_loan_flexible_repay Repay - Flexible Loan Repay (TRADE) — - repayAmount is mandatory even fullRepayment = FALSE Weight(IP): 6000 Returns: { loanCoin: string, collateralCoin: string, remainingDebt: string, ... }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `repayAmount` (number, required): repay amount of loanCoin - `collateralReturn` (boolean, optional): Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV. - `fullRepayment` (boolean, optional): Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v2_loan_flexible_adjust_ltv Adjust LTV - Flexible Loan Adjust LTV (TRADE) — - API Key needs Spot & Margin Trading permission for this endpoint Weight(UID): 6000 Returns: { loanCoin: string, collateralCoin: string, direction: string, ... }. **Parameters:** - `loanCoin` (string, optional): Coin loaned - `collateralCoin` (string, optional): Coin used as collateral - `adjustmentAmount` (number, required): query parameter: adjustmentAmount (number) - `direction` (string, required): query parameter: direction ("ADDITIONAL" | "REDUCED") - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_convert_get_quote Send quote request (USER_DATA) — Request a quote for the requested token pairs Weight(UID): 200 Returns: { quoteId: string, ratio: string, inverseRatio: string, ... }. **Parameters:** - `fromAsset` (string, required): query parameter: fromAsset (string) - `toAsset` (string, required): query parameter: toAsset (string) - `fromAmount` (number, optional): When specified, it is the amount you will be debited after the conversion - `toAmount` (number, optional): When specified, it is the amount you will be debited after the conversion - `validTime` (string, optional): 10s, 30s, 1m, 2m, default 10s - `walletType` (string, optional): SPOT or FUNDING. Default is SPOT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_convert_accept_quote Accept Quote (TRADE) — Accept the offered quote by quote ID. Weight(UID): 500 Returns: { orderId: string, createTime: number, orderStatus: string }. **Parameters:** - `quoteId` (string, required): query parameter: quoteId (string) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_convert_limit_place_order Place limit order (USER_DATA) — Enable users to place a limit order - baseAsset or quoteAsset can be determined via exchangeInfo endpoint. - Limit price is defined from baseAsset to quoteAsset. - Either baseAmount or quoteAmount is used. Weight(UID): 500 Returns: { orderId: number, status: string }. **Parameters:** - `baseAsset` (string, required): query parameter: baseAsset (string) - `quoteAsset` (string, required): query parameter: quoteAsset (string) - `limitPrice` (number, required): Symbol limit price (from baseAsset to quoteAsset) - `baseAmount` (number, optional): Base asset amount. (One of baseAmount or quoteAmount is required) - `quoteAmount` (number, optional): Quote asset amount. (One of baseAmount or quoteAmount is required) - `side` (string, required): query parameter: side ("SELL" | "BUY") - `walletType` (string, optional): SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT. - `expiredType` (string, optional): 1_D, 3_D, 7_D, 30_D (D means day) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_convert_limit_cancel_order Cancel limit order (USER_DATA) — Enable users to cancel a limit order Weight(UID): 200 Returns: { orderId: number, status: string }. **Parameters:** - `orderId` (number, required): query parameter: orderId (number) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_giftcard_create_code Create a Binance Code (USER_DATA) — This API is for creating a Binance Code. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 Returns: { code: string, message: string, data: { referenceNo: string, code: string, expiredTime: number }, ... }. **Parameters:** - `token` (string, required): The coin type contained in the Binance Code - `amount` (number, required): The amount of the coin - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_giftcard_redeem_code Redeem a Binance Code (USER_DATA) — This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet. Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day. Weight(IP): 1 Returns: { code: string, message: string, data: { token: string, amount: string, referenceNo: string, identityNo: string }, ... }. **Parameters:** - `code` (string, required): Binance Code - `externalUid` (string, optional): Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_giftcard_buy_code Buy a Binance Code (TRADE) — This API is for buying a fixed-value Binance Code, which means your Binance Code will be redeemable to a token that is different to the token that you are paying in. If the token you’re paying and the redeemable token are the same, please use the Create Binance Code endpoint. You can use supported crypto currency or fiat token as baseToken to buy Binance Code that is redeemable to your chosen faceToken. Once successfully purchased, the amount of baseToken would be deducted from your funding wallet. To get started with, please make sure: - You have a Binance account **Parameters:** - `baseToken` (string, required): The token you want to pay, example BUSD - `faceToken` (string, required): The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. - `baseTokenAmount` (number, required): The base token asset quantity, example 1.002 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_lending_auto_invest_plan_add Investment plan creation (USER_DATA) — Post an investment plan creation Weight(IP): 1 Returns: { planId: number, nextExecutionDateTime: number }. **Parameters:** - `sourceType` (string, required): query parameter: sourceType ("MAIN_SITE" | "TR") - `requestId` (string, optional): query parameter: requestId (string) - `planType` (string, required): query parameter: planType ("SINGLE" | "PORTFOLIO" | "INDEX") - `IndexId` (number, optional): query parameter: IndexId (number) - `subscriptionAmount` (number, required): query parameter: subscriptionAmount (number) - `subscriptionCycle` (string, required): query parameter: subscriptionCycle ("H1" | "H4" | "H8" | "H12" | "WEEKLY" | "DAILY" | "MONTHLY" | "BI_WEEKLY") - `subscriptionStartDay` (number, optional): query parameter: subscriptionStartDay (number) - `subscriptionStartWeekday` (string, optional): query parameter: subscriptionStartWeekday ("MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN") - `subscriptionStartTime` (number, required): query parameter: subscriptionStartTime (number) - `sourceAsset` (string, required): query parameter: sourceAsset (string) - `flexibleAllowedToUse` (boolean, optional): query parameter: flexibleAllowedToUse (boolean) - `details` (array, required): query parameter: details ({ targetAsset: string, percentage: number }[]) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_lending_auto_invest_plan_edit Investment plan adjustment — Query Source Asset to be used for investment Weight(IP): 1 Returns: { planId: number, nextExecutionDateTime: number }. **Parameters:** - `planId` (number, required): query parameter: planId (number) - `subscriptionAmount` (number, required): query parameter: subscriptionAmount (number) - `subscriptionCycle` (string, required): query parameter: subscriptionCycle ("H1" | "H4" | "H8" | "H12" | "WEEKLY" | "DAILY" | "MONTHLY" | "BI_WEEKLY") - `subscriptionStartDay` (number, optional): query parameter: subscriptionStartDay (number) - `subscriptionStartWeekday` (string, optional): query parameter: subscriptionStartWeekday ("MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN") - `subscriptionStartTime` (number, required): query parameter: subscriptionStartTime (number) - `sourceAsset` (string, required): query parameter: sourceAsset (string) - `flexibleAllowedToUse` (boolean, optional): query parameter: flexibleAllowedToUse (boolean) - `details` (array, optional): query parameter: details ({ targetAsset: string, percentage: number }[]) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_lending_auto_invest_plan_edit_status Change Plan Status — Change Plan Status Weight(IP): 1 Returns: { planId: number, nextExecutionDateTime: number, status: string }. **Parameters:** - `planId` (number, required): query parameter: planId (number) - `status` (string, required): query parameter: status ("ONGOING" | "PAUSED" | "REMOVED") - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_lending_auto_invest_one_off One Time Transaction(TRADE) — One time transaction Weight(IP): 1 Returns: { transactionId: number, waitSecond: number }. **Parameters:** - `sourceType` (string, required): query parameter: sourceType (string) - `requestId` (string, optional): query parameter: requestId (string) - `subscriptionAmount` (number, required): query parameter: subscriptionAmount (number) - `sourceAsset` (string, required): query parameter: sourceAsset (string) - `flexibleAllowedToUse` (boolean, optional): query parameter: flexibleAllowedToUse (boolean) - `planId` (number, optional): query parameter: planId (number) - `indexId` (number, optional): query parameter: indexId (number) - `details` (array, optional): query parameter: details ({ targetAsset: string, percentage: number }[]) - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_lending_auto_invest_redeem Index Linked Plan Redemption (TRADE) — To redeem index-Linked plan holdings Weight(IP): 1 Returns: { redemptionId: number }. **Parameters:** - `indexId` (number, required): PORTFOLIO plan's Id - `requestId` (string, optional): sourceType + unique, transactionId and requestId cannot be empty at the same time - `redemptionPercentage` (number, required): user redeem percentage,10/20/100. - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v2_eth_staking_eth_stake Subscribe ETH Staking V2(TRADE) — Stake ETH to get WBETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 Returns: { success: boolean, wbethAmount: string, conversionRatio: string }. **Parameters:** - `amount` (number, required): Amount in ETH, limit 4 decimals - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_eth_staking_eth_redeem Redeem ETH (TRADE) — Redeem WBETH or BETH and get ETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 Returns: { success: boolean, arrivalTime: number, ethAmount: string, ... }. **Parameters:** - `asset` (string, optional): WBETH or BETH, default to BETH - `amount` (number, required): Amount in BETH, limit 8 decimals - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_eth_staking_wbeth_wrap Wrap BETH(TRADE) — - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 Returns: { success: boolean, wbethAmount: string, exchangeRate: string }. **Parameters:** - `amount` (number, required): Amount in BETH, limit 4 decimals - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_simple_earn_flexible_subscribe Subscribe Flexible Product (TRADE) — Weight(IP): 1 Rate Limit: 1/3s per account Returns: { purchaseId: number, success: boolean }. **Parameters:** - `productId` (string, required): query parameter: productId (string) - `amount` (number, required): query parameter: amount (number) - `autoSubscribe` (boolean, optional): true or false, default true. - `sourceAccount` (string, optional): SPOT,FUND,ALL, default SPOT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_simple_earn_locked_subscribe Subscribe Locked Product (TRADE) — Weight(IP): 1 Rate Limit: 1/3s per account Returns: { purchaseId: number, positionId: string, success: boolean }. **Parameters:** - `projectId` (string, required): query parameter: projectId (string) - `amount` (number, required): query parameter: amount (number) - `autoSubscribe` (boolean, optional): true or false, default true. - `sourceAccount` (string, optional): SPOT,FUND,ALL, default SPOT - `redeemTo` (string, optional): SPOT,FLEXIBLE, default FLEXIBLE - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_simple_earn_flexible_redeem Redeem Flexible Product (TRADE) — Weight(IP): 1 Rate Limit: 1/3s per account Returns: { redeemId: number, success: boolean }. **Parameters:** - `productId` (string, required): query parameter: productId (string) - `redeemAll` (boolean, optional): true or false, default to false - `amount` (number, optional): if redeemAll is false, amount is mandatory - `destAccount` (string, optional): SPOT,FUND,ALL, default SPOT - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_simple_earn_locked_redeem Redeem Locked Product (TRADE) — Weight(IP): 1 Rate Limit: 1/3s per account Returns: { redeemId: number, success: boolean }. **Parameters:** - `positionId` (string, required): 1234 - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_simple_earn_flexible_set_auto_subscribe Set Flexible Auto Subscribe (USER_DATA) — Weight(IP): 150 Returns: { success: boolean }. **Parameters:** - `productId` (string, required): query parameter: productId (string) - `autoSubscribe` (boolean, required): true or false - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_simple_earn_locked_set_auto_subscribe Set Locked Auto Subscribe (USER_DATA) — Weight(IP): 150 Returns: { success: boolean }. **Parameters:** - `positionId` (string, required): query parameter: positionId (string) - `autoSubscribe` (boolean, required): true or false - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_dci_product_subscribe Subscribe Dual Investment products(USER_DATA) — Subscribe Dual Investment products - `Products are not available.` means that the APR changes to lower value, or the orders are not available. - `Failed` is a system or network errors. Weight(IP): 1 Returns: { positionId: number, investCoin: string, exercisedCoin: string, ... }. PREREQUISITE: First call exchange info or symbol listing to discover valid trading pairs, then query market data. **Parameters:** - `id` (string, required): get id from /sapi/v1/dci/product/list - `orderId` (string, required): get orderId from /sapi/v1/dci/product/list - `depositAmount` (number, required): query parameter: depositAmount (number) - `autoCompoundPlan` (string, required): NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ### post_sapi_v1_dci_product_auto_compound_edit_status Change Auto-Compound status(USER_DATA) — Change Auto-Compound status - 15:31 ~ 16:00 UTC+8 This function is disabled Weight(IP): 1 Rate Limit: Maximum 1 time/s per account Returns: { positionId: string, autoCompoundPlan: string }. **Parameters:** - `positionId` (number, required): Get positionId from /sapi/v1/dci/product/positions - `autoCompoundPlan` (string, required): NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; - `recvWindow` (number, optional): The value cannot be greater than 60000 - `timestamp` (number, required): UTC timestamp in ms - `signature` (string, required): Signature ## Usage Connect to this MCP server at `https://binance.mcp.junct.dev/mcp`. All tools are callable via the MCP protocol. Call `get_sapi_v1_system_status` first to discover valid identifiers required by other tools. Write operations like `post_api_v3_order_test` return data or calldata for agent use.