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: Mining description: Mining 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 paths: /api/v3/ping: get: summary: Test Connectivity description: |- Test connectivity to the Rest API. Weight: 1 tags: - Market responses: '200': description: OK content: application/json: schema: type: object /api/v3/time: get: summary: Check Server Time description: |- Test connectivity to the Rest API and get the current server time. Weight: 1 tags: - Market responses: '200': description: Binance server UTC timestamp content: application/json: schema: type: object properties: serverTime: type: integer example: 1499827319559 /api/v3/exchangeInfo: get: 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: 10 tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' 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 example: 1592882214236 rateLimits: type: array items: type: object properties: rateLimitType: type: string example: "REQUEST_WEIGHT" interval: type: string example: "MINUTE" intervalNum: type: integer example: 1 limit: type: integer example: 1200 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 example: 8 quoteAsset: type: string example: "BTC" quoteAssetPrecision: type: integer example: 8 baseCommissionPrecision: type: integer example: 8 quoteCommissionPrecision: type: integer example: 8 orderTypes: type: array items: type: string example: "LIMIT" icebergAllowed: type: boolean ocoAllowed: type: boolean quoteOrderQtyMarketAllowed: type: boolean 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" permissions: type: array items: type: string example: "SPOT" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/depth: get: summary: Order Book description: |- | Limit | Weight | | ------------- |---------| | 5, 10, 20, 50, 100 | 1 | | 500 | 5 | | 1000 | 10 | | 5000 | 50 | tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: limit in: query schema: type: integer default: 100 maximum: 5000 enum: [5, 10, 20, 50, 100, 500, 1000, 5000] example: 100 responses: '200': description: Order book content: application/json: schema: type: object properties: lastUpdateId: type: integer example: 1060776800 bids: type: array items: type: array items: type: array items: type: string asks: type: array items: type: array items: type: array items: type: string example: lastUpdateId: 1060776800 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: summary: Recent Trades List description: |- Get recent trades. Weight: 1 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: summary: Old Trade Lookup description: |- Get older market trades. Weight: 5 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/fromId' security: - ApiKeyAuth: [] 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' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/aggTrades: get: 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 `startTime` and `endTime` are sent, time between startTime and endTime must be less than 1 hour. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. Weight: 1 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: 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: 1 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: interval in: query required: true description: kline intervals schema: type: string enum: [1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,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: 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/avgPrice: get: summary: Current Average Price description: |- Current average price for a symbol. Weight: 1 tags: - Market parameters: - $ref: '#/components/parameters/symbol' responses: '200': description: Average price content: application/json: schema: type: object properties: mins: type: integer example: 5 price: type: string example: "9.35751834" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/ticker/24hr: get: 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:\ `1` for a single symbol;\ `40` when the symbol parameter is omitted tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' 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: 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:\ `1` for a single symbol;\ `2` when the symbol parameter is omitted tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' 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: 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:\ 1 for a single symbol;\ 2 when the symbol parameter is omitted tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' 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/order/test: post: 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: 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/stopPrice' - $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: 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: 2 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: 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: 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/stopPrice' - $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: 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: summary: Cancel Order (TRADE) description: |- Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight: 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $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 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/openOrders: get: summary: Current Open Orders (USER_DATA) description: |- Get all open orders on a symbol. Careful when accessing this with no symbol. Weight:\ `3` for a single symbol;\ `40` 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: summary: Cancel all Open Orders on a Symbol (TRADE) description: |- Cancels all active orders on a symbol.\ This includes OCO orders. Weight: 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: $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/allOrders: get: 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: 10 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: 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: 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/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/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 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 example: 1563417480525 symbol: type: string example: "LTCBTC" orders: type: array items: properties: symbol: type: string orderId: type: integer clientOrderId: type: string 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 orderListId: type: integer clientOrderId: type: string transactTime: type: integer 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 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" '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: summary: Query OCO (USER_DATA) description: |- Retrieves a specific OCO based on provided optional parameters Weight: 2 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 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 example: 1565245656253 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "qD1gy3kc3Gx0rihm9Y3xwS" - symbol: "LTCBTC" orderId: 5 clientOrderId: "ARzZ9I00CPM8i3NhmU9Ega" '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: summary: Cancel OCO (TRADE) description: |- Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight: 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: type: object properties: orderListId: type: integer 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 example: 1574040868128 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 2 clientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" - symbol: "LTCBTC" orderId: 3 clientOrderId: "TXOvglzXuaubXAaENpaRCB" orderReports: type: array items: type: object properties: symbol: type: string origClientOrderId: type: string orderId: type: integer orderListId: type: integer 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 example: - symbol: "LTCBTC" 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: "LTCBTC" 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" '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: summary: Query all OCO (USER_DATA) description: |- Retrieves all OCO based on provided optional parameters Weight: 10 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 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 example: 1565245913483 symbol: type: string example: "LTCBTC" isIsolated: type: boolean orders: type: array items: type: object properties: symbol: type: string orderId: type: integer clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "oD7aesZqjEGlZrbtRpy5zB" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Jr1h6xirOxgeJOUuYQS7V3" '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: summary: Query Open OCO (USER_DATA) description: 'Weight: 3' 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 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 example: 1565246080644 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "r3EH2N76dHfLoSZWIUw1bT" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Cv1SnyPD3qhqpbjpYEHbd2" '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: summary: Account Information (USER_DATA) description: |- Get current account information. Weight: 10 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: 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. Weight: 10 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - name: orderId in: query description: This can only be used in combination with symbol. schema: type: integer - $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' /sapi/v1/margin/transfer: post: summary: Cross Margin Account Transfer (MARGIN) description: |- Execute transfer between spot account and cross margin account. Weight: 1 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query description: |- 1 -> transfer from main account to margin account \ 2 -> transfer from margin account to main account schema: type: integer enum: [1,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: 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: 1 tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - name: type in: query description: Tranfer Type schema: type: string enum: [ROLL_IN, ROLL_OUT] - $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 example: rows: - amount: "0.10000000" asset: "BNB" status: "CONFIRMED" timestamp: 1566898617 txId: 5240372201 type: "ROLL_IN" 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/loan: post: summary: Margin Account Borrow (MARGIN) description: |- Apply for a loan. - If "isIsolated" = "TRUE", "symbol" must be sent - "isIsolated" = "FALSE" for crossed margin loan Weight: 1 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: summary: Query Load 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: 1 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 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: Load records content: application/json: schema: type: object 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: 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: 1 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: 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: 1 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 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 example: 1563438204000 txId: type: integer example: 2970933056 total: type: integer example: 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/asset: get: summary: Query Margin Asset (MARKET_DATA) description: 'Weight: 1' 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" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/pair: get: summary: Query Cross Margin Pair (MARKET_DATA) description: 'Weight: 1' 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 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 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allAssets: get: summary: Get All Margin Assets (MARKET_DATA) description: 'Weight: 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" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allPairs: get: summary: Get All Cross Margin Pairs (MARKET_DATA) description: 'Weight: 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 example: 351637150141315861 isBuyAllowed: type: boolean isMarginTrade: type: boolean isSellAllowed: type: boolean quote: type: string example: "BTC" symbol: type: string example: "BNBBTC" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/priceIndex: get: summary: Query Margin PriceIndex (MARKET_DATA) description: 'Weight: 1' tags: - Margin parameters: - $ref: '#/components/parameters/symbol' security: - ApiKeyAuth: [] responses: '200': description: Price index content: application/json: schema: type: object properties: calcTime: type: integer example: 1562046418000 price: type: string example: "0.00333930" symbol: type: string example: "BNBBTC" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/order: get: 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: 1 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: summary: Margin Account New Order (TRADE) description: |- Post a new order for margin account. Weight: 1 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' - $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: summary: Margin Account Cancel Order (TRADE) description: |- Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight: 1 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: 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: 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 example: 1566813600 interestRate: type: string example: "0.01600000" principal: type: string example: "36.22000000" type: type: string example: "ON_BORROW" total: type: integer example: 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/forceLiquidationRec: get: summary: Get Force Liquidation Record (USER_DATA) description: |- - Response in descending order Weight: 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 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: summary: Query Cross Margin Account Details (USER_DATA) description: 'Weight: 1' 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" '400': 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: summary: Query Margin Account's Open Order (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: 1 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: 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: 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: $ref: '#/components/schemas/canceledMarginOrderDetail' '400': 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: 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: 1 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: 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: 1 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/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 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 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 clientOrderId: type: string 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 orderListId: type: integer clientOrderId: type: string transactTime: type: integer 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 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" '400': 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: 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: 2 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 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 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 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "qD1gy3kc3Gx0rihm9Y3xwS" - symbol: "LTCBTC" orderId: 5 clientOrderId: "ARzZ9I00CPM8i3NhmU9Ega" '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: 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: 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: type: object properties: orderListId: type: integer 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 example: 1574040868128 symbol: type: string example: "LTCBTC" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 2 clientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" - symbol: "LTCBTC" orderId: 3 clientOrderId: "TXOvglzXuaubXAaENpaRCB" orderReports: type: array items: type: object properties: symbol: type: string origClientOrderId: type: string orderId: type: integer orderListId: type: integer 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 example: - symbol: "LTCBTC" 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: "LTCBTC" 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" '400': 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: summary: Query Margin Account's all OCO (USER_DATA) description: |- Retrieves all OCO for a specific margin account based on provided optional parameters Weight: 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 - 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 - $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 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 example: 1565245913483 symbol: type: string example: "LTCBTC" isIsolated: type: boolean orders: type: array items: type: object properties: symbol: type: string orderId: type: integer clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "oD7aesZqjEGlZrbtRpy5zB" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Jr1h6xirOxgeJOUuYQS7V3" '400': 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: summary: Query Margin Account's Open OCO (USER_DATA) description: 'Weight: 3' 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 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 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 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "r3EH2N76dHfLoSZWIUw1bT" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Cv1SnyPD3qhqpbjpYEHbd2" '400': 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: 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: 1 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: 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: 5 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 '400': 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: summary: Query Max Transfer-Out Amount (USER_DATA) description: |- - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight: 5 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 example: amount: "1.69248805" '400': 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: summary: Get Isolated Margin Transfer History (USER_DATA) description: 'Weight: 1' tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/transFrom' - $ref: '#/components/parameters/transTo' - $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: summary: Isolated Margin Account Transfer (USER_DATA) description: 'Weight: 1' 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: 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: 1 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: 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: 1 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" '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: summary: Enable Isolated Margin Account (TRADE) description: |- Enable isolated margin account for a specific symbol. Weight: 1 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" '400': 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: summary: Query Enabled Isolated Margin Account Limit (USER_DATA) description: |- Query enabled isolated margin account limit. Weight: 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 example: 5 maxAccount: type: integer example: 20 '400': 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: summary: Query Isolated Margin Symbol (USER_DATA) description: 'Weight: 1' 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 '400': 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: summary: Get All Isolated Margin Symbol(USER_DATA) description: 'Weight: 1' 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 '400': 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: summary: Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) description: |- - "spotBNBBurn" and "interestBNBBurn" should be sent at least one. Weight: 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: summary: Get All Isolated Margin Symbol(USER_DATA) description: 'Weight: 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: summary: Margin Interest Rate History (USER_DATA) description: 'Weight: 1' tags: - Margin parameters: - $ref: '#/components/parameters/asset' - name: vipLevel in: query description: Defaults to user's vip level schema: type: integer example: 1 - $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 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 example: 1611544731000 vipLevel: type: integer example: 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/system/status: get: summary: System Status (System) description: |- Fetch system status. Weight: 1 tags: - Wallet responses: '200': description: OK content: application/json: schema: type: object properties: status: type: integer example: 0 description: "0: normal, 1:system maintenance" msg: type: string example: "normal" description: normal|system maintenance /sapi/v1/capital/config/getall: get: summary: All Coins' Information (USER_DATA) description: |- Get information of coins (available for deposit and withdraw) for user. Weight: 1 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 example: 1 description: 'min number for balance confirmation.' name: type: string example: "BEP2" 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 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 storage: type: string example: "0.00000000" trading: type: boolean withdrawAllEnable: type: boolean withdrawing: type: string example: "0.00000000" '400': 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: summary: Daily Account Snapshot (USER_DATA) description: 'Weight: 1' 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 default: 5 minimum: 5 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: 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. 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: 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. 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: 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: 1 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - name: withdrawOrderId in: query description: Client id for withdraw schema: type: string - name: network in: query description: Get the value from `GET /sapi/v1/capital/config/getall` schema: type: string - 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 - $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" '400': 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: 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: 1 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - name: status in: query description: |- 0 -> pending\ 6 -> credited but cannot withdraw\ 1 -> success schema: type: integer enum: [0, 6, 1] - $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 example: 1 address: type: string example: "0x788cabe9236ce061e5a892e1a59395a81fc8d62c" addressTag: type: string example: "" txId: type: string example: "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3" insertTime: type: integer example: 1599621997000 transferType: type: integer example: 0 unlockConfirm: type: string example: "12/12" description: confirm times for unlocking confirmTimes: type: string example: "12/12" '400': 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: summary: Withdraw History (supporting network) (USER_DATA) description: |- Fetch withdraw history. - `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 Weight: 1 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - 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 enum: [0,1,2,3,4,5,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 example: 0 description: 1 for internal transfer, 0 for external transfer status: type: integer example: 6 transactionFee: type: string example: "0.004" confirmNo: type: integer example: 3 txId: type: string example: "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268" '400': 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: 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: 1 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - name: network in: query schema: type: string example: "ETH" - $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" '400': 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: summary: Account Status (USER_DATA) description: |- Fetch account status detail. Weight: 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" '400': 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: summary: Account API Trading Status (USER_DATA) description: |- Fetch account API trading status with details. Weight: 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 example: 0 description: If API trading function is locked, this is the planned recover time triggerCondition: type: object properties: GCR: type: integer example: 150 description: Number of GTC orders IFER: type: integer example: 150 description: Number of FOK/IOC orders UFR: type: integer example: 300 description: Number of orders 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 example: 20 description: Count of all orders v: type: number example: 0.05 description: Current UFR value t: type: number example: 0.99 description: Trigger UFR value updateTime: type: integer example: 1547630471725 '400': 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: summary: DustLog(USER_DATA) description: 'Weight: 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 example: 8 userAssetDribblets: type: array items: type: object properties: operateTime: type: integer 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 example: 45178372831 userAssetDribbletDetails: type: array items: type: object properties: transId: type: integer example: 4359321 serviceChargeAmount: type: string example: "0.000009" amount: type: string example: "0.0009" operateTime: type: integer example: 1615985535000 transferedAmount: type: string example: "0.000441" fromAsset: type: string example: "USDT" '400': 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: summary: Dust Transfer (USER_DATA) description: |- Convert dust assets to BNB. Weight: 1 tags: - Wallet parameters: - name: asset in: query required: true description: The asset being converted. For example, asset=BTC&asset=USDT schema: type: string example: asset=BTC&asset=USDT - $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 example: 1563368549307 serviceChargeAmount: type: string example: "0.00500000" tranId: type: integer example: 2970932918 transferedAmount: type: string example: "0.25000000" '400': 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: summary: Asset Dividend Record (USER_DATA) description: |- Query asset Dividend Record Weight: 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query required: true schema: type: string default: 20 maximum: 50 - $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: amount: type: string example: "10.00000000" asset: type: string example: "BHFT" divTime: type: integer example: 1563189166000 enInfo: type: string example: "BHFT distribution" tranId: type: integer example: 2968885920 total: type: integer example: 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/asset/assetDetail: get: 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: 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 example: 35 withdrawStatus: type: boolean description: withdrawStatus status (false if ALL of networks' are false) depositTip: type: string example: "Delisted, Deposit Suspended" '400': 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: summary: Trade Fee (USER_DATA) description: |- Fetch trade fee Weight: 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" '400': 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: 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 Weight: 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 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 example: 11415955596 timestamp: type: integer example: 1544433328000 '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: 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_C2C Spot account transfer to C2C account - 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 - MAIN_MINING Spot account transfer to Mining account - C2C_MAIN C2C account transfer to Spot account - C2C_UMFUTURE C2C account transfer to USDⓈ-M Futures account - C2C_MINING C2C account transfer to Mining account - C2C_MARGIN C2C account transfer to Margin(cross) account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account - UMFUTURE_C2C USDⓈ-M Futures account transfer to C2C 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 - MARGIN_MINING Margin(cross)account transfer to Mining account - MARGIN_C2C Margin(cross)account transfer to C2C account - MINING_MAIN Mining account transfer to Spot account - MINING_UMFUTURE Mining account transfer to USDⓈ-M Futures account - MINING_C2C Mining account transfer to C2C account - MINING_MARGIN Mining account transfer to Margin(cross) account - MAIN_PAY Spot account transfer to Pay account - PAY_MAIN Pay account transfer to Spot account - 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 Weight: 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 example: 13526853623 '400': 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: summary: Funding Wallet (USER_DATA) description: |- - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight: 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - name: needBtcValuation in: query schema: type: string enum: ['true','false'] - $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" '400': 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: summary: Get API Key Permission (USER_DATA) description: 'Weight: 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 example: 1623840271000 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 enableInternalTransfer: type: boolean description: This option authorizes this key to transfer funds between your master account and your sub account instantly 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 enableVanillaOptions: type: boolean example: false description: Authorizes this key to Vanilla options trading enableReading: type: boolean enableFutures: type: boolean example: false description: API Key created before your futures account opened does not support futures API service enableMargin: type: boolean example: false description: This option can be adjusted after the Cross Margin account transfer is completed enableSpotAndMarginTrading: type: boolean example: false tradingAuthorityExpirationTime: type: integer example: 1628985600000 description: Expiration time for spot and margin trading permission '400': 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: 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: 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" '400': 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: summary: Query Sub-account List (For Master Account) description: 'Weight: 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 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 example: 1544433328000 '400': 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: 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: 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 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 example: 6489943656 time: type: integer example: 1544433328000 '400': 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: summary: Sub-account Futures Asset Transfer History (For Master Account) description: 'Weight: 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 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 - $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 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 example: 11897001102 time: type: integer example: 1544433328000 '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: summary: Sub-account Futures Asset Transfer (For Master Account) description: |- - Master account can transfer max 2000 times a minute Weight: 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 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" '400': 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: summary: Sub-account Assets (For Master Account) description: |- Fetch sub-account assets Weight: 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 example: 10000 locked: type: integer example: 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' /sapi/v1/sub-account/spotSummary: get: summary: Sub-account Spot Assets Summary (For Master Account) description: |- Get BTC valued asset summary of subaccounts. Weight: 5 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/page' - name: size in: query description: Default:10 Max:20 schema: type: integer - $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 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" '400': 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: summary: Sub-account Spot Assets Summary (For Master Account) description: |- Fetch sub-account deposit address Weight: 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/coin' - name: network in: query schema: type: string - $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" '400': 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: summary: Sub-account Deposit History (For Master Account) description: |- Fetch sub-account deposit history Weight: 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 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer - $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 example: 1 address: type: string example: "0x788cabe9236ce061e5a892e1a59395a81fc8d62c" addressTag: type: string example: "" txId: type: string example: "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3" insertTime: type: integer example: 1599621997000 transferType: type: integer example: 0 confirmTimes: type: string example: "12/12" '400': 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: summary: Sub-account's Status on Margin/Futures (For Master Account) description: |- - If no `email` sent, all sub-accounts' information will be returned. Weight: 1 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 example: 1570791523523 description: sub account create time isMarginEnabled: type: boolean isFutureEnabled: type: boolean mobile: type: integer example: 1570791523523 description: user mobile number '400': 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: summary: Enable Margin for Sub-account (For Master Account) description: 'Weight: 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 '400': 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: summary: Detail on Sub-account's Margin Account (For Master Account) description: 'Weight: 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 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 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" '400': 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: summary: Summary of Sub-account's Margin Account (For Master Account) description: 'Weight: 1' 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" '400': 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: summary: Enable Futures for Sub-account (For Master Account) description: 'Weight: 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 '400': 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: summary: Detail on Sub-account's Futures Account (For Master Account) description: 'Weight: 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 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" canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer 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 example: 1576756674610 '400': 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: summary: Summary of Sub-account's Futures Account (For Master Account) description: 'Weight: 20' 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" '400': 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: summary: Futures Position-Risk of Sub-account (For Master Account) description: 'Weight: 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 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" '400': 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: summary: Transfer for Sub-account (For Master Account) description: 'Weight: 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 enum: [1,2,3,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" '400': 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: summary: Margin Transfer for Sub-account (For Master Account) description: 'Weight: 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 enum: [1,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" '400': 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: summary: Transfer to Sub-account of Same Master (For Sub-account) description: 'Weight: 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" '400': 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: summary: Transfer to Master (For Sub-account) description: 'Weight: 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" '400': 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: 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: 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalAsset' - name: type in: query description: |- 1: transfer in 2: transfer out schema: type: integer enum: [1,2] - $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 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 example: 11798835829 time: type: integer example: 1544433325000 '400': 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: 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. - Only get the latest history of past 30 days. Weight: 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 500, Max 500 schema: type: string - $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 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 example: 1544433325000 '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: 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. - Transfer between futures accounts is not supported. Weight: 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"] - name: toAccountType in: query required: true schema: type: string enum: ["SPOT","USDT_FUTURE","COIN_FUTURE"] - $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 example: 11945860693 '400': 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: summary: Detail on Sub-account's Futures Account V2 (For Master Account) description: 'Weight: 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 enum: [1,2] - $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: summary: Summary of Sub-account's Futures Account V2 (For Master Account) description: 'Weight: 20' tags: - Sub-Account parameters: - name: futuresType in: query description: |- 1:USDT Margined Futures 2:COIN Margined Futures required: true schema: type: integer enum: [1,2] - $ref: '#/components/parameters/page' - name: limit in: query description: Default 10, Max 20 schema: type: string - $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: summary: Futures Position-Risk of Sub-account V2 (For Master Account) description: 'Weight: 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 enum: [1,2] - $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: summary: Enable Leverage Token for Sub-account (For Master Account) description: 'Weight: 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 '400': 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: summary: Deposit assets into the managed sub-account(For Investor Master Account) description: 'Weight: 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 example: 66157362489 '400': 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: summary: Managed sub-account asset details(For Investor Master Account) description: 'Weight: 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" '400': 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: summary: Withdrawl assets from the managed sub-account(For Investor Master Account) description: 'Weight: 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 - $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 example: 66157362489 '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: 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: - Stream security: - ApiKeyAuth: [] responses: '200': description: Listen key content: application/json: schema: type: object properties: listenKey: type: string example: "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" put: 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: - 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: summary: Close a ListenKey (USER_STREAM) description: |- Close out a user data stream. Weight: 1 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: 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" put: 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: 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: 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" put: 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: 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: summary: Fiat Deposit/Withdraw History (USER_DATA) description: |- - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight: 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 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 example: 1626144956000 updateTime: type: integer example: 1626400907000 total: type: integer example: 1 success: type: boolean '400': 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: summary: Fiat Payments History (USER_DATA) description: |- - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight: 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 example: 1624529919000 updateTime: type: integer example: 1624529919000 total: type: integer example: 1 success: type: boolean '400': 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/daily/product/list: get: summary: Get Flexible Product List (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/flexibleProductStatus' - $ref: '#/components/parameters/featured' - $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 flexible products content: application/json: schema: type: array items: type: object properties: asset: type: string example: BTC avgAnnualInterestRate: type: string example: "0.00250025" canPurchase: type: boolean canRedeem: type: boolean dailyInterestPerThousand: type: string example: "0.00685000" featured: type: boolean minPurchaseAmount: type: string example: "0.01000000" productId: type: string example: BTC001 purchasedAmount: type: string example: "16.32467016" status: type: string example: PURCHASING upLimit: type: string example: "200.00000000" upLimitPerUser: type: string example: "5.00000000" '400': 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/daily/userLeftQuota: get: summary: Get Left Daily Purchase Quota of Flexible Product (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/flexibleProductId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Daily purchase quote of flexible product left content: application/json: schema: type: object properties: asset: type: string example: "BUSD" leftQuota: type: string example: "50000.00000000" '400': 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/daily/purchase: post: summary: Purchase Flexible Product (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/flexibleProductId' - $ref: '#/components/parameters/amount' - $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: integer example: 40607 '400': 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/daily/userRedemptionQuota: get: summary: Get Left Daily Redemption Quota of Flexible Product (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/flexibleProductId' - $ref: '#/components/parameters/flexibleProductType' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Daily redemption quota of flexible product left content: application/json: schema: type: object properties: asset: type: string example: USDT dailyQuota: type: string example: "10000000.00000000" leftQuota: type: string example: "0.00000000" minRedemptionAmount: type: string example: "0.10000000" '400': 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/daily/redeem: post: summary: Redeem Flexible Product (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/flexibleProductId' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/flexibleProductType' - $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/lending/daily/token/position: get: summary: Get Flexible Product Position (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of flexible product positions content: application/json: schema: type: array items: type: object properties: annualInterestRate: type: string example: "0.02600000" asset: type: string example: "USDT" avgAnnualInterestRate: type: string example: "0.02599895" canRedeem: type: boolean dailyInterestRate: type: string example: "0.00007123" freeAmount: type: string example: "75.46000000" freezeAmount: type: string example: "0.00000000" lockedAmount: type: string example: "0.00000000" productId: type: string example: "USDT001" productName: type: string example: "USDT" redeemingAmount: type: string example: "0.00000000" todayPurchasedAmount: type: string example: "0.00000000" totalAmount: type: string example: "75.46000000" totalInterest: type: string example: "0.22759183" '400': 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: summary: Get Fixed/Activity Project List(USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/fixedAndActivityProductType' - $ref: '#/components/parameters/fixedAndActivityProductStatus' - $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 example: 1 duration: type: integer example: 90 interestPerLot: type: string example: "1.35810000" interestRate: type: string example: "0.05510000" lotSize: type: string example: "100.00000000" lotsLowLimit: type: integer example: 1 lotsPurchased: type: integer example: 74155 lotsUpLimit: type: integer example: 80000 maxLotsPerUser: type: integer 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 '400': 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: summary: Purchase Fixed/Activity Project (USER_DATA) description: 'Weight: 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" '400': 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: summary: Get Fixed/Activity Project Position (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/fixedAndActivityProjectId' - $ref: '#/components/parameters/fixedAndActivityProductStatus' - $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 example: 1587010770000 duration: type: integer example: 14 endTime: type: integer example: 1588291200000 interest: type: string example: "0.19950000" interestRate: type: string example: "0.05201250" lot: type: integer example: 1 positionId: type: integer example: 51724 principal: type: string example: "100.00000000" projectId: type: string example: "CUSDT14DAYSS001" projectName: type: string example: "USDT" purchaseTime: type: integer example: 1587010771000 redeemDate: type: string format: date example: "2020-05-01" startTime: type: integer example: 1587081600000 status: type: string example: "HOLDING" type: type: string example: "CUSTOMIZED_FIXED" '400': 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/union/account: get: summary: Lending Account (USER_DATA) description: 'Weight: 1' tags: - Savings parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Lending account content: application/json: schema: type: object properties: positionAmountVos: type: array items: type: object properties: amount: type: string example: "75.46000000" amountInBTC: type: string example: "0.01044819" amountInUSDT: type: string example: "75.46000000" asset: type: string example: "USDT" totalAmountInBTC: type: string example: "0.01067982" totalAmountInUSDT: type: string example: "77.13289230" totalFixedAmountInBTC: type: string example: "0.00000000" totalFixedAmountInUSDT: type: string example: "0.00000000" totalFlexibleInBTC: type: string example: "0.01067982" totalFlexibleInUSDT: type: string example: "77.13289230" '400': 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/union/purchaseRecord: get: summary: Get Purchase Record (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 30 days. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. Weight: 1 tags: - Savings parameters: - $ref: '#/components/parameters/lendingType' - $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: List of flexible or Fixed/Activity products content: application/json: schema: oneOf: - $ref: '#/components/schemas/savingsFlexiblePurchaseRecord' - $ref: '#/components/schemas/savingsFixedActivityPurchaseRecord' '400': 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/union/redemptionRecord: get: summary: Get Redemption Record (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 30 days. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. Weight: 1 tags: - Savings parameters: - $ref: '#/components/parameters/lendingType' - $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: History of Flexible or Fixed/Activity Redemptions content: application/json: schema: oneOf: - $ref: '#/components/schemas/savingsFlexibleRedemptionRecord' - $ref: '#/components/schemas/savingsFixedActivityRedemptionRecord' '400': 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/union/interestHistory: get: summary: Get Interest History (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 30 days. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. Weight: 1 tags: - Savings parameters: - $ref: '#/components/parameters/lendingType' - $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: History of interest content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BUSD" interest: type: string example: "0.00006408" lendingType: type: string example: "DAILY" productName: type: string example: "BUSD" time: type: integer example: 1577233578000 '400': 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: summary: Change Fixed/Activity Position to Daily Position (USER_DATA) description: |- - PositionId is mandatory parameter for fixed position. Weight: 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 example: 862290 success: type: boolean time: type: integer example: 1577233578000 '400': 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: summary: Acquiring Algorithm (MARKET_DATA) description: 'Weight: 1' tags: - Mining parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Algorithm information content: application/json: schema: type: object properties: code: type: integer example: 0 msg: type: string example: "" data: type: array items: type: object properties: algoName: type: string example: "sha256" algoId: type: integer example: 1 poolIndex: type: integer example: 0 unit: type: string example: "h/s" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/pub/coinList: get: summary: Acquiring CoinName (MARKET_DATA) description: 'Weight: 1' tags: - Mining parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Coin information content: application/json: schema: type: object properties: code: type: integer example: 0 msg: type: string example: "" data: type: array items: type: object properties: coinName: type: string example: "BTC" coinId: type: integer example: 1 poolIndex: type: integer example: 0 algoId: type: integer example: 1 algoName: type: string example: "sha256" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/worker/detail: get: summary: Request for Detail Miner List (USER_DATA) description: 'Weight: 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 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 example: 1587902400000 hashrate: type: string example: "0" reject: type: integer example: 0 description: Rejection 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/mining/worker/list: get: summary: Request for Miner List (USER_DATA) description: 'Weight: 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 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 example: 3 description: "Status:1 valid, 2 invalid, 3 no longer valid" hashRate: type: integer example: 0 description: Real-time rate dayHashRate: type: integer example: 0 description: 24H Hashrate rejectRate: type: integer example: 0 description: Real-time Rejection Rate lastShareTime: type: integer example: 1587712919000 description: Last submission time totalNum: type: integer example: 18530 pageSize: type: integer example: 20 '400': 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: summary: Earnings List (USER_DATA) description: 'Weight: 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 example: 0 msg: type: string example: "" data: type: object properties: accountProfits: type: array items: type: object properties: time: type: integer example: 1586188800000 description: Mining date type: type: integer 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 example: 129129903378244 description: Daily Hashrate profitAmount: type: number example: 8.6083060304 description: Earnings Amount coinName: type: string example: "BTC" description: Coin Type status: type: integer example: 2 description: "Status:0:Unpaid, 1:Paying 2:Paid" totalNum: type: integer example: 3 description: Total Rows pageSize: type: integer example: 20 description: Rows per page '400': 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: summary: Extra Bonus List (USER_DATA) description: 'Weight: 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 example: 0 msg: type: string example: "" data: type: object properties: otherProfits: type: array items: type: object properties: time: type: integer example: 1607443200000 description: Mining date coinName: type: string example: "BTC" description: Coin Name type: type: integer example: 4 description: '1: Merged Mining, 2: Activity Bonus, 3:Rebate 4:Smart Pool 6:Income Transfer 7:Pool Savings' profitAmount: type: number example: 0.0011859 status: type: integer example: 2 description: '0:Unpaid, 1:Paying 2:Paid' totalNum: type: integer example: 3 description: Total Rows pageSize: type: integer example: 20 description: Rows per page '400': 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: summary: Hashrate Resale List (USER_DATA) description: 'Weight: 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 example: 0 msg: type: string example: "" data: type: object properties: configDetails: type: array items: type: object properties: configId: type: integer 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 example: 5000000 description: Transferred Hashrate quantity startDay: type: integer example: 20201210 description: Start date endDay: type: integer example: 20210405 description: End date status: type: integer example: 1 description: "0 Processing, 1:Cancelled, 2:Terminated " totalNum: type: integer example: 21 pageSize: type: integer example: 200 '400': 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: summary: Hashrate Resale Details (USER_DATA) description: 'Weight: 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 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 example: 200000000000 description: Transferred Hashrate quantity day: type: integer example: 20201213 description: Transfer date amount: type: number example: 0.2256872 description: Transfer income coinName: type: string example: "BTC" totalNum: type: integer example: 8 pageSize: type: integer example: 200 '400': 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: summary: Hashrate Resale Request (USER_DATA) description: 'Weight: 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 example: 0 msg: type: string example: "" data: type: integer example: 171 description: Mining 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' /sapi/v1/mining/hash-transfer/config/cancel: post: summary: Cancel Hashrate Resale configuration (USER_DATA) description: 'Weight: 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 example: 0 msg: type: string example: "" data: type: boolean '400': 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: summary: Statistic List (USER_DATA) description: 'Weight: 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 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 example: 0 invalidNum: type: integer example: 17562 profitToday: type: object properties: BTC: type: string example: "0.00314332" BSV: type: string example: "56.17055953" BCH: type: string example: "106.61586001" profitYesterday: type: object properties: BTC: type: string example: "0.00314332" BSV: type: string example: "56.17055953" BCH: type: string example: "106.61586001" userName: type: string example: "test" unit: type: string example: "h/s" algo: type: string example: "sha256" '400': 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: summary: Account List (USER_DATA) description: 'Weight: 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 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 example: 1585267200000 hashrate: type: string example: "0.00000000" reject: type: string example: "0.00000000" '400': 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: summary: BLVT Info (MARKET_DATA) description: 'Weight: 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" 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" timstamp: type: number example: 1583127900000 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/subscribe: post: summary: Subscribe BLVT (USER_DATA) description: 'Weight: 1' tags: - BLVT parameters: - $ref: '#/components/parameters/blvtTokenName' - name: cost in: query description: Spot balance required: true schema: type: number format: float - $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: number 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 timstamp: type: number example: 1600249972899 '400': 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: summary: Query Subscription Record (USER_DATA) description: |- - Only the data of the latest 90 days is available Weight: 1 tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - name: id in: query schema: type: integer - $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: number 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 timstamp: type: number example: 1599127217916 '400': 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: summary: Redeem BLVT (USER_DATA) description: 'Weight: 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: number 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 timstamp: type: number example: 1600250279614 '400': 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: summary: Redemption Record (USER_DATA) description: |- - Only the data of the latest 90 days is available Weight: 1 tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - name: id in: query schema: type: integer - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer 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: number 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 timstamp: type: number example: 1599128003050 '400': 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: summary: BLVT User Limit Info (USER_DATA) description: 'Weight: 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 '400': 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: summary: List All Swap Pools (MARKET_DATA) description: |- Get metadata about all swap pools. Weight: 1 tags: - BSwap security: - ApiKeyAuth: [] responses: '200': description: List of Swap Pools content: application/json: schema: type: array items: type: object properties: poolId: type: number example: 2 poolName: type: string example: "BUSD/USDT" assets: type: array items: type: string example: - BUSD - USDT '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bswap/liquidity: get: summary: Liquidity information of a pool (USER_DATA) description: |- Get liquidity information and user share of a pool. Weight:\ `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: number example: 2 poolNmae: type: string example: "BUSD/USDT" updateTime: type: number example: 1565769342148 liquidity: type: object properties: BUSD: type: number example: 100000315.79 USDT: type: number example: 99999245.54 share: type: object properties: shareAmount: type: number example: 12415 sharePercentage: type: number example: 0.00006207 asset: type: object properties: BUSD: type: number example: 6207.02 USDT: type: number example: 6206.95 '400': 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: summary: Add Liquidity (TRADE) description: |- Add liquidity to a pool. Weight: 2 tags: - BSwap parameters: - $ref: '#/components/parameters/poolId' - $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: number example: 12341 '400': 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: summary: Remove Liquidity (TRADE) description: |- Remove liquidity from a pool, `type` include `SINGLE` and `COMBINATION`, asset is mandatory for single asset removal Weight: 2 tags: - BSwap parameters: - $ref: '#/components/parameters/poolId' - name: type in: query description: Can be `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: float - $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: number example: 12341 '400': 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: summary: Liquidity Operation Record (USER_DATA) description: |- Get liquidity operation (add/remove) records. Weight: 2 tags: - BSwap parameters: - name: operationId in: query schema: type: integer - $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: number example: 12341 poolId: type: number example: 2 poolName: type: string example: "BUSD/USDT" operation: type: string example: "ADD" description: '"ADD" or "REMOVE"' status: type: number example: 1 description: '0: pending, 1: success, 2: failed' updateTime: type: number example: 1565769342148 shareAmount: type: string example: "10.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/bswap/quote: get: 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: 2 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 example: 300000 baseQty: type: number example: 299975 price: type: number example: 1.00008334 slippage: type: number example: 0.00007245 fee: type: number example: 120 '400': 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: summary: Swap (TRADE) description: |- Swap `quoteAsset` for `baseAsset`. Weight: 2 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: number example: 2314 '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: summary: Swap History (USER_DATA) description: |- Get swap history. Weight: 2 tags: - BSwap parameters: - name: swapId in: query schema: type: integer - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: status in: query description: '0: pending for swap, 1: success, 2: failed' schema: type: integer enum: [0,1,2] - 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 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: number example: 2314 swapTime: type: number example: 1565770342148 description: "0: pending, 1: success, 2: failed" status: type: number example: 0 quoteAsset: type: string example: "USDT" baseAsset: type: string example: "BUSD" quoteQty: type: number example: 300000 baseQty: type: number example: 299975 price: type: number example: 1.00008334 fee: type: number example: 120 '400': 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: 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: 1 tags: - C2C parameters: - name: tradeType in: query schema: type: string enum: [BUY, SELL] - name: startTimestamp in: query description: UTC timestamp in ms schema: type: integer - name: endTimestamp in: query description: UTC timestamp in ms schema: type: integer - $ref: '#/components/parameters/page' - name: rows in: query description: default 100, max 100 schema: type: integer - $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 example: 1619361369000 commission: type: string example: "0" description: Transaction Fee (in Crypto) counterPartNickName: type: string example: "ab***" advertisementRole: type: string example: "TAKER" total: type: integer example: 1 success: type: boolean '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: asset: name: asset in: query required: true schema: type: string example: 'BTC' amount: name: amount in: query required: true schema: type: number format: float example: '1.01' current: name: current in: query description: Current querying page. Start from 1. Default:1 schema: type: number 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 description: SELL or BUY schema: type: string enum: ['SELL', 'BUY'] example: 'SELL' size: name: size in: query description: Default:10 Max:100 schema: type: integer 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 example: 500 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 offset: name: offset in: query schema: type: integer orderId: name: orderId in: query description: Order id schema: type: integer orderListId: name: orderListId in: query description: Order list id schema: type: integer 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 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] 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 endTime: name: endTime in: query description: UTC timestamp in ms schema: type: integer price: name: price in: query required: true description: Order price schema: type: number format: float optionalPrice: name: price in: query description: Order price schema: type: number format: float quantity: name: quantity in: query required: true schema: type: number format: float optionalQuantity: name: quantity in: query description: Order quantity schema: type: number format: float recvWindow: name: recvWindow in: query description: The value cannot be greater than 60000 schema: type: integer example: 5000 timestamp: name: timestamp in: query required: true description: UTC timestamp in ms schema: type: integer timeInForce: name: timeInForce in: query description: Order time in force schema: type: string enum: [GTC,IOC,FOK] type: name: type in: query required: true schema: type: integer 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] 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: float example: 20.01 isIsolatedMargin: name: isIsolated in: query description: For isolated margin or not, 'TRUE', 'FALSE', default 'FALSE' schema: type: string enum: ['TRUE','FALSE'] transFrom: name: transFrom in: query schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'SPOT' transTo: 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: arraySymbols in: query schema: type: string example: '["BTCUSDT","BNBBTC"]' transactionType: name: transactionType in: query required: true description: 0-deposit, 1-withdraw schema: type: string enum: ['0', '1'] example: '0' beginTime: name: beginTime in: query schema: type: integer example: 1626144956000 page: name: page in: query description: Default 1 schema: type: integer example: 1 rows: name: rows in: query description: Default 100, max 500 schema: type: integer example: 300 quoteOrderQty: name: quoteOrderQty in: query description: Quote quantity schema: type: number format: float 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: float flexibleProductStatus: name: status in: query required: true description: "\"ALL\", \"SUBSCRIBABLE\", \"UNSUBSCRIBABLE\"; Default: 'ALL'" schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] fixedAndActivityProductStatus: name: status in: query required: true description: "\"ALL\", \"SUBSCRIBABLE\", \"UNSUBSCRIBABLE\"; Default: 'ALL'" schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] featured: name: featured in: query description: '"ALL", "TRUE"; Default: "ALL"' schema: type: string enum: ['ALL','TRUE'] flexibleProductId: name: productId in: query required: true schema: type: string fixedAndActivityProjectId: name: projectId in: query required: true schema: type: string flexibleProductType: name: type in: query required: true description: '"FAST", "NORMAL"' schema: type: string enum: ['FAST','NORMAL'] fixedAndActivityProductType: name: type in: query required: true description: '"ACTIVITY", "CUSTOMIZED_FIXED"' schema: type: string enum: ['ACTIVITY','CUSTOMIZED_FIXED'] sortBy: name: sortBy in: query required: true description: '"START_TIME", "LOT_SIZE", "INTEREST_RATE", "DURATION"; default "START_TIME' schema: type: string enum: ['START_TIME','LOT_SIZ','LOT_SIZE','INTEREST_RATE','DURATION'] isSortAsc: name: isSortAsc in: query required: true 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 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 description: '"HOLDING", "REDEEMED"' 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: string sort: name: sort in: query description: sort sequence(default=0)0 positive sequence, 1 negative sequence schema: type: integer 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 workerStatus: name: workerStatus in: query description: miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure schema: type: integer 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 optionalPoolId: name: poolId in: query schema: type: integer 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: float 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] limitClientOrderId: name: limitClientOrderId in: query description: 'A unique Id for the limit order' schema: type: string limitIcebergQty: name: limitIcebergQty in: query schema: type: number format: float stopClientOrderId: name: stopClientOrderId in: query description: 'A unique Id for the stop loss/stop loss limit leg' schema: type: string ocoStopPrice: name: stopPrice in: query required: true schema: type: number format: float stopLimitPrice: name: stopLimitPrice in: query description: 'If provided, stopLimitTimeInForce is required.' schema: type: number format: float stopIcebergQty: name: stopIcebergQty in: query schema: type: number format: float stopLimitTimeInForce: name: stopLimitTimeInForce in: query schema: type: string enum: [GTC,FOK,IOC] schemas: account: type: object properties: makerCommission: type: integer example: 15 takerCommission: type: integer example: 15 buyerCommission: type: integer example: 0 sellerCommission: type: integer example: 0 canTrade: type: boolean canWithdraw: type: boolean canDeposit: type: boolean updateTime: type: integer 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" order: type: object properties: symbol: type: string example: "BNBBTC" origClientOrderId: type: string example: "msXkySR3u5uYwpvRMFsi3u" orderId: type: integer example: 28 orderListId: type: integer description: Unless OCO, value will be -1 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" price: type: number format: float example: "1.00000000" origQty: type: number format: float example: "10.00000000" executedQty: type: number format: float example: "10.00000000" cummulativeQuoteQty: type: number format: float example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "SELL" orderDetails: type: object properties: symbol: type: string example: "LTCBTC" orderId: type: integer example: 1 orderListId: type: integer 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 example: 1499827319559 updateTime: type: integer example: 1499827319559 isWorking: type: boolean origQuoteOrderQty: type: string example: "0.00000000" orderResponseAck: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer example: 28 orderListId: type: integer example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer example: 1507725176595 orderResponseResult: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer example: 28 orderListId: type: integer example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer 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" orderResponseFull: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer example: 28 orderListId: type: integer example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer 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" 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" marginOrder: type: object properties: symbol: type: string example: "BNBBTC" orderId: type: integer 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: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "CANCELED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "SELL" 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 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 example: 1562133008725 timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" updateTime: type: integer example: 1562133008725 canceledMarginOrderDetail: type: object properties: symbol: type: string example: "BNBUSDT" isIsolated: type: boolean origClientOrderId: type: string example: "E6APeyTJvkMvLMYMqu1KQ4" orderId: type: integer example: 11 orderListId: type: integer 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" marginOrderResponseAck: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" isIsolated: type: boolean transactTime: type: integer example: 1507725176595 marginOrderResponseResult: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer 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" marginOrderResponseFull: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer 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: float 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" marginTrade: type: object properties: commission: type: string example: "0.00006000" commissionAsset: type: string example: "BTC" id: type: integer example: 28 isBestMatch: type: boolean isBuyer: type: boolean isMaker: type: boolean orderId: type: integer 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 example: 1507725176595 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 example: 1566898617000 txId: type: integer example: 5240372201 transFrom: type: string example: "SPOT" transTo: type: string example: "ISOLATED_MARGIN" total: type: integer example: 1 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" 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" 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 totalAssetOfBtc: type: string example: "0.00000000" totalLiabilityOfBtc: type: string example: "0.00000000" totalNetAssetOfBtc: type: string example: "0.00000000" 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" priceTickerList: type: array items: $ref: '#/components/schemas/priceTicker' priceTicker: type: object properties: symbol: type: string example: "BNBBTC" price: type: string example: "0.17160000" 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 example: 1592808788637 closeTime: type: integer example: 1592895188637 firstId: type: integer example: 62683296 lastId: type: integer example: 62739253 count: type: integer example: 55958 myTrade: type: object properties: symbol: type: string example: "BNBBTC" id: type: integer description: Trade id example: 28457 orderId: type: integer example: 100234 orderListId: type: integer 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 description: Trade timestamp example: 1499865549590 isBuyer: type: boolean example: false isMaker: type: boolean example: false isBestMatch: type: boolean transaction: type: object properties: tranId: type: integer description: transaction id example: 345196462 trade: type: object properties: id: type: integer 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 description: Trade executed timestamp, as same as `T` in the stream example: 1592887772684 isBuyerMaker: type: boolean isBestMatch: type: boolean aggTrade: type: object properties: a: type: integer description: Aggregate tradeId example: 26129 p: type: string description: Price example: "0.01633102" q: type: string description: Quantity example: "4.70443515" f: type: integer description: First tradeId example: 27781 l: type: integer description: Last tradeId example: 27781 T: type: boolean description: Timestamp example: 1498793709153 m: type: boolean description: Was the buyer the maker? M: type: boolean description: Was the trade the best price match? bnbBurnStatus: type: object properties: spotBNBBurn: type: boolean interestBNBBurn: type: boolean example: false snapshotSpot: type: object properties: code: type: integer 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" totalAssetOfBtc: type: string example: "0.09905021" type: type: string example: "spot" updateTime: type: integer example: 1576281599000 snapshotMargin: type: object properties: code: type: integer 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" type: type: string example: "margin" updateTime: type: integer example: 1576281599000 snapshotFutures: type: object properties: code: type: integer 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" 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" type: type: string example: "futures" updateTime: type: integer example: 1576281599000 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" canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer 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 example: 1576756674610 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" canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer example: 2 updateTime: type: integer example: 1598959682001 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 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 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" 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" savingsFlexiblePurchaseRecord: type: array items: type: object properties: amount: type: string example: "100.00000000" asset: type: string example: "USDT" createTime: type: integer example: 1575018510000 lendingType: type: string example: "DAILY" productName: type: string example: "USDT" purchaseId: type: integer example: 26055 status: type: string example: "SUCCESS" savingsFixedActivityPurchaseRecord: type: array items: type: object properties: amount: type: string example: "100.00000000" asset: type: string example: "USDT" createTime: type: integer example: 1575018453000 lendingType: type: string example: "ACTIVITY" lot: type: integer example: 1 productName: type: string example: "【Special】USDT 7D (8%)" purchaseId: type: integer example: 36857 status: type: string example: "SUCCESS" savingsFlexibleRedemptionRecord: type: array items: type: object properties: amount: type: string example: "10.54000000" asset: type: string example: "USDT" createTime: type: integer example: 1577257222000 principal: type: string example: "10.54000000" projectId: type: string example: "USDT001" projectName: type: string example: "USDT" status: type: string example: "PAID" type: type: string example: "FAST" savingsFixedActivityRedemptionRecord: type: array items: type: object properties: amount: type: string example: "0.07070000" asset: type: string example: "USDT" createTime: type: integer example: 1566200161000 interest: type: string example: "0.00070000" principal: type: string example: "0.07000000" projectId: type: string example: "test06" projectName: type: string example: "USDT 1 day (10% annualized)" startTime: type: integer example: 1566198000000 status: type: string example: "PAID" error: type: object properties: code: type: integer description: Error code msg: type: string description: Error message example: "error message" securitySchemes: ApiKeyAuth: name: X-MBX-APIKEY in: header description: Binance Public API Key type: apiKey