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: Futures description: Futures Endpoints - name: Futures Algo description: Futures Algo Endpoints - name: Spot Algo description: Spot Algo Endpoints - name: Portfolio Margin description: Portfolio Margin Endpoints - name: BLVT description: Binance Leveraged Tokens Endpoints - name: Fiat description: Fiat Endpoints - name: C2C description: Consumer-To-Consumer Endpoints - name: VIP Loans description: VIP Loans Endpoints - name: Crypto Loans description: Crypto Loans Endpoints - name: Pay description: Pay Endpoints - name: Convert description: Convert Endpoints - name: Rebate description: Rebate Endpoints - name: NFT description: NFT Endpoints - name: Gift Card description: Gift Card Endpoints - name: Auto-Invest description: Auto-Invest Endpoints - name: Copy Trading description: Copy Trading Endpoints - name: Simple Earn description: Simple Earn Endpoints paths: /api/v3/ping: get: summary: Test Connectivity description: |- Test connectivity to the Rest API. Weight(IP): 1 tags: - Market responses: '200': description: OK content: application/json: schema: type: object /api/v3/time: get: summary: Check Server Time description: |- Test connectivity to the Rest API and get the current server time. Weight(IP): 1 tags: - Market responses: '200': description: Binance server UTC timestamp content: application/json: schema: type: object properties: serverTime: type: integer format: int64 example: 1499827319559 required: - serverTime /api/v3/exchangeInfo: get: 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. - All parameters are optional. - permissions can support single or multiple values (e.g. SPOT, ["MARGIN","LEVERAGED"]) - If permissions parameter not provided, the default values will be ["SPOT","MARGIN","LEVERAGED"]. - To display all permissions you need to specify them explicitly. (e.g. SPOT, MARGIN,...) Examples of Symbol Permissions Interpretation from the Response: - [["A","B"]] means you may place an order if your account has either permission "A" or permission "B". - [["A"],["B"]] means you can place an order if your account has permission "A" and permission "B". - [["A"],["B","C"]] means you can place an order if your account has permission "A" and permission "B" or permission "C". (Inclusive or is applied here, not exclusive or, so your account may have both permission "B" and permission "C".) Weight(IP): 10 tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' - $ref: '#/components/parameters/permissions' responses: '200': description: Current exchange trading rules and symbol information content: application/json: schema: type: object properties: timezone: type: string example: UTC serverTime: type: integer format: int64 example: 1592882214236 rateLimits: type: array items: type: object properties: rateLimitType: type: string example: "REQUEST_WEIGHT" interval: type: string example: "MINUTE" intervalNum: type: integer format: int32 example: 1 limit: type: integer format: int32 example: 1200 required: - rateLimitType - interval - intervalNum - limit exchangeFilters: type: array items: type: object symbols: type: array items: type: object properties: symbol: type: string example: "ETHBTC" status: type: string example: "TRADING" baseAsset: type: string example: "ETH" baseAssetPrecision: type: integer format: int32 example: 8 quoteAsset: type: string example: "BTC" quoteAssetPrecision: type: integer format: int32 example: 8 baseCommissionPrecision: type: integer format: int32 example: 8 quoteCommissionPrecision: type: integer format: int32 example: 8 orderTypes: type: array items: type: string example: "LIMIT" icebergAllowed: type: boolean example: true ocoAllowed: type: boolean example: true otoAllowed: type: boolean example: false quoteOrderQtyMarketAllowed: type: boolean example: true allowTrailingStop: type: boolean example: false cancelReplaceAllowed: type: boolean example: true isSpotTradingAllowed: type: boolean example: true isMarginTradingAllowed: type: boolean example: true filters: type: array items: type: object properties: filterType: type: string example: "PRICE_FILTER" minPrice: type: string example: "0.00000100" maxPrice: type: string example: "100000.00000000" tickSize: type: string example: "0.00000100" required: - filterType - minPrice - maxPrice - tickSize permissions: type: array items: type: string example: "SPOT" permissionSets: type: array items: type: array items: type: string example: - "SPOT" - "MARGIN" defaultSelfTradePreventionMode: type: string example: "NONE" allowedSelfTradePreventionModes: type: array items: type: string example: "NONE" required: - symbol - status - baseAsset - baseAssetPrecision - quoteAsset - quoteAssetPrecision - baseCommissionPrecision - quoteCommissionPrecision - orderTypes - icebergAllowed - ocoAllowed - otoAllowed - quoteOrderQtyMarketAllowed - allowTrailingStop - cancelReplaceAllowed - isSpotTradingAllowed - isMarginTradingAllowed - filters - permissions - permissionSets - defaultSelfTradePreventionMode - allowedSelfTradePreventionModes required: - timezone - serverTime - rateLimits - exchangeFilters - symbols '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/depth: get: summary: Order Book description: |- | Limit | Weight(IP) | |---------------------|-------------| | 1-100 | 5 | | 101-500 | 25 | | 501-1000 | 50 | | 1001-5000 | 250 | tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: limit in: query description: If limit > 5000, then the response will truncate to 5000 schema: type: integer format: int32 default: 100 maximum: 5000 example: 100 responses: '200': description: Order book content: application/json: schema: type: object properties: lastUpdateId: type: integer format: int64 bids: type: array items: type: array items: type: string minItems: 2 maxItems: 2 asks: type: array items: type: array items: type: string minItems: 2 maxItems: 2 required: - lastUpdateId - bids - asks example: lastUpdateId: 1027024 bids: - - "4.00000000" - "431.00000000" asks: - - "4.00000200" - "12.00000000" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/trades: get: summary: Recent Trades List description: |- Get recent trades. Weight(IP): 10 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/limit' responses: '200': description: Trade list content: application/json: schema: type: array items: $ref: '#/components/schemas/trade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/historicalTrades: get: summary: Old Trade Lookup description: |- Get older market trades. Weight(IP): 10 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/fromId' responses: '200': description: Trade list content: application/json: schema: type: array items: $ref: '#/components/schemas/trade' /api/v3/aggTrades: get: summary: Compressed/Aggregate Trades List description: |- Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated. - If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned. - Note that if a trade has the following values, this was a duplicate aggregate trade and marked as invalid: p = '0' // price q = '0' // qty f = -1 // first_trade_id l = -1 // last_trade_id Weight(IP): 2 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' responses: '200': description: Trade list content: application/json: schema: type: array items: $ref: '#/components/schemas/aggTrade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/klines: get: summary: Kline/Candlestick Data description: |- Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. - If `startTime` and `endTime` are not sent, the most recent klines are returned. Weight(IP): 2 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: interval in: query required: true description: kline intervals schema: type: string enum: ['1s','1m','3m','5m','15m','30m','1h','2h','4h','6h','8h','12h','1d','3d','1w','1M'] example: '"1m"' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: timeZone in: query required: false description: |- Default: 0 (UTC) schema: type: string - $ref: '#/components/parameters/limit' responses: '200': description: Kline data content: application/json: schema: type: array items: type: array items: oneOf: - type: integer format: int64 - type: string minItems: 12 maxItems: 12 example: - 1499040000000 - "0.01634790" - "0.80000000" - "0.01575800" - "0.01577100" - "148976.11427815" - 1499644799999 - "2434.19055334" - 308 - "1756.87402397" - "28.46694368" - "17928899.62484339" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/uiKlines: get: summary: UIKlines description: |- The request is similar to klines having the same parameters and response. uiKlines return modified kline data, optimized for presentation of candlestick charts. Weight(IP): 2 tags: - Market parameters: - $ref: '#/components/parameters/symbol' - name: interval in: query required: true description: kline intervals schema: type: string enum: ['1s','1m','3m','5m','15m','30m','1h','2h','4h','6h','8h','12h','1d','3d','1w','1M'] example: '"1m"' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: timeZone in: query required: false description: |- Default: 0 (UTC) schema: type: string - $ref: '#/components/parameters/limit' responses: '200': description: UIKline data content: application/json: schema: type: array items: type: array items: oneOf: - type: integer format: int64 - type: string minItems: 12 maxItems: 12 example: - 1499040000000 - "0.01634790" - "0.80000000" - "0.01575800" - "0.01577100" - "148976.11427815" - 1499644799999 - "2434.19055334" - 308 - "1756.87402397" - "28.46694368" - "0" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/avgPrice: get: summary: Current Average Price description: |- Current average price for a symbol. Weight(IP): 2 tags: - Market parameters: - $ref: '#/components/parameters/symbol' responses: '200': description: Average price content: application/json: schema: type: object properties: mins: type: integer format: int64 example: 5 description: Average price interval (in minutes) price: type: string example: "9.35751834" description: Average price closeTime: type: integer format: int64 example: 1694061154503 description: Last trade time required: - mins - price - closeTime '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(IP): - `2` for a single symbol; - `80` when the symbol parameter is omitted; tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' - $ref: '#/components/parameters/tickerType' 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/tradingDay: get: summary: Trading Day Ticker description: |- Price change statistics for a trading day. Notes: - Supported values for timeZone: - Hours and minutes (e.g. -1:00, 05:45) - Only hours (e.g. 0, 8, 4) Weight: - `4` for each requested symbol. - The weight for this request will cap at `200` once the number of symbols in the request is more than `50`. tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' - name: timeZone in: query required: false description: |- Default: 0 (UTC) schema: type: string - $ref: '#/components/parameters/tickerType' responses: '200': description: Trading day ticker content: application/json: schema: oneOf: - $ref: '#/components/schemas/dayTicker' - $ref: '#/components/schemas/dayTickerList' '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(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' responses: '200': description: Price ticker content: application/json: schema: oneOf: - $ref: '#/components/schemas/priceTicker' - $ref: '#/components/schemas/priceTickerList' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/ticker/bookTicker: get: summary: Symbol Order Book Ticker description: |- Best price/qty on the order book for a symbol or symbols. - If the symbol is not sent, bookTickers for all symbols will be returned in an array. Weight(IP): - `2` for a single symbol; - `4` when the symbol parameter is omitted; tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' responses: '200': description: Order book ticker content: application/json: schema: oneOf: - $ref: '#/components/schemas/bookTicker' - $ref: '#/components/schemas/bookTickerList' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/ticker: get: summary: Rolling window price change statistics description: |- The window used to compute statistics is typically slightly wider than requested windowSize. openTime for /api/v3/ticker always starts on a minute, while the closeTime is the current time of the request. As such, the effective window might be up to 1 minute wider than requested. E.g. If the closeTime is 1641287867099 (January 04, 2022 09:17:47:099 UTC) , and the windowSize is 1d. the openTime will be: 1641201420000 (January 3, 2022, 09:17:00 UTC) Weight(IP): 4 for each requested symbol regardless of windowSize. The weight for this request will cap at 200 once the number of symbols in the request is more than 50. tags: - Market parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/arraySymbols' - name: windowSize in: query description: |- Defaults to 1d if no parameter provided. Supported windowSize values: 1m,2m....59m for minutes 1h, 2h....23h - for hours 1d...7d - for days. Units cannot be combined (e.g. 1d2h is not allowed) schema: type: string - name: type in: query description: |- Supported values: FULL or MINI. If none provided, the default is FULL schema: type: string responses: '200': description: Rolling price ticker content: application/json: schema: type: object properties: symbol: type: string example: BNBBTC priceChange: type: string example: '-8.00000000' priceChangePercent: type: string example: '-88.889' weightedAvgPrice: type: string example: '2.60427807' openPrice: type: string example: '9.00000000' highPrice: type: string example: '9.00000000' lowPrice: type: string example: '1.00000000' lastPrice: type: string example: '1.00000000' volume: type: string example: '187.00000000' quoteVolume: type: string example: '487.00000000' openTime: type: integer format: int64 example: 1641859200000 closeTime: type: integer format: int64 example: 1642031999999 firstId: type: integer format: int64 example: 0 lastId: type: integer format: int64 example: 60 count: type: integer format: int64 example: 61 required: - symbol - priceChange - priceChangePercent - weightedAvgPrice - openPrice - highPrice - lowPrice - lastPrice - volume - quoteVolume - openTime - closeTime - firstId - lastId - count '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/order/test: post: summary: Test New Order (TRADE) description: |- Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/optionalQuantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/optionalTrailingDelta' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/recvWindow' - name: computeCommissionRates in: query required: false description: |- Default: false schema: type: boolean example: false - $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(IP): 4 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order details content: application/json: schema: $ref: '#/components/schemas/orderDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: summary: New Order (TRADE) description: |- Send in a new order. - `LIMIT_MAKER` are `LIMIT` orders that will be rejected if they would immediately match and trade as a taker. - `STOP_LOSS` and `TAKE_PROFIT` will execute a `MARKET` order when the `stopPrice` is reached. - Any `LIMIT` or `LIMIT_MAKER` type order can be made an iceberg order by sending an `icebergQty`. - Any order with an `icebergQty` MUST have `timeInForce` set to `GTC`. - `MARKET` orders using `quantity` specifies how much a user wants to buy or sell based on the market price. - `MARKET` orders using `quoteOrderQty` specifies the amount the user wants to spend (when buying) or receive (when selling) of the quote asset; the correct quantity will be determined based on the market liquidity and `quoteOrderQty`. - `MARKET` orders using `quoteOrderQty` will not break `LOT_SIZE` filter rules; the order will execute a quantity that will have the notional value as close as possible to `quoteOrderQty`. - same `newClientOrderId` can be accepted only when the previous one is filled, otherwise the order will be rejected. Trigger order price rules against market price for both `MARKET` and `LIMIT` versions: - Price above market price: `STOP_LOSS` `BUY`, `TAKE_PROFIT` `SELL` - Price below market price: `STOP_LOSS` `SELL`, `TAKE_PROFIT` `BUY` Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/optionalQuantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/optionalTrailingDelta' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order result content: application/json: schema: oneOf: - $ref: '#/components/schemas/orderResponseAck' - $ref: '#/components/schemas/orderResponseResult' - $ref: '#/components/schemas/orderResponseFull' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Cancel Order (TRADE) description: |- Cancel an active order. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/cancelRestrictions' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled order content: application/json: schema: $ref: '#/components/schemas/order' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/order/cancelReplace: post: summary: Cancel an Existing Order and Send a New Order (Trade) description: |- Cancels an existing order and places a new order on the same symbol. Filters and Order Count are evaluated before the processing of the cancellation and order placement occurs. A new order that was not attempted (i.e. when newOrderResult: NOT_ATTEMPTED), will still increase the order count by 1. Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - name: cancelReplaceMode in: query required: true description: |- - `STOP_ON_FAILURE` If the cancel request fails, the new order placement will not be attempted. - `ALLOW_FAILURES` If new order placement will be attempted even if cancel request fails. schema: type: string example: "STOP_ON_FAILURE" - $ref: '#/components/parameters/cancelRestrictions' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/optionalQuantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - name: cancelNewClientOrderId in: query description: Used to uniquely identify this cancel. Automatically generated by default schema: type: string - name: cancelOrigClientOrderId in: query description: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. schema: type: string - name: cancelOrderId in: query description: Either the cancelOrigClientOrderId or cancelOrderId must be provided. If both are provided, cancelOrderId takes precedence. schema: type: integer format: int64 example: 12 - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/optionalTrailingDelta' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Operation details content: application/json: schema: type: object properties: cancelResult: type: string example: SUCCESS newOrderResult: type: string example: SUCCESS cancelResponse: type: object properties: symbol: type: string example: BTCUSDT origClientOrderId: type: string example: DnLo3vTAQcjha43lAZhZ0y orderId: type: integer format: int64 example: 9 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: osxN3JXAtJvKvCqGeMWMVR price: type: string example: '0.01000000' origQty: type: string example: '0.000100' executedQty: type: string example: '0.00000000' cummulativeQuoteQty: type: string example: '0.00000000' status: type: string example: CANCELED timeInForce: type: string example: GTC type: type: string example: LIMIT side: type: string example: SELL selfTradePreventionMode: type: string example: NONE transactTime: type: integer format: int64 example: 1507725176595 required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - selfTradePreventionMode newOrderResponse: type: object properties: symbol: type: string example: BTCUSDT orderId: type: integer format: int64 example: 10 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: wOceeeOzNORyLiQfw7jd8S transactTime: type: integer format: int64 example: 1652928801803 price: type: string example: '0.02000000' origQty: type: string example: '0.040000' executedQty: type: string example: '0.00000000' cummulativeQuoteQty: type: string example: '0.00000000' status: type: string example: NEW timeInForce: type: string example: GTC type: type: string example: LIMIT side: type: string example: BUY workingTime: type: integer format: int64 example: 1669277163808 fills: type: array items: type: string maxItems: 0 selfTradePreventionMode: type: string example: NONE required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - fills - selfTradePreventionMode required: - cancelResult - newOrderResult - cancelResponse - newOrderResponse '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/openOrders: get: summary: Current Open Orders (USER_DATA) description: |- Get all open orders on a symbol. Careful when accessing this with no symbol. Weight(IP): - `6` for a single symbol; - `80` when the symbol parameter is omitted; tags: - Trade parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Current open orders content: application/json: schema: type: array items: $ref: '#/components/schemas/orderDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Cancel all Open Orders on a Symbol (TRADE) description: |- Cancels all active orders on a symbol. This includes OCO orders. Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled orders content: application/json: schema: type: array items: anyOf: - $ref: '#/components/schemas/order' - $ref: '#/components/schemas/ocoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/allOrders: get: summary: All Orders (USER_DATA) description: |- Get all account orders; active, canceled, or filled.. - If `orderId` is set, it will get orders >= that `orderId`. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. - If `startTime` and/or `endTime` provided, `orderId` is not required Weight(IP): 20 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Current open orders content: application/json: schema: type: array items: $ref: '#/components/schemas/orderDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/orderList/oco: post: summary: New Order list - OCO (TRADE) description: |- Send in an one-cancels-the-other (OCO) pair, where activation of one order immediately cancels the other. - An `OCO` has 2 orders called the above order and below order. - One of the orders must be a `LIMIT_MAKER` order and the other must be `STOP_LOSS` or`STOP_LOSS_LIMIT` order. - Price restrictions: - If the `OCO` is on the `SELL` side: `LIMIT_MAKER` price > Last Traded Price > stopPrice - If the `OCO` is on the `BUY` side: `LIMIT_MAKER` price < Last Traded Price < stopPrice - OCOs add 2 orders to the unfilled order count, `EXCHANGE_MAX_ORDERS` filter, and the `MAX_NUM_ORDERS` filter. Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - name: listClientOrderId in: query description: |- Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `aboveClientOrderId` and the `belowCLientOrderId`. schema: type: string - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/quantity' - name: aboveType in: query required: true description: |- Supported values : `STOP_LOSS_LIMIT`, `STOP_LOSS`, `LIMIT_MAKER` schema: type: string - name: aboveClientOrderId in: query description: |- Arbitrary unique ID among open orders for the above order. Automatically generated if not sent schema: type: string - name: aboveIcebergQty in: query description: |- Note that this can only be used if `aboveTimeInForce` is `GTC`. schema: type: number format: double - name: abovePrice in: query schema: type: number format: double - name: aboveStopPrice in: query description: |- Can be used if `aboveType` is `STOP_LOSS` or `STOP_LOSS_LIMIT`. Either `aboveStopPrice` or `aboveTrailingDelta` or both, must be specified. schema: type: number format: double - name: aboveTrailingDelta in: query schema: type: number format: double - name: aboveTimeInForce in: query description: |- Required if the `aboveType` is `STOP_LOSS_LIMIT`. schema: type: string enum: [GTC,IOC,FOK] example: 'GTC' - name: aboveStrategyId in: query description: |- Arbitrary numeric value identifying the above order within an order strategy. schema: type: number format: double - name: aboveStrategyType in: query description: |- Arbitrary numeric value identifying the above order strategy. Values smaller than 1000000 are reserved and cannot be used. schema: type: integer format: int64 - name: belowType in: query required: true description: |- Supported values : `STOP_LOSS_LIMIT`, `STOP_LOSS`, `LIMIT_MAKER` schema: type: string - name: belowClientOrderId in: query description: |- Arbitrary unique ID among open orders for the below order. Automatically generated if not sent schema: type: string - name: belowIcebergQty in: query description: |- Note that this can only be used if `belowTimeInForce` is `GTC`. schema: type: number format: double - name: belowPrice in: query description: |- Can be used if `belowType` is `STOP_LOSS_LIMIT` or `LIMIT_MAKER` to specify the limit price. schema: type: number format: double - name: belowStopPrice in: query description: |- Can be used if `belowType` is `STOP_LOSS` or `STOP_LOSS_LIMIT`. Either `belowStopPrice` or `belowTrailingDelta` or both, must be specified. schema: type: number format: double - name: belowTrailingDelta in: query schema: type: number format: double - name: belowTimeInForce in: query description: |- Required if the `belowType` is `STOP_LOSS_LIMIT`. schema: type: string enum: [GTC,IOC,FOK] example: 'GTC' - name: belowStrategyId in: query description: |- Arbitrary numeric value identifying the below order within an order strategy. schema: type: number format: double - name: belowStrategyType in: query description: |- Arbitrary numeric value identifying the below order strategy. Values smaller than 1000000 are reserved and cannot be used. schema: type: integer format: int64 - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 1 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "lH1YDkuQKWiXVXHPSKYEIp" transactionTime: type: integer format: int64 example: 1710485608839 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 10 clientOrderId: "44nZvqpemY7sVYgPYbvPih" - symbol: "LTCBTC" orderId: 11 clientOrderId: "NuMp0nVYnciDiFmVqfpBqK" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string workingTime: type: integer format: int64 selfTradePreventionMode: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice - workingTime - selfTradePreventionMode example: - symbol: "LTCBTC" orderId: 10 orderListId: 1 clientOrderId: "44nZvqpemY7sVYgPYbvPih" transactTime: 1710485608839 price: "1.000000" origQty: "5.00000000" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "STOP_LOSS_LIMIT" side: "SELL" stopPrice: "1.00000000" workingTime: -1 icebergQty: "1.00000000" selfTradePreventionMode: "NONE" - symbol: "LTCBTC" orderId: 11 orderListId: 1 clientOrderId: "NuMp0nVYnciDiFmVqfpBqK" transactTime: 1710485608839 price: "3.00000000" origQty: "5.00000000" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "LIMIT_MAKER" side: "SELL" workingTime: 1710485608839 selfTradePreventionMode: "NONE" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/orderList/oto: post: summary: New Order List - OTO (TRADE) description: |- Places an `OTO`. - An `OTO` (One-Triggers-the-Other) is an order list comprised of 2 orders. - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The second order is called the pending order. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets fully filled. - If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. - When the order list is placed, if the working order gets immediately fully filled, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. - OTOs add 2 orders to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight: 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - name: listClientOrderId in: query description: |- Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. schema: type: string - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/workingType' - $ref: '#/components/parameters/workingSide' - $ref: '#/components/parameters/workingClientOrderId' - $ref: '#/components/parameters/workingPrice' - $ref: '#/components/parameters/workingQuantity' - $ref: '#/components/parameters/workingIcebergQty' - $ref: '#/components/parameters/workingTimeInForce' - name: workingStrategyId in: query description: |- Arbitrary numeric value identifying the working order within an order strategy. schema: type: number format: double - name: workingStrategyType in: query description: |- Arbitrary numeric value identifying the working order strategy. Values smaller than 1000000 are reserved and cannot be used. schema: type: integer format: int64 - $ref: '#/components/parameters/pendingType' - $ref: '#/components/parameters/pendingSide' - $ref: '#/components/parameters/pendingClientOrderId' - $ref: '#/components/parameters/pendingPrice' - $ref: '#/components/parameters/pendingStopPrice' - $ref: '#/components/parameters/pendingTrailingDelta' - $ref: '#/components/parameters/pendingQuantity' - $ref: '#/components/parameters/pendingIcebergQty' - $ref: '#/components/parameters/pendingTimeInForce' - name: pendingStrategyId in: query description: |- Arbitrary numeric value identifying the pending order within an order strategy. schema: type: number format: double - name: pendingStrategyType in: query description: |- Arbitrary numeric value identifying the pending order strategy. Values smaller than 1000000 are reserved and cannot be used. schema: type: integer format: int64 - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New OTO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 0 contingencyType: type: string example: "OTO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "yl2ERtcar1o25zcWtqVBTC" transactionTime: type: integer format: int64 example: 1712289389158 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "Bq17mn9fP6vyCn75Jw1xya" - symbol: "LTCBTC" orderId: 5 clientOrderId: "arLFo0zGJVDE69cvGBaU0d" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string workingTime: type: integer format: int64 selfTradePreventionMode: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - selfTradePreventionMode example: - symbol: "LTCBTC" orderId: 4 orderListId: 0 clientOrderId: "Bq17mn9fP6vyCn75Jw1xya" transactTime: 1712289389158 price: "1.000000" origQty: "1.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "NEW" timeInForce: "GTC" type: "LIMIT" side: "SELL" workingTime: 1712289389158 selfTradePreventionMode: "NONE" - symbol: "LTCBTC" orderId: 5 orderListId: 0 clientOrderId: "arLFo0zGJVDE69cvGBaU0d" transactTime: 1712289389158 price: "0.00000000" origQty: "5.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "PENDING_NEW" timeInForce: "GTC" type: "MARKET" side: "BUY" workingTime: -1 selfTradePreventionMode: "NONE" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/orderList/otoco: post: summary: New Order List - OTOCO (TRADE) description: |- Place an `OTOCO`. - An `OTOCO` (One-Triggers-One-Cancels-the-Other) is an order list comprised of 3 orders. - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the `OTO`. - `OTOCO` has 2 pending orders (pending above and pending below), forming an `OCO` pair. The pending orders are only placed on the order book when the working order gets fully filled. - The rules of the pending above and pending below follow the same rules as the Order List `OCO`. - OTOCOs add 3 orders against the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter, and `MAX_NUM_ORDERS` filter. Weight: 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - name: listClientOrderId in: query description: |- Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. schema: type: string - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/workingType' - $ref: '#/components/parameters/workingSide' - $ref: '#/components/parameters/workingClientOrderId' - $ref: '#/components/parameters/workingPrice' - $ref: '#/components/parameters/workingQuantity' - $ref: '#/components/parameters/workingIcebergQty' - $ref: '#/components/parameters/workingTimeInForce' - name: workingStrategyId in: query description: |- Arbitrary numeric value identifying the working order within an order strategy. schema: type: number format: double - name: workingStrategyType in: query description: |- Arbitrary numeric value identifying the working order strategy. Values smaller than 1000000 are reserved and cannot be used. schema: type: integer format: int64 - $ref: '#/components/parameters/pendingSide' - $ref: '#/components/parameters/pendingQuantity' - $ref: '#/components/parameters/pendingAboveType' - $ref: '#/components/parameters/pendingAboveClientOrderId' - $ref: '#/components/parameters/pendingAbovePrice' - $ref: '#/components/parameters/pendingAboveStopPrice' - $ref: '#/components/parameters/pendingAboveTrailingDelta' - $ref: '#/components/parameters/pendingAboveIcebergQty' - $ref: '#/components/parameters/pendingAboveTimeInForce' - name: pendingAboveStrategyId in: query description: |- Arbitrary numeric value identifying the pending above order within an order strategy. schema: type: number format: double - name: pendingAboveStrategyType in: query description: |- Arbitrary numeric value identifying the pending above order strategy. Values smaller than 1000000 are reserved and cannot be used. schema: type: integer format: int64 - $ref: '#/components/parameters/pendingBelowType' - $ref: '#/components/parameters/pendingBelowClientOrderId' - $ref: '#/components/parameters/pendingBelowPrice' - $ref: '#/components/parameters/pendingBelowStopPrice' - $ref: '#/components/parameters/pendingBelowTrailingDelta' - $ref: '#/components/parameters/pendingBelowIcebergQty' - $ref: '#/components/parameters/pendingBelowTimeInForce' - name: pendingBelowStrategyId in: query description: |- Arbitrary numeric value identifying the pending below order within an order strategy. schema: type: number format: double - name: pendingBelowStrategyType in: query description: |- Arbitrary numeric value identifying the pending below order strategy. Values smaller than 1000000 are reserved and cannot be used. schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New OTOCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 1 contingencyType: type: string example: "OTOCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "RumwQpBaDctlUu5jyG5rs0" transactionTime: type: integer format: int64 example: 1712291372842 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 6 clientOrderId: "fM9Y4m23IFJVCQmIrlUmMK" - symbol: "LTCBTC" orderId: 7 clientOrderId: "6pcQbFIzTXGZQ1e2MkGDq4" - symbol: "LTCBTC" orderId: 8 clientOrderId: "r4JMv9cwAYYUwwBZfbussx" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string workingTime: type: integer format: int64 selfTradePreventionMode: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - selfTradePreventionMode example: - symbol: "LTCBTC" orderId: 6 orderListId: 1 clientOrderId: "fM9Y4m23IFJVCQmIrlUmMK" transactTime: 1712291372842 price: "1.000000" origQty: "1.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "NEW" timeInForce: "GTC" type: "LIMIT" side: "SELL" workingTime: 1712291372842 selfTradePreventionMode: "NONE" - symbol: "LTCBTC" orderId: 7 orderListId: 1 clientOrderId: "6pcQbFIzTXGZQ1e2MkGDq4" transactTime: 1712291372842 price: "1.00000000" origQty: "5.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "PENDING_NEW" timeInForce: "IOC" type: "STOP_LOSS_LIMIT" side: "BUY" stopPrice: "6.00000000" workingTime: -1 selfTradePreventionMode: "NONE" - symbol: "LTCBTC" orderId: 8 orderListId: 1 clientOrderId: "r4JMv9cwAYYUwwBZfbussx" transactTime: 1712291372842 price: "3.00000000" origQty: "5.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "PENDING_NEW" timeInForce: "GTC" type: "LIMIT_MAKER" side: "BUY" workingTime: -1 selfTradePreventionMode: "NONE" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/orderList: get: summary: Query OCO (USER_DATA) description: |- Retrieves a specific OCO based on provided optional parameters Weight(IP): 4 tags: - Trade parameters: - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 27 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "h2USkA5YQpaXHPIrkd96xE" transactionTime: type: integer format: int64 example: 1565245656253 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "qD1gy3kc3Gx0rihm9Y3xwS" - symbol: "LTCBTC" orderId: 5 clientOrderId: "ARzZ9I00CPM8i3NhmU9Ega" required: - symbol - orderId - clientOrderId required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Cancel OCO (TRADE) description: |- Cancel an entire Order List Canceling an individual leg will cancel the entire OCO Weight(IP): 1 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/listClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Report on deleted OCO content: application/json: schema: $ref: '#/components/schemas/ocoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/allOrderList: get: summary: Query all OCO (USER_DATA) description: |- Retrieves all OCO based on provided optional parameters Weight(IP): 20 tags: - Trade parameters: - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 29 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "amEEAXryFzFwYF1FeRpUoZ" transactionTime: type: integer format: int64 example: 1565245913483 symbol: type: string example: "LTCBTC" isIsolated: type: boolean orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "oD7aesZqjEGlZrbtRpy5zB" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Jr1h6xirOxgeJOUuYQS7V3" required: - symbol - orderId - clientOrderId required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/openOrderList: get: summary: Query Open OCO (USER_DATA) description: 'Weight(IP): 6' tags: - Trade parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 31 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "wuB13fmulKj3YjdqWEcsnp" transactionTime: type: integer format: int64 example: 1565246080644 symbol: type: string example: "LTCBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "r3EH2N76dHfLoSZWIUw1bT" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Cv1SnyPD3qhqpbjpYEHbd2" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/sor/order: post: summary: New order using SOR (TRADE) description: 'Weight(IP): 6' tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/quantity' - name: price in: query required: false schema: type: number format: double - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New order details content: application/json: schema: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 2 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "sBI1KM6nNtOfj5tccZSKly" transactTime: type: integer format: int64 example: 1689149087774 price: type: string example: "31000.00000000" origQty: type: string example: "0.50000000" executedQty: type: string example: "0.50000000" cummulativeQuoteQty: type: string example: "14000.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "BUY" workingTime: type: integer format: int64 example: 1689149087774 fills: type: array items: type: object properties: matchType: type: string example: "ONE_PARTY_TRADE_REPORT" price: type: string example: "28000.00000000" qty: type: string example: "0.50000000" commission: type: string example: "0.00000000" commissionAsset: type: string example: "BTC" tradeId: type: integer format: int64 example: -1 allocId: type: integer format: int64 example: 0 required: - matchType - price - qty - commission - commissionAsset - tradeId - allocId workingFloor: type: string example: "SOR" selfTradePreventionMode: type: string example: "NONE" usedSor: type: boolean example: true required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - fills - workingFloor - selfTradePreventionMode - usedSor '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/sor/order/test: post: summary: Test new order using SOR (TRADE) description: |- Test new order creation and signature/recvWindow using smart order routing (SOR). Creates and validates a new order but does not send it into the matching engine. Weight(IP): - Without computeCommissionRates: `1` - With computeCommissionRates: `20` tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/timeInForce' - $ref: '#/components/parameters/quantity' - name: price in: query required: false schema: type: number format: double - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/strategyId' - $ref: '#/components/parameters/strategyType' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/newOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - name: computeCommissionRates in: query required: false description: |- Default: false schema: type: boolean example: false - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Test new order content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/account: get: summary: Account Information (USER_DATA) description: |- Get current account information. Weight(IP): 20 tags: - Trade parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account details content: application/json: schema: $ref: '#/components/schemas/account' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/myTrades: get: summary: Account Trade List (USER_DATA) description: |- Get trades for a specific account and symbol. If `fromId` is set, it will get id >= that `fromId`. Otherwise most recent orders are returned. The time between startTime and endTime can't be longer than 24 hours. These are the supported combinations of all parameters: symbol symbol + orderId symbol + startTime symbol + endTime symbol + fromId symbol + startTime + endTime symbol+ orderId + fromId Weight(IP): 20 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - name: orderId in: query description: This can only be used in combination with symbol. schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of trades content: application/json: schema: type: array items: $ref: '#/components/schemas/myTrade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/rateLimit/order: get: summary: Query Current Order Count Usage (TRADE) description: |- Displays the user's current order count usage for all intervals. Weight(IP): 40 tags: - Trade parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order rate limits content: application/json: schema: type: array items: type: object properties: rateLimitType: type: string interval: type: string intervalNum: type: integer format: int32 limit: type: integer format: int32 count: type: integer format: int32 required: - rateLimitType - interval - intervalNum - limit example: - rateLimitType: "ORDERS" interval: "SECOND" intervalNum: 10 limit: 10000 count: 0 - rateLimitType: "ORDERS" interval: "DAY" intervalNum: 1 limit: 20000 count: 0 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/myPreventedMatches: get: summary: Query Prevented Matches description: |- Displays the list of orders that were expired because of STP. For additional information on what a Prevented match is, as well as Self Trade Prevention (STP), please refer to our STP FAQ page. These are the combinations supported: * symbol + preventedMatchId * symbol + orderId * symbol + orderId + fromPreventedMatchId (limit will default to 500) * symbol + orderId + fromPreventedMatchId + limit Weight(IP): Case Weight If symbol is invalid: 2 Querying by preventedMatchId: 2 Querying by orderId: 20 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/preventedMatchId' - $ref: '#/components/parameters/orderId' - name: fromPreventedMatchId in: query required: false schema: type: integer format: int64 example: 1 - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order list that were expired due to STP content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" preventedMatchId: type: integer format: int64 example: 1 takerOrderId: type: integer format: int64 example: 5 makerOrderId: type: integer format: int64 example: 3 tradeGroupId: type: integer format: int64 example: 1 selfTradePreventionMode: type: string example: "EXPIRE_MAKER" price: type: string example: "1.100000" makerPreventedQuantity: type: string example: "1.300000" transactTime: type: integer format: int64 example: 1669101687094 required: - symbol - preventedMatchId - takerOrderId - makerOrderId - tradeGroupId - selfTradePreventionMode - price - makerPreventedQuantity - transactTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/myAllocations: get: summary: Query Allocations (USER_DATA) description: |- Retrieves allocations resulting from SOR order placement. Weight: 20 Supported parameter combinations: Parameters Response symbol allocations from oldest to newest symbol + startTime oldest allocations since startTime symbol + endTime newest allocations until endTime symbol + startTime + endTime allocations within the time range symbol + fromAllocationId allocations by allocation ID symbol + orderId allocations related to an order starting with oldest symbol + orderId + fromAllocationId allocations related to an order by allocation ID Note: The time between startTime and endTime can't be longer than 24 hours. tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: fromAllocationId in: query required: false schema: type: integer format: int64 - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Allocations resulting from SOR order placement content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" allocationId: type: integer format: int64 example: 0 allocationType: type: string example: "SOR" orderId: type: integer format: int64 example: 1 orderListId: type: integer format: int64 example: -1 price: type: string example: "1.00000000" qty: type: string example: "5.00000000" quoteQty: type: string example: "5.00000000" commission: type: string example: "0.00000000" commissionAsset: type: string example: "BTC" time: type: integer format: int64 example: 1687506878118 isBuyer: type: boolean example: true isMaker: type: boolean example: false isAllocator: type: boolean example: false required: - symbol - allocationId - allocationType - orderId - orderListId - price - qty - quoteQty - commission - commissionAsset - time - isBuyer - isMaker - isAllocator '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/account/commission: get: summary: Query Commission Rates (USER_DATA) description: |- Get current account commission rates. Weight: 20 tags: - Trade parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Current account commission rates. content: application/json: schema: type: object properties: symbol: type: string example: "BTCUSDT" standardCommission: type: object description: Standard commission rates on trades from the order. properties: maker: type: string example: "0.00000010" taker: type: string example: "0.00000020" buyer: type: string example: "0.00000030" seller: type: string example: "0.00000040" required: - maker - taker - buyer - seller taxCommission: type: object description: Tax commission rates for trades from the order. properties: maker: type: string example: "0.00000112" taker: type: string example: "0.00000114" buyer: type: string example: "0.00000118" seller: type: string example: "0.00000116" required: - maker - taker - buyer - seller discount: type: object description: Discount commission when paying in BNB. properties: enabledForAccount: type: boolean example: true enabledForSymbol: type: boolean example: true discountAsset: type: string example: "BNB" discount: type: string description: Standard commission is reduced by this rate when paying commission in BNB. example: "0.25000000" required: - symbol - standardCommission - taxCommission - discount '400': description: 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/borrow-repay: post: summary: Margin account borrow/repay(MARGIN) description: |- Margin account borrow/repay(MARGIN) Weight(UID): 3000 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - name: isIsolated in: query required: true description: "TRUE for isolated margin, FALSE for crossed margin" schema: type: string - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/amount' - name: type in: query required: true description: BORROW or REPAY schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin account borrow/repay content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 100000001 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' get: summary: Query borrow/repay records in Margin account(USER_DATA) description: |- Query borrow/repay records in Margin account - txId or startTime must be sent. txId takes precedence. Response in descending order - If an asset is sent, data within 30 days before endTime; If an asset is not sent, data within 7 days before endTime - If neither startTime nor endTime is sent, the recent 7-day data will be returned. - startTime set as endTime - 7 days by default, endTime set as current time by default Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isolatedSymbol' - name: txId in: query required: false description: tranId in POST /sapi/v1/margin/loan schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - name: type in: query required: true description: BORROW or REPAY schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin account borrow/repay content: application/json: schema: type: object properties: rows: type: array items: type: object properties: isolatedSymbol: type: string description: Isolated symbol, will not be returned for crossed margin amount: type: string description: Total amount borrowed/repaid asset: type: string interest: type: string description: Interest repaid principal: type: string description: Principal repaid status: type: string description: one of PENDING (pending execution), CONFIRMED (successfully execution), FAILED (execution failed, nothing happened to your account) timestamp: type: integer format: int64 txId: type: integer format: int64 required: - asset - principal - status - timestamp - txId total: type: integer format: int32 required: - rows - total example: rows: - isolatedSymbol: "BNBUSDT" amount: "14.00000000" asset: "BNB" interest: "0.01866667" principal: "13.98133333" status: "CONFIRMED" timestamp: 1563438204000 txId: 2970933056 total: 1 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/transfer: 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(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/getCrossMargingTransferHistoryType' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin account transfer history, response in descending order content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string asset: type: string status: type: string timestamp: type: integer format: int64 txId: type: integer format: int64 type: type: string required: - amount - asset - status - timestamp - txId - type total: type: integer format: int32 example: 3 example: rows: - amount: "0.10000000" asset: "BNB" status: "CONFIRMED" timestamp: 1566898617 txId: 5240372201 type: "ROLL_IN" total: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allAssets: get: summary: Get All Margin Assets (MARKET_DATA) description: 'Weight(IP): 1' tags: - Margin parameters: - $ref: '#/components/parameters/asset' security: - ApiKeyAuth: [] responses: '200': description: Assets details content: application/json: schema: type: array items: type: object properties: assetFullName: type: string example: "Binance coin" assetName: type: string example: "BNB" isBorrowable: type: boolean isMortgageable: type: boolean userMinBorrow: type: string example: "0.00000000" userMinRepay: type: string example: "0.00000000" required: - assetFullName - assetName - isBorrowable - isMortgageable - userMinBorrow - userMinRepay '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allPairs: get: summary: Get All Cross Margin Pairs (MARKET_DATA) description: 'Weight(IP): 1' tags: - Margin parameters: - $ref: '#/components/parameters/symbol' security: - ApiKeyAuth: [] responses: '200': description: Margin pairs content: application/json: schema: type: array items: type: object properties: base: type: string example: "BNB" id: type: integer format: int64 example: 351637150141315861 isBuyAllowed: type: boolean isMarginTrade: type: boolean isSellAllowed: type: boolean quote: type: string example: "BTC" symbol: type: string example: "BNBBTC" required: - base - id - isBuyAllowed - isMarginTrade - isSellAllowed - quote - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/priceIndex: get: summary: Query Margin PriceIndex (MARKET_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/symbol' security: - ApiKeyAuth: [] responses: '200': description: Price index content: application/json: schema: type: object properties: calcTime: type: integer format: int64 example: 1562046418000 price: type: string example: "0.00333930" symbol: type: string example: "BNBBTC" required: - calcTime - price - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/order: get: summary: Query Margin Account's Order (USER_DATA) description: |- - Either `orderId` or `origClientOrderId` must be sent. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Interest History, response in descending order content: application/json: schema: $ref: "#/components/schemas/marginOrderDetail" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: summary: Margin Account New Order (TRADE) description: |- Post a new order for margin account. Weight(UID): 6 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/orderType' - $ref: '#/components/parameters/quantity' - $ref: '#/components/parameters/quoteOrderQty' - $ref: '#/components/parameters/optionalPrice' - $ref: '#/components/parameters/stopPrice' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/icebergQty' - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/sideEffectType' - $ref: '#/components/parameters/timeInForce' - name: autoRepayAtCancel in: query required: true schema: type: boolean example: true - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin order info content: application/json: schema: oneOf: - $ref: '#/components/schemas/marginOrderResponseAck' - $ref: '#/components/schemas/marginOrderResponseResult' - $ref: '#/components/schemas/marginOrderResponseFull' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Margin Account Cancel Order (TRADE) description: |- Cancel an active order for margin account. Either `orderId` or `origClientOrderId` must be sent. Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled margin order details content: application/json: schema: $ref: '#/components/schemas/marginOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/interestHistory: get: summary: Get Interest History (USER_DATA) description: |- - Response in descending order - If `isolatedSymbol` is not sent, crossed margin data will be returned - Set `archived` to `true` to query data from 6 months ago - `type` in response has 4 enums: - `PERIODIC` interest charged per hour - `ON_BORROW` first interest charged on borrow - `PERIODIC_CONVERTED` interest charged per hour converted into BNB - `ON_BORROW_CONVERTED` first interest charged on borrow converted into BNB Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/archived' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Interest History, response in descending order content: application/json: schema: type: object properties: rows: type: array items: type: object properties: isolatedSymbol: type: string example: "BNBUSDT" asset: type: string example: "BNB" interest: type: string example: "0.01866667" interestAccuredTime: type: integer format: int64 example: 1566813600 interestRate: type: string example: "0.01600000" principal: type: string example: "36.22000000" type: type: string example: "ON_BORROW" required: - isolatedSymbol - asset - interest - interestAccuredTime - interestRate - principal - type total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/forceLiquidationRec: get: summary: Get Force Liquidation Record (USER_DATA) description: |- - Response in descending order Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Force Liquidation History, response in descending order content: application/json: schema: type: object properties: rows: type: array items: type: object properties: avgPrice: type: string executedQty: type: string orderId: type: integer format: int64 price: type: string qty: type: string side: type: string symbol: type: string timeInForce: type: string isIsolated: type: boolean updatedTime: type: integer format: int64 required: - avgPrice - executedQty - orderId - price - qty - side - symbol - timeInForce - isIsolated - updatedTime total: type: integer format: int32 example: 1 required: - rows - total example: rows: - avgPrice: "0.00388359" executedQty: "31.39000000" orderId: 180015097 price: "0.00388110" qty: "31.39000000" side: "SELL" symbol: "BNBBTC" timeInForce: "GTC" isIsolated: true updatedTime: 1558941374745 total: 1 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/account: get: summary: Query Cross Margin Account Details (USER_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin account details content: application/json: schema: type: object properties: created: type: boolean example: true borrowEnabled: type: boolean example: true marginLevel: type: string example: "11.64405625" collateralMarginLevel: type: string example: "3.2" totalAssetOfBtc: type: string example: "6.82728457" totalLiabilityOfBtc: type: string example: "0.58633215" totalNetAssetOfBtc: type: string example: "6.24095242" TotalCollateralValueInUSDT: type: string example: "5.82728457" tradeEnabled: type: boolean transferInEnabled: type: boolean transferOutEnabled: type: boolean accountType: type: string example: "MARGIN_1" userAssets: type: array items: type: object properties: asset: type: string example: "BTC" borrowed: type: string example: "0.00000000" free: type: string example: "0.00499500" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00499500" required: - asset - borrowed - free - interest - locked - netAsset required: - created - borrowEnabled - marginLevel - collateralMarginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - TotalCollateralValueInUSDT - tradeEnabled - transferInEnabled - transferOutEnabled - accountType - userAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/openOrders: get: summary: Query Margin Account's Open Orders (USER_DATA) description: |- - If the `symbol` is not sent, orders for all symbols will be returned in an array. - When all symbols are returned, the number of requests counted against the rate limiter is equal to the number of symbols currently trading on the exchange - If isIsolated ="TRUE", symbol must be sent. Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin open orders list content: application/json: schema: type: array items: $ref: '#/components/schemas/marginOrderDetail' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Margin Account Cancel all Open Orders on a Symbol (TRADE) description: | - Cancels all active orders on a symbol for margin account. - This includes OCO orders. Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: "#/components/parameters/isIsolatedMargin" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled margin orders content: application/json: schema: type: array items: anyOf: - $ref: '#/components/schemas/canceledMarginOrderDetail' - $ref: '#/components/schemas/marginOcoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allOrders: get: summary: Query Margin Account's All Orders (USER_DATA) description: |- - If `orderId` is set, it will get orders >= that orderId. Otherwise most recent orders are returned. - For some historical orders `cummulativeQuoteQty` will be < 0, meaning the data is not available at this time. Weight(IP): 200 Request Limit: 60 times/min per IP tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin order list content: application/json: schema: type: array items: $ref: '#/components/schemas/marginOrderDetail' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/order/oco: post: summary: Margin Account New OCO (TRADE) description: |- Send in a new OCO for a margin account - Price Restrictions: - SELL: Limit Price > Last Price > Stop Price - BUY: Limit Price < Last Price < Stop Price - Quantity Restrictions: - Both legs must have the same quantity - ICEBERG quantities however do not have to be the same. - Order Rate Limit - OCO counts as 2 orders against the order rate limit. Weight(UID): 6 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/listClientOrderId' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/quantity' - $ref: '#/components/parameters/limitClientOrderId' - $ref: '#/components/parameters/price' - $ref: '#/components/parameters/limitIcebergQty' - $ref: '#/components/parameters/stopClientOrderId' - $ref: '#/components/parameters/ocoStopPrice' - $ref: '#/components/parameters/stopLimitPrice' - $ref: '#/components/parameters/stopIcebergQty' - $ref: '#/components/parameters/stopLimitTimeInForce' - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/sideEffectType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: New Margin OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 0 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "JYVpp3F0f5CAG15DhtrqLp" transactionTime: type: integer format: int64 example: 1563417480525 symbol: type: string example: "LTCBTC" marginBuyBorrowAmount: type: string example: "5" description: will not return if no margin trade happens marginBuyBorrowAsset: type: string example: "BTC" description: will not return if no margin trade happens isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 2 clientOrderId: "Kk7sqHb9J6mJWTMDVW7Vos" - symbol: "LTCBTC" orderId: 3 clientOrderId: "xTXKaGYd4bluPVp78IVRvl" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice example: - symbol: "LTCBTC" orderId: 2 orderListId: 0 clientOrderId: "Kk7sqHb9J6mJWTMDVW7Vos" transactTime: 1563417480525 price: "0.000000" origQty: "0.624363" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "STOP_LOSS" side: "BUY" stopPrice: "0.960664" - symbol: "LTCBTC" orderId: 3 orderListId: 0 clientOrderId: "xTXKaGYd4bluPVp78IVRvl" transactTime: 1563417480525 price: "0.036435" origQty: "0.624363" executedQty: "0.000000" cummulativeQuoteQty: "0.000000" status: "NEW" timeInForce: "GTC" type: "LIMIT_MAKER" side: "BUY" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - marginBuyBorrowAmount - marginBuyBorrowAsset - isIsolated - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/orderList: get: summary: Query Margin Account's OCO (USER_DATA) description: |- Retrieves a specific OCO based on provided optional parameters - Either `orderListId` or `origClientOrderId` must be provided Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/isIsolatedMargin' - name: symbol in: query description: 'Mandatory for isolated margin, not supported for cross margin' schema: type: string - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/origClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin OCO details content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 27 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "h2USkA5YQpaXHPIrkd96xE" transactionTime: type: integer format: int64 example: 1565245656253 symbol: type: string example: "LTCBTC" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "qD1gy3kc3Gx0rihm9Y3xwS" - symbol: "LTCBTC" orderId: 5 clientOrderId: "ARzZ9I00CPM8i3NhmU9Ega" required: - symbol - orderId - clientOrderId required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Margin Account Cancel OCO (TRADE) description: |- Cancel an entire Order List for a margin account - Canceling an individual leg will cancel the entire OCO - Either `orderListId` or `listClientOrderId` must be provided Weight(UID): 1 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/orderListId' - $ref: '#/components/parameters/listClientOrderId' - $ref: '#/components/parameters/newClientOrderId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin OCO details content: application/json: schema: $ref: '#/components/schemas/marginOcoOrder' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/allOrderList: get: summary: Query Margin Account's all OCO (USER_DATA) description: |- Retrieves all OCO for a specific margin account based on provided optional parameters Weight(IP): 200 tags: - Margin parameters: - $ref: '#/components/parameters/isIsolatedMargin' - name: symbol in: query description: 'Mandatory for isolated margin, not supported for cross margin' schema: type: string - name: fromId in: query description: 'If supplied, neither `startTime` or `endTime` can be provided' schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: 'Default Value: 500; Max Value: 1000' schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of Margin OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 29 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "amEEAXryFzFwYF1FeRpUoZ" transactionTime: type: integer format: int64 example: 1565245913483 symbol: type: string example: "LTCBTC" isIsolated: type: boolean orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "oD7aesZqjEGlZrbtRpy5zB" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Jr1h6xirOxgeJOUuYQS7V3" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/openOrderList: get: summary: Query Margin Account's Open OCO (USER_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/isIsolatedMargin' - name: symbol in: query description: 'Mandatory for isolated margin, not supported for cross margin' schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of Open Margin OCO orders content: application/json: schema: type: array items: type: object properties: orderListId: type: integer format: int64 example: 31 contingencyType: type: string example: "OCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "wuB13fmulKj3YjdqWEcsnp" transactionTime: type: integer format: int64 example: 1565246080644 symbol: type: string example: "LTCBTC" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "LTCBTC" orderId: 4 clientOrderId: "r3EH2N76dHfLoSZWIUw1bT" - symbol: "LTCBTC" orderId: 5 clientOrderId: "Cv1SnyPD3qhqpbjpYEHbd2" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/myTrades: get: summary: Query Margin Account's Trade List (USER_DATA) description: |- - If `fromId` is set, it will get orders >= that `fromId`. Otherwise most recent trades are returned. Weight(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/fromId' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of margin trades content: application/json: schema: type: array items: $ref: '#/components/schemas/marginTrade' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/maxBorrowable: get: summary: Query Max Borrow (USER_DATA) description: |- - If `isolatedSymbol` is not sent, crossed margin data will be sent. - `borrowLimit` is also available from https://www.binance.com/en/margin-fee Weight(IP): 50 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Details on max borrow amount content: application/json: schema: type: object properties: amount: type: string example: "1.69248805" description: account's currently max borrowable amount with sufficient system availability borrowLimit: type: string example: "60" description: max borrowable amount limited by the account level required: - amount - borrowLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/maxTransferable: get: summary: Query Max Transfer-Out Amount (USER_DATA) description: |- - If `isolatedSymbol` is not sent, crossed margin data will be sent. Weight(IP): 50 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/isolatedSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Details on max transferable amount content: application/json: schema: type: object properties: amount: type: string description: "Account's currently max borrowable amount with sufficient system availability" borrowLimit: type: string description: "Max borrowable amount limited by the account level" example: amount: "1.69248805" borrowLimit: "60" required: - amount - borrowLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/tradeCoeff: get: summary: Get Summary of Margin account (USER_DATA) description: |- Get personal margin level information Weight(IP): 10 tags: - Margin parameters: - name: email in: query description: Email Address required: true schema: type: string example: 'me@email.com' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Summary of Margin Account content: application/json: schema: type: object properties: normalBar: type: string description: "Account's currently max borrowable amount with sufficient system availability" example: "1.5" marginCallBar: type: string description: "Max borrowable amount limited by the account level" example: "1.3" forceLiquidationBar: type: string description: "Liquidation Margin Ratio" example: "1.1" required: - amount - borrowLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/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(IP): 10 tags: - Margin parameters: - $ref: '#/components/parameters/symbols' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Account Info when "symbols" is not sent content: application/json: schema: $ref: '#/components/schemas/isolatedMarginAccountInfo' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Disable Isolated Margin Account (TRADE) description: |- Disable isolated margin account for a specific symbol. Each trading pair can only be deactivated once every 24 hours . Weight(UID): 300 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Account status content: application/json: schema: type: object properties: success: type: boolean symbol: type: string example: "BTCUSDT" required: - success - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: summary: Enable Isolated Margin Account (TRADE) description: |- Enable isolated margin account for a specific symbol. Weight(UID): 300 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Account status content: application/json: schema: type: object properties: success: type: boolean symbol: type: string example: "BTCUSDT" required: - success - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/accountLimit: get: summary: Query Enabled Isolated Margin Account Limit (USER_DATA) description: |- Query enabled isolated margin account limit. Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Number of enabled Isolated Margin Account and its limit content: application/json: schema: type: object properties: enabledAccount: type: integer format: int64 example: 5 maxAccount: type: integer format: int64 example: 20 required: - enabledAccount - maxAccount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolated/allPairs: get: summary: Get All Isolated Margin Symbol(USER_DATA) description: 'Weight(IP): 10' tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: All Isolated Margin Symbols content: application/json: schema: type: array items: type: object properties: symbol: type: string example: 'BTCUSDT' base: type: string example: 'BTC' quote: type: string example: 'USDT' isMarginTrade: type: boolean isBuyAllowed: type: boolean isSellAllowed: type: boolean required: - symbol - base - quote - isMarginTrade - isBuyAllowed - isSellAllowed '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/bnbBurn: post: summary: Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA) description: |- - "spotBNBBurn" and "interestBNBBurn" should be sent at least one. Weight(IP): 1 tags: - Margin parameters: - name: spotBNBBurn in: query description: Determines whether to use BNB to pay for trading fees on SPOT schema: type: string enum: ['true','false'] example: 'true' - name: interestBNBBurn in: query description: Determines whether to use BNB to pay for margin loan's interest schema: type: string enum: ['true','false'] example: 'false' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Status on BNB to pay for trading fees content: application/json: schema: $ref: '#/components/schemas/bnbBurnStatus' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: summary: Get BNB Burn Status(USER_DATA) description: 'Weight(IP): 1' tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Status on BNB to pay for trading fees content: application/json: schema: $ref: '#/components/schemas/bnbBurnStatus' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/interestRateHistory: get: summary: Margin Interest Rate History (USER_DATA) description: |- The max interval between startTime and endTime is 30 days. Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin Interest Rate History content: application/json: schema: type: array items: type: object properties: asset: type: string example: 'BTC' dailyInterestRate: type: string example: '0.00025000' timestamp: type: integer format: int64 example: 1611544731000 vipLevel: type: integer format: int32 example: 1 required: - asset - dailyInterestRate - timestamp - vipLevel '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/crossMarginData: get: summary: Query Cross Margin Fee Data (USER_DATA) description: |- Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when coin is specified; 5 when the coin parameter is omitted tags: - Margin parameters: - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/optionalCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cross Margin Fee Data content: application/json: schema: type: array items: type: object properties: vipLevel: type: integer format: int32 example: 0 coin: type: string example: "BTC" transferIn: type: boolean borrowable: type: boolean dailyInterest: type: string example: "0.00026125" yearlyInterest: type: string example: "0.0953" borrowLimit: type: string example: "180" marginablePairs: type: array items: type: string example: - "BNBBTC" - "TRXBTC" - "ETHBTC" - "BTCUSDT" required: - vipLevel - coin - transferIn - borrowable - dailyInterest - yearlyInterest - borrowLimit - marginablePairs '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolatedMarginData: get: summary: Query Isolated Margin Fee Data (USER_DATA) description: |- Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee Weight(IP): 1 when a single is specified; 10 when the symbol parameter is omitted tags: - Margin parameters: - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Fee Data content: application/json: schema: type: array items: type: object properties: vipLevel: type: integer format: int32 example: 0 symbol: type: string example: "BTCUSDT" leverage: type: string example: "10" data: type: array items: type: object properties: coin: type: string dailyInterest: type: string borrowLimit: type: string example: - coin: "BTC" dailyInterest: "0.00026125" borrowLimit: "270" - coin: "USDT" dailyInterest: "0.000475" borrowLimit: "2100000" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/isolatedMarginTier: get: summary: Query Isolated Margin Tier Data (USER_DATA) description: |- Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data Weight(IP): 1 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - name: tier in: query description: All margin tier data will be returned if tier is omitted schema: type: string example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Isolated Margin Tier Data content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" tier: type: integer format: int32 example: 1 effectiveMultiple: type: string example: "10" initialRiskRatio: type: string example: "1.111" liquidationRiskRatio: type: string example: "1.05" baseAssetMaxBorrowable: type: string example: "9" quoteAssetMaxBorrowable: type: string example: "70000" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/rateLimit/order: get: summary: Query Current Margin Order Count Usage (TRADE) description: |- Displays the user's current margin order count usage for all intervals. Weight(IP): 20 tags: - Margin parameters: - $ref: '#/components/parameters/optionalIsIsolated' - name: symbol in: query description: isolated symbol, mandatory for isolated margin schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Usage. content: application/json: schema: type: array items: type: object properties: rateLimitType: type: string example: ORDERS interval: type: string example: SECOND intervalNum: type: integer format: int64 example: 10 limit: type: integer format: int64 example: 10000 count: type: integer format: int64 example: 0 required: - rateLimitType - interval - intervalNum - limit - count '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/crossMarginCollateralRatio: get: summary: Cross margin collateral ratio (MARKET_DATA) description: |- Weight(IP): 100 tags: - Margin security: - ApiKeyAuth: [] responses: '200': description: Margin collateral ratio content: application/json: schema: type: array items: type: object properties: collaterals: type: array items: type: object properties: minUsdValue: type: string example: "0" maxUsdValue: type: string example: "13000000" discountRate: type: string example: "1" required: - minUsdValue - maxUsdValue - discountRate assetNames: type: array items: type: string example: "BNX" required: - collaterals - assetNames '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/exchange-small-liability: get: summary: Get Small Liability Exchange Coin List (USER_DATA) description: |- Query the coins which can be small liability exchange Weight(UID): 100 tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: coin list content: application/json: schema: type: array items: type: object properties: asset: type: string example: "ETH" interest: type: string example: "0.00083334" principal: type: string example: "0.001" liabilityAsset: type: string example: "USDT" liabilityQty: type: number format: float example: 0.3552 required: - asset - interest - principal - liabilityAsset - liabilityQty '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/exchange-small-liability-history: get: summary: Get Small Liability Exchange History (USER_DATA) description: |- Get Small liability Exchange History Weight(UID): 100 tags: - Margin parameters: - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: coin list content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: asset: type: string example: "ETH" amount: type: string example: "0.00083434" targetAsset: type: string example: "BUSD" targetAmount: type: string example: "1.37576819" bizType: type: string example: "EXCHANGE_SMALL_LIABILITY" timestamp: type: integer format: int64 example: 1672801339253 required: - asset - amount - targetAsset - targetAmount - bizType - timestamp required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/next-hourly-interest-rate: get: summary: Get a future hourly interest rate (USER_DATA) description: |- Get user the next hourly estimate interest Weight(UID): 100 tags: - Margin parameters: - name: assets in: query description: List of assets, separated by commas, up to 20 schema: type: string example: BTC,ETH - name: isIsolated in: query description: for isolated margin or not, "TRUE", "FALSE" schema: type: string enum: ['TRUE','FALSE'] example: "TRUE" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: hourly interest content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BTC" nextHourlyInterestRate: type: string example: "0.00000571" required: - asset - nextHourlyInterestRate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/capital-flow: get: summary: Get cross or isolated margin capital flow(USER_DATA) description: |- Get cross or isolated margin capital flow Weight(IP): 100 tags: - Margin parameters: - $ref: '#/components/parameters/optionalAsset' - name: symbol in: query description: Required when querying isolated data schema: type: string example: 'BTCUSDT' - name: type in: query schema: type: string enum: [TRANSFER, BORROW, REPAY, BUY_INCOME, BUY_EXPENSE, SELL_INCOME, SELL_EXPENSE, TRADING_COMMISSION, BUY_LIQUIDATION, SELL_LIQUIDATION, REPAY_LIQUIDATION, OTHER_LIQUIDATION, LIQUIDATION_FEE, SMALL_BALANCE_CONVERT, COMMISSION_RETURN, SMALL_CONVERT] - name: startTime in: query description: Only supports querying the data of the last 90 days schema: type: integer format: int64 - $ref: '#/components/parameters/endTime' - name: fromId in: query description: If fromId is set, the data with id > fromId will be returned. Otherwise the latest data will be returned schema: type: integer format: int64 - name: limit in: query description: The number of data items returned each time is limited. Default 500; Max 1000. schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin capital flow content: application/json: schema: type: array items: type: object properties: id: type: integer format: int64 example: 123456 tranId: type: integer format: int64 example: 123123 timestamp: type: integer format: int64 example: 1691116657000 asset: type: string example: "USDT" symbol: type: string example: "BTCUSDT" type: type: string example: "BORROW" amount: type: string example: "101" required: - id - tranId - timestamp - asset - symbol - type - amount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/delist-schedule: get: summary: Get tokens or symbols delist schedule for cross margin and isolated margin (MARKET_DATA) description: |- Get tokens or symbols delist schedule for cross margin and isolated margin Weight(IP): 100 tags: - Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: tokens or symbols delist schedule content: application/json: schema: type: array items: type: object properties: delistTime: type: integer format: int64 example: 1686161202000 crossMarginAssets: type: array items: type: string example: "BTC" isolatedMarginSymbols: type: array items: type: string example: "BNBUSDT" '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/available-inventory: get: summary: Query Margin Available Inventory (USER_DATA) description: |- Margin available Inventory query Weight(UID): 50 tags: - Margin parameters: - name: type in: query required: true schema: type: string enum: [MARGIN, ISOLATED] - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin available Inventory content: application/json: schema: type: object properties: assets: type: object properties: MATIC: type: string example: "100000000" STPT: type: string example: "100000000" TVK: type: string example: "100000000" SHIB: type: string example: "97409653" required: - MATIC - STPT - TVK - SHIB updateTime: type: integer format: int64 example: 1699272487 required: - assets - updateTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/manual-liquidation: post: summary: Margin manual liquidation(MARGIN) description: |- Margin manual liquidation Weight(UID): 3000 tags: - Margin parameters: - name: type in: query required: true schema: type: string enum: [MARGIN, ISOLATED] - name: symbol in: query schema: type: string example: "BTCUSDT" - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin manual liquidation content: application/json: schema: type: array items: type: object properties: asset: type: string example: "ETH" interest: type: string example: "0.00083334" principal: type: string example: "0.001" liabilityAsset: type: string example: "USDT" liabilityQty: type: number format: float example: 0.3552 required: - asset - interest - principal - liabilityAsset - liabilityQty '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/order/oto: post: summary: Margin Account New OTO (TRADE) description: |- Post a new `OTO` order for margin account: - An `OTO` (One-Triggers-the-Other) is an order list comprised of 2 orders - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The second order is called the pending order. It can be any order type except for `MARKET` orders using parameter `quoteOrderQty`. The pending order is only placed on the order book when the working order gets fully filled. - If either the working order or the pending order is cancelled individually, the other order in the order list will also be canceled or expired. - When the order list is placed, if the working order gets immediately fully filled, the placement response will show the working order as `FILLED` but the pending order will still appear as `PENDING_NEW`. You need to query the status of the pending order again to see its updated status. - OTOs add 2 orders to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(UID): 6 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - name: listClientOrderId in: query description: |- Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. schema: type: string - $ref: '#/components/parameters/ocoNewOrderRespType' - name: sideEffectType in: query description: Default `NO_SIDE_EFFECT` schema: type: string enum: [NO_SIDE_EFFECT, MARGIN_BUY] - $ref: '#/components/parameters/selfTradePreventionMode' - name: autoRepayAtCancel in: query description: |- Only when MARGIN_BUY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true schema: type: boolean example: true - $ref: '#/components/parameters/workingType' - $ref: '#/components/parameters/workingSide' - $ref: '#/components/parameters/workingClientOrderId' - $ref: '#/components/parameters/workingPrice' - $ref: '#/components/parameters/workingQuantity' - $ref: '#/components/parameters/workingIcebergQty' - $ref: '#/components/parameters/workingTimeInForce' - $ref: '#/components/parameters/pendingType' - $ref: '#/components/parameters/pendingSide' - $ref: '#/components/parameters/pendingClientOrderId' - $ref: '#/components/parameters/pendingPrice' - $ref: '#/components/parameters/pendingStopPrice' - $ref: '#/components/parameters/pendingTrailingDelta' - $ref: '#/components/parameters/pendingQuantity' - $ref: '#/components/parameters/pendingIcebergQty' - $ref: '#/components/parameters/pendingTimeInForce' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OTO order content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 13551 contingencyType: type: string example: "OTO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "JDuOrsu0Ge8GTyvx8J7VTD" transactionTime: type: integer format: int64 example: 1725521998054 symbol: type: string example: "BTCUSDT" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "BTCUSDT" orderId: 29896699 clientOrderId: "y8RB6tQEMuHUXybqbtzTxk" - symbol: "BTCUSDT" orderId: 29896700 clientOrderId: "dKQEdh5HhXb7Lpp85jz1dQ" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string selfTradePreventionMode: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - selfTradePreventionMode example: - symbol: "BTCUSDT" orderId: 29896699 orderListId: 13551 clientOrderId: "y8RB6tQEMuHUXybqbtzTxk" transactTime: 1725521998054 price: "80000.00000000" origQty: "0.02000000" executedQty: "0" cummulativeQuoteQty: "0" status: "NEW" timeInForce: "GTC" type: "LIMIT" side: "SELL" selfTradePreventionMode: "NONE" - symbol: "BTCUSDT" orderId: 29896700 orderListId: 13551 clientOrderId: "dKQEdh5HhXb7Lpp85jz1dQ" transactTime: 1725521998054 price: "50000.00000000" origQty: "0.02000000" executedQty: "0" cummulativeQuoteQty: "0" status: "PENDING_NEW" timeInForce: "GTC" type: "LIMIT" side: "BUY" selfTradePreventionMode: "NONE" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/order/otoco: post: summary: Margin Account New OTOCO (TRADE) description: |- Post a new `OTOCO` order for margin account: - An `OTOCO` (One-Triggers-the-Other-Cancel-the-Other) is an order list comprised of 3 orders - The first order is called the working order and must be `LIMIT` or `LIMIT_MAKER`. Initially, only the working order goes on the order book. - The behavior of the working order is the same as the `OTO`. - `OTOCO` has 2 pending orders (pending above and pending below), forming an `OCO` pair. The pending orders are only placed on the order book when the working order gets fully filled. - The rules of the pending above and pending below follow the same rules as the Order List `OCO`. - OTOCOs add 3 orders to the unfilled order count, `EXCHANGE_MAX_NUM_ORDERS` filter and `MAX_NUM_ORDERS` filter. Weight(UID): 6 tags: - Margin parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/isIsolatedMargin' - name: sideEffectType in: query description: Default `NO_SIDE_EFFECT` schema: type: string enum: [NO_SIDE_EFFECT, MARGIN_BUY] - name: autoRepayAtCancel in: query description: |- Only when MARGIN_BUY order takes effect, true means that the debt generated by the order needs to be repay after the order is cancelled. The default is true schema: type: boolean example: true - name: listClientOrderId in: query description: |- Arbitrary unique ID among open order lists. Automatically generated if not sent. A new order list with the same `listClientOrderId` is accepted only when the previous one is filled or completely expired. `listClientOrderId` is distinct from the `workingClientOrderId` and the `pendingClientOrderId`. schema: type: string - $ref: '#/components/parameters/ocoNewOrderRespType' - $ref: '#/components/parameters/selfTradePreventionMode' - $ref: '#/components/parameters/workingType' - $ref: '#/components/parameters/workingSide' - $ref: '#/components/parameters/workingClientOrderId' - $ref: '#/components/parameters/workingPrice' - $ref: '#/components/parameters/workingQuantity' - $ref: '#/components/parameters/workingIcebergQty' - $ref: '#/components/parameters/workingTimeInForce' - $ref: '#/components/parameters/pendingSide' - $ref: '#/components/parameters/pendingQuantity' - $ref: '#/components/parameters/pendingAboveType' - $ref: '#/components/parameters/pendingAboveClientOrderId' - $ref: '#/components/parameters/pendingAbovePrice' - $ref: '#/components/parameters/pendingAboveStopPrice' - $ref: '#/components/parameters/pendingAboveTrailingDelta' - $ref: '#/components/parameters/pendingAboveIcebergQty' - $ref: '#/components/parameters/pendingAboveTimeInForce' - $ref: '#/components/parameters/pendingBelowType' - $ref: '#/components/parameters/pendingBelowClientOrderId' - $ref: '#/components/parameters/pendingBelowPrice' - $ref: '#/components/parameters/pendingBelowStopPrice' - $ref: '#/components/parameters/pendingBelowTrailingDelta' - $ref: '#/components/parameters/pendingBelowIcebergQty' - $ref: '#/components/parameters/pendingBelowTimeInForce' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OTOCO order content: application/json: schema: type: object properties: orderListId: type: integer format: int64 example: 13551 contingencyType: type: string example: "OTOCO" listStatusType: type: string example: "EXEC_STARTED" listOrderStatus: type: string example: "EXECUTING" listClientOrderId: type: string example: "u2AUo48LLef5qVenRtwJZy" transactionTime: type: integer format: int64 example: 1725521881300 symbol: type: string example: "BNBUSDT" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "BNBUSDT" orderId: 28282534 clientOrderId: "IfYDxvrZI4kiyqYpRH13iI" - symbol: "BNBUSDT" orderId: 28282535 clientOrderId: "0HCSsPRxVfW8BkTUy9z4np" - symbol: "BNBUSDT" orderId: 28282536 clientOrderId: "dypsgdxWnLY75kwT930cbD" orderReports: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string transactTime: type: integer format: int64 price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string selfTradePreventionMode: type: string required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - selfTradePreventionMode example: - symbol: "BNBUSDT" orderId: 28282534 orderListId: 13509 clientOrderId: "IfYDxvrZI4kiyqYpRH13iI" transactTime: 1725521881300 price: "300.00000000" origQty: "1.00000000" executedQty: "0" cummulativeQuoteQty: "0" status: "NEW" timeInForce: "GTC" type: "LIMIT" side: "BUY" selfTradePreventionMode: "NONE" - symbol: "BNBUSDT" orderId: 28282535 orderListId: 13509 clientOrderId: "0HCSsPRxVfW8BkTUy9z4np" transactTime: 1725521881300 price: "0E-8" origQty: "1.00000000" executedQty: "0" cummulativeQuoteQty: "0" status: "PENDING_NEW" timeInForce: "GTC" type: "STOP_LOSS" side: "SELL" stopPrice: "299.00000000" selfTradePreventionMode: "NONE" - symbol: "BNBUSDT" orderId: 28282536 orderListId: 13509 clientOrderId: "dypsgdxWnLY75kwT930cbD" transactTime: 1725521881300 price: "301.00000000" origQty: "1.00000000" executedQty: "0" cummulativeQuoteQty: "0" status: "PENDING_NEW" timeInForce: "GTC" type: "LIMIT_MAKER" side: "SELL" selfTradePreventionMode: "NONE" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders - orderReports '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/max-leverage: post: summary: Adjust cross margin max leverage (USER_DATA) description: |- Adjust cross margin max leverage Weight(UID): 3000 tags: - Margin parameters: - name: maxLeverage in: query required: true description: |- Can only adjust 3 or 5 schema: type: integer example: 3 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Adjust result content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/margin/leverageBracket: get: summary: Query Liability Coin Leverage Bracket in Cross Margin Pro Mode (MARKET_DATA) description: |- Liability Coin Leverage Bracket in Cross Margin Pro Mode Weight(IP): 1 tags: - Margin security: - ApiKeyAuth: [] responses: '200': description: Leverage info content: application/json: schema: type: array items: type: object properties: assetNames: type: array items: type: string example: "BTC" rank: type: integer example: 1 brackets: type: array items: type: object properties: leverage: type: integer example: 10 maxDebt: type: number format: double example: 1000000.00000000 maintenanceMarginRate: type: number format: double example: 0.02000000 initialMarginRate: type: number format: double example: 0.1112 fastNum: type: number format: double example: 60000.000 required: - leverage - maxDebt - maintenanceMarginRate - initialMarginRate - fastNum required: - assetNames - rank - brackets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/system/status: get: summary: System Status (System) description: |- Fetch system status. Weight(IP): 1 tags: - Wallet responses: '200': description: OK content: application/json: schema: type: object properties: status: type: integer format: int32 example: 0 description: "0: normal, 1:system maintenance" msg: type: string example: "normal" description: '"normal", "system_maintenance"' required: - status - msg /sapi/v1/capital/config/getall: get: summary: All Coins' Information (USER_DATA) description: |- Get information of coins (available for deposit and withdraw) for user. Weight(IP): 10 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: All coins details information content: application/json: schema: type: array items: type: object properties: coin: type: string example: "BTC" depositAllEnable: type: boolean free: type: string example: "0.00000000" freeze: type: string example: "0.00000000" ipoable: type: string example: "0.00000000" ipoing: type: string example: "0.00000000" isLegalMoney: type: boolean example: false locked: type: string example: "0.00000000" name: type: string example: "Bitcoin" networkList: type: array items: type: object properties: addressRegex: type: string example: "^(bnb1)[0-9a-z]{38}$" coin: type: string example: "BTC" depositDesc: type: string example: "Wallet Maintenance, Deposit Suspended" description: 'shown only when "depositEnable" is false.' depositEnable: type: boolean example: false isDefault: type: boolean example: false memoRegex: type: string example: "^[0-9A-Za-z\\-_]{1,120}$" minConfirm: type: integer format: int64 example: 1 description: 'min number for balance confirmation.' name: type: string example: "BEP2" network: type: string example: "ETH" specialTips: type: string example: "Both a MEMO and an Address are required to successfully deposit your BEP2-BTCB tokens to Binance." unLockConfirm: type: integer format: int64 example: 0 description: 'confirmation number for balance unlock.' withdrawDesc: type: string example: "Wallet Maintenance, Withdrawal Suspended" description: 'shown only when "withdrawEnable" is false' withdrawEnable: type: boolean example: false withdrawFee: type: string example: "0.00000220" withdrawIntegerMultiple: type: string example: "0.00000001" withdrawMax: type: string example: "9999999999.99999999" withdrawMin: type: string example: "0.00000440" sameAddress: type: boolean required: - addressRegex - coin - depositDesc - depositEnable - isDefault - memoRegex - minConfirm - name - network - specialTips - unLockConfirm - withdrawDesc - withdrawEnable - withdrawFee - withdrawIntegerMultiple - withdrawMax - withdrawMin - sameAddress storage: type: string example: "0.00000000" trading: type: boolean withdrawAllEnable: type: boolean withdrawing: type: string example: "0.00000000" required: - coin - depositAllEnable - free - freeze - ipoable - ipoing - isLegalMoney - locked - name - networkList - storage - trading - withdrawAllEnable - withdrawing '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/accountSnapshot: get: summary: Daily Account Snapshot (USER_DATA) description: |- - The query time period must be less than 30 days - Support query within the last one month only - If startTimeand endTime not sent, return records of the last 7 days by default Weight(IP): 2400 tags: - Wallet parameters: - name: type in: query required: true schema: type: string enum: [SPOT, MARGIN, FUTURES] - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int32 default: 7 minimum: 7 maximum: 30 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account Snapshot content: application/json: schema: oneOf: - $ref: '#/components/schemas/snapshotSpot' - $ref: '#/components/schemas/snapshotMargin' - $ref: '#/components/schemas/snapshotFutures' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/disableFastWithdrawSwitch: post: summary: Disable Fast Withdraw Switch (USER_DATA) description: |- - This request will disable fastwithdraw switch under your account. - You need to enable "trade" option for the api key which requests this endpoint. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/enableFastWithdrawSwitch: post: summary: Enable Fast Withdraw Switch (USER_DATA) description: |- - This request will enable fastwithdraw switch under your account. You need to enable "trade" option for the api key which requests this endpoint. - When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/withdraw/apply: post: summary: Withdraw (USER_DATA) description: |- Submit a withdraw request. - If `network` not send, return with default network of the coin. - You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - name: withdrawOrderId in: query description: Client id for withdraw schema: type: string - $ref: '#/components/parameters/network' - name: address in: query required: true schema: type: string - name: addressTag in: query description: Secondary address identifier for coins like XRP,XMR etc. schema: type: string - $ref: '#/components/parameters/amount' - name: transactionFeeFlag in: query description: |- When making internal transfer - `true` -> returning the fee to the destination account; - `false` -> returning the fee back to the departure account. schema: type: boolean default: false - name: name in: query schema: type: string - name: walletType in: query description: The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transafer Id content: application/json: schema: type: object properties: id: type: string example: "7213fea8e94b4a5593d507237e5a555b" required: - id '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/hisrec: get: summary: Deposit History(supporting network) (USER_DATA) description: |- Fetch deposit history. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalCoin' - name: status in: query description: |- * `0` - pending * `6` - credited but cannot withdraw * `1` - success schema: type: integer format: int32 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of deposits content: application/json: schema: type: array items: type: object properties: amount: type: string example: "0.00999800" coin: type: string example: "PAXG" network: type: string example: "ETH" status: type: integer format: int32 example: 1 address: type: string example: "0x788cabe9236ce061e5a892e1a59395a81fc8d62c" addressTag: type: string example: "" txId: type: string example: "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3" insertTime: type: integer format: int64 example: 1599621997000 transferType: type: integer format: int32 example: 0 unlockConfirm: type: string example: "12/12" description: confirm times for unlocking confirmTimes: type: string example: "12/12" required: - amount - coin - network - status - address - addressTag - txId - insertTime - transferType - unlockConfirm - confirmTimes '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/withdraw/history: get: summary: Withdraw History (supporting network) (USER_DATA) description: |- Fetch withdraw history. This endpoint specifically uses per second UID rate limit, user's total second level IP rate limit is 180000/second. Response from the endpoint contains header key X-SAPI-USED-UID-WEIGHT-1S, which defines weight used by the current IP. - `network` may not be in the response for old withdraw. - Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days. - If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 90 days - If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days. - If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default. Weight(UID): 18000 Request Limit: 10 requests per second tags: - Wallet parameters: - $ref: '#/components/parameters/optionalCoin' - name: withdrawOrderId in: query schema: type: string - name: status in: query description: |- * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed schema: type: integer format: int32 minimum: 0 maximum: 6 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of withdraw history content: application/json: schema: type: array items: type: object properties: address: type: string example: "0x94df8b352de7f46f64b01d3666bf6e936e44ce60" amount: type: string example: "8.91000000" applyTime: type: string example: "2019-10-12 11:12:02" coin: type: string example: "USDT" id: type: string example: "b6ae22b3aa844210a7041aee7589627c" withdrawOrderId: type: string example: "WITHDRAWtest123" description: will not be returned if there's no withdrawOrderId for this withdraw. network: type: string example: "ETH" transferType: type: integer format: int32 example: 0 description: "1 for internal transfer, 0 for external transfer" status: type: integer format: int32 example: 6 transactionFee: type: string example: "0.004" confirmNo: type: integer format: int32 example: 3 info: type: string example: "The address is not valid. Please confirm with the recipient" description: Reason for withdrawal failure txId: type: string example: "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268" required: - address - amount - applyTime - coin - id - withdrawOrderId - network - transferType - status - transactionFee - txId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/address: get: summary: Deposit Address (supporting network) (USER_DATA) description: |- Fetch deposit address with network. - If network is not send, return with default network of the coin. - You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256). Weight(IP): 10 tags: - Wallet parameters: - $ref: '#/components/parameters/coin' - $ref: '#/components/parameters/network' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Deposit address info content: application/json: schema: type: object properties: address: type: string example: "1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv" coin: type: string example: "BTC" tag: type: string example: "" url: type: string example: "https://btc.com/1HPn8Rx2y6nNSfagQBKy27GB99Vbzg89wv" required: - address - coin - tag - url '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/status: get: summary: Account Status (USER_DATA) description: |- Fetch account status detail. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object properties: data: type: string example: "Normal" required: - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/apiTradingStatus: get: summary: Account API Trading Status (USER_DATA) description: |- Fetch account API trading status with details. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account API trading status content: application/json: schema: type: object properties: data: type: object properties: isLocked: type: boolean example: false description: API trading function is locked or not plannedRecoverTime: type: integer format: int64 example: 0 description: If API trading function is locked, this is the planned recover time triggerCondition: type: object properties: GCR: type: integer format: int64 example: 150 description: Number of GTC orders IFER: type: integer format: int64 example: 150 description: Number of FOK/IOC orders UFR: type: integer format: int64 example: 300 description: Number of orders required: - GCR - IFER - UFR indicators: description: The indicators updated every 30 seconds type: object properties: BTCUSDT: type: array items: type: object properties: i: type: string example: "UFR" description: Unfilled Ratio (UFR) c: type: integer format: int64 example: 20 description: Count of all orders v: type: number format: float example: 0.05 description: Current UFR value t: type: number format: float example: 0.99 description: Trigger UFR value required: - i - c - v - t required: - BTCUSDT updateTime: type: integer format: int64 example: 1547630471725 required: - isLocked - plannedRecoverTime - triggerCondition - indicators - updateTime required: - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/dribblet: get: summary: DustLog(USER_DATA) description: 'Weight(IP): 1' tags: - Wallet parameters: - name: accountType in: query required: false description: SPOT or MARGIN, default SPOT schema: type: string enum: [SPOT, MARGIN] - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dust log records content: application/json: schema: type: object properties: total: description: Total counts of exchange type: integer format: int64 example: 8 userAssetDribblets: type: array items: type: object properties: operateTime: type: integer format: int64 example: 1615985535000 totalTransferedAmount: type: string example: "0.00132256" description: Total transfered BNB amount for this exchange. totalServiceChargeAmount: type: string example: "0.00002699" description: Total service charge amount for this exchange. transId: type: integer format: int64 example: 45178372831 userAssetDribbletDetails: type: array items: type: object properties: transId: type: integer format: int64 example: 4359321 serviceChargeAmount: type: string example: "0.000009" amount: type: string example: "0.0009" operateTime: type: integer format: int64 example: 1615985535000 transferedAmount: type: string example: "0.000441" fromAsset: type: string example: "USDT" required: - transId - serviceChargeAmount - amount - operateTime - transferedAmount - fromAsset required: - operateTime - totalTransferedAmount - totalServiceChargeAmount - transId - userAssetDribbletDetails required: - total - userAssetDribblets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/dust-btc: post: summary: Get Assets That Can Be Converted Into BNB (USER_DATA) description: 'Weight(IP): 1' tags: - Wallet parameters: - name: accountType in: query required: false description: SPOT or MARGIN, default SPOT schema: type: string enum: [SPOT, MARGIN] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account assets available to be converted to BNB content: application/json: schema: type: object properties: details: type: array items: type: object properties: asset: type: string example: "ADA" assetFullName: type: string example: "ADA" amountFree: type: string example: "6.21" description: "Convertible amount" toBTC: type: string example: "0.00016848" description: "BTC amount" toBNB: type: string example: "0.01777302" description: "BNB amount(Not deducted commission fee" toBNBOffExchange: type: string example: "0.01741756" description: "BNB amount(Deducted commission fee" exchange: type: string example: "0.00035546" description: "Commission fee" required: - asset - assetFullName - amountFree - toBTC - toBNB - toBNBOffExchange - exchange totalTransferBtc: type: string example: "0.00016848" totalTransferBNB: type: string example: "0.01777302" dribbletPercentage: type: string example: "0.02" description: "Commission fee" required: - details - totalTransferBtc - totalTransferBNB - dribbletPercentage '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/dust: post: summary: Dust Transfer (USER_DATA) description: |- Convert dust assets to BNB. Weight(UID): 10 tags: - Wallet parameters: - name: asset in: query required: true description: The asset being converted. For example, asset=BTC&asset=USDT schema: type: array items: type: string - name: accountType in: query required: false description: SPOT or MARGIN, default SPOT schema: type: string enum: [SPOT, MARGIN] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dust log records content: application/json: schema: type: object properties: totalServiceCharge: type: string example: "0.02102542" totalTransfered: type: string example: "1.05127099" transferResult: type: array items: type: object properties: amount: type: string example: "0.03000000" fromAsset: type: string example: "ETH" operateTime: type: integer format: int64 example: 1563368549307 serviceChargeAmount: type: string example: "0.00500000" tranId: type: integer format: int64 example: 2970932918 transferedAmount: type: string example: "0.25000000" required: - amount - fromAsset - operateTime - serviceChargeAmount - tranId - transferedAmount required: - totalServiceCharge - totalTransfered - transferResult '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/assetDividend: get: summary: Asset Dividend Record (USER_DATA) description: |- Query asset Dividend Record Weight(IP): 10 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int32 default: 20 maximum: 500 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Records of asset devidend content: application/json: schema: type: object properties: rows: type: array items: type: object properties: id: type: integer format: int64 example: 242006910 amount: type: string example: "10.00000000" asset: type: string example: "BHFT" divTime: type: integer format: int64 example: 1563189166000 enInfo: type: string example: "BHFT distribution" tranId: type: integer format: int64 example: 2968885920 required: - id - amount - asset - divTime - enInfo - tranId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/assetDetail: get: summary: Asset Detail (USER_DATA) description: |- Fetch details of assets supported on Binance. - Please get network and other deposit or withdraw details from `GET /sapi/v1/capital/config/getall`. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset detail content: application/json: schema: type: object properties: CTR: type: object properties: minWithdrawAmount: type: string example: "70.00000000" depositStatus: type: boolean example: false description: deposit status (false if ALL of networks' are false) withdrawFee: type: integer format: int64 example: 35 withdrawStatus: type: boolean description: withdrawStatus status (false if ALL of networks' are false) depositTip: type: string example: "Delisted, Deposit Suspended" required: - minWithdrawAmount - depositStatus - withdrawFee - withdrawStatus - depositTip required: - CTR '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/tradeFee: get: summary: Trade Fee (USER_DATA) description: |- Fetch trade fee Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Trade fee info per symbol content: application/json: schema: type: array items: type: object properties: symbol: type: string example: "ADABNB" makerCommission: type: string example: "0.001" takerCommission: type: string example: "0.001" required: - symbol - makerCommission - takerCommission '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/transfer: get: summary: Query User Universal Transfer History (USER_DATA) description: |- - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - Support query within the last 6 months only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/univTransferType' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/fromSymbol' - $ref: '#/components/parameters/toSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Universal transfer history content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: asset: type: string example: "USDT" amount: type: string example: "1" type: type: string example: "MAIN_UMFUTUR" status: type: string example: "CONFIRMED" tranId: type: integer format: int64 example: 11415955596 timestamp: type: integer format: int64 example: 1544433328000 required: - asset - amount - type - status - tranId - timestamp required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: summary: User Universal Transfer (USER_DATA) description: |- You need to enable `Permits Universal Transfer` option for the api key which requests this endpoint. - `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN - `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN ENUM of transfer types: - MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account - MAIN_CMFUTURE Spot account transfer to COIN-M Futures account - MAIN_MARGIN Spot account transfer to Margin(cross)account - UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account - UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account - CMFUTURE_MAIN COIN-M Futures account transfer to Spot account - CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account - MARGIN_MAIN Margin(cross)account transfer to Spot account - MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures - MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures - ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account - MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account - ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account - MAIN_FUNDING Spot account transfer to Funding account - FUNDING_MAIN Funding account transfer to Spot account - FUNDING_UMFUTURE Funding account transfer to UMFUTURE account - UMFUTURE_FUNDING UMFUTURE account transfer to Funding account - MARGIN_FUNDING MARGIN account transfer to Funding account - FUNDING_MARGIN Funding account transfer to Margin account - FUNDING_CMFUTURE Funding account transfer to CMFUTURE account - CMFUTURE_FUNDING CMFUTURE account transfer to Funding account - MAIN_OPTION Spot account transfer to Options account - OPTION_MAIN Options account transfer to Spot account - UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account - OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account - MARGIN_OPTION Margin(cross)account transfer to Options account - OPTION_MARGIN Options account transfer to Margin(cross)account - FUNDING_OPTION Funding account transfer to Options account - OPTION_FUNDING Options account transfer to Funding account - MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account - PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account - MAIN_ISOLATED_MARGIN Spot account transfer to Isolated margin account - ISOLATED_MARGIN_MAIN Isolated margin account transfer to Spot account Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/univTransferType' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/fromSymbol' - $ref: '#/components/parameters/toSymbol' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 13526853623 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/get-funding-asset: post: summary: Funding Wallet (USER_DATA) description: |- - Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/needBtcValuation' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Funding asset detail content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" free: type: string example: "1" locked: type: string example: "0" freeze: type: string example: "0" withdrawing: type: string example: "0" btcValuation: type: string example: "0.00000091" required: - asset - free - locked - freeze - withdrawing - btcValuation '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v3/asset/getUserAsset: post: summary: User Asset (USER_DATA) description: |- Get user assets, just for positive data. Weight(IP): 5 tags: - Wallet parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/needBtcValuation' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: User assets content: application/json: schema: type: array items: type: object properties: asset: type: string example: AVAX free: type: string example: '1' locked: type: string example: '0' freeze: type: string example: '0' withdrawing: type: string example: '0' ipoable: type: string example: '0' btcValuation: type: string example: '0' required: - asset - free - locked - freeze - withdrawing - ipoable - btcValuation '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/convert-transfer: post: summary: Convert Transfer (USER_DATA) description: |- Convert transfer, convert between BUSD and stablecoins. If the clientId has been used before, will not do the convert transfer, the original transfer will be returned. Weight(UID): 5 tags: - Wallet parameters: - name: clientTranId in: query description: The unique flag, the min length is 20 required: true schema: type: string - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: targetAsset in: query description: Target asset you want to convert required: true schema: type: string example: "BNB" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Conversion Information content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 118263407119 status: type: string example: "S" required: - tranId - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/convert-transfer/queryByPage: get: summary: Query Convert Transfer (USER_DATA) description: |- Weight(UID): 5 tags: - Wallet parameters: - name: tranId in: query description: The transaction id required: false schema: type: integer format: int64 example: 118263615991 - name: asset in: query required: false description: If it is blank, we will match deducted asset and target asset. schema: type: string example: "BTC" - name: startTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - name: endTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - name: accountType in: query description: "MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet" schema: type: string enum: ['MAIN', 'CARD'] - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Query Convert Transfer content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: tranId: type: integer format: int64 example: 118263407119 type: type: integer format: int64 example: 244 time: type: integer format: int64 example: 1664442078000 deductedAsset: type: string example: "BUSD" deductedAmount: type: string example: "1" targetAsset: type: string example: "USDC" targetAmount: type: string example: "1" status: type: string example: "S" accountType: type: string example: "MAIN" required: - tranId - type - time - deductedAsset - deductedAmount - targetAsset - targetAmount - status - accountType required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage: get: summary: Get Cloud-Mining payment and refund history (USER_DATA) description: |- The query of Cloud-Mining payment and refund history Weight(UID): 600 tags: - Wallet parameters: - name: tranId in: query description: The transaction id required: false schema: type: integer format: int64 example: 118263615991 - name: clientTranId in: query description: The unique flag required: false schema: type: string - name: asset in: query required: false description: If it is blank, we will query all assets schema: type: string example: "BTC" - name: startTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - name: endTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cloud Mining Payment and Refund History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: createTime: type: integer format: int64 example: 1667880112000 tranId: type: integer format: int64 example: 121230610120 type: type: integer format: int64 example: 248 asset: type: string example: "USDT" amount: type: string example: "1" status: type: string example: "S" required: - createTime - tranId - type - asset - amount - status required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/account/apiRestrictions: get: summary: Get API Key Permission (USER_DATA) description: 'Weight(IP): 1' tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: API Key permissions content: application/json: schema: type: object properties: ipRestrict: type: boolean example: false createTime: type: integer format: int64 example: 1623840271000 enableInternalTransfer: type: boolean description: This option authorizes this key to transfer funds between your master account and your sub account instantly enableFutures: type: boolean example: false description: API Key created before your futures account opened does not support futures API service enablePortfolioMarginTrading: type: boolean example: false description: API Key created before your activate portfolio margin does not support portfolio margin API service enableVanillaOptions: type: boolean example: false description: Authorizes this key to Vanilla options trading permitsUniversalTransfer: type: boolean description: Authorizes this key to be used for a dedicated universal transfer API to transfer multiple supported currencies. Each business's own transfer API rights are not affected by this authorization enableReading: type: boolean example: true enableSpotAndMarginTrading: type: boolean example: false enableWithdrawals: type: boolean example: false description: This option allows you to withdraw via API. You must apply the IP Access Restriction filter in order to enable withdrawals enableMargin: type: boolean example: false description: This option can be adjusted after the Cross Margin account transfer is completed tradingAuthorityExpirationTime: type: integer format: int64 example: 1628985600000 description: Expiration time for spot and margin trading permission required: - ipRestrict - createTime - enableWithdrawals - enableInternalTransfer - permitsUniversalTransfer - enableVanillaOptions - enableReading - enableFutures - enableMargin - enableSpotAndMarginTrading - tradingAuthorityExpirationTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/contract/convertible-coins: get: summary: Query auto-converting stable coins (USER_DATA) description: |- Get a user's auto-conversion settings in deposit/withdrawal Weight(UID): 600' tags: - Wallet security: - ApiKeyAuth: [] responses: '200': description: User's auto-conversion settings i content: application/json: schema: type: object properties: convertEnabled: type: boolean coins: type: array items: type: string example: "USDC" exchangeRates: type: object properties: USDC: type: string example: "1" TUSD: type: string example: "1" USDP: type: string example: "1" required: - USDC - TUSD - USDP required: - convertEnabled - coins - exchangeRates '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: summary: Switch on/off BUSD and stable coins conversion (USER_DATA) (USER_DATA) description: |- User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin. Weight(UID): 600' tags: - Wallet parameters: - name: coin in: query required: true description: "Must be USDC, USDP or TUSD" schema: type: string - name: enable in: query required: true description: "true: turn on the auto-conversion. false: turn off the auto-conversion" schema: type: boolean security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/virtualSubAccount: post: summary: Create a Virtual Sub-account(For Master Account) description: |- - This request will generate a virtual sub account under your master account. - You need to enable "trade" option for the api key which requests this endpoint. Weight(IP): 1 tags: - Sub-Account parameters: - name: subAccountString in: query description: Please input a string. We will create a virtual email using that string for you to register required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Return the created virtual email content: application/json: schema: type: object properties: email: type: string example: "addsdd_virtual@aasaixwqnoemail.com" required: - email '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/list: get: summary: Query Sub-account List (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountEmail' - name: isFreeze in: query schema: type: string enum: ['true', 'false'] - $ref: '#/components/parameters/page' - name: limit in: query description: Default 1; max 200 schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of sub-accounts content: application/json: schema: type: object properties: subAccounts: type: array items: type: object properties: email: type: string example: "testsub@gmail.com" isFreeze: type: boolean example: false createTime: type: integer format: int64 example: 1544433328000 isManagedSubAccount: type: boolean example: false isAssetManagementSubAccount: type: boolean example: false required: - email - isFreeze - createTime - isManagedSubAccount - isAssetManagementSubAccount required: - subAccounts '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/sub/transfer/history: get: summary: Sub-account Spot Asset Transfer History (For Master Account) description: |- - fromEmail and toEmail cannot be sent at the same time. - Return fromEmail equal master account email by default. Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountFromEmail' - $ref: '#/components/parameters/optionalSubAccountToEmail' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - name: limit in: query description: Default 1 schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub-account Spot Asset Transfer History content: application/json: schema: type: array items: type: object properties: from: type: string example: aaa@test.com to: type: string example: bbb@test.com asset: type: string example: BTC qty: type: string example: 10 status: type: string example: SUCCESS tranId: type: integer format: int64 example: 6489943656 time: type: integer format: int64 example: 1544433328000 required: - from - to - asset - qty - status - tranId - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/internalTransfer: get: summary: Sub-account Futures Asset Transfer History (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: futuresType in: query description: '1:USDT-margined Futures, 2: Coin-margined Futures' required: true schema: type: integer format: int32 example: 2 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - name: limit in: query description: 'Default value: 50, Max value: 500' schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub-account Futures Asset Transfer History content: application/json: schema: type: object properties: success: type: boolean futuresType: type: integer format: int32 example: 2 transfers: type: array items: type: object properties: from: type: string example: "aaa@test.com" to: type: string example: "bbb@test.com" asset: type: string example: "BTC" qty: type: string example: "1" tranId: type: integer format: int64 example: 11897001102 time: type: integer format: int64 example: 1544433328000 required: - from - to - asset - qty - tranId - time required: - success - futuresType - transfers '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: summary: Sub-account Futures Asset Transfer (For Master Account) description: |- - Master account can transfer max 2000 times a minute Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountFromEmail' - $ref: '#/components/parameters/subAccountToEmail' - name: futuresType in: query required: true description: '1:USDT-margined Futures,2: Coin-margined Futures' schema: type: integer format: int32 example: 2 - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Asset Transfer Info content: application/json: schema: type: object properties: success: type: boolean txnId: type: string example: "2934662589" required: - success - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v3/sub-account/assets: get: summary: Sub-account Assets (For Master Account) description: |- Fetch sub-account assets Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of assets balances content: application/json: schema: type: object properties: balances: type: array items: type: object properties: asset: type: string example: "ADA" free: type: integer format: int64 example: 10000 locked: type: integer format: int64 example: 0 required: - asset - free - locked required: - balances '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/spotSummary: get: summary: Sub-account Spot Assets Summary (For Master Account) description: |- Get BTC valued asset summary of subaccounts. Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountEmail' - $ref: '#/components/parameters/page' - name: size in: query description: Default:10 Max:20 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Summary of Sub-account Spot Assets content: application/json: schema: type: object properties: totalCount: type: integer format: int64 example: 1 masterAccountTotalAsset: type: string example: "0.23231201" spotSubUserAssetBtcVoList: type: array items: type: object properties: email: type: string example: "sub123@test.com" totalAsset: type: string example: "9999.00000000" required: - email - totalAsset required: - totalCount - masterAccountTotalAsset - spotSubUserAssetBtcVoList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/subAddress: get: summary: Sub-account Spot Assets Summary (For Master Account) description: |- Fetch sub-account deposit address Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/coin' - $ref: '#/components/parameters/network' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Deposit address info content: application/json: schema: type: object properties: address: type: string example: "TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV" coin: type: string example: "USDT" tag: type: string example: "" url: type: string example: "https://tronscan.org/#/address/TDunhSa7jkTNuKrusUTU1MUHtqXoBPKETV" required: - address - coin - tag - url '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/subHisrec: get: summary: Sub-account Deposit History (For Master Account) description: |- Fetch sub-account deposit history Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/optionalCoin' - name: status in: query description: '0(0:pending,6: credited but cannot withdraw, 1:success)' schema: type: integer format: int32 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int64 - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub-account deposit history content: application/json: schema: type: array items: type: object properties: amount: type: string example: "0.00999800" coin: type: string example: "PAXG" network: type: string example: "ETH" status: type: integer format: int32 example: 1 address: type: string example: "0x788cabe9236ce061e5a892e1a59395a81fc8d62c" addressTag: type: string example: "" txId: type: string example: "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3" insertTime: type: integer format: int64 example: 1599621997000 transferType: type: integer format: int32 example: 0 confirmTimes: type: string example: "12/12" required: - amount - coin - network - status - address - addressTag - txId - insertTime - transferType - confirmTimes '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/credit-apply: post: summary: One click arrival deposit apply (USER_DATA) description: |- Apply deposit credit for expired address (One click arrival) Weight(IP): 1 tags: - Wallet parameters: - name: depositId in: query description: Deposit record Id, priority use schema: type: integer format: int64 - name: txId in: query description: Deposit txId, used when depositId is not specified schema: type: string - name: subAccountId in: query schema: type: integer format: int64 - name: subUserId in: query schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: deposit result content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: boolean example: true success: type: boolean example: true required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/wallet/balance: get: summary: Query User Wallet Balance (USER_DATA) description: |- Query User Wallet Balance Weight(IP): 60 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: wallet balance content: application/json: schema: type: array items: type: object properties: activate: type: boolean example: true balance: type: string example: "0" walletName: type: string example: "Spot" required: - activate - balance - walletName '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/asset/custody/transfer-history: get: summary: Query User Delegation History(For Master Account) (USER_DATA) description: |- Query User Delegation History Weight(IP): 60 tags: - Wallet parameters: - name: email in: query required: true schema: type: string example: "alice@test.com" - name: startTime in: query required: true schema: type: integer format: int64 example: 1695205406000 - name: endTime in: query required: true schema: type: integer format: int64 example: 1695205396000 - name: type in: query schema: type: string example: "Delegate" - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Delegation History content: application/json: schema: type: object properties: total: type: integer example: 3316 rows: type: array items: type: object properties: clientTranId: type: string example: "293915932290879488" transferType: type: string example: "Undelegate" asset: type: string example: "ETH" amount: type: string example: "1" time: type: integer format: int64 example: 1695205406000 required: - clientTranId - transferType - asset - amount - time required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/deposit/address/list: get: summary: Fetch deposit address list with network (USER_DATA) description: |- Fetch deposit address list with network. Weight(IP): 10 tags: - Wallet parameters: - name: coin in: query required: true schema: type: string example: "BTC" - name: network in: query schema: type: string example: "BTC" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Coin address content: application/json: schema: type: array items: type: object properties: coin: type: string example: "ETH" address: type: string example: "0xD316E95Fd9E8E237Cb11f8200Babbc5D8D177BA4" isDefault: type: integer format: int32 example: 1 required: - coin - address - isDefault '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/spot/delist-schedule: get: summary: Get symbols delist schedule for spot (MARKET_DATA) description: |- Get symbols delist schedule for spot Weight(IP): 100 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Symbols delist schedule content: application/json: schema: type: array items: type: object properties: delistTime: type: integer format: int64 example: 1686161202000 symbol: type: array items: type: string example: - "ADAUSDT" - "BNBUSDT" required: - delistTime - symbol '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/capital/withdraw/address/list: get: summary: Fetch withdraw address list (USER_DATA) description: |- Fetch withdraw address list Weight(IP): 10 tags: - Wallet security: - ApiKeyAuth: [] responses: '200': description: Withdraw address list content: application/json: schema: type: array items: type: object properties: address: type: string example: "0xD316E95Fd9E8E237Cb11f8200Babbc5D8D177BA4" addressTag: type: string example: "101764890" coin: type: string example: "BNB" name: type: string example: "" network: type: string example: "BNB" origin: type: string example: "" originType: type: string example: "" whiteStatus: type: boolean example: true required: - address - addressTag - coin - name - network - origin - originType - whiteStatus '400': description: 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/info: get: summary: Account info (USER_DATA) description: |- Fetch account info detail. Weight(IP): 1 tags: - Wallet parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account info detail content: application/json: schema: type: object properties: vipLevel: type: integer format: int32 example: 0 isMarginEnabled: type: boolean description: true or false for margin. example: true isFutureEnabled: type: boolean description: true or false for futures. example: true required: - vipLevel - isMarginEnabled - isFutureEnabled '400': description: 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(IP): 10 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Status on Margin/Futures content: application/json: schema: type: array items: type: object properties: email: type: string example: "123@test.com" isSubUserEnabled: type: boolean isUserActive: type: boolean insertTime: type: integer format: int64 example: 1570791523523 description: sub account create time isMarginEnabled: type: boolean isFutureEnabled: type: boolean mobile: type: integer format: int64 example: 1570791523523 description: user mobile number required: - email - isSubUserEnabled - isUserActive - insertTime - isMarginEnabled - isFutureEnabled - mobile '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/enable: post: summary: Enable Margin for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin status content: application/json: schema: type: object properties: email: type: string example: "123@test.com" isMarginEnabled: type: boolean required: - email - isMarginEnabled '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/account: get: summary: Detail on Sub-account's Margin Account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin sub-account details content: application/json: schema: type: object properties: email: type: string example: "123@test.com" marginLevel: type: string example: "11.64405625" totalAssetOfBtc: type: string example: "6.82728457" totalLiabilityOfBtc: type: string example: "0.58633215" totalNetAssetOfBtc: type: string example: "6.24095242" marginTradeCoeffVo: type: object properties: forceLiquidationBar: type: string example: "1.10000000" description: Liquidation margin ratio marginCallBar: type: string example: "1.50000000" description: Margin call margin ratio normalBar: type: string example: "2.00000000" description: Initial margin ratio required: - forceLiquidationBar - marginCallBar - normalBar marginUserAssetVoList: type: array items: type: object properties: asset: type: string example: "BTC" borrowed: type: string example: "0.00000000" free: type: string example: "0.00499500" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00499500" required: - asset - borrowed - free - interest - locked - netAsset required: - email - marginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - marginTradeCoeffVo - marginUserAssetVoList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/accountSummary: get: summary: Summary of Sub-account's Margin Account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Margin sub-account details content: application/json: schema: type: object properties: totalAssetOfBtc: type: string example: "4.33333333" totalLiabilityOfBtc: type: string example: "2.11111112" totalNetAssetOfBtc: type: string example: "2.22222221" subAccountList: type: array items: type: object properties: email: type: string example: "123@test.com" totalAssetOfBtc: type: string example: "2.11111111" totalLiabilityOfBtc: type: string example: "1.11111111" totalNetAssetOfBtc: type: string example: "1.00000000" required: - email - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc required: - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - subAccountList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/enable: post: summary: Enable Futures for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures status content: application/json: schema: type: object properties: email: type: string example: "123@test.com" isFuturesEnabled: type: boolean required: - email - isFuturesEnabled '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/account: get: summary: Detail on Sub-account's Futures Account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - name: email in: query required: true schema: type: string example: alice@test.com - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures account details content: application/json: schema: type: object properties: email: type: string example: "abc@test.com" asset: type: string example: "USDT" assets: type: array items: type: object properties: asset: type: string example: "USDT" initialMargin: type: string example: "0.00000000" maintenanceMargin: type: string example: "0.00000000" marginBalance: type: string example: "0.88308000" maxWithdrawAmount: type: string example: "0.88308000" openOrderInitialMargin: type: string example: "0.00000000" positionInitialMargin: type: string example: "0.00000000" unrealizedProfit: type: string example: "0.00000000" walletBalance: type: string example: "0.88308000" required: - asset - initialMargin - maintenanceMargin - marginBalance - maxWithdrawAmount - openOrderInitialMargin - positionInitialMargin - unrealizedProfit - walletBalance canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer format: int64 example: 2 maxWithdrawAmount: type: string example: "0.88308000" totalInitialMargin: type: string example: "0.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "0.88308000" totalOpenOrderInitialMargin: type: string example: "0.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "0.88308000" updateTime: type: integer format: int64 example: 1576756674610 required: - email - asset - assets - canDeposit - canTrade - canWithdraw - feeTier - maxWithdrawAmount - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - updateTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/accountSummary: get: summary: Summary of Sub-account's Futures Account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures account summary content: application/json: schema: type: object properties: totalInitialMargin: type: string example: "9.83137400" totalMaintenanceMargin: type: string example: "0.41568700" totalMarginBalance: type: string example: "23.03235621" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.83137400" totalUnrealizedProfit: type: string example: "0.03219710" totalWalletBalance: type: string example: "22.15879444" asset: type: string example: "USD" subAccountList: type: array items: type: object properties: email: type: string example: "123@test.com" totalInitialMargin: type: string example: "9.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "22.12659734" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "22.12659734" asset: type: string example: "USD" required: - email - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset required: - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset - subAccountList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/positionRisk: get: summary: Futures Position-Risk of Sub-account (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures account summary content: application/json: schema: type: array items: type: object properties: entryPrice: type: string example: "9975.12000" leverage: type: string example: "50" description: current initial leverage maxNotional: type: string example: "1000000" description: notional value limit of current initial leverage liquidationPrice: type: string example: "7963.54" markPrice: type: string example: "9973.50770517" positionAmount: type: string example: "0.010" symbol: type: string example: "BTCUSDT" unrealizedProfit: type: string example: "-0.01612295" required: - entryPrice - leverage - maxNotional - liquidationPrice - markPrice - positionAmount - symbol - unrealizedProfit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/futures/transfer: post: summary: Transfer for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query description: |- * `1` - transfer from subaccount's spot account to its USDT-margined futures account * `2` - transfer from subaccount's USDT-margined futures account to its spot account * `3` - transfer from subaccount's spot account to its COIN-margined futures account * `4` - transfer from subaccount's COIN-margined futures account to its spot account required: true schema: type: integer format: int32 minimum: 1 maximum: 4 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/margin/transfer: post: summary: Margin Transfer for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query description: |- * `1` - transfer from subaccount's spot account to margin account * `2` - transfer from subaccount's margin account to its spot account required: true schema: type: integer format: int32 minimum: 1 maximum: 2 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transfer/subToSub: post: summary: Transfer to Sub-account of Same Master (For Sub-account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountToEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transfer/subToMaster: post: summary: Transfer to Master (For Sub-account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: txnId: type: string example: "2966662589" required: - txnId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transfer/subUserHistory: get: summary: Sub-account Transfer History (For Sub-account) description: |- - If `type` is not sent, the records of type 2: transfer out will be returned by default. - If `startTime` and `endTime` are not sent, the recent 30-day data will be returned. Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalAsset' - name: type in: query description: |- * `1` - transfer in * `2` - transfer out schema: type: integer format: int32 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: array items: type: object properties: counterParty: type: string example: "master" email: type: string example: "master@test.com" type: type: integer format: int32 example: 1 description: 1 for transfer in, 2 for transfer out asset: type: string example: "BTC" qty: type: string example: "1" fromAccountType: type: string example: "SPOT" toAccountType: type: string example: "SPOT" status: type: string example: "SUCCESS" tranId: type: integer format: int64 example: 11798835829 time: type: integer format: int64 example: 1544433325000 required: - counterParty - email - type - asset - qty - fromAccountType - toAccountType - status - tranId - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/universalTransfer: get: summary: Universal Transfer History (For Master Account) description: |- - `fromEmail` and `toEmail` cannot be sent at the same time. - Return `fromEmail` equal master account email by default. - The query time period must be less then 30 days. - If startTime and endTime not sent, return records of the last 30 days by default. Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountFromEmail' - $ref: '#/components/parameters/optionalSubAccountToEmail' - $ref: '#/components/parameters/clientTranId' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - name: limit in: query description: Default 500, Max 500 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer History content: application/json: schema: type: array items: type: object properties: tranId: type: integer format: int64 example: 11945860693 fromEmail: type: string example: "master@test.com" toEmail: type: string example: "subaccount1@test.com" asset: type: string example: "BTC" amount: type: string example: "0.1" fromAccountType: type: string example: "SPOT" toAccountType: type: string example: "COIN_FUTURE" status: type: string example: "SUCCESS" createTimeStamp: type: integer format: int64 example: 1544433325000 clientTranId: type: string example: "11945860694" required: - tranId - fromEmail - toEmail - asset - amount - fromAccountType - toAccountType - status - createTimeStamp - clientTranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' post: summary: Universal Transfer (For Master Account) description: |- - You need to enable "internal transfer" option for the api key which requests this endpoint. - Transfer from master account by default if fromEmail is not sent. - Transfer to master account by default if toEmail is not sent. - Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN - Sub-account SPOT,USDT_FUTURE,COIN_FUTURE,MARGIN(Cross),ISOLATED_MARGIN transfer to master account SPOT - Transfer between two sub-account SPOT accounts Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/optionalSubAccountFromEmail' - $ref: '#/components/parameters/optionalSubAccountToEmail' - name: fromAccountType in: query required: true schema: type: string enum: ["SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN","ISOLATED_MARGIN"] - name: toAccountType in: query required: true schema: type: string enum: ["SPOT","USDT_FUTURE","COIN_FUTURE","MARGIN","ISOLATED_MARGIN"] - $ref: '#/components/parameters/clientTranId' - name: symbol in: query description: Only supported under ISOLATED_MARGIN type schema: type: string example: BNBUSDT - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 11945860693 clientTranId: type: string example: "11945860694" required: - tranId - clientTranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/futures/account: get: summary: Detail on Sub-account's Futures Account V2 (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: futuresType in: query description: |- * `1` - USDT Margined Futures * `2` - COIN Margined Futures required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: USDT or COIN Margined Futures Details content: application/json: schema: oneOf: - $ref: '#/components/schemas/subAccountUSDTFuturesDetails' - $ref: '#/components/schemas/subAccountCOINFuturesDetails' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/futures/accountSummary: get: summary: Summary of Sub-account's Futures Account V2 (For Master Account) description: 'Weight(IP): 10' tags: - Sub-Account parameters: - name: futuresType in: query description: |- * `1` - USDT Margined Futures * `2` - COIN Margined Futures required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/page' - name: limit in: query description: Default 10, Max 20 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: USDT or COIN Margined Futures Summary content: application/json: schema: oneOf: - $ref: '#/components/schemas/subAccountUSDTFuturesSummary' - $ref: '#/components/schemas/subAccountCOINFuturesSummary' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/futures/positionRisk: get: summary: Futures Position-Risk of Sub-account V2 (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: futuresType in: query description: |- * `1` - USDT Margined Futures * `2` - COIN Margined Futures required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: USDT or COIN Margined Futures Position Risk content: application/json: schema: oneOf: - $ref: '#/components/schemas/subAccountUSDTFuturesPositionRisk' - $ref: '#/components/schemas/subAccountCOINFuturesPositionRisk' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/blvt/enable: post: summary: Enable Leverage Token for Sub-account (For Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: enableBlvt in: query description: Only true for now required: true schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: BLVT status content: application/json: schema: type: object properties: email: type: string example: "123@test.com" enableBlvt: type: boolean required: - email - enableBlvt '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/deposit: post: summary: Deposit assets into the managed sub-account(For Investor Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountToEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 66157362489 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/asset: get: summary: Managed sub-account asset details(For Investor Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of asset details content: application/json: schema: type: array items: type: object properties: coin: type: string example: "INJ" name: type: string example: "Injective Protocol" totalBalance: type: string example: "0" availableBalance: type: string example: "0" inOrder: type: string example: "0" btcValue: type: string example: "0" required: - coin - name - totalBalance - availableBalance - inOrder - btcValue '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/withdraw: post: summary: Withdrawl assets from the managed sub-account(For Investor Master Account) description: 'Weight(IP): 1' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountFromEmail' - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: transferDate in: query description: Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transfer id content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 66157362489 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/accountSnapshot: get: summary: Managed sub-account snapshot (For Investor Master Account) description: |- - The query time period must be less then 30 days - Support query within the last one month only - If `startTime` and `endTime` not sent, return records of the last 7 days by default Weight(IP): 2400 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - name: type in: query required: true description: "\"SPOT\", \"MARGIN\"(cross), \"FUTURES\"(UM)" schema: type: string example: 'SPOT' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: min 7, max 30, default 7 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' responses: '200': description: Sub-account spot snapshot content: application/json: schema: type: object properties: code: type: integer format: int32 example: 200 msg: type: string example: '' snapshotVos: type: array items: type: object properties: data: type: object properties: balances: type: array items: type: object properties: asset: type: string example: BTC free: type: string example: '0.09905021' locked: type: string example: '0.00000000' required: - asset - free - locked totalAssetOfBtc: type: string example: '0.09942700' required: - balances - totalAssetOfBtc type: type: string example: spot updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/queryTransLogForInvestor: get: summary: Query Managed Sub Account Transfer Log (For Investor Master Account) description: |- Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team. Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - name: transfers in: query required: false description: Transfer Direction (FROM/TO) schema: type: string example: 'FROM' - name: transferFunctionAccountType in: query required: false description: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) schema: type: string example: 'SPOT' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub account transfer logs (for invest account) content: application/json: schema: type: object properties: count: type: integer format: int32 example: 2 managerSubTransferHistoryVos: type: array items: type: object properties: fromEmail: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" fromAccountType: type: string example: "SPOT" toEmail: type: string example: "wdywl0lddakh@test.com" toAccountType: type: string example: "SPOT" asset: type: string example: "BNB" amount: type: string example: "0.01" scheduledData: type: integer format: int64 example: 1626144956000 createTime: type: integer format: int64 example: 1626144956000 status: type: string example: "SUCCESS" tranId: type: integer example: 91077779 required: - fromEmail - fromAccountType - toEmail - toAccountType - asset - amount - scheduledData - createTime - status - tranId required: - count - managerSubTransferHistoryVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/queryTransLogForTradeParent: get: summary: Query Managed Sub Account Transfer Log (For Trading Team Master Account) description: |- Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team Weight(IP): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - name: transfers in: query required: false description: Transfer Direction (FROM/TO) schema: type: string example: 'FROM' - name: transferFunctionAccountType in: query required: false description: Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE) schema: type: string example: 'SPOT' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub account transfer logs (for trading team) content: application/json: schema: type: object properties: count: type: integer format: int32 example: 2 managerSubTransferHistoryVos: type: array items: type: object properties: fromEmail: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" fromAccountType: type: string example: "SPOT" toEmail: type: string example: "wdywl0lddakh@test.com" toAccountType: type: string example: "SPOT" asset: type: string example: "BNB" amount: type: string example: "0.01" scheduledData: type: integer format: int64 example: 1626144956000 createTime: type: integer format: int64 example: 1626144956000 status: type: string example: "SUCCESS" tranId: type: integer example: 91077779 required: - fromEmail - fromAccountType - toEmail - toAccountType - asset - amount - scheduledData - createTime - status - tranId required: - count - managerSubTransferHistoryVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/fetch-future-asset: get: summary: Query Managed Sub-account Futures Asset Details (For Investor Master Account) description: |- Investor can use this api to query managed sub account futures asset details tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account futures assset details content: application/json: schema: type: object properties: code: type: integer format: int32 example: 200 message: type: string example: "OK" snapshotVos: type: array items: type: object properties: type: type: string example: "FUTURES" updateTime: type: integer format: int64 example: 1626400907000 data: type: object properties: assets: type: array items: type: object properties: asset: type: string example: "USDT" marginBalance: type: number format: float example: 100 walletBalance: type: number format: float example: 100 required: - asset - marginBalance - walletBalance position: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" entryPrice: type: number format: float example: 17000 markPrice: type: number format: float example: 17000 positionAmt: type: number format: float example: 0.1 required: - symbol - entryPrice - markPrice - positionAmt required: - assets - position required: - type - updateTime - data required: - code - message - snapshotVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/marginAsset: get: summary: Query Managed Sub-account Margin Asset Details (For Investor Master Account) description: |- Investor can use this api to query managed sub account margin asset details tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account margin assset details content: application/json: schema: type: object properties: marginLevel: type: string example: "999" totalAssetOfBtc: type: string example: "0" totalLiabilityOfBtc: type: string example: "0" totalNetAssetOfBtc: type: string example: "0" userAssets: type: array items: type: object properties: asset: type: string example: "BTC" borrowed: type: string example: "0" free: type: string example: "0" interest: type: string example: "0" locked: type: string example: "0" netAsset: type: string example: "0" required: - asset - borrowed - free - interest - locked - netAsset required: - marginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - userAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/info: get: summary: Query Managed Sub-account List (For Investor) description: |- Get investor's managed sub-account list. Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub account list content: application/json: schema: type: object properties: total: type: integer example: 3 managerSubUserInfoVoList: type: array items: type: object properties: rootUserId: type: integer format: int64 example: 1000138475670 managersubUserId: type: integer format: int64 example: 1000137842513 bindParentUserId: type: integer format: int64 example: 1000138475669 email: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" insertTimeStamp: type: integer format: int64 example: 1678435149000 bindParentEmail: type: string example: "wdyw8xsh8pey@test.com" isSubUserEnabled: type: boolean example: true isUserActive: type: boolean example: true isMarginEnabled: type: boolean example: true isFutureEnabled: type: boolean example: true isSignedLVTRiskAgreement: type: boolean example: true required: - rootUserId - managersubUserId - bindParentUserId - insertTimeStamp - bindParentEmail - isSubUserEnabled - isUserActive - isMarginEnabled - isFutureEnabled - isSignedLVTRiskAgreement required: - total - managerSubUserInfoVoList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/deposit/address: get: summary: Get Managed Sub-account Deposit Address (For Investor Master Account) description: |- Get investor's managed sub-account deposit address Weight(UID): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/coin' - $ref: '#/components/parameters/network' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub deposit address content: application/json: schema: type: object properties: coin: type: string example: "USDT" address: type: string example: "0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d" tag: type: string url: type: string example: "https://etherscan.io/address/0x206c22d833bb0bb2102da6b7c7d4c3eb14bcf73d" required: - coin - address - tag - url '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/managed-subaccount/query-trans-log: get: summary: Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA) description: |- Query Managed Sub Account Transfer Log (For Trading Team Sub Account) Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/limit' - name: transfers in: query required: true description: Transfer Direction schema: type: string enum: [FROM, TO] - name: transferFunctionAccountType in: query required: true description: Transfer function account type schema: type: string enum: [SPOT, MARGIN, ISOLATED_MARGIN, USDT_FUTURE, COIN_FUTURE] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Managed sub deposit address content: application/json: schema: type: object properties: count: type: integer example: 2 managerSubTransferHistoryVos: type: array items: type: object properties: fromEmail: type: string example: "test_0_virtual@kq3kno9imanagedsub.com" fromAccountType: type: string example: "SPOT" toEmail: type: string example: "wdywl0lddakh@test.com" toAccountType: type: string example: "SPOT" asset: type: string example: "BNB" amount: type: string example: "0.01" scheduledData: type: integer format: int64 example: 1679416673000 createTime: type: integer format: int64 example: 1679416673000 status: type: string example: "SUCCESS" tranId: type: integer format: int64 example: 91077779 required: - fromEmail - fromAccountType - toEmail - toAccountType - asset - amount - scheduledData - createTime - status - tranId required: - count - managerSubTransferHistoryVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/subAccountApi/ipRestriction: get: summary: Get IP Restriction for a Sub-account API Key (For Master Account) description: 'Weight(UID): 3000' tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/subAccountApiKey' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: IP Restriction information content: application/json: schema: type: object properties: ipRestrict: type: string example: "true" ipList: type: array items: type: string example: - "69.210.67.14" - "8.34.21.10" updateTime: type: integer format: int64 example: 1636369557189 apiKey: type: string example: "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" required: - ipRestrict - ipList - updateTime - apiKey '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList: delete: summary: Delete IP List for a Sub-account API Key (For Master Account) description: "Weight(UID): 3000" tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/subAccountApiKey' - $ref: '#/components/parameters/optionalIpAddress' - $ref: '#/components/parameters/thirdPartyName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Delete IP information content: application/json: schema: type: object properties: ipRestrict: type: string example: "true" ipList: type: array items: type: string example: - "69.210.67.14" - "thirdPartyName" updateTime: type: integer format: int64 example: 1636369557189 apiKey: type: string example: "k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf" required: - ipRestrict - ipList - updateTime - apiKey '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/transaction-statistics: get: summary: Query Sub-account Transaction Statistics (For Master Account) description: |- Query Sub-account Transaction statistics (For Master Account). Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account transaction statistics content: application/json: schema: type: object properties: recent30BtcTotal: type: string example: "0" recent30BtcFuturesTotal: type: string example: "0" recent30BtcMarginTotal: type: string example: "0" recent30BusdTotal: type: string example: "0" recent30BusdFuturesTotal: type: string example: "0" recent30BusdMarginTotal: type: string example: "0" tradeInfoVos: type: array items: type: object properties: userId: type: integer format: int64 example: 1000138138384 btc: type: number format: float example: 0 btcFutures: type: number format: float example: 0 btcMargin: type: number format: float example: 0 busd: type: number format: float example: 0 busdFutures: type: number format: float example: 0 busdMargin: type: number format: float example: 0 date: type: integer format: int64 example: 1676851200000 required: - recent30BtcTotal - recent30BtcFuturesTotal - recent30BtcMarginTotal - recent30BusdTotal - recent30BusdFuturesTotal - recent30BusdMarginTotal - tradeInfoVos '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/sub-account/eoptions/enable: post: summary: Enable Options for Sub-account (For Master Account)(USER_DATA) description: |- Enable Options for Sub-account (For Master Account). Weight(IP): 1 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account EOptions status content: application/json: schema: type: object properties: email: type: string example: "alice@test.com" isEOptionsEnabled: type: boolean example: true required: - email - isEOptionsEnabled '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/sub-account/subAccountApi/ipRestriction: post: summary: Update IP Restriction for Sub-Account API key (For Master Account) description: |- Update IP Restriction for Sub-Account API key Weight(UID): 3000 tags: - Sub-Account parameters: - $ref: '#/components/parameters/subAccountEmail' - $ref: '#/components/parameters/subAccountApiKey' - name: status in: query required: true description: IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only schema: type: string example: "1" - $ref: '#/components/parameters/thirdPartyName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Update IP Restriction content: application/json: schema: type: object properties: status: type: string example: "2" ipList: type: array items: type: string example: - "69.210.67.14" - "8.34.21.10" - "thirdPartyName" updateTime: type: integer format: int64 example: 1636369557189 apiKey: type: string example: k5V49ldtn4tszj6W3hystegdfvmGbqDzjmkCtpTvC0G74WhK7yd4rfCTo4lShf required: - status - ipList - updateTime - apiKey '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v4/sub-account/assets: get: summary: Query Sub-account Assets (For Master Account) description: |- Fetch sub-account assets Weight(UID): 60 tags: - Sub-Account parameters: - $ref: '#/components/parameters/email' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub account balances content: application/json: schema: type: object properties: balances: type: array items: type: object properties: asset: type: string example: "BNB" free: type: string example: "10000" locked: type: string example: "0" required: - asset - free - locked required: - balances '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /api/v3/userDataStream: post: summary: Create a ListenKey (USER_STREAM) description: |- Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 2 tags: - Stream security: - ApiKeyAuth: [] responses: '200': description: Listen key content: application/json: schema: type: object properties: listenKey: type: string example: "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" required: - listenKey put: summary: Ping/Keep-alive a ListenKey (USER_STREAM) description: |- Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes. Weight: 2 tags: - Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' delete: summary: Close a ListenKey (USER_STREAM) description: |- Close out a user data stream. Weight: 2 tags: - Stream parameters: - $ref: '#/components/parameters/listenKey' security: - ApiKeyAuth: [] responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/userDataStream: post: summary: Create a ListenKey (USER_STREAM) description: |- Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent. If the account has an active `listenKey`, that `listenKey` will be returned and its validity will be extended for 60 minutes. Weight: 1 tags: - Margin Stream security: - ApiKeyAuth: [] responses: '200': description: Margin listen key content: application/json: schema: type: object properties: listenKey: type: string example: "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" required: - listenKey put: 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" required: - listenKey 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(UID): 90000 tags: - Fiat parameters: - $ref: '#/components/parameters/transactionType' - $ref: '#/components/parameters/beginTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/rows' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: History of deposit/withdraw orders content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderNo: type: string example: "7d76d611-0568-4f43-afb6-24cac7767365" fiatCurrency: type: string example: "BRL" indicatedAmount: type: string example: "10.00" amount: type: string example: "10.00" totalFee: type: string example: "0.00" method: type: string example: "BankAccount" status: type: string example: "Expired" description: "Processing, Failed, Successful, Finished, Refunding, Refunded, Refund Failed, Order Partial credit Stopped" createTime: type: integer format: int64 example: 1626144956000 updateTime: type: integer format: int64 example: 1626400907000 required: - orderNo - fiatCurrency - indicatedAmount - amount - totalFee - method - status - createTime - updateTime total: type: integer format: int32 example: 1 success: type: boolean required: - code - message - data - total - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/fiat/payments: get: summary: Fiat Payments History (USER_DATA) description: |- - If beginTime and endTime are not sent, the recent 30-day data will be returned. Weight(IP): 1 tags: - Fiat parameters: - $ref: '#/components/parameters/transactionType' - $ref: '#/components/parameters/beginTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/rows' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: History of fiat payments content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderNo: type: string example: "353fca443f06466db0c4dc89f94f027a" sourceAmount: type: string example: "20.00" description: Fiat trade amount fiatCurrency: type: string example: "EUR" description: Fiat token obtainAmount: type: string example: "4.462" description: Crypto trade amount cryptoCurrency: type: string example: "LUNA" description: Crypto token totalFee: type: string example: "0.2" description: Trade fee price: type: string example: "4.437472" status: type: string example: "Failed" description: Processing, Completed, Failed, Refunded createTime: type: integer format: int64 example: 1624529919000 updateTime: type: integer format: int64 example: 1624529919000 required: - orderNo - sourceAmount - fiatCurrency - obtainAmount - cryptoCurrency - totalFee - price - status - createTime - updateTime total: type: integer format: int32 example: 1 success: type: boolean required: - code - message - data - total - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/project/list: get: summary: Get Fixed/Activity Project List(USER_DATA) description: 'Weight(IP): 1' tags: - Savings parameters: - $ref: '#/components/parameters/optionalAsset' - $ref: '#/components/parameters/fixedAndActivityProductType' - $ref: '#/components/parameters/optionalFixedAndActivityProductStatus' - $ref: '#/components/parameters/isSortAsc' - $ref: '#/components/parameters/sortBy' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of fixed projects content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" displayPriority: type: integer format: int64 example: 1 duration: type: integer format: int64 example: 90 interestPerLot: type: string example: "1.35810000" interestRate: type: string example: "0.05510000" lotSize: type: string example: "100.00000000" lotsLowLimit: type: integer format: int64 example: 1 lotsPurchased: type: integer format: int64 example: 74155 lotsUpLimit: type: integer format: int64 example: 80000 maxLotsPerUser: type: integer format: int64 example: 2000 needKyc: type: boolean projectId: type: string example: "CUSDT90DAYSS001" projectName: type: string example: "USDT" status: type: string example: "PURCHASING" type: type: string example: "CUSTOMIZED_FIXED" withAreaLimitation: type: boolean required: - asset - displayPriority - duration - interestPerLot - interestRate - lotSize - lotsLowLimit - lotsPurchased - lotsUpLimit - maxLotsPerUser - needKyc - projectId - projectName - status - type - withAreaLimitation '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/customizedFixed/purchase: post: summary: Purchase Fixed/Activity Project (USER_DATA) description: 'Weight(IP): 1' tags: - Savings parameters: - $ref: '#/components/parameters/projectId' - $ref: '#/components/parameters/lot' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Generated Purchase Id content: application/json: schema: type: object properties: purchaseId: type: string example: "18356" required: - purchaseId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/project/position/list: get: summary: Get Fixed/Activity Project Position (USER_DATA) description: 'Weight(IP): 1' tags: - Savings parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/fixedAndActivityProjectId' - $ref: '#/components/parameters/optionalFixedAndActivityProductStatus' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of fixed project positions content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" canTransfer: type: boolean createTimestamp: type: integer format: int64 example: 1587010770000 duration: type: integer format: int64 example: 14 endTime: type: integer format: int64 example: 1588291200000 interest: type: string example: "0.19950000" interestRate: type: string example: "0.05201250" lot: type: integer format: int64 example: 1 positionId: type: integer format: int64 example: 51724 principal: type: string example: "100.00000000" projectId: type: string example: "CUSDT14DAYSS001" projectName: type: string example: "USDT" purchaseTime: type: integer format: int64 example: 1587010771000 redeemDate: type: string format: date example: "2020-05-01" startTime: type: integer format: int64 example: 1587081600000 status: type: string example: "HOLDING" type: type: string example: "CUSTOMIZED_FIXED" required: - asset - canTransfer - createTimestamp - duration - endTime - interest - interestRate - lot - positionId - principal - projectId - projectName - purchaseTime - redeemDate - startTime - status - type '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/positionChanged: post: summary: Change Fixed/Activity Position to Daily Position (USER_DATA) description: |- - PositionId is mandatory parameter for fixed position. Weight(IP): 1 tags: - Savings parameters: - $ref: '#/components/parameters/projectId' - $ref: '#/components/parameters/lot' - $ref: '#/components/parameters/optionalPositionId' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Purchase information content: application/json: schema: type: object properties: dailyPurchaseId: type: integer format: int64 example: 862290 success: type: boolean time: type: integer format: int64 example: 1577233578000 required: - dailyPurchaseId - success - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/pub/algoList: get: summary: Acquiring Algorithm (MARKET_DATA) description: 'Weight(IP): 1' security: - ApiKeyAuth: [] tags: - Mining responses: '200': description: Algorithm information content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: algoName: type: string example: "sha256" algoId: type: integer format: int64 example: 1 poolIndex: type: integer format: int64 example: 0 unit: type: string example: "h/s" required: - algoName - algoId - poolIndex - unit required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/pub/coinList: get: summary: Acquiring CoinName (MARKET_DATA) description: 'Weight(IP): 1' security: - ApiKeyAuth: [] tags: - Mining responses: '200': description: Coin information content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: coinName: type: string example: "BTC" coinId: type: integer format: int64 example: 1 poolIndex: type: integer format: int64 example: 0 algoId: type: integer format: int64 example: 1 algoName: type: string example: "sha256" required: - coinName - coinId - poolIndex - algoId - algoName required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/worker/detail: get: summary: Request for Detail Miner List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/workerName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of workers' hashrates' content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: workerName: type: string example: "bhdc1.16A10404B" description: Mining Account name type: type: string example: "H_hashrate" description: Type of hourly hashrate hashrateDatas: type: array items: type: object properties: time: type: integer format: int64 example: 1587902400000 hashrate: type: string example: "0" reject: type: integer format: int64 example: 0 description: Rejection Rate required: - time - hashrate - reject required: - workerName - type - hashrateDatas required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/worker/list: get: summary: Request for Miner List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/sortColumn' - $ref: '#/components/parameters/workerStatus' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of workers content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: workerDatas: type: array items: type: object properties: workerId: type: string example: "1420554439452400131" workerName: type: string example: "2X73" status: type: integer format: int64 example: 3 description: "Status:1 valid, 2 invalid, 3 no longer valid" hashRate: type: integer format: int64 example: 0 description: Real-time rate dayHashRate: type: integer format: int64 example: 0 description: 24H Hashrate rejectRate: type: integer format: int64 example: 0 description: Real-time Rejection Rate lastShareTime: type: integer format: int64 example: 1587712919000 description: Last submission time required: - workerId - workerName - status - hashRate - dayHashRate - rejectRate - lastShareTime totalNum: type: integer format: int64 example: 18530 pageSize: type: integer format: int64 example: 20 required: - workerDatas - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/payment/list: get: summary: Earnings List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/optionalCoin' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of earnings content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: accountProfits: type: array items: type: object properties: time: type: integer format: int64 example: 1586188800000 description: Mining date type: type: integer format: int64 example: 31 description: "0:Mining Wallet,5:Mining Address,7:Pool Savings,8:Transferred,31:Income Transfer ,32:Hashrate Resale-Mining Wallet 33:Hashrate Resale-Pool Savings" hashTransfer: type: integer format: "nullable" example: null description: Transferred Hashrate transferAmount: type: number format: "nullable" example: null description: Transferred Income dayHashRate: type: integer format: int64 example: 129129903378244 description: Daily Hashrate profitAmount: type: number format: double example: 8.6083060304 description: Earnings Amount coinName: type: string example: "BTC" description: Coin Type status: type: integer format: int32 example: 2 description: "Status:0:Unpaid, 1:Paying 2:Paid" required: - time - type - hashTransfer - transferAmount - dayHashRate - profitAmount - coinName - status totalNum: type: integer format: int64 example: 3 description: Total Rows pageSize: type: integer format: int64 example: 20 description: Rows per page required: - accountProfits - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/payment/other: get: summary: Extra Bonus List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/optionalCoin' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of extra bonuses content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: otherProfits: type: array items: type: object properties: time: type: integer format: int64 example: 1607443200000 description: Mining date coinName: type: string example: "BTC" description: Coin Name type: type: integer format: int32 example: 4 description: '1: Merged Mining, 2: Activity Bonus, 3:Rebate 4:Smart Pool 6:Income Transfer 7:Pool Savings' profitAmount: type: number format: double example: 0.0011859 status: type: integer format: int32 example: 2 description: '0:Unpaid, 1:Paying 2:Paid' required: - time - coinName - type - profitAmount - status totalNum: type: integer format: int64 example: 3 description: Total Rows pageSize: type: integer format: int64 example: 20 description: Rows per page required: - otherProfits - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/config/details/list: get: summary: Hashrate Resale List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of hashrate resales content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: configDetails: type: array items: type: object properties: configId: type: integer format: int64 example: 168 description: Mining ID poolUsername: type: string example: "123" description: Transfer out of subaccount toPoolUsername: type: string example: "user1" description: Transfer into subaccount algoName: type: string example: "Ethash" description: Transfer algorithm hashRate: type: integer format: int64 example: 5000000 description: Transferred Hashrate quantity startDay: type: integer format: int64 example: 20201210 description: Start date endDay: type: integer format: int64 example: 20210405 description: End date status: type: integer format: int32 example: 1 description: "0 Processing, 1:Cancelled, 2:Terminated " required: - configId - poolUsername - toPoolUsername - algoName - hashRate - startDay - endDay - status totalNum: type: integer format: int64 example: 21 pageSize: type: integer format: int64 example: 200 required: - configDetails - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/profit/details: get: summary: Hashrate Resale Details (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/configId' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of hashrate resale details content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: profitTransferDetails: type: array items: type: object properties: poolUsername: type: string example: "test4001" description: Transfer out of sub-account toPoolUsername: type: string example: "pop" description: Transfer into subaccount algoName: type: string example: "sha256" description: Transfer algorithm hashRate: type: integer format: int64 example: 200000000000 description: Transferred Hashrate quantity day: type: integer format: int64 example: 20201213 description: Transfer date amount: type: number format: double example: 0.2256872 description: Transfer income coinName: type: string example: "BTC" required: - poolUsername - toPoolUsername - algoName - hashRate - day - amount - coinName totalNum: type: integer format: int64 example: 8 pageSize: type: integer format: int64 example: 200 required: - profitTransferDetails - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/config: post: summary: Hashrate Resale Request (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/toPoolUser' - $ref: '#/components/parameters/hashRate' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Mining Account Id content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: integer format: int64 example: 171 description: Mining Account required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/hash-transfer/config/cancel: post: summary: Cancel Hashrate Resale configuration (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/configId' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Success flag content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: boolean required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/statistics/user/status: get: summary: Statistic List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Mining account statistics content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: object properties: fifteenMinHashRate: type: string example: "457835490067496409.00000000" dayHashRate: type: string example: "214289268068874127.65000000" validNum: type: integer format: int64 example: 0 invalidNum: type: integer format: int64 example: 17562 profitToday: type: object properties: BTC: type: string example: "0.00314332" BSV: type: string example: "56.17055953" BCH: type: string example: "106.61586001" required: - BTC - BSV - BCH profitYesterday: type: object properties: BTC: type: string example: "0.00314332" BSV: type: string example: "56.17055953" BCH: type: string example: "106.61586001" required: - BTC - BSV - BCH userName: type: string example: "test" unit: type: string example: "h/s" algo: type: string example: "sha256" required: - fifteenMinHashRate - dayHashRate - validNum - invalidNum - profitToday - profitYesterday - userName - unit - algo required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/statistics/user/list: get: summary: Account List (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/userName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of mining accounts content: application/json: schema: type: object properties: code: type: integer format: int64 example: 0 msg: type: string example: "" data: type: array items: type: object properties: type: type: string example: "H_hashrate" userName: type: string example: "test" list: type: array items: type: object properties: time: type: integer format: int64 example: 1585267200000 hashrate: type: string example: "0.00000000" reject: type: string example: "0.00000000" required: - time - hashrate - reject required: - type - userName - list required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/mining/payment/uid: get: summary: Mining Account Earning (USER_DATA) description: 'Weight(IP): 5' tags: - Mining parameters: - $ref: '#/components/parameters/algo' - $ref: '#/components/parameters/startDate' - $ref: '#/components/parameters/endDate' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Mining account earnings content: application/json: schema: type: object properties: code: type: integer format: int32 example: 0 msg: type: string example: "" data: type: object properties: accountProfits: type: array items: type: object properties: time: type: integer format: int64 example: 1607443200000 coinName: type: string example: "BTC" type: type: integer format: int32 description: "0:Referral 1:Refund 2:Rebate" example: 2 puid: type: integer format: int32 description: "puid" example: 59985472 subName: type: string description: "Mining account" example: "vdvaghani" amount: type: number example: 0.09186957 required: - time - coinName - type - puid - subName - amount totalNum: type: integer format: int32 example: 3 pageSize: type: integer format: int32 example: 20 required: - accountProfits - totalNum - pageSize required: - code - msg - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/futures/transfer: post: summary: New Future Account Transfer (USER_DATA) description: |- Execute transfer between spot account and futures account. Weight(IP): 1 tags: - Futures parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/amount' - name: type in: query required: true description: "1: transfer from spot account to USDT-Ⓜ futures account. 2: transfer from USDT-Ⓜ futures account to spot account. 3: transfer from spot account to COIN-Ⓜ futures account. 4: transfer from COIN-Ⓜ futures account to spot account." schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Transfer content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 100000001 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: summary: Get Future Account Transaction History List (USER_DATA) description: |- Weight(IP): 10 tags: - Futures parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/startTimeReq' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Transfer Query content: application/json: schema: type: object properties: rows: type: array items: type: object properties: asset: type: string example: "USDT" tranId: type: integer format: int64 example: 100000001 amount: type: string example: "40.84624400" type: type: string example: "1" timestamp: type: integer format: int64 example: 1555056425000 status: type: string description: "one of PENDING (pending to execution), CONFIRMED (successfully transfered), FAILED (execution failed, nothing happened to your account);" example: "CONFIRMED" required: - asset - tranId - amount - type - timestamp - status total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/futures/histDataLink: get: summary: Get Future TickLevel Orderbook Historical Data Download Link (USER_DATA) description: |- Weight(IP): 1 tags: - Futures parameters: - name: symbol in: query required: true schema: type: string example: "BTCUSDT" - name: dataType in: query required: true schema: type: string enum: ['T_DEPTH', 'S_DEPTH'] example: "T_DEPTH" - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: data link content: application/json: schema: type: object properties: data: type: array items: type: object properties: day: type: string example: "2023-06-30" url: type: string example: "https://bin-prod-user-rebate-bucket.s3.ap-northeast-1.amazonaws.com/xxx" required: - day - url required: - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/newOrderVp: post: summary: Volume Participation(VP) New Order (TRADE) description: |- Send in a VP new order. Only support on USDⓈ-M Contracts. - You need to enable `Futures Trading Permission` for the api key which requests this endpoint. - Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving "success": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive "success": true, but the order status will be expired after we check it. Weight(UID): 3000 tags: - Futures Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/positionSide' - name: quantity in: query required: true description: "Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT" schema: type: number format: double - name: urgency in: query description: "Represent the relative speed of the current execution; ENUM: LOW, MEDIUM, HIGH" required: true schema: type: string enum: ['LOW', 'MEDIUM', 'HIGH'] example: "LOW" - name: clientAlgoId in: query description: "A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value" schema: type: string example: "00358ce6a268403398bd34eaa36dffe7" - name: reduceOnly in: query description: "'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position" schema: type: boolean - name: limitPrice in: query description: "Limit price of the order; If it is not sent, will place order by market price by default" schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Volume Participation(VP) Order content: application/json: schema: type: object properties: clientAlgoId: type: string example: "00358ce6a268403398bd34eaa36dffe7" success: type: boolean example: true code: type: integer format: int64 example: 0 msg: type: string example: "OK" required: - clientAlgoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/newOrderTwap: post: summary: Time-Weighted Average Price(Twap) New Order (TRADE) description: |- Send in a Twap new order. Only support on USDⓈ-M Contracts. You need to enable Futures Trading Permission for the api key which requests this endpoint. Base URL: https://api.binance.com - Total Algo open orders max allowed: 10 orders. - Leverage of symbols and position mode will be the same as your futures account settings. You can set up through the trading page or fapi. - Receiving "success": true does not mean that your order will be executed. Please use the query order endpoints(GET sapi/v1/algo/futures/openOrders or GET sapi/v1/algo/futures/historicalOrders) to check the order status. For example: Your futures balance is insufficient, or open position with reduce only or position side is inconsistent with your own setting. In these cases you will receive "success": true, but the order status will be expired after we check it. - quantity * 60 / duration should be larger than minQty - duration cannot be less than 5 mins or more than 24 hours. - For delivery contracts, TWAP end time should be one hour earlier than the delivery time of the symbol. Weight(UID): 3000 tags: - Futures Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/positionSide' - name: quantity in: query required: true description: "Quantity of base asset; The notional (quantity * mark price(base asset)) must be more than the equivalent of 10,000 USDT and less than the equivalent of 1,000,000 USDT" schema: type: number format: double - name: duration in: query description: "Duration for TWAP orders in seconds. [300, 86400];Less than 5min => defaults to 5 min; Greater than 24h => defaults to 24h" required: true schema: type: integer format: int64 example: 300 - name: clientAlgoId in: query description: "A unique id among Algo orders (length should be 32 characters), If it is not sent, we will give default value" schema: type: string example: "00358ce6a268403398bd34eaa36dffe7" - name: reduceOnly in: query description: "'true' or 'false'. Default 'false'; Cannot be sent in Hedge Mode; Cannot be sent when you open a position" schema: type: boolean - name: limitPrice in: query description: "Limit price of the order; If it is not sent, will place order by market price by default" schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Time-Weighted Average Price(Twap) New Order content: application/json: schema: type: object properties: clientAlgoId: type: string example: "00358ce6a268403398bd34eaa36dffe7" success: type: boolean example: true code: type: integer format: int64 example: 0 msg: type: string example: "OK" required: - clientAlgoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/order: delete: summary: Cancel Algo Order(TRADE) description: |- Cancel an active order. - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 tags: - Futures Algo parameters: - name: algoId in: query description: "Eg. 14511" required: true schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled order content: application/json: schema: type: object properties: algoId: type: integer format: int64 example: 14511 success: type: boolean example: true code: type: integer format: int64 example: 0 msg: type: string example: "OK" required: - algoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/openOrders: get: summary: Query Current Algo Open Orders (USER_DATA) description: |- - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 tags: - Futures Algo parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Open Algo Orders content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 orders: type: array items: type: object properties: algoId: type: integer format: int64 example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" positionSide: type: string example: "SHORT" totalQty: type: string example: "5.00" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.00000000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 0 algoStatus: type: string example: "WORKING" algoType: type: string example: "VP" urgency: type: string example: "LOW" required: - algoId - symbol - side - positionSide - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/historicalOrders: get: summary: Query Historical Algo Orders (USER_DATA) description: |- - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 tags: - Futures Algo parameters: - $ref: '#/components/parameters/optionalSymbol' - $ref: '#/components/parameters/optionalSide' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/smallPageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Historical Algo Orders content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 orders: type: array items: type: object properties: algoId: type: integer format: int64 example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" positionSide: type: string example: "SHORT" totalQty: type: string example: "5.00" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.00000000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 1649757088101 algoStatus: type: string example: "WORKING" algoType: type: string example: "VP" urgency: type: string example: "LOW" required: - algoId - symbol - side - positionSide - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/futures/subOrders: get: summary: Query Sub Orders (USER_DATA) description: |- - You need to enable Futures Trading Permission for the api key which requests this endpoint. - Base URL: https://api.binance.com Weight(IP): 1 tags: - Futures Algo parameters: - name: algoId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/smallPageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Sub orders content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 executedQty: type: string example: "1.000" executedAmt: type: string example: "3229.44000000" subOrders: type: array items: type: object properties: algoId: type: integer format: int64 example: 13723 orderId: type: integer format: int64 example: 8389765519993908929 orderStatus: type: string example: "FILLED" executedQty: type: string example: "1.000" executedAmt: type: string example: "3229.44000000" feeAmt: type: string example: "-1.61471999" feeAsset: type: string example: "USDT" bookTime: type: integer format: int64 example: 1649756817004 avgPrice: type: string example: "3229.44" side: type: string example: "SELL" symbol: type: string example: "ETHUSDT" subId: type: integer format: int64 example: 1 timeInForce: type: string example: "IMMEDIATE_OR_CANCEL" origQty: type: string example: "1.000" required: - algoId - orderId - orderStatus - executedAmt - feeAmt - feeAsset - bookTime - avgPrice - side - symbol - subId - timeInForce - origQty required: - total - executedQty - executedAmt - subOrders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/newOrderTwap: post: summary: Time-Weighted Average Price (Twap) New Order description: |- Place a new spot TWAP order with Algo service. Weight(UID): 3000 tags: - Spot Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/quantity' - name: duration in: query required: true schema: type: integer format: int32 example: 300 - name: clientAlgoId in: query schema: type: string - name: limitPrice in: query schema: type: number format: float - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap order response content: application/json: schema: type: object properties: clientAlgoId: type: string example: "65ce1630101a480b85915d7e11fd5078" success: type: boolean example: true code: type: integer example: 0 msg: type: string example: "OK" required: - clientAlgoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/order: delete: summary: Cancel Algo Order description: |- Cancel an open TWAP order Weight(IP): 1 tags: - Spot Algo parameters: - name: algoId in: query required: true schema: type: integer format: int64 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancelled twap order response content: application/json: schema: type: object properties: algoId: type: integer format: int64 example: 14511 success: type: boolean example: true code: type: integer example: 0 msg: type: string example: "OK" required: - algoId - success - code - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/openOrders: get: summary: Query Current Algo Open Orders description: |- Get all open SPOT TWAP orders Weight(IP): 1 tags: - Spot Algo parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap open orders content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 orders: type: array items: type: object properties: algoId: type: integer example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" totalQty: type: string example: "5.000" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 1649756817004 algoStatus: type: string example: "WORKING" algoType: type: string example: "TWAP" urgency: type: string example: "LOW" required: - algoId - symbol - side - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/historicalOrders: get: summary: Query Historical Algo Orders description: |- Get all historical SPOT TWAP orders Weight(IP): 1 tags: - Spot Algo parameters: - $ref: '#/components/parameters/symbol' - $ref: '#/components/parameters/side' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/smallPageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap historical orders content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 orders: type: array items: type: object properties: algoId: type: integer example: 14517 symbol: type: string example: "ETHUSDT" side: type: string example: "SELL" totalQty: type: string example: "5.000" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.000" avgPrice: type: string example: "0.00" clientAlgoId: type: string example: "d7096549481642f8a0bb69e9e2e31f2e" bookTime: type: integer format: int64 example: 1649756817004 endTime: type: integer format: int64 example: 1649756817004 algoStatus: type: string example: "WORKING" algoType: type: string example: "VP" urgency: type: string example: "LOW" required: - algoId - symbol - side - totalQty - executedQty - executedAmt - avgPrice - clientAlgoId - bookTime - endTime - algoStatus - algoType - urgency required: - total - orders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/algo/spot/subOrders: get: summary: Query Sub Orders description: |- Get respective sub orders for a specified algoId Weight(IP): 1 tags: - Spot Algo parameters: - name: algoId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/smallPageSize' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: twap sub orders content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 executedQty: type: string example: "1.000" executedAmt: type: string example: "3229.44000000" subOrders: type: array items: type: object properties: algoId: type: integer example: 14517 orderId: type: integer format: int64 example: 8389765519993908929 orderStatus: type: string example: "FILLED" executedQty: type: string example: "0.000" executedAmt: type: string example: "0.000" feeAmt: type: string example: "-1.61471999" feeAsset: type: string example: "USDT" bookTime: type: integer format: int64 example: 1649319001964 avgPrice: type: string example: "3229.44" side: type: string example: "SELL" symbol: type: string example: "ETHUSDT" subId: type: integer example: 1 timeInForce: type: string example: "IMMEDIATE_OR_CANCEL" origQty: type: string example: "1.000" required: - algoId - orderId - orderStatus - executedQty - executedAmt - feeAmt - feeAsset - bookTime - avgPrice - side - symbol - subId - timeInForce - origQty required: - total - executedQty - executedAmt - subOrders '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/account: get: summary: Portfolio Margin Account (USER_DATA) description: |- Get the account info 'Weight(IP): 1' tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Portfolio account. content: application/json: schema: type: object properties: uniMMR: type: string example: '1.87987800' description: Classic Portfolio margin account maintenance margin rate accountEquity: type: string example: "122607.35137903" description: Account equity, unit is USD actualEquity: type: string example: '142607.35137903' description: Actual equity, unit is USD accountMaintMargin: type: string example: '23.72469206' description: Classic Portfolio margin account maintenance margin, unit is USD accountStatus: type: string example: NORMAL description: Classic Portfolio margin account status:"NORMAL", "MARGIN_CALL", "SUPPLY_MARGIN", "REDUCE_ONLY", "ACTIVE_LIQUIDATION", "FORCE_LIQUIDATION", "BANKRUPTED" accountType: type: string example: "PM_1" description: PM_1 for classic PM, PM_2 for PM required: - uniMMR - accountEquity - actualEquity - accountMaintMargin - accountStatus - accountType '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/collateralRate: get: summary: Portfolio Margin Collateral Rate (MARKET_DATA) description: |- Portfolio Margin Collateral Rate. Weight(IP): 50 security: - ApiKeyAuth: [] tags: - Portfolio Margin responses: '200': description: Portfolio Margin Collateral Rate. content: application/json: schema: type: array items: type: object properties: asset: type: string example: USDC collateralRate: type: string example: '1.0000' required: - asset - collateralRate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/portfolio/collateralRate: get: summary: Portfolio Margin Pro Tiered Collateral Rate(USER_DATA) description: |- Portfolio Margin PRO Tiered Collateral Rate Weight(IP): 50 parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] tags: - Portfolio Margin responses: '200': description: Portfolio Margin Collateral Rate. content: application/json: schema: type: array items: type: object properties: asset: type: string example: BNB collateralInfo: type: array items: type: object properties: tierFloor: type: string example: '0.0000' tierCap: type: string example: '1000.0000' collateralRate: type: string example: '1.0000' required: - tierFloor - tierCap - collateralRate required: - asset - collateralInfo '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/pmLoan: get: summary: Portfolio Margin Bankruptcy Loan Amount (USER_DATA) description: |- Query Portfolio Margin Bankruptcy Loan Amount. Weight(UID): 500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Portfolio Margin Bankruptcy Loan Amount. content: application/json: schema: type: object properties: asset: type: string example: BUSD amount: type: string example: '579.45' required: - asset - amount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/repay: post: summary: Portfolio Margin Bankruptcy Loan Repay (USER_DATA) description: |- Repay Portfolio Margin Bankruptcy Loan. Weight(UID): 3000 tags: - Portfolio Margin parameters: - name: from in: query schema: type: string example: "SPOT" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Transaction. content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 58203331886213500 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/interest-history: get: summary: Query Classic Portfolio Margin Negative Balance Interest History (USER_DATA) description: |- Query interest history of negative balance for portfolio margin. Weight(IP): 50 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Balance interest history content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" interest: type: string example: "24.4440" interestAccruedTime: type: integer format: int64 example: 1672801339253 interestRate: type: string example: "0.0001164" principal: type: string example: "210000" required: - asset - interest - interestAccruedTime - interestRate - principal '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/asset-index-price: get: summary: Query Portfolio Margin Asset Index Price (MARKET_DATA) description: |- Query Portfolio Margin Asset Index Price Weight(IP): - 1 if send asset - 50 if not send asset security: - ApiKeyAuth: [] tags: - Portfolio Margin parameters: - name: asset in: query schema: type: string example: "BTC" responses: '200': description: asset price index content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDT" assetIndexPrice: type: string example: "28251.9136906" time: type: integer format: int64 example: 1683518338121 required: - asset - assetIndexPrice - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/auto-collection: post: summary: Fund Auto-collection (USER_DATA) description: |- Transfers all assets from Futures Account to Margin account Weight(IP): 1500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/bnb-transfer: post: summary: BNB Transfer (USER_DATA) description: |- BNB transfer can be between Margin Account and USDM Account Weight(IP): 1500 tags: - Portfolio Margin parameters: - name: transferSide in: query required: true schema: type: string enum: ['TO_UM','FROM_UM'] example: 'TO_UM' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: tranId: type: integer format: int64 example: 100000001 required: - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/repay-futures-switch: post: summary: Change Auto-repay-futures Status (USER_DATA) description: |- Change Auto-repay-futures Status Weight(IP): 1500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/autoRepay' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' get: summary: Get Auto-repay-futures Status (USER_DATA) description: |- Query Auto-repay-futures Status Weight(IP): 30 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: autoRepay: type: boolean example: true required: - autoRepay '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/repay-futures-negative-balance: post: summary: Repay futures Negative Balance (USER_DATA) description: |- Repay futures Negative Balance Weight(IP): 1500 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/margin-asset-leverage: get: summary: Get Portfolio Margin Asset Leverage (USER_DATA) description: |- Weight(IP): 50 tags: - Portfolio Margin responses: '200': description: Classic Portfolio Margin Collateral Rate content: application/json: schema: type: array items: type: object properties: asset: type: string example: "USDC" collateralRate: type: string example: '1.0000' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/portfolio/asset-collection: post: summary: Fund Collection by Asset (USER_DATA) description: |- Transfers specific asset from Futures Account to Margin account Weight(IP): 60 tags: - Portfolio Margin parameters: - $ref: '#/components/parameters/asset' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Result content: application/json: schema: type: object properties: msg: type: string example: "success" required: - msg '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/tokenInfo: get: summary: BLVT Info (MARKET_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' security: - ApiKeyAuth: [] responses: '200': description: List of token information content: application/json: schema: type: array items: type: object properties: tokenName: type: string example: "BTCDOWN" description: type: string example: "3X Short Bitcoin Token" underlying: type: string example: "BTC" tokenIssued: type: string example: "717953.95" basket: type: string example: "-821.474 BTCUSDT Futures" currentBaskets: type: array items: type: object properties: symbol: type: string example: "BTCUSDT" amount: type: string example: "-1183.984" notionalValue: type: string example: "-22871089.96704" required: - symbol - amount - notionalValue nav: type: string example: "4.79" realLeverage: type: string example: "-2.316" fundingRate: type: string example: "0.001020" dailyManagementFee: type: string example: "0.0001" purchaseFeePct: type: string example: "0.0010" dailyPurchaseLimit: type: string example: "100000.00" redeemFeePct: type: string example: "0.0010" dailyRedeemLimit: type: string example: "1000000.00" timestamp: type: integer format: int64 example: 1583127900000 required: - tokenName - description - underlying - tokenIssued - basket - currentBaskets - nav - realLeverage - fundingRate - dailyManagementFee - purchaseFeePct - dailyPurchaseLimit - redeemFeePct - dailyRedeemLimit - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/subscribe: post: summary: Subscribe BLVT (USER_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/blvtTokenName' - name: cost in: query description: Spot balance required: true schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Subscription Info content: application/json: schema: type: object properties: id: type: integer format: int64 example: 123 status: type: string example: "S" description: 'S, P, and F for "success", "pending", and "failure"' tokenName: type: string example: "LINKUP" amount: type: string example: "0.9559090500" description: subscribed token amount cost: type: string example: "9.99999995" description: subscription cost in usdt timestamp: type: integer format: int64 example: 1600249972899 required: - id - status - tokenName - amount - cost - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/subscribe/record: get: summary: Query Subscription Record (USER_DATA) description: |- - Only the data of the latest 90 days is available Weight(IP): 1 tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - name: id in: query schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of subscription record content: application/json: schema: type: object properties: id: type: integer format: int64 example: 1 tokenName: type: string example: "LINKUP" amount: type: string example: "0.54216292" description: Subscription amount nav: type: string example: "18.42621386" description: NAV price of subscription fee: type: string example: "0.00999000" description: Subscription fee in usdt totalCharge: type: string example: "9.99999991" description: Subscription cost in usdt timestamp: type: integer format: int64 example: 1599127217916 required: - id - tokenName - amount - nav - fee - totalCharge - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/redeem: post: summary: Redeem BLVT (USER_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/blvtTokenName' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redemption record content: application/json: schema: type: object properties: id: type: integer format: int64 example: 123 status: type: string example: "S" description: 'S, P, and F for "success", "pending", and "failure"' tokenName: type: string example: "LINKUP" redeemAmount: type: string example: "0.95590905" description: Redemption token amount amount: type: string example: "10.05022099" description: Redemption value in usdt timestamp: type: integer format: int64 example: 1600250279614 required: - id - status - tokenName - redeemAmount - amount - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/redeem/record: get: summary: Redemption Record (USER_DATA) description: |- - Only the data of the latest 90 days is available Weight(IP): 1 tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - name: id in: query schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query schema: type: integer format: int32 description: 'default 1000, max 1000' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of redemption record content: application/json: schema: type: array items: type: object properties: id: type: integer format: int64 example: 1 tokenName: type: string example: "LINKUP" amount: type: string example: "0.54216292" description: Redemption amount nav: type: string example: "18.36345064" description: NAV of redemption fee: type: string example: "0.00995598" description: Reemption fee netProceed: type: string example: "9.94602604" description: Net redemption value in usdt timestamp: type: integer format: int64 example: 1599128003050 required: - id - tokenName - amount - nav - fee - netProceed - timestamp '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/blvt/userLimit: get: summary: BLVT User Limit Info (USER_DATA) description: 'Weight(IP): 1' tags: - BLVT parameters: - $ref: '#/components/parameters/optionalBlvtTokenName' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: List of token limits content: application/json: schema: type: array items: type: object properties: tokenName: type: string example: "LINKUP" userDailyTotalPurchaseLimit: type: string example: "1000" description: USDT userDailyTotalRedeemLimit: type: string example: "1000" description: USDT required: - tokenName - userDailyTotalPurchaseLimit - userDailyTotalRedeemLimit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/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(IP): 1 tags: - C2C parameters: - name: tradeType in: query required: true schema: type: string enum: [BUY, SELL] - name: startTimestamp in: query description: UTC timestamp in ms schema: type: integer format: int64 - name: endTimestamp in: query description: UTC timestamp in ms schema: type: integer format: int64 - $ref: '#/components/parameters/page' - name: rows in: query description: default 100, max 100 schema: type: integer format: int32 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Trades history content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderNumber: type: string example: "20219644646554779648" advNo: type: string example: "11218246497340923904" tradeType: type: string example: "SELL" asset: type: string example: "BUSD" fiat: type: string example: "CNY" fiatSymbol: type: string example: "¥" amount: type: string example: "5000.00000000" description: Quantity (in Crypto) totalPrice: type: string example: "33400.00000000" unitPrice: type: string example: "6.68" description: Unit Price (in Fiat) orderStatus: type: string example: "COMPLETED" description: PENDING, TRADING, BUYER_PAYED, DISTRIBUTING, COMPLETED, IN_APPEAL, CANCELLED, CANCELLED_BY_SYSTEM createTime: type: integer format: int64 example: 1619361369000 commission: type: string example: "0" description: Transaction Fee (in Crypto) counterPartNickName: type: string example: "ab***" advertisementRole: type: string example: "TAKER" required: - orderNumber - advNo - tradeType - asset - fiat - fiatSymbol - amount - totalPrice - unitPrice - orderStatus - createTime - commission - counterPartNickName - advertisementRole total: type: integer format: int32 example: 1 success: type: boolean required: - code - message - data - total - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/ongoing/orders: get: summary: Get VIP Loan Ongoing Orders (USER_DATA) description: |- VIP loan is available for VIP users only. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - name: collateralAccountId in: query required: false schema: type: integer format: int64 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/current' - name: limit in: query description: Default 10; max 100. schema: type: integer format: int32 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Ongoing VIP Loan Orders content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: integer format: int64 example: 100000001 loanCoin: type: string example: "BUSD" totalDebt: type: string example: "10000" residualInterest: type: string example: "10.27687923" collateralAccountId: type: string example: "12345678, 23456789" collateralCoin: type: string example: "BNB,BTC,ETH" collateralValue: type: string example: "25000.27565492" description: locked collateral value shown in USD value totalCollateralValueAfterHaircut: type: string example: "25000.27565492" lockedCollateralValue: type: string example: "25000.27565492" currentLTV: type: string example: "0.57" expirationTime: type: integer format: int64 example: 1575018510000 loanDate: type: string example: "1676851200000" loanRate: type: string example: "0.0123" loanTerm: type: string example: "30days" required: - orderId - loanCoin - totalDebt - residualInterest - collateralAccountId - collateralCoin - collateralValue - currentLTV - expirationTime - loanDate - loanRate - loanTerm total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/repay: post: summary: VIP Loan Repay (TRADE) description: |- VIP loan is available for VIP users only. Weight(UID): 6000 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/amount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: VIP Loan Repayment content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "200.5" remainingPrincipal: type: string example: "100.5" remainingInterest: type: string example: "0" collateralCoin: type: string example: "BNB,BTC,ETH" currentLTV: type: string example: "0.25" repayStatus: type: string example: "Repaid" description: Repaid, Repaying, Failed required: - loanCoin - repayAmount - remainingPrincipal - remainingInterest - collateralCoin - currentLTV - repayStatus '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/repay/history: get: summary: Get VIP Loan Repayment History (USER_DATA) description: |- VIP loan is available for VIP users only. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: Default 10; max 100. schema: type: integer format: int32 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: VIP Loan Repayment History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "10000" collateralCoin: type: string example: "BNB,BTC,ETH" repayStatus: type: string example: "Repaid" description: Repaid, Repaying, Failed repayTime: type: string example: "1575018510000" orderId: type: string example: "756783308056935434" required: - loanCoin - repayAmount - collateralCoin - repayStatus - repayTime - orderId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/collateral/account: get: summary: Check Locked Value of VIP Collateral Account (USER_DATA) description: |- VIP loan is available for VIP users only. Weight(IP): 6000 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - name: collateralAccountId in: query required: false schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: VIP Locked Value content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralAccountId: type: string example: "12345678" collateralCoin: type: string example: "BNB,BTC,ETH" collateralValue: type: string example: "500.27565492" description: locked collateral value shown in USD value required: - collateralAccountId - collateralCoin - collateralValue total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/borrow: post: summary: VIP Loan Borrow description: |- VIP loan is available for VIP users only. Weight(UID): 6000 tags: - VIP Loans parameters: - name: loanAccountId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/loanCoin' - name: loanAmount in: query required: true schema: type: number format: float - name: collateralAccountId in: query required: true schema: type: string - name: collateralCoin in: query required: true schema: type: string - name: isFlexibleRate in: query required: true schema: type: string enum: ['TRUE', 'FALSE'] example: 'TRUE' - name: loanTerm in: query schema: type: integer - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: loanAccountId: type: string example: "12345678" requestId: type: string example: "12345678" loanCoin: type: string example: "BTC" isFlexibleRate: type: string example: "No" loanAmount: type: string example: "100.55" collateralAccountId: type: string example: "12345678,12345678,12345678" collateralCoin: type: string example: "BUSD,USDT,ETH" loanTerm: type: string example: "30" required: - loanAccountId - requestId - loanCoin - isFlexibleRate - loanAmount - collateralAccountId - collateralCoin '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/loanable/data: get: summary: Get Loanable Assets Data description: |- Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loanable Assets Data content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" _flexibleDailyInterestRate: type: string example: "0.001503" _flexibleYearlyInterestRate: type: string example: "0.548595" _30dDailyInterestRate: type: string example: "0.000136" _30dYearlyInterestRate: type: string example: "0.03450" _60dDailyInterestRate: type: string example: "0.000145" _60dYearlyInterestRate: type: string example: "0.04103" minLimit: type: string example: "100" maxLimit: type: string example: "1000000" vipLevel: type: integer example: 1 required: - loanCoin - _flexibleDailyInterestRate - _flexibleYearlyInterestRate - _30dDailyInterestRate - _30dYearlyInterestRate - _60dDailyInterestRate - _60dYearlyInterestRate - minLimit - maxLimit - vipLevel required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/collateral/data: get: summary: Get Collateral Asset Data (USER_DATA) description: |- Get collateral asset data. Weight(IP): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Asset Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralCoin: type: string example: "BUSD" _1stCollateralRatio: type: string example: "100%" _1stCollateralRange: type: string example: "1-10000000" _2ndCollateralRatio: type: string example: "80%" _2ndCollateralRange: type: string example: "10000000-100000000" _3rdCollateralRatio: type: string example: "60%" _3rdCollateralRange: type: string example: "100000000-1000000000" _4thCollateralRatio: type: string example: "0%" _4thCollateralRange: type: string example: ">10000000000" required: - collateralCoin - _1stCollateralRatio - _1stCollateralRange - _2ndCollateralRatio - _2ndCollateralRange - _3rdCollateralRatio - _3rdCollateralRange - _4thCollateralRatio - _4thCollateralRange total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/request/data: get: summary: Query Application Status (USER_DATA) description: |- Get Application Status Weight(UID): 400 tags: - VIP Loans parameters: - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Application Status content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: loanAccountId: type: string example: "12345678" orderId: type: string example: "12345678" requestId: type: string example: "12345678" loanCoin: type: string example: "BTC" loanAmount: type: string example: "100.5" collateralAccountId: type: string example: "12345678,12345678,12345678" collateralCoin: type: string example: "BUSD,USDT,ETH" loanTerm: type: integer example: "30" status: type: integer example: "Repaid" required: - loanAccountId - orderId - requestId - loanCoin - loanAmount - collateralAccountId - collateralCoin - loanTerm - status required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/request/interestRate: get: summary: Get Borrow Interest Rate (USER_DATA) description: |- Get borrow interest rate. Weight(UID): 400 tags: - VIP Loans parameters: - name: loanCoin in: query description: 'Max 10 assets, Multiple split by ","' schema: type: string example: "BUSD" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Borrow interest rate content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BUSD" flexibleDailyInterestRate: type: string example: "0.001503" flexibleYearlyInterestRate: type: string example: "0.548595" time: type: integer format: int64 example: 1577233578000 required: - asset - flexibleDailyInterestRate - flexibleYearlyInterestRate - time '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/vip/renew: post: summary: VIP Loan Renew description: |- VIP loan is available for VIP users only. Weight(UID): 6000 tags: - VIP Loans parameters: - $ref: '#/components/parameters/orderId' - name: loanTerm in: query schema: type: integer example: 30 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan renew result content: application/json: schema: type: object properties: loanAccountId: type: string example: "12345678" loanCoin: type: string example: "BTC" loanAmount: type: string example: "100.55" collateralAccountId: type: string example: "12345677,12345678,12345679" collateralCoin: type: string example: "BUSD,USDT,ETH" loanTerm: type: string example: "30" required: - loanAccountId - loanCoin - loanAmount - collateralAccountId - collateralCoin - loanTerm '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/income: get: summary: Get Crypto Loans Income History (USER_DATA) description: |- - If startTime and endTime are not sent, the recent 7-day data will be returned. - The max interval between startTime and endTime is 30 days. Weight(UID): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/optionalAsset' - name: type in: query description: |- All types will be returned by default. * `borrowIn` * `collateralSpent` * `repayAmount` * `collateralReturn` - Collateral return after repayment * `addCollateral` * `removeCollateral` * `collateralReturnAfterLiquidation` schema: type: string enum: [borrowIn, collateralSpent, repayAmount, collateralReturn, addCollateral, removeCollateral, collateralReturnAfterLiquidation] - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: "default 20, max 100" schema: type: integer format: int32 example: 20 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan History content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BUSD" type: type: string example: "borrowIn" amount: type: string example: "100" timestamp: type: integer format: int64 example: 1633771139847 tranId: type: string example: "80423589583" required: - asset - type - amount - timestamp - tranId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/borrow: post: summary: Crypto Loan Borrow (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoinReq' - $ref: '#/components/parameters/loanAmount' - $ref: '#/components/parameters/collateralCoinReq' - $ref: '#/components/parameters/collateralAmount' - name: loanTerm in: query description: "7/14/30/90/180 days" required: true schema: type: integer format: int32 example: 30 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Borrow Information content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" loanAmount: type: string example: "100.5" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "50.5" hourlyInterestRate: type: string example: "0.001234" orderId: type: string example: "100000001" required: - loanCoin - loanAmount - collateralCoin - collateralAmount - hourlyInterestRate - orderId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/borrow/history: get: summary: Get Crypto Loans Borrow History (USER_DATA) description: |- - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 tags: - Crypto Loans parameters: - name: orderId in: query description: "orderId in POST /sapi/v1/loan/borrow" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Borrow History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: integer format: int64 example: 100000001 loanCoin: type: string example: "BUSD" initialLoanAmount: type: string example: "10000" hourlyInterestRate: type: string example: "0.000057" loanTerm: type: string example: "7" collateralCoin: type: string example: "BNB" initialCollateralAmount: type: string example: "49.27565492" borrowTime: type: integer format: int64 example: 1575018510000 status: type: string example: "Accruing_Interest, Overdue, Liquidating, Repaying, Repaid, Liquidated, Pending, Failed" required: - orderId - loanCoin - initialLoanAmount - hourlyInterestRate - loanTerm - collateralCoin - initialCollateralAmount - borrowTime - status total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/ongoing/orders: get: summary: Get Loan Ongoing Orders (USER_DATA) description: |- Weight(IP): 300 tags: - Crypto Loans parameters: - name: orderId in: query description: "orderId in POST /sapi/v1/loan/borrow" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - name: current in: query description: Current querying page. Start from 1; default:1, max:1000 schema: type: integer format: int32 example: 1 - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Ongoing Orders content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: integer format: int64 example: 100000001 loanCoin: type: string example: "BUSD" totalDebt: type: string example: "10000" residualInterest: type: string example: "10.27687923" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "49.27565492" currentLTV: type: string example: "0.57" expirationTime: type: integer format: int64 example: 1575018510000 required: - orderId - loanCoin - totalDebt - residualInterest - collateralCoin - collateralAmount - currentLTV - expirationTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/repay: post: summary: Crypto Loan Repay (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" required: true schema: type: integer format: int64 example: 123456789 - name: amount in: query description: "Repayment Amount" required: true schema: type: number format: double example: 100.5 - name: type in: query description: "Default: 1. 1 for 'repay with borrowed coin'; 2 for 'repay with collateral'." schema: type: integer format: int32 example: 1 - name: collateralReturn in: query description: "Default: TRUE. TRUE: Return extra collateral to spot account; FALSE: Keep extra collateral in the order." schema: type: boolean example: True - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Repayment Information content: application/json: schema: oneOf: - $ref: '#/components/schemas/repaymentInfo' - $ref: '#/components/schemas/repaymentInfo2' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/repay/history: get: summary: Get Loan Repayment History (USER_DATA) description: |- If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan Repayment History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "10000" collateralCoin: type: string example: "BNB" collateralUsed: type: string example: "0" collateralReturn: type: string example: "49.27565492" repayType: type: string example: "1" repayStatus: type: string example: "Repaid" description: "'repayType': '1' // 1 for 'repay with borrowed coin', 2 for 'repay with collateral' 'repayStatus': 'Repaid' // Repaid, Repaying, Failed" repayTime: type: integer format: int64 example: 1575018510000 orderId: type: integer format: int64 example: 756783308056935434 required: - loanCoin - repayAmount - collateralCoin - collateralUsed - collateralReturn - repayType - repayStatus - repayTime - orderId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/adjust/ltv: post: summary: Crypto Loan Adjust LTV (TRADE) description: |- Weight(UID): 6000 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" required: true schema: type: integer format: int64 example: 123456789 - name: amount in: query description: "Amount" required: true schema: type: number format: double example: 100.5 - name: direction in: query description: "'ADDITIONAL', 'REDUCED'" required: true schema: type: string enum: ['ADDITIONAL', 'REDUCED'] example: "ADDITIONAL" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: LTV Adjust content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" amount: type: string example: "5.235" currentLTV: type: string example: "0.52" required: - loanCoin - collateralCoin - direction - amount - currentLTV '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/ltv/adjustment/history: get: summary: Get Loan LTV Adjustment History (USER_DATA) description: |- If startTime and endTime are not sent, the recent 90-day data will be returned. The max interval between startTime and endTime is 180 days. Weight(IP): 400 tags: - Crypto Loans parameters: - name: orderId in: query description: "Order ID" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: limit in: query description: "default 10, max 100" schema: type: integer format: int64 example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: LTV Adjustment History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" amount: type: string example: "5.235" preLTV: type: string example: "0.78" afterLTV: type: string example: "0.56" adjustTime: type: integer format: int64 example: 1575018510000 orderId: type: integer format: int64 example: 756783308056935434 required: - loanCoin - collateralCoin - direction - amount - preLTV - afterLTV - adjustTime - orderId total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/loanable/data: get: summary: Get Loanable Assets Data (USER_DATA) description: |- Get interest rate and borrow limit of loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loanable Assets Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" _7dHourlyInterestRate: type: string example: "0.00000491" _7dDailyInterestRate: type: string example: "0.000118" _14dHourlyInterestRate: type: string example: "0.00000491" _14dDailyInterestRate: type: string example: "0.000118" _30dHourlyInterestRate: type: string example: "0.00000567" _30dDailyInterestRate: type: string example: "0.000136" _90dHourlyInterestRate: type: string example: "0.00000596" _90dDailyInterestRate: type: string example: "0.000143" _180dHourlyInterestRate: type: string example: "0.00000631" _180dDailyInterestRate: type: string example: "0.000151" minLimit: type: string example: "100" maxLimit: type: string example: "1000000" vipLevel: type: integer format: int32 example: 1 required: - loanCoin - _7dHourlyInterestRate - _7dDailyInterestRate - _14dHourlyInterestRate - _14dDailyInterestRate - _30dHourlyInterestRate - _30dDailyInterestRate - _90dHourlyInterestRate - _90dDailyInterestRate - _180dHourlyInterestRate - _180dDailyInterestRate - minLimit - maxLimit - vipLevel total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/collateral/data: get: summary: Get Collateral Assets Data (USER_DATA) description: |- Get LTV information and collateral limit of collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/vipLevel' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralCoin: type: string example: "BNB" initialLTV: type: string example: "0.65" marginCallLTV: type: string example: "0.75" liquidationLTV: type: string example: "0.83" maxLimit: type: string example: "1000000" vipLevel: type: integer format: int32 example: 1 required: - collateralCoin - initialLTV - marginCallLTV - liquidationLTV - maxLimit - vipLevel total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/repay/collateral/rate: get: summary: Check Collateral Repay Rate (USER_DATA) description: |- Get the the rate of collateral coin / loan coin when using collateral repay, the rate will be valid within 8 second. Weight(IP): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoinReq' - $ref: '#/components/parameters/collateralCoinReq' - name: repayAmount in: query required: true description: repay amount of loanCoin schema: type: number format: float - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BUSD" repayAmount: type: string example: "1000" rate: type: string description: rate of collateral coin/loan coin example: "300.36781234" required: - loanCoin - collateralCoin - repayAmount - rate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/loan/customize/margin_call: post: summary: Crypto Loan Customize Margin Call (TRADE) description: |- Customize margin call for ongoing orders only. Weight(UID): 6000 tags: - Crypto Loans parameters: - name: orderId in: query required: false description: Mandatory when collateralCoin is empty. Send either orderId or collateralCoin, if both parameters are sent, take orderId only. schema: type: integer format: int64 - $ref: '#/components/parameters/collateralCoin' - name: marginCall in: query required: true schema: type: number format: float - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: orderId: type: string example: "100000001" collateralCoin: type: string example: "BNB" preMarginCall: type: string example: "0.8" afterMarginCall: type: string example: "0.7" customizeTime: type: integer format: int64 example: 1575018510000 required: - orderId - collateralCoin - preMarginCall - afterMarginCall - customizeTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/borrow: post: summary: Borrow - Flexible Loan Borrow (TRADE) description: |- - Only available for master account Weight(UID): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/loanAmount' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/collateralAmount' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" loanAmount: type: string example: "100.5" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "50.5" status: type: string example: "Succeeds" required: - loanCoin - loanAmount - collateralAmount - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/ongoing/orders: get: summary: Borrow - Get Flexible Loan Ongoing Orders (USER_DATA) description: |- Weight(IP): 300 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Assets Data content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" totalDebt: type: string example: "10000" collateralCoin: type: string example: "BNB" collateralAmount: type: string example: "49.27565492" currentLTV: type: string example: "0.57" required: - loanCoin - totalDebt - collateralCoin - collateralAmount - currentLTV required: - total - rows '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/borrow/history: get: summary: Borrow - Get Flexible Loan Borrow History (USER_DATA) description: |- - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan borrow histroy content: application/json: schema: type: object properties: total: type: integer example: 1 rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" initialLoanAmount: type: string example: "10000" collateralCoin: type: string example: "BNB" initialCollateralAmount: type: string example: "49.27565492" borrowTime: type: integer format: int64 example: 1575018510000 status: type: string example: "Succeeds" required: - loanCoin - initialLoanAmount - collateralCoin - initialCollateralAmount - borrowTime - status required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/repay: post: summary: Repay - Flexible Loan Repay (TRADE) description: |- - repayAmount is mandatory even fullRepayment = FALSE Weight(IP): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - name: repayAmount in: query required: true description: repay amount of loanCoin schema: type: number format: float - name: collateralReturn in: query description: |- Default: TRUE. TRUE: Return extra collateral to earn account; FALSE: Keep extra collateral in the order, and lower LTV. schema: type: boolean example: TRUE - name: fullRepayment in: query description: |- Default: FALSE. TRUE: Full repayment; FALSE: Partial repayment, based on loanAmount schema: type: boolean example: TRUE - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan repay content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" remainingDebt: type: string example: "50.5" remainingCollateral: type: string example: "50.5" fullRepayment: type: boolean example: false currentLTV: type: string example: "50.5" repayStatus: type: string description: Repaid, Repaying, Failed example: "Repaid" required: - loanCoin - collateralCoin - remainingDebt - remainingCollateral - fullRepayment - currentLTV - repayStatus '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/repay/history: get: summary: Repay - Get Flexible Loan Repayment History (USER_DATA) description: |- - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan repay history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BUSD" repayAmount: type: string example: "10000" collateralCoin: type: string example: "BNB" collateralReturn: type: string example: "100" repayStatus: type: string example: "Repaid" repayTime: type: integer format: int64 example: 1575018510000 required: - loanCoin - repayAmount - collateralCoin - collateralReturn - repayStatus - repayTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/adjust/ltv: post: summary: Adjust LTV - Flexible Loan Adjust LTV (TRADE) description: |- - API Key needs Spot & Margin Trading permission for this endpoint Weight(UID): 6000 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - name: adjustmentAmount in: query required: true schema: type: number format: float - name: direction in: query required: true schema: type: string enum: ["ADDITIONAL", "REDUCED"] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: adjust LTV result content: application/json: schema: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" adjustmentAmount: type: string example: "5.235" currentLTV: type: string example: "0.235" required: - loanCoin - collateralCoin - direction - adjustmentAmount - currentLTV '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/ltv/adjustment/history: get: summary: Adjust LTV - Get Flexible Loan LTV Adjustment History (USER_DATA) description: |- - If startTime and endTime are not sent, the recent 90-day data will be returned. - The max interval between startTime and endTime is 180 days. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/limit' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: LTV adjustment history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BNB" collateralCoin: type: string example: "BNB" direction: type: string example: "ADDITIONAL" collateralAmount: type: string example: "5.75" preLTV: type: string example: "0.83" afterLTV: type: string example: "0.5" adjustTime: type: integer format: int64 example: 1575018510000 required: - loanCoin - collateralCoin - direction - collateralAmount - preLTV - afterLTV - adjustTime total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/loanable/data: get: summary: Get Flexible Loan Assets Data (USER_DATA) description: |- Get interest rate and borrow limit of flexible loanable assets. The borrow limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/loanCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan asset data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: loanCoin: type: string example: "BNB" flexibleInterestRate: type: string example: "0.01" flexibleMinLimit: type: string example: "100" flexibleMaxLimit: type: string example: "1000000" required: - loanCoin - flexibleInterestRate - flexibleMinLimit - flexibleMaxLimit total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/loan/flexible/collateral/data: get: summary: Get Flexible Loan Collateral Assets Data (USER_DATA) description: |- Get LTV information and collateral limit of flexible loan's collateral assets. The collateral limit is shown in USD value. Weight(IP): 400 tags: - Crypto Loans parameters: - $ref: '#/components/parameters/collateralCoin' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Loan asset data content: application/json: schema: type: object properties: rows: type: array items: type: object properties: collateralCoin: type: string example: "BNB" initialLTV: type: string example: "0.01" marginCallLTV: type: string example: "0.7" liquidationLTV: type: string example: "0.8" maxLimit: type: string example: "1000000" required: - collateralCoin - initialLTV - marginCallLTV - liquidationLTV - maxLimit total: type: integer format: int32 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/pay/transactions: get: summary: Get Pay Trade History (USER_DATA) description: |- - If startTime and endTime are not sent, the recent 90 days' data will be returned. - The max interval between startTime and endTime is 90 days. - Support for querying orders within the last 18 months. Weight(UID): 3000 tags: - Pay parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: limit in: query description: "default 100, max 100" schema: type: integer format: int32 example: 100 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Pay History content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: array items: type: object properties: orderType: type: string example: "C2C" description: "Enum:PAY(C2B Merchant Acquiring Payment), PAY_REFUND(C2B Merchant Acquiring Payment,refund), C2C(C2C Transfer Payment),CRYPTO_BOX(Crypto box), CRYPTO_BOX_RF(Crypto Box, refund), C2C_HOLDING(Transfer to new Binance user), C2C_HOLDING_RF(Transfer to new Binance user,refund), PAYOUT(B2C Disbursement Payment)" transactionId: type: string example: "M_P_71505104267788288" transactionTime: type: integer format: int64 example: 1610090460133 amount: type: string example: "23.72469206" description: "order amount(up to 8 decimal places), positive is income, negative is expenditure" currency: type: string example: "BNB" walletType: type: integer example: 1 walletTypes: type: array items: type: integer fundsDetail: type: array items: type: object properties: currency: type: string amount: type: string example: - currency: "USDT" amount: "1.2" - currency: "ETH" amount: "0.0001" required: - currency - amount payerInfo: type: object properties: name: type: string example: "Jack" type: type: string example: "USER" binanceId: type: string example: "12345678" accountId: type: string example: "67736251" required: - name - type - binanceId - accountId receiverInfo: type: object properties: name: type: string example: "Alan" type: type: string example: "MERCHANT" email: type: string example: "alan@test.com" binanceId: type: string example: "34355667" accountId: type: string example: "21326891" countryCode: type: string example: "1" phoneNumber: type: string example: "8057651210" mobileCode: type: string example: "US" extend: type: array items: type: object properties: institutionName: type: string cardNumber: type: string digitalWalletId: type: string required: - institutionName - cardNumber - digitalWalletId required: - name - type - email - binanceId - accountId - countryCode - phoneNumber - mobileCode required: - orderType - transactionId - transactionTime - amount - currency - walletType - walletTypes - fundsDetail - payerInfo - receiverInfo success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/exchangeInfo: get: summary: List All Convert Pairs description: |- Query for all convertible token pairs and the tokens’ respective upper/lower limits Weight(IP): 3000 tags: - Convert parameters: - name: fromAsset in: query required: false description: User spends coin schema: type: string example: "BTC" - name: toAsset in: query required: false description: User receives coin schema: type: string example: "USDT" responses: '200': description: List Convert Pairs content: application/json: schema: type: array items: type: object properties: fromAsset: type: string example: "BTC" toAsset: type: string example: "USDT" fromAssetMinAmount: type: string example: "0.0004" fromAssetMaxAmount: type: string example: "50" toAssetMinAmount: type: string example: "20" toAssetMaxAmount: type: string example: "2500000" required: - fromAsset - toAsset - fromAssetMinAmount - fromAssetMaxAmount - toAssetMinAmount - toAssetMaxAmount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/assetInfo: get: summary: Query order quantity precision per asset (USER_DATA) description: |- Query for supported asset precision information Weight(IP): 100 tags: - Convert parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset Precision Information content: application/json: schema: type: array items: type: object properties: asset: type: string example: "BTC" fraction: type: integer format: int32 example: 8 required: - asset - fraction '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/getQuote: post: summary: Send quote request (USER_DATA) description: |- Request a quote for the requested token pairs Weight(UID): 200 tags: - Convert parameters: - name: fromAsset in: query required: true schema: type: string example: "BTC" - name: toAsset in: query required: true schema: type: string example: "USDT" - name: fromAmount in: query required: false description: When specified, it is the amount you will be debited after the conversion schema: type: number format: float example: 1.0 - name: toAmount in: query required: false description: When specified, it is the amount you will be debited after the conversion schema: type: number format: float example: 1.0 - name: validTime in: query required: false description: 10s, 30s, 1m, 2m, default 10s schema: type: string example: 10s - name: walletType in: query required: false description: SPOT or FUNDING. Default is SPOT schema: type: string example: SPOT - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Quote Request content: application/json: schema: type: object properties: quoteId: type: string example: "12415572564" ratio: type: string example: "38163.7" inverseRatio: type: string example: "0.0000262" validTimestamp: type: integer format: int64 example: 1623319461670 toAmount: type: string example: "3816.37" fromAmount: type: string example: "0.1" required: - quoteId - ratio - inverseRatio - validTimestamp - toAmount - fromAmount '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/acceptQuote: post: summary: Accept Quote (TRADE) description: |- Accept the offered quote by quote ID. Weight(UID): 500 tags: - Convert parameters: - name: quoteId in: query required: true schema: type: string example: 1000 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Accept Quote content: application/json: schema: type: object properties: orderId: type: string example: "933256278426274426" createTime: type: integer format: int64 example: 1623381330472 orderStatus: type: string example: "PROCESS" required: - orderId - createTime - orderStatus '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/orderStatus: get: summary: Order status (USER_DATA) description: |- Query order status by order ID. Weight(UID): 100 tags: - Convert parameters: - name: orderId in: query required: false schema: type: string example: 1000 - name: quoteId in: query required: false schema: type: string example: 1000 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Order Status content: application/json: schema: type: object properties: orderId: type: integer format: int64 example: 933256278426274426 orderStatus: type: string example: "SUCCESS" fromAsset: type: string example: "BTC" fromAmount: type: string example: "0.00054414" toAsset: type: string example: "USDT" toAmount: type: string example: "20" ratio: type: string example: "36755" inverseRatio: type: string example: "0.00002721" createTime: type: integer format: int64 example: 1623381330472 required: - orderId - orderStatus - fromAsset - fromAmount - toAsset - toAmount - ratio - inverseRatio - createTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/limit/placeOrder: post: summary: Place limit order (USER_DATA) description: |- Enable users to place a limit order - baseAsset or quoteAsset can be determined via exchangeInfo endpoint. - Limit price is defined from baseAsset to quoteAsset. - Either baseAmount or quoteAmount is used. Weight(UID): 500 tags: - Convert parameters: - $ref: '#/components/parameters/baseAsset' - $ref: '#/components/parameters/quoteAsset' - name: limitPrice in: query required: true description: Symbol limit price (from baseAsset to quoteAsset) schema: type: number format: double - name: baseAmount in: query required: false description: Base asset amount. (One of baseAmount or quoteAmount is required) schema: type: number format: double - name: quoteAmount in: query required: false description: Quote asset amount. (One of baseAmount or quoteAmount is required) schema: type: number format: double - $ref: '#/components/parameters/side' - name: walletType in: query required: false description: SPOT or FUNDING or SPOT_FUNDING. It is to use which type of assets. Default is SPOT. schema: type: string enum: ['SPOT', 'FUNDING', 'SPOT_FUNDING'] example: 'SPOT' - name: expiredType in: query required: false description: 1_D, 3_D, 7_D, 30_D (D means day) schema: type: string enum: ['1_D', '3_D', '7_D', '30_D'] example: '1_D' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: content: application/json: schema: type: object properties: orderId: type: integer format: int64 example: "1603680255057330400" status: type: string example: "PROCESS" required: - orderId - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/limit/cancelOrder: post: summary: Cancel limit order (USER_DATA) description: |- Enable users to cancel a limit order Weight(UID): 200 tags: - Convert parameters: - name: orderId in: query required: true schema: type: integer format: int64 example: 1603680255057330400 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Cancel Order content: application/json: schema: type: object properties: orderId: type: integer format: int64 example: 1603680255057330400 status: type: string example: "CANCELED" required: - orderId - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/limit/queryOpenOrders: get: summary: Query limit open orders (USER_DATA) description: |- Enable users to query for all existing limit orders Weight(UID): 3000 tags: - Convert parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: All existing limit orders content: application/json: schema: type: object properties: list: type: array items: type: object properties: quoteId: type: string example: "18sdf87kh9df" orderId: type: integer format: int64 example: "1603680255057330400" orderStatus: type: string example: "SUCCESS" fromAsset: type: string example: "BNB" fromAmount: type: string example: "10" toAsset: type: string example: "USDT" toAmount: type: string example: "2317.89" ratio: type: string example: "231.789" inverseRatio: type: string example: "0.00431427" createTime: type: integer format: int64 example: 1614089498000 expiredTimestamp: type: integer format: int64 example: 1614099498000 required: - quoteId - orderId - orderStatus - fromAsset - fromAmount - toAsset - toAmount - ratio - inverseRatio - createTime - expiredTimestamp required: - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/convert/tradeFlow: get: summary: Get Convert Trade History (USER_DATA) description: |- - The max interval between startTime and endTime is 30 days. Weight(UID): 3000 tags: - Convert parameters: - name: startTime in: query required: true description: UTC timestamp in ms schema: type: integer format: int64 example: 1624248872184 - name: endTime in: query required: true description: UTC timestamp in ms schema: type: integer format: int64 example: 1624248872185 - name: limit in: query description: "default 100, max 1000" required: false schema: type: integer format: int32 example: 100 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Convert Trade History content: application/json: schema: type: object properties: list: type: array items: type: object properties: quoteId: type: string example: "f3b91c525b2644c7bc1e1cd31b6e1aa6" orderId: type: integer format: int64 example: 940708407462087200 orderStatus: type: string example: "SUCCESS" fromAsset: type: string example: "USDT" fromAmount: type: string example: "20" toAsset: type: string example: "BNB" toAmount: type: string example: "0.06154036" ratio: type: string example: "0.00307702" description: "price ratio" inverseRatio: type: string example: "324.99" description: "inverse price" createTime: type: integer format: int64 example: 1624248872184 required: - quoteId - orderId - orderStatus - fromAsset - fromAmount - toAsset - toAmount - ratio - inverseRatio - createTime startTime: type: integer format: int64 example: 1623824139000 endTime: type: integer format: int64 example: 1626416139000 limit: type: integer format: int32 example: 100 moreData: type: boolean example: false required: - list - startTime - endTime - limit - moreData '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/rebate/taxQuery: get: summary: Get Spot Rebate History Records (USER_DATA) description: |- - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. - The earliest startTime is supported on June 10, 2020 Weight(UID): 3000 tags: - Rebate parameters: - name: startTime in: query description: UTC timestamp in ms schema: type: integer format: int64 - name: endTime in: query description: UTC timestamp in ms schema: type: integer format: int64 - name: page in: query description: "default 1" schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Rebate History content: application/json: schema: type: object properties: status: type: string example: "OK" type: type: string example: "GENERAL" code: type: string example: "000000000" data: type: object properties: page: type: integer format: int32 example: 1 totalRecords: type: integer format: int32 example: 2 totalPageNum: type: integer format: int32 example: 1 data: type: array items: type: object properties: asset: type: string example: "USDT" type: type: integer format: int32 example: 1 description: "rebate type:1 is commission rebate,2 is referral kickback" amount: type: string example: "0.0001126" updateTime: type: integer format: int64 example: 1637651320000 required: - asset - type - amount - updateTime required: - page - totalRecords - totalPageNum - data required: - status - type - code - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/history/transactions: get: summary: Get NFT Transaction History (USER_DATA) description: |- - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 tags: - NFT parameters: - name: orderType in: query description: "0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee" required: true schema: type: integer format: int32 example: 1 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: NFT Transaction History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 list: type: array items: type: object properties: orderNo: type: string example: "1_470502070600699904" description: "0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee" tokens: type: array items: type: object properties: network: type: string example: "BSC" tokenId: type: string example: "216000000496" contractAddress: type: string example: "MYSTERY_BOX0000087" required: - network - tokenId - contractAddress tradeTime: type: integer format: int64 example: 1626941236000 tradeAmount: type: string example: "19.60000000" tradeCurrency: type: string example: "BNB" required: - orderNo - tokens - tradeTime - tradeAmount - tradeCurrency required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/history/deposit: get: summary: Get NFT Deposit History(USER_DATA) description: |- - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 tags: - NFT parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: NFT Deposit History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 1 list: type: array items: type: object properties: network: type: string example: "ETH" txID: type: integer nullable: true example: null contractAdrress: type: string example: "0xe507c961ee127d4439977a61af39c34eafee0dc6" tokenId: type: string example: "10014" timestamp: type: integer format: int64 example: 1629986047000 required: - network - txID - contractAdrress - tokenId - timestamp required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/history/withdraw: get: summary: Get NFT Withdraw History (USER_DATA) description: |- - The max interval between startTime and endTime is 90 days. - If startTime and endTime are not sent, the recent 7 days' data will be returned. Weight(UID): 3000 tags: - NFT parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: NFT Withdraw History content: application/json: schema: type: object properties: total: type: integer format: int32 example: 178 list: type: array items: type: object properties: network: type: string example: "ETH" txID: type: string example: "0x2be5eed31d787fdb4880bc631c8e76bdfb6150e137f5cf1732e0416ea206f57f" contractAdrress: type: string example: "0xe507c961ee127d4439977a61af39c34eafee0dc6" tokenId: type: string example: "1000001247" timestamp: type: integer format: int64 example: 1633674433000 fee: type: number example: 0.1 feeAsset: type: string example: "ETH" required: - network - txID - contractAdrress - tokenId - timestamp - fee - feeAsset required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/nft/user/getAsset: get: summary: Get NFT Asset (USER_DATA) description: 'Weight(UID): 3000' tags: - NFT parameters: - $ref: '#/components/parameters/limit50' - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset Information content: application/json: schema: type: object properties: total: type: integer format: int32 example: 347 list: type: array items: type: object properties: network: type: string example: "BSC" contractAddress: type: string example: "REGULAR11234567891779" tokenId: type: string example: "100900000017" required: - network - contractAddress - tokenId required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/createCode: post: summary: Create a Binance Code (USER_DATA) description: |- This API is for creating a Binance Code. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 tags: - Gift Card parameters: - name: token in: query description: The coin type contained in the Binance Code required: true schema: type: string - name: amount in: query required: true description: The amount of the coin schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Code creation content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: referenceNo: type: string example: "0033002327977405" code: type: string example: "AOGANK3NB4GIT3C6" expiredTime: type: integer format: int64 example: 1727417154000 required: - referenceNo - code - expiredTime success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/redeemCode: post: summary: Redeem a Binance Code (USER_DATA) description: |- This API is for redeeming the Binance Code. Once redeemed, the coins will be deposited in your funding wallet. Please note that if you enter the wrong code 5 times within 24 hours, you will no longer be able to redeem any Binance Code that day. Weight(IP): 1 tags: - Gift Card parameters: - name: code in: query description: Binance Code required: true schema: type: string - name: externalUid in: query description: Each external unique ID represents a unique user on the partner platform. The function helps you to identify the redemption behavior of different users, such as redemption frequency and amount. It also helps risk and limit control of a single account, such as daily limit on redemption volume, frequency, and incorrect number of entries. This will also prevent a single user account reach the partner's daily redemption limits. We strongly recommend you to use this feature and transfer us the User ID of your users if you have different users redeeming Binance codes on your platform. To protect user data privacy, you may choose to transfer the user id in any desired format (max. 400 characters). schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redeemed Information content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: token: type: string example: "BNB" amount: type: string example: "10" referenceNo: type: string example: "0033002327977405" identityNo: type: string example: "10316281761814589440" required: - token - amount - referenceNo - identityNo success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/verify: get: summary: Verify a Binance Code (USER_DATA) description: |- This API is for verifying whether the Binance Code is valid or not by entering Binance Code or reference number. Please note that if you enter the wrong binance code 5 times within an hour, you will no longer be able to verify any binance code for that hour. Weight(IP): 1 tags: - Gift Card parameters: - name: referenceNo in: query description: reference number required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Code Verification content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: valid: type: boolean token: type: string example: "BNB" amount: type: string example: "0.00000001" required: - valid - token - amount success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/cryptography/rsa-public-key: get: summary: Fetch RSA Public Key (USER_DATA) description: |- This API is for fetching the RSA Public Key. This RSA Public key will be used to encrypt the card code. Please note that the RSA Public key fetched is valid only for the current day. Weight(IP): 1 tags: - Gift Card parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: RSA Public Key. content: application/json: schema: type: object properties: code: type: string example: '000000' message: type: string example: success data: type: string example: >- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXBBVKLAc1GQ5FsIFFqOHrPTox5noBONIKr+IAedTR9FkVxq6e65updEbfdhRNkMOeYIO2i0UylrjGC0X8YSoIszmrVHeV0l06Zh1oJuZos1+7N+WLuz9JvlPaawof3GUakTxYWWCa9+8KIbLKsoKMdfS96VT+8iOXO3quMGKUmQIDAQAB success: type: boolean example: true required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/buyCode: post: summary: Buy a Binance Code (TRADE) description: |- This API is for buying a fixed-value Binance Code, which means your Binance Code will be redeemable to a token that is different to the token that you are paying in. If the token you’re paying and the redeemable token are the same, please use the Create Binance Code endpoint. You can use supported crypto currency or fiat token as baseToken to buy Binance Code that is redeemable to your chosen faceToken. Once successfully purchased, the amount of baseToken would be deducted from your funding wallet. To get started with, please make sure: - You have a Binance account - You have passed kyc - You have a sufficient balance in your Binance funding wallet - You need Enable Withdrawals for the API Key which requests this endpoint. Daily creation volume: 2 BTC / 24H Daily creation times: 200 Codes / 24H Weight(IP): 1 tags: - Gift Card parameters: - name: baseToken in: query description: The token you want to pay, example BUSD required: true schema: type: string - name: faceToken in: query description: The token you want to buy, example BNB. If faceToken = baseToken, it's the same as createCode endpoint. required: true schema: type: string - name: baseTokenAmount in: query required: true description: The base token asset quantity, example 1.002 schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Code creation content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: referenceNo: type: string example: "0033002327977405" code: type: string example: "AOGANK3NB4GIT3C6" expiredTime: type: integer format: int64 example: 1727417154000 required: - referenceNo - code - expiredTime success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/giftcard/buyCode/token-limit: get: summary: Fetch Token Limit (USER_DATA) description: |- This API is to help you verify which tokens are available for you to purchase fixed-value gift cards as mentioned in section 2 and it's limitation. Weight(IP): 1 tags: - Gift Card parameters: - name: baseToken in: query description: The token you want to pay, example BUSD required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Token limit content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: coin: type: string example: "BNB" fromMin: type: string example: "0.01" fromMax: type: string example: "1" required: - referenceNo - code success: type: boolean required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/target-asset/list: get: summary: Get target asset list (USER_DATA) description: |- Weight(IP): 1 tags: - Auto-Invest parameters: - name: targetAsset in: query schema: type: string - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Target asset list content: application/json: schema: type: object properties: targetAssets: type: string example: "BTC" autoInvestAssetList: type: array items: type: object properties: targetAsset: type: string example: "BTC" roiAndDimensionTypeList: type: array items: type: object properties: simulateRoi: type: string example: "5.004" dimensionValue: type: string example: "3" dimensionUnit: type: string example: "year" required: - simulateRoi - dimensionValue - dimensionUnit required: - targetAsset - roiAndDimensionTypeList '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/target-asset/roi/list: get: summary: Get target asset ROI data (USER_DATA) description: |- ROI return list for target asset Weight(IP): 1 tags: - Auto-Invest parameters: - $ref: '#/components/parameters/targetAsset' - name: hisRoiType in: query required: true schema: type: string example: FIVE_YEAR - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Target asset list content: application/json: schema: type: array items: type: object properties: date: type: string example: "1648378800000" simulateRoi: type: string example: "1.75" required: - date - simulateRoi '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/all/asset: get: summary: Query all source asset and target asset (USER_DATA) description: |- Query all source assets and target assets Weight(IP): 1 tags: - Auto-Invest parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Target asset content: application/json: schema: type: object properties: targetAssets: type: array items: type: string example: ["BTC", "BNB"] sourceAssets: type: array items: type: string example: ["BTC", "BNB"] required: - targetAssets - sourceAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/source-asset/list: get: summary: Query source asset list (USER_DATA) description: |- Query Source Asset to be used for investment Weight(IP): 1 tags: - Auto-Invest parameters: - name: targetAsset in: query schema: type: string example: BTC - name: indexId in: query schema: type: integer format: int64 example: 1 - name: usageType in: query required: true schema: type: string example: RECURRING - name: flexibleAllowedToUse in: query required: false schema: type: boolean example: true - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Asset list content: application/json: schema: type: object properties: feeRate: type: string example: "0.002" sourceAssets: type: array items: type: object properties: sourceAsset: type: string example: "USDT" assetMinAmount: type: string example: "0.1" assetMaxAmount: type: string example: "1000000" scale: type: string example: "2" flexibleAmount: type: string example: "1111" required: - sourceAsset - assetMinAmount - assetMaxAmount - scale - flexibleAmount required: - feeRate - sourceAssets '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/plan/add: post: summary: Investment plan creation (USER_DATA) description: |- Post an investment plan creation Weight(IP): 1 tags: - Auto-Invest parameters: - name: sourceType in: query required: true schema: type: string enum: [MAIN_SITE, TR] example: MAIN_SITE - name: requestId in: query schema: type: string - name: planType in: query required: true schema: type: string enum: [SINGLE, PORTFOLIO, INDEX] example: SINGLE - name: IndexId in: query schema: type: integer format: int64 - name: subscriptionAmount in: query required: true schema: type: number format: float - name: subscriptionCycle in: query required: true schema: type: string enum: [H1, H4, H8, H12, WEEKLY, DAILY, MONTHLY, BI_WEEKLY] - name: subscriptionStartDay in: query schema: type: integer - name: subscriptionStartWeekday in: query schema: type: string enum: [MON, TUE, WED, THU, FRI, SAT, SUN] - name: subscriptionStartTime in: query required: true schema: type: integer - name: sourceAsset in: query required: true schema: type: string example: "USDT" - name: flexibleAllowedToUse in: query schema: type: boolean example: true - name: details in: query required: true schema: type: array items: type: object properties: targetAsset: type: string example: "BTC" percentage: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Plan result content: application/json: schema: type: object properties: planId: type: integer example: 12345 nextExecutionDateTime: type: integer format: int64 example: 1648378800000 required: - planId - nextExecutionDateTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/plan/edit: post: summary: Investment plan adjustment description: |- Query Source Asset to be used for investment Weight(IP): 1 tags: - Auto-Invest parameters: - name: planId in: query required: true schema: type: integer - name: subscriptionAmount in: query required: true schema: type: number format: float - name: subscriptionCycle in: query required: true schema: type: string enum: [H1, H4, H8, H12, WEEKLY, DAILY, MONTHLY, BI_WEEKLY] - name: subscriptionStartDay in: query schema: type: integer - name: subscriptionStartWeekday in: query schema: type: string enum: [MON, TUE, WED, THU, FRI, SAT, SUN] - name: subscriptionStartTime in: query required: true schema: type: integer - name: sourceAsset in: query required: true schema: type: string example: "USDT" - name: flexibleAllowedToUse in: query schema: type: boolean example: true - name: details in: query schema: type: array items: type: object properties: targetAsset: type: string example: "BTC" percentage: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Plan result content: application/json: schema: type: object properties: planId: type: integer example: 12345 nextExecutionDateTime: type: integer format: int64 example: 1648378800000 required: - planId - nextExecutionDateTime '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/plan/edit-status: post: summary: Change Plan Status description: |- Change Plan Status Weight(IP): 1 tags: - Auto-Invest parameters: - name: planId in: query required: true schema: type: integer - name: status in: query required: true schema: type: string enum: [ONGOING, PAUSED, REMOVED] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Plan result content: application/json: schema: type: object properties: planId: type: integer example: 12345 nextExecutionDateTime: type: integer format: int64 example: 1648378800000 status: type: string example: "ONGOING" required: - planId - nextExecutionDateTime - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/plan/list: get: summary: Get list of plans description: |- Query plan lists Weight(IP): 1 tags: - Auto-Invest parameters: - name: planType in: query required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Plan result content: application/json: schema: type: object properties: planValueInUSD: type: string example: "123" planValueInBTC: type: string example: "0.1" pnlInUSD: type: string example: "120" roi: type: string example: "2.3" plan: type: array items: type: object properties: planId: type: integer example: 12345 planType: type: string example: "SINGLE" editAllowed: type: string example: "true" creationDateTime: type: integer format: int64 example: 1648378800000 firstExecutionDateTime: type: integer format: int64 example: 1648378800000 nextExecutionDateTime: type: integer format: int64 example: 1648378800000 status: type: string example: "ONGOING" lastUpdatedDateTime: type: integer format: int64 example: 1648378800000 targetAsset: type: string example: "BTC" totalTargetAmount: type: string example: "0.111" sourceAsset: type: string example: "BUSD" totalInvestedInUSD: type: string example: "4.555" subscriptionAmount: type: string example: "0.1" subscriptionCycle: type: string example: "WEEKLY" subscriptionStartDay: type: string example: "1" subscriptionStartWeekday: type: string example: "MON" subscriptionStartTime: type: string example: "1" sourceWallet: type: string example: "SPOT_WALLET" flexibleAllowedToUse: type: string example: "false" planValueInUSD: type: string example: "101.2" pnlInUSD: type: string example: "101.2" roi: type: string example: "1.02" required: - planId - planType - editAllowed - creationDateTime - firstExecutionDateTime - nextExecutionDateTime - status - lastUpdatedDateTime - targetAsset - totalTargetAmount - sourceAsset - totalInvestedInUSD - subscriptionAmount - subscriptionCycle - subscriptionStartDay - subscriptionStartWeekday - subscriptionStartTime - sourceWallet - flexibleAllowedToUse - planValueInUSD - pnlInUSD - roi required: - planValueInUSD - planValueInBTC - pnlInUSD - roi - plan '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/plan/id: get: summary: Query holding details of the plan description: |- Query holding details of the plan Weight(IP): 1 tags: - Auto-Invest parameters: - name: planId in: query schema: type: integer format: int64 - name: requestId in: query schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Plan result content: application/json: schema: type: object properties: planValueInUSD: type: string example: "123" planValueInBTC: type: string example: "0.1" pnlInUSD: type: string example: "120" roi: type: string example: "2.3" plan: type: array items: type: object properties: planId: type: integer example: 12345 planType: type: string example: "SINGLE" editAllowed: type: string example: "true" flexibleAllowedToUse: type: string example: "false" creationDateTime: type: integer format: int64 example: 1648378800000 firstExecutionDateTime: type: integer format: int64 example: 1648378800000 nextExecutionDateTime: type: integer format: int64 example: 1648378800000 status: type: string example: "ONGOING" targetAsset: type: string example: "BTC" sourceAsset: type: string example: "BUSD" totalInvestedInUSD: type: string example: "4.555" planValueInUSD: type: string example: "101.2" pnlInUSD: type: string example: "101.2" roi: type: string example: "1.02" details: type: array items: type: object properties: targetAsset: type: string example: "ADA" averagePriceInUSD: type: string example: "3.4" totalInvestedInUSD: type: string example: "222.21" purchasedAmount: type: string example: "122.12345678" purchasedAmountUnit: type: string example: "ADA" pnlInUSD: type: string example: "109.2" roi: type: string example: "0.1" percentage: type: string example: "50" assetStatus: type: string example: "ACTIVE" availableAmount: type: string example: "122.12345678" availableAmountUnit: type: string example: "ADA" redeemedAmout: type: string example: "122.12345678" redeemedAmoutUnit: type: string example: "ADA" assetValueInUSD: type: string example: "101.2" required: - targetAsset - averagePriceInUSD - totalInvestedInUSD - purchasedAmount - purchasedAmountUnit - pnlInUSD - roi - percentage - assetStatus - availableAmount - availableAmountUnit - redeemedAmout - redeemedAmoutUnit - assetValueInUSD required: - planId - planType - editAllowed - flexibleAllowedToUse - creationDateTime - firstExecutionDateTime - nextExecutionDateTime - status - targetAsset - sourceAsset - totalInvestedInUSD - planValueInUSD - pnlInUSD - roi - details '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/history/list: get: summary: Query subscription transaction history description: |- Query subscription transaction history of a plan Weight(IP): 1 tags: - Auto-Invest parameters: - name: planId in: query schema: type: integer format: int64 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: targetAsset in: query schema: type: number format: int64 - name: planType in: query schema: type: string enum: [SINGLE, PORTFOLIO, INDEX, ALL] - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Plan result content: application/json: schema: type: array items: type: object properties: id: type: integer format: int64 example: 12345 targetAsset: type: string example: "BTC" planType: type: string example: "SINGLE" planName: type: string example: "BTC" planId: type: integer format: int64 example: 1234 transactionDateTime: type: integer format: int64 example: 1648378800000 transactionStatus: type: string example: "SUCCESS" failedType: type: string example: "INSUFFICIENT_BALANCE" sourceAsset: type: string example: "BUSD" sourceAssetAmount: type: string example: "297.12345" targetAssetAmount: type: string example: "297.12345" sourceWallet: type: string example: "SPOT_WALLET" flexibleUsed: type: string example: "false" transactionFee: type: string example: "0.002" transactionFeeUnit: type: string example: "BUSD" executionPrice: type: string example: "2342" executionType: type: string example: "RECURRING" subscriptionCycle: type: string example: "WEEKLY" required: - id - targetAsset - planType - planName - planId - transactionDateTime - transactionStatus - failedType - sourceAsset - sourceAssetAmount - targetAssetAmount - sourceWallet - flexibleUsed - transactionFee - transactionFeeUnit - executionPrice - executionType - subscriptionCycle '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/index/info: get: summary: Query Index Details(USER_DATA) description: |- Query index details Weight(IP): 1 tags: - Auto-Invest parameters: - name: indexId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Index result content: application/json: schema: type: object properties: indexId: type: integer format: int64 example: 1 indexName: type: string example: "BINANCE TOP 10 EW" status: type: string example: "RUNNING" assetAllocation: type: array items: type: object properties: targetAsset: type: string example: "ADA" allocation: type: string example: "10" required: - targetAsset - allocation required: - indexId - indexName - status - assetAllocation '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/index/user-summary: get: summary: Query Index Linked Plan Position Details(USER_DATA) description: |- Details on users Index-Linked plan position details Weight(IP): 1 tags: - Auto-Invest parameters: - name: indexId in: query required: true schema: type: integer format: int64 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Position Details content: application/json: schema: type: object properties: indexId: type: integer format: int64 example: 1 totalInvestedInUSD: type: string example: "114.555" currentInvestedInUSD: type: string description: current invest example: "101.2" pnlInUSD: type: string description: PNL of the plan in USD based on current amount example: "101.2" roi: type: string description: ROI of the plan based on current amount example: "1.023" assetAllocation: type: array items: type: object properties: targetAsset: type: string description: for pie chart example: "ADA" allocation: type: string example: "10" required: - targetAsset - allocation details: type: array items: type: object properties: targetAsset: type: string example: "ADA" averagePriceInUSD: type: string description: average price of the asset in USD example: "3.4" totalInvestedInUSD: type: string description: total source asset invested for this target asset in equivilent of USD example: "222.21" currentInvestedInUSD: type: string description: current invest example: "101.2" purchasedAmount: type: string description: purchased amount of target asset example: "122.2" pnlInUSD: type: string description: PNL denominated in USD example: "109.2" roi: type: string description: ROI calculated in decimal example: "0.2" percentage: type: string description: asset allocation in the plan. If it's single plan, then it's 100 example: "10" availableAmount: type: string example: "122.12345678" redeemedAmount: type: string example: "122" assetValueInUSD: type: string example: "101" required: - targetAsset - averagePriceInUSD - totalInvestedInUSD - currentInvestedInUSD - purchasedAmount - pnlInUSD - roi - percentage - availableAmount - redeemedAmount - assetValueInUSD required: - indexId - totalInvestedInUSD - currentInvestedInUSD - pnlInUSD - roi - assetAllocation - details '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/one-off: post: summary: One Time Transaction(TRADE) description: |- One time transaction Weight(IP): 1 tags: - Auto-Invest parameters: - name: sourceType in: query required: true schema: type: string example: "MAIN_SITE" - name: requestId in: query schema: type: string example: "TR12354859" - name: subscriptionAmount in: query required: true schema: type: number format: float example: 10.1 - name: sourceAsset in: query required: true schema: type: string example: "USDT" - name: flexibleAllowedToUse in: query schema: type: boolean example: true - name: planId in: query schema: type: integer format: int64 example: 12345 - name: indexId in: query schema: type: integer format: int64 example: 1 - name: details in: query schema: type: array items: type: object properties: targetAsset: type: string example: "BTC" percentage: type: integer example: 40 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: transaction result content: application/json: schema: type: object properties: transactionId: type: integer format: int64 example: 12345 waitSecond: type: integer format: int32 example: 5 required: - transactionId - waitSecond '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/one-off/status: get: summary: Query One-Time Transaction Status (USER_DATA) description: |- Transaction status for one-time transaction Weight(IP): 1 tags: - Auto-Invest parameters: - name: transactionId in: query required: true schema: type: integer format: int64 example: 12345 - name: requestId in: query schema: type: string example: "TR12354859" - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: transaction result content: application/json: schema: type: object properties: transactionId: type: integer format: int64 example: 12345 status: type: string example: "SUCCESS" required: - transactionId - status '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/redeem: post: summary: Index Linked Plan Redemption (TRADE) description: |- To redeem index-Linked plan holdings Weight(IP): 1 tags: - Auto-Invest parameters: - name: indexId in: query description: PORTFOLIO plan's Id required: true schema: type: integer format: int64 example: 123456 - name: requestId in: query description: sourceType + unique, transactionId and requestId cannot be empty at the same time schema: type: string example: "TR12354859" - name: redemptionPercentage in: query description: user redeem percentage,10/20/100. required: true schema: type: integer example: 10 - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redemption result content: application/json: schema: type: object properties: redemptionId: type: integer format: int64 example: 12345 required: - redemptionId '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/redeem/history: get: summary: Index Linked Plan Redemption History (USER_DATA) description: |- Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 tags: - Auto-Invest parameters: - name: requestId in: query required: true schema: type: integer format: int64 example: 12345 - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - name: asset in: query schema: type: string example: "BTC" - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redemption history content: application/json: schema: type: array items: type: object properties: indexId: type: integer format: int64 example: 1 indexName: type: string example: "BINANCE TOP 10 EW" redemptionId: type: integer format: int64 example: 11 status: type: string example: "SUCCESS" asset: type: string example: "BTC" amount: type: string example: "0.005" redemptionDateTime: type: integer format: int64 example: 1648378800000 transactionFee: type: string example: "0" transactionFeeUnit: type: string example: "USDT" required: - indexId - indexName - redemptionId - status - asset - amount - redemptionDateTime - transactionFee - transactionFeeUnit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/lending/auto-invest/rebalance/history: get: summary: Index Linked Plan Rebalance Details (USER_DATA) description: |- Get the history of Index Linked Plan Redemption transactions Max 30 day difference between startTime and endTime If no startTime and endTime, default to show past 30 day records Weight(IP): 1 tags: - Auto-Invest parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Rebalance Details content: application/json: schema: type: array items: type: object properties: indexId: type: integer format: int64 example: 1 indexName: type: string example: "BINANCE TOP 10 EW" rebalanceId: type: integer format: int64 example: 11 status: type: string example: "SUCCESS" rebalanceFee: type: string example: "10" rebalanceFeeUnit: type: string example: "USDT" transactionDetails: type: array items: type: object properties: asset: type: string example: "BTC" transactionDateTime: type: integer format: int64 example: 1648378800000 rebalanceDirection: type: string example: "BUY" rebalanceAmount: type: string example: "0.005" required: - asset - transactionDateTime - rebalanceDirection - rebalanceAmount required: - indexId - indexName - rebalanceId - status - rebalanceFee - rebalanceFeeUnit - transactionDetails '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/eth-staking/eth/stake: post: summary: Subscribe ETH Staking V2(TRADE) description: |- Stake ETH to get WBETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 tags: - Staking parameters: - name: amount in: query required: true description: Amount in ETH, limit 4 decimals schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Subscribed WBETH content: application/json: schema: type: object properties: success: type: boolean example: true wbethAmount: type: string example: "0.23092091" conversionRatio: type: string example: "1.001212342342" description: ETH amount per 1 WBETH required: - success - wbethAmount - conversionRatio '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/eth/redeem: post: summary: Redeem ETH (TRADE) description: |- Redeem WBETH or BETH and get ETH - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 tags: - Staking parameters: - name: asset in: query required: false description: WBETH or BETH, default to BETH schema: type: string - name: amount in: query required: true description: Amount in BETH, limit 8 decimals schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Returned ETH content: application/json: schema: type: object properties: success: type: boolean example: true arrivalTime: type: integer format: int64 example: 1575018510000 ethAmount: type: string example: "0.23092091" conversionRatio: type: string example: "1.00121234" required: - success - arrivalTime - ethAmount - conversionRatio '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/eth/history/stakingHistory: get: summary: Get ETH staking history (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: ETH staking history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: time: type: integer format: int64 example: 1575018510000 asset: type: string example: "ETH" amount: type: string example: "21312.23223" status: type: string example: "SUCCESS" description: PENDING, SUCCESS, FAILED distributeAmount: type: string example: "21286.42584" conversionRatio: type: string example: "1.00121234" required: - time - asset - amount - status - distributeAmount - conversionRatio total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/eth/history/redemptionHistory: get: summary: Get ETH redemption history (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: ETH redemption history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: time: type: integer format: int64 example: 1575018510000 arrivalTime: type: integer format: int64 example: 1575018510000 asset: type: string example: "BETH" amount: type: string example: "21312.23223" status: type: string example: "SUCCESS" description: PENDING, SUCCESS, FAILED distributeAsset: type: string example: "ETH" distributeAmount: type: string example: "21338.0699" conversionRatio: type: string example: "1.00121234" required: - time - arrivalTime - asset - amount - status - distributeAsset - distributeAmount - conversionRatio total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/eth/history/rewardsHistory: get: summary: Get BETH rewards distribution history(USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: BETH rewards distribution history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: time: type: integer format: int64 example: 1575018510000 asset: type: string example: "ETH" holding: type: string example: "2.3223" description: BETH holding balance amount: type: string example: "0.23223" description: Distributed rewards annualPercentageRate: type: string example: "0.5" description: 0.5 means 50% here status: type: string example: "SUCCESS" required: - time - asset - holding - amount - annualPercentageRate - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/eth/quota: get: summary: Get current ETH staking quota (USER_DATA) description: |- Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Eth staking quota content: application/json: schema: type: object properties: leftStakingPersonalQuota: type: string example: "1000" description: Show min(Daily available limit, total personal staking quota) leftRedemptionPersonalQuota: type: string example: "1000" description: Show min(Daily personal redeem quota, total redemption limit) required: - leftStakingPersonalQuota - leftRedemptionPersonalQuota '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/eth/history/rateHistory: get: summary: Get WBETH Rate History (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: WBETH Rate History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: annualPercentageRate: type: string example: "0.5" description: BETH APR exchangeRate: type: string example: "1.00121234" description: BETH value per 1 WBETH time: type: integer format: int64 example: 1575018510000 required: - annualPercentageRate - exchangeRate - time total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v2/eth-staking/account: get: summary: ETH Staking account V2(USER_DATA) description: |- Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: ETH Staking account content: application/json: schema: type: object properties: holdingInETH: type: string example: "1.22330928" holdings: type: object properties: wbethAmount: type: string example: "1.10928781" bethAmount: type: string example: "1.90002112" required: - wbethAmount - bethAmount thirtyDaysProfitInETH: type: string example: "0.22330928" profit: type: object properties: amountFromWBETH: type: string example: "0.12330928" amountFromBETH: type: string example: "0.1" required: - amountFromWBETH - amountFromBETH required: - holdingInETH - holdings - thirtyDaysProfitInETH - profit '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/wbeth/wrap: post: summary: Wrap BETH(TRADE) description: |- - You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint. Weight(IP): 150 tags: - Staking parameters: - name: amount in: query required: true description: Amount in BETH, limit 4 decimals schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Wrap BETH content: application/json: schema: type: object properties: success: type: boolean example: true wbethAmount: type: string example: "0.22330928" exchangeRate: type: string example: "1.001212343432" required: - success - wbethAmount - exchangeRate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/wbeth/history/wrapHistory: get: summary: Get WBETH wrap history (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: WBETH wrap history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: time: type: integer format: int64 example: 1575018510000 fromAsset: type: string example: "BETH" fromAmount: type: string example: "21312.23223" toAsset: type: string example: "WBETH" toAmount: type: string example: "21312.23223" exchangeRate: type: string example: "1.01243253" description: BETH amount per 1 WBETH status: type: string example: "SUCCESS" description: PENDING, SUCCESS, FAILED required: - time - fromAsset - fromAmount - toAsset - toAmount - exchangeRate - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/wbeth/history/unwrapHistory: get: summary: Get WBETH unwrap history (USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: WBETH unwrap history content: application/json: schema: type: object properties: rows: type: array items: type: object properties: time: type: integer format: int64 example: 1575018510000 fromAsset: type: string example: "WBETH" fromAmount: type: string example: "21312.23223" toAsset: type: string example: "BETH" toAmount: type: string example: "21312.23223" exchangeRate: type: string example: "1.01243253" description: BETH amount per 1 WBETH status: type: string example: "SUCCESS" description: PENDING, SUCCESS, FAILED required: - time - fromAsset - fromAmount - toAsset - toAmount - exchangeRate - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/eth-staking/eth/history/wbethRewardsHistory: get: summary: Get WBETH rewards history(USER_DATA) description: |- - The time between startTime and endTime cannot be longer than 3 months. - If startTime and endTime are both not sent, then the last 30 days' data will be returned. - If startTime is sent but endTime is not sent, the next 30 days' data beginning from startTime will be returned. - If endTime is sent but startTime is not sent, the 30 days' data before endTime will be returned. Weight(IP): 150 tags: - Staking parameters: - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: WBETH rewards history content: application/json: schema: type: object properties: estRewardsInETH: type: string example: "1.23230920" rows: type: array items: type: object properties: time: type: integer format: int64 example: 1575018510000 amountInETH: type: string example: "0.23223" description: Estimated rewards accrued within WBETH holding: type: string example: "2.3223" description: WBETH holding balance holdingInETH: type: string example: "2.4231" annualPercentageRate: type: string example: "0.5" required: - time - amountInETH - holding - holdingInETH - annualPercentageRate total: type: integer format: int64 example: 1 required: - estRewardsInETH - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/copyTrading/futures/userStatus: get: summary: Get Futures Lead Trader Status(TRADE) description: |- Get Futures Lead Trader Status Weight(UID): 20 tags: - Copy Trading parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Lead Trader Status content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: isLeadTrader: type: boolean example: true time: type: integer format: int64 example: 1717382310843 required: - isLeadTrader - time success: type: boolean example: true required: - code - message - data - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/copyTrading/futures/leadSymbol: get: summary: Get Futures Lead Trading Symbol Whitelist(USER_DATA) description: |- Get Futures Lead Trading Symbol Whitelist Weight(IP): 20 tags: - Copy Trading parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Futures Lead Trading Symbol Whitelist content: application/json: schema: type: object properties: code: type: string example: "000000" message: type: string example: "success" data: type: object properties: symbol: type: string example: "BTCUSDT" baseAsset: type: string example: "BTC" quoteAsset: type: string example: "USDT" required: - symbol - baseAsset - quoteAsset required: - code - message - data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/list: get: summary: Get Simple Earn Flexible Product List (USER_DATA) description: |- Get available Simple Earn flexible product list Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string example: BTC - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Simple Earn Flexible Product List content: application/json: schema: type: object properties: rows: type: array items: type: object properties: asset: type: string example: "BTC" latestAnnualPercentageRate: type: string example: "0.05000000" tierAnnualPercentageRate: type: object properties: 0-5BTC: type: number format: double example: 0.05 5-10BTC: type: number format: double example: 0.03 required: - 0-5BTC - 5-10BTC airDropPercentageRate: type: string example: "0.05000000" canPurchase: type: boolean example: true canRedeem: type: boolean example: true isSoldOut: type: boolean example: true hot: type: boolean example: true minPurchaseAmount: type: string example: "0.01000000" productId: type: string example: "BTC001" subscriptionStartTime: type: string example: "1646182276000" status: type: string example: "PURCHASING" required: - asset - latestAnnualPercentageRate - tierAnnualPercentageRate - airDropPercentageRate - canPurchase - canRedeem - isSoldOut - hot - minPurchaseAmount - productId - subscriptionStartTime - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/list: get: summary: Get Simple Earn Locked Product List (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string example: BNB - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Simple Earn Locked Product List content: application/json: schema: type: object properties: rows: type: array items: type: object properties: projectId: type: string example: "BNB" detail: type: object properties: asset: type: string example: "AXS" rewardAsset: type: string example: "AXS" duration: type: integer format: int64 example: 90 renewable: type: boolean example: true isSoldOut: type: boolean example: true apr: type: string example: "1.2069" status: type: string example: "CREATED" subscriptionStartTime: type: string example: "1646182276000" extraRewardAsset: type: string example: "BNB" extraRewardAPR: type: string example: "0.23" required: - asset - rewardAsset - duration - renewable - isSoldOut - apr - status - subscriptionStartTime - extraRewardAsset - extraRewardAPR quota: type: object properties: totalPersonalQuota: type: string example: "2" minimum: type: string example: "0.001" required: - totalPersonalQuota - minimum required: - projectId - detail - quota total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/subscribe: post: summary: Subscribe Flexible Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - name: autoSubscribe in: query description: "true or false, default true." schema: type: boolean - name: sourceAccount in: query description: "SPOT,FUND,ALL, default SPOT" schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Subscription Response content: application/json: schema: type: object properties: purchaseId: type: integer format: int64 example: 40607 success: type: boolean example: true required: - purchaseId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/subscribe: post: summary: Subscribe Locked Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: projectId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - name: autoSubscribe in: query description: "true or false, default true." schema: type: boolean - name: sourceAccount in: query description: "SPOT,FUND,ALL, default SPOT" schema: type: string - name: redeemTo in: query description: SPOT,FLEXIBLE, default FLEXIBLE schema: type: string enum: ['SPOT', 'FLEXIBLE'] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Product Subscription Response content: application/json: schema: type: object properties: purchaseId: type: integer format: int64 example: 40607 positionId: type: string example: "12345" success: type: boolean example: true required: - purchaseId - positionId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/redeem: post: summary: Redeem Flexible Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: redeemAll in: query description: "true or false, default to false" schema: type: boolean - name: amount in: query description: "if redeemAll is false, amount is mandatory" schema: type: number format: double - name: destAccount in: query description: "SPOT,FUND,ALL, default SPOT" schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redeem Flexible Product content: application/json: schema: type: object properties: redeemId: type: integer format: int64 example: 40607 success: type: boolean example: true required: - redeemId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/redeem: post: summary: Redeem Locked Product (TRADE) description: |- Weight(IP): 1 Rate Limit: 1/3s per account tags: - Simple Earn parameters: - name: positionId in: query required: true description: "1234" schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Redeem Locked Product content: application/json: schema: type: object properties: redeemId: type: integer format: int64 example: 40607 success: type: boolean example: true required: - redeemId - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/position: get: summary: Get Flexible Product Position (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string - name: productId in: query schema: type: string - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Position content: application/json: schema: type: object properties: rows: type: array items: type: object properties: totalAmount: type: string example: "75.46000000" tierAnnualPercentageRate: type: object properties: 0-5BTC: type: number format: double example: 0.05 5-10BTC: type: number format: double example: 0.03 required: - 0-5BTC - 5-10BTC latestAnnualPercentageRate: type: string example: "0.02599895" yesterdayAirdropPercentageRate: type: string example: "0.02599895" asset: type: string example: "USDT" airDropAsset: type: string example: "BETH" canRedeem: type: boolean example: true collateralAmount: type: string example: "232.23123213" productId: type: string example: "USDT001" yesterdayRealTimeRewards: type: string example: "0.10293829" cumulativeBonusRewards: type: string example: "0.22759183" cumulativeRealTimeRewards: type: string example: "0.22759183" cumulativeTotalRewards: type: string example: "0.45459183" autoSubscribe: type: boolean example: true required: - totalAmount - tierAnnualPercentageRate - latestAnnualPercentageRate - yesterdayAirdropPercentageRate - asset - airDropAsset - canRedeem - collateralAmount - productId - yesterdayRealTimeRewards - cumulativeBonusRewards - cumulativeRealTimeRewards - cumulativeTotalRewards - autoSubscribe total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/position: get: summary: Get Locked Product Position (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: asset in: query schema: type: string - name: positionId in: query schema: type: string - name: projectId in: query schema: type: string - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Product Position content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" parentPositionId: type: string example: "123122" projectId: type: string example: "Axs*90" asset: type: string example: "AXS" amount: type: string example: "122.09202928" purchaseTime: type: string example: "1646182276000" duration: type: string example: "60" accrualDays: type: string example: "4" rewardAsset: type: string example: "AXS" APY: type: string example: "0.23" rewardAmt: type: string description: "Earned amount" example: "5.17181528" extraRewardAsset: type: string description: Rewards assets of extra staking type example: "BNB" extraRewardAPR: type: string description: APR of extra staking type example: "0.0203" estExtraRewardAmt: type: string description: Rewards of extra staking type, distribute when order expires example: "5.17181528" nextPay: type: string description: Next estimated rewards payment example: "1.29295383" nextPayDate: type: string description: Next rewards payment date example: "1646697600000" payPeriod: type: string description: Payment cycle example: "1" redeemAmountEarly: type: string description: Early redemption amount example: "2802.24068892" rewardsEndDate: type: string description: Rewards accrual end date example: "1651449600000" deliverDate: type: string description: Redemption arrival time example: "1651536000000" redeemPeriod: type: string description: Redemption interval example: "1" redeemingAmt: type: string description: Amount under redemption example: "232.2323" redeemTo: type: string description: Redeem to Flexible product or Spot wallet example: "FLEXIBLE" partialAmtDeliverDate: type: string description: Arrival time of partial redemption amount of order example: "1651536000000" canRedeemEarly: type: boolean description: When it is true, early redemption can be operated example: true canFastRedemption: type: boolean description: When it is true, fast redemption can be operated example: true autoSubscribe: type: boolean description: When it is true, auto staking can be operated example: true type: type: string description: Order type is auto subscribe or normal example: "AUTO" status: type: string example: "HOLDING" canReStake: type: boolean example: true required: - positionId - parentPositionId - projectId - asset - amount - purchaseTime - duration - accrualDays - rewardAsset - APY - rewardAmt - extraRewardAsset - extraRewardAPR - estExtraRewardAmt - nextPay - nextPayDate - payPeriod - redeemAmountEarly - rewardsEndDate - deliverDate - redeemPeriod - redeemingAmt - redeemTo - partialAmtDeliverDate - canRedeemEarly - canFastRedemption - autoSubscribe - type - status - canReStake total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/account: get: summary: Simple Account (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Account Information content: application/json: schema: type: object properties: totalAmountInBTC: type: string example: "0.01067982" totalAmountInUSDT: type: string example: "77.13289230" totalFlexibleAmountInBTC: type: string example: "0.00000000" totalFlexibleAmountInUSDT: type: string example: "0.00000000" totalLockedInBTC: type: string example: "0.01067982" totalLockedInUSDT: type: string example: "77.13289230" required: - totalAmountInBTC - totalAmountInUSDT - totalFlexibleAmountInBTC - totalFlexibleAmountInUSDT - totalLockedInBTC - totalLockedInUSDT '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/subscriptionRecord: get: summary: Get Flexible Subscription Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - name: purchaseId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Position content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "100.00000000" asset: type: string example: "USDT" time: type: integer format: int64 example: 1575018510000 purchaseId: type: integer format: int64 example: 26055 productId: type: string example: "USDT001" type: type: string example: "AUTO" description: "AUTO for auto subscribe, NORMAL for normal subscription, CONVERT for Locked to Flexible, LOAN for flexible loan collateral, AI for Auto Invest subscribe, TRANSFER for Locked Savings to Flexible" sourceAccount: type: string example: "SPOT" description: "SPOT, FUNDING, SPOTANDFUNDING" amtFromSpot: type: string example: "30" description: "Display if sourceAccount is SPOTANDFUNDING " amtFromFunding: type: string example: "70" description: "Display if sourceAccount is SPOTANDFUNDING" status: type: string example: "SUCCESS" description: "PURCHASING/SUCCESS/FAILED" required: - amount - asset - time - purchaseId - productId - type - sourceAccount - amtFromSpot - amtFromFunding - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/history/subscriptionRecord: get: summary: Get Locked Subscription Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: purchaseId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Subscription Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" purchaseId: type: integer format: int64 example: 26055 projectId: type: string example: "Axs*90" time: type: integer format: int64 example: 1575018510000 asset: type: string example: "BNB" amount: type: string example: "21312.23223" lockPeriod: type: string example: "30" type: type: string example: "AUTO" description: "NORMAL for normal subscription, AUTO for auto-subscription order, ACTIVITY for activity order, TRIAL for trial fund order, RESTAKE for restake order" sourceAccount: type: string example: "SPOT" description: "SPOT, FUNDING, SPOTANDFUNDING" amtFromSpot: type: string example: "30" description: "Display if sourceAccount is SPOTANDFUNDING " amtFromFunding: type: string example: "70" description: "Display if sourceAccount is SPOTANDFUNDING" status: type: string example: "SUCCESS" description: "PURCHASING/SUCCESS/FAILED" required: - positionId - purchaseId - projectId - time - asset - amount - lockPeriod - type - sourceAccount - amtFromSpot - amtFromFunding - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/redemptionRecord: get: summary: Get Flexible Redemption Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - name: redeemId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' security: - ApiKeyAuth: [] responses: '200': description: Flexible Redemption Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "10.54000000" asset: type: string example: "USDT" time: type: integer format: int64 example: 1577257222000 projectId: type: string example: "USDT001" redeemId: type: integer format: int64 example: 40607 destAccount: type: string example: "SPOT" description: "SPOT, FUNDING" status: type: string example: "PAID" required: - amount - asset - time - projectId - redeemId - destAccount - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/history/redemptionRecord: get: summary: Get Locked Redemption Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: positionId in: query schema: type: string - name: redeemId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Redemption Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" redeemId: type: integer format: int64 example: 40607 time: type: integer format: int64 example: 1575018510000 asset: type: string example: "BNB" lockPeriod: type: string example: "30" amount: type: string example: "21312.23223" originalAmount: type: string example: "21312.23223" type: type: string example: "MATURE" description: "MATURE for redeem to Spot Wallet, NEW_TRANSFERRED for redeem to Flexible product, AHEAD for early redemption" deliverDate: type: string example: "1575018510000" lossAmount: type: string description: Loss of profit on early redemption example: "0.00001232" isComplete: type: boolean example: true, rewardAsset: type: string example: "AXS" rewardAmt: type: string example: "5.17181528" extraRewardAsset: type: string example: "BNB" estExtraRewardAmt: type: string example: "5.17181528" status: type: string example: "PAID" required: - positionId - redeemId - time - asset - lockPeriod - amount - originalAmount - type - deliverDate - lossAmount - isComplete - rewardAsset - rewardAmt - extraRewardAsset - estExtraRewardAmt - status total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/rewardsRecord: get: summary: Get Flexible Rewards History (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - name: type in: query required: true description: '"BONUS", "REALTIME", "REWARDS"' schema: type: string security: - ApiKeyAuth: [] responses: '200': description: Flexible Rewards History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: asset: type: string example: "BUSD" rewards: type: string example: "0.00006408" projectId: type: string example: "USDT001" type: type: string example: "BONUS" time: type: integer format: int64 example: 1577257222000 required: - asset - rewards - projectId - type - time total: type: integer format: int64 example: 2 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/history/rewardsRecord: get: summary: Get Locked Rewards History (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: positionId in: query schema: type: string - name: asset in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Rewards History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: positionId: type: string example: "123123" time: type: integer format: int64 example: 1577257222000 asset: type: string example: "BNB" lockPeriod: type: string example: "30" amount: type: string example: "21312.23223" required: - positionId - time - asset - lockPeriod - amount total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/setAutoSubscribe: post: summary: Set Flexible Auto Subscribe (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: autoSubscribe in: query required: true description: "true or false" schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Product Subscription Response content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/setAutoSubscribe: post: summary: Set Locked Auto Subscribe (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: positionId in: query required: true schema: type: string - name: autoSubscribe in: query required: true description: "true or false" schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Auto Subscribe content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/personalLeftQuota: get: summary: Get Flexible Personal Left Quota (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Personal Left Quota content: application/json: schema: type: object properties: leftPersonalQuota: type: string example: "1000" required: - leftPersonalQuota '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/personalLeftQuota: get: summary: Get Locked Personal Left Quota (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: projectId in: query required: true schema: type: string - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Personal Left Quota content: application/json: schema: type: object properties: leftPersonalQuota: type: string example: "1000" required: - leftPersonalQuota '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/subscriptionPreview: get: summary: Get Flexible Subscription Preview (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Flexible Subscription Preview content: application/json: schema: type: object properties: totalAmount: type: string example: "1232.32230982" rewardAsset: type: string example: "BUSD" airDropAsset: type: string example: "BETH" estDailyBonusRewards: type: string example: "0.22759183" estDailyRealTimeRewards: type: string example: "0.22759183" estDailyAirdropRewards: type: string example: "0.22759183" required: - totalAmount - rewardAsset - airDropAsset - estDailyBonusRewards - estDailyRealTimeRewards - estDailyAirdropRewards '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/subscriptionPreview: get: summary: Get Locked Subscription Preview (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: projectId in: query required: true schema: type: string - name: amount in: query required: true schema: type: number format: double - name: autoSubscribe in: query description: "true or false, default true." schema: type: boolean - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Product Subscription Response content: application/json: schema: type: array items: type: object properties: rewardAsset: type: string example: "AXS" totalRewardAmt: type: string example: "5.17181528" extraRewardAsset: type: string example: "BNB" estTotalExtraRewardAmt: type: string example: "5.17181528" nextPay: type: string example: "1.29295383" nextPayDate: type: string example: "1646697600000" valueDate: type: string example: "1646697600000" rewardsEndDate: type: string example: "1651449600000" deliverDate: type: string example: "1651536000000" nextSubscriptionDate: type: string example: "1651536000000" required: - rewardAsset - totalRewardAmt - extraRewardAsset - estTotalExtraRewardAmt - nextPay - nextPayDate - valueDate - rewardsEndDate - deliverDate - nextSubscriptionDate '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/locked/setRedeemOption: get: summary: Set Locked Product Redeem Option(USER_DATA) description: |- Set redeem option for Locked product Weight(IP): 50 tags: - Simple Earn parameters: - name: positionId in: query required: true schema: type: string - name: redeemTo in: query description: SPOT,FLEXIBLE, default FLEXIBLE schema: type: string enum: ['SPOT', 'FLEXIBLE'] - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Locked Product Redeem Option content: application/json: schema: type: object properties: success: type: boolean example: true required: - success '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/rateHistory: get: summary: Get Rate History (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query required: true schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Rate History content: application/json: schema: type: object properties: rows: type: array items: type: object properties: productId: type: string example: "BUSD001" asset: type: string example: "BUSD" annualPercentageRate: type: string example: "0.00006408" time: type: integer format: int64 example: 1577233578000 required: - productId - asset - annualPercentageRate - time total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/simple-earn/flexible/history/collateralRecord: get: summary: Get Collateral Record (USER_DATA) description: |- Weight(IP): 150 tags: - Simple Earn parameters: - name: productId in: query schema: type: string - $ref: '#/components/parameters/startTime' - $ref: '#/components/parameters/endTime' - $ref: '#/components/parameters/current' - $ref: '#/components/parameters/size' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Collateral Record content: application/json: schema: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "100.00000000" productId: type: string example: "BUSD001" asset: type: string example: "USDT" createTime: type: integer format: int64 example: 1575018510000 type: type: string example: "REPAY" productName: type: string example: "USDT" orderId: type: integer format: int64 example: 26055 required: - amount - productId - asset - createTime - type - productName - orderId total: type: integer format: int64 example: 1 required: - rows - total '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/dci/product/list: get: summary: Get Dual Investment product list(USER_DATA) description: |- Get Dual Investment product list Weight(IP): 1 tags: - Dual Investment parameters: - name: optionType in: query required: true description: Input CALL or PUT schema: type: string enum: ['CALL', 'PUT'] - name: exercisedCoin in: query required: true description: |- Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; schema: type: string - name: investCoin in: query required: true description: |- Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: - optionType: CALL, - exercisedCoin: USDT, - investCoin: BNB; if you subscribe to a low buy product (put option), you should input: - optionType: PUT, - exercisedCoin: BNB, - investCoin: USDT; schema: type: string - $ref: '#/components/parameters/smallPageSize' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dual Investment product list content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 list: type: array items: type: object properties: id: type: string example: "741590" investCoin: type: string example: "USDT" exercisedCoin: type: string example: "BNB" strikePrice: type: string example: "380" duration: type: integer format: int32 example: 4 settleDate: type: integer format: int64 example: 1709020800000 purchaseDecimal: type: integer format: int32 example: 8 purchaseEndTime: type: integer format: int64 example: 1708934400000 canPurchase: type: boolean example: true apr: type: string example: "0.6076" orderId: type: integer format: int64 example: 8257205859 minAmount: type: string example: "0.1" maxAmount: type: string example: "25265.7" createTimestamp: type: integer format: int64 example: 1708560084000 optionType: type: string example: "PUT" isAutoCompoundEnable: type: boolean example: true autoCompoundPlanList: type: array items: type: string example: - "STANDARD" - "ADVANCE" required: - id - investCoin - exercisedCoin - strikePrice - duration - settleDate - purchaseDecimal - purchaseEndTime - canPurchase - apr - orderId - minAmount - maxAmount - createTimestamp - optionType - isAutoCompoundEnable - autoCompoundPlanList required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/dci/product/subscribe: post: summary: Subscribe Dual Investment products(USER_DATA) description: |- Subscribe Dual Investment products - `Products are not available.` means that the APR changes to lower value, or the orders are not available. - `Failed` is a system or network errors. Weight(IP): 1 tags: - Dual Investment parameters: - name: id in: query required: true description: get id from /sapi/v1/dci/product/list schema: type: string - name: orderId in: query required: true description: get orderId from /sapi/v1/dci/product/list schema: type: string - name: depositAmount in: query required: true schema: type: number format: double - $ref: '#/components/parameters/autoCompoundPlan' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dual Investment product subscription response content: application/json: schema: type: object properties: positionId: type: integer format: int64 example: 10208824 investCoin: type: string example: "BNB" exercisedCoin: type: string example: "USDT" subscriptionAmount: type: string example: "0.002" duration: type: integer format: int32 example: 4 autoCompoundPlan: type: string description: STANDARD, ADVANCED, this field won't display when autocompound is set to None example: "STANDARD" strikePrice: type: string example: "380" settleDate: type: integer format: int64 example: 1709020800000 purchaseStatus: type: string example: "PURCHASE_SUCCESS" apr: type: string example: "0.7397" orderId: type: integer format: int64 example: 8259117597 purchaseTime: type: integer format: int64 example: 1708677583874 optionType": type: string example: "CALL" required: - positionId - investCoin - exercisedCoin - subscriptionAmount - duration - autoCompoundPlan - strikePrice - settleDate - purchaseStatus - apr - orderId - purchaseTime - optionType '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/dci/product/positions: get: summary: Get Dual Investment positions(USER_DATA) description: |- Get Dual Investment positions (batch) Weight(IP): 1 tags: - Dual Investment parameters: - name: status in: query description: |- - PENDING: Products are purchasing, will give results later; - PURCHASE_SUCCESS: purchase successfully; - SETTLED: Products are finish settling; - PURCHASE_FAIL: fail to purchase; - REFUNDING: refund ongoing; - REFUND_SUCCESS: refund to spot account successfully; - SETTLING: Products are settling. If don't fill this field, will response all the position status. schema: type: string enum: ['PENDING', 'PURCHASE_SUCCESS', 'SETTLED', 'PURCHASE_FAIL', 'REFUNDING', 'REFUND_SUCCESS', 'SETTLING'] - $ref: '#/components/parameters/smallPageSize' - $ref: '#/components/parameters/pageIndex' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dual Investment product list content: application/json: schema: type: object properties: total: type: integer format: int64 example: 1 list: type: array items: type: object properties: id: type: string example: "741590" investCoin: type: string example: "USDT" exercisedCoin: type: string example: "BNB" subscriptionAmount: type: string example: "0.5" strikePrice: type: string example: "380" duration: type: integer format: int32 example: 4 settleDate: type: integer format: int64 example: 1709020800000 purchaseStatus: type: string example: "PURCHASE_SUCCESS" apr: type: string example: "0.0365" orderId: type: integer format: int64 example: 7973677530 purchaseEndTime: type: integer format: int64 example: 1708329600000 optionType: type: string example: "PUT" autoCompoundPlan: type: string example: "STANDARD" required: - id - investCoin - exercisedCoin - subscriptionAmount - strikePrice - duration - settleDate - purchaseStatus - apr - orderId - purchaseEndTime - optionType - autoCompoundPlan required: - total - list '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/dci/product/accounts: get: summary: Check Dual Investment accounts(USER_DATA) description: |- Check Dual Investment accounts Weight(IP): 1 tags: - Dual Investment parameters: - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Dual Investment accounts content: application/json: schema: type: object properties: totalAmountInBTC: type: string description: Total BTC amounts in Dual Investment example: "0.01067982" totalAmountInUSDT: type: string description: Total USDT equivalents in BTC in Dual Investment example: "77.13289230" required: - totalAmountInBTC - totalAmountInUSDT '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' /sapi/v1/dci/product/auto_compound/edit-status: post: summary: Change Auto-Compound status(USER_DATA) description: |- Change Auto-Compound status - 15:31 ~ 16:00 UTC+8 This function is disabled Weight(IP): 1 Rate Limit: Maximum 1 time/s per account tags: - Dual Investment parameters: - name: positionId in: query required: true description: Get positionId from /sapi/v1/dci/product/positions schema: type: integer format: int64 - $ref: '#/components/parameters/autoCompoundPlan' - $ref: '#/components/parameters/recvWindow' - $ref: '#/components/parameters/timestamp' - $ref: '#/components/parameters/signature' security: - ApiKeyAuth: [] responses: '200': description: Change Auto-Compound status response content: application/json: schema: type: object properties: positionId: type: string example: 123456789 autoCompoundPlan: type: string description: NONE, STANDARD, ADVANCED example: "ADVANCED" required: - positionId - autoCompoundPlan '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error' '401': description: Unauthorized Request content: application/json: schema: $ref: '#/components/schemas/error' components: parameters: getCrossMargingTransferHistoryType: name: type in: query schema: type: string enum: [ROLL_IN, ROLL_OUT] spotBNBBurn: name: spotBNBBurn in: query description: Determines whether to use BNB to pay for trading fees on SPOT schema: type: string enum: ['true','false'] example: 'true' interestBNBBurn: name: interestBNBBurn in: query description: Determines whether to use BNB to pay for margin loan interest schema: type: string enum: ['true','false'] example: 'false' depositHistory: name: status in: query description: |- * `0` - pending * `6` - credited but cannot withdraw * `1` - success schema: type: integer format: int32 withdrawHistory: name: status in: query description: |- * `0` - Email Sent * `1` - Cancelled * `2` - Awaiting Approval * `3` - Rejected * `4` - Processing * `5` - Failure * `6` - Completed schema: type: integer format: int32 minimum: 0 maximum: 6 queryConvertTransfer: name: accountType in: query description: "MAIN: main account. CARD: funding account. If it is blank, we will query spot and card wallet, otherwise, we just query the corresponding wallet" schema: type: string enum: ['MAIN', 'CARD'] querySubAccountList: name: isFreeze in: query schema: type: string enum: ['true', 'false'] asset: name: asset in: query required: true schema: type: string example: 'BTC' amount: name: amount in: query required: true schema: type: number format: double example: '1.01' current: name: current in: query description: Current querying page. Start from 1. Default:1 schema: type: integer format: int32 example: 1 optionalCoin: name: coin in: query description: Coin name schema: type: string example: 'BNB' coin: name: coin in: query required: true description: Coin name schema: type: string example: 'BNB' side: name: side in: query required: true schema: type: string enum: ['SELL', 'BUY'] example: 'SELL' optionalSide: name: side in: query schema: type: string enum: ['SELL', 'BUY'] example: 'SELL' positionSide: name: positionSide in: query description: Default BOTH for One-way Mode ; LONG or SHORT for Hedge Mode. It must be sent in Hedge Mode. schema: type: string enum: ['BOTH', 'LONG', 'SHORT'] example: 'BOTH' size: name: size in: query description: Default:10 Max:100 schema: type: integer format: int32 example: 100 symbol: name: symbol in: query required: true description: Trading symbol, e.g. BNBUSDT schema: type: string example: 'BNBUSDT' optionalSymbol: name: symbol in: query description: Trading symbol, e.g. BNBUSDT schema: type: string example: 'BNBUSDT' optionalAsset: name: asset in: query schema: type: string example: 'BNB' limit: name: limit in: query description: Default 500; max 1000. schema: type: integer format: int32 example: 5 limit50: name: limit in: query description: Default 50, Max 50 schema: type: integer format: int32 example: 50 listenKey: name: listenKey in: query description: User websocket listen key schema: type: string example: 'pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1' fromId: name: fromId in: query description: Trade id to fetch from. Default gets most recent trades. schema: type: integer format: int64 offset: name: offset in: query schema: type: integer format: int32 orderId: name: orderId in: query description: Order id schema: type: integer format: int64 orderListId: name: orderListId in: query description: Order list id schema: type: integer format: int64 origClientOrderId: name: origClientOrderId in: query description: Order id from client schema: type: string listClientOrderId: name: listClientOrderId in: query description: A unique Id for the entire orderList schema: type: string newClientOrderId: name: newClientOrderId in: query description: Used to uniquely identify this cancel. Automatically generated by default schema: type: string strategyId: name: strategyId in: query schema: type: integer format: int64 strategyType: name: strategyType in: query description: "The value cannot be less than 1000000." schema: type: integer format: int64 newOrderRespType: name: newOrderRespType in: query description: Set the response JSON. MARKET and LIMIT order types default to FULL, all other orders default to ACK. schema: type: string enum: [ACK,RESULT,FULL] selfTradePreventionMode: name: selfTradePreventionMode in: query description: The allowed enums is dependent on what is configured on the symbol. The possible supported values are EXPIRE_TAKER, EXPIRE_MAKER, EXPIRE_BOTH, NONE. schema: type: string enum: ['EXPIRE_TAKER','EXPIRE_MAKER','EXPIRE_BOTH', 'NONE'] example: 'EXPIRE_TAKER' ocoNewOrderRespType: name: newOrderRespType in: query description: Set the response JSON. schema: type: string enum: [ACK,RESULT,FULL] startTime: name: startTime in: query description: UTC timestamp in ms schema: type: integer format: int64 endTime: name: endTime in: query description: UTC timestamp in ms schema: type: integer format: int64 startTimeReq: name: startTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 endTimeReq: name: endTime in: query description: UTC timestamp in ms required: true schema: type: integer format: int64 collateralCoinReq: name: collateralCoin in: query description: "Coin used as collateral" required: true schema: type: string example: "BNB" collateralCoin: name: collateralCoin in: query description: "Coin used as collateral" schema: type: string example: "BNB" collateralAmount: name: collateralAmount in: query schema: type: number format: float example: 50.5 loanCoinReq: name: loanCoin in: query description: "Coin loaned" required: true schema: type: string example: "BUSD" loanCoin: name: loanCoin in: query description: "Coin loaned" schema: type: string example: "BUSD" loanAmount: name: loanAmount in: query description: Loan amount schema: type: number format: float example: 100.1 price: name: price in: query required: true description: Order price schema: type: number format: double example: 218.0 optionalPrice: name: price in: query description: Order price schema: type: number format: double example: 219.0 quantity: name: quantity in: query required: true schema: type: number format: double example: 1.0 optionalQuantity: name: quantity in: query description: Order quantity schema: type: number format: double example: 1 recvWindow: name: recvWindow in: query description: The value cannot be greater than 60000 schema: type: integer format: int64 example: 5000 timestamp: name: timestamp in: query required: true description: UTC timestamp in ms schema: type: integer format: int64 timeInForce: name: timeInForce in: query description: Order time in force schema: type: string enum: [GTC,IOC,FOK] example: 'GTC' type: name: type in: query required: true schema: type: integer format: int64 orderType: name: type in: query required: true description: Order type schema: type: string enum: [LIMIT,MARKET,STOP_LOSS,STOP_LOSS_LIMIT,TAKE_PROFIT,TAKE_PROFIT_LIMIT,LIMIT_MAKER] example: 'LIMIT' univTransferType: name: type in: query required: true description: Universal transfer type schema: type: string enum: ['MAIN_C2C','MAIN_UMFUTURE','MAIN_CMFUTURE','MAIN_MARGIN','MAIN_MINING','C2C_MAIN','C2C_UMFUTURE','C2C_MINING','C2C_MARGIN','UMFUTURE_MAIN','UMFUTURE_C2C','UMFUTURE_MARGIN','CMFUTURE_MAIN','CMFUTURE_MARGIN','MARGIN_MAIN','MARGIN_UMFUTURE','MARGIN_CMFUTURE','MARGIN_MINING','MARGIN_C2C','MINING_MAIN','MINING_UMFUTURE','MINING_C2C','MINING_MARGIN','MAIN_PAY','PAY_MAIN', 'ISOLATEDMARGIN_MARGIN', 'MARGIN_ISOLATEDMARGIN', 'ISOLATEDMARGIN_ISOLATEDMARGIN'] example: 'MAIN_C2C' signature: name: signature in: query required: true description: Signature schema: type: string stopPrice: name: stopPrice in: query description: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. schema: type: number format: double example: 221.01 isIsolatedMargin: name: isIsolated in: query description: |- * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin schema: type: string enum: ['TRUE','FALSE'] transFrom: name: transFrom in: query required: true schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'SPOT' optionalTransFrom: name: transFrom in: query schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'SPOT' transTo: name: transTo in: query required: true schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'ISOLATED_MARGIN' optionalTransTo: name: transTo in: query schema: type: string enum: ['SPOT', 'ISOLATED_MARGIN'] example: 'ISOLATED_MARGIN' symbols: name: symbols in: query description: Max 5 symbols can be sent; separated by ',' schema: type: string example: 'BTCUSDT,BNBUSDT,ADAUSDT' arraySymbols: name: symbols in: query schema: type: string example: '["BTCUSDT","BNBBTC"]' tickerType: name: type in: query description: |- Supported values: FULL or MINI. If none provided, the default is FULL schema: type: string enum: ['FULL', 'MINI'] example: 'FULL' permissions: name: permissions in: query schema: type: string example: "'SPOT' or ['MARGIN','LEVERAGED']" transactionType: name: transactionType in: query required: true description: |- * `0` - deposit * `1` - withdraw schema: type: integer format: int32 minimum: 0 maximum: 1 beginTime: name: beginTime in: query schema: type: integer format: int64 example: 1626144956000 page: name: page in: query description: Default 1 schema: type: integer format: int32 example: 1 rows: name: rows in: query description: Default 100, max 500 schema: type: integer format: int32 example: 300 quoteOrderQty: name: quoteOrderQty in: query description: Quote quantity schema: type: number format: double icebergQty: name: icebergQty in: query description: Used with LIMIT, STOP_LOSS_LIMIT, and TAKE_PROFIT_LIMIT to create an iceberg order. schema: type: number format: double flexibleProductStatus: name: status in: query required: true description: Default `ALL` schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] optionalFlexibleProductStatus: name: status in: query description: Default `ALL` schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] optionalFixedAndActivityProductStatus: name: status in: query description: Default `ALL` schema: type: string enum: ['ALL','SUBSCRIBABLE','UNSUBSCRIBABLE'] featured: name: featured in: query description: Default `ALL` schema: type: string enum: ['ALL','TRUE'] flexibleProductId: name: productId in: query required: true schema: type: string fixedAndActivityProjectId: name: projectId in: query schema: type: string flexibleProductType: name: type in: query required: true schema: type: string enum: ['FAST','NORMAL'] fixedAndActivityProductType: name: type in: query required: true schema: type: string enum: ['ACTIVITY','CUSTOMIZED_FIXED'] sortBy: name: sortBy in: query description: Default `START_TIME` schema: type: string enum: ['START_TIME', 'LOT_SIZE','INTEREST_RATE','DURATION'] isSortAsc: name: isSortAsc in: query description: default "true" schema: type: boolean projectId: name: projectId in: query required: true schema: type: string lot: name: lot in: query required: true schema: type: string needBtcValuation: name: needBtcValuation in: query schema: type: string enum: ['true','false'] lendingType: name: lendingType in: query required: true description: |- * `DAILY` - for flexible * `ACTIVITY` - for activity * `CUSTOMIZED_FIXED` for fixed schema: type: string enum: ['DAILY','ACTIVITY','CUSTOMIZED_FIXED'] optionalPositionId: name: positionId in: query schema: type: string positionId: name: positionId in: query required: true schema: type: string positionStatus: name: status in: query required: true schema: type: string enum: ['HOLDING','REDEEMED'] userName: name: userName in: query required: true description: Mining Account schema: type: string algo: name: algo in: query required: true description: Algorithm(sha256) schema: type: string pageIndex: name: pageIndex in: query description: Page number, default is first page, start form 1 schema: type: integer format: int32 sort: name: sort in: query description: sort sequence(default=0)0 positive sequence, 1 negative sequence schema: type: integer format: int32 sortColumn: name: sortColumn in: query description: 'Sort by( default 1): 1: miner name, 2: real-time computing power, 3: daily average computing power, 4: real-time rejection rate, 5: last submission time' schema: type: integer format: int32 workerStatus: name: workerStatus in: query description: miners status(default=0)0 all, 1 valid, 2 invalid, 3 failure schema: type: integer format: int32 startDate: name: startDate in: query description: Search date, millisecond timestamp, while empty query all schema: type: string endDate: name: endDate in: query description: Search date, millisecond timestamp, while empty query all schema: type: string pageSize: name: pageSize in: query description: Number of pages, minimum 10, maximum 200 schema: type: string smallPageSize: name: pageSize in: query description: MIN 1, MAX 100; Default 100 schema: type: string configId: name: configId in: query required: true description: Mining ID schema: type: string toPoolUser: name: toPoolUser in: query required: true description: Mining Account schema: type: string hashRate: name: hashRate in: query required: true description: Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) schema: type: string workerName: name: workerName in: query required: true description: Miner’s name schema: type: string blvtTokenName: name: tokenName in: query required: true description: BTCDOWN, BTCUP schema: type: string optionalBlvtTokenName: name: tokenName in: query description: BTCDOWN, BTCUP schema: type: string poolId: name: poolId in: query required: true schema: type: integer format: int64 optionalPoolId: name: poolId in: query schema: type: integer format: int64 quoteAsset: name: quoteAsset in: query required: true schema: type: string example: 'USDT' baseAsset: name: baseAsset in: query required: true schema: type: string example: 'BUSD' quoteQty: name: quoteQty in: query required: true schema: type: number format: double subAccountEmail: name: email in: query required: true schema: type: string description: Sub-account email optionalSubAccountEmail: name: email in: query schema: type: string description: Sub-account email optionalSubAccountFromEmail: name: fromEmail in: query schema: type: string description: Sub-account email optionalSubAccountToEmail: name: toEmail in: query schema: type: string description: Sub-account email subAccountFromEmail: name: fromEmail in: query required: true schema: type: string description: Sender email subAccountToEmail: name: toEmail in: query required: true schema: type: string description: Recipient email fromSymbol: name: fromSymbol in: query description: Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN schema: type: string example: 'BNBUSDT' toSymbol: name: toSymbol in: query description: Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN schema: type: string example: 'BNBUSDT' isolatedSymbol: name: isolatedSymbol in: query description: Isolated symbol schema: type: string archived: name: archived in: query description: 'Default: false. Set to true for archived data from 6 months ago' schema: type: string sideEffectType: name: sideEffectType in: query description: Default `NO_SIDE_EFFECT` schema: type: string enum: [NO_SIDE_EFFECT, MARGIN_BUY, AUTO_REPAY] interval: name: interval in: query required: true description: kline intervals schema: type: string enum: ['1s','1m','3m','5m','15m','30m','1h','2h','4h','6h','8h','12h','1d','3d','1w','1M'] example: '"1m"' crossMarginAccountTransferType: name: type in: query description: |- * `1` - transfer from main account to margin account * `2` - transfer from margin account to main account schema: type: integer format: int32 minimum: 1 maximum: 2 limitClientOrderId: name: limitClientOrderId in: query description: 'A unique Id for the limit order' schema: type: string limitStrategyId: name: limitStrategyId in: query schema: type: integer format: int64 limitStrategyType: name: limitStrategyType in: query description: "The value cannot be less than 1000000." schema: type: integer format: int64 limitIcebergQty: name: limitIcebergQty in: query schema: type: number format: double stopClientOrderId: name: stopClientOrderId in: query description: 'A unique Id for the stop loss/stop loss limit leg' schema: type: string stopStrategyId: name: stopStrategyId in: query schema: type: integer format: int64 stopStrategyType: name: stopStrategyType in: query schema: type: integer format: int64 ocoStopPrice: name: stopPrice in: query required: true schema: type: number format: double example: 220.0 stopLimitPrice: name: stopLimitPrice in: query description: 'If provided, stopLimitTimeInForce is required.' schema: type: number format: double stopIcebergQty: name: stopIcebergQty in: query schema: type: number format: double stopLimitTimeInForce: name: stopLimitTimeInForce in: query schema: type: string enum: [GTC,FOK,IOC] subAccountApiKey: name: subAccountApiKey in: query required: true schema: type: string ipRestrict: name: ipRestrict in: query required: true description: "true or false" schema: type: boolean thirdParty: name: thirdParty in: query required: false description: "true or false" schema: type: boolean thirdPartyName: name: thirdPartyName in: query required: false description: "third party IP list name" schema: type: string ipAddress: name: ipAddress in: query required: true description: "Can be added in batches, separated by commas" schema: type: string optionalIpAddress: name: ipAddress in: query description: "Can be added in batches, separated by commas" schema: type: string vipLevel: name: vipLevel in: query description: Defaults to user's vip level schema: type: integer format: int32 example: 1 clientTranId: name: clientTranId in: query schema: type: string optionalTrailingDelta: name: trailingDelta in: query description: Used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders. schema: type: number format: double productId: name: productId in: query required: true schema: type: string optionalIsIsolated: name: isIsolated in: query description: |- * `TRUE` - For isolated margin * `FALSE` - Default, not for isolated margin schema: type: string email: name: email in: query required: true schema: type: string preventedMatchId: name: preventedMatchId in: query required: false schema: type: integer format: int64 example: 1 cancelRestrictions: name: cancelRestrictions in: query required: false schema: type: string enum: ['ONLY_NEW','ONLY_PARTIALLY_FILLED'] example: "ONLY_NEW" network: name: network in: query required: false schema: type: string example: "BTC" targetAsset: name: targetAsset in: query required: true schema: type: string example: "BTC" autoRepay: name: autoRepay in: query required: true schema: type: boolean example: true autoCompoundPlan: name: autoCompoundPlan in: query description: |- NONE: switch off the plan, STANDARD: standard plan, ADVANCED: advanced plan; required: true schema: type: string enum: ['NONE', 'STANDARD', 'ADVANCE'] workingType: name: workingType in: query required: true description: |- Supported values: LIMIT,LIMIT_MAKER schema: type: string enum: ['LIMIT', 'LIMIT_MAKER'] workingSide: name: workingSide in: query required: true description: BUY,SELL schema: type: string enum: ['BUY', 'SELL'] workingClientOrderId: name: workingClientOrderId in: query description: Arbitrary unique ID among open orders for the working order. Automatically generated if not sent. schema: type: string workingPrice: name: workingPrice in: query required: true schema: type: number format: double workingQuantity: name: workingQuantity in: query required: true description: Sets the quantity for the working order. schema: type: number format: double workingIcebergQty: name: workingIcebergQty in: query required: true description: This can only be used if workingTimeInForce is GTC. schema: type: number format: double workingTimeInForce: name: workingTimeInForce in: query description: GTC, IOC, FOK schema: type: string enum: ['GTC', 'IOC', 'FOK'] pendingType: name: pendingType in: query required: true description: |- Supported values: Order Types Note that MARKET orders using quoteOrderQty are not supported. schema: type: string enum: ['LIMIT', 'MARKET', 'STOP_LOSS', 'STOP_LOSS_LIMIT', 'TAKE_PROFIT', 'TAKE_PROFIT_LIMIT', 'LIMIT_MAKER'] pendingSide: name: pendingSide in: query required: true description: BUY,SELL schema: type: string enum: ['BUY', 'SELL'] pendingClientOrderId: name: pendingClientOrderId in: query description: Arbitrary unique ID among open orders for the pending order. Automatically generated if not sent. schema: type: string pendingPrice: name: pendingPrice in: query schema: type: number format: double pendingStopPrice: name: pendingStopPrice in: query schema: type: number format: double pendingTrailingDelta: name: pendingTrailingDelta in: query schema: type: number format: double pendingQuantity: name: pendingQuantity in: query required: true description: Sets the quantity for the pending order. schema: type: number format: double pendingIcebergQty: name: pendingIcebergQty in: query description: This can only be used if pendingTimeInForce is GTC. schema: type: number format: double pendingTimeInForce: name: pendingTimeInForce in: query description: GTC, IOC, FOK schema: type: string enum: ['GTC', 'IOC', 'FOK'] pendingAboveType: name: pendingAboveType in: query required: true description: |- Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT schema: type: string enum: [LIMIT_MAKER, STOP_LOSS, STOP_LOSS_LIMIT] pendingAboveClientOrderId: name: pendingAboveClientOrderId in: query description: Arbitrary unique ID among open orders for the pending above order. Automatically generated if not sent. schema: type: string pendingAbovePrice: name: pendingAbovePrice in: query schema: type: number format: double pendingAboveStopPrice: name: pendingAboveStopPrice in: query schema: type: number format: double pendingAboveTrailingDelta: name: pendingAboveTrailingDelta in: query schema: type: number format: double pendingAboveIcebergQty: name: pendingAboveIcebergQty in: query description: This can only be used if pendingAboveTimeInForce is GTC. schema: type: number format: double pendingAboveTimeInForce: name: pendingAboveTimeInForce in: query schema: type: string enum: [GTC, IOC, FOK] pendingBelowType: name: pendingBelowType in: query description: |- Supported values: LIMIT_MAKER, STOP_LOSS, and STOP_LOSS_LIMIT schema: type: string enum: [LIMIT_MAKER, STOP_LOSS, STOP_LOSS_LIMIT] pendingBelowClientOrderId: name: pendingBelowClientOrderId in: query description: Arbitrary unique ID among open orders for the pending below order. Automatically generated if not sent. schema: type: string pendingBelowPrice: name: pendingBelowPrice in: query schema: type: number format: double pendingBelowStopPrice: name: pendingBelowStopPrice in: query schema: type: number format: double pendingBelowTrailingDelta: name: pendingBelowTrailingDelta in: query schema: type: number format: double pendingBelowIcebergQty: name: pendingBelowIcebergQty in: query description: This can only be used if pendingBelowTimeInForce is GTC. schema: type: number format: double pendingBelowTimeInForce: name: pendingBelowTimeInForce in: query schema: type: string enum: [GTC, IOC, FOK] schemas: account: type: object properties: makerCommission: type: integer format: int64 example: 15 takerCommission: type: integer format: int64 example: 15 buyerCommission: type: integer format: int64 example: 0 sellerCommission: type: integer format: int64 example: 0 commissionRates: type: object properties: maker: type: string example: "0.00150000" taker: type: string example: "0.00150000" buyer: type: string example: "0.00000000" seller: type: string example: "0.00000000" required: - maker - taker - buyer - seller canTrade: type: boolean canWithdraw: type: boolean canDeposit: type: boolean brokered: type: boolean example: false requireSelfTradePrevention: type: boolean example: false preventSor: type: boolean example: false updateTime: type: integer format: int64 example: 123456789 accountType: type: string example: "SPOT" balances: type: array items: type: object properties: asset: type: string example: "BTC" free: type: string example: "4723846.89208129" locked: type: string example: "0.00000000" required: - asset - free - locked permissions: type: array items: type: string example: "SPOT" uid: type: integer format: int64 example: 354937868 required: - makerCommission - takerCommission - buyerCommission - sellerCommission - commissionRates - canTrade - canWithdraw - canDeposit - brokered - requireSelfTradePrevention - preventSor - updateTime - accountType - balances - permissions - uid order: type: object properties: symbol: type: string example: "BNBBTC" origClientOrderId: type: string example: "msXkySR3u5uYwpvRMFsi3u" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 description: Unless OCO, value will be -1 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "SELL" selfTradePreventionMode: type: string example: "NONE" required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - selfTradePreventionMode - transactTime ocoOrder: type: object properties: orderListId: type: integer format: int64 example: 1929 contingencyType: type: string example: "OCO" listStatusType: type: string example: "ALL_DONE" listOrderStatus: type: string example: "ALL_DONE" listClientOrderId: type: string example: "C3wyj4WVEktd7u9aVBRXcN" transactionTime: type: integer format: int64 example: 1574040868128 symbol: type: string example: "BNBBTC" orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "BNBBTC" orderId: 2 clientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" - symbol: "BNBBTC" orderId: 3 clientOrderId: "TXOvglzXuaubXAaENpaRCB" orderReports: type: array items: type: object properties: symbol: type: string origClientOrderId: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string selfTradePreventionMode: type: string transactTime: type: integer format: int64 required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice - selfTradePreventionMode - transactTime example: - symbol: "BNBBTC" origClientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" orderId: 2 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "1.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "STOP_LOSS_LIMIT" side: "SELL" stopPrice: "1.00000000" transactTime: 1688005070874 - symbol: "BNBBTC" origClientOrderId: "TXOvglzXuaubXAaENpaRCB" orderId: 3 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "3.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "LIMIT_MAKER" side: "SELL" selfTradePreventionMode: "NONE" transactTime: 1688005070874 required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - orders - orderReports marginOcoOrder: type: object properties: orderListId: type: integer format: int64 example: 0 contingencyType: type: string example: "OCO" listStatusType: type: string example: "ALL_DONE" listOrderStatus: type: string example: "ALL_DONE" listClientOrderId: type: string example: "C3wyj4WVEktd7u9aVBRXcN" transactionTime: type: integer format: int64 example: 1574040868128 symbol: type: string example: "BNBUSDT" isIsolated: type: boolean example: false orders: type: array items: type: object properties: symbol: type: string orderId: type: integer format: int64 clientOrderId: type: string required: - symbol - orderId - clientOrderId example: - symbol: "BNBUSDT" orderId: 2 clientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" - symbol: "BNBUSDT" orderId: 3 clientOrderId: "TXOvglzXuaubXAaENpaRCB" orderReports: type: array items: type: object properties: symbol: type: string origClientOrderId: type: string orderId: type: integer format: int64 orderListId: type: integer format: int64 clientOrderId: type: string price: type: string origQty: type: string executedQty: type: string cummulativeQuoteQty: type: string status: type: string timeInForce: type: string type: type: string side: type: string stopPrice: type: string required: - symbol - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice example: - symbol: "BNBUSDT" origClientOrderId: "pO9ufTiFGg3nw2fOdgeOXa" orderId: 2 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "1.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "STOP_LOSS_LIMIT" side: "SELL" stopPrice: "1.00000000" - symbol: "BNBUSDT" origClientOrderId: "TXOvglzXuaubXAaENpaRCB" orderId: 3 orderListId: 0 clientOrderId: "unfWT8ig8i0uj6lPuYLez6" price: "3.00000000" origQty: "10.00000000" executedQty: "0.00000000" cummulativeQuoteQty: "0.00000000" status: "CANCELED" timeInForce: "GTC" type: "LIMIT_MAKER" side: "SELL" required: - orderListId - contingencyType - listStatusType - listOrderStatus - listClientOrderId - transactionTime - symbol - isIsolated - orders - orderReports orderDetails: type: object properties: symbol: type: string example: "LTCBTC" orderId: type: integer format: int64 example: 1 orderListId: type: integer format: int64 description: Unless OCO, value will be -1 example: -1 clientOrderId: type: string example: "myOrder1" price: type: string example: "0.1" origQty: type: string example: "1.0" executedQty: type: string example: "0.0" cummulativeQuoteQty: type: string example: "0.0" status: type: string example: "NEW" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "BUY" stopPrice: type: string example: "0.0" icebergQty: type: string example: "0.0" time: type: integer format: int64 example: 1499827319559 updateTime: type: integer format: int64 example: 1499827319559 isWorking: type: boolean workingTime: type: integer format: int64 example: 1499827319559 origQuoteOrderQty: type: string example: "0.00000000" selfTradePreventionMode: type: string example: NONE preventedMatchId: type: integer example: 0 preventedQuantity: type: string example: "1.200000" required: - symbol - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - stopPrice - icebergQty - time - updateTime - isWorking - workingTime - origQuoteOrderQty - selfTradePreventionMode orderResponseAck: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 required: - symbol - orderId - orderListId - clientOrderId - transactTime orderResponseResult: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "0.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" side: type: string example: "SELL" strategyId: type: integer format: int64 example: 1 strategyType: type: integer format: int64 example: 1000000 workingTime: type: integer format: int64 example: 1507725176595 selfTradePreventionMode: type: string example: "NONE" required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - selfTradePreventionMode orderResponseFull: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "0.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" side: type: string example: "SELL" strategyId: type: integer format: int64 example: 1 strategyType: type: integer format: int64 example: 1000000 workingTime: type: integer format: int64 example: 1507725176595 selfTradePreventionMode: type: string example: "NONE" fills: type: array items: type: object properties: price: type: string example: "4000.00000000" qty: type: string example: "1.00000000" commission: type: string example: "4.00000000" commissionAsset: type: string example: "USDT" required: - price - qty - commission - commissionAsset required: - symbol - orderId - orderListId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - workingTime - selfTradePreventionMode - fills marginOrder: type: object properties: symbol: type: string example: "LTCBTC" orderId: type: integer format: int64 example: 28 origClientOrderId: type: string example: "msXkySR3u5uYwpvRMFsi3u" clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "8.00000000" cummulativeQuoteQty: type: string example: "8.00000000" status: type: string example: "CANCELED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "SELL" required: - symbol - orderId - origClientOrderId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side marginOrderDetail: type: object properties: clientOrderId: type: string example: "ZwfQzuDIGpceVhKW5DvCmO" cummulativeQuoteQty: type: string example: "0.00000000" executedQty: type: string example: "0.00000000" icebergQty: type: string example: "0.00000000" isWorking: type: boolean orderId: type: integer format: int64 example: 213205622 origQty: type: string example: "0.30000000" price: type: string example: "0.00493630" side: type: string example: "SELL" status: type: string example: "NEW" stopPrice: type: string example: "0.00000000" symbol: type: string example: "BNBBTC" isIsolated: type: boolean time: type: integer format: int64 example: 1562133008725 timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" updateTime: type: integer format: int64 example: 1562133008725 selfTradePreventionMode: type: string example: "NONE" required: - clientOrderId - cummulativeQuoteQty - executedQty - icebergQty - isWorking - orderId - origQty - price - side - status - stopPrice - symbol - isIsolated - time - timeInForce - type - updateTime - selfTradePreventionMode canceledMarginOrderDetail: type: object properties: symbol: type: string example: "BNBUSDT" isIsolated: type: boolean origClientOrderId: type: string example: "E6APeyTJvkMvLMYMqu1KQ4" orderId: type: integer format: int64 example: 11 orderListId: type: integer format: int64 example: -1 clientOrderId: type: string example: "pXLV6Hz6mprAcVYpVMTGgx" price: type: string example: "0.089853" origQty: type: string example: "0.178622" executedQty: type: string example: "0.000000" cummulativeQuoteQty: type: string example: "0.000000" status: type: string example: "CANCELED" timeInForce: type: string example: "GTC" type: type: string example: "LIMIT" side: type: string example: "BUY" required: - symbol - isIsolated - origClientOrderId - orderId - orderListId - clientOrderId - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side marginOrderResponseAck: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" isIsolated: type: boolean transactTime: type: integer format: int64 example: 1507725176595 required: - symbol - orderId - clientOrderId - isIsolated - transactTime marginOrderResponseResult: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" isIsolated: type: boolean side: type: string example: "SELL" required: - symbol - orderId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - isIsolated - side marginOrderResponseFull: type: object properties: symbol: type: string example: "BTCUSDT" orderId: type: integer format: int64 example: 28 clientOrderId: type: string example: "6gCrw2kRUAF9CvJDGP16IP" transactTime: type: integer format: int64 example: 1507725176595 price: type: string example: "1.00000000" origQty: type: string example: "10.00000000" executedQty: type: string example: "10.00000000" cummulativeQuoteQty: type: string example: "10.00000000" status: type: string example: "FILLED" timeInForce: type: string example: "GTC" type: type: string example: "MARKET" side: type: string example: "SELL" marginBuyBorrowAmount: type: number format: double example: 5 description: will not return if no margin trade happens marginBuyBorrowAsset: type: string example: "BTC" description: will not return if no margin trade happens isIsolated: type: boolean fills: type: array items: type: object properties: price: type: string example: "4000.00000000" qty: type: string example: "1.00000000" commission: type: string example: "4.00000000" commissionAsset: type: string example: "USDT" required: - price - qty - commission - commissionAsset required: - symbol - orderId - clientOrderId - transactTime - price - origQty - executedQty - cummulativeQuoteQty - status - timeInForce - type - side - marginBuyBorrowAmount - marginBuyBorrowAsset - isIsolated - fills marginTrade: type: object properties: commission: type: string example: "0.00006000" commissionAsset: type: string example: "BTC" id: type: integer format: int64 example: 28 isBestMatch: type: boolean isBuyer: type: boolean isMaker: type: boolean orderId: type: integer format: int64 example: 28 price: type: string example: "0.02000000" qty: type: string example: "1.02000000" symbol: type: string example: "BNBBTC" isIsolated: type: boolean example: false time: type: integer format: int64 example: 1507725176595 required: - commission - commissionAsset - id - isBestMatch - isBuyer - isMaker - orderId - price - qty - symbol - isIsolated - time marginTransferDetails: type: object properties: rows: type: array items: type: object properties: amount: type: string example: "0.10000000" asset: type: string example: "BNB" status: type: string example: "CONFIRMED" timestamp: type: integer format: int64 example: 1566898617000 txId: type: integer format: int64 example: 5240372201 type: type: string example: "ROLL_IN" transFrom: type: string example: "SPOT" transTo: type: string example: "ISOLATED_MARGIN" required: - amount - asset - status - timestamp - txId - transFrom - transTo total: type: integer format: int32 example: 1 required: - rows - total isolatedMarginAccountInfo: type: object properties: assets: type: array items: type: object properties: baseAsset: type: object properties: asset: type: string example: "BTC" borrowEnabled: type: boolean borrowed: type: string example: "0.00000000" free: type: string example: "0.00000000" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00000000" netAssetOfBtc: type: string example: "0.00000000" repayEnabled: type: boolean totalAsset: type: string example: "0.00000000" required: - asset - borrowEnabled - borrowed - free - interest - locked - netAsset - netAssetOfBtc - repayEnabled - totalAsset quoteAsset: type: object properties: asset: type: string example: "USDT" borrowEnabled: type: boolean borrowed: type: string example: "0.00000000" free: type: string example: "0.00000000" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "0.00000000" netAssetOfBtc: type: string example: "0.00000000" repayEnabled: type: boolean totalAsset: type: string example: "0.00000000" required: - asset - borrowEnabled - borrowed - free - interest - locked - netAsset - netAssetOfBtc - repayEnabled - totalAsset symbol: type: string example: "BTCUSDT" isolatedCreated: type: boolean enabled: type: boolean description: true-enabled, false-disabled marginLevel: type: string example: "0.00000000" marginLevelStatus: type: string example: "EXCESSIVE" description: '"EXCESSIVE", "NORMAL", "MARGIN_CALL", "PRE_LIQUIDATION", "FORCE_LIQUIDATION"' marginRatio: type: string example: "0.00000000" indexPrice: type: string example: "10000.00000000" liquidatePrice: type: string example: "1000.00000000" liquidateRate: type: string example: "1.00000000" tradeEnabled: type: boolean required: - baseAsset - quoteAsset - symbol - isolatedCreated - enabled - marginLevel - marginLevelStatus - marginRatio - indexPrice - liquidatePrice - liquidateRate - tradeEnabled totalAssetOfBtc: type: string example: "0.00000000" totalLiabilityOfBtc: type: string example: "0.00000000" totalNetAssetOfBtc: type: string example: "0.00000000" required: - assets - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc bookTickerList: type: array items: $ref: '#/components/schemas/bookTicker' bookTicker: type: object properties: symbol: type: string example: "BNBBTC" bidPrice: type: string example: "16.36240000" bidQty: type: string example: "256.78000000" askPrice: type: string example: "16.36450000" askQty: type: string example: "12.56000000" required: - symbol - bidPrice - bidQty - askPrice - askQty priceTickerList: type: array items: $ref: '#/components/schemas/priceTicker' priceTicker: type: object properties: symbol: type: string example: "BNBBTC" price: type: string example: "0.17160000" required: - symbol - price repaymentInfo: type: object properties: loanCoin: type: string example: "BUSD" remainingPrincipal: type: string example: "100.5" remainingInterest: type: string example: "0" collateralCoin: type: string example: "BNB" remainingCollateral: type: string example: "5.253" currentLTV: type: string example: "0.25" repayStatus: type: string example: "Repaying" required: - loanCoin - remainingPrincipal - remainingInterest - collateralCoin - remainingCollateral - currentLTV - repayStatus repaymentInfo2: type: object properties: loanCoin: type: string example: "BUSD" collateralCoin: type: string example: "BNB" repayStatus: type: string example: "Repaying" required: - loanCoin - collateralCoin - repayStatus tickerList: type: array items: $ref: '#/components/schemas/ticker' ticker: type: object properties: symbol: type: string example: "BNBBTC" priceChange: type: string example: "0.17160000" priceChangePercent: type: string example: "1.060" prevClosePrice: type: string example: "16.35920000" lastPrice: type: string example: "27.84000000" bidPrice: type: string example: "16.34488284" bidQty: type: string example: "16.34488284" askPrice: type: string example: "16.35920000" askQty: type: string example: "25.06000000" openPrice: type: string example: "16.18760000" highPrice: type: string example: "16.55000000" lowPrice: type: string example: "16.16940000" volume: type: string example: "1678279.95000000" quoteVolume: type: string example: "27431289.14792300" openTime: type: integer format: int64 example: 1592808788637 closeTime: type: integer format: int64 example: 1592895188637 firstId: type: integer format: int64 example: 62683296 lastId: type: integer format: int64 example: 62739253 count: type: integer format: int64 example: 55958 required: - symbol - priceChange - priceChangePercent - prevClosePrice - lastPrice - bidPrice - bidQty - askPrice - askQty - openPrice - highPrice - lowPrice - volume - quoteVolume - openTime - closeTime - firstId - lastId - count dayTickerList: type: array items: $ref: '#/components/schemas/dayTicker' dayTicker: type: object properties: symbol: type: string example: BTCUSDT priceChange: type: string example: '-83.13000000' description: Absolute price change priceChangePercent: type: string example: '-0.317' description: Relative price change in percent weightedAvgPrice: type: string example: '26234.58803036' description: quoteVolume / volume openPrice: type: string example: '26304.80000000' highPrice: type: string example: '26397.46000000' lowPrice: type: string example: '26088.34000000' lastPrice: type: string example: '26221.67000000' volume: type: string description: Volume in base asset example: '18495.35066000' quoteVolume: type: string example: '485217905.04210480' description: Volume in quote asset openTime: type: integer format: int64 example: 1695686400000 closeTime: type: integer format: int64 example: 1695772799999 firstId: type: integer format: int64 example: 3220151555 description: Trade ID of the first trade in the interval lastId: type: integer format: int64 example: 3220849281 description: Trade ID of the last trade in the interval count: type: integer format: int64 example: 697727 description: Number of trades in the interval required: - symbol - priceChange - priceChangePercent - weightedAvgPrice - openPrice - highPrice - lowPrice - lastPrice - volume - quoteVolume - openTime - closeTime - firstId - lastId - count myTrade: type: object properties: symbol: type: string example: "BNBBTC" id: type: integer format: int64 description: Trade id example: 28457 orderId: type: integer format: int64 example: 100234 orderListId: type: integer format: int64 example: -1 price: type: string description: Price example: "4.00000100" qty: type: string description: Amount of base asset example: "12.00000000" quoteQty: type: string description: Amount of quote asset example: "48.000012" commission: type: string example: "10.10000000" commissionAsset: type: string example: "BNB" time: type: integer format: int64 description: Trade timestamp example: 1499865549590 isBuyer: type: boolean example: false isMaker: type: boolean example: false isBestMatch: type: boolean required: - symbol - id - orderId - orderListId - price - qty - quoteQty - commission - commissionAsset - time - isBuyer - isMaker - isBestMatch transaction: type: object properties: tranId: type: integer format: int64 description: transaction id example: 345196462 required: - tranId trade: type: object properties: id: type: integer format: int64 description: trade id example: 345196462 price: type: string description: price example: "9638.99000000" qty: type: string description: amount of base asset example: "0.02077200" quoteQty: type: string description: amount of quote asset example: "0.02077200" time: type: integer format: int64 description: Trade executed timestamp, as same as `T` in the stream example: 1592887772684 isBuyerMaker: type: boolean isBestMatch: type: boolean required: - id - price - qty - quoteQty - time - isBuyerMaker - isBestMatch aggTrade: type: object properties: a: type: integer format: int64 description: Aggregate tradeId example: 26129 p: type: string description: Price example: "0.01633102" q: type: string description: Quantity example: "4.70443515" f: type: integer format: int64 description: First tradeId example: 27781 l: type: integer format: int64 description: Last tradeId example: 27781 T: type: boolean description: Timestamp example: 1498793709153 m: type: boolean description: Was the buyer the maker? M: type: boolean description: Was the trade the best price match? required: - a - p - q - f - l - T - m - M bnbBurnStatus: type: object properties: spotBNBBurn: type: boolean interestBNBBurn: type: boolean example: false required: - spotBNBBurn - interestBNBBurn snapshotSpot: type: object properties: code: type: integer format: int64 example: 200 msg: type: string example: "" snapshotVos: type: array items: type: object properties: data: type: object properties: balances: type: array items: type: object properties: asset: type: string example: "BTC" free: type: string example: "0.2" locked: type: string example: "0.001" required: - asset - free - locked totalAssetOfBtc: type: string example: "0.09905021" required: - balances - totalAssetOfBtc type: type: string example: "spot" updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos snapshotMargin: type: object properties: code: type: integer format: int64 example: 200 msg: type: string example: "" snapshotVos: type: array items: type: object properties: data: type: object properties: marginLevel: type: string example: "2748.02909813" totalAssetOfBtc: type: string example: "0.00274803" totalLiabilityOfBtc: type: string example: "0.00000100" totalNetAssetOfBtc: type: string example: "0.00274750" userAssets: type: array items: type: object properties: asset: type: string example: "XRP" borrowed: type: string example: "0.00000000" free: type: string example: "1.00000000" interest: type: string example: "0.00000000" locked: type: string example: "0.00000000" netAsset: type: string example: "1.00000000" required: - asset - borrowed - free - interest - locked - netAsset required: - marginLevel - totalAssetOfBtc - totalLiabilityOfBtc - totalNetAssetOfBtc - userAssets type: type: string example: "margin" updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos snapshotFutures: type: object properties: code: type: integer format: int64 example: 200 msg: type: string example: "" snapshotVos: type: array items: type: object properties: data: type: object properties: assets: type: array items: type: object properties: asset: type: string example: "USDT" marginBalance: type: string example: "118.99782335" walletBalance: type: string example: "120.23811389" required: - asset - marginBalance - walletBalance position: type: array items: type: object properties: entryPrice: type: string example: "7130.41000000" markPrice: type: string example: "7257.66239673" positionAmt: type: string example: "0.01000000" symbol: type: string example: "BTCUSDT" unRealizedProfit: type: string example: "1.24029054" required: - entryPrice - markPrice - positionAmt - symbol - unRealizedProfit required: - assets - position type: type: string example: "futures" updateTime: type: integer format: int64 example: 1576281599000 required: - data - type - updateTime required: - code - msg - snapshotVos subAccountUSDTFuturesDetails: type: object properties: futureAccountResp: type: object properties: email: type: string example: "abc@test.com" assets: type: array items: type: object properties: asset: type: string example: "USDT" initialMargin: type: string example: "0.00000000" maintenanceMargin: type: string example: "0.00000000" marginBalance: type: string example: "0.88308000" maxWithdrawAmount: type: string example: "0.88308000" openOrderInitialMargin: type: string example: "0.00000000" positionInitialMargin: type: string example: "0.00000000" unrealizedProfit: type: string example: "0.00000000" walletBalance: type: string example: "0.88308000" required: - asset - initialMargin - maintenanceMargin - marginBalance - maxWithdrawAmount - openOrderInitialMargin - positionInitialMargin - unrealizedProfit - walletBalance canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer format: int64 example: 2 maxWithdrawAmount: type: string example: "0.88308000" totalInitialMargin: type: string example: "0.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "0.88308000" totalOpenOrderInitialMargin: type: string example: "0.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "0.88308000" updateTime: type: integer format: int64 example: 1576756674610 required: - email - assets - canDeposit - canTrade - canWithdraw - feeTier - maxWithdrawAmount - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - updateTime required: - futureAccountResp subAccountCOINFuturesDetails: type: object properties: email: type: string example: "abc@test.com" assets: type: array items: type: object properties: asset: type: string example: "BTC" initialMargin: type: string example: "0.00000000" maintenanceMargin: type: string example: "0.00000000" marginBalance: type: string example: "0.88308000" maxWithdrawAmount: type: string example: "0.88308000" openOrderInitialMargin: type: string example: "0.00000000" positionInitialMargin: type: string example: "0.00000000" unrealizedProfit: type: string example: "0.00000000" walletBalance: type: string example: "0.88308000" required: - asset - initialMargin - maintenanceMargin - marginBalance - maxWithdrawAmount - openOrderInitialMargin - positionInitialMargin - unrealizedProfit - walletBalance canDeposit: type: boolean canTrade: type: boolean canWithdraw: type: boolean feeTier: type: integer format: int64 example: 2 updateTime: type: integer format: int64 example: 1598959682001 required: - email - assets - canDeposit - canTrade - canWithdraw - feeTier - updateTime subAccountUSDTFuturesSummary: type: object properties: futureAccountSummaryResp: type: object properties: totalInitialMargin: type: string example: "9.83137400" totalMaintenanceMargin: type: string example: "0.41568700" totalMarginBalance: type: string example: "23.03235621" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.83137400" totalUnrealizedProfit: type: string example: "0.03219710" totalWalletBalance: type: string example: "22.15879444" asset: type: string example: "USD" description: The sum of BUSD and USDT subAccountList: type: array items: type: object properties: email: type: string example: "123@test.com" totalInitialMargin: type: string example: "9.00000000" totalMaintenanceMargin: type: string example: "0.00000000" totalMarginBalance: type: string example: "22.12659734" totalOpenOrderInitialMargin: type: string example: "9.00000000" totalPositionInitialMargin: type: string example: "0.00000000" totalUnrealizedProfit: type: string example: "0.00000000" totalWalletBalance: type: string example: "22.12659734" asset: type: string example: "USD" description: The sum of BUSD and USDT required: - email - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset required: - totalInitialMargin - totalMaintenanceMargin - totalMarginBalance - totalOpenOrderInitialMargin - totalPositionInitialMargin - totalUnrealizedProfit - totalWalletBalance - asset - subAccountList required: - futureAccountSummaryResp subAccountCOINFuturesSummary: type: object properties: deliveryAccountSummaryResp: type: object properties: totalMarginBalanceOfBTC: type: string example: 25.03221121 totalUnrealizedProfitOfBTC: type: string example: 0.12233410 totalWalletBalanceOfBTC: type: string example: 22.15879444 asset: type: string example: BTC subAccountList: type: array items: type: object properties: email: type: string example: 123@test.com totalMarginBalance: type: string example: 22.12659734 totalUnrealizedProfit: type: string example: 0.00000000 totalWalletBalance: type: string example: 22.12659734 asset: type: string example: BTC required: - email - totalMarginBalance - totalUnrealizedProfit - totalWalletBalance - asset required: - totalMarginBalanceOfBTC - totalUnrealizedProfitOfBTC - totalWalletBalanceOfBTC - asset - subAccountList required: - deliveryAccountSummaryResp subAccountUSDTFuturesPositionRisk: type: object properties: futurePositionRiskVos: type: array items: type: object properties: entryPrice: type: string example: "9975.12000" leverage: type: string example: "50" description: current initial leverage maxNotional: type: string example: "1000000" description: notional value limit of current initial leverage liquidationPrice: type: string example: "7963.54" markPrice: type: string example: "9973.50770517" positionAmount: type: string example: "0.010" symbol: type: string example: "BTCUSDT" unrealizedProfit: type: string example: "-0.01612295" required: - entryPrice - leverage - maxNotional - liquidationPrice - markPrice - positionAmount - symbol - unrealizedProfit required: - futurePositionRiskVos subAccountCOINFuturesPositionRisk: type: object properties: deliveryPositionRiskVos: type: array items: type: object properties: entryPrice: type: string example: "9975.12000" markPrice: type: string example: "9973.50770517" leverage: type: string example: "20" isolated: type: string example: false isolatedWallet: type: string example: "9973.50770517" isolatedMargin: type: string example: "0.00000000" isAutoAddMargin: type: string example: "false" positionSide: type: string example: "BOTH" positionAmount: type: string example: "1.230" symbol: type: string example: "BTCUSD_201225" unrealizedProfit: type: string example: "-0.01612295" required: - entryPrice - markPrice - leverage - isolated - isolatedWallet - isolatedMargin - isAutoAddMargin - positionSide - positionAmount - symbol - unrealizedProfit required: - deliveryPositionRiskVos error: type: object properties: code: type: integer format: int64 description: Error code msg: type: string description: Error message example: "error message" required: - code - msg securitySchemes: ApiKeyAuth: name: X-MBX-APIKEY in: header description: Binance Public API Key type: apiKey