openapi: '3.0.2' info: title: Binance Public Spot API description: |- 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) version: '1.0' servers: - url: https://api.binance.com - url: https://testnet.binance.vision tags: - name: Market description: Market Data - name: Trade description: Account/Trade - name: Margin description: Margin Account/Trade - name: Wallet description: Wallet Endpoints - name: Sub-Account description: Sub-account Endpoints - name: Stream description: User Data Stream - name: Margin Stream description: Margin User Data Stream - name: Isolated Margin Stream description: Isolated User Data Stream - name: Savings description: Savings Endpoints - name: Staking description: Staking Endpoints - name: Mining description: Mining Endpoints - name: Futures description: Futures Endpoints - name: Futures Algo description: Futures Algo Endpoints - name: Spot Algo description: Spot Algo Endpoints - name: Portfolio Margin description: Portfolio Margin Endpoints - name: BLVT description: Binance Leveraged Tokens Endpoints - name: BSwap description: Binance Swap Endpoints - name: Fiat description: Fiat Endpoints - name: C2C description: Consumer-To-Consumer Endpoints - name: VIP Loans description: VIP Loans Endpoints - name: Crypto Loans description: Crypto Loans Endpoints - name: Pay description: Pay Endpoints - name: Convert description: Convert Endpoints - name: Rebate description: Rebate Endpoints - name: NFT description: NFT Endpoints - name: Gift Card description: Gift Card Endpoints - name: Auto-Invest description: Auto-Invest Endpoints - name: Simple Earn description: Simple Earn Endpoints paths: /api/v3/ping: get: operationId: ping summary: Test Connectivity description: |- Test connectivity to the Rest API. Weight(IP): 1 tags: - Market responses: '200': description: OK content: application/json: schema: type: object /api/v3/time: get: operationId: time summary: Check Server Time description: |- Test connectivity to the Rest API and get the current server time. Weight(IP): 1 tags: - Market responses: '200': description: Binance server UTC timestamp content: application/json: schema: type: object properties: serverTime: type: integer format: int64 example: 1499827319559 required: - serverTime /api/v3/exchangeInfo: get: operationId: exchange_info summary: Exchange Information description: |- 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. Weight(IP): 10 tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' - $ref: '#/components/parameters/permissions' responses: '200': description: Current exchange trading rules and symbol information content: application/json: schema: type: object properties: timezone: type: string example: UTC serverTime: type: integer format: int64 example: 1592882214236 rateLimits: type: array items: type: object properties: rateLimitType: type: string example: "REQUEST_WEIGHT" interval: type: string example: "MINUTE" intervalNum: type: integer format: int32 example: 1 limit: type: integer format: int32 example: 1200 required: - rateLimitType - interval - intervalNum - limit exchangeFilters: type: array items: type: object symbols: type: array items: type: object properties: symbol: type: string example: "ETHBTC" status: type: string example: "TRADING" baseAsset: type: string example: "ETH" baseAssetPrecision: type: integer format: int32 example: 8 quoteAsset: type: string example: "BTC" quoteAssetPrecision: type: integer format: int32 example: 8 baseCommissionPrecision: type: integer format: int32 example: 8 quoteCommissionPrecision: type: integer format: int32 example: 8 orderTypes: type: array items: type: string example: "LIMIT" icebergAllowed: type: boolean ocoAllowed: type: boolean quoteOrderQtyMarketAllowed: type: boolean allowTrailingStop: type: boolean example: false isSpotTradingAllowed: type: boolean isMarginTradingAllowed: type: boolean filters: type: array items: type: object properties: filterType: type: string example: "PRICE_FILTER" minPrice: type: string example: "0.00000100" maxPrice: type: string example: "100000.00000000" tickSize: type: string example: "0.00000100" required: - filterType - minPrice - maxPrice - tickSize permissions: type: array items: type: string example: "SPOT" defaultSelfTradePreventionMode: type: string example: "NONE" allowedSelfTradePreventionModes: type: array items: type: string example: "NONE" required: - symbol - status - baseAsset - baseAssetPrecision - quoteAsset - quoteAssetPrecision - baseCommissionPrecision - quoteCommissionPrecision - orderTypes - icebergAllowed - ocoAllowed - quoteOrderQtyMarketAllowed - allowTrailingStop - isSpotTradingAllowed - isMarginTradingAllowed - filters - permissions - defaultSelfTradePreventionMode - allowedSelfTradePreventionModes required: - timezone - serverTime - rateLimits - exchangeFilters - symbols '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/depth: get: operationId: depth summary: Order Book description: |- | Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: limit in: query description: If limit > 5000, then the response will truncate to 5000 schema: type: integer format: int32 default: 100 maximum: 5000 example: 100 responses: '200': description: Order book content: application/json: schema: type: object properties: lastUpdateId: type: integer format: int64 bids: type: array items: type: array items: type: string minItems: 2 maxItems: 2 asks: type: array items: type: array items: type: string minItems: 2 maxItems: 2 required: - lastUpdateId - bids - asks example: lastUpdateId: 1027024 bids: - - "4.00000000" - "431.00000000" asks: - - "4.00000200" - "12.00000000" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/trades: get: operationId: trades summary: Recent Trades List description: |- Get recent trades. Weight(IP): 10 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/limit' responses: '200': description: Trade list content: application/json: schema: type: array items: $ref: '#/components/schemas/trade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/historicalTrades: get: operationId: historical_trades summary: Old Trade Lookup description: |- Get older market trades. Weight(IP): 10 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/fromId' responses: '200': description: Trade list content: application/json: schema: type: array items: $ref: '#/components/schemas/trade' /api/v3/aggTrades: get: operationId: agg_trades summary: Compressed/Aggregate Trades List description: |- 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 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' responses: '200': description: Trade list content: application/json: schema: type: array items: $ref: '#/components/schemas/aggTrade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/klines: get: operationId: kline_candlestick_data summary: Kline/Candlestick Data description: |- 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 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: interval in: query required: true description: kline intervals schema: type: string enum: ['1s','1m','3m','5m','15m','30m','1h','2h','4h','6h','8h','12h','1d','3d','1w'] example: '"1m"' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' responses: '200': description: Kline data content: application/json: schema: type: array items: type: array items: oneOf: - type: integer format: int64 - type: string minItems: 12 maxItems: 12 example: - 1499040000000 - "0.01634790" - "0.80000000" - "0.01575800" - "0.01577100" - "148976.11427815" - 1499644799999 - "2434.19055334" - 308 - "1756.87402397" - "28.46694368" - "17928899.62484339" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/uiKlines: get: operationId: uiKlines summary: UIKlines description: |- 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 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: interval in: query required: true description: kline intervals schema: type: string enum: ['1s','1m','3m','5m','15m','30m','1h','2h','4h','6h','8h','12h','1d','3d','1w'] example: '"1m"' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' responses: '200': description: UIKline data content: application/json: schema: type: array items: type: array items: oneOf: - type: integer format: int64 - type: string minItems: 12 maxItems: 12 example: - 1499040000000 - "0.01634790" - "0.80000000" - "0.01575800" - "0.01577100" - "148976.11427815" - 1499644799999 - "2434.19055334" - 308 - "1756.87402397" - "28.46694368" - "0" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/avgPrice: get: operationId: avg_price summary: Current Average Price description: |- Current average price for a symbol. Weight(IP): 2 tags: - Market parameters: - $ref: '#/components/parameters/symbol' responses: '200': description: Average price content: application/json: schema: type: object properties: mins: type: integer format: int64 example: 5 price: type: string example: "9.35751834" required: - mins - price '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/ticker/24hr: get: operationId: ticker_24hr summary: 24hr Ticker Price Change Statistics description: |- 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; tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' - name: type in: query description: |- Supported values: FULL or MINI. If none provided, the default is FULL schema: type: string responses: '200': description: 24hr ticker content: application/json: schema: oneOf: - $ref: '#/components/schemas/ticker' - $ref: '#/components/schemas/tickerList' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/ticker/price: get: operationId: ticker_price summary: Symbol Price Ticker description: |- 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; tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' responses: '200': description: Price ticker content: application/json: schema: oneOf: - $ref: '#/components/schemas/priceTicker' - $ref: '#/components/schemas/priceTickerList' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/ticker/bookTicker: get: operationId: ticker_order_book summary: Symbol Order Book Ticker description: |- 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; tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' responses: '200': description: Order book ticker content: application/json: schema: oneOf: - $ref: '#/components/schemas/bookTicker' - $ref: '#/components/schemas/bookTickerList' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/ticker: get: operationId: ticker summary: Rolling window price change statistics description: |- 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 200 once the number of symbols in the request is more than 50. tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' - name: windowSize in: query description: |- 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) schema: type: string - name: type in: query description: |- Supported values: FULL or MINI. If none provided, the default is FULL schema: type: string responses: '200': description: Rolling price ticker content: application/json: schema: type: object properties: symbol: type: string example: BNBBTC priceChange: type: string example: '-8.00000000' priceChangePercent: type: string example: '-88.889' weightedAvgPrice: type: string example: '2.60427807' openPrice: type: string example: '9.00000000' highPrice: type: string example: '9.00000000' lowPrice: type: string example: '1.00000000' lastPrice: type: string example: '1.00000000' volume: type: string example: '187.00000000' quoteVolume: type: string example: '487.00000000' openTime: type: integer format: int64 example: 1641859200000 closeTime: type: integer format: int64 example: 1642031999999 firstId: type: integer format: int64 example: 0 lastId: type: integer format: int64 example: 60 count: type: integer format: int64 example: 61 required: - symbol - priceChange - priceChangePercent - weightedAvgPrice - openPrice - highPrice - lowPrice - lastPrice - volume - quoteVolume - openTime - closeTime - firstId - lastId - count '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/order/test: post: operationId: order_test summary: Test New Order (TRADE) description: |- 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): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/optionalQuantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/optionalTrailingDelta' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/order: get: operationId: query_order summary: Query Order (USER_DATA) description: |- 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 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order details content: application/json: schema: $ref: '#/components/schemas/orderDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: place_new_order summary: New Order (TRADE) description: |- 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 wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and `quoteOrderQty`. - `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` filter rules; the order will execute a quantity that will have the notional value as close as possible to `quoteOrderQty`. - same `newClientOrderId` can be accepted only when the previous one is filled, otherwise the order will be rejected. Trigger order price rules against market price for both `MARKET` and `LIMIT` versions: - Price above market price: `STOP_LOSS` `BUY`, `TAKE_PROFIT` `SELL` - Price below market price: `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/optionalQuantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/optionalTrailingDelta' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order result content: application/json: schema: oneOf: - $ref: '#/components/schemas/orderResponseAck' - $ref: '#/components/schemas/orderResponseResult' - $ref: '#/components/schemas/orderResponseFull' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: cancel_order summary: Cancel Order (TRADE) description: |- Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/cancelRestrictions' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled order content: application/json: schema: $ref: '#/components/schemas/order' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/order/cancelReplace: post: operationId: replace_order summary: Cancel an Existing Order and Send a New Order (Trade) description: |- 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 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - name: cancelReplaceMode in: query required: true description: |- - `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. schema: type: string example: "STOP_ON_FAILURE" - $ref: '#/components/parameters/cancelRestrictions' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/optionalQuantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - name: cancelNewClientOrderId in: query description: Used to uniquely identify this cancel. Automatically generated by default schema: type: string - name: cancelOrigClientOrderId in: query description: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. schema: type: string - name: cancelOrderId in: query description: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. schema: type: integer format: int64 example: 12 - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/optionalTrailingDelta' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Operation details content: application/json: schema: type: object properties: cancelResult: type: string example: SUCCESS newOrderResult: type: string example: SUCCESS cancelResponse: type: object properties: symbol: type: string example: BTCUSDT origClientOrderId: type: string example: DnLo3vTAQcjha43lAZhZ0y orderId: type: integer format: int64 example: 9 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: osxN3JXAtJvKvCqGeMWMVR price: type: string example: '0.01000000' origQty: type: string example: '0.000100' executedQty: type: string example: '0.00000000' cummulativeQuoteQty: type: string example: '0.00000000' status: type: string example: CANCELED timeInForce: type: string example: GTC type: type: string example: LIMIT side: type: string example: SELL selfTradePreventionMode: type: string example: NONE transactTime: type: integer format: int64 example: 1507725176595 required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - selfTradePreventionMode newOrderResponse: type: object properties: symbol: type: string example: BTCUSDT orderId: type: integer format: int64 example: 10 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: wOceeeOzNORyLiQfw7jd8S transactTime: type: integer format: int64 example: 1652928801803 price: type: string example: '0.02000000' origQty: type: string example: '0.040000' executedQty: type: string example: '0.00000000' cummulativeQuoteQty: type: string example: '0.00000000' status: type: string example: NEW timeInForce: type: string example: GTC type: type: string example: LIMIT side: type: string example: BUY workingTime: type: integer format: int64 example: 1669277163808 fills: type: array items: type: string maxItems: 0 selfTradePreventionMode: type: string example: NONE required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - fills - selfTradePreventionMode required: - cancelResult - newOrderResult - cancelResponse - newOrderResponse '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/openOrders: get: operationId: list_open_orders summary: Current Open Orders (USER_DATA) description: |- 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; tags: - Trade parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Current open orders content: application/json: schema: type: array items: $ref: '#/components/schemas/orderDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: cancel_open_orders summary: Cancel all Open Orders on a Symbol (TRADE) description: |- Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled orders content: application/json: schema: type: array items: anyOf: - $ref: '#/components/schemas/order' - $ref: '#/components/schemas/ocoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/allOrders: get: operationId: all_orders summary: All Orders (USER_DATA) description: |- 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 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Current open orders content: application/json: schema: type: array items: $ref: '#/components/schemas/orderDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/order/oco: post: operationId: place_order_oco summary: New OCO (TRADE) description: |- Send in a new OCO - 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(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/listClientOrderId' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/quantity' - $ref: '#/components/parameters/limitClientOrderId' - $ref: '#/components/parameters/limitStrategyId' - $ref: '#/components/parameters/limitStrategyType' - $ref: '#/components/parameters/price' - $ref: '#/components/parameters/limitIcebergQty' - name: trailingDelta in: query schema: type: number format: double - $ref: '#/components/parameters/stopClientOrderId' - $ref: '#/components/parameters/ocoStopPrice' - $ref: '#/components/parameters/stopStrategyId' - $ref: '#/components/parameters/stopStrategyType' - $ref: '#/components/parameters/stopLimitPrice' - $ref: '#/components/parameters/stopIcebergQty' - $ref: '#/components/parameters/stopLimitTimeInForce' - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 0 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "JYVpp3F0f5CAG15DhtrqLp" transactionTime: type: integer format: int64 example: 1563417480525 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 2 clientOrderId: "Kk7sqHb9J6mJWTMDVW7Vos" - symbol: "LTCBTC" orderId: 3 clientOrderId: "xTXKaGYd4bluPVp78IVRvl" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string workingTime: type: string selfTradePreventionMode: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice - workingTime - selfTradePreventionMode example: - symbol: "LTCBTC" orderId: 2 orderListId: 0 clientOrderId: "Kk7sqHb9J6mJWTMDVW7Vos" transactTime: 1563417480525 price: "0.000000" origQty: "0.624363" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "STOP_LOSS" side: "BUY" stopPrice: "0.960664" workingTime: -1 selfTradePreventionMode: "NONE" - symbol: "LTCBTC" orderId: 3 orderListId: 0 clientOrderId: "xTXKaGYd4bluPVp78IVRvl" transactTime: 1563417480525 price: "0.036435" origQty: "0.624363" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "LIMIT_MAKER" side: "BUY" workingTime: 1563417480525 selfTradePreventionMode: "NONE" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/orderList: get: operationId: orderList summary: Query OCO (USER_DATA) description: |- Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 tags: - Trade parameters: - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 27 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "h2USkA5YQpaXHPIrkd96xE" transactionTime: type: integer format: int64 example: 1565245656253 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "qD1gy3kc3Gx0rihm9Y3xwS" - symbol: "LTCBTC" orderId: 5 clientOrderId: "ARzZ9I00CPM8i3NhmU9Ega" required: - symbol - orderId - clientOrderId required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: delete_order_list summary: Cancel OCO (TRADE) description: |- Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/listClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Report on deleted OCO content: application/json: schema: $ref: '#/components/schemas/ocoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/allOrderList: get: operationId: all_order_list summary: Query all OCO (USER_DATA) description: |- Retrieves all OCO based on provided optional parameters Weight(IP): 20 tags: - Trade parameters: - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 29 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "amEEAXryFzFwYF1FeRpUoZ" transactionTime: type: integer format: int64 example: 1565245913483 symbol: type: string example: "LTCBTC" isIsolated: type: boolean orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "oD7aesZqjEGlZrbtRpy5zB" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Jr1h6xirOxgeJOUuYQS7V3" required: - symbol - orderId - clientOrderId required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/openOrderList: get: operationId: openOrderList summary: Query Open OCO (USER_DATA) description: 'Weight(IP): 6' tags: - Trade parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 31 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "wuB13fmulKj3YjdqWEcsnp" transactionTime: type: integer format: int64 example: 1565246080644 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "r3EH2N76dHfLoSZWIUw1bT" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Cv1SnyPD3qhqpbjpYEHbd2" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/sor/order: post: operationId: sor/order summary: New order using SOR (TRADE) description: 'Weight(IP): 6' tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/quantity' - name: price in: query required: false schema: type: number format: double - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New order details content: application/json: schema: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 2 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "sBI1KM6nNtOfj5tccZSKly" transactTime: type: integer format: int64 example: 1689149087774 price: type: string example: "31000.00000000" origQty: type: string example: "0.50000000" executedQty: type: string example: "0.50000000" cummulativeQuoteQty: type: string example: "14000.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "BUY" workingTime: type: integer format: int64 example: 1689149087774 fills: type: array items: type: object properties: matchType: type: string example: "ONE_PARTY_TRADE_REPORT" price: type: string example: "28000.00000000" qty: type: string example: "0.50000000" commission: type: string example: "0.00000000" commissionAsset: type: string example: "BTC" tradeId: type: integer format: int64 example: -1 allocId: type: integer format: int64 example: 0 required: - matchType - price - qty - commission - commissionAsset - tradeId - allocId workingFloor: type: string example: "SOR" selfTradePreventionMode: type: string example: "NONE" usedSor: type: boolean example: true required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - fills - workingFloor - selfTradePreventionMode - usedSor '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/sor/order/test: post: operationId: sor/order/test summary: Test new order using SOR (TRADE) description: |- 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. tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/quantity' - name: price in: query required: false schema: type: number format: double - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Test new order content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/account: get: operationId: account summary: Account Information (USER_DATA) description: |- Get current account information. Weight(IP): 20 tags: - Trade parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account details content: application/json: schema: $ref: '#/components/schemas/account' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/myTrades: get: operationId: myTrades summary: Account Trade List (USER_DATA) description: |- 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 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - name: orderId in: query description: This can only be used in combination with symbol. schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of trades content: application/json: schema: type: array items: $ref: '#/components/schemas/myTrade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/rateLimit/order: get: operationId: rateLimit/order summary: Query Current Order Count Usage (TRADE) description: |- Displays the user's current order count usage for all intervals. Weight(IP): 40 tags: - Trade parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order rate limits content: application/json: schema: type: array items: type: object properties: rateLimitType: type: string interval: type: string intervalNum: type: integer format: int32 limit: type: integer format: int32 count: type: integer format: int32 required: - rateLimitType - interval - intervalNum - limit example: - rateLimitType: "ORDERS" interval: "SECOND" intervalNum: 10 limit: 10000 count: 0 - rateLimitType: "ORDERS" interval: "DAY" intervalNum: 1 limit: 20000 count: 0 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/myPreventedMatches: get: operationId: myPreventedMatches summary: Query Prevented Matches description: |- 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 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/preventedMatchId' - $ref: '#/components/parameters/orderId' - name: fromPreventedMatchId in: query required: false schema: type: integer format: int64 example: 1 - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order list that were expired due to STP content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" preventedMatchId: type: integer format: int64 example: 1 takerOrderId: type: integer format: int64 example: 5 makerOrderId: type: integer format: int64 example: 3 tradeGroupId: type: integer format: int64 example: 1 selfTradePreventionMode: type: string example: "EXPIRE_MAKER" price: type: string example: "1.100000" makerPreventedQuantity: type: string example: "1.300000" transactTime: type: integer format: int64 example: 1669101687094 required: - symbol - preventedMatchId - takerOrderId - makerOrderId - tradeGroupId - selfTradePreventionMode - price - makerPreventedQuantity - transactTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/myAllocations: get: operationId: myAllocations summary: Query Allocations (USER_DATA) description: |- 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 startTime and endTime can't be longer than 24 hours. tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: fromAllocationId in: query required: false schema: type: integer format: int64 - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Allocations resulting from SOR order placement content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" allocationId: type: integer format: int64 example: 0 allocationType: type: string example: "SOR" orderId: type: integer format: int64 example: 1 orderListId: type: integer format: int64 example: -1 price: type: string example: "1.00000000" qty: type: string example: "5.00000000" quoteQty: type: string example: "5.00000000" commission: type: string example: "0.00000000" commissionAsset: type: string example: "BTC" time: type: integer format: int64 example: 1687506878118 isBuyer: type: boolean example: true isMaker: type: boolean example: false isAllocator: type: boolean example: false required: - symbol - allocationId - allocationType - orderId - orderListId - price - qty - quoteQty - commission - commissionAsset - time - isBuyer - isMaker - isAllocator '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/transfer: post: operationId: execute-margin-transfer summary: Cross Margin Account Transfer (MARGIN) description: |- Execute transfer between spot account and cross margin account. Weight(IP): 600 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query required: true description: |- * `1` - transfer from main account to margin account * `2` - transfer from margin account to main account schema: type: integer format: int32 minimum: 1 maximum: 2 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer Id content: application/json: schema: $ref: '#/components/schemas/transaction' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: operationId: get-margin-transfer summary: Get Cross Margin Transfer History (USER_DATA) description: |- - 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 tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/getCrossMargingTransferHistoryType' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/archived' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin account transfer history, response in descending order content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string asset: type: string status: type: string timestamp: type: integer format: int64 txId: type: integer format: int64 type: type: string required: - amount - asset - status - timestamp - txId - type total: type: integer format: int32 example: 3 example: rows: - amount: "0.10000000" asset: "BNB" status: "CONFIRMED" timestamp: 1566898617 txId: 5240372201 type: "ROLL_IN" total: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/loan: post: operationId: apply-for-margin-loan summary: Margin Account Borrow (MARGIN) description: |- Apply for a loan. - If "isIsolated" = "TRUE", "symbol" must be sent - "isIsolated" = "FALSE" for crossed margin loan Weight(UID): 3000 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transaction id content: application/json: schema: $ref: '#/components/schemas/transaction' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: operationId: query-margin-loan-record summary: Query Loan Record (USER_DATA) description: |- - `txId` or `startTime` must be sent. `txId` takes precedence. - 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 Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isolatedSymbol' - name: txId in: query description: the tranId in `POST /sapi/v1/margin/loan` schema: type: integer format: int64 example: 123456789 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/archived' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan records content: application/json: schema: type: object properties: rows: type: array items: type: object properties: isolatedSymbol: type: string txId: type: integer format: int64 asset: type: string principal: type: string timestamp: type: integer format: int64 status: type: string required: - isolatedSymbol - txId - asset - principal - timestamp - status total: type: integer format: int32 required: - rows - total example: rows: - isolatedSymbol: "BNBUSDT" txId: 12807067523 asset: "BNB" principal: "0.84624403" timestamp: 1555056425000 status: "CONFIRMED" total: 1 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/repay: post: operationId: margin-repay summary: Margin Account Repay (MARGIN) description: |- Repay loan for margin account. - If "isIsolated" = "TRUE", "symbol" must be sent - "isIsolated" = "FALSE" for crossed margin repay Weight(IP): 3000 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transaction id content: application/json: schema: $ref: '#/components/schemas/transaction' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: operationId: query-margin-repay summary: Query Repay Record (USER_DATA) description: |- - `txId` or `startTime` must be sent. `txId` takes precedence. - 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 Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isolatedSymbol' - name: txId in: query description: the tranId in `POST /sapi/v1/margin/repay` schema: type: integer format: int64 example: 2970933056 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/archived' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Load records content: application/json: schema: type: object properties: rows: type: array items: type: object properties: isolatedSymbol: type: string example: "BNBUSDT" description: Isolated symbol, will not be returned for crossed margin amount: type: string example: "14.00000000" description: Total amount repaid asset: type: string example: "BNB" interest: type: string example: "0.01866667" description: Interest repaid principal: type: string example: "13.98133333" description: Principal repaid status: type: string example: "CONFIRMED" description: One of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account) timestamp: type: integer format: int64 example: 1563438204000 txId: type: integer format: int64 example: 2970933056 required: - isolatedSymbol - amount - asset - interest - principal - status - timestamp - txId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/asset: get: operationId: margin/asset summary: Query Margin Asset (MARKET_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/asset' security: - ApiKeyAuth: [] responses: '200': description: Asset details content: application/json: schema: type: object properties: assetFullName: type: string example: "Binance Coin" assetName: type: string example: "BNB" isBorrowable: type: boolean example: false isMortgageable: type: boolean userMinBorrow: type: string example: "0.00000000" userMinRepay: type: string example: "0.00000000" required: - assetFullName - assetName - isBorrowable - isMortgageable - userMinBorrow - userMinRepay '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/pair: get: operationId: margin/pair summary: Query Cross Margin Pair (MARKET_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/symbol' security: - ApiKeyAuth: [] responses: '200': description: Margin pair details content: application/json: schema: type: object properties: id: type: integer format: int64 example: 323355778339572400 symbol: type: string example: "BNBUSDT" base: type: string example: "BTC" quote: type: string example: "USDT" isMarginTrade: type: boolean isBuyAllowed: type: boolean isSellAllowed: type: boolean required: - id - symbol - base - quote - isMarginTrade - isBuyAllowed - isSellAllowed '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allAssets: get: operationId: margin/allAssets summary: Get All Margin Assets (MARKET_DATA) description: 'Weight(IP): 1' tags: - Margin security: - ApiKeyAuth: [] responses: '200': description: Assets details content: application/json: schema: type: array items: type: object properties: assetFullName: type: string example: "Binance coin" assetName: type: string example: "BNB" isBorrowable: type: boolean isMortgageable: type: boolean userMinBorrow: type: string example: "0.00000000" userMinRepay: type: string example: "0.00000000" required: - assetFullName - assetName - isBorrowable - isMortgageable - userMinBorrow - userMinRepay '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allPairs: get: operationId: margin/allPairs summary: Get All Cross Margin Pairs (MARKET_DATA) description: 'Weight(IP): 1' tags: - Margin security: - ApiKeyAuth: [] responses: '200': description: Margin pairs content: application/json: schema: type: array items: type: object properties: base: type: string example: "BNB" id: type: integer format: int64 example: 351637150141315861 isBuyAllowed: type: boolean isMarginTrade: type: boolean isSellAllowed: type: boolean quote: type: string example: "BTC" symbol: type: string example: "BNBBTC" required: - base - id - isBuyAllowed - isMarginTrade - isSellAllowed - quote - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/priceIndex: get: operationId: margin/priceIndex summary: Query Margin PriceIndex (MARKET_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/symbol' security: - ApiKeyAuth: [] responses: '200': description: Price index content: application/json: schema: type: object properties: calcTime: type: integer format: int64 example: 1562046418000 price: type: string example: "0.00333930" symbol: type: string example: "BNBBTC" required: - calcTime - price - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/order: get: operationId: margin-order summary: Query Margin Account's Order (USER_DATA) description: |- - 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 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Interest History, response in descending order content: application/json: schema: $ref: "#/components/schemas/marginOrderDetail" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: post-margin-order summary: Margin Account New Order (TRADE) description: |- Post a new order for margin account. Weight(UID): 6 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/quantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/sideEffectType' - $ref: '#/components/parameters/timeInForce' - name: autoRepayAtCancel in: query required: true schema: type: boolean example: true - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin order info content: application/json: schema: oneOf: - $ref: '#/components/schemas/marginOrderResponseAck' - $ref: '#/components/schemas/marginOrderResponseResult' - $ref: '#/components/schemas/marginOrderResponseFull' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: cancel-margin-order summary: Margin Account Cancel Order (TRADE) description: |- Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled margin order details content: application/json: schema: $ref: '#/components/schemas/marginOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/interestHistory: get: operationId: margin/interestHistory summary: Get Interest History (USER_DATA) description: |- - 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 tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/archived' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Interest History, response in descending order content: application/json: schema: type: object properties: rows: type: array items: type: object properties: isolatedSymbol: type: string example: "BNBUSDT" asset: type: string example: "BNB" interest: type: string example: "0.01866667" interestAccuredTime: type: integer format: int64 example: 1566813600 interestRate: type: string example: "0.01600000" principal: type: string example: "36.22000000" type: type: string example: "ON_BORROW" required: - isolatedSymbol - asset - interest - interestAccuredTime - interestRate - principal - type total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/forceLiquidationRec: get: operationId: margin/forceLiquidationRec summary: Get Force Liquidation Record (USER_DATA) description: |- - Response in descending order Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Force Liquidation History, response in descending order content: application/json: schema: type: object properties: rows: type: array items: type: object properties: avgPrice: type: string executedQty: type: string orderId: type: integer format: int64 price: type: string qty: type: string side: type: string symbol: type: string timeInForce: type: string isIsolated: type: boolean updatedTime: type: integer format: int64 required: - avgPrice - executedQty - orderId - price - qty - side - symbol - timeInForce - isIsolated - updatedTime total: type: integer format: int32 example: 1 required: - rows - total example: rows: - avgPrice: "0.00388359" executedQty: "31.39000000" orderId: 180015097 price: "0.00388110" qty: "31.39000000" side: "SELL" symbol: "BNBBTC" timeInForce: "GTC" isIsolated: true updatedTime: 1558941374745 total: 1 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/account: get: operationId: margin/account summary: Query Cross Margin Account Details (USER_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin account details content: application/json: schema: type: object properties: borrowEnabled: type: boolean marginLevel: type: string example: "11.64405625" totalAssetOfBtc: type: string example: "6.82728457" totalLiabilityOfBtc: type: string example: "0.58633215" totalNetAssetOfBtc: type: string example: "6.24095242" tradeEnabled: type: boolean transferEnabled: type: boolean userAssets: type: array items: type: object properties: asset: type: string example: "BTC" borrowed: type: string example: "0.00000000" free: type: string example: "0.00499500" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00499500" required: - asset - borrowed - free - interest - locked - netAsset required: - borrowEnabled - marginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - tradeEnabled - transferEnabled - userAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/openOrders: get: operationId: margin-open-orders summary: Query Margin Account's Open Orders (USER_DATA) description: |- - 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 tags: - Margin parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin open orders list content: application/json: schema: type: array items: $ref: '#/components/schemas/marginOrderDetail' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: margin-cancel-orders summary: Margin Account Cancel all Open Orders on a Symbol (TRADE) description: | - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: "#/components/parameters/isIsolatedMargin" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled margin orders content: application/json: schema: type: array items: anyOf: - $ref: '#/components/schemas/canceledMarginOrderDetail' - $ref: '#/components/schemas/marginOcoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allOrders: get: operationId: margin-query-all-orders summary: Query Margin Account's All Orders (USER_DATA) description: |- - 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 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin order list content: application/json: schema: type: array items: $ref: '#/components/schemas/marginOrderDetail' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/order/oco: post: operationId: send-margin-query-oco summary: Margin Account New OCO (TRADE) description: |- 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 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/listClientOrderId' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/quantity' - $ref: '#/components/parameters/limitClientOrderId' - $ref: '#/components/parameters/price' - $ref: '#/components/parameters/limitIcebergQty' - $ref: '#/components/parameters/stopClientOrderId' - $ref: '#/components/parameters/ocoStopPrice' - $ref: '#/components/parameters/stopLimitPrice' - $ref: '#/components/parameters/stopIcebergQty' - $ref: '#/components/parameters/stopLimitTimeInForce' - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/sideEffectType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New Margin OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 0 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "JYVpp3F0f5CAG15DhtrqLp" transactionTime: type: integer format: int64 example: 1563417480525 symbol: type: string example: "LTCBTC" marginBuyBorrowAmount: type: string example: "5" description: will not return if no margin trade happens marginBuyBorrowAsset: type: string example: "BTC" description: will not return if no margin trade happens isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 2 clientOrderId: "Kk7sqHb9J6mJWTMDVW7Vos" - symbol: "LTCBTC" orderId: 3 clientOrderId: "xTXKaGYd4bluPVp78IVRvl" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice example: - symbol: "LTCBTC" orderId: 2 orderListId: 0 clientOrderId: "Kk7sqHb9J6mJWTMDVW7Vos" transactTime: 1563417480525 price: "0.000000" origQty: "0.624363" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "STOP_LOSS" side: "BUY" stopPrice: "0.960664" - symbol: "LTCBTC" orderId: 3 orderListId: 0 clientOrderId: "xTXKaGYd4bluPVp78IVRvl" transactTime: 1563417480525 price: "0.036435" origQty: "0.624363" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "LIMIT_MAKER" side: "BUY" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - marginBuyBorrowAmount - marginBuyBorrowAsset - isIsolated - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/orderList: get: operationId: margin-order-list summary: Query Margin Account's OCO (USER_DATA) description: |- Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/isIsolatedMargin' - name: symbol in: query description: 'Mandatory for isolated margin, not supported for cross margin' schema: type: string - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 27 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "h2USkA5YQpaXHPIrkd96xE" transactionTime: type: integer format: int64 example: 1565245656253 symbol: type: string example: "LTCBTC" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "qD1gy3kc3Gx0rihm9Y3xwS" - symbol: "LTCBTC" orderId: 5 clientOrderId: "ARzZ9I00CPM8i3NhmU9Ega" required: - symbol - orderId - clientOrderId required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: cancel-margin-order-oco summary: Margin Account Cancel OCO (TRADE) description: |- 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 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/listClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin OCO details content: application/json: schema: $ref: '#/components/schemas/marginOcoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allOrderList: get: operationId: margin-all-order-list summary: Query Margin Account's all OCO (USER_DATA) description: |- Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 tags: - Margin parameters: - $ref: '#/components/parameters/isIsolatedMargin' - name: symbol in: query description: 'Mandatory for isolated margin, not supported for cross margin' schema: type: string - name: fromId in: query description: 'If supplied, neither `startTime` or `endTime` can be provided' schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: 'Default Value: 500; Max Value: 1000' schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of Margin OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 29 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "amEEAXryFzFwYF1FeRpUoZ" transactionTime: type: integer format: int64 example: 1565245913483 symbol: type: string example: "LTCBTC" isIsolated: type: boolean orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "oD7aesZqjEGlZrbtRpy5zB" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Jr1h6xirOxgeJOUuYQS7V3" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/openOrderList: get: operationId: margin-openOrderList summary: Query Margin Account's Open OCO (USER_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/isIsolatedMargin' - name: symbol in: query description: 'Mandatory for isolated margin, not supported for cross margin' schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of Open Margin OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 31 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "wuB13fmulKj3YjdqWEcsnp" transactionTime: type: integer format: int64 example: 1565246080644 symbol: type: string example: "LTCBTC" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "r3EH2N76dHfLoSZWIUw1bT" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Cv1SnyPD3qhqpbjpYEHbd2" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/myTrades: get: operationId: margin/myTrades summary: Query Margin Account's Trade List (USER_DATA) description: |- - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of margin trades content: application/json: schema: type: array items: $ref: '#/components/schemas/marginTrade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/maxBorrowable: get: operationId: margin/maxBorrowable summary: Query Max Borrow (USER_DATA) description: |- - 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 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Details on max borrow amount content: application/json: schema: type: object properties: amount: type: string example: "1.69248805" description: account's currently max borrowable amount with sufficient system availability borrowLimit: type: string example: "60" description: max borrowable amount limited by the account level required: - amount - borrowLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/maxTransferable: get: operationId: margin/maxTransferable summary: Query Max Transfer-Out Amount (USER_DATA) description: |- - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Details on max transferable amount content: application/json: schema: type: object properties: amount: type: string description: "Account's currently max borrowable amount with sufficient system availability" borrowLimit: type: string description: "Max borrowable amount limited by the account level" example: amount: "1.69248805" borrowLimit: "60" required: - amount - borrowLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/tradeCoeff: get: operationId: margin/tradeCoeff summary: Get Summary of Margin account (USER_DATA) description: |- Get personal margin level information Weight(IP): 10 tags: - Margin parameters: - name: email in: query description: Email Address required: true schema: type: string example: 'me@email.com' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Summary of Margin Account content: application/json: schema: type: object properties: normalBar: type: string description: "Account's currently max borrowable amount with sufficient system availability" example: "1.5" marginCallBar: type: string description: "Max borrowable amount limited by the account level" example: "1.3" forceLiquidationBar: type: string description: "Liquidation Margin Ratio" example: "1.1" required: - amount - borrowLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/transfer: get: operationId: query-margin-isolated-transfer summary: Get Isolated Margin Transfer History (USER_DATA) description: 'Weight(IP): 1' tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/getCrossMargingTransferHistoryType' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Transfer History content: application/json: schema: $ref: '#/components/schemas/marginTransferDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: post-margin-isolated-transfer summary: Isolated Margin Account Transfer (MARGIN) description: 'Weight(UID): 600' tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/transFrom' - $ref: '#/components/parameters/transTo' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transaction Id content: application/json: schema: type: object example: tranId: 100000001 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/account: get: operationId: query-margin-isolated-account summary: Query Isolated Margin Account Info (USER_DATA) description: |- - 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 tags: - Margin parameters: - $ref: '#/components/parameters/symbols' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Account Info when "symbols" is not sent content: application/json: schema: $ref: '#/components/schemas/isolatedMarginAccountInfo' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: disable-isolated-margin-account summary: Disable Isolated Margin Account (TRADE) description: |- Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Account status content: application/json: schema: type: object properties: success: type: boolean symbol: type: string example: "BTCUSDT" required: - success - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: post-margin-isolated-account summary: Enable Isolated Margin Account (TRADE) description: |- Enable isolated margin account for a specific symbol. Weight(UID): 300 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Account status content: application/json: schema: type: object properties: success: type: boolean symbol: type: string example: "BTCUSDT" required: - success - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/accountLimit: get: operationId: margin/isolated/accountLimit summary: Query Enabled Isolated Margin Account Limit (USER_DATA) description: |- Query enabled isolated margin account limit. Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Number of enabled Isolated Margin Account and its limit content: application/json: schema: type: object properties: enabledAccount: type: integer format: int64 example: 5 maxAccount: type: integer format: int64 example: 20 required: - enabledAccount - maxAccount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/pair: get: operationId: margin/isolated/pair summary: Query Isolated Margin Symbol (USER_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Symbol content: application/json: schema: type: object properties: symbol: type: string example: 'BTCUSDT' base: type: string example: 'BTC' quote: type: string example: 'USDT' isMarginTrade: type: boolean isBuyAllowed: type: boolean isSellAllowed: type: boolean required: - symbol - base - quote - isMarginTrade - isBuyAllowed - isSellAllowed '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/allPairs: get: operationId: margin/isolated/allPairs summary: Get All Isolated Margin Symbol(USER_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: All Isolated Margin Symbols content: application/json: schema: type: array items: type: object properties: symbol: type: string example: 'BTCUSDT' base: type: string example: 'BTC' quote: type: string example: 'USDT' isMarginTrade: type: boolean isBuyAllowed: type: boolean isSellAllowed: type: boolean required: - symbol - base - quote - isMarginTrade - isBuyAllowed - isSellAllowed '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bnbBurn: post: operationId: toggle-bnbBurn summary: Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) description: |- - "spotBNBBurn" and "interestBNBBurn" should be sent at least one. Weight(IP): 1 tags: - Margin parameters: - name: spotBNBBurn in: query description: Determines whether to use BNB to pay for trading fees on SPOT schema: type: string enum: ['true','false'] example: 'true' - name: interestBNBBurn in: query description: Determines whether to use BNB to pay for margin loan's interest schema: type: string enum: ['true','false'] example: 'false' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Status on BNB to pay for trading fees content: application/json: schema: $ref: '#/components/schemas/bnbBurnStatus' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: operationId: query-toggle-bnbBurn-status summary: Get BNB Burn Status(USER_DATA) description: 'Weight(IP): 1' tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Status on BNB to pay for trading fees content: application/json: schema: $ref: '#/components/schemas/bnbBurnStatus' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/interestRateHistory: get: operationId: margin/interestRateHistory summary: Margin Interest Rate History (USER_DATA) description: |- The max interval between startTime and endTime is 30 days. Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin Interest Rate History content: application/json: schema: type: array items: type: object properties: asset: type: string example: 'BTC' dailyInterestRate: type: string example: '0.00025000' timestamp: type: integer format: int64 example: 1611544731000 vipLevel: type: integer format: int32 example: 1 required: - asset - dailyInterestRate - timestamp - vipLevel '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/crossMarginData: get: operationId: margin/crossMarginData summary: Query Cross Margin Fee Data (USER_DATA) description: |- 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 tags: - Margin parameters: - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/optionalCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cross Margin Fee Data content: application/json: schema: type: array items: type: object properties: vipLevel: type: integer format: int32 example: 0 coin: type: string example: "BTC" transferIn: type: boolean borrowable: type: boolean dailyInterest: type: string example: "0.00026125" yearlyInterest: type: string example: "0.0953" borrowLimit: type: string example: "180" marginablePairs: type: array items: type: string example: - "BNBBTC" - "TRXBTC" - "ETHBTC" - "BTCUSDT" required: - vipLevel - coin - transferIn - borrowable - dailyInterest - yearlyInterest - borrowLimit - marginablePairs '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolatedMarginData: get: operationId: margin/isolatedMarginData summary: Query Isolated Margin Fee Data (USER_DATA) description: |- 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 tags: - Margin parameters: - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Fee Data content: application/json: schema: type: array items: type: object properties: vipLevel: type: integer format: int32 example: 0 symbol: type: string example: "BTCUSDT" leverage: type: string example: "10" data: type: array items: type: object properties: coin: type: string dailyInterest: type: string borrowLimit: type: string example: - coin: "BTC" dailyInterest: "0.00026125" borrowLimit: "270" - coin: "USDT" dailyInterest: "0.000475" borrowLimit: "2100000" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolatedMarginTier: get: operationId: margin/isolatedMarginTier summary: Query Isolated Margin Tier Data (USER_DATA) description: |- Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - name: tier in: query description: All margin tier data will be returned if tier is omitted schema: type: string example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Tier Data content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" tier: type: integer format: int32 example: 1 effectiveMultiple: type: string example: "10" initialRiskRatio: type: string example: "1.111" liquidationRiskRatio: type: string example: "1.05" baseAssetMaxBorrowable: type: string example: "9" quoteAssetMaxBorrowable: type: string example: "70000" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/rateLimit/order: get: operationId: margin/rateLimit/order summary: Query Current Margin Order Count Usage (TRADE) description: |- Displays the user's current margin order count usage for all intervals. Weight(IP): 20 tags: - Margin parameters: - $ref: '#/components/parameters/optionalIsIsolated' - name: symbol in: query description: isolated symbol, mandatory for isolated margin schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Usage. content: application/json: schema: type: array items: type: object properties: rateLimitType: type: string example: ORDERS interval: type: string example: SECOND intervalNum: type: integer format: int64 example: 10 limit: type: integer format: int64 example: 10000 count: type: integer format: int64 example: 0 required: - rateLimitType - interval - intervalNum - limit - count '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/dribblet: get: operationId: margin/dribblet summary: Margin Dustlog (USER_DATA) description: |- Query the historical information of user margin account small-value asset conversion BNB. Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dust Log content: application/json: schema: type: object properties: total: type: integer format: int64 example: 8 userAssetDribblets: type: array items: type: object properties: operateTime: type: integer format: int64 example: 1615985535000 totalTransferedAmount: type: string example: '0.00132256' totalServiceChargeAmount: type: string example: '0.00002699' transId: type: integer format: int64 example: 45178372831 userAssetDribbletDetails: type: array items: type: object properties: transId: type: integer format: int64 example: 4359321 serviceChargeAmount: type: string example: '0.000009' amount: type: string example: '0.0009' operateTime: type: integer format: int64 example: 1615985535000 transferedAmount: type: string example: '0.000441' fromAsset: type: string example: USDT required: - transId - serviceChargeAmount - amount - operateTime - transferedAmount - fromAsset required: - operateTime - totalTransferedAmount - totalServiceChargeAmount - transId - userAssetDribbletDetails required: - total - userAssetDribblets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/crossMarginCollateralRatio: get: operationId: margin/crossMarginCollateralRatio summary: Cross margin collateral ratio (MARKET_DATA) description: |- Weight(IP): 100 tags: - Margin security: - ApiKeyAuth: [] responses: '200': description: Margin collateral ratio content: application/json: schema: type: array items: type: object properties: collaterals: type: array items: type: object properties: minUsdValue: type: string example: "0" maxUsdValue: type: string example: "13000000" discountRate: type: string example: "1" required: - minUsdValue - maxUsdValue - discountRate assetNames: type: array items: type: string example: "BNX" required: - collaterals - assetNames '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/exchange-small-liability: get: operationId: margin/exchange-small-liability summary: Get Small Liability Exchange Coin List (USER_DATA) description: |- Query the coins which can be small liability exchange Weight(UID): 100 tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: coin list content: application/json: schema: type: array items: type: object properties: asset: type: string example: "ETH" interest: type: string example: "0.00083334" principal: type: string example: "0.001" liabilityAsset: type: string example: "USDT" liabilityQty: type: number format: float example: 0.3552 required: - asset - interest - principal - liabilityAsset - liabilityQty '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/exchange-small-liability-history: get: operationId: margin/exchange-small-liability-history summary: Get Small Liability Exchange History (USER_DATA) description: |- Get Small liability Exchange History Weight(UID): 100 tags: - Margin parameters: - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: coin list content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: asset: type: string example: "ETH" amount: type: string example: "0.00083434" targetAsset: type: string example: "BUSD" targetAmount: type: string example: "1.37576819" bizType: type: string example: "EXCHANGE_SMALL_LIABILITY" timestamp: type: integer format: int64 example: 1672801339253 required: - asset - amount - targetAsset - targetAmount - bizType - timestamp required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/next-hourly-interest-rate: get: operationId: margin/next-hourly-interest-rate summary: Get a future hourly interest rate (USER_DATA) description: |- Get user the next hourly estimate interest Weight(UID): 100 tags: - Margin parameters: - name: assets in: query description: List of assets, separated by commas, up to 20 schema: type: string example: BTC,ETH - name: isIsolated in: query description: for isolated margin or not, "TRUE", "FALSE" schema: type: string enum: ['TRUE','FALSE'] example: "TRUE" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: hourly interest content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BTC" nextHourlyInterestRate: type: string example: "0.00000571" required: - asset - nextHourlyInterestRate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/capital-flow: get: operationId: margin/capital-flow summary: Get cross or isolated margin capital flow(USER_DATA) description: |- Get cross or isolated margin capital flow Weight(IP): 100 tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - name: symbol in: query description: Required when querying isolated data schema: type: string example: 'BTCUSDT' - name: type in: query schema: type: string enum: [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] - name: startTime in: query description: Only supports querying the data of the last 90 days schema: type: integer format: int64 - $ref: '#/components/parameters/endTime' - name: fromId in: query description: If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned schema: type: integer format: int64 - name: limit in: query description: The number of data items returned each time is limited. Default 500; Max 1000. schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin capital flow content: application/json: schema: type: array items: type: object properties: id: type: integer format: int64 example: 123456 tranId: type: integer format: int64 example: 123123 timestamp: type: integer format: int64 example: 1691116657000 asset: type: string example: "USDT" symbol: type: string example: "BTCUSDT" type: type: string example: "BORROW" amount: type: string example: "101" required: - id - tranId - timestamp - asset - symbol - type - amount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/delist-schedule: get: operationId: margin/delist-schedule summary: Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) description: |- Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: tokens or symbols delist schedule content: application/json: schema: type: array items: type: object properties: delistTime: type: integer format: int64 example: 1686161202000 crossMarginAssets: type: array items: type: string example: "BTC" isolatedMarginSymbols: type: array items: type: string example: "BNBUSDT" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/available-inventory: get: operationId: margin/available-inventory summary: Query Margin Available Inventory (USER_DATA) description: |- Margin available Inventory query Weight(UID): 50 tags: - Margin parameters: - name: type in: query required: true schema: type: string enum: [MARGIN, ISOLATED] - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin available Inventory content: application/json: schema: type: object properties: assets: type: object properties: MATIC: type: string example: "100000000" STPT: type: string example: "100000000" TVK: type: string example: "100000000" SHIB: type: string example: "97409653" required: - MATIC - STPT - TVK - SHIB updateTime: type: integer format: int64 example: 1699272487 required: - assets - updateTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/manual-liquidation: post: operationId: margin/manual-liquidation summary: Margin manual liquidation(MARGIN) description: |- Margin manual liquidation Weight(UID): 3000 tags: - Margin parameters: - name: type in: query required: true schema: type: string enum: [MARGIN, ISOLATED] - name: symbol in: query schema: type: string example: "BTCUSDT" - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin manual liquidation content: application/json: schema: type: array items: type: object properties: asset: type: string example: "ETH" interest: type: string example: "0.00083334" principal: type: string example: "0.001" liabilityAsset: type: string example: "USDT" liabilityQty: type: number format: float example: 0.3552 required: - asset - interest - principal - liabilityAsset - liabilityQty '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/dust: get: operationId: margin/dust summary: Get Assets That Can Be Converted Into BNB (USER_DATA) description: |- Get assets that can be converted into BNB. Weight(IP): 100 tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset list content: application/json: schema: type: object properties: details: type: array items: type: object properties: asset: type: string example: "BTC" assetFullName: type: string example: "ADA" amountFree: type: string example: "6.21" toBTC: type: string example: "0.00016848" toBNB: type: string example: "0.01777302" toBNBOffExchange: type: string example: "0.01741756" exchange: type: string example: "0.00035546" required: - asset - assetFullName - amountFree - toBTC - toBNB - toBNBOffExchange - exchange totalTransferBtc: type: string example: "0.00016848" totalTransferBNB: type: string example: "0.01777302" dribbletPercentage: type: string example: "0.02" required: - details - totalTransferBtc - totalTransferBNB - dribbletPercentage '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: convert_dust_assets_to_bnb summary: Dust Transfer (TRADE) description: |- Convert dust assets to BNB Weight(UID): 3000 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: convert dust result content: application/json: schema: type: object properties: totalServiceCharge: type: string example: "0.02102542" totalTransfered: type: string example: "1.05127099" transferResult: type: array items: type: object properties: amount: type: string example: "0.03000000" fromAsset: type: string example: "ETH" operateTime: type: integer format: int64 example: 1563368549307 serviceChargeAmount: type: string example: "0.00500000" tranId: type: integer format: int64 example: 1563368549307 transferedAmount: type: string example: "0.25000000" required: - amount - fromAsset - operateTime - serviceChargeAmount - tranId - transferedAmount required: - totalServiceCharge - totalTransfered - transferResult '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/max-leverage: post: operationId: margin/max-leverage summary: Adjust cross margin max leverage (USER_DATA) description: |- Adjust cross margin max leverage Weight(UID): 3000 tags: - Margin parameters: - name: maxLeverage in: query required: true description: |- Can only adjust 3 or 5 schema: type: integer example: 3 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Adjust result content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/leverageBracket: get: operationId: margin/leverageBracket summary: Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) description: |- Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 tags: - Margin security: - ApiKeyAuth: [] responses: '200': description: Leverage info content: application/json: schema: type: array items: type: object properties: assetNames: type: array items: type: string example: "BTC" rank: type: integer example: 1 brackets: type: array items: type: object properties: leverage: type: integer example: 10 maxDebt: type: number format: double example: 1000000.00000000 maintenanceMarginRate: type: number format: double example: 0.02000000 initialMarginRate: type: number format: double example: 0.1112 fastNum: type: number format: double example: 60000.000 required: - leverage - maxDebt - maintenanceMarginRate - initialMarginRate - fastNum required: - assetNames - rank - brackets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/system/status: get: operationId: system/status summary: System Status (System) description: |- Fetch system status. Weight(IP): 1 tags: - Wallet responses: '200': description: OK content: application/json: schema: type: object properties: status: type: integer format: int32 example: 0 description: "0: normal, 1:system maintenance" msg: type: string example: "normal" description: '"normal", "system_maintenance"' required: - status - msg /sapi/v1/capital/config/getall: get: operationId: capital/config/getall summary: All Coins' Information (USER_DATA) description: |- Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: All coins details information content: application/json: schema: type: array items: type: object properties: coin: type: string example: "BTC" depositAllEnable: type: boolean free: type: string example: "0.00000000" freeze: type: string example: "0.00000000" ipoable: type: string example: "0.00000000" ipoing: type: string example: "0.00000000" isLegalMoney: type: boolean example: false locked: type: string example: "0.00000000" name: type: string example: "Bitcoin" networkList: type: array items: type: object properties: addressRegex: type: string example: "^(bnb1)[0-9a-z]{38}$" coin: type: string example: "BTC" depositDesc: type: string example: "Wallet Maintenance, Deposit Suspended" description: 'shown only when "depositEnable" is false.' depositEnable: type: boolean example: false isDefault: type: boolean example: false memoRegex: type: string example: "^[0-9A-Za-z\\-_]{1,120}$" minConfirm: type: integer format: int64 example: 1 description: 'min number for balance confirmation.' name: type: string example: "BEP2" network: type: string example: "ETH" resetAddressStatus: type: boolean example: false specialTips: type: string example: "Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance." unLockConfirm: type: integer format: int64 example: 0 description: 'confirmation number for balance unlock.' withdrawDesc: type: string example: "Wallet Maintenance, Withdrawal Suspended" description: 'shown only when "withdrawEnable" is false' withdrawEnable: type: boolean example: false withdrawFee: type: string example: "0.00000220" withdrawIntegerMultiple: type: string example: "0.00000001" withdrawMax: type: string example: "9999999999.99999999" withdrawMin: type: string example: "0.00000440" sameAddress: type: boolean required: - addressRegex - coin - depositDesc - depositEnable - isDefault - memoRegex - minConfirm - name - network - resetAddressStatus - specialTips - unLockConfirm - withdrawDesc - withdrawEnable - withdrawFee - withdrawIntegerMultiple - withdrawMax - withdrawMin - sameAddress storage: type: string example: "0.00000000" trading: type: boolean withdrawAllEnable: type: boolean withdrawing: type: string example: "0.00000000" required: - coin - depositAllEnable - free - freeze - ipoable - ipoing - isLegalMoney - locked - name - networkList - storage - trading - withdrawAllEnable - withdrawing '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/accountSnapshot: get: operationId: accountSnapshot summary: Daily Account Snapshot (USER_DATA) description: |- - 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 tags: - Wallet parameters: - name: type in: query required: true schema: type: string enum: [SPOT, MARGIN, FUTURES] - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int32 default: 7 minimum: 7 maximum: 30 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account Snapshot content: application/json: schema: oneOf: - $ref: '#/components/schemas/snapshotSpot' - $ref: '#/components/schemas/snapshotMargin' - $ref: '#/components/schemas/snapshotFutures' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/disableFastWithdrawSwitch: post: operationId: account/disableFastWithdrawSwitch summary: Disable Fast Withdraw Switch (USER_DATA) description: |- - 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 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/enableFastWithdrawSwitch: post: operationId: account/enableFastWithdrawSwitch summary: Enable Fast Withdraw Switch (USER_DATA) description: |- - 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 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/withdraw/apply: post: operationId: capital/withdraw/apply summary: Withdraw (USER_DATA) description: |- 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 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - name: withdrawOrderId in: query description: Client id for withdraw schema: type: string - $ref: '#/components/parameters/network' - name: address in: query required: true schema: type: string - name: addressTag in: query description: Secondary address identifier for coins like XRP,XMR etc. schema: type: string - $ref: '#/components/parameters/amount' - name: transactionFeeFlag in: query description: |- When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. schema: type: boolean default: false - name: name in: query schema: type: string - name: walletType in: query description: The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transafer Id content: application/json: schema: type: object properties: id: type: string example: "7213fea8e94b4a5593d507237e5a555b" required: - id '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/hisrec: get: operationId: capital/deposit/hisrec summary: Deposit History(supporting network) (USER_DATA) description: |- 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 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalCoin' - name: status in: query description: |- * `0` - pending * `6` - credited but cannot withdraw * `1` - success schema: type: integer format: int32 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of deposits content: application/json: schema: type: array items: type: object properties: amount: type: string example: "0.00999800" coin: type: string example: "PAXG" network: type: string example: "ETH" status: type: integer format: int32 example: 1 address: type: string example: "0x788cabe9236ce061e5a892e1a59395a81fc8d62c" addressTag: type: string example: "" txId: type: string example: "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3" insertTime: type: integer format: int64 example: 1599621997000 transferType: type: integer format: int32 example: 0 unlockConfirm: type: string example: "12/12" description: confirm times for unlocking confirmTimes: type: string example: "12/12" required: - amount - coin - network - status - address - addressTag - txId - insertTime - transferType - unlockConfirm - confirmTimes '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/withdraw/history: get: operationId: capital/withdraw/history summary: Withdraw History (supporting network) (USER_DATA) description: |- 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 withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. Weight(UID): 18000 Request Limit: 10 requests per second tags: - Wallet parameters: - $ref: '#/components/parameters/optionalCoin' - name: withdrawOrderId in: query schema: type: string - name: status in: query description: |- * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed schema: type: integer format: int32 minimum: 0 maximum: 6 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of withdraw history content: application/json: schema: type: array items: type: object properties: address: type: string example: "0x94df8b352de7f46f64b01d3666bf6e936e44ce60" amount: type: string example: "8.91000000" applyTime: type: string example: "2019-10-12 11:12:02" coin: type: string example: "USDT" id: type: string example: "b6ae22b3aa844210a7041aee7589627c" withdrawOrderId: type: string example: "WITHDRAWtest123" description: will not be returned if there's no withdrawOrderId for this withdraw. network: type: string example: "ETH" transferType: type: integer format: int32 example: 0 description: "1 for internal transfer, 0 for external transfer" status: type: integer format: int32 example: 6 transactionFee: type: string example: "0.004" confirmNo: type: integer format: int32 example: 3 info: type: string example: "The address is not valid. Please confirm with the recipient" description: Reason for withdrawal failure txId: type: string example: "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268" required: - address - amount - applyTime - coin - id - withdrawOrderId - network - transferType - status - transactionFee - txId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/address: get: operationId: capital/deposit/address summary: Deposit Address (supporting network) (USER_DATA) description: |- 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 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - $ref: '#/components/parameters/network' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Deposit address info content: application/json: schema: type: object properties: address: type: string example: "1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv" coin: type: string example: "BTC" tag: type: string example: "" url: type: string example: "https://btc.com/1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv" required: - address - coin - tag - url '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/status: get: operationId: account/status summary: Account Status (USER_DATA) description: |- Fetch account status detail. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object properties: data: type: string example: "Normal" required: - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/apiTradingStatus: get: operationId: account/apiTradingStatus summary: Account API Trading Status (USER_DATA) description: |- Fetch account API trading status with details. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account API trading status content: application/json: schema: type: object properties: data: type: object properties: isLocked: type: boolean example: false description: API trading function is locked or not plannedRecoverTime: type: integer format: int64 example: 0 description: If API trading function is locked, this is the planned recover time triggerCondition: type: object properties: GCR: type: integer format: int64 example: 150 description: Number of GTC orders IFER: type: integer format: int64 example: 150 description: Number of FOK/IOC orders UFR: type: integer format: int64 example: 300 description: Number of orders required: - GCR - IFER - UFR indicators: description: The indicators updated every 30 seconds type: object properties: BTCUSDT: type: array items: type: object properties: i: type: string example: "UFR" description: Unfilled Ratio (UFR) c: type: integer format: int64 example: 20 description: Count of all orders v: type: number format: float example: 0.05 description: Current UFR value t: type: number format: float example: 0.99 description: Trigger UFR value required: - i - c - v - t required: - BTCUSDT updateTime: type: integer format: int64 example: 1547630471725 required: - isLocked - plannedRecoverTime - triggerCondition - indicators - updateTime required: - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/dribblet: get: operationId: asset/dribblet summary: DustLog(USER_DATA) description: 'Weight(IP): 1' tags: - Wallet parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dust log records content: application/json: schema: type: object properties: total: description: Total counts of exchange type: integer format: int64 example: 8 userAssetDribblets: type: array items: type: object properties: operateTime: type: integer format: int64 example: 1615985535000 totalTransferedAmount: type: string example: "0.00132256" description: Total transfered BNB amount for this exchange. totalServiceChargeAmount: type: string example: "0.00002699" description: Total service charge amount for this exchange. transId: type: integer format: int64 example: 45178372831 userAssetDribbletDetails: type: array items: type: object properties: transId: type: integer format: int64 example: 4359321 serviceChargeAmount: type: string example: "0.000009" amount: type: string example: "0.0009" operateTime: type: integer format: int64 example: 1615985535000 transferedAmount: type: string example: "0.000441" fromAsset: type: string example: "USDT" required: - transId - serviceChargeAmount - amount - operateTime - transferedAmount - fromAsset required: - operateTime - totalTransferedAmount - totalServiceChargeAmount - transId - userAssetDribbletDetails required: - total - userAssetDribblets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/dust-btc: post: operationId: asset/dust-btc summary: Get Assets That Can Be Converted Into BNB (USER_DATA) description: 'Weight(IP): 1' tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account assets available to be converted to BNB content: application/json: schema: type: object properties: details: type: array items: type: object properties: asset: type: string example: "ADA" assetFullName: type: string example: "ADA" amountFree: type: string example: "6.21" description: "Convertible amount" toBTC: type: string example: "0.00016848" description: "BTC amount" toBNB: type: string example: "0.01777302" description: "BNB amount(Not deducted commission fee" toBNBOffExchange: type: string example: "0.01741756" description: "BNB amount(Deducted commission fee" exchange: type: string example: "0.00035546" description: "Commission fee" required: - asset - assetFullName - amountFree - toBTC - toBNB - toBNBOffExchange - exchange totalTransferBtc: type: string example: "0.00016848" totalTransferBNB: type: string example: "0.01777302" dribbletPercentage: type: string example: "0.02" description: "Commission fee" required: - details - totalTransferBtc - totalTransferBNB - dribbletPercentage '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' # /sapi/v1/asset/dust: # post: # operationId: asset/dust # summary: Dust Transfer (USER_DATA) # description: |- # Convert dust assets to BNB. # Weight(UID): 10 # tags: # - Wallet # parameters: # - name: asset # in: query # required: true # description: The asset being converted. For example, asset=BTC&asset=USDT # schema: # type: array # items: # type: string # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Dust log records # content: # application/json: # schema: # type: object # properties: # totalServiceCharge: # type: string # example: "0.02102542" # totalTransfered: # type: string # example: "1.05127099" # transferResult: # type: array # items: # type: object # properties: # amount: # type: string # example: "0.03000000" # fromAsset: # type: string # example: "ETH" # operateTime: # type: integer # format: int64 # example: 1563368549307 # serviceChargeAmount: # type: string # example: "0.00500000" # tranId: # type: integer # format: int64 # example: 2970932918 # transferedAmount: # type: string # example: "0.25000000" # required: # - amount # - fromAsset # - operateTime # - serviceChargeAmount # - tranId # - transferedAmount # required: # - totalServiceCharge # - totalTransfered # - transferResult # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' /sapi/v1/asset/assetDividend: get: operationId: asset/assetDividend summary: Asset Dividend Record (USER_DATA) description: |- Query asset Dividend Record Weight(IP): 10 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int32 default: 20 maximum: 500 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Records of asset devidend content: application/json: schema: type: object properties: rows: type: array items: type: object properties: id: type: integer format: int64 example: 242006910 amount: type: string example: "10.00000000" asset: type: string example: "BHFT" divTime: type: integer format: int64 example: 1563189166000 enInfo: type: string example: "BHFT distribution" tranId: type: integer format: int64 example: 2968885920 required: - id - amount - asset - divTime - enInfo - tranId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/assetDetail: get: operationId: asset/assetDetail summary: Asset Detail (USER_DATA) description: |- 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 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset detail content: application/json: schema: type: object properties: CTR: type: object properties: minWithdrawAmount: type: string example: "70.00000000" depositStatus: type: boolean example: false description: deposit status (false if ALL of networks' are false) withdrawFee: type: integer format: int64 example: 35 withdrawStatus: type: boolean description: withdrawStatus status (false if ALL of networks' are false) depositTip: type: string example: "Delisted, Deposit Suspended" required: - minWithdrawAmount - depositStatus - withdrawFee - withdrawStatus - depositTip required: - CTR '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/tradeFee: get: operationId: asset/tradeFee summary: Trade Fee (USER_DATA) description: |- Fetch trade fee Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Trade fee info per symbol content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "ADABNB" makerCommission: type: string example: "0.001" takerCommission: type: string example: "0.001" required: - symbol - makerCommission - takerCommission '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/transfer: get: operationId: asset/transfer summary: Query User Universal Transfer History (USER_DATA) description: |- - `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 tags: - Wallet parameters: - $ref: '#/components/parameters/univTransferType' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/fromSymbol' - $ref: '#/components/parameters/toSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Universal transfer history content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: asset: type: string example: "USDT" amount: type: string example: "1" type: type: string example: "MAIN_UMFUTUR" status: type: string example: "CONFIRMED" tranId: type: integer format: int64 example: 11415955596 timestamp: type: integer format: int64 example: 1544433328000 required: - asset - amount - type - status - tranId - timestamp required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: post-user-universal-transfer summary: User Universal Transfer (USER_DATA) description: |- 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 account - UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account - CMFUTURE_MAIN COIN-M Futures account transfer to Spot account - CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account - MARGIN_MAIN Margin(cross)account transfer to Spot account - MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures - MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures - ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account - MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account - ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account - MAIN_FUNDING Spot account transfer to Funding account - FUNDING_MAIN Funding account transfer to Spot account - FUNDING_UMFUTURE Funding account transfer to UMFUTURE account - UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - MARGIN_FUNDING MARGIN account transfer to Funding account - FUNDING_MARGIN Funding account transfer to Margin account - FUNDING_CMFUTURE Funding account transfer to CMFUTURE account - CMFUTURE_FUNDING CMFUTURE account transfer to Funding account - MAIN_OPTION Spot account transfer to Options account - OPTION_MAIN Options account transfer to Spot account - UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account - OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account - MARGIN_OPTION Margin(cross)account transfer to Options account - OPTION_MARGIN Options account transfer to Margin(cross)account - FUNDING_OPTION Funding account transfer to Options account - OPTION_FUNDING Options account transfer to Funding account - MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account - PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account - MAIN_ISOLATED_MARGIN Spot account transfer to Isolated margin account - ISOLATED_MARGIN_MAIN Isolated margin account transfer to Spot account Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/univTransferType' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/fromSymbol' - $ref: '#/components/parameters/toSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 13526853623 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/get-funding-asset: post: operationId: asset/get-funding-asset summary: Funding Wallet (USER_DATA) description: |- - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/needBtcValuation' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Funding asset detail content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" free: type: string example: "1" locked: type: string example: "0" freeze: type: string example: "0" withdrawing: type: string example: "0" btcValuation: type: string example: "0.00000091" required: - asset - free - locked - freeze - withdrawing - btcValuation '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v3/asset/getUserAsset: post: operationId: asset_get_user_asset summary: User Asset (USER_DATA) description: |- Get user assets, just for positive data. Weight(IP): 5 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/needBtcValuation' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: User assets content: application/json: schema: type: array items: type: object properties: asset: type: string example: AVAX free: type: string example: '1' locked: type: string example: '0' freeze: type: string example: '0' withdrawing: type: string example: '0' ipoable: type: string example: '0' btcValuation: type: string example: '0' required: - asset - free - locked - freeze - withdrawing - ipoable - btcValuation '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/convert-transfer: post: operationId: asset/convert-transfer summary: Convert Transfer (USER_DATA) description: |- 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 tags: - Wallet parameters: - name: clientTranId in: query description: The unique flag, the min length is 20 required: true schema: type: string - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: targetAsset in: query description: Target asset you want to convert required: true schema: type: string example: "BNB" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Conversion Information content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 118263407119 status: type: string example: "S" required: - tranId - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/convert-transfer/queryByPage: get: operationId: asset/convert-transfer/queryByPage summary: Query Convert Transfer (USER_DATA) description: |- Weight(UID): 5 tags: - Wallet parameters: - name: tranId in: query description: The transaction id required: false schema: type: integer format: int64 example: 118263615991 - name: asset in: query required: false description: If it is blank, we will match deducted asset and target asset. schema: type: string example: "BTC" - name: startTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - name: endTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - name: accountType in: query description: "MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet" schema: type: string enum: ['MAIN', 'CARD'] - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Query Convert Transfer content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: tranId: type: integer format: int64 example: 118263407119 type: type: integer format: int64 example: 244 time: type: integer format: int64 example: 1664442078000 deductedAsset: type: string example: "BUSD" deductedAmount: type: string example: "1" targetAsset: type: string example: "USDC" targetAmount: type: string example: "1" status: type: string example: "S" accountType: type: string example: "MAIN" required: - tranId - type - time - deductedAsset - deductedAmount - targetAsset - targetAmount - status - accountType required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage: get: operationId: asset/ledger-transfer/cloud-mining/queryByPage summary: Get Cloud-Mining payment and refund history (USER_DATA) description: |- The query of Cloud-Mining payment and refund history Weight(UID): 600 tags: - Wallet parameters: - name: tranId in: query description: The transaction id required: false schema: type: integer format: int64 example: 118263615991 - name: clientTranId in: query description: The unique flag required: false schema: type: string - name: asset in: query required: false description: If it is blank, we will query all assets schema: type: string example: "BTC" - name: startTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - name: endTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cloud Mining Payment and Refund History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: createTime: type: integer format: int64 example: 1667880112000 tranId: type: integer format: int64 example: 121230610120 type: type: integer format: int64 example: 248 asset: type: string example: "USDT" amount: type: string example: "1" status: type: string example: "S" required: - createTime - tranId - type - asset - amount - status required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/apiRestrictions: get: operationId: account/apiRestrictions summary: Get API Key Permission (USER_DATA) description: 'Weight(IP): 1' tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: API Key permissions content: application/json: schema: type: object properties: ipRestrict: type: boolean example: false createTime: type: integer format: int64 example: 1623840271000 enableInternalTransfer: type: boolean description: This option authorizes this key to transfer funds between your master account and your sub account instantly enableFutures: type: boolean example: false description: API Key created before your futures account opened does not support futures API service enablePortfolioMarginTrading: type: boolean example: false description: API Key created before your activate portfolio margin does not support portfolio margin API service enableVanillaOptions: type: boolean example: false description: Authorizes this key to Vanilla options trading permitsUniversalTransfer: type: boolean description: Authorizes this key to be used for a dedicated universal transfer API to transfer multiple supported currencies. Each business's own transfer API rights are not affected by this authorization enableReading: type: boolean example: true enableSpotAndMarginTrading: type: boolean example: false enableWithdrawals: type: boolean example: false description: This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals enableMargin: type: boolean example: false description: This option can be adjusted after the Cross Margin account transfer is completed tradingAuthorityExpirationTime: type: integer format: int64 example: 1628985600000 description: Expiration time for spot and margin trading permission required: - ipRestrict - createTime - enableWithdrawals - enableInternalTransfer - permitsUniversalTransfer - enableVanillaOptions - enableReading - enableFutures - enableMargin - enableSpotAndMarginTrading - tradingAuthorityExpirationTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/contract/convertible-coins: get: operationId: capital/contract/convertible-coins summary: Query auto-converting stable coins (USER_DATA) description: |- Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' tags: - Wallet security: - ApiKeyAuth: [] responses: '200': description: User's auto-conversion settings i content: application/json: schema: type: object properties: convertEnabled: type: boolean coins: type: array items: type: string example: "USDC" exchangeRates: type: object properties: USDC: type: string example: "1" TUSD: type: string example: "1" USDP: type: string example: "1" required: - USDC - TUSD - USDP required: - convertEnabled - coins - exchangeRates '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: toggle-stable-coin-conversion summary: Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) description: |- User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' tags: - Wallet parameters: - name: coin in: query required: true description: "Must be USDC, USDP or TUSD" schema: type: string - name: enable in: query required: true description: "true: turn on the auto-conversion. false: turn off the auto-conversion" schema: type: boolean security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/virtualSubAccount: post: operationId: sub-account-virtualSubAccount summary: Create a Virtual Sub-account(For Master Account) description: |- - 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 tags: - Sub-Account parameters: - name: subAccountString in: query description: Please input a string. We will create a virtual email using that string for you to register required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Return the created virtual email content: application/json: schema: type: object properties: email: type: string example: "addsdd_virtual@aasaixwqnoemail.com" required: - email '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/list: get: operationId: sub-account-list summary: Query Sub-account List (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountEmail' - name: isFreeze in: query schema: type: string enum: ['true', 'false'] - $ref: '#/components/parameters/page' - name: limit in: query description: Default 1; max 200 schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of sub-accounts content: application/json: schema: type: object properties: subAccounts: type: array items: type: object properties: email: type: string example: "testsub@gmail.com" isFreeze: type: boolean example: false createTime: type: integer format: int64 example: 1544433328000 isManagedSubAccount: type: boolean example: false isAssetManagementSubAccount: type: boolean example: false required: - email - isFreeze - createTime - isManagedSubAccount - isAssetManagementSubAccount required: - subAccounts '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/sub/transfer/history: get: operationId: sub-account-sub/transfer/history summary: Sub-account Spot Asset Transfer History (For Master Account) description: |- - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountFromEmail' - $ref: '#/components/parameters/optionalSubAccountToEmail' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - name: limit in: query description: Default 1 schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub-account Spot Asset Transfer History content: application/json: schema: type: array items: type: object properties: from: type: string example: aaa@test.com to: type: string example: bbb@test.com asset: type: string example: BTC qty: type: string example: 10 status: type: string example: SUCCESS tranId: type: integer format: int64 example: 6489943656 time: type: integer format: int64 example: 1544433328000 required: - from - to - asset - qty - status - tranId - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/internalTransfer: get: operationId: sub-account-futures/internalTransfer summary: Sub-account Futures Asset Transfer History (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: futuresType in: query description: '1:USDT-margined Futures, 2: Coin-margined Futures' required: true schema: type: integer format: int32 example: 2 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - name: limit in: query description: 'Default value: 50, Max value: 500' schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub-account Futures Asset Transfer History content: application/json: schema: type: object properties: success: type: boolean futuresType: type: integer format: int32 example: 2 transfers: type: array items: type: object properties: from: type: string example: "aaa@test.com" to: type: string example: "bbb@test.com" asset: type: string example: "BTC" qty: type: string example: "1" tranId: type: integer format: int64 example: 11897001102 time: type: integer format: int64 example: 1544433328000 required: - from - to - asset - qty - tranId - time required: - success - futuresType - transfers '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: post-sub-account-future-asset-transfer summary: Sub-account Futures Asset Transfer (For Master Account) description: |- - Master account can transfer max 2000 times a minute Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountFromEmail' - $ref: '#/components/parameters/subAccountToEmail' - name: futuresType in: query required: true description: '1:USDT-margined Futures,2: Coin-margined Futures' schema: type: integer format: int32 example: 2 - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Asset Transfer Info content: application/json: schema: type: object properties: success: type: boolean txnId: type: string example: "2934662589" required: - success - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v3/sub-account/assets: get: operationId: set-sub-account-assets summary: Sub-account Assets (For Master Account) description: |- Fetch sub-account assets Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of assets balances content: application/json: schema: type: object properties: balances: type: array items: type: object properties: asset: type: string example: "ADA" free: type: integer format: int64 example: 10000 locked: type: integer format: int64 example: 0 required: - asset - free - locked required: - balances '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/spotSummary: get: operationId: sub-account-spotSummary summary: Sub-account Spot Assets Summary (For Master Account) description: |- Get BTC valued asset summary of subaccounts. Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountEmail' - $ref: '#/components/parameters/page' - name: size in: query description: Default:10 Max:20 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Summary of Sub-account Spot Assets content: application/json: schema: type: object properties: totalCount: type: integer format: int64 example: 1 masterAccountTotalAsset: type: string example: "0.23231201" spotSubUserAssetBtcVoList: type: array items: type: object properties: email: type: string example: "sub123@test.com" totalAsset: type: string example: "9999.00000000" required: - email - totalAsset required: - totalCount - masterAccountTotalAsset - spotSubUserAssetBtcVoList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/subAddress: get: operationId: capital/deposit/subAddress summary: Sub-account Spot Assets Summary (For Master Account) description: |- Fetch sub-account deposit address Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/coin' - $ref: '#/components/parameters/network' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Deposit address info content: application/json: schema: type: object properties: address: type: string example: "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV" coin: type: string example: "USDT" tag: type: string example: "" url: type: string example: "https://tronscan.org/#/address/TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV" required: - address - coin - tag - url '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/subHisrec: get: operationId: capital/deposit/subHisrec summary: Sub-account Deposit History (For Master Account) description: |- Fetch sub-account deposit history Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/optionalCoin' - name: status in: query description: '0(0:pending,6: credited but cannot withdraw, 1:success)' schema: type: integer format: int32 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int64 - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub-account deposit history content: application/json: schema: type: array items: type: object properties: amount: type: string example: "0.00999800" coin: type: string example: "PAXG" network: type: string example: "ETH" status: type: integer format: int32 example: 1 address: type: string example: "0x788cabe9236ce061e5a892e1a59395a81fc8d62c" addressTag: type: string example: "" txId: type: string example: "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3" insertTime: type: integer format: int64 example: 1599621997000 transferType: type: integer format: int32 example: 0 confirmTimes: type: string example: "12/12" required: - amount - coin - network - status - address - addressTag - txId - insertTime - transferType - confirmTimes '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/credit-apply: post: operationId: capital/deposit/credit-apply summary: One click arrival deposit apply (USER_DATA) description: |- Apply deposit credit for expired address (One click arrival) Weight(IP): 1 tags: - Wallet parameters: - name: depositId in: query description: Deposit record Id, priority use schema: type: integer format: int64 - name: txId in: query description: Deposit txId, used when depositId is not specified schema: type: string - name: subAccountId in: query schema: type: integer format: int64 - name: subUserId in: query schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: deposit result content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: boolean example: true success: type: boolean example: true required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/wallet/balance: get: operationId: asset/wallet/balance summary: Query User Wallet Balance (USER_DATA) description: |- Query User Wallet Balance Weight(IP): 60 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: wallet balance content: application/json: schema: type: array items: type: object properties: activate: type: boolean example: true balance: type: string example: "0" walletName: type: string example: "Spot" required: - activate - balance - walletName '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/custody/transfer-history: get: operationId: asset/custody/transfer-history summary: Query User Delegation History(For Master Account) (USER_DATA) description: |- Query User Delegation History Weight(IP): 60 tags: - Wallet parameters: - name: email in: query required: true schema: type: string example: "alice@test.com" - name: startTime in: query required: true schema: type: integer format: int64 example: 1695205406000 - name: endTime in: query required: true schema: type: integer format: int64 example: 1695205396000 - name: type in: query schema: type: string example: "Delegate" - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Delegation History content: application/json: schema: type: object properties: total: type: integer example: 3316 rows: type: array items: type: object properties: clientTranId: type: string example: "293915932290879488" transferType: type: string example: "Undelegate" asset: type: string example: "ETH" amount: type: string example: "1" time: type: integer format: int64 example: 1695205406000 required: - clientTranId - transferType - asset - amount - time required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/address/list: get: operationId: capital/deposit/address/list summary: Fetch deposit address list with network (USER_DATA) description: |- Fetch deposit address list with network. Weight(IP): 10 tags: - Wallet parameters: - name: coin in: query required: true schema: type: string example: "BTC" - name: network in: query schema: type: string example: "BTC" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Coin address content: application/json: schema: type: array items: type: object properties: coin: type: string example: "ETH" address: type: string example: "0xD316E95Fd9E8E237Cb11f8200Babbc5D8D177BA4" isDefault: type: integer format: int32 example: 1 required: - coin - address - isDefault '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/status: get: operationId: sub-account-status summary: Sub-account's Status on Margin/Futures (For Master Account) description: |- - If no `email` sent, all sub-accounts' information will be returned. Weight(IP): 10 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Status on Margin/Futures content: application/json: schema: type: array items: type: object properties: email: type: string example: "123@test.com" isSubUserEnabled: type: boolean isUserActive: type: boolean insertTime: type: integer format: int64 example: 1570791523523 description: sub account create time isMarginEnabled: type: boolean isFutureEnabled: type: boolean mobile: type: integer format: int64 example: 1570791523523 description: user mobile number required: - email - isSubUserEnabled - isUserActive - insertTime - isMarginEnabled - isFutureEnabled - mobile '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/enable: post: operationId: sub-account-margin/enable summary: Enable Margin for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin status content: application/json: schema: type: object properties: email: type: string example: "123@test.com" isMarginEnabled: type: boolean required: - email - isMarginEnabled '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/account: get: operationId: sub-account-margin/account summary: Detail on Sub-account's Margin Account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin sub-account details content: application/json: schema: type: object properties: email: type: string example: "123@test.com" marginLevel: type: string example: "11.64405625" totalAssetOfBtc: type: string example: "6.82728457" totalLiabilityOfBtc: type: string example: "0.58633215" totalNetAssetOfBtc: type: string example: "6.24095242" marginTradeCoeffVo: type: object properties: forceLiquidationBar: type: string example: "1.10000000" description: Liquidation margin ratio marginCallBar: type: string example: "1.50000000" description: Margin call margin ratio normalBar: type: string example: "2.00000000" description: Initial margin ratio required: - forceLiquidationBar - marginCallBar - normalBar marginUserAssetVoList: type: array items: type: object properties: asset: type: string example: "BTC" borrowed: type: string example: "0.00000000" free: type: string example: "0.00499500" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00499500" required: - asset - borrowed - free - interest - locked - netAsset required: - email - marginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - marginTradeCoeffVo - marginUserAssetVoList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/accountSummary: get: operationId: sub-account-margin/accountSummary summary: Summary of Sub-account's Margin Account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin sub-account details content: application/json: schema: type: object properties: totalAssetOfBtc: type: string example: "4.33333333" totalLiabilityOfBtc: type: string example: "2.11111112" totalNetAssetOfBtc: type: string example: "2.22222221" subAccountList: type: array items: type: object properties: email: type: string example: "123@test.com" totalAssetOfBtc: type: string example: "2.11111111" totalLiabilityOfBtc: type: string example: "1.11111111" totalNetAssetOfBtc: type: string example: "1.00000000" required: - email - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc required: - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - subAccountList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/enable: post: operationId: sub-account-futures/enable summary: Enable Futures for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures status content: application/json: schema: type: object properties: email: type: string example: "123@test.com" isFuturesEnabled: type: boolean required: - email - isFuturesEnabled '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/account: get: operationId: query-sub-account-futures-account-v1 summary: Detail on Sub-account's Futures Account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - name: email in: query required: true schema: type: string example: alice@test.com - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures account details content: application/json: schema: type: object properties: email: type: string example: "abc@test.com" asset: type: string example: "USDT" assets: type: array items: type: object properties: asset: type: string example: "USDT" initialMargin: type: string example: "0.00000000" maintenanceMargin: type: string example: "0.00000000" marginBalance: type: string example: "0.88308000" maxWithdrawAmount: type: string example: "0.88308000" openOrderInitialMargin: type: string example: "0.00000000" positionInitialMargin: type: string example: "0.00000000" unrealizedProfit: type: string example: "0.00000000" walletBalance: type: string example: "0.88308000" required: - asset - initialMargin - maintenanceMargin - marginBalance - maxWithdrawAmount - openOrderInitialMargin - positionInitialMargin - unrealizedProfit - walletBalance canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer format: int64 example: 2 maxWithdrawAmount: type: string example: "0.88308000" totalInitialMargin: type: string example: "0.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "0.88308000" totalOpenOrderInitialMargin: type: string example: "0.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "0.88308000" updateTime: type: integer format: int64 example: 1576756674610 required: - email - asset - assets - canDeposit - canTrade - canWithdraw - feeTier - maxWithdrawAmount - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - updateTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/accountSummary: get: operationId: sub-account-futures-accountSummary summary: Summary of Sub-account's Futures Account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures account summary content: application/json: schema: type: object properties: totalInitialMargin: type: string example: "9.83137400" totalMaintenanceMargin: type: string example: "0.41568700" totalMarginBalance: type: string example: "23.03235621" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.83137400" totalUnrealizedProfit: type: string example: "0.03219710" totalWalletBalance: type: string example: "22.15879444" asset: type: string example: "USD" subAccountList: type: array items: type: object properties: email: type: string example: "123@test.com" totalInitialMargin: type: string example: "9.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "22.12659734" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "22.12659734" asset: type: string example: "USD" required: - email - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset required: - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset - subAccountList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/positionRisk: get: operationId: sub-account-futures/positionRisk summary: Futures Position-Risk of Sub-account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures account summary content: application/json: schema: type: array items: type: object properties: entryPrice: type: string example: "9975.12000" leverage: type: string example: "50" description: current initial leverage maxNotional: type: string example: "1000000" description: notional value limit of current initial leverage liquidationPrice: type: string example: "7963.54" markPrice: type: string example: "9973.50770517" positionAmount: type: string example: "0.010" symbol: type: string example: "BTCUSDT" unrealizedProfit: type: string example: "-0.01612295" required: - entryPrice - leverage - maxNotional - liquidationPrice - markPrice - positionAmount - symbol - unrealizedProfit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/transfer: post: operationId: sub-account-futures/transfer summary: Transfer for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query description: |- * `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 required: true schema: type: integer format: int32 minimum: 1 maximum: 4 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/transfer: post: operationId: sub-account-margin/transfer summary: Margin Transfer for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query description: |- * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account required: true schema: type: integer format: int32 minimum: 1 maximum: 2 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transfer/subToSub: post: operationId: sub-account-transfer/subToSub summary: Transfer to Sub-account of Same Master (For Sub-account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountToEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transfer/subToMaster: post: operationId: sub-account-transfer/subToMaster summary: Transfer to Master (For Sub-account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transfer/subUserHistory: get: operationId: sub-account-transfer-subUserHistory summary: Sub-account Transfer History (For Sub-account) description: |- - 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 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalAsset' - name: type in: query description: |- * `1` - transfer in * `2` - transfer out schema: type: integer format: int32 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: array items: type: object properties: counterParty: type: string example: "master" email: type: string example: "master@test.com" type: type: integer format: int32 example: 1 description: 1 for transfer in, 2 for transfer out asset: type: string example: "BTC" qty: type: string example: "1" fromAccountType: type: string example: "SPOT" toAccountType: type: string example: "SPOT" status: type: string example: "SUCCESS" tranId: type: integer format: int64 example: 11798835829 time: type: integer format: int64 example: 1544433325000 required: - counterParty - email - type - asset - qty - fromAccountType - toAccountType - status - tranId - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/universalTransfer: get: operationId: sub-account-universalTransfer summary: Universal Transfer History (For Master Account) description: |- - `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 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountFromEmail' - $ref: '#/components/parameters/optionalSubAccountToEmail' - $ref: '#/components/parameters/clientTranId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - name: limit in: query description: Default 500, Max 500 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer History content: application/json: schema: type: array items: type: object properties: tranId: type: integer format: int64 example: 11945860693 fromEmail: type: string example: "master@test.com" toEmail: type: string example: "subaccount1@test.com" asset: type: string example: "BTC" amount: type: string example: "0.1" fromAccountType: type: string example: "SPOT" toAccountType: type: string example: "COIN_FUTURE" status: type: string example: "SUCCESS" createTimeStamp: type: integer format: int64 example: 1544433325000 clientTranId: type: string example: "11945860694" required: - tranId - fromEmail - toEmail - asset - amount - fromAccountType - toAccountType - status - createTimeStamp - clientTranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: operationId: universal-transfer-master-account summary: Universal Transfer (For Master Account) description: |- - 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 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountFromEmail' - $ref: '#/components/parameters/optionalSubAccountToEmail' - name: fromAccountType in: query required: true schema: type: string enum: ["SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN","ISOLATED_MARGIN"] - name: toAccountType in: query required: true schema: type: string enum: ["SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN","ISOLATED_MARGIN"] - $ref: '#/components/parameters/clientTranId' - name: symbol in: query description: Only supported under ISOLATED_MARGIN type schema: type: string example: BNBUSDT - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 11945860693 clientTranId: type: string example: "11945860694" required: - tranId - clientTranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/futures/account: get: operationId: query-sub-account-futures-account-v2 summary: Detail on Sub-account's Futures Account V2 (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: futuresType in: query description: |- * `1` - USDT Margined Futures * `2` - COIN Margined Futures required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: USDT or COIN Margined Futures Details content: application/json: schema: oneOf: - $ref: '#/components/schemas/subAccountUSDTFuturesDetails' - $ref: '#/components/schemas/subAccountCOINFuturesDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/futures/accountSummary: get: operationId: query-sub-account-futures-account-summary summary: Summary of Sub-account's Futures Account V2 (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - name: futuresType in: query description: |- * `1` - USDT Margined Futures * `2` - COIN Margined Futures required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/page' - name: limit in: query description: Default 10, Max 20 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: USDT or COIN Margined Futures Summary content: application/json: schema: oneOf: - $ref: '#/components/schemas/subAccountUSDTFuturesSummary' - $ref: '#/components/schemas/subAccountCOINFuturesSummary' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/futures/positionRisk: get: operationId: query-sub-account-futures-position-risk summary: Futures Position-Risk of Sub-account V2 (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: futuresType in: query description: |- * `1` - USDT Margined Futures * `2` - COIN Margined Futures required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: USDT or COIN Margined Futures Position Risk content: application/json: schema: oneOf: - $ref: '#/components/schemas/subAccountUSDTFuturesPositionRisk' - $ref: '#/components/schemas/subAccountCOINFuturesPositionRisk' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/blvt/enable: post: operationId: sub-account-blvt/enable summary: Enable Leverage Token for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: enableBlvt in: query description: Only true for now required: true schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: BLVT status content: application/json: schema: type: object properties: email: type: string example: "123@test.com" enableBlvt: type: boolean required: - email - enableBlvt '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/deposit: post: operationId: managed-subaccount/deposit summary: Deposit assets into the managed sub-account(For Investor Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountToEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 66157362489 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/asset: get: operationId: managed-subaccount/asset summary: Managed sub-account asset details(For Investor Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of asset details content: application/json: schema: type: array items: type: object properties: coin: type: string example: "INJ" name: type: string example: "Injective Protocol" totalBalance: type: string example: "0" availableBalance: type: string example: "0" inOrder: type: string example: "0" btcValue: type: string example: "0" required: - coin - name - totalBalance - availableBalance - inOrder - btcValue '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/withdraw: post: operationId: managed-subaccount/withdraw summary: Withdrawl assets from the managed sub-account(For Investor Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountFromEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: transferDate in: query description: Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 66157362489 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/accountSnapshot: get: operationId: managed-subaccount/accountSnapshot summary: Managed sub-account snapshot (For Investor Master Account) description: |- - 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 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: type in: query required: true description: "\"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM)" schema: type: string example: 'SPOT' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: min 7, max 30, default 7 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' responses: '200': description: Sub-account spot snapshot content: application/json: schema: type: object properties: code: type: integer format: int32 example: 200 msg: type: string example: '' snapshotVos: type: array items: type: object properties: data: type: object properties: balances: type: array items: type: object properties: asset: type: string example: BTC free: type: string example: '0.09905021' locked: type: string example: '0.00000000' required: - asset - free - locked totalAssetOfBtc: type: string example: '0.09942700' required: - balances - totalAssetOfBtc type: type: string example: spot updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/queryTransLogForInvestor: get: operationId: managed-subaccount/queryTransLogForInvestor summary: Query Managed Sub Account Transfer Log (For Investor Master Account) description: |- 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 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - name: transfers in: query required: false description: Transfer Direction (FROM/TO) schema: type: string example: 'FROM' - name: transferFunctionAccountType in: query required: false description: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) schema: type: string example: 'SPOT' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub account transfer logs (for invest account) content: application/json: schema: type: object properties: count: type: integer format: int32 example: 2 managerSubTransferHistoryVos: type: array items: type: object properties: fromEmail: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" fromAccountType: type: string example: "SPOT" toEmail: type: string example: "wdywl0lddakh@test.com" toAccountType: type: string example: "SPOT" asset: type: string example: "BNB" amount: type: string example: "0.01" scheduledData: type: integer format: int64 example: 1626144956000 createTime: type: integer format: int64 example: 1626144956000 status: type: string example: "SUCCESS" tranId: type: integer example: 91077779 required: - fromEmail - fromAccountType - toEmail - toAccountType - asset - amount - scheduledData - createTime - status - tranId required: - count - managerSubTransferHistoryVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/queryTransLogForTradeParent: get: operationId: managed-subaccount/queryTransLogForTradeParent summary: Query Managed Sub Account Transfer Log (For Trading Team Master Account) description: |- 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 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - name: transfers in: query required: false description: Transfer Direction (FROM/TO) schema: type: string example: 'FROM' - name: transferFunctionAccountType in: query required: false description: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) schema: type: string example: 'SPOT' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub account transfer logs (for trading team) content: application/json: schema: type: object properties: count: type: integer format: int32 example: 2 managerSubTransferHistoryVos: type: array items: type: object properties: fromEmail: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" fromAccountType: type: string example: "SPOT" toEmail: type: string example: "wdywl0lddakh@test.com" toAccountType: type: string example: "SPOT" asset: type: string example: "BNB" amount: type: string example: "0.01" scheduledData: type: integer format: int64 example: 1626144956000 createTime: type: integer format: int64 example: 1626144956000 status: type: string example: "SUCCESS" tranId: type: integer example: 91077779 required: - fromEmail - fromAccountType - toEmail - toAccountType - asset - amount - scheduledData - createTime - status - tranId required: - count - managerSubTransferHistoryVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/fetch-future-asset: get: operationId: managed-subaccount/fetch-future-asset summary: Query Managed Sub-account Futures Asset Details (For Investor Master Account) description: |- Investor can use this api to query managed sub account futures asset details tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account futures assset details content: application/json: schema: type: object properties: code: type: integer format: int32 example: 200 message: type: string example: "OK" snapshotVos: type: array items: type: object properties: type: type: string example: "FUTURES" updateTime: type: integer format: int64 example: 1626400907000 data: type: object properties: assets: type: array items: type: object properties: asset: type: string example: "USDT" marginBalance: type: number format: float example: 100 walletBalance: type: number format: float example: 100 required: - asset - marginBalance - walletBalance position: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" entryPrice: type: number format: float example: 17000 markPrice: type: number format: float example: 17000 positionAmt: type: number format: float example: 0.1 required: - symbol - entryPrice - markPrice - positionAmt required: - assets - position required: - type - updateTime - data required: - code - message - snapshotVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/marginAsset: get: operationId: managed-subaccount/marginAsset summary: Query Managed Sub-account Margin Asset Details (For Investor Master Account) description: |- Investor can use this api to query managed sub account margin asset details tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account margin assset details content: application/json: schema: type: object properties: marginLevel: type: string example: "999" totalAssetOfBtc: type: string example: "0" totalLiabilityOfBtc: type: string example: "0" totalNetAssetOfBtc: type: string example: "0" userAssets: type: array items: type: object properties: asset: type: string example: "BTC" borrowed: type: string example: "0" free: type: string example: "0" interest: type: string example: "0" locked: type: string example: "0" netAsset: type: string example: "0" required: - asset - borrowed - free - interest - locked - netAsset required: - marginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - userAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/info: get: operationId: managed-subaccount/info summary: Query Managed Sub-account List (For Investor) description: |- Get investor's managed sub-account list. Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub account list content: application/json: schema: type: object properties: total: type: integer example: 3 managerSubUserInfoVoList: type: array items: type: object properties: rootUserId: type: integer format: int64 example: 1000138475670 managersubUserId: type: integer format: int64 example: 1000137842513 bindParentUserId: type: integer format: int64 example: 1000138475669 email: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" insertTimeStamp: type: integer format: int64 example: 1678435149000 bindParentEmail: type: string example: "wdyw8xsh8pey@test.com" isSubUserEnabled: type: boolean example: true isUserActive: type: boolean example: true isMarginEnabled: type: boolean example: true isFutureEnabled: type: boolean example: true isSignedLVTRiskAgreement: type: boolean example: true required: - rootUserId - managersubUserId - bindParentUserId - insertTimeStamp - bindParentEmail - isSubUserEnabled - isUserActive - isMarginEnabled - isFutureEnabled - isSignedLVTRiskAgreement required: - total - managerSubUserInfoVoList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/deposit/address: get: operationId: managed-subaccount/deposit/address summary: Get Managed Sub-account Deposit Address (For Investor Master Account) description: |- Get investor's managed sub-account deposit address Weight(UID): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/coin' - $ref: '#/components/parameters/network' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub deposit address content: application/json: schema: type: object properties: coin: type: string example: "USDT" address: type: string example: "0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d" tag: type: string url: type: string example: "https://etherscan.io/address/0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d" required: - coin - address - tag - url '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/query-trans-log: get: operationId: managed-subaccount/query-trans-log summary: Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) description: |- Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - name: transfers in: query required: true description: Transfer Direction schema: type: string enum: [FROM, TO] - name: transferFunctionAccountType in: query required: true description: Transfer function account type schema: type: string enum: [SPOT, MARGIN, ISOLATED_MARGIN, USDT_FUTURE, COIN_FUTURE] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub deposit address content: application/json: schema: type: object properties: count: type: integer example: 2 managerSubTransferHistoryVos: type: array items: type: object properties: fromEmail: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" fromAccountType: type: string example: "SPOT" toEmail: type: string example: "wdywl0lddakh@test.com" toAccountType: type: string example: "SPOT" asset: type: string example: "BNB" amount: type: string example: "0.01" scheduledData: type: integer format: int64 example: 1679416673000 createTime: type: integer format: int64 example: 1679416673000 status: type: string example: "SUCCESS" tranId: type: integer format: int64 example: 91077779 required: - fromEmail - fromAccountType - toEmail - toAccountType - asset - amount - scheduledData - createTime - status - tranId required: - count - managerSubTransferHistoryVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/subAccountApi/ipRestriction: get: operationId: query-sub-account-subAccountApi-ipRestriction summary: Get IP Restriction for a Sub-account API Key (For Master Account) description: 'Weight(UID): 3000' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/subAccountApiKey' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: IP Restriction information content: application/json: schema: type: object properties: ipRestrict: type: string example: "true" ipList: type: array items: type: string example: - "69.210.67.14" - "8.34.21.10" updateTime: type: integer format: int64 example: 1636369557189 apiKey: type: string example: "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" required: - ipRestrict - ipList - updateTime - apiKey '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList: delete: operationId: sub-account-delete-ip-list summary: Delete IP List for a Sub-account API Key (For Master Account) description: "Weight(UID): 3000" tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/subAccountApiKey' - $ref: '#/components/parameters/optionalIpAddress' - $ref: '#/components/parameters/thirdPartyName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Delete IP information content: application/json: schema: type: object properties: ipRestrict: type: string example: "true" ipList: type: array items: type: string example: - "69.210.67.14" - "thirdPartyName" updateTime: type: integer format: int64 example: 1636369557189 apiKey: type: string example: "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" required: - ipRestrict - ipList - updateTime - apiKey '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transaction-statistics: get: operationId: sub-account-transaction-statistics summary: Query Sub-account Transaction Statistics (For Master Account) description: |- Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account transaction statistics content: application/json: schema: type: object properties: recent30BtcTotal: type: string example: "0" recent30BtcFuturesTotal: type: string example: "0" recent30BtcMarginTotal: type: string example: "0" recent30BusdTotal: type: string example: "0" recent30BusdFuturesTotal: type: string example: "0" recent30BusdMarginTotal: type: string example: "0" tradeInfoVos: type: array items: type: object properties: userId: type: integer format: int64 example: 1000138138384 btc: type: number format: float example: 0 btcFutures: type: number format: float example: 0 btcMargin: type: number format: float example: 0 busd: type: number format: float example: 0 busdFutures: type: number format: float example: 0 busdMargin: type: number format: float example: 0 date: type: integer format: int64 example: 1676851200000 required: - recent30BtcTotal - recent30BtcFuturesTotal - recent30BtcMarginTotal - recent30BusdTotal - recent30BusdFuturesTotal - recent30BusdMarginTotal - tradeInfoVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/eoptions/enable: post: operationId: sub-account-eoptions/enable summary: Enable Options for Sub-account (For Master Account)(USER_DATA) description: |- Enable Options for Sub-account (For Master Account). Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account EOptions status content: application/json: schema: type: object properties: email: type: string example: "alice@test.com" isEOptionsEnabled: type: boolean example: true required: - email - isEOptionsEnabled '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/subAccountApi/ipRestriction: post: operationId: set-sub-account-subAccountApi-ipRestriction summary: Update IP Restriction for Sub-Account API key (For Master Account) description: |- Update IP Restriction for Sub-Account API key Weight(UID): 3000 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/subAccountApiKey' - name: status in: query required: true description: IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only schema: type: string example: "1" - $ref: '#/components/parameters/thirdPartyName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Update IP Restriction content: application/json: schema: type: object properties: status: type: string example: "2" ipList: type: array items: type: string example: - "69.210.67.14" - "8.34.21.10" - "thirdPartyName" updateTime: type: integer format: int64 example: 1636369557189 apiKey: type: string example: k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf required: - status - ipList - updateTime - apiKey '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v4/sub-account/assets: get: operationId: query-sub-account-assets summary: Query Sub-account Assets (For Master Account) description: |- Fetch sub-account assets Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account balances content: application/json: schema: type: object properties: balances: type: array items: type: object properties: asset: type: string example: "BNB" free: type: string example: "10000" locked: type: string example: "0" required: - asset - free - locked required: - balances '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/userDataStream: post: operationId: create-userDataStream summary: Create a ListenKey (USER_STREAM) description: |- 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 tags: - Stream security: - ApiKeyAuth: [] responses: '200': description: Listen key content: application/json: schema: type: object properties: listenKey: type: string example: "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" required: - listenKey put: operationId: ping-keep-alive-listen-key summary: Ping/Keep-alive a ListenKey (USER_STREAM) description: |- 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 tags: - Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: close-listen-key summary: Close a ListenKey (USER_STREAM) description: |- Close out a user data stream. Weight: 2 tags: - Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/userDataStream: post: operationId: create-listen-key-userDataStream summary: Create a ListenKey (USER_STREAM) description: |- 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 tags: - Margin Stream security: - ApiKeyAuth: [] responses: '200': description: Margin listen key content: application/json: schema: type: object properties: listenKey: type: string example: "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" required: - listenKey put: operationId: ping-keep-alive-user-stream summary: Ping/Keep-alive a ListenKey (USER_STREAM) description: |- 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 tags: - Margin Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: close-listen-key-user-stream summary: Close a ListenKey (USER_STREAM) description: |- Close out a user data stream. Weight: 1 tags: - Margin Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/userDataStream/isolated: post: operationId: userDataStream/isolated summary: Generate a Listen Key (USER_STREAM) description: |- 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 tags: - Isolated Margin Stream security: - ApiKeyAuth: [] responses: '200': description: Isolated margin listen key content: application/json: schema: type: object properties: listenKey: type: string example: "T3ee22BIYuWqmvne0HNq2A2WsFlEtLhvWCtItw6ffhhdmjifQ2tRbuKkTHhr" required: - listenKey put: operationId: ping-keep-alive-user-stream-again summary: Ping/Keep-alive a Listen Key (USER_STREAM) description: |- 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 tags: - Isolated Margin Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' delete: operationId: close-listen-key-us summary: Close a ListenKey (USER_STREAM) description: |- Close out a user data stream. Weight: 1 tags: - Isolated Margin Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/fiat/orders: get: operationId: fiat/orders summary: Fiat Deposit/Withdraw History (USER_DATA) description: |- - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(UID): 90000 tags: - Fiat parameters: - $ref: '#/components/parameters/transactionType' - $ref: '#/components/parameters/beginTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/rows' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: History of deposit/withdraw orders content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderNo: type: string example: "7d76d611-0568-4f43-afb6-24cac7767365" fiatCurrency: type: string example: "BRL" indicatedAmount: type: string example: "10.00" amount: type: string example: "10.00" totalFee: type: string example: "0.00" method: type: string example: "BankAccount" status: type: string example: "Expired" description: "Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped" createTime: type: integer format: int64 example: 1626144956000 updateTime: type: integer format: int64 example: 1626400907000 required: - orderNo - fiatCurrency - indicatedAmount - amount - totalFee - method - status - createTime - updateTime total: type: integer format: int32 example: 1 success: type: boolean required: - code - message - data - total - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/fiat/payments: get: operationId: fiat/payments summary: Fiat Payments History (USER_DATA) description: |- - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 tags: - Fiat parameters: - $ref: '#/components/parameters/transactionType' - $ref: '#/components/parameters/beginTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/rows' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: History of fiat payments content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderNo: type: string example: "353fca443f06466db0c4dc89f94f027a" sourceAmount: type: string example: "20.00" description: Fiat trade amount fiatCurrency: type: string example: "EUR" description: Fiat token obtainAmount: type: string example: "4.462" description: Crypto trade amount cryptoCurrency: type: string example: "LUNA" description: Crypto token totalFee: type: string example: "0.2" description: Trade fee price: type: string example: "4.437472" status: type: string example: "Failed" description: Processing, Completed, Failed, Refunded createTime: type: integer format: int64 example: 1624529919000 updateTime: type: integer format: int64 example: 1624529919000 required: - orderNo - sourceAmount - fiatCurrency - obtainAmount - cryptoCurrency - totalFee - price - status - createTime - updateTime total: type: integer format: int32 example: 1 success: type: boolean required: - code - message - data - total - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/project/list: get: operationId: lending/project/list summary: Get Fixed/Activity Project List(USER_DATA) description: 'Weight(IP): 1' tags: - Savings parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/fixedAndActivityProductType' - $ref: '#/components/parameters/optionalFixedAndActivityProductStatus' - $ref: '#/components/parameters/isSortAsc' - $ref: '#/components/parameters/sortBy' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of fixed projects content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" displayPriority: type: integer format: int64 example: 1 duration: type: integer format: int64 example: 90 interestPerLot: type: string example: "1.35810000" interestRate: type: string example: "0.05510000" lotSize: type: string example: "100.00000000" lotsLowLimit: type: integer format: int64 example: 1 lotsPurchased: type: integer format: int64 example: 74155 lotsUpLimit: type: integer format: int64 example: 80000 maxLotsPerUser: type: integer format: int64 example: 2000 needKyc: type: boolean projectId: type: string example: "CUSDT90DAYSS001" projectName: type: string example: "USDT" status: type: string example: "PURCHASING" type: type: string example: "CUSTOMIZED_FIXED" withAreaLimitation: type: boolean required: - asset - displayPriority - duration - interestPerLot - interestRate - lotSize - lotsLowLimit - lotsPurchased - lotsUpLimit - maxLotsPerUser - needKyc - projectId - projectName - status - type - withAreaLimitation '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/customizedFixed/purchase: post: operationId: lending/customizedFixed/purchase summary: Purchase Fixed/Activity Project (USER_DATA) description: 'Weight(IP): 1' tags: - Savings parameters: - $ref: '#/components/parameters/projectId' - $ref: '#/components/parameters/lot' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Generated Purchase Id content: application/json: schema: type: object properties: purchaseId: type: string example: "18356" required: - purchaseId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/project/position/list: get: operationId: lending/project/position/list summary: Get Fixed/Activity Project Position (USER_DATA) description: 'Weight(IP): 1' tags: - Savings parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/fixedAndActivityProjectId' - $ref: '#/components/parameters/optionalFixedAndActivityProductStatus' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of fixed project positions content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" canTransfer: type: boolean createTimestamp: type: integer format: int64 example: 1587010770000 duration: type: integer format: int64 example: 14 endTime: type: integer format: int64 example: 1588291200000 interest: type: string example: "0.19950000" interestRate: type: string example: "0.05201250" lot: type: integer format: int64 example: 1 positionId: type: integer format: int64 example: 51724 principal: type: string example: "100.00000000" projectId: type: string example: "CUSDT14DAYSS001" projectName: type: string example: "USDT" purchaseTime: type: integer format: int64 example: 1587010771000 redeemDate: type: string format: date example: "2020-05-01" startTime: type: integer format: int64 example: 1587081600000 status: type: string example: "HOLDING" type: type: string example: "CUSTOMIZED_FIXED" required: - asset - canTransfer - createTimestamp - duration - endTime - interest - interestRate - lot - positionId - principal - projectId - projectName - purchaseTime - redeemDate - startTime - status - type '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/positionChanged: post: operationId: lending/positionChanged summary: Change Fixed/Activity Position to Daily Position (USER_DATA) description: |- - PositionId is mandatory parameter for fixed position. Weight(IP): 1 tags: - Savings parameters: - $ref: '#/components/parameters/projectId' - $ref: '#/components/parameters/lot' - $ref: '#/components/parameters/optionalPositionId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Purchase information content: application/json: schema: type: object properties: dailyPurchaseId: type: integer format: int64 example: 862290 success: type: boolean time: type: integer format: int64 example: 1577233578000 required: - dailyPurchaseId - success - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/staking/productList: get: operationId: staking/productList summary: Get Staking Product List (USER_DATA) description: |- Get available Staking product list. Weight(IP): 1 tags: - Staking parameters: - $ref: '#/components/parameters/product' - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Product list. content: application/json: schema: type: array items: type: object properties: projectId: type: string example: Axs*90 detail: type: object properties: asset: type: string example: AXS rewardAsset: type: string example: AXS duration: type: integer format: int64 example: 90 renewable: type: boolean example: true apy: type: string example: '1.2069' required: - asset - rewardAsset - duration - renewable - apy quota: type: object properties: totalPersonalQuota: type: string example: '2' minimum: type: string example: '0.001' required: - totalPersonalQuota - minimum required: - projectId - detail - quota '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/staking/purchase: post: operationId: staking/purchase summary: Purchase Staking Product (USER_DATA) description: 'Weight(IP): 1' tags: - Staking parameters: - $ref: '#/components/parameters/product' - $ref: '#/components/parameters/productId' - $ref: '#/components/parameters/amount' - name: renewable in: query description: true or false, default false. Active if product is `STAKING` or `L_DEFI` schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Position Id. content: application/json: schema: type: object properties: positionId: type: string example: '12345' success: type: boolean example: true required: - positionId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/staking/redeem: post: operationId: staking/redeem summary: Redeem Staking Product (USER_DATA) description: |- Redeem Staking product. Locked staking and Locked DeFI staking belong to early redemption, redeeming in advance will result in loss of interest that you have earned. Weight(IP): 1 tags: - Staking parameters: - $ref: '#/components/parameters/product' - name: positionId in: query description: Mandatory if product is `STAKING` or `L_DEFI` schema: type: string - $ref: '#/components/parameters/productId' - name: amount in: query description: Mandatory if product is `F_DEFI` schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Success. content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/staking/position: get: operationId: staking/position summary: Get Staking Product Position (USER_DATA) description: 'Weight(IP): 1' tags: - Staking parameters: - $ref: '#/components/parameters/product' - name: productId in: query schema: type: string - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Position. content: application/json: schema: type: array items: type: object properties: positionId: type: string example: '123123' projectId: type: string example: Axs*90 asset: type: string example: AXS amount: type: string example: '122.09202928' purchaseTime: type: string example: '1646182276000' duration: type: string example: '60' accrualDays: type: string example: '4' rewardAsset: type: string example: AXS APY: type: string example: '0.2032' rewardAmt: type: string example: '5.17181528' extraRewardAsset: type: string example: BNB extraRewardAPY: type: string example: '0.0203' estExtraRewardAmt: type: string example: '5.17181528' nextInterestPay: type: string example: '1.29295383' nextInterestPayDate: type: string example: '1646697600000' payInterestPeriod: type: string example: '1' redeemAmountEarly: type: string example: '2802.24068892' interestEndDate: type: string example: '1651449600000' deliverDate: type: string example: '1651536000000' redeemPeriod: type: string example: '1' redeemingAmt: type: string example: '232.2323' partialAmtDeliverDate: type: string example: '1651536000000' canRedeemEarly: type: boolean example: true renewable: type: boolean example: true type: type: string example: AUTO status: type: string example: HOLDING required: - positionId - projectId - asset - amount - purchaseTime - duration - accrualDays - rewardAsset - APY - rewardAmt - extraRewardAsset - extraRewardAPY - estExtraRewardAmt - nextInterestPay - nextInterestPayDate - payInterestPeriod - redeemAmountEarly - interestEndDate - deliverDate - redeemPeriod - redeemingAmt - partialAmtDeliverDate - canRedeemEarly - renewable - type - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/staking/stakingRecord: get: operationId: staking/stakingRecord summary: Get Staking History (USER_DATA) description: 'Weight(IP): 1' tags: - Staking parameters: - $ref: '#/components/parameters/product' - name: txnType in: query required: true description: '`SUBSCRIPTION`, `REDEMPTION`, `INTEREST`' schema: type: string - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Staking History. content: application/json: schema: type: array items: type: object properties: positionId: type: string example: '123123' time: type: integer format: int64 example: 1575018510000 asset: type: string example: BNB project: type: string example: BSC amount: type: string example: '21312.23223' lockPeriod: type: string example: '30' deliverDate: type: string example: '1575018510000' type: type: string example: AUTO status: type: string example: success required: - positionId - time - asset - project - amount - lockPeriod - deliverDate - type - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/staking/setAutoStaking: post: operationId: staking/setAutoStaking summary: Set Auto Staking (USER_DATA) description: |- Set auto staking on Locked Staking or Locked DeFi Staking Weight(IP): 1 tags: - Staking parameters: - name: product in: query required: true description: |- * `STAKING` - for Locked Staking * `L_DEFI` - for locked DeFi Staking schema: type: string - name: positionId in: query required: true schema: type: string - name: renewable in: query required: true description: true or false schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Success. content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/staking/personalLeftQuota: get: operationId: staking/personalLeftQuota summary: Get Personal Left Quota of Staking Product (USER_DATA) description: 'Weight(IP): 1' tags: - Staking parameters: - $ref: '#/components/parameters/product' - $ref: '#/components/parameters/productId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Quota. content: application/json: schema: type: array items: type: object properties: leftPersonalQuota: type: string example: '1000' required: - leftPersonalQuota '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/pub/algoList: get: operationId: mining/pub/algoList summary: Acquiring Algorithm (MARKET_DATA) description: 'Weight(IP): 1' security: - ApiKeyAuth: [] tags: - Mining responses: '200': description: Algorithm information content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: algoName: type: string example: "sha256" algoId: type: integer format: int64 example: 1 poolIndex: type: integer format: int64 example: 0 unit: type: string example: "h/s" required: - algoName - algoId - poolIndex - unit required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/pub/coinList: get: operationId: mining/pub/coinList summary: Acquiring CoinName (MARKET_DATA) description: 'Weight(IP): 1' security: - ApiKeyAuth: [] tags: - Mining responses: '200': description: Coin information content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: coinName: type: string example: "BTC" coinId: type: integer format: int64 example: 1 poolIndex: type: integer format: int64 example: 0 algoId: type: integer format: int64 example: 1 algoName: type: string example: "sha256" required: - coinName - coinId - poolIndex - algoId - algoName required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/worker/detail: get: operationId: mining/worker/detail summary: Request for Detail Miner List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/workerName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of workers' hashrates' content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: workerName: type: string example: "bhdc1.16A10404B" description: Mining Account name type: type: string example: "H_hashrate" description: Type of hourly hashrate hashrateDatas: type: array items: type: object properties: time: type: integer format: int64 example: 1587902400000 hashrate: type: string example: "0" reject: type: integer format: int64 example: 0 description: Rejection Rate required: - time - hashrate - reject required: - workerName - type - hashrateDatas required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/worker/list: get: operationId: mining/worker/list summary: Request for Miner List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/sortColumn' - $ref: '#/components/parameters/workerStatus' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of workers content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: workerDatas: type: array items: type: object properties: workerId: type: string example: "1420554439452400131" workerName: type: string example: "2X73" status: type: integer format: int64 example: 3 description: "Status:1 valid, 2 invalid, 3 no longer valid" hashRate: type: integer format: int64 example: 0 description: Real-time rate dayHashRate: type: integer format: int64 example: 0 description: 24H Hashrate rejectRate: type: integer format: int64 example: 0 description: Real-time Rejection Rate lastShareTime: type: integer format: int64 example: 1587712919000 description: Last submission time required: - workerId - workerName - status - hashRate - dayHashRate - rejectRate - lastShareTime totalNum: type: integer format: int64 example: 18530 pageSize: type: integer format: int64 example: 20 required: - workerDatas - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/payment/list: get: operationId: mining/payment/list summary: Earnings List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/optionalCoin' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of earnings content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: accountProfits: type: array items: type: object properties: time: type: integer format: int64 example: 1586188800000 description: Mining date type: type: integer format: int64 example: 31 description: "0:Mining Wallet,5:Mining Address,7:Pool Savings,8:Transferred,31:Income Transfer ,32:Hashrate Resale-Mining Wallet 33:Hashrate Resale-Pool Savings" hashTransfer: type: integer format: "nullable" example: null description: Transferred Hashrate transferAmount: type: number format: "nullable" example: null description: Transferred Income dayHashRate: type: integer format: int64 example: 129129903378244 description: Daily Hashrate profitAmount: type: number format: double example: 8.6083060304 description: Earnings Amount coinName: type: string example: "BTC" description: Coin Type status: type: integer format: int32 example: 2 description: "Status:0:Unpaid, 1:Paying 2:Paid" required: - time - type - hashTransfer - transferAmount - dayHashRate - profitAmount - coinName - status totalNum: type: integer format: int64 example: 3 description: Total Rows pageSize: type: integer format: int64 example: 20 description: Rows per page required: - accountProfits - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/payment/other: get: operationId: mining/payment/other summary: Extra Bonus List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/optionalCoin' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of extra bonuses content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: otherProfits: type: array items: type: object properties: time: type: integer format: int64 example: 1607443200000 description: Mining date coinName: type: string example: "BTC" description: Coin Name type: type: integer format: int32 example: 4 description: '1: Merged Mining, 2: Activity Bonus, 3:Rebate 4:Smart Pool 6:Income Transfer 7:Pool Savings' profitAmount: type: number format: double example: 0.0011859 status: type: integer format: int32 example: 2 description: '0:Unpaid, 1:Paying 2:Paid' required: - time - coinName - type - profitAmount - status totalNum: type: integer format: int64 example: 3 description: Total Rows pageSize: type: integer format: int64 example: 20 description: Rows per page required: - otherProfits - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/config/details/list: get: operationId: mining/hash-transfer/config/details/list summary: Hashrate Resale List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of hashrate resales content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: configDetails: type: array items: type: object properties: configId: type: integer format: int64 example: 168 description: Mining ID poolUsername: type: string example: "123" description: Transfer out of subaccount toPoolUsername: type: string example: "user1" description: Transfer into subaccount algoName: type: string example: "Ethash" description: Transfer algorithm hashRate: type: integer format: int64 example: 5000000 description: Transferred Hashrate quantity startDay: type: integer format: int64 example: 20201210 description: Start date endDay: type: integer format: int64 example: 20210405 description: End date status: type: integer format: int32 example: 1 description: "0 Processing, 1:Cancelled, 2:Terminated " required: - configId - poolUsername - toPoolUsername - algoName - hashRate - startDay - endDay - status totalNum: type: integer format: int64 example: 21 pageSize: type: integer format: int64 example: 200 required: - configDetails - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/profit/details: get: operationId: mining/hash-transfer/profit/details summary: Hashrate Resale Details (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/configId' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of hashrate resale details content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: profitTransferDetails: type: array items: type: object properties: poolUsername: type: string example: "test4001" description: Transfer out of sub-account toPoolUsername: type: string example: "pop" description: Transfer into subaccount algoName: type: string example: "sha256" description: Transfer algorithm hashRate: type: integer format: int64 example: 200000000000 description: Transferred Hashrate quantity day: type: integer format: int64 example: 20201213 description: Transfer date amount: type: number format: double example: 0.2256872 description: Transfer income coinName: type: string example: "BTC" required: - poolUsername - toPoolUsername - algoName - hashRate - day - amount - coinName totalNum: type: integer format: int64 example: 8 pageSize: type: integer format: int64 example: 200 required: - profitTransferDetails - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/config: post: operationId: mining/hash-transfer/config summary: Hashrate Resale Request (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/toPoolUser' - $ref: '#/components/parameters/hashRate' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Mining Account Id content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: integer format: int64 example: 171 description: Mining Account required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/config/cancel: post: operationId: mining/hash-transfer/config/cancel summary: Cancel Hashrate Resale configuration (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/configId' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Success flag content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: boolean required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/statistics/user/status: get: operationId: mining/statistics/user/status summary: Statistic List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Mining account statistics content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: fifteenMinHashRate: type: string example: "457835490067496409.00000000" dayHashRate: type: string example: "214289268068874127.65000000" validNum: type: integer format: int64 example: 0 invalidNum: type: integer format: int64 example: 17562 profitToday: type: object properties: BTC: type: string example: "0.00314332" BSV: type: string example: "56.17055953" BCH: type: string example: "106.61586001" required: - BTC - BSV - BCH profitYesterday: type: object properties: BTC: type: string example: "0.00314332" BSV: type: string example: "56.17055953" BCH: type: string example: "106.61586001" required: - BTC - BSV - BCH userName: type: string example: "test" unit: type: string example: "h/s" algo: type: string example: "sha256" required: - fifteenMinHashRate - dayHashRate - validNum - invalidNum - profitToday - profitYesterday - userName - unit - algo required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/statistics/user/list: get: operationId: mining/statistics/user/list summary: Account List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of mining accounts content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: type: type: string example: "H_hashrate" userName: type: string example: "test" list: type: array items: type: object properties: time: type: integer format: int64 example: 1585267200000 hashrate: type: string example: "0.00000000" reject: type: string example: "0.00000000" required: - time - hashrate - reject required: - type - userName - list required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/payment/uid: get: operationId: mining/payment/uid summary: Mining Account Earning (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Mining account earnings content: application/json: schema: type: object properties: code: type: integer format: int32 example: 0 msg: type: string example: "" data: type: object properties: accountProfits: type: array items: type: object properties: time: type: integer format: int64 example: 1607443200000 coinName: type: string example: "BTC" type: type: integer format: int32 description: "0:Referral 1:Refund 2:Rebate" example: 2 puid: type: integer format: int32 description: "puid" example: 59985472 subName: type: string description: "Mining account" example: "vdvaghani" amount: type: number example: 0.09186957 required: - time - coinName - type - puid - subName - amount totalNum: type: integer format: int32 example: 3 pageSize: type: integer format: int32 example: 20 required: - accountProfits - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/futures/transfer: post: operationId: futures/transfer summary: New Future Account Transfer (USER_DATA) description: |- Execute transfer between spot account and futures account. Weight(IP): 1 tags: - Futures parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query required: true description: "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." schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Transfer content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 100000001 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: operationId: get-future-account-transaction-history summary: Get Future Account Transaction History List (USER_DATA) description: |- Weight(IP): 10 tags: - Futures parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/startTimeReq' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Transfer Query content: application/json: schema: type: object properties: rows: type: array items: type: object properties: asset: type: string example: "USDT" tranId: type: integer format: int64 example: 100000001 amount: type: string example: "40.84624400" type: type: string example: "1" timestamp: type: integer format: int64 example: 1555056425000 status: type: string description: "one of PENDING (pending to execution), CONFIRMED (successfully transfered), FAILED (execution failed, nothing happened to your account);" example: "CONFIRMED" required: - asset - tranId - amount - type - timestamp - status total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/futures/histDataLink: get: operationId: futures/histDataLink summary: Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) description: |- Weight(IP): 1 tags: - Futures parameters: - name: symbol in: query required: true schema: type: string example: "BTCUSDT" - name: dataType in: query required: true schema: type: string enum: ['T_DEPTH', 'S_DEPTH'] example: "T_DEPTH" - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: data link content: application/json: schema: type: object properties: data: type: array items: type: object properties: day: type: string example: "2023-06-30" url: type: string example: "https://bin-prod-user-rebate-bucket.s3.ap-northeast-1.amazonaws.com/xxx" required: - day - url required: - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/newOrderVp: post: operationId: algo/futures/newOrderVp summary: Volume Participation(VP) New Order (TRADE) description: |- 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/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive "success": true, but the order status will be expired after we check it. Weight(UID): 3000 tags: - Futures Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/positionSide' - name: quantity in: query required: true description: "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" schema: type: number format: double - name: urgency in: query description: "Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH" required: true schema: type: string enum: ['LOW', 'MEDIUM', 'HIGH'] example: "LOW" - name: clientAlgoId in: query description: "A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value" schema: type: string example: "00358ce6a268403398bd34eaa36dffe7" - name: reduceOnly in: query description: "'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position" schema: type: boolean - name: limitPrice in: query description: "Limit price of the order; If it is not sent, will place order by market price by default" schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Volume Participation(VP) Order content: application/json: schema: type: object properties: clientAlgoId: type: string example: "00358ce6a268403398bd34eaa36dffe7" success: type: boolean example: true code: type: integer format: int64 example: 0 msg: type: string example: "OK" required: - clientAlgoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/newOrderTwap: post: operationId: algo/futures/newOrderTwap summary: Time-Weighted Average Price(Twap) New Order (TRADE) description: |- 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/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive "success": true, but the order status will be expired after we check it. - quantity * 60 / duration should be larger than minQty - duration cannot be less than 5 mins or more than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. Weight(UID): 3000 tags: - Futures Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/positionSide' - name: quantity in: query required: true description: "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" schema: type: number format: double - name: duration in: query description: "Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h" required: true schema: type: integer format: int64 example: 300 - name: clientAlgoId in: query description: "A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value" schema: type: string example: "00358ce6a268403398bd34eaa36dffe7" - name: reduceOnly in: query description: "'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position" schema: type: boolean - name: limitPrice in: query description: "Limit price of the order; If it is not sent, will place order by market price by default" schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Time-Weighted Average Price(Twap) New Order content: application/json: schema: type: object properties: clientAlgoId: type: string example: "00358ce6a268403398bd34eaa36dffe7" success: type: boolean example: true code: type: integer format: int64 example: 0 msg: type: string example: "OK" required: - clientAlgoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/order: delete: operationId: cancel-algo-futures-order summary: Cancel Algo Order(TRADE) description: |- 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 tags: - Futures Algo parameters: - name: algoId in: query description: "Eg. 14511" required: true schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled order content: application/json: schema: type: object properties: algoId: type: integer format: int64 example: 14511 success: type: boolean example: true code: type: integer format: int64 example: 0 msg: type: string example: "OK" required: - algoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/openOrders: get: operationId: algo/futures/openOrders summary: Query Current Algo Open Orders (USER_DATA) description: |- - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 tags: - Futures Algo parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Open Algo Orders content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 orders: type: array items: type: object properties: algoId: type: integer format: int64 example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" positionSide: type: string example: "SHORT" totalQty: type: string example: "5.00" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.00000000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 0 algoStatus: type: string example: "WORKING" algoType: type: string example: "VP" urgency: type: string example: "LOW" required: - algoId - symbol - side - positionSide - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/historicalOrders: get: operationId: algo/futures/historicalOrders summary: Query Historical Algo Orders (USER_DATA) description: |- - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 tags: - Futures Algo parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/optionalSide' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - name: pageSize in: query description: Page size, minimum 1, maximum 100, default 100 schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Historical Algo Orders content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 orders: type: array items: type: object properties: algoId: type: integer format: int64 example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" positionSide: type: string example: "SHORT" totalQty: type: string example: "5.00" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.00000000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 1649757088101 algoStatus: type: string example: "WORKING" algoType: type: string example: "VP" urgency: type: string example: "LOW" required: - algoId - symbol - side - positionSide - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/subOrders: get: operationId: algo/futures/subOrders summary: Query Sub Orders (USER_DATA) description: |- - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 tags: - Futures Algo parameters: - name: algoId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/page' - name: pageSize in: query description: Page size, minimum 1, maximum 100, default 100 schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub orders content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 executedQty: type: string example: "1.000" executedAmt: type: string example: "3229.44000000" subOrders: type: array items: type: object properties: algoId: type: integer format: int64 example: 13723 orderId: type: integer format: int64 example: 8389765519993908929 orderStatus: type: string example: "FILLED" executedQty: type: string example: "1.000" executedAmt: type: string example: "3229.44000000" feeAmt: type: string example: "-1.61471999" feeAsset: type: string example: "USDT" bookTime: type: integer format: int64 example: 1649756817004 avgPrice: type: string example: "3229.44" side: type: string example: "SELL" symbol: type: string example: "ETHUSDT" subId: type: integer format: int64 example: 1 timeInForce: type: string example: "IMMEDIATE_OR_CANCEL" origQty: type: string example: "1.000" required: - algoId - orderId - orderStatus - executedAmt - feeAmt - feeAsset - bookTime - avgPrice - side - symbol - subId - timeInForce - origQty required: - total - executedQty - executedAmt - subOrders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/newOrderTwap: post: operationId: algo/spot/newOrderTwap summary: Time-Weighted Average Price (Twap) New Order description: |- Place a new spot TWAP order with Algo service. Weight(UID): 3000 tags: - Spot Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/quantity' - name: duration in: query required: true schema: type: integer format: int32 example: 300 - name: clientAlgoId in: query schema: type: string - name: limitPrice in: query schema: type: number format: float - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap order response content: application/json: schema: type: object properties: clientAlgoId: type: string example: "65ce1630101a480b85915d7e11fd5078" success: type: boolean example: true code: type: integer example: 0 msg: type: string example: "OK" required: - clientAlgoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/order: delete: operationId: cancel-algo-spot-order summary: Cancel Algo Order description: |- Cancel an open TWAP order Weight(IP): 1 tags: - Spot Algo parameters: - name: algoId in: query required: true schema: type: integer format: int64 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled twap order response content: application/json: schema: type: object properties: algoId: type: integer format: int64 example: 14511 success: type: boolean example: true code: type: integer example: 0 msg: type: string example: "OK" required: - algoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/openOrders: get: operationId: algo/spot/openOrders summary: Query Current Algo Open Orders description: |- Get all open SPOT TWAP orders Weight(IP): 1 tags: - Spot Algo parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap open orders content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 orders: type: array items: type: object properties: algoId: type: integer example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" totalQty: type: string example: "5.000" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 1649756817004 algoStatus: type: string example: "WORKING" algoType: type: string example: "TWAP" urgency: type: string example: "LOW" required: - algoId - symbol - side - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/historicalOrders: get: operationId: algo/spot/historicalOrders summary: Query Historical Algo Orders description: |- Get all historical SPOT TWAP orders Weight(IP): 1 tags: - Spot Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap historical orders content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 orders: type: array items: type: object properties: algoId: type: integer example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" totalQty: type: string example: "5.000" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 1649756817004 algoStatus: type: string example: "WORKING" algoType: type: string example: "VP" urgency: type: string example: "LOW" required: - algoId - symbol - side - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/subOrders: get: operationId: algo/spot/subOrders summary: Query Sub Orders description: |- Get respective sub orders for a specified algoId Weight(IP): 1 tags: - Spot Algo parameters: - name: algoId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap sub orders content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 executedQty: type: string example: "1.000" executedAmt: type: string example: "3229.44000000" subOrders: type: array items: type: object properties: algoId: type: integer example: 14517 orderId: type: integer format: int64 example: 8389765519993908929 orderStatus: type: string example: "FILLED" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.000" feeAmt: type: string example: "-1.61471999" feeAsset: type: string example: "USDT" bookTime: type: integer format: int64 example: 1649319001964 avgPrice: type: string example: "3229.44" side: type: string example: "SELL" symbol: type: string example: "ETHUSDT" subId: type: integer example: 1 timeInForce: type: string example: "IMMEDIATE_OR_CANCEL" origQty: type: string example: "1.000" required: - algoId - orderId - orderStatus - executedQty - executedAmt - feeAmt - feeAsset - bookTime - avgPrice - side - symbol - subId - timeInForce - origQty required: - total - executedQty - executedAmt - subOrders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/account: get: operationId: portfolio/account summary: Portfolio Margin Account (USER_DATA) description: |- Get the account info 'Weight(IP): 1' tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Portfolio account. content: application/json: schema: type: object properties: uniMMR: type: string example: '1.87987800' description: Classic Portfolio margin account maintenance margin rate accountEquity: type: string example: "122607.35137903" description: Account equity, unit is USD actualEquity: type: string example: '142607.35137903' description: Actual equity, unit is USD accountMaintMargin: type: string example: '23.72469206' description: Classic Portfolio margin account maintenance margin, unit is USD accountStatus: type: string example: NORMAL description: Classic Portfolio margin account status:"NORMAL", "MARGIN_CALL", "SUPPLY_MARGIN", "REDUCE_ONLY", "ACTIVE_LIQUIDATION", "FORCE_LIQUIDATION", "BANKRUPTED" accountType: type: string example: "PM_1" description: PM_1 for classic PM, PM_2 for PM required: - uniMMR - accountEquity - actualEquity - accountMaintMargin - accountStatus - accountType '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/collateralRate: get: operationId: portfolio/collateralRate summary: Portfolio Margin Collateral Rate (MARKET_DATA) description: |- Portfolio Margin Collateral Rate. Weight(IP): 50 security: - ApiKeyAuth: [] tags: - Portfolio Margin responses: '200': description: Portfolio Margin Collateral Rate. content: application/json: schema: type: array items: type: object properties: asset: type: string example: USDC collateralRate: type: string example: '1.0000' required: - asset - collateralRate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/pmLoan: get: operationId: portfolio/pmLoan summary: Portfolio Margin Bankruptcy Loan Amount (USER_DATA) description: |- Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Portfolio Margin Bankruptcy Loan Amount. content: application/json: schema: type: object properties: asset: type: string example: BUSD amount: type: string example: '579.45' required: - asset - amount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/repay: post: operationId: portfolio/repay summary: Portfolio Margin Bankruptcy Loan Repay (USER_DATA) description: |- Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 tags: - Portfolio Margin parameters: - name: from in: query schema: type: string example: "SPOT" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transaction. content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 58203331886213500 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/interest-history: get: operationId: portfolio/interest-history summary: Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) description: |- Query interest history of negative balance for portfolio margin. Weight(IP): 50 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Balance interest history content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" interest: type: string example: "24.4440" interestAccruedTime: type: integer format: int64 example: 1672801339253 interestRate: type: string example: "0.0001164" principal: type: string example: "210000" required: - asset - interest - interestAccruedTime - interestRate - principal '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/asset-index-price: get: operationId: portfolio/asset-index-price summary: Query Portfolio Margin Asset Index Price (MARKET_DATA) description: |- Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset security: - ApiKeyAuth: [] tags: - Portfolio Margin parameters: - name: asset in: query schema: type: string example: "BTC" responses: '200': description: asset price index content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" assetIndexPrice: type: string example: "28251.9136906" time: type: integer format: int64 example: 1683518338121 required: - asset - assetIndexPrice - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/auto-collection: post: operationId: portfolio/auto-collection summary: Fund Auto-collection (USER_DATA) description: |- Transfers all assets from Futures Account to Margin account Weight(IP): 1500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/bnb-transfer: post: operationId: portfolio/bnb-transfer summary: BNB Transfer (USER_DATA) description: |- BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 tags: - Portfolio Margin parameters: - name: transferSide in: query required: true schema: type: string enum: ['TO_UM','FROM_UM'] example: 'TO_UM' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 100000001 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/repay-futures-switch: post: operationId: portfolio/repay-futures-switch summary: Change Auto-repay-futures Status (USER_DATA) description: |- Change Auto-repay-futures Status Weight(IP): 1500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/autoRepay' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: operationId: get-auto-repay-futures-status summary: Get Auto-repay-futures Status (USER_DATA) description: |- Query Auto-repay-futures Status Weight(IP): 30 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: autoRepay: type: boolean example: true required: - autoRepay '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/repay-futures-negative-balance: post: operationId: portfolio/repay-futures-negative-balance summary: Repay futures Negative Balance (USER_DATA) description: |- Repay futures Negative Balance Weight(IP): 1500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/margin-asset-leverage: get: operationId: portfolio/margin-asset-leverage summary: Get Portfolio Margin Asset Leverage (USER_DATA) description: |- Weight(IP): 50 tags: - Portfolio Margin responses: '200': description: Classic Portfolio Margin Collateral Rate content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDC" collateralRate: type: string example: '1.0000' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/asset-collection: post: operationId: portfolio/asset-collection summary: Fund Collection by Asset (USER_DATA) description: |- Transfers specific asset from Futures Account to Margin account Weight(IP): 60 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/tokenInfo: get: operationId: blvt/tokenInfo summary: BLVT Info (MARKET_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' security: - ApiKeyAuth: [] responses: '200': description: List of token information content: application/json: schema: type: array items: type: object properties: tokenName: type: string example: "BTCDOWN" description: type: string example: "3X Short Bitcoin Token" underlying: type: string example: "BTC" tokenIssued: type: string example: "717953.95" basket: type: string example: "-821.474 BTCUSDT Futures" currentBaskets: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" amount: type: string example: "-1183.984" notionalValue: type: string example: "-22871089.96704" required: - symbol - amount - notionalValue nav: type: string example: "4.79" realLeverage: type: string example: "-2.316" fundingRate: type: string example: "0.001020" dailyManagementFee: type: string example: "0.0001" purchaseFeePct: type: string example: "0.0010" dailyPurchaseLimit: type: string example: "100000.00" redeemFeePct: type: string example: "0.0010" dailyRedeemLimit: type: string example: "1000000.00" timestamp: type: integer format: int64 example: 1583127900000 required: - tokenName - description - underlying - tokenIssued - basket - currentBaskets - nav - realLeverage - fundingRate - dailyManagementFee - purchaseFeePct - dailyPurchaseLimit - redeemFeePct - dailyRedeemLimit - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/subscribe: post: operationId: blvt/subscribe summary: Subscribe BLVT (USER_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/blvtTokenName' - name: cost in: query description: Spot balance required: true schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Subscription Info content: application/json: schema: type: object properties: id: type: integer format: int64 example: 123 status: type: string example: "S" description: 'S, P, and F for "success", "pending", and "failure"' tokenName: type: string example: "LINKUP" amount: type: string example: "0.9559090500" description: subscribed token amount cost: type: string example: "9.99999995" description: subscription cost in usdt timestamp: type: integer format: int64 example: 1600249972899 required: - id - status - tokenName - amount - cost - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/subscribe/record: get: operationId: blvt/subscribe/record summary: Query Subscription Record (USER_DATA) description: |- - Only the data of the latest 90 days is available Weight(IP): 1 tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - name: id in: query schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of subscription record content: application/json: schema: type: object properties: id: type: integer format: int64 example: 1 tokenName: type: string example: "LINKUP" amount: type: string example: "0.54216292" description: Subscription amount nav: type: string example: "18.42621386" description: NAV price of subscription fee: type: string example: "0.00999000" description: Subscription fee in usdt totalCharge: type: string example: "9.99999991" description: Subscription cost in usdt timestamp: type: integer format: int64 example: 1599127217916 required: - id - tokenName - amount - nav - fee - totalCharge - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/redeem: post: operationId: blvt/redeem summary: Redeem BLVT (USER_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/blvtTokenName' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redemption record content: application/json: schema: type: object properties: id: type: integer format: int64 example: 123 status: type: string example: "S" description: 'S, P, and F for "success", "pending", and "failure"' tokenName: type: string example: "LINKUP" redeemAmount: type: string example: "0.95590905" description: Redemption token amount amount: type: string example: "10.05022099" description: Redemption value in usdt timestamp: type: integer format: int64 example: 1600250279614 required: - id - status - tokenName - redeemAmount - amount - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/redeem/record: get: operationId: blvt/redeem/record summary: Redemption Record (USER_DATA) description: |- - Only the data of the latest 90 days is available Weight(IP): 1 tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - name: id in: query schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int32 description: 'default 1000, max 1000' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of redemption record content: application/json: schema: type: array items: type: object properties: id: type: integer format: int64 example: 1 tokenName: type: string example: "LINKUP" amount: type: string example: "0.54216292" description: Redemption amount nav: type: string example: "18.36345064" description: NAV of redemption fee: type: string example: "0.00995598" description: Reemption fee netProceed: type: string example: "9.94602604" description: Net redemption value in usdt timestamp: type: integer format: int64 example: 1599128003050 required: - id - tokenName - amount - nav - fee - netProceed - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/userLimit: get: operationId: blvt/userLimit summary: BLVT User Limit Info (USER_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of token limits content: application/json: schema: type: array items: type: object properties: tokenName: type: string example: "LINKUP" userDailyTotalPurchaseLimit: type: string example: "1000" description: USDT userDailyTotalRedeemLimit: type: string example: "1000" description: USDT required: - tokenName - userDailyTotalPurchaseLimit - userDailyTotalRedeemLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/pools: get: operationId: bswap/pools summary: List All Swap Pools (MARKET_DATA) description: |- Get metadata about all swap pools. Weight(IP): 1 tags: - BSwap security: - ApiKeyAuth: [] responses: '200': description: List of Swap Pools content: application/json: schema: type: array items: type: object properties: poolId: type: integer format: int64 example: 2 poolName: type: string example: "BUSD/USDT" assets: type: array items: type: string minItems: 2 maxItems: 2 example: - BUSD - USDT required: - poolId - poolName - assets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/liquidity: get: operationId: bswap/liquidity summary: Liquidity information of a pool (USER_DATA) description: |- Get liquidity information and user share of a pool. Weight(IP): - `1` for one pool; - `10` when the poolId parameter is omitted; tags: - BSwap parameters: - $ref: '#/components/parameters/optionalPoolId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Pool Liquidation information content: application/json: schema: type: array items: type: object properties: poolId: type: integer format: int64 example: 2 poolNmae: type: string example: "BUSD/USDT" updateTime: type: integer format: int64 example: 1565769342148 liquidity: type: object properties: BUSD: type: number format: double example: 100000315.79 USDT: type: number format: double example: 99999245.54 required: - BUSD - USDT share: type: object properties: shareAmount: type: number format: double example: 12415 sharePercentage: type: number format: double example: 0.00006207 asset: type: object properties: BUSD: type: number format: double example: 6207.02 USDT: type: number format: double example: 6206.95 required: - BUSD - USDT required: - shareAmount - sharePercentage - asset required: - poolId - poolNmae - updateTime - liquidity - share '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/liquidityAdd: post: operationId: bswap/liquidityAdd summary: Add Liquidity (TRADE) description: |- Add liquidity to a pool. Weight(UID): 1000 (Additional: 3 times one second) tags: - BSwap parameters: - $ref: '#/components/parameters/poolId' - name: type in: query description: |- * `Single` - to add a single token * `Combination` - to add dual tokens schema: type: string enum: [Single, Combination] example: 'Single' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/quantity' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Operation Id content: application/json: schema: type: object properties: operationId: type: integer format: int64 example: 12341 required: - operationId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/liquidityRemove: post: operationId: bswap/liquidityRemove summary: Remove Liquidity (TRADE) description: |- Remove liquidity from a pool, `type` include `SINGLE` and `COMBINATION`, asset is mandatory for single asset removal Weight(UID): 1000 (Additional: 3 times one second) tags: - BSwap parameters: - $ref: '#/components/parameters/poolId' - name: type in: query description: |- * `SINGLE` - for single asset removal * `COMBINATION` - for combination of all coins removal required: true schema: type: string enum: [SINGLE, COMBINATION] example: 'SINGLE' - name: asset in: query description: Mandatory for single asset removal schema: type: string example: BNB - name: shareAmount in: query required: true schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Operation Id content: application/json: schema: type: object properties: operationId: type: integer format: int64 example: 12341 required: - operationId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/liquidityOps: get: operationId: bswap/liquidityOps summary: Liquidity Operation Record (USER_DATA) description: |- Get liquidity operation (add/remove) records. Weight(UID): 3000 tags: - BSwap parameters: - name: operationId in: query schema: type: integer format: int64 - $ref: '#/components/parameters/optionalPoolId' - name: operation in: query schema: type: string enum: [ADD, REMOVE] - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Liquidity Operation Record content: application/json: schema: type: array items: type: object properties: operationId: type: integer format: int64 example: 12341 poolId: type: integer format: int64 example: 2 poolName: type: string example: "BUSD/USDT" operation: type: string example: "ADD" description: '"ADD" or "REMOVE"' status: type: integer format: int32 example: 1 description: "0: pending, 1: success, 2: failed" updateTime: type: integer format: int64 example: 1565769342148 shareAmount: type: string example: "10.1" required: - operationId - poolId - poolName - operation - status - updateTime - shareAmount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/quote: get: operationId: bswap/quote summary: Request Quote (USER_DATA) description: |- Request a quote for swap quote asset (selling asset) for base asset (buying asset), essentially price/exchange rates. quoteQty is quantity of quote asset (to sell). Please be noted the quote is for reference only, the actual price will change as the liquidity changes, it's recommended to swap immediate after request a quote for slippage prevention. Weight(UID): 150 tags: - BSwap parameters: - $ref: '#/components/parameters/quoteAsset' - $ref: '#/components/parameters/baseAsset' - $ref: '#/components/parameters/quoteQty' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Quote Info content: application/json: schema: type: object properties: quoteAsset: type: string example: "USDT" baseAsset: type: string example: "BUSD" quoteQty: type: number format: double example: 300000 baseQty: type: number format: double example: 299975 price: type: number format: double example: 1.00008334 slippage: type: number format: double example: 0.00007245 fee: type: number format: double example: 120 required: - quoteAsset - baseAsset - quoteQty - baseQty - price - slippage - fee '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/swap: post: operationId: bswap/swap summary: Swap (TRADE) description: |- Swap `quoteAsset` for `baseAsset`. Weight(UID): 1000 (Additional: 3 times one second) tags: - BSwap parameters: - $ref: '#/components/parameters/quoteAsset' - $ref: '#/components/parameters/baseAsset' - $ref: '#/components/parameters/quoteQty' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Swap Id content: application/json: schema: type: object properties: swapId: type: integer format: int64 example: 2314 required: - swapId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: operationId: swap-history summary: Swap History (USER_DATA) description: |- Get swap history. Weight(UID): 3000 tags: - BSwap parameters: - name: swapId in: query schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: status in: query description: |- * `0` - pending for swap * `1` - success * `2` - failed schema: type: integer format: int32 example: 1 - name: quoteAsset in: query schema: type: string example: 'USDT' - name: baseAsset in: query schema: type: string example: 'BUSD' - name: limit in: query schema: type: integer format: int32 description: 'default 3, max 100' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Swap History content: application/json: schema: type: array items: type: object properties: swapId: type: integer format: int64 example: 2314 swapTime: type: integer format: int64 example: 1565770342148 status: type: integer format: int32 example: 0 description: "0: pending, 1: success, 2: failed" quoteAsset: type: string example: "USDT" baseAsset: type: string example: "BUSD" quoteQty: type: number format: double example: 300000 baseQty: type: number format: double example: 299975 price: type: number format: double example: 1.00008334 fee: type: number format: double example: 120 required: - swapId - swapTime - status - quoteAsset - baseAsset - quoteQty - baseQty - price - fee '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/poolConfigure: get: operationId: bswap/poolConfigure summary: Pool Configure (USER_DATA) description: 'Weight(IP): 150' tags: - BSwap parameters: - name: poolId in: query schema: type: integer format: int64 example: 2 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Pool Information content: application/json: schema: type: array items: type: object properties: poolId: type: integer format: int64 example: 2 poolNmae: type: string example: "BUSD/USDT" updateTime: type: integer format: int64 example: 1565769342148 liquidity: type: object properties: constantA: type: integer format: int64 example: 2000 description: '"NA" if pool is an innovation pool' minRedeemShare: type: number format: double example: 0.1 slippageTolerance: type: number example: 0.2 format: double description: The swap proceeds only when the slippage is within the set range required: - constantA - minRedeemShare - slippageTolerance assetConfigure: type: object properties: BUSD: type: object properties: minAdd: type: integer format: int64 example: 10 maxAdd: type: integer format: int64 example: 20 minSwap: type: integer format: int64 example: 10 maxSwap: type: integer format: int64 example: 30 required: - minAdd - maxAdd - minSwap - maxSwap USDT: type: object properties: minAdd: type: integer format: int64 example: 10 maxAdd: type: integer format: int64 example: 20 minSwap: type: integer format: int64 example: 10 maxSwap: type: integer format: int64 example: 30 required: - minAdd - maxAdd - minSwap - maxSwap required: - BUSD - USDT required: - poolId - poolNmae - updateTime - liquidity - assetConfigure '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/addLiquidityPreview: get: operationId: bswap/addLiquidityPreview summary: Add Liquidity Preview (USER_DATA) description: |- Calculate expected share amount for adding liquidity in single or dual token. Weight(IP): 150 tags: - BSwap parameters: - name: poolId in: query required: true schema: type: integer format: int64 example: 2 - name: type in: query description: |- * `SINGLE` - for adding a single token * `COMBINATION` - for adding dual tokens required: true schema: type: string enum: [SINGLE, COMBINATION] example: 'SINGLE' - $ref: '#/components/parameters/quoteAsset' - $ref: '#/components/parameters/quoteQty' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Add Liquidity Preview content: application/json: schema: oneOf: - $ref: '#/components/schemas/bswapAddLiquidityPreviewCombination' - $ref: '#/components/schemas/bswapAddLiquidityPreviewSingle' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/removeLiquidityPreview: get: operationId: bswap/removeLiquidityPreview summary: Remove Liquidity Preview (USER_DATA) description: |- Calculate the expected asset amount of single token redemption or dual token redemption. Weight(IP): 150 tags: - BSwap parameters: - name: poolId in: query required: true schema: type: integer format: int64 example: 2 - name: type in: query description: |- * `SINGLE` - remove and obtain a single token * `COMBINATION` - remove and obtain dual token required: true schema: type: string enum: [SINGLE, COMBINATION] example: 'SINGLE' - $ref: '#/components/parameters/quoteAsset' - name: shareAmount in: query required: true schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Remove Liquidity Preview content: application/json: schema: oneOf: - $ref: '#/components/schemas/bswapRmvLiquidityPreviewCombination' - $ref: '#/components/schemas/bswapRmvLiquidityPreviewSingle' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/unclaimedRewards: get: operationId: bswap/unclaimedRewards summary: Get Unclaimed Rewards Record (USER_DATA) description: |- Get unclaimed rewards record. Weight(UID): 1000 tags: - BSwap parameters: - $ref: '#/components/parameters/bswapClaimType' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Unclaimed rewards record content: application/json: schema: type: object properties: totalUnclaimedRewards: type: object properties: BUSD: type: number format: float example: 100000315.79 BNB: type: number format: double example: 0.00000001 USDT: type: number format: double example: 0.00000002 required: - BUSD - BNB - USDT details: type: object properties: BNB/USDT: type: object properties: BUSD: type: number format: float example: 100000315.79 USDT: type: number format: double example: 0.00000002 required: - BUSD - USDT BNB/BTC: type: object properties: BNB: type: number format: double example: 0.00000001 required: - BNB required: - BNB/USDT - BNB/BTC required: - totalUnclaimedRewards - details '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/claimRewards: post: operationId: bswap/claimRewards summary: Claim rewards (TRADE) description: |- Claim swap rewards or liquidity rewards Weight(UID): 1000 tags: - BSwap parameters: - $ref: '#/components/parameters/bswapClaimType' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result of claim content: application/json: schema: type: object properties: success: type: boolean required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/claimedHistory: get: operationId: bswap/claimedHistory summary: Get Claimed History (USER_DATA) description: |- Get history of claimed rewards. Weight(UID): 1000 tags: - BSwap parameters: - name: poolId in: query schema: type: integer format: int64 - name: assetRewards in: query schema: type: string - $ref: '#/components/parameters/bswapClaimType' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: Default 3, max 100 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Claimed History content: application/json: schema: type: array items: type: object properties: poolId: type: integer format: int32 example: 52 poolName: type: string example: "BNB/USDT" assetRewards: type: string example: "BNB" claimTime: type: integer format: int64 example: 1565769342148 claimAmount: type: number format: float example: 0.00000023 status: type: integer format: int32 example: 1 description: "0: pending, 1: success" required: - poolId - poolName - assetRewards - claimTime - claimAmount - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/c2c/orderMatch/listUserOrderHistory: get: operationId: c2c/orderMatch/listUserOrderHistory summary: Get C2C Trade History (USER_DATA) description: |- - 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 tags: - C2C parameters: - name: tradeType in: query required: true schema: type: string enum: [BUY, SELL] - name: startTimestamp in: query description: UTC timestamp in ms schema: type: integer format: int64 - name: endTimestamp in: query description: UTC timestamp in ms schema: type: integer format: int64 - $ref: '#/components/parameters/page' - name: rows in: query description: default 100, max 100 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Trades history content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderNumber: type: string example: "20219644646554779648" advNo: type: string example: "11218246497340923904" tradeType: type: string example: "SELL" asset: type: string example: "BUSD" fiat: type: string example: "CNY" fiatSymbol: type: string example: "¥" amount: type: string example: "5000.00000000" description: Quantity (in Crypto) totalPrice: type: string example: "33400.00000000" unitPrice: type: string example: "6.68" description: Unit Price (in Fiat) orderStatus: type: string example: "COMPLETED" description: PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM createTime: type: integer format: int64 example: 1619361369000 commission: type: string example: "0" description: Transaction Fee (in Crypto) counterPartNickName: type: string example: "ab***" advertisementRole: type: string example: "TAKER" required: - orderNumber - advNo - tradeType - asset - fiat - fiatSymbol - amount - totalPrice - unitPrice - orderStatus - createTime - commission - counterPartNickName - advertisementRole total: type: integer format: int32 example: 1 success: type: boolean required: - code - message - data - total - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/ongoing/orders: get: operationId: loan/vip/ongoing/orders summary: Get VIP Loan Ongoing Orders (USER_DATA) description: |- VIP loan is available for VIP users only. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - name: collateralAccountId in: query required: false schema: type: integer format: int64 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/current' - name: limit in: query description: Default 10; max 100. schema: type: integer format: int32 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Ongoing VIP Loan Orders content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: integer format: int64 example: 100000001 loanCoin: type: string example: "BUSD" totalDebt: type: string example: "10000" residualInterest: type: string example: "10.27687923" collateralAccountId: type: string example: "12345678, 23456789" collateralCoin: type: string example: "BNB,BTC,ETH" collateralValue: type: string example: "25000.27565492" description: locked collateral value shown in USD value totalCollateralValueAfterHaircut: type: string example: "25000.27565492" lockedCollateralValue: type: string example: "25000.27565492" currentLTV: type: string example: "0.57" expirationTime: type: integer format: int64 example: 1575018510000 loanDate: type: string example: "1676851200000" loanRate: type: string example: "0.0123" loanTerm: type: string example: "30days" required: - orderId - loanCoin - totalDebt - residualInterest - collateralAccountId - collateralCoin - collateralValue - currentLTV - expirationTime - loanDate - loanRate - loanTerm total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/repay: post: operationId: loan/vip/repay summary: VIP Loan Repay (TRADE) description: |- VIP loan is available for VIP users only. Weight(UID): 6000 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: VIP Loan Repayment content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "200.5" remainingPrincipal: type: string example: "100.5" remainingInterest: type: string example: "0" collateralCoin: type: string example: "BNB,BTC,ETH" currentLTV: type: string example: "0.25" repayStatus: type: string example: "Repaid" description: Repaid, Repaying, Failed required: - loanCoin - repayAmount - remainingPrincipal - remainingInterest - collateralCoin - currentLTV - repayStatus '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/repay/history: get: operationId: loan/vip/repay/history summary: Get VIP Loan Repayment History (USER_DATA) description: |- VIP loan is available for VIP users only. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: Default 10; max 100. schema: type: integer format: int32 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: VIP Loan Repayment History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "10000" collateralCoin: type: string example: "BNB,BTC,ETH" repayStatus: type: string example: "Repaid" description: Repaid, Repaying, Failed repayTime: type: string example: "1575018510000" orderId: type: string example: "756783308056935434" required: - loanCoin - repayAmount - collateralCoin - repayStatus - repayTime - orderId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/collateral/account: get: operationId: loan/vip/collateral/account summary: Check Locked Value of VIP Collateral Account (USER_DATA) description: |- VIP loan is available for VIP users only. Weight(IP): 6000 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - name: collateralAccountId in: query required: false schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: VIP Locked Value content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralAccountId: type: string example: "12345678" collateralCoin: type: string example: "BNB,BTC,ETH" collateralValue: type: string example: "500.27565492" description: locked collateral value shown in USD value required: - collateralAccountId - collateralCoin - collateralValue total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/borrow: post: operationId: loan/vip/borrow summary: VIP Loan Borrow description: |- VIP loan is available for VIP users only. Weight(UID): 6000 tags: - VIP Loans parameters: - name: loanAccountId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/loanCoin' - name: loanAmount in: query required: true schema: type: number format: float - name: collateralAccountId in: query required: true schema: type: string - name: collateralCoin in: query required: true schema: type: string - name: isFlexibleRate in: query required: true schema: type: string enum: ['TRUE', 'FALSE'] example: 'TRUE' - name: loanTerm in: query schema: type: integer - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: loanAccountId: type: string example: "12345678" requestId: type: string example: "12345678" loanCoin: type: string example: "BTC" isFlexibleRate: type: string example: "No" loanAmount: type: string example: "100.55" collateralAccountId: type: string example: "12345678,12345678,12345678" collateralCoin: type: string example: "BUSD,USDT,ETH" loanTerm: type: string example: "30" required: - loanAccountId - requestId - loanCoin - isFlexibleRate - loanAmount - collateralAccountId - collateralCoin '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/loanable/data: get: operationId: loan/vip/loanable/data summary: Get Loanable Assets Data description: |- Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loanable Assets Data content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" _flexibleDailyInterestRate: type: string example: "0.001503" _flexibleYearlyInterestRate: type: string example: "0.548595" _30dDailyInterestRate: type: string example: "0.000136" _30dYearlyInterestRate: type: string example: "0.03450" _60dDailyInterestRate: type: string example: "0.000145" _60dYearlyInterestRate: type: string example: "0.04103" minLimit: type: string example: "100" maxLimit: type: string example: "1000000" vipLevel: type: integer example: 1 required: - loanCoin - _flexibleDailyInterestRate - _flexibleYearlyInterestRate - _30dDailyInterestRate - _30dYearlyInterestRate - _60dDailyInterestRate - _60dYearlyInterestRate - minLimit - maxLimit - vipLevel required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/collateral/data: get: operationId: loan/vip/collateral/data summary: Get Collateral Asset Data (USER_DATA) description: |- Get collateral asset data. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Asset Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralCoin: type: string example: "BUSD" _1stCollateralRatio: type: string example: "100%" _1stCollateralRange: type: string example: "1-10000000" _2ndCollateralRatio: type: string example: "80%" _2ndCollateralRange: type: string example: "10000000-100000000" _3rdCollateralRatio: type: string example: "60%" _3rdCollateralRange: type: string example: "100000000-1000000000" _4thCollateralRatio: type: string example: "0%" _4thCollateralRange: type: string example: ">10000000000" required: - collateralCoin - _1stCollateralRatio - _1stCollateralRange - _2ndCollateralRatio - _2ndCollateralRange - _3rdCollateralRatio - _3rdCollateralRange - _4thCollateralRatio - _4thCollateralRange total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/request/data: get: operationId: loan/vip/request/data summary: Query Application Status (USER_DATA) description: |- Get Application Status Weight(UID): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Application Status content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: loanAccountId: type: string example: "12345678" orderId: type: string example: "12345678" requestId: type: string example: "12345678" loanCoin: type: string example: "BTC" loanAmount: type: string example: "100.5" collateralAccountId: type: string example: "12345678,12345678,12345678" collateralCoin: type: string example: "BUSD,USDT,ETH" loanTerm: type: integer example: "30" status: type: integer example: "Repaid" required: - loanAccountId - orderId - requestId - loanCoin - loanAmount - collateralAccountId - collateralCoin - loanTerm - status required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/request/interestRate: get: operationId: loan/vip/request/interestRate summary: Get Borrow Interest Rate (USER_DATA) description: |- Get borrow interest rate. Weight(UID): 400 tags: - VIP Loans parameters: - name: loanCoin in: query description: 'Max 10 assets, Multiple split by ","' schema: type: string example: "BUSD" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Borrow interest rate content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BUSD" flexibleDailyInterestRate: type: string example: "0.001503" flexibleYearlyInterestRate: type: string example: "0.548595" time: type: integer format: int64 example: 1577233578000 required: - asset - flexibleDailyInterestRate - flexibleYearlyInterestRate - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/renew: post: operationId: loan/vip/renew summary: VIP Loan Renew description: |- VIP loan is available for VIP users only. Weight(UID): 6000 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - name: loanTerm in: query schema: type: integer example: 30 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan renew result content: application/json: schema: type: object properties: loanAccountId: type: string example: "12345678" loanCoin: type: string example: "BTC" loanAmount: type: string example: "100.55" collateralAccountId: type: string example: "12345677,12345678,12345679" collateralCoin: type: string example: "BUSD,USDT,ETH" loanTerm: type: string example: "30" required: - loanAccountId - loanCoin - loanAmount - collateralAccountId - collateralCoin - loanTerm '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/income: get: operationId: loan/income summary: Get Crypto Loans Income History (USER_DATA) description: |- - 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 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/optionalAsset' - name: type in: query description: |- All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` schema: type: string enum: [borrowIn, collateralSpent, repayAmount, collateralReturn, addCollateral, removeCollateral, collateralReturnAfterLiquidation] - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: "default 20, max 100" schema: type: integer format: int32 example: 20 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan History content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BUSD" type: type: string example: "borrowIn" amount: type: string example: "100" timestamp: type: integer format: int64 example: 1633771139847 tranId: type: string example: "80423589583" required: - asset - type - amount - timestamp - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/borrow: post: operationId: loan/borrow summary: Crypto Loan Borrow (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoinReq' - $ref: '#/components/parameters/loanAmount' - $ref: '#/components/parameters/collateralCoinReq' - $ref: '#/components/parameters/collateralAmount' - name: loanTerm in: query description: "7/14/30/90/180 days" required: true schema: type: integer format: int32 example: 30 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Borrow Information content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" loanAmount: type: string example: "100.5" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "50.5" hourlyInterestRate: type: string example: "0.001234" orderId: type: string example: "100000001" required: - loanCoin - loanAmount - collateralCoin - collateralAmount - hourlyInterestRate - orderId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/borrow/history: get: operationId: loan/borrow/history summary: Get Crypto Loans Borrow History (USER_DATA) description: |- - 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 tags: - Crypto Loans parameters: - name: orderId in: query description: "orderId in POST /sapi/v1/loan/borrow" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Borrow History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: integer format: int64 example: 100000001 loanCoin: type: string example: "BUSD" initialLoanAmount: type: string example: "10000" hourlyInterestRate: type: string example: "0.000057" loanTerm: type: string example: "7" collateralCoin: type: string example: "BNB" initialCollateralAmount: type: string example: "49.27565492" borrowTime: type: integer format: int64 example: 1575018510000 status: type: string example: "Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed" required: - orderId - loanCoin - initialLoanAmount - hourlyInterestRate - loanTerm - collateralCoin - initialCollateralAmount - borrowTime - status total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/ongoing/orders: get: operationId: loan/ongoing/orders summary: Get Loan Ongoing Orders (USER_DATA) description: |- Weight(IP): 300 tags: - Crypto Loans parameters: - name: orderId in: query description: "orderId in POST /sapi/v1/loan/borrow" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - name: current in: query description: Current querying page. Start from 1; default:1, max:1000 schema: type: integer format: int32 example: 1 - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Ongoing Orders content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: integer format: int64 example: 100000001 loanCoin: type: string example: "BUSD" totalDebt: type: string example: "10000" residualInterest: type: string example: "10.27687923" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "49.27565492" currentLTV: type: string example: "0.57" expirationTime: type: integer format: int64 example: 1575018510000 required: - orderId - loanCoin - totalDebt - residualInterest - collateralCoin - collateralAmount - currentLTV - expirationTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/repay: post: operationId: loan/repay summary: Crypto Loan Repay (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" required: true schema: type: integer format: int64 example: 123456789 - name: amount in: query description: "Repayment Amount" required: true schema: type: number format: double example: 100.5 - name: type in: query description: "Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'." schema: type: integer format: int32 example: 1 - name: collateralReturn in: query description: "Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order." schema: type: boolean example: True - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Repayment Information content: application/json: schema: oneOf: - $ref: '#/components/schemas/repaymentInfo' - $ref: '#/components/schemas/repaymentInfo2' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/repay/history: get: operationId: loan/repay/history summary: Get Loan Repayment History (USER_DATA) description: |- 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 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan Repayment History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "10000" collateralCoin: type: string example: "BNB" collateralUsed: type: string example: "0" collateralReturn: type: string example: "49.27565492" repayType: type: string example: "1" repayStatus: type: string example: "Repaid" description: "'repayType': '1' // 1 for 'repay with borrowed coin', 2 for 'repay with collateral' 'repayStatus': 'Repaid' // Repaid, Repaying, Failed" repayTime: type: integer format: int64 example: 1575018510000 orderId: type: integer format: int64 example: 756783308056935434 required: - loanCoin - repayAmount - collateralCoin - collateralUsed - collateralReturn - repayType - repayStatus - repayTime - orderId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/adjust/ltv: post: operationId: loan/adjust/ltv summary: Crypto Loan Adjust LTV (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" required: true schema: type: integer format: int64 example: 123456789 - name: amount in: query description: "Amount" required: true schema: type: number format: double example: 100.5 - name: direction in: query description: "'ADDITIONAL', 'REDUCED'" required: true schema: type: string enum: ['ADDITIONAL', 'REDUCED'] example: "ADDITIONAL" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: LTV Adjust content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" amount: type: string example: "5.235" currentLTV: type: string example: "0.52" required: - loanCoin - collateralCoin - direction - amount - currentLTV '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/ltv/adjustment/history: get: operationId: loan/ltv/adjustment/history summary: Get Loan LTV Adjustment History (USER_DATA) description: |- 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 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: LTV Adjustment History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" amount: type: string example: "5.235" preLTV: type: string example: "0.78" afterLTV: type: string example: "0.56" adjustTime: type: integer format: int64 example: 1575018510000 orderId: type: integer format: int64 example: 756783308056935434 required: - loanCoin - collateralCoin - direction - amount - preLTV - afterLTV - adjustTime - orderId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/loanable/data: get: operationId: loan/loanable/data summary: Get Loanable Assets Data (USER_DATA) description: |- Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loanable Assets Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" _7dHourlyInterestRate: type: string example: "0.00000491" _7dDailyInterestRate: type: string example: "0.000118" _14dHourlyInterestRate: type: string example: "0.00000491" _14dDailyInterestRate: type: string example: "0.000118" _30dHourlyInterestRate: type: string example: "0.00000567" _30dDailyInterestRate: type: string example: "0.000136" _90dHourlyInterestRate: type: string example: "0.00000596" _90dDailyInterestRate: type: string example: "0.000143" _180dHourlyInterestRate: type: string example: "0.00000631" _180dDailyInterestRate: type: string example: "0.000151" minLimit: type: string example: "100" maxLimit: type: string example: "1000000" vipLevel: type: integer format: int32 example: 1 required: - loanCoin - _7dHourlyInterestRate - _7dDailyInterestRate - _14dHourlyInterestRate - _14dDailyInterestRate - _30dHourlyInterestRate - _30dDailyInterestRate - _90dHourlyInterestRate - _90dDailyInterestRate - _180dHourlyInterestRate - _180dDailyInterestRate - minLimit - maxLimit - vipLevel total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/collateral/data: get: operationId: loan/collateral/data summary: Get Collateral Assets Data (USER_DATA) description: |- Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralCoin: type: string example: "BNB" initialLTV: type: string example: "0.65" marginCallLTV: type: string example: "0.75" liquidationLTV: type: string example: "0.83" maxLimit: type: string example: "1000000" vipLevel: type: integer format: int32 example: 1 required: - collateralCoin - initialLTV - marginCallLTV - liquidationLTV - maxLimit - vipLevel total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/repay/collateral/rate: get: operationId: loan/repay/collateral/rate summary: Check Collateral Repay Rate (USER_DATA) description: |- Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoinReq' - $ref: '#/components/parameters/collateralCoinReq' - name: repayAmount in: query required: true description: repay amount of loanCoin schema: type: number format: float - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BUSD" repayAmount: type: string example: "1000" rate: type: string description: rate of collateral coin/loan coin example: "300.36781234" required: - loanCoin - collateralCoin - repayAmount - rate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/customize/margin_call: post: operationId: loan/customize/margin_call summary: Crypto Loan Customize Margin Call (TRADE) description: |- Customize margin call for ongoing orders only. Weight(UID): 6000 tags: - Crypto Loans parameters: - name: orderId in: query required: false description: Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. schema: type: integer format: int64 - $ref: '#/components/parameters/collateralCoin' - name: marginCall in: query required: true schema: type: number format: float - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: string example: "100000001" collateralCoin: type: string example: "BNB" preMarginCall: type: string example: "0.8" afterMarginCall: type: string example: "0.7" customizeTime: type: integer format: int64 example: 1575018510000 required: - orderId - collateralCoin - preMarginCall - afterMarginCall - customizeTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/borrow: post: operationId: loan/flexible/borrow summary: Borrow - Flexible Loan Borrow (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/loanAmount' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/collateralAmount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" loanAmount: type: string example: "100.5" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "50.5" status: type: string example: "Succeeds" required: - loanCoin - loanAmount - collateralAmount - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/ongoing/orders: get: operationId: loan/flexible/ongoing/orders summary: Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) description: |- Weight(IP): 300 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" totalDebt: type: string example: "10000" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "49.27565492" currentLTV: type: string example: "0.57" required: - loanCoin - totalDebt - collateralCoin - collateralAmount - currentLTV required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/borrow/history: get: operationId: loan/flexible/borrow/history summary: Borrow - Get Flexible Loan Borrow History (USER_DATA) description: |- Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan borrow histroy content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" initialLoanAmount: type: string example: "10000" collateralCoin: type: string example: "BNB" initialCollateralAmount: type: string example: "49.27565492" borrowTime: type: integer format: int64 example: 1575018510000 status: type: string example: "Succeeds" required: - loanCoin - initialLoanAmount - collateralCoin - initialCollateralAmount - borrowTime - status required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/repay: post: operationId: loan/flexible/repay summary: Repay - Flexible Loan Repay (TRADE) description: |- Weight(IP): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - name: repayAmount in: query required: true description: repay amount of loanCoin schema: type: number format: float - name: collateralReturn in: query schema: type: boolean example: TRUE - name: fullRepayment in: query schema: type: boolean example: TRUE - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan repay content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" remainingDebt: type: string example: "50.5" remainingCollateral: type: string example: "50.5" fullRepayment: type: boolean example: false currentLTV: type: string example: "50.5" repayStatus: type: string example: "Repaid" required: - loanCoin - collateralCoin - remainingDebt - remainingCollateral - fullRepayment - currentLTV - repayStatus '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/repay/history: get: operationId: loan/flexible/repay/history summary: Repay - Get Flexible Loan Repayment History (USER_DATA) description: |- Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan repay history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "10000" collateralCoin: type: string example: "BNB" collateralReturn: type: string example: "100" repayStatus: type: string example: "Repaid" repayTime: type: integer format: int64 example: 1575018510000 required: - loanCoin - repayAmount - collateralCoin - collateralReturn - repayStatus - repayTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/adjust/ltv: post: operationId: loan/flexible/adjust/ltv summary: Adjust LTV - Flexible Loan Adjust LTV (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - name: adjustmentAmount in: query required: true schema: type: number format: float - name: direction in: query required: true schema: type: string enum: ["ADDITIONAL", "REDUCED"] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: adjust LTV result content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" adjustmentAmount: type: string example: "5.235" currentLTV: type: string example: "0.235" status: type: string example: "Succeeds" required: - loanCoin - collateralCoin - direction - adjustmentAmount - currentLTV - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/ltv/adjustment/history: get: operationId: loan/flexible/ltv/adjustment/history summary: Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) description: |- Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: LTV adjustment history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BNB" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" collateralAmount: type: string example: "5.75" preLTV: type: string example: "0.83" afterLTV: type: string example: "0.5" adjustTime: type: integer format: int64 example: 1575018510000 required: - loanCoin - collateralCoin - direction - collateralAmount - preLTV - afterLTV - adjustTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/loanable/data: get: operationId: loan/flexible/loanable/data summary: Get Flexible Loan Assets Data (USER_DATA) description: |- Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan asset data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BNB" flexibleInterestRate: type: string example: "0.01" flexibleMinLimit: type: string example: "100" flexibleMaxLimit: type: string example: "1000000" required: - loanCoin - flexibleInterestRate - flexibleMinLimit - flexibleMaxLimit total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/flexible/collateral/data: get: operationId: loan/flexible/collateral/data summary: Get Flexible Loan Collateral Assets Data (USER_DATA) description: |- Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan asset data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralCoin: type: string example: "BNB" initialLTV: type: string example: "0.01" marginCallLTV: type: string example: "0.7" liquidationLTV: type: string example: "0.8" maxLimit: type: string example: "1000000" required: - collateralCoin - initialLTV - marginCallLTV - liquidationLTV - maxLimit total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/pay/transactions: get: operationId: pay/transactions summary: Get Pay Trade History (USER_DATA) description: |- - 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 tags: - Pay parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: "default 100, max 100" schema: type: integer format: int32 example: 100 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Pay History content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderType: type: string example: "C2C" description: "Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment)" transactionId: type: string example: "M_P_71505104267788288" transactionTime: type: integer format: int64 example: 1610090460133 amount: type: string example: "23.72469206" description: "order amount(up to 8 decimal places), positive is income, negative is expenditure" currency: type: string example: "BNB" walletType: type: integer example: 1 walletTypes: type: array items: type: integer fundsDetail: type: array items: type: object properties: currency: type: string amount: type: string example: - currency: "USDT" amount: "1.2" - currency: "ETH" amount: "0.0001" required: - currency - amount payerInfo: type: object properties: name: type: string example: "Jack" type: type: string example: "USER" binanceId: type: string example: "12345678" accountId: type: string example: "67736251" required: - name - type - binanceId - accountId receiverInfo: type: object properties: name: type: string example: "Alan" type: type: string example: "MERCHANT" email: type: string example: "alan@test.com" binanceId: type: string example: "34355667" accountId: type: string example: "21326891" countryCode: type: string example: "1" phoneNumber: type: string example: "8057651210" mobileCode: type: string example: "US" extend: type: array items: type: object properties: institutionName: type: string cardNumber: type: string digitalWalletId: type: string required: - institutionName - cardNumber - digitalWalletId required: - name - type - email - binanceId - accountId - countryCode - phoneNumber - mobileCode required: - orderType - transactionId - transactionTime - amount - currency - walletType - walletTypes - fundsDetail - payerInfo - receiverInfo success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/exchangeInfo: get: operationId: convert/exchangeInfo summary: List All Convert Pairs description: |- Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 tags: - Convert parameters: - name: fromAsset in: query required: false description: User spends coin schema: type: string example: "BTC" - name: toAsset in: query required: false description: User receives coin schema: type: string example: "USDT" responses: '200': description: List Convert Pairs content: application/json: schema: type: array items: type: object properties: fromAsset: type: string example: "BTC" toAsset: type: string example: "USDT" fromAssetMinAmount: type: string example: "0.0004" fromAssetMaxAmount: type: string example: "50" toAssetMinAmount: type: string example: "20" toAssetMaxAmount: type: string example: "2500000" required: - fromAsset - toAsset - fromAssetMinAmount - fromAssetMaxAmount - toAssetMinAmount - toAssetMaxAmount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/assetInfo: get: operationId: convert/assetInfo summary: Query order quantity precision per asset (USER_DATA) description: |- Query for supported asset precision information Weight(IP): 100 tags: - Convert parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset Precision Information content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BTC" fraction: type: integer format: int32 example: 8 required: - asset - fraction '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/getQuote: post: operationId: convert/getQuote summary: Send quote request (USER_DATA) description: |- Request a quote for the requested token pairs Weight(UID): 200 tags: - Convert parameters: - name: fromAsset in: query required: true schema: type: string example: "BTC" - name: toAsset in: query required: true schema: type: string example: "USDT" - name: fromAmount in: query required: false description: When specified, it is the amount you will be debited after the conversion schema: type: number format: float example: 1.0 - name: toAmount in: query required: false description: When specified, it is the amount you will be debited after the conversion schema: type: number format: float example: 1.0 - name: validTime in: query required: false description: 10s, 30s, 1m, 2m, default 10s schema: type: string example: 10s - name: walletType in: query required: false description: SPOT or FUNDING. Default is SPOT schema: type: string example: SPOT - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Quote Request content: application/json: schema: type: object properties: quoteId: type: string example: "12415572564" ratio: type: string example: "38163.7" inverseRatio: type: string example: "0.0000262" validTimestamp: type: integer format: int64 example: 1623319461670 toAmount: type: string example: "3816.37" fromAmount: type: string example: "0.1" required: - quoteId - ratio - inverseRatio - validTimestamp - toAmount - fromAmount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/acceptQuote: post: operationId: convert/acceptQuote summary: Accept Quote (TRADE) description: |- Accept the offered quote by quote ID. Weight(UID): 500 tags: - Convert parameters: - name: quoteId in: query required: true schema: type: string example: 1000 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Accept Quote content: application/json: schema: type: object properties: orderId: type: string example: "933256278426274426" createTime: type: integer format: int64 example: 1623381330472 orderStatus: type: string example: "PROCESS" required: - orderId - createTime - orderStatus '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/orderStatus: get: operationId: convert/orderStatus summary: Order status (USER_DATA) description: |- Query order status by order ID. Weight(UID): 100 tags: - Convert parameters: - name: orderId in: query required: false schema: type: string example: 1000 - name: quoteId in: query required: false schema: type: string example: 1000 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order Status content: application/json: schema: type: object properties: orderId: type: integer format: int64 example: 933256278426274426 orderStatus: type: string example: "SUCCESS" fromAsset: type: string example: "BTC" fromAmount: type: string example: "0.00054414" toAsset: type: string example: "USDT" toAmount: type: string example: "20" ratio: type: string example: "36755" inverseRatio: type: string example: "0.00002721" createTime: type: integer format: int64 example: 1623381330472 required: - orderId - orderStatus - fromAsset - fromAmount - toAsset - toAmount - ratio - inverseRatio - createTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/tradeFlow: get: operationId: convert/tradeFlow summary: Get Convert Trade History (USER_DATA) description: |- - The max interval between startTime and endTime is 30 days. Weight(UID): 3000 tags: - Convert parameters: - name: startTime in: query required: true description: UTC timestamp in ms schema: type: integer format: int64 example: 1624248872184 - name: endTime in: query required: true description: UTC timestamp in ms schema: type: integer format: int64 example: 1624248872185 - name: limit in: query description: "default 100, max 1000" required: false schema: type: integer format: int32 example: 100 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Convert Trade History content: application/json: schema: type: object properties: list: type: array items: type: object properties: quoteId: type: string example: "f3b91c525b2644c7bc1e1cd31b6e1aa6" orderId: type: integer format: int64 example: 940708407462087200 orderStatus: type: string example: "SUCCESS" fromAsset: type: string example: "USDT" fromAmount: type: string example: "20" toAsset: type: string example: "BNB" toAmount: type: string example: "0.06154036" ratio: type: string example: "0.00307702" description: "price ratio" inverseRatio: type: string example: "324.99" description: "inverse price" createTime: type: integer format: int64 example: 1624248872184 required: - quoteId - orderId - orderStatus - fromAsset - fromAmount - toAsset - toAmount - ratio - inverseRatio - createTime startTime: type: integer format: int64 example: 1623824139000 endTime: type: integer format: int64 example: 1626416139000 limit: type: integer format: int32 example: 100 moreData: type: boolean example: false required: - list - startTime - endTime - limit - moreData '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/rebate/taxQuery: get: operationId: rebate/taxQuery summary: Get Spot Rebate History Records (USER_DATA) description: |- - 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 tags: - Rebate parameters: - name: startTime in: query description: UTC timestamp in ms schema: type: integer format: int64 - name: endTime in: query description: UTC timestamp in ms schema: type: integer format: int64 - name: page in: query description: "default 1" schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Rebate History content: application/json: schema: type: object properties: status: type: string example: "OK" type: type: string example: "GENERAL" code: type: string example: "000000000" data: type: object properties: page: type: integer format: int32 example: 1 totalRecords: type: integer format: int32 example: 2 totalPageNum: type: integer format: int32 example: 1 data: type: array items: type: object properties: asset: type: string example: "USDT" type: type: integer format: int32 example: 1 description: "rebate type:1 is commission rebate,2 is referral kickback" amount: type: string example: "0.0001126" updateTime: type: integer format: int64 example: 1637651320000 required: - asset - type - amount - updateTime required: - page - totalRecords - totalPageNum - data required: - status - type - code - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/history/transactions: get: operationId: nft/history/transactions summary: Get NFT Transaction History (USER_DATA) description: |- - 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 tags: - NFT parameters: - name: orderType in: query description: "0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee" required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: NFT Transaction History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 list: type: array items: type: object properties: orderNo: type: string example: "1_470502070600699904" description: "0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee" tokens: type: array items: type: object properties: network: type: string example: "BSC" tokenId: type: string example: "216000000496" contractAddress: type: string example: "MYSTERY_BOX0000087" required: - network - tokenId - contractAddress tradeTime: type: integer format: int64 example: 1626941236000 tradeAmount: type: string example: "19.60000000" tradeCurrency: type: string example: "BNB" required: - orderNo - tokens - tradeTime - tradeAmount - tradeCurrency required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/history/deposit: get: operationId: nft/history/deposit summary: Get NFT Deposit History(USER_DATA) description: |- - 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 tags: - NFT parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: NFT Deposit History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 list: type: array items: type: object properties: network: type: string example: "ETH" txID: type: integer nullable: true example: null contractAdrress: type: string example: "0xe507c961ee127d4439977a61af39c34eafee0dc6" tokenId: type: string example: "10014" timestamp: type: integer format: int64 example: 1629986047000 required: - network - txID - contractAdrress - tokenId - timestamp required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/history/withdraw: get: operationId: nft/history/withdraw summary: Get NFT Withdraw History (USER_DATA) description: |- - 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 tags: - NFT parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: NFT Withdraw History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 178 list: type: array items: type: object properties: network: type: string example: "ETH" txID: type: string example: "0x2be5eed31d787fdb4880bc631c8e76bdfb6150e137f5cf1732e0416ea206f57f" contractAdrress: type: string example: "0xe507c961ee127d4439977a61af39c34eafee0dc6" tokenId: type: string example: "1000001247" timestamp: type: integer format: int64 example: 1633674433000 fee: type: number example: 0.1 feeAsset: type: string example: "ETH" required: - network - txID - contractAdrress - tokenId - timestamp - fee - feeAsset required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/user/getAsset: get: operationId: nft/user/getAsset summary: Get NFT Asset (USER_DATA) description: 'Weight(UID): 3000' tags: - NFT parameters: - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset Information content: application/json: schema: type: object properties: total: type: integer format: int32 example: 347 list: type: array items: type: object properties: network: type: string example: "BSC" contractAddress: type: string example: "REGULAR11234567891779" tokenId: type: string example: "100900000017" required: - network - contractAddress - tokenId required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/createCode: post: operationId: giftcard/createCode summary: Create a Binance Code (USER_DATA) description: |- 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 tags: - Gift Card parameters: - name: token in: query description: The coin type contained in the Binance Code required: true schema: type: string - name: amount in: query required: true description: The amount of the coin schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Code creation content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: referenceNo: type: string example: "0033002327977405" code: type: string example: "AOGANK3NB4GIT3C6" required: - referenceNo - code success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/redeemCode: post: operationId: giftcard/redeemCode summary: Redeem a Binance Code (USER_DATA) description: |- 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 tags: - Gift Card parameters: - name: code in: query description: Binance Code required: true schema: type: string - name: externalUid in: query description: 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). schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redeemed Information content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: token: type: string example: "BNB" amount: type: string example: "10" referenceNo: type: string example: "0033002327977405" identityNo: type: string example: "10316281761814589440" required: - token - amount - referenceNo - identityNo success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/verify: get: operationId: giftcard/verify summary: Verify a Binance Code (USER_DATA) description: |- 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 tags: - Gift Card parameters: - name: referenceNo in: query description: reference number required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Code Verification content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: valid: type: boolean token: type: string example: "BNB" amount: type: string example: "0.00000001" required: - valid - token - amount success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/cryptography/rsa-public-key: get: operationId: giftcard/cryptography/rsa-public-key summary: Fetch RSA Public Key (USER_DATA) description: |- 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 tags: - Gift Card parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: RSA Public Key. content: application/json: schema: type: object properties: code: type: string example: '000000' message: type: string example: success data: type: string example: >- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXBBVKLAc1GQ5FsIFFqOHrPTox5noBONIKr+IAedTR9FkVxq6e65updEbfdhRNkMOeYIO2i0UylrjGC0X8YSoIszmrVHeV0l06Zh1oJuZos1+7N+WLuz9JvlPaawof3GUakTxYWWCa9+8KIbLKsoKMdfS96VT+8iOXO3quMGKUmQIDAQAB success: type: boolean example: true required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/buyCode: post: operationId: giftcard/buyCode summary: Buy a Binance Code (TRADE) description: |- 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 - 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 tags: - Gift Card parameters: - name: baseToken in: query description: The token you want to pay, example BUSD required: true schema: type: string - name: faceToken in: query description: The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. required: true schema: type: string - name: baseTokenAmount in: query required: true description: The base token asset quantity, example 1.002 schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Code creation content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: referenceNo: type: string example: "0033002327977405" code: type: string example: "AOGANK3NB4GIT3C6" required: - referenceNo - code success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/buyCode/token-limit: get: operationId: giftcard/buyCode/token-limit summary: Fetch Token Limit (USER_DATA) description: |- 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 tags: - Gift Card parameters: - name: baseToken in: query description: The token you want to pay, example BUSD required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Token limit content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: coin: type: string example: "BNB" fromMin: type: string example: "0.01" fromMax: type: string example: "1" required: - referenceNo - code success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/target-asset/list: get: operationId: lending/auto-invest/target-asset/list summary: Get target asset list (USER_DATA) description: |- Weight(IP): 1 tags: - Auto-Invest parameters: - name: targetAsset in: query schema: type: string - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Target asset list content: application/json: schema: type: object properties: targetAssets: type: string example: "BTC" autoInvestAssetList: type: array items: type: object properties: targetAsset: type: string example: "BTC" roiAndDimensionTypeList: type: array items: type: object properties: simulateRoi: type: string example: "5.004" dimensionValue: type: string example: "3" dimensionUnit: type: string example: "year" required: - simulateRoi - dimensionValue - dimensionUnit required: - targetAsset - roiAndDimensionTypeList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/target-asset/roi/list: get: operationId: lending/auto-invest/target-asset/roi/list summary: Get target asset ROI data (USER_DATA) description: |- ROI return list for target asset Weight(IP): 1 tags: - Auto-Invest parameters: - $ref: '#/components/parameters/targetAsset' - name: hisRoiType in: query required: true schema: type: string example: FIVE_YEAR - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Target asset list content: application/json: schema: type: array items: type: object properties: date: type: string example: "1648378800000" simulateRoi: type: string example: "1.75" required: - date - simulateRoi '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/all/asset: get: operationId: lending/auto-invest/all/asset summary: Query all source asset and target asset (USER_DATA) description: |- Query all source assets and target assets Weight(IP): 1 tags: - Auto-Invest parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Target asset content: application/json: schema: type: object properties: targetAssets: type: array items: type: string example: ["BTC", "BNB"] sourceAssets: type: array items: type: string example: ["BTC", "BNB"] required: - targetAssets - sourceAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/source-asset/list: get: operationId: lending/auto-invest/source-asset/list summary: Query source asset list (USER_DATA) description: |- Query Source Asset to be used for investment Weight(IP): 1 tags: - Auto-Invest parameters: - name: targetAsset in: query schema: type: string example: BTC - name: indexId in: query schema: type: integer format: int64 example: 1 - name: usageType in: query required: true schema: type: string example: RECURRING - name: flexibleAllowedToUse in: query required: false schema: type: boolean example: true - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset list content: application/json: schema: type: object properties: feeRate: type: string example: "0.002" sourceAssets: type: array items: type: object properties: sourceAsset: type: string example: "USDT" assetMinAmount: type: string example: "0.1" assetMaxAmount: type: string example: "1000000" scale: type: string example: "2" flexibleAmount: type: string example: "1111" required: - sourceAsset - assetMinAmount - assetMaxAmount - scale - flexibleAmount required: - feeRate - sourceAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/plan/add: # post: # operationId: lending/auto-invest/plan/add # summary: Investment plan creation (USER_DATA) # description: |- # Post an investment plan creation # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: sourceType # in: query # required: true # schema: # type: string # enum: [MAIN_SITE, TR] # example: MAIN_SITE # - name: requestId # in: query # schema: # type: string # - name: planType # in: query # required: true # schema: # type: string # enum: [SINGLE, PORTFOLIO, INDEX] # example: SINGLE # - name: IndexId # in: query # schema: # type: integer # format: int64 # - name: subscriptionAmount # in: query # required: true # schema: # type: number # format: float # - name: subscriptionCycle # in: query # required: true # schema: # type: string # enum: [H1, H4, H8, H12, WEEKLY, DAILY, MONTHLY, BI_WEEKLY] # - name: subscriptionStartDay # in: query # schema: # type: integer # - name: subscriptionStartWeekday # in: query # schema: # type: string # enum: [MON, TUE, WED, THU, FRI, SAT, SUN] # - name: subscriptionStartTime # in: query # required: true # schema: # type: integer # - name: sourceAsset # in: query # required: true # schema: # type: string # example: "USDT" # - name: flexibleAllowedToUse # in: query # schema: # type: boolean # example: true # - name: details # in: query # required: true # schema: # type: array # items: # type: object # properties: # targetAsset: # type: string # example: "BTC" # percentage: # type: integer # format: int64 # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Plan result # content: # application/json: # schema: # type: object # properties: # planId: # type: integer # example: 12345 # nextExecutionDateTime: # type: integer # format: int64 # example: 1648378800000 # required: # - planId # - nextExecutionDateTime # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/plan/edit: # post: # operationId: lending/auto-invest/plan/edit # summary: Investment plan adjustment # description: |- # Query Source Asset to be used for investment # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: planId # in: query # required: true # schema: # type: integer # - name: subscriptionAmount # in: query # required: true # schema: # type: number # format: float # - name: subscriptionCycle # in: query # required: true # schema: # type: string # enum: [H1, H4, H8, H12, WEEKLY, DAILY, MONTHLY, BI_WEEKLY] # - name: subscriptionStartDay # in: query # schema: # type: integer # - name: subscriptionStartWeekday # in: query # schema: # type: string # enum: [MON, TUE, WED, THU, FRI, SAT, SUN] # - name: subscriptionStartTime # in: query # required: true # schema: # type: integer # - name: sourceAsset # in: query # required: true # schema: # type: string # example: "USDT" # - name: flexibleAllowedToUse # in: query # schema: # type: boolean # example: true # - name: details # in: query # schema: # type: array # items: # type: object # properties: # targetAsset: # type: string # example: "BTC" # percentage: # type: integer # format: int64 # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Plan result # content: # application/json: # schema: # type: object # properties: # planId: # type: integer # example: 12345 # nextExecutionDateTime: # type: integer # format: int64 # example: 1648378800000 # required: # - planId # - nextExecutionDateTime # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/plan/edit-status: # post: # operationId: lending/auto-invest/plan/edit-status # summary: Change Plan Status # description: |- # Change Plan Status # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: planId # in: query # required: true # schema: # type: integer # - name: status # in: query # required: true # schema: # type: string # enum: [ONGOING, PAUSED, REMOVED] # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Plan result # content: # application/json: # schema: # type: object # properties: # planId: # type: integer # example: 12345 # nextExecutionDateTime: # type: integer # format: int64 # example: 1648378800000 # status: # type: string # example: "ONGOING" # required: # - planId # - nextExecutionDateTime # - status # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/plan/list: # get: # operationId: lending/auto-invest/plan/list # summary: Get list of plans # description: |- # Query plan lists # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: planType # in: query # required: true # schema: # type: string # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Plan result # content: # application/json: # schema: # type: object # properties: # planValueInUSD: # type: string # example: "123" # planValueInBTC: # type: string # example: "0.1" # pnlInUSD: # type: string # example: "120" # roi: # type: string # example: "2.3" # plan: # type: array # items: # type: object # properties: # planId: # type: integer # example: 12345 # planType: # type: string # example: "SINGLE" # editAllowed: # type: string # example: "true" # creationDateTime: # type: integer # format: int64 # example: 1648378800000 # firstExecutionDateTime: # type: integer # format: int64 # example: 1648378800000 # nextExecutionDateTime: # type: integer # format: int64 # example: 1648378800000 # status: # type: string # example: "ONGOING" # lastUpdatedDateTime: # type: integer # format: int64 # example: 1648378800000 # targetAsset: # type: string # example: "BTC" # totalTargetAmount: # type: string # example: "0.111" # sourceAsset: # type: string # example: "BUSD" # totalInvestedInUSD: # type: string # example: "4.555" # subscriptionAmount: # type: string # example: "0.1" # subscriptionCycle: # type: string # example: "WEEKLY" # subscriptionStartDay: # type: string # example: "1" # subscriptionStartWeekday: # type: string # example: "MON" # subscriptionStartTime: # type: string # example: "1" # sourceWallet: # type: string # example: "SPOT_WALLET" # flexibleAllowedToUse: # type: string # example: "false" # planValueInUSD: # type: string # example: "101.2" # pnlInUSD: # type: string # example: "101.2" # roi: # type: string # example: "1.02" # required: # - planId # - planType # - editAllowed # - creationDateTime # - firstExecutionDateTime # - nextExecutionDateTime # - status # - lastUpdatedDateTime # - targetAsset # - totalTargetAmount # - sourceAsset # - totalInvestedInUSD # - subscriptionAmount # - subscriptionCycle # - subscriptionStartDay # - subscriptionStartWeekday # - subscriptionStartTime # - sourceWallet # - flexibleAllowedToUse # - planValueInUSD # - pnlInUSD # - roi # required: # - planValueInUSD # - planValueInBTC # - pnlInUSD # - roi # - plan # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/plan/id: # get: # operationId: lending/auto-invest/plan/id # summary: Query holding details of the plan # description: |- # Query holding details of the plan # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: planId # in: query # schema: # type: integer # format: int64 # - name: requestId # in: query # schema: # type: string # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Plan result # content: # application/json: # schema: # type: object # properties: # planValueInUSD: # type: string # example: "123" # planValueInBTC: # type: string # example: "0.1" # pnlInUSD: # type: string # example: "120" # roi: # type: string # example: "2.3" # plan: # type: array # items: # type: object # properties: # planId: # type: integer # example: 12345 # planType: # type: string # example: "SINGLE" # editAllowed: # type: string # example: "true" # flexibleAllowedToUse: # type: string # example: "false" # creationDateTime: # type: integer # format: int64 # example: 1648378800000 # firstExecutionDateTime: # type: integer # format: int64 # example: 1648378800000 # nextExecutionDateTime: # type: integer # format: int64 # example: 1648378800000 # status: # type: string # example: "ONGOING" # targetAsset: # type: string # example: "BTC" # sourceAsset: # type: string # example: "BUSD" # totalInvestedInUSD: # type: string # example: "4.555" # planValueInUSD: # type: string # example: "101.2" # pnlInUSD: # type: string # example: "101.2" # roi: # type: string # example: "1.02" # details: # type: array # items: # type: object # properties: # targetAsset: # type: string # example: "ADA" # averagePriceInUSD: # type: string # example: "3.4" # totalInvestedInUSD: # type: string # example: "222.21" # purchasedAmount: # type: string # example: "122.12345678" # purchasedAmountUnit: # type: string # example: "ADA" # pnlInUSD: # type: string # example: "109.2" # roi: # type: string # example: "0.1" # percentage: # type: string # example: "50" # assetStatus: # type: string # example: "ACTIVE" # availableAmount: # type: string # example: "122.12345678" # availableAmountUnit: # type: string # example: "ADA" # redeemedAmout: # type: string # example: "122.12345678" # redeemedAmoutUnit: # type: string # example: "ADA" # assetValueInUSD: # type: string # example: "101.2" # required: # - targetAsset # - averagePriceInUSD # - totalInvestedInUSD # - purchasedAmount # - purchasedAmountUnit # - pnlInUSD # - roi # - percentage # - assetStatus # - availableAmount # - availableAmountUnit # - redeemedAmout # - redeemedAmoutUnit # - assetValueInUSD # required: # - planId # - planType # - editAllowed # - flexibleAllowedToUse # - creationDateTime # - firstExecutionDateTime # - nextExecutionDateTime # - status # - targetAsset # - sourceAsset # - totalInvestedInUSD # - planValueInUSD # - pnlInUSD # - roi # - details # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/history/list: # get: # operationId: lending/auto-invest/history/list # summary: Query subscription transaction history # description: |- # Query subscription transaction history of a plan # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: planId # in: query # schema: # type: integer # format: int64 # - $ref: '#/components/parameters/startTime' # - $ref: '#/components/parameters/endTime' # - name: targetAsset # in: query # schema: # type: number # format: int64 # - name: planType # in: query # schema: # type: string # enum: [SINGLE, PORTFOLIO, INDEX, ALL] # - $ref: '#/components/parameters/size' # - $ref: '#/components/parameters/current' # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Plan result # content: # application/json: # schema: # type: array # items: # type: object # properties: # id: # type: integer # format: int64 # example: 12345 # targetAsset: # type: string # example: "BTC" # planType: # type: string # example: "SINGLE" # planName: # type: string # example: "BTC" # planId: # type: integer # format: int64 # example: 1234 # transactionDateTime: # type: integer # format: int64 # example: 1648378800000 # transactionStatus: # type: string # example: "SUCCESS" # failedType: # type: string # example: "INSUFFICIENT_BALANCE" # sourceAsset: # type: string # example: "BUSD" # sourceAssetAmount: # type: string # example: "297.12345" # targetAssetAmount: # type: string # example: "297.12345" # sourceWallet: # type: string # example: "SPOT_WALLET" # flexibleUsed: # type: string # example: "false" # transactionFee: # type: string # example: "0.002" # transactionFeeUnit: # type: string # example: "BUSD" # executionPrice: # type: string # example: "2342" # executionType: # type: string # example: "RECURRING" # subscriptionCycle: # type: string # example: "WEEKLY" # required: # - id # - targetAsset # - planType # - planName # - planId # - transactionDateTime # - transactionStatus # - failedType # - sourceAsset # - sourceAssetAmount # - targetAssetAmount # - sourceWallet # - flexibleUsed # - transactionFee # - transactionFeeUnit # - executionPrice # - executionType # - subscriptionCycle # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/index/info: # get: # operationId: lending/auto-invest/index/info # summary: Query Index Details(USER_DATA) # description: |- # Query index details # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: indexId # in: query # required: true # schema: # type: integer # format: int64 # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Index result # content: # application/json: # schema: # type: object # properties: # indexId: # type: integer # format: int64 # example: 1 # indexName: # type: string # example: "BINANCE TOP 10 EW" # status: # type: string # example: "RUNNING" # assetAllocation: # type: array # items: # type: object # properties: # targetAsset: # type: string # example: "ADA" # allocation: # type: string # example: "10" # required: # - targetAsset # - allocation # required: # - indexId # - indexName # - status # - assetAllocation # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/index/user-summary: # get: # operationId: lending/auto-invest/index/user-summary # summary: Query Index Linked Plan Position Details(USER_DATA) # description: |- # Details on users Index-Linked plan position details # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: indexId # in: query # required: true # schema: # type: integer # format: int64 # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Position Details # content: # application/json: # schema: # type: object # properties: # indexId: # type: integer # format: int64 # example: 1 # totalInvestedInUSD: # type: string # example: "114.555" # currentInvestedInUSD: # type: string # description: current invest # example: "101.2" # pnlInUSD: # type: string # description: PNL of the plan in USD based on current amount # example: "101.2" # roi: # type: string # description: ROI of the plan based on current amount # example: "1.023" # assetAllocation: # type: array # items: # type: object # properties: # targetAsset: # type: string # description: for pie chart # example: "ADA" # allocation: # type: string # example: "10" # required: # - targetAsset # - allocation # details: # type: array # items: # type: object # properties: # targetAsset: # type: string # example: "ADA" # averagePriceInUSD: # type: string # description: average price of the asset in USD # example: "3.4" # totalInvestedInUSD: # type: string # description: total source asset invested for this target asset in equivilent of USD # example: "222.21" # currentInvestedInUSD: # type: string # description: current invest # example: "101.2" # purchasedAmount: # type: string # description: purchased amount of target asset # example: "122.2" # pnlInUSD: # type: string # description: PNL denominated in USD # example: "109.2" # roi: # type: string # description: ROI calculated in decimal # example: "0.2" # percentage: # type: string # description: asset allocation in the plan. If it's single plan, then it's 100 # example: "10" # availableAmount: # type: string # example: "122.12345678" # redeemedAmount: # type: string # example: "122" # assetValueInUSD: # type: string # example: "101" # required: # - targetAsset # - averagePriceInUSD # - totalInvestedInUSD # - currentInvestedInUSD # - purchasedAmount # - pnlInUSD # - roi # - percentage # - availableAmount # - redeemedAmount # - assetValueInUSD # required: # - indexId # - totalInvestedInUSD # - currentInvestedInUSD # - pnlInUSD # - roi # - assetAllocation # - details # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/one-off: # post: # operationId: lending/auto-invest/one-off # summary: One Time Transaction(TRADE) # description: |- # One time transaction # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: sourceType # in: query # required: true # schema: # type: string # example: "MAIN_SITE" # - name: requestId # in: query # schema: # type: string # example: "TR12354859" # - name: subscriptionAmount # in: query # required: true # schema: # type: number # format: float # example: 10.1 # - name: sourceAsset # in: query # required: true # schema: # type: string # example: "USDT" # - name: flexibleAllowedToUse # in: query # schema: # type: boolean # example: true # - name: planId # in: query # schema: # type: integer # format: int64 # example: 12345 # - name: indexId # in: query # schema: # type: integer # format: int64 # example: 1 # - name: details # in: query # schema: # type: array # items: # type: object # properties: # targetAsset: # type: string # example: "BTC" # percentage: # type: integer # example: 40 # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: transaction result # content: # application/json: # schema: # type: object # properties: # transactionId: # type: integer # format: int64 # example: 12345 # waitSecond: # type: integer # format: int32 # example: 5 # required: # - transactionId # - waitSecond # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/one-off/status: # get: # operationId: lending/auto-invest/one-off/status # summary: Query One-Time Transaction Status (USER_DATA) # description: |- # Transaction status for one-time transaction # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: transactionId # in: query # required: true # schema: # type: integer # format: int64 # example: 12345 # - name: requestId # in: query # schema: # type: string # example: "TR12354859" # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: transaction result # content: # application/json: # schema: # type: object # properties: # transactionId: # type: integer # format: int64 # example: 12345 # status: # type: string # example: "SUCCESS" # required: # - transactionId # - status # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/redeem: # post: # operationId: lending/auto-invest/redeem # summary: Index Linked Plan Redemption (TRADE) # description: |- # To redeem index-Linked plan holdings # Weight(IP): 1 # tags: # - Auto-Invest # parameters: # - name: indexId # in: query # description: PORTFOLIO plan's Id # required: true # schema: # type: integer # format: int64 # example: 123456 # - name: requestId # in: query # description: sourceType + unique, transactionId and requestId cannot be empty at the same time # schema: # type: string # example: "TR12354859" # - name: redemptionPercentage # in: query # description: user redeem percentage,10/20/100. # required: true # schema: # type: integer # example: 10 # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Redemption result # content: # application/json: # schema: # type: object # properties: # redemptionId: # type: integer # format: int64 # example: 12345 # required: # - redemptionId # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/redeem/history: # get: # operationId: lending/auto-invest/redeem/history # summary: Index Linked Plan Redemption History (USER_DATA) # description: |- # 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 # tags: # - Auto-Invest # parameters: # - name: requestId # in: query # required: true # schema: # type: integer # format: int64 # example: 12345 # - $ref: '#/components/parameters/startTime' # - $ref: '#/components/parameters/endTime' # - $ref: '#/components/parameters/current' # - name: asset # in: query # schema: # type: string # example: "BTC" # - $ref: '#/components/parameters/size' # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Redemption history # content: # application/json: # schema: # type: array # items: # type: object # properties: # indexId: # type: integer # format: int64 # example: 1 # indexName: # type: string # example: "BINANCE TOP 10 EW" # redemptionId: # type: integer # format: int64 # example: 11 # status: # type: string # example: "SUCCESS" # asset: # type: string # example: "BTC" # amount: # type: string # example: "0.005" # redemptionDateTime: # type: integer # format: int64 # example: 1648378800000 # transactionFee: # type: string # example: "0" # transactionFeeUnit: # type: string # example: "USDT" # required: # - indexId # - indexName # - redemptionId # - status # - asset # - amount # - redemptionDateTime # - transactionFee # - transactionFeeUnit # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # /sapi/v1/lending/auto-invest/rebalance/history: # get: # operationId: lending/auto-invest/rebalance/history # summary: Index Linked Plan Rebalance Details (USER_DATA) # description: |- # 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 # tags: # - Auto-Invest # parameters: # - $ref: '#/components/parameters/startTime' # - $ref: '#/components/parameters/endTime' # - $ref: '#/components/parameters/current' # - $ref: '#/components/parameters/size' # - $ref: '#/components/parameters/recvWindow' # - $ref: '#/components/parameters/timestamp' # - $ref: '#/components/parameters/signature' # security: # - ApiKeyAuth: [] # responses: # '200': # description: Rebalance Details # content: # application/json: # schema: # type: array # items: # type: object # properties: # indexId: # type: integer # format: int64 # example: 1 # indexName: # type: string # example: "BINANCE TOP 10 EW" # rebalanceId: # type: integer # format: int64 # example: 11 # status: # type: string # example: "SUCCESS" # rebalanceFee: # type: string # example: "10" # rebalanceFeeUnit: # type: string # example: "USDT" # transactionDetails: # type: array # items: # type: object # properties: # asset: # type: string # example: "BTC" # transactionDateTime: # type: integer # format: int64 # example: 1648378800000 # rebalanceDirection: # type: string # example: "BUY" # rebalanceAmount: # type: string # example: "0.005" # required: # - asset # - transactionDateTime # - rebalanceDirection # - rebalanceAmount # required: # - indexId # - indexName # - rebalanceId # - status # - rebalanceFee # - rebalanceFeeUnit # - transactionDetails # '400': # description: Bad Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' # '401': # description: Unauthorized Request # content: # application/json: # schema: # $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/list: get: operationId: simple-earn/flexible/list summary: Get Simple Earn Flexible Product List (USER_DATA) description: |- Get available Simple Earn flexible product list Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string example: BTC - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Simple Earn Flexible Product List content: application/json: schema: type: object properties: rows: type: array items: type: object properties: asset: type: string example: "BTC" latestAnnualPercentageRate: type: string example: "0.05000000" tierAnnualPercentageRate: type: object properties: 0-5BTC: type: number format: double example: 0.05 5-10BTC: type: number format: double example: 0.03 required: - 0-5BTC - 5-10BTC airDropPercentageRate: type: string example: "0.05000000" canPurchase: type: boolean example: true canRedeem: type: boolean example: true isSoldOut: type: boolean example: true hot: type: boolean example: true minPurchaseAmount: type: string example: "0.01000000" productId: type: string example: "BTC001" subscriptionStartTime: type: string example: "1646182276000" status: type: string example: "PURCHASING" required: - asset - latestAnnualPercentageRate - tierAnnualPercentageRate - airDropPercentageRate - canPurchase - canRedeem - isSoldOut - hot - minPurchaseAmount - productId - subscriptionStartTime - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/list: get: operationId: simple-earn/locked/list summary: Get Simple Earn Locked Product List (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string example: BNB - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Simple Earn Locked Product List content: application/json: schema: type: object properties: rows: type: array items: type: object properties: projectId: type: string example: "BNB" detail: type: object properties: asset: type: string example: "AXS" rewardAsset: type: string example: "AXS" duration: type: integer format: int64 example: 90 renewable: type: boolean example: true isSoldOut: type: boolean example: true apr: type: string example: "1.2069" status: type: string example: "CREATED" subscriptionStartTime: type: string example: "1646182276000" extraRewardAsset: type: string example: "BNB" extraRewardAPR: type: string example: "0.23" required: - asset - rewardAsset - duration - renewable - isSoldOut - apr - status - subscriptionStartTime - extraRewardAsset - extraRewardAPR quota: type: object properties: totalPersonalQuota: type: string example: "2" minimum: type: string example: "0.001" required: - totalPersonalQuota - minimum required: - projectId - detail - quota total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/subscribe: post: operationId: simple-earn/flexible/subscribe summary: Subscribe Flexible Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - name: autoSubscribe in: query description: "true or false, default true." schema: type: boolean - name: sourceAccount in: query description: "SPOT,FUND,ALL, default SPOT" schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Subscription Response content: application/json: schema: type: object properties: purchaseId: type: integer format: int64 example: 40607 success: type: boolean example: true required: - purchaseId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/subscribe: post: operationId: simple-earn/locked/subscribe summary: Subscribe Locked Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: projectId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - name: autoSubscribe in: query description: "true or false, default true." schema: type: boolean - name: sourceAccount in: query description: "SPOT,FUND,ALL, default SPOT" schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Product Subscription Response content: application/json: schema: type: object properties: purchaseId: type: integer format: int64 example: 40607 positionId: type: string example: "12345" success: type: boolean example: true required: - purchaseId - positionId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/redeem: post: operationId: simple-earn/flexible/redeem summary: Redeem Flexible Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: redeemAll in: query description: "true or false, default to false" schema: type: boolean - name: amount in: query description: "if redeemAll is false, amount is mandatory" schema: type: number format: double - name: destAccount in: query description: "SPOT,FUND,ALL, default SPOT" schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redeem Flexible Product content: application/json: schema: type: object properties: redeemId: type: integer format: int64 example: 40607 success: type: boolean example: true required: - redeemId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/redeem: post: operationId: simple-earn/locked/redeem summary: Redeem Locked Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: positionId in: query required: true description: "1234" schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redeem Locked Product content: application/json: schema: type: object properties: redeemId: type: integer format: int64 example: 40607 success: type: boolean example: true required: - redeemId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/position: get: operationId: simple-earn/flexible/position summary: Get Flexible Product Position (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string - name: productId in: query schema: type: string - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Position content: application/json: schema: type: object properties: rows: type: array items: type: object properties: totalAmount: type: string example: "75.46000000" tierAnnualPercentageRate: type: object properties: 0-5BTC: type: number format: double example: 0.05 5-10BTC: type: number format: double example: 0.03 required: - 0-5BTC - 5-10BTC latestAnnualPercentageRate: type: string example: "0.02599895" yesterdayAirdropPercentageRate: type: string example: "0.02599895" asset: type: string example: "USDT" airDropAsset: type: string example: "BETH" canRedeem: type: boolean example: true collateralAmount: type: string example: "232.23123213" productId: type: string example: "USDT001" yesterdayRealTimeRewards: type: string example: "0.10293829" cumulativeBonusRewards: type: string example: "0.22759183" cumulativeRealTimeRewards: type: string example: "0.22759183" cumulativeTotalRewards: type: string example: "0.45459183" autoSubscribe: type: boolean example: true required: - totalAmount - tierAnnualPercentageRate - latestAnnualPercentageRate - yesterdayAirdropPercentageRate - asset - airDropAsset - canRedeem - collateralAmount - productId - yesterdayRealTimeRewards - cumulativeBonusRewards - cumulativeRealTimeRewards - cumulativeTotalRewards - autoSubscribe total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/position: get: operationId: simple-earn/locked/position summary: Get Locked Product Position (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string - name: positionId in: query schema: type: string - name: projectId in: query schema: type: string - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Product Position content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" projectId: type: string example: "Axs*90" asset: type: string example: "AXS" amount: type: string example: "122.09202928" purchaseTime: type: string example: "1646182276000" duration: type: string example: "60" accrualDays: type: string example: "4" rewardAsset: type: string example: "AXS" APY: type: string example: "0.23" isRenewable: type: boolean example: true isAutoRenew: type: boolean example: true redeemDate: type: string example: "1732182276000" required: - positionId - projectId - asset - amount - purchaseTime - duration - accrualDays - rewardAsset - APY - isRenewable - isAutoRenew - redeemDate total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/account: get: operationId: simple-earn/account summary: Simple Account (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account Information content: application/json: schema: type: object properties: totalAmountInBTC: type: string example: "0.01067982" totalAmountInUSDT: type: string example: "77.13289230" totalFlexibleAmountInBTC: type: string example: "0.00000000" totalFlexibleAmountInUSDT: type: string example: "0.00000000" totalLockedInBTC: type: string example: "0.01067982" totalLockedInUSDT: type: string example: "77.13289230" required: - totalAmountInBTC - totalAmountInUSDT - totalFlexibleAmountInBTC - totalFlexibleAmountInUSDT - totalLockedInBTC - totalLockedInUSDT '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/subscriptionRecord: get: operationId: simple-earn/flexible/history/subscriptionRecord summary: Get Flexible Subscription Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - name: purchaseId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Position content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "100.00000000" asset: type: string example: "USDT" time: type: integer format: int64 example: 1575018510000 purchaseId: type: integer format: int64 example: 26055 type: type: string example: "AUTO" description: "AUTO for auto subscribe, NORMAL for normal subscription, CONVERT for Locked to Flexible, LOAN for flexible loan collateral, AI for Auto Invest subscribe, TRANSFER for Locked Savings to Flexible" sourceAccount: type: string example: "SPOT" description: "SPOT, FUNDING, SPOTANDFUNDING" amtFromSpot: type: string example: "30" description: "Display if sourceAccount is SPOTANDFUNDING " amtFromFunding: type: string example: "70" description: "Display if sourceAccount is SPOTANDFUNDING" status: type: string example: "SUCCESS" description: "PURCHASING/SUCCESS/FAILED" required: - amount - asset - time - purchaseId - type - sourceAccount - amtFromSpot - amtFromFunding - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/history/subscriptionRecord: get: operationId: simple-earn/locked/history/subscriptionRecord summary: Get Locked Subscription Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: purchaseId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Subscription Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" purchaseId: type: integer format: int64 example: 26055 time: type: integer format: int64 example: 1575018510000 asset: type: string example: "BNB" amount: type: string example: "21312.23223" lockPeriod: type: string example: "30" type: type: string example: "AUTO" description: "NORMAL for normal subscription, AUTO for auto-subscription order, ACTIVITY for activity order, TRIAL for trial fund order, RESTAKE for restake order" sourceAccount: type: string example: "SPOT" description: "SPOT, FUNDING, SPOTANDFUNDING" amtFromSpot: type: string example: "30" description: "Display if sourceAccount is SPOTANDFUNDING " amtFromFunding: type: string example: "70" description: "Display if sourceAccount is SPOTANDFUNDING" status: type: string example: "SUCCESS" description: "PURCHASING/SUCCESS/FAILED" required: - positionId - purchaseId - time - asset - amount - lockPeriod - type - sourceAccount - amtFromSpot - amtFromFunding - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/redemptionRecord: get: operationId: simple-earn/flexible/history/redemptionRecord summary: Get Flexible Redemption Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - name: redeemId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' security: - ApiKeyAuth: [] responses: '200': description: Flexible Redemption Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "10.54000000" asset: type: string example: "USDT" time: type: integer format: int64 example: 1577257222000 projectId: type: string example: "USDT001" redeemId: type: integer format: int64 example: 40607 destAccount: type: string example: "SPOT" description: "SPOT, FUNDING" status: type: string example: "PAID" required: - amount - asset - time - projectId - redeemId - destAccount - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/history/redemptionRecord: get: operationId: simple-earn/locked/history/redemptionRecord summary: Get Locked Redemption Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: positionId in: query schema: type: string - name: redeemId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Redemption Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" redeemId: type: integer format: int64 example: 40607 time: type: integer format: int64 example: 1575018510000 asset: type: string example: "BNB" lockPeriod: type: string example: "30" amount: type: string example: "21312.23223" type: type: string example: "MATURE" description: "MATURE for redeem to Spot Wallet, NEW_TRANSFERRED for redeem to Flexible product, AHEAD for early redemption" deliverDate: type: string example: "1575018510000" status: type: string example: "PAID" required: - positionId - redeemId - time - asset - lockPeriod - amount - type - deliverDate - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/rewardsRecord: get: operationId: simple-earn/flexible/history/rewardsRecord summary: Get Flexible Rewards History (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: type in: query required: true description: '"BONUS", "REALTIME", "REWARDS"' schema: type: string security: - ApiKeyAuth: [] responses: '200': description: Flexible Rewards History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: asset: type: string example: "BUSD" rewards: type: string example: "0.00006408" projectId: type: string example: "USDT001" type: type: string example: "BONUS" time: type: integer format: int64 example: 1577257222000 required: - asset - rewards - projectId - type - time total: type: integer format: int64 example: 2 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/history/rewardsRecord: get: operationId: simple-earn/locked/history/rewardsRecord summary: Get Locked Rewards History (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: positionId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Rewards History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" time: type: integer format: int64 example: 1577257222000 asset: type: string example: "BNB" lockPeriod: type: string example: "30" amount: type: string example: "21312.23223" required: - positionId - time - asset - lockPeriod - amount total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/setAutoSubscribe: post: operationId: simple-earn/flexible/setAutoSubscribe summary: Set Flexible Auto Subscribe (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: autoSubscribe in: query required: true description: "true or false" schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Subscription Response content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/setAutoSubscribe: post: operationId: simple-earn/locked/setAutoSubscribe summary: Set Locked Auto Subscribe (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: positionId in: query required: true schema: type: string - name: autoSubscribe in: query required: true description: "true or false" schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Auto Subscribe content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/personalLeftQuota: get: operationId: simple-earn/flexible/personalLeftQuota summary: Get Flexible Personal Left Quota (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Personal Left Quota content: application/json: schema: type: object properties: leftPersonalQuota: type: string example: "1000" required: - leftPersonalQuota '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/personalLeftQuota: get: operationId: simple-earn/locked/personalLeftQuota summary: Get Locked Personal Left Quota (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: projectId in: query required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Personal Left Quota content: application/json: schema: type: object properties: leftPersonalQuota: type: string example: "1000" required: - leftPersonalQuota '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/subscriptionPreview: get: operationId: simple-earn/flexible/subscriptionPreview summary: Get Flexible Subscription Preview (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Subscription Preview content: application/json: schema: type: object properties: totalAmount: type: string example: "1232.32230982" rewardAsset: type: string example: "BUSD" airDropAsset: type: string example: "BETH" estDailyBonusRewards: type: string example: "0.22759183" estDailyRealTimeRewards: type: string example: "0.22759183" estDailyAirdropRewards: type: string example: "0.22759183" required: - totalAmount - rewardAsset - airDropAsset - estDailyBonusRewards - estDailyRealTimeRewards - estDailyAirdropRewards '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/subscriptionPreview: get: operationId: simple-earn/locked/subscriptionPreview summary: Get Locked Subscription Preview (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: projectId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - name: autoSubscribe in: query description: "true or false, default true." schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Product Subscription Response content: application/json: schema: type: array items: type: object properties: rewardAsset: type: string example: "AXS" totalRewardAmt: type: string example: "5.17181528" extraRewardAsset: type: string example: "BNB" estTotalExtraRewardAmt: type: string example: "5.17181528" nextPay: type: string example: "1.29295383" nextPayDate: type: string example: "1646697600000" valueDate: type: string example: "1646697600000" rewardsEndDate: type: string example: "1651449600000" deliverDate: type: string example: "1651536000000" nextSubscriptionDate: type: string example: "1651536000000" required: - rewardAsset - totalRewardAmt - extraRewardAsset - estTotalExtraRewardAmt - nextPay - nextPayDate - valueDate - rewardsEndDate - deliverDate - nextSubscriptionDate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/rateHistory: get: operationId: simple-earn/flexible/history/rateHistory summary: Get Rate History (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Rate History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: productId: type: string example: "BUSD001" asset: type: string example: "BUSD" annualPercentageRate: type: string example: "0.00006408" time: type: integer format: int64 example: 1577233578000 required: - productId - asset - annualPercentageRate - time total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/collateralRecord: get: operationId: simple-earn/flexible/history/collateralRecord summary: Get Collateral Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "100.00000000" productId: type: string example: "BUSD001" asset: type: string example: "USDT" createTime: type: integer format: int64 example: 1575018510000 type: type: string example: "REPAY" productName: type: string example: "USDT" orderId: type: integer format: int64 example: 26055 required: - amount - productId - asset - createTime - type - productName - orderId total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' components: parameters: getCrossMargingTransferHistoryType: name: type in: query schema: type: string enum: [ROLL_IN, ROLL_OUT] spotBNBBurn: name: spotBNBBurn in: query description: Determines whether to use BNB to pay for trading fees on SPOT schema: type: string enum: ['true','false'] example: 'true' interestBNBBurn: name: interestBNBBurn in: query description: Determines whether to use BNB to pay for margin loan interest schema: type: string enum: ['true','false'] example: 'false' depositHistory: name: status in: query description: |- * `0` - pending * `6` - credited but cannot withdraw * `1` - success schema: type: integer format: int32 withdrawHistory: name: status in: query description: |- * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed schema: type: integer format: int32 minimum: 0 maximum: 6 queryConvertTransfer: name: accountType in: query description: "MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet" schema: type: string enum: ['MAIN', 'CARD'] querySubAccountList: name: isFreeze in: query schema: type: string enum: ['true', 'false'] asset: name: asset in: query required: true schema: type: string example: 'BTC' amount: name: amount in: query required: true schema: type: number format: double example: '1.01' current: name: current in: query description: Current querying page. Start from 1. Default:1 schema: type: integer format: int32 example: 1 optionalCoin: name: coin in: query description: Coin name schema: type: string example: 'BNB' coin: name: coin in: query required: true description: Coin name schema: type: string example: 'BNB' side: name: side in: query required: true schema: type: string enum: ['SELL', 'BUY'] example: 'SELL' optionalSide: name: side in: query schema: type: string enum: ['SELL', 'BUY'] example: 'SELL' positionSide: name: positionSide in: query description: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. schema: type: string enum: ['BOTH', 'LONG', 'SHORT'] example: 'BOTH' size: name: size in: query description: Default:10 Max:100 schema: type: integer format: int32 example: 100 symbol: name: symbol in: query required: true description: Trading symbol, e.g. BNBUSDT schema: type: string example: 'BNBUSDT' optionalSymbol: name: symbol in: query description: Trading symbol, e.g. BNBUSDT schema: type: string example: 'BNBUSDT' optionalAsset: name: asset in: query schema: type: string example: 'BNB' limit: name: limit in: query description: Default 500; max 1000. schema: type: integer format: int32 example: 5 limit50: name: limit in: query description: Default 50, Max 50 schema: type: integer format: int32 example: 50 listenKey: name: listenKey in: query description: User websocket listen key schema: type: string example: 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' fromId: name: fromId in: query description: Trade id to fetch from. Default gets most recent trades. schema: type: integer format: int64 offset: name: offset in: query schema: type: integer format: int32 orderId: name: orderId in: query description: Order id schema: type: integer format: int64 orderListId: name: orderListId in: query description: Order list id schema: type: integer format: int64 origClientOrderId: name: origClientOrderId in: query description: Order id from client schema: type: string listClientOrderId: name: listClientOrderId in: query description: A unique Id for the entire orderList schema: type: string newClientOrderId: name: newClientOrderId in: query description: Used to uniquely identify this cancel. Automatically generated by default schema: type: string strategyId: name: strategyId in: query schema: type: integer format: int64 strategyType: name: strategyType in: query description: "The value cannot be less than 1000000." schema: type: integer format: int64 newOrderRespType: name: newOrderRespType in: query description: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. schema: type: string enum: [ACK,RESULT,FULL] selfTradePreventionMode: name: selfTradePreventionMode in: query description: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. schema: type: string enum: ['EXPIRE_TAKER','EXPIRE_MAKER','EXPIRE_BOTH', 'NONE'] example: 'EXPIRE_TAKER' ocoNewOrderRespType: name: newOrderRespType in: query description: Set the response JSON. schema: type: string enum: [ACK,RESULT,FULL] startTime: name: startTime in: query description: UTC timestamp in ms schema: type: integer format: int64 endTime: name: endTime in: query description: UTC timestamp in ms schema: type: integer format: int64 startTimeReq: name: startTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 endTimeReq: name: endTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 collateralCoinReq: name: collateralCoin in: query description: "Coin used as collateral" required: true schema: type: string example: "BNB" collateralCoin: name: collateralCoin in: query description: "Coin used as collateral" schema: type: string example: "BNB" collateralAmount: name: collateralAmount in: query schema: type: number format: float example: 50.5 loanCoinReq: name: loanCoin in: query description: "Coin loaned" required: true schema: type: string example: "BUSD" loanCoin: name: loanCoin in: query description: "Coin loaned" schema: type: string example: "BUSD" loanAmount: name: loanAmount in: query description: Loan amount schema: type: number format: float example: 100.1 price: name: price in: query required: true description: Order price schema: type: number format: double example: 218.0 optionalPrice: name: price in: query description: Order price schema: type: number format: double example: 219.0 quantity: name: quantity in: query required: true schema: type: number format: double example: 1.0 optionalQuantity: name: quantity in: query description: Order quantity schema: type: number format: double example: 1 recvWindow: name: recvWindow in: query description: The value cannot be greater than 60000 schema: type: integer format: int64 example: 5000 timestamp: name: timestamp in: query required: true description: UTC timestamp in ms schema: type: integer format: int64 timeInForce: name: timeInForce in: query description: Order time in force schema: type: string enum: [GTC,IOC,FOK] example: 'GTC' type: name: type in: query required: true schema: type: integer format: int64 orderType: name: type in: query required: true description: Order type schema: type: string enum: [LIMIT,MARKET,STOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,TAKE_PROFIT_LIMIT,LIMIT_MAKER] example: 'LIMIT' univTransferType: name: type in: query required: true description: Universal transfer type schema: type: string enum: ['MAIN_C2C','MAIN_UMFUTURE','MAIN_CMFUTURE','MAIN_MARGIN','MAIN_MINING','C2C_MAIN','C2C_UMFUTURE','C2C_MINING','C2C_MARGIN','UMFUTURE_MAIN','UMFUTURE_C2C','UMFUTURE_MARGIN','CMFUTURE_MAIN','CMFUTURE_MARGIN','MARGIN_MAIN','MARGIN_UMFUTURE','MARGIN_CMFUTURE','MARGIN_MINING','MARGIN_C2C','MINING_MAIN','MINING_UMFUTURE','MINING_C2C','MINING_MARGIN','MAIN_PAY','PAY_MAIN', 'ISOLATEDMARGIN_MARGIN', 'MARGIN_ISOLATEDMARGIN', 'ISOLATEDMARGIN_ISOLATEDMARGIN'] example: 'MAIN_C2C' signature: name: signature in: query required: true description: Signature schema: type: string stopPrice: name: stopPrice in: query description: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. schema: type: number format: double example: 221.01 isIsolatedMargin: name: isIsolated in: query description: |- * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin schema: type: string enum: ['TRUE','FALSE'] transFrom: name: transFrom in: query required: true schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'SPOT' optionalTransFrom: name: transFrom in: query schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'SPOT' transTo: name: transTo in: query required: true schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'ISOLATED_MARGIN' optionalTransTo: name: transTo in: query schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'ISOLATED_MARGIN' symbols: name: symbols in: query description: Max 5 symbols can be sent; separated by ',' schema: type: string example: 'BTCUSDT,BNBUSDT,ADAUSDT' arraySymbols: name: symbols in: query schema: type: string example: '["BTCUSDT","BNBBTC"]' permissions: name: permissions in: query schema: type: string example: "'SPOT' or ['MARGIN','LEVERAGED']" transactionType: name: transactionType in: query required: true description: |- * `0` - deposit * `1` - withdraw schema: type: integer format: int32 minimum: 0 maximum: 1 beginTime: name: beginTime in: query schema: type: integer format: int64 example: 1626144956000 page: name: page in: query description: Default 1 schema: type: integer format: int32 example: 1 rows: name: rows in: query description: Default 100, max 500 schema: type: integer format: int32 example: 300 quoteOrderQty: name: quoteOrderQty in: query description: Quote quantity schema: type: number format: double icebergQty: name: icebergQty in: query description: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. schema: type: number format: double flexibleProductStatus: name: status in: query required: true description: Default `ALL` schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] optionalFlexibleProductStatus: name: status in: query description: Default `ALL` schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] optionalFixedAndActivityProductStatus: name: status in: query description: Default `ALL` schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] featured: name: featured in: query description: Default `ALL` schema: type: string enum: ['ALL','TRUE'] flexibleProductId: name: productId in: query required: true schema: type: string fixedAndActivityProjectId: name: projectId in: query schema: type: string flexibleProductType: name: type in: query required: true schema: type: string enum: ['FAST','NORMAL'] fixedAndActivityProductType: name: type in: query required: true schema: type: string enum: ['ACTIVITY','CUSTOMIZED_FIXED'] sortBy: name: sortBy in: query description: Default `START_TIME` schema: type: string enum: ['START_TIME', 'LOT_SIZE','INTEREST_RATE','DURATION'] isSortAsc: name: isSortAsc in: query description: default "true" schema: type: boolean projectId: name: projectId in: query required: true schema: type: string lot: name: lot in: query required: true schema: type: string needBtcValuation: name: needBtcValuation in: query schema: type: string enum: ['true','false'] lendingType: name: lendingType in: query required: true description: |- * `DAILY` - for flexible * `ACTIVITY` - for activity * `CUSTOMIZED_FIXED` for fixed schema: type: string enum: ['DAILY','ACTIVITY','CUSTOMIZED_FIXED'] optionalPositionId: name: positionId in: query schema: type: string positionId: name: positionId in: query required: true schema: type: string positionStatus: name: status in: query required: true schema: type: string enum: ['HOLDING','REDEEMED'] userName: name: userName in: query required: true description: Mining Account schema: type: string algo: name: algo in: query required: true description: Algorithm(sha256) schema: type: string pageIndex: name: pageIndex in: query description: Page number, default is first page, start form 1 schema: type: integer format: int32 sort: name: sort in: query description: sort sequence(default=0)0 positive sequence, 1 negative sequence schema: type: integer format: int32 sortColumn: name: sortColumn in: query description: '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' schema: type: integer format: int32 workerStatus: name: workerStatus in: query description: miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure schema: type: integer format: int32 startDate: name: startDate in: query description: Search date, millisecond timestamp, while empty query all schema: type: string endDate: name: endDate in: query description: Search date, millisecond timestamp, while empty query all schema: type: string pageSize: name: pageSize in: query description: Number of pages, minimum 10, maximum 200 schema: type: string configId: name: configId in: query required: true description: Mining ID schema: type: string toPoolUser: name: toPoolUser in: query required: true description: Mining Account schema: type: string hashRate: name: hashRate in: query required: true description: Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) schema: type: string workerName: name: workerName in: query required: true description: Miner’s name schema: type: string blvtTokenName: name: tokenName in: query required: true description: BTCDOWN, BTCUP schema: type: string optionalBlvtTokenName: name: tokenName in: query description: BTCDOWN, BTCUP schema: type: string poolId: name: poolId in: query required: true schema: type: integer format: int64 optionalPoolId: name: poolId in: query schema: type: integer format: int64 quoteAsset: name: quoteAsset in: query required: true schema: type: string example: 'USDT' baseAsset: name: baseAsset in: query required: true schema: type: string example: 'BUSD' quoteQty: name: quoteQty in: query required: true schema: type: number format: double subAccountEmail: name: email in: query required: true schema: type: string description: Sub-account email optionalSubAccountEmail: name: email in: query schema: type: string description: Sub-account email optionalSubAccountFromEmail: name: fromEmail in: query schema: type: string description: Sub-account email optionalSubAccountToEmail: name: toEmail in: query schema: type: string description: Sub-account email subAccountFromEmail: name: fromEmail in: query required: true schema: type: string description: Sender email subAccountToEmail: name: toEmail in: query required: true schema: type: string description: Recipient email fromSymbol: name: fromSymbol in: query description: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN schema: type: string example: 'BNBUSDT' toSymbol: name: toSymbol in: query description: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN schema: type: string example: 'BNBUSDT' isolatedSymbol: name: isolatedSymbol in: query description: Isolated symbol schema: type: string archived: name: archived in: query description: 'Default: false. Set to true for archived data from 6 months ago' schema: type: string sideEffectType: name: sideEffectType in: query description: Default `NO_SIDE_EFFECT` schema: type: string enum: [NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY] interval: name: interval in: query required: true description: kline intervals schema: type: string enum: ['1s','1m','3m','5m','15m','30m','1h','2h','4h','6h','8h','12h','1d','3d','1w'] example: '"1m"' crossMarginAccountTransferType: name: type in: query description: |- * `1` - transfer from main account to margin account * `2` - transfer from margin account to main account schema: type: integer format: int32 minimum: 1 maximum: 2 limitClientOrderId: name: limitClientOrderId in: query description: 'A unique Id for the limit order' schema: type: string limitStrategyId: name: limitStrategyId in: query schema: type: integer format: int64 limitStrategyType: name: limitStrategyType in: query description: "The value cannot be less than 1000000." schema: type: integer format: int64 limitIcebergQty: name: limitIcebergQty in: query schema: type: number format: double stopClientOrderId: name: stopClientOrderId in: query description: 'A unique Id for the stop loss/stop loss limit leg' schema: type: string stopStrategyId: name: stopStrategyId in: query schema: type: integer format: int64 stopStrategyType: name: stopStrategyType in: query schema: type: integer format: int64 ocoStopPrice: name: stopPrice in: query required: true schema: type: number format: double example: 220.0 stopLimitPrice: name: stopLimitPrice in: query description: 'If provided, stopLimitTimeInForce is required.' schema: type: number format: double stopIcebergQty: name: stopIcebergQty in: query schema: type: number format: double stopLimitTimeInForce: name: stopLimitTimeInForce in: query schema: type: string enum: [GTC,FOK,IOC] subAccountApiKey: name: subAccountApiKey in: query required: true schema: type: string ipRestrict: name: ipRestrict in: query required: true description: "true or false" schema: type: boolean thirdParty: name: thirdParty in: query required: false description: "true or false" schema: type: boolean thirdPartyName: name: thirdPartyName in: query required: false description: "third party IP list name" schema: type: string ipAddress: name: ipAddress in: query required: true description: "Can be added in batches, separated by commas" schema: type: string optionalIpAddress: name: ipAddress in: query description: "Can be added in batches, separated by commas" schema: type: string vipLevel: name: vipLevel in: query description: Defaults to user's vip level schema: type: integer format: int32 example: 1 clientTranId: name: clientTranId in: query schema: type: string bswapClaimType: name: type in: query description: '0: Swap rewards, 1: Liquidity rewards, default to 0' schema: type: integer format: int32 example: 0 optionalTrailingDelta: name: trailingDelta in: query description: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. schema: type: number format: double product: name: product in: query required: true description: |- * `STAKING` - for Locked Staking * `F_DEFI` - for flexible DeFi Staking * `L_DEFI` - for locked DeFi Staking schema: type: string productId: name: productId in: query required: true schema: type: string optionalIsIsolated: name: isIsolated in: query description: |- * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin schema: type: string email: name: email in: query required: true schema: type: string preventedMatchId: name: preventedMatchId in: query required: false schema: type: integer format: int64 example: 1 cancelRestrictions: name: cancelRestrictions in: query required: false schema: type: string enum: ['ONLY_NEW','ONLY_PARTIALLY_FILLED'] example: "ONLY_NEW" network: name: network in: query required: false schema: type: string example: "BTC" targetAsset: name: targetAsset in: query required: true schema: type: string example: "BTC" autoRepay: name: autoRepay in: query required: true schema: type: boolean example: true schemas: account: type: object properties: makerCommission: type: integer format: int64 example: 15 takerCommission: type: integer format: int64 example: 15 buyerCommission: type: integer format: int64 example: 0 sellerCommission: type: integer format: int64 example: 0 commissionRates: type: object properties: maker: type: string example: "0.00150000" taker: type: string example: "0.00150000" buyer: type: string example: "0.00000000" seller: type: string example: "0.00000000" required: - maker - taker - buyer - seller canTrade: type: boolean canWithdraw: type: boolean canDeposit: type: boolean brokered: type: boolean example: false requireSelfTradePrevention: type: boolean example: false preventSor: type: boolean example: false updateTime: type: integer format: int64 example: 123456789 accountType: type: string example: "SPOT" balances: type: array items: type: object properties: asset: type: string example: "BTC" free: type: string example: "4723846.89208129" locked: type: string example: "0.00000000" required: - asset - free - locked permissions: type: array items: type: string example: "SPOT" uid: type: integer format: int64 example: 354937868 required: - makerCommission - takerCommission - buyerCommission - sellerCommission - commissionRates - canTrade - canWithdraw - canDeposit - brokered - requireSelfTradePrevention - preventSor - updateTime - accountType - balances - permissions - uid order: type: object properties: symbol: type: string example: "BNBBTC" origClientOrderId: type: string example: "msXkySR3u5uYwpvRMFsi3u" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 description: Unless OCO, value will be -1 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "SELL" selfTradePreventionMode: type: string example: "NONE" required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - selfTradePreventionMode - transactTime ocoOrder: type: object properties: orderListId: type: integer format: int64 example: 1929 contingencyType: type: string example: "OCO" listStatusType: type: string example: "ALL_DONE" listOrderStatus: type: string example: "ALL_DONE" listClientOrderId: type: string example: "C3wyj4WVEktd7u9aVBRXcN" transactionTime: type: integer format: int64 example: 1574040868128 symbol: type: string example: "BNBBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "BNBBTC" orderId: 2 clientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" - symbol: "BNBBTC" orderId: 3 clientOrderId: "TXOvglzXuaubXAaENpaRCB" orderReports: type: array items: type: object properties: symbol: type: string origClientOrderId: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string selfTradePreventionMode: type: string transactTime: type: integer format: int64 required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice - selfTradePreventionMode - transactTime example: - symbol: "BNBBTC" origClientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" orderId: 2 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "1.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "STOP_LOSS_LIMIT" side: "SELL" stopPrice: "1.00000000" transactTime: 1688005070874 - symbol: "BNBBTC" origClientOrderId: "TXOvglzXuaubXAaENpaRCB" orderId: 3 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "3.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "LIMIT_MAKER" side: "SELL" selfTradePreventionMode: "NONE" transactTime: 1688005070874 required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders - orderReports marginOcoOrder: type: object properties: orderListId: type: integer format: int64 example: 0 contingencyType: type: string example: "OCO" listStatusType: type: string example: "ALL_DONE" listOrderStatus: type: string example: "ALL_DONE" listClientOrderId: type: string example: "C3wyj4WVEktd7u9aVBRXcN" transactionTime: type: integer format: int64 example: 1574040868128 symbol: type: string example: "BNBUSDT" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "BNBUSDT" orderId: 2 clientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" - symbol: "BNBUSDT" orderId: 3 clientOrderId: "TXOvglzXuaubXAaENpaRCB" orderReports: type: array items: type: object properties: symbol: type: string origClientOrderId: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice example: - symbol: "BNBUSDT" origClientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" orderId: 2 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "1.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "STOP_LOSS_LIMIT" side: "SELL" stopPrice: "1.00000000" - symbol: "BNBUSDT" origClientOrderId: "TXOvglzXuaubXAaENpaRCB" orderId: 3 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "3.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "LIMIT_MAKER" side: "SELL" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders - orderReports orderDetails: type: object properties: symbol: type: string example: "LTCBTC" orderId: type: integer format: int64 example: 1 orderListId: type: integer format: int64 description: Unless OCO, value will be -1 example: -1 clientOrderId: type: string example: "myOrder1" price: type: string example: "0.1" origQty: type: string example: "1.0" executedQty: type: string example: "0.0" cummulativeQuoteQty: type: string example: "0.0" status: type: string example: "NEW" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "BUY" stopPrice: type: string example: "0.0" icebergQty: type: string example: "0.0" time: type: integer format: int64 example: 1499827319559 updateTime: type: integer format: int64 example: 1499827319559 isWorking: type: boolean workingTime: type: integer format: int64 example: 1499827319559 origQuoteOrderQty: type: string example: "0.00000000" selfTradePreventionMode: type: string example: NONE preventedMatchId: type: integer example: 0 preventedQuantity: type: string example: "1.200000" required: - symbol - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice - icebergQty - time - updateTime - isWorking - workingTime - origQuoteOrderQty - selfTradePreventionMode orderResponseAck: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 required: - symbol - orderId - orderListId - clientOrderId - transactTime orderResponseResult: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "0.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" side: type: string example: "SELL" strategyId: type: integer format: int64 example: 1 strategyType: type: integer format: int64 example: 1000000 workingTime: type: integer format: int64 example: 1507725176595 selfTradePreventionMode: type: string example: "NONE" required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - selfTradePreventionMode orderResponseFull: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "0.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" side: type: string example: "SELL" strategyId: type: integer format: int64 example: 1 strategyType: type: integer format: int64 example: 1000000 workingTime: type: integer format: int64 example: 1507725176595 selfTradePreventionMode: type: string example: "NONE" fills: type: array items: type: object properties: price: type: string example: "4000.00000000" qty: type: string example: "1.00000000" commission: type: string example: "4.00000000" commissionAsset: type: string example: "USDT" required: - price - qty - commission - commissionAsset required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - selfTradePreventionMode - fills marginOrder: type: object properties: symbol: type: string example: "LTCBTC" orderId: type: integer format: int64 example: 28 origClientOrderId: type: string example: "msXkySR3u5uYwpvRMFsi3u" clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "8.00000000" cummulativeQuoteQty: type: string example: "8.00000000" status: type: string example: "CANCELED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "SELL" required: - symbol - orderId - origClientOrderId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side marginOrderDetail: type: object properties: clientOrderId: type: string example: "ZwfQzuDIGpceVhKW5DvCmO" cummulativeQuoteQty: type: string example: "0.00000000" executedQty: type: string example: "0.00000000" icebergQty: type: string example: "0.00000000" isWorking: type: boolean orderId: type: integer format: int64 example: 213205622 origQty: type: string example: "0.30000000" price: type: string example: "0.00493630" side: type: string example: "SELL" status: type: string example: "NEW" stopPrice: type: string example: "0.00000000" symbol: type: string example: "BNBBTC" isIsolated: type: boolean time: type: integer format: int64 example: 1562133008725 timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" updateTime: type: integer format: int64 example: 1562133008725 selfTradePreventionMode: type: string example: "NONE" required: - clientOrderId - cummulativeQuoteQty - executedQty - icebergQty - isWorking - orderId - origQty - price - side - status - stopPrice - symbol - isIsolated - time - timeInForce - type - updateTime - selfTradePreventionMode canceledMarginOrderDetail: type: object properties: symbol: type: string example: "BNBUSDT" isIsolated: type: boolean origClientOrderId: type: string example: "E6APeyTJvkMvLMYMqu1KQ4" orderId: type: integer format: int64 example: 11 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "pXLV6Hz6mprAcVYpVMTGgx" price: type: string example: "0.089853" origQty: type: string example: "0.178622" executedQty: type: string example: "0.000000" cummulativeQuoteQty: type: string example: "0.000000" status: type: string example: "CANCELED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "BUY" required: - symbol - isIsolated - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side marginOrderResponseAck: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" isIsolated: type: boolean transactTime: type: integer format: int64 example: 1507725176595 required: - symbol - orderId - clientOrderId - isIsolated - transactTime marginOrderResponseResult: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" isIsolated: type: boolean side: type: string example: "SELL" required: - symbol - orderId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - isIsolated - side marginOrderResponseFull: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" side: type: string example: "SELL" marginBuyBorrowAmount: type: number format: double example: 5 description: will not return if no margin trade happens marginBuyBorrowAsset: type: string example: "BTC" description: will not return if no margin trade happens isIsolated: type: boolean fills: type: array items: type: object properties: price: type: string example: "4000.00000000" qty: type: string example: "1.00000000" commission: type: string example: "4.00000000" commissionAsset: type: string example: "USDT" required: - price - qty - commission - commissionAsset required: - symbol - orderId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - marginBuyBorrowAmount - marginBuyBorrowAsset - isIsolated - fills marginTrade: type: object properties: commission: type: string example: "0.00006000" commissionAsset: type: string example: "BTC" id: type: integer format: int64 example: 28 isBestMatch: type: boolean isBuyer: type: boolean isMaker: type: boolean orderId: type: integer format: int64 example: 28 price: type: string example: "0.02000000" qty: type: string example: "1.02000000" symbol: type: string example: "BNBBTC" isIsolated: type: boolean example: false time: type: integer format: int64 example: 1507725176595 required: - commission - commissionAsset - id - isBestMatch - isBuyer - isMaker - orderId - price - qty - symbol - isIsolated - time marginTransferDetails: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "0.10000000" asset: type: string example: "BNB" status: type: string example: "CONFIRMED" timestamp: type: integer format: int64 example: 1566898617000 txId: type: integer format: int64 example: 5240372201 type: type: string example: "ROLL_IN" transFrom: type: string example: "SPOT" transTo: type: string example: "ISOLATED_MARGIN" required: - amount - asset - status - timestamp - txId - transFrom - transTo total: type: integer format: int32 example: 1 required: - rows - total isolatedMarginAccountInfo: type: object properties: assets: type: array items: type: object properties: baseAsset: type: object properties: asset: type: string example: "BTC" borrowEnabled: type: boolean borrowed: type: string example: "0.00000000" free: type: string example: "0.00000000" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00000000" netAssetOfBtc: type: string example: "0.00000000" repayEnabled: type: boolean totalAsset: type: string example: "0.00000000" required: - asset - borrowEnabled - borrowed - free - interest - locked - netAsset - netAssetOfBtc - repayEnabled - totalAsset quoteAsset: type: object properties: asset: type: string example: "USDT" borrowEnabled: type: boolean borrowed: type: string example: "0.00000000" free: type: string example: "0.00000000" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00000000" netAssetOfBtc: type: string example: "0.00000000" repayEnabled: type: boolean totalAsset: type: string example: "0.00000000" required: - asset - borrowEnabled - borrowed - free - interest - locked - netAsset - netAssetOfBtc - repayEnabled - totalAsset symbol: type: string example: "BTCUSDT" isolatedCreated: type: boolean enabled: type: boolean description: true-enabled, false-disabled marginLevel: type: string example: "0.00000000" marginLevelStatus: type: string example: "EXCESSIVE" description: '"EXCESSIVE", "NORMAL", "MARGIN_CALL", "PRE_LIQUIDATION", "FORCE_LIQUIDATION"' marginRatio: type: string example: "0.00000000" indexPrice: type: string example: "10000.00000000" liquidatePrice: type: string example: "1000.00000000" liquidateRate: type: string example: "1.00000000" tradeEnabled: type: boolean required: - baseAsset - quoteAsset - symbol - isolatedCreated - enabled - marginLevel - marginLevelStatus - marginRatio - indexPrice - liquidatePrice - liquidateRate - tradeEnabled totalAssetOfBtc: type: string example: "0.00000000" totalLiabilityOfBtc: type: string example: "0.00000000" totalNetAssetOfBtc: type: string example: "0.00000000" required: - assets - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc bookTickerList: type: array items: $ref: '#/components/schemas/bookTicker' bookTicker: type: object properties: symbol: type: string example: "BNBBTC" bidPrice: type: string example: "16.36240000" bidQty: type: string example: "256.78000000" askPrice: type: string example: "16.36450000" askQty: type: string example: "12.56000000" required: - symbol - bidPrice - bidQty - askPrice - askQty priceTickerList: type: array items: $ref: '#/components/schemas/priceTicker' priceTicker: type: object properties: symbol: type: string example: "BNBBTC" price: type: string example: "0.17160000" required: - symbol - price repaymentInfo: type: object properties: loanCoin: type: string example: "BUSD" remainingPrincipal: type: string example: "100.5" remainingInterest: type: string example: "0" collateralCoin: type: string example: "BNB" remainingCollateral: type: string example: "5.253" currentLTV: type: string example: "0.25" repayStatus: type: string example: "Repaying" required: - loanCoin - remainingPrincipal - remainingInterest - collateralCoin - remainingCollateral - currentLTV - repayStatus repaymentInfo2: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" repayStatus: type: string example: "Repaying" required: - loanCoin - collateralCoin - repayStatus tickerList: type: array items: $ref: '#/components/schemas/ticker' ticker: type: object properties: symbol: type: string example: "BNBBTC" priceChange: type: string example: "0.17160000" priceChangePercent: type: string example: "1.060" prevClosePrice: type: string example: "16.35920000" lastPrice: type: string example: "27.84000000" bidPrice: type: string example: "16.34488284" bidQty: type: string example: "16.34488284" askPrice: type: string example: "16.35920000" askQty: type: string example: "25.06000000" openPrice: type: string example: "16.18760000" highPrice: type: string example: "16.55000000" lowPrice: type: string example: "16.16940000" volume: type: string example: "1678279.95000000" quoteVolume: type: string example: "27431289.14792300" openTime: type: integer format: int64 example: 1592808788637 closeTime: type: integer format: int64 example: 1592895188637 firstId: type: integer format: int64 example: 62683296 lastId: type: integer format: int64 example: 62739253 count: type: integer format: int64 example: 55958 required: - symbol - priceChange - priceChangePercent - prevClosePrice - lastPrice - bidPrice - bidQty - askPrice - askQty - openPrice - highPrice - lowPrice - volume - quoteVolume - openTime - closeTime - firstId - lastId - count myTrade: type: object properties: symbol: type: string example: "BNBBTC" id: type: integer format: int64 description: Trade id example: 28457 orderId: type: integer format: int64 example: 100234 orderListId: type: integer format: int64 example: -1 price: type: string description: Price example: "4.00000100" qty: type: string description: Amount of base asset example: "12.00000000" quoteQty: type: string description: Amount of quote asset example: "48.000012" commission: type: string example: "10.10000000" commissionAsset: type: string example: "BNB" time: type: integer format: int64 description: Trade timestamp example: 1499865549590 isBuyer: type: boolean example: false isMaker: type: boolean example: false isBestMatch: type: boolean required: - symbol - id - orderId - orderListId - price - qty - quoteQty - commission - commissionAsset - time - isBuyer - isMaker - isBestMatch transaction: type: object properties: tranId: type: integer format: int64 description: transaction id example: 345196462 required: - tranId trade: type: object properties: id: type: integer format: int64 description: trade id example: 345196462 price: type: string description: price example: "9638.99000000" qty: type: string description: amount of base asset example: "0.02077200" quoteQty: type: string description: amount of quote asset example: "0.02077200" time: type: integer format: int64 description: Trade executed timestamp, as same as `T` in the stream example: 1592887772684 isBuyerMaker: type: boolean isBestMatch: type: boolean required: - id - price - qty - quoteQty - time - isBuyerMaker - isBestMatch aggTrade: type: object properties: a: type: integer format: int64 description: Aggregate tradeId example: 26129 p: type: string description: Price example: "0.01633102" q: type: string description: Quantity example: "4.70443515" f: type: integer format: int64 description: First tradeId example: 27781 l: type: integer format: int64 description: Last tradeId example: 27781 T: type: boolean description: Timestamp example: 1498793709153 maker: type: boolean description: Was the buyer the maker? M: type: boolean description: Was the trade the best price match? required: - a - p - q - f - l - T - maker - M bnbBurnStatus: type: object properties: spotBNBBurn: type: boolean interestBNBBurn: type: boolean example: false required: - spotBNBBurn - interestBNBBurn snapshotSpot: type: object properties: code: type: integer format: int64 example: 200 msg: type: string example: "" snapshotVos: type: array items: type: object properties: data: type: object properties: balances: type: array items: type: object properties: asset: type: string example: "BTC" free: type: string example: "0.2" locked: type: string example: "0.001" required: - asset - free - locked totalAssetOfBtc: type: string example: "0.09905021" required: - balances - totalAssetOfBtc type: type: string example: "spot" updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos snapshotMargin: type: object properties: code: type: integer format: int64 example: 200 msg: type: string example: "" snapshotVos: type: array items: type: object properties: data: type: object properties: marginLevel: type: string example: "2748.02909813" totalAssetOfBtc: type: string example: "0.00274803" totalLiabilityOfBtc: type: string example: "0.00000100" totalNetAssetOfBtc: type: string example: "0.00274750" userAssets: type: array items: type: object properties: asset: type: string example: "XRP" borrowed: type: string example: "0.00000000" free: type: string example: "1.00000000" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "1.00000000" required: - asset - borrowed - free - interest - locked - netAsset required: - marginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - userAssets type: type: string example: "margin" updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos snapshotFutures: type: object properties: code: type: integer format: int64 example: 200 msg: type: string example: "" snapshotVos: type: array items: type: object properties: data: type: object properties: assets: type: array items: type: object properties: asset: type: string example: "USDT" marginBalance: type: string example: "118.99782335" walletBalance: type: string example: "120.23811389" required: - asset - marginBalance - walletBalance position: type: array items: type: object properties: entryPrice: type: string example: "7130.41000000" markPrice: type: string example: "7257.66239673" positionAmt: type: string example: "0.01000000" symbol: type: string example: "BTCUSDT" unRealizedProfit: type: string example: "1.24029054" required: - entryPrice - markPrice - positionAmt - symbol - unRealizedProfit required: - assets - position type: type: string example: "futures" updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos subAccountUSDTFuturesDetails: type: object properties: futureAccountResp: type: object properties: email: type: string example: "abc@test.com" assets: type: array items: type: object properties: asset: type: string example: "USDT" initialMargin: type: string example: "0.00000000" maintenanceMargin: type: string example: "0.00000000" marginBalance: type: string example: "0.88308000" maxWithdrawAmount: type: string example: "0.88308000" openOrderInitialMargin: type: string example: "0.00000000" positionInitialMargin: type: string example: "0.00000000" unrealizedProfit: type: string example: "0.00000000" walletBalance: type: string example: "0.88308000" required: - asset - initialMargin - maintenanceMargin - marginBalance - maxWithdrawAmount - openOrderInitialMargin - positionInitialMargin - unrealizedProfit - walletBalance canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer format: int64 example: 2 maxWithdrawAmount: type: string example: "0.88308000" totalInitialMargin: type: string example: "0.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "0.88308000" totalOpenOrderInitialMargin: type: string example: "0.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "0.88308000" updateTime: type: integer format: int64 example: 1576756674610 required: - email - assets - canDeposit - canTrade - canWithdraw - feeTier - maxWithdrawAmount - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - updateTime required: - futureAccountResp subAccountCOINFuturesDetails: type: object properties: email: type: string example: "abc@test.com" assets: type: array items: type: object properties: asset: type: string example: "BTC" initialMargin: type: string example: "0.00000000" maintenanceMargin: type: string example: "0.00000000" marginBalance: type: string example: "0.88308000" maxWithdrawAmount: type: string example: "0.88308000" openOrderInitialMargin: type: string example: "0.00000000" positionInitialMargin: type: string example: "0.00000000" unrealizedProfit: type: string example: "0.00000000" walletBalance: type: string example: "0.88308000" required: - asset - initialMargin - maintenanceMargin - marginBalance - maxWithdrawAmount - openOrderInitialMargin - positionInitialMargin - unrealizedProfit - walletBalance canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer format: int64 example: 2 updateTime: type: integer format: int64 example: 1598959682001 required: - email - assets - canDeposit - canTrade - canWithdraw - feeTier - updateTime subAccountUSDTFuturesSummary: type: object properties: futureAccountSummaryResp: type: object properties: totalInitialMargin: type: string example: "9.83137400" totalMaintenanceMargin: type: string example: "0.41568700" totalMarginBalance: type: string example: "23.03235621" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.83137400" totalUnrealizedProfit: type: string example: "0.03219710" totalWalletBalance: type: string example: "22.15879444" asset: type: string example: "USD" description: The sum of BUSD and USDT subAccountList: type: array items: type: object properties: email: type: string example: "123@test.com" totalInitialMargin: type: string example: "9.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "22.12659734" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "22.12659734" asset: type: string example: "USD" description: The sum of BUSD and USDT required: - email - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset required: - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset - subAccountList required: - futureAccountSummaryResp subAccountCOINFuturesSummary: type: object properties: deliveryAccountSummaryResp: type: object properties: totalMarginBalanceOfBTC: type: string example: 25.03221121 totalUnrealizedProfitOfBTC: type: string example: 0.12233410 totalWalletBalanceOfBTC: type: string example: 22.15879444 asset: type: string example: BTC subAccountList: type: array items: type: object properties: email: type: string example: 123@test.com totalMarginBalance: type: string example: 22.12659734 totalUnrealizedProfit: type: string example: 0.00000000 totalWalletBalance: type: string example: 22.12659734 asset: type: string example: BTC required: - email - totalMarginBalance - totalUnrealizedProfit - totalWalletBalance - asset required: - totalMarginBalanceOfBTC - totalUnrealizedProfitOfBTC - totalWalletBalanceOfBTC - asset - subAccountList required: - deliveryAccountSummaryResp subAccountUSDTFuturesPositionRisk: type: object properties: futurePositionRiskVos: type: array items: type: object properties: entryPrice: type: string example: "9975.12000" leverage: type: string example: "50" description: current initial leverage maxNotional: type: string example: "1000000" description: notional value limit of current initial leverage liquidationPrice: type: string example: "7963.54" markPrice: type: string example: "9973.50770517" positionAmount: type: string example: "0.010" symbol: type: string example: "BTCUSDT" unrealizedProfit: type: string example: "-0.01612295" required: - entryPrice - leverage - maxNotional - liquidationPrice - markPrice - positionAmount - symbol - unrealizedProfit required: - futurePositionRiskVos subAccountCOINFuturesPositionRisk: type: object properties: deliveryPositionRiskVos: type: array items: type: object properties: entryPrice: type: string example: "9975.12000" markPrice: type: string example: "9973.50770517" leverage: type: string example: "20" isolated: type: string example: false isolatedWallet: type: string example: "9973.50770517" isolatedMargin: type: string example: "0.00000000" isAutoAddMargin: type: string example: "false" positionSide: type: string example: "BOTH" positionAmount: type: string example: "1.230" symbol: type: string example: "BTCUSD_201225" unrealizedProfit: type: string example: "-0.01612295" required: - entryPrice - markPrice - leverage - isolated - isolatedWallet - isolatedMargin - isAutoAddMargin - positionSide - positionAmount - symbol - unrealizedProfit required: - deliveryPositionRiskVos bswapAddLiquidityPreviewCombination: type: object properties: quoteAsset: type: string example: "USDT" baseAsset: type: string example: "BUSD" quoteAmt: type: integer format: int64 example: 300000 baseAmt: type: integer format: int64 example: 299975 price: type: number format: double example: 1.00008334 share: type: number format: double example: 1.23 required: - quoteAsset - baseAsset - quoteAmt - baseAmt - price - share bswapAddLiquidityPreviewSingle: type: object properties: quoteAsset: type: string example: "USDT" quoteAmt: type: integer format: int64 example: 300000 price: type: number format: double example: 1.00008334 share: type: number format: double example: 1.23 slippage: type: number format: double example: 0.00007245 fee: type: number format: double example: 120 required: - quoteAsset - quoteAmt - price - share - slippage - fee bswapRmvLiquidityPreviewCombination: type: object properties: quoteAsset: type: string example: "USDT" baseAsset: type: string example: "BUSD" quoteAmt: type: integer format: int64 example: 300000 baseAmt: type: integer format: int64 example: 299975 price: type: number format: double example: 1.00008334 required: - quoteAsset - baseAsset - quoteAmt - baseAmt - price bswapRmvLiquidityPreviewSingle: type: object properties: quoteAsset: type: string example: "USDT" quoteAmt: type: integer format: int64 example: 300000 price: type: number format: double example: 1.00008334 slippage: type: number format: double example: 0.00007245 fee: type: number format: double example: 120 required: - quoteAsset - quoteAmt - price - slippage - fee error: type: object properties: code: type: integer format: int64 description: Error code msg: type: string description: Error message example: "error message" required: - code - msg securitySchemes: ApiKeyAuth: name: X-MBX-APIKEY in: header description: Binance Public API Key type: apiKey