components: schemas: APIError: description: binance API error properties: code: type: integer msg: type: string type: object CreateBlockOrderExecuteV1Req: properties: blockOrderMatchingKey: default: "" type: string recvWindow: format: int64 type: integer timestamp: format: int64 type: integer required: - blockOrderMatchingKey - timestamp type: object CreateBlockOrderExecuteV1Resp: example: '{ "blockTradeSettlementKey": "7d046e6e-a429-4335-ab9d-6a681febcde5", "expireTime": 1730172115801, "liquidity": "MAKER", "status": "ACCEPTED", "createTime": 1730170315803, "legs": [ { "symbol": "BNB-241101-700-C", "side": "SELL", "quantity": "1.2", "price": "2.8" } ] }' properties: blockTradeSettlementKey: type: string createTime: format: int64 type: integer expireTime: format: int64 type: integer legs: items: properties: price: type: string quantity: type: string side: type: string symbol: type: string type: object type: array liquidity: type: string status: type: string type: object CreateCountdownCancelAllHeartBeatV1Req: properties: recvWindow: format: int64 type: integer timestamp: format: int64 type: integer underlyings: default: "" type: string required: - underlyings - timestamp type: object CreateCountdownCancelAllHeartBeatV1Resp: example: '{ "underlyings":["BTCUSDT","ETHUSDT"] }' properties: underlyings: items: type: string type: array type: object CreateCountdownCancelAllV1Req: properties: countdownTime: format: int64 type: integer recvWindow: format: int64 type: integer timestamp: format: int64 type: integer underlying: default: "" type: string required: - underlying - countdownTime - timestamp type: object CreateCountdownCancelAllV1Resp: example: '{ "underlying": "ETHUSDT", "countdownTime": 30000 }' properties: countdownTime: format: int64 type: integer underlying: type: string type: object CreateListenKeyV1Resp: example: '{ "listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" }' properties: listenKey: type: string type: object CreateMmpResetV1Req: properties: recvWindow: format: int64 type: integer timestamp: format: int64 type: integer underlying: default: "" type: string required: - timestamp type: object CreateMmpResetV1Resp: example: '{ "underlyingId": 2, "underlying": "BTCUSDT", "windowTimeInMilliseconds": 3000, "frozenTimeInMilliseconds": 300000, "qtyLimit": "2", "deltaLimit": "2.3", "lastTriggerTime": 0 }' properties: deltaLimit: type: string frozenTimeInMilliseconds: type: integer lastTriggerTime: format: int64 type: integer qtyLimit: type: string underlying: type: string underlyingId: format: int64 type: integer windowTimeInMilliseconds: type: integer type: object CreateMmpSetV1Req: properties: deltaLimit: default: "" type: string frozenTimeInMilliseconds: format: int64 type: integer qtyLimit: default: "" type: string recvWindow: format: int64 type: integer timestamp: format: int64 type: integer underlying: default: "" type: string windowTimeInMilliseconds: format: int64 type: integer required: - timestamp type: object CreateMmpSetV1Resp: example: '{ "underlyingId": 2, "underlying": "BTCUSDT", "windowTimeInMilliseconds": 3000, "frozenTimeInMilliseconds": 300000, "qtyLimit": "2", "deltaLimit": "2.3", "lastTriggerTime": 0 }' properties: deltaLimit: type: string frozenTimeInMilliseconds: type: integer lastTriggerTime: format: int64 type: integer qtyLimit: type: string underlying: type: string underlyingId: format: int64 type: integer windowTimeInMilliseconds: type: integer type: object DeleteAllOpenOrdersByUnderlyingV1Resp: example: '{ "code": 0, "msg": "success", "data": 0 }' properties: code: type: integer data: type: integer msg: type: string type: object DeleteAllOpenOrdersV1Resp: example: '{ "code": 0, "msg": "success" }' properties: code: type: integer msg: type: string type: object DeleteListenKeyV1Resp: example: '{}' type: object DeleteOrderV1Resp: example: '{ "orderId": 4611875134427365377, "symbol": "BTC-200730-9000-C", "price": "100", "quantity": "1", "executedQty": "0", "fee": "0", "side": "BUY", "type": "LIMIT", "timeInForce": "GTC", "reduceOnly": false, "postOnly": false, "createDate": 1592465880683, "updateTime": 1566818724722, "status": "ACCEPTED", "avgPrice": "0", "source": "API", "clientOrderId": "", "priceScale": 4, "quantityScale": 4, "optionSide": "CALL", "quoteAsset": "USDT", "mmp": false }' properties: avgPrice: type: string clientOrderId: type: string createDate: format: int64 type: integer executedQty: type: string fee: type: string mmp: type: boolean optionSide: type: string orderId: format: int64 type: integer postOnly: type: boolean price: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string reduceOnly: type: boolean side: type: string source: type: string status: type: string symbol: type: string timeInForce: type: string type: type: string updateTime: format: int64 type: integer type: object GetAccountV1Resp: example: '{ "asset": [ { "asset": "USDT", "marginBalance": "1877.52214415", "equity": "617.77711415", "available": "0", "locked": "2898.92389933", "unrealizedPNL": "222.23697000" } ], "greek": [ { "underlying":"BTCUSDT", "delta": "-0.05", "gamma": "-0.002", "theta": "-0.05", "vega": "-0.002" } ], "time": 1592449455993, "riskLevel": "NORMAL" }' properties: asset: items: properties: asset: type: string available: type: string equity: type: string locked: type: string marginBalance: type: string unrealizedPNL: type: string type: object type: array greek: items: properties: delta: type: string gamma: type: string theta: type: string underlying: type: string vega: type: string type: object type: array riskLevel: type: string time: format: int64 type: integer type: object GetBillV1Resp: example: '[ { "id": 1125899906842624000, "asset": "USDT", "amount": "-0.552", "type": "FEE", "createDate": 1592449456000 }, { "id": 1125899906842624000, "asset": "USDT", "amount": "100", "type": "CONTRACT", "createDate": 1592449456000 }, { "id": 1125899906842624000, "asset": "USDT", "amount": "10000", "type": "TRANSFER", "createDate": 1592448410000 } ]' items: $ref: '#/components/schemas/GetBillV1RespItem' type: array GetBillV1RespItem: properties: amount: type: string asset: type: string createDate: format: int64 type: integer id: format: int64 type: integer type: type: string type: object GetBlockOrderExecuteV1Resp: example: '{ "blockTradeSettlementKey": "12b96c28-ba05-8906-c89t-703215cfb2e6", "expireTime": 1730171860460, "liquidity": "MAKER", "status": "RECEIVED", "createTime": 1730170060462, "legs": [ { "symbol": "BNB-241101-700-C", "side": "SELL", "quantity": "1.66", "price": "20" } ] }' properties: blockTradeSettlementKey: type: string createTime: format: int64 type: integer expireTime: format: int64 type: integer legs: items: properties: price: type: string quantity: type: string side: type: string symbol: type: string type: object type: array liquidity: type: string status: type: string type: object GetBlockOrderOrdersV1Resp: example: '[ { "blockTradeSettlementKey": "7d046e6e-a429-4335-ab9d-6a681febcde5", "expireTime": 1730172115801, "liquidity": "TAKER", "status": "RECEIVED", "createTime": 1730170315803, "legs": [ { "symbol": "BNB-241101-700-C", "side": "BUY", "quantity": "1.2", "price": "2.8" } ] }, { "blockTradeSettlementKey": "28b96c28-ba05-6906-a47c-703215cfbfe6", "expireTime": 1730171860460, "liquidity": "TAKER", "status": "RECEIVED", "createTime": 1730170060462, "legs": [ { "symbol": "BNB-241101-700-C", "side": "BUY", "quantity": "1.66", "price": "20" } ] } ]' items: $ref: '#/components/schemas/GetBlockOrderOrdersV1RespItem' type: array GetBlockOrderOrdersV1RespItem: properties: blockTradeSettlementKey: type: string createTime: format: int64 type: integer expireTime: format: int64 type: integer legs: items: properties: price: type: string quantity: type: string side: type: string symbol: type: string type: object type: array liquidity: type: string status: type: string type: object GetBlockTradesV1Resp: example: '[ { "id": 1125899906901081078, "tradeId": 389, "symbol": "ETH-250725-1200-P", "price": "342.40", "qty": "-2167.20", "quoteQty": "-4.90", "side": -1, "time": 1733950676483 }, { "id": 1125899906901080972, "tradeId": 161, "symbol": "XRP-250904-0.086-P", "price": "3.0", "qty": "-6.0", "quoteQty": "-2.02", "side": -1, "time": 1733950488444 } ]' items: $ref: '#/components/schemas/GetBlockTradesV1RespItem' type: array GetBlockTradesV1RespItem: properties: id: format: int64 type: integer price: type: string qty: type: string quoteQty: type: string side: type: integer symbol: type: string time: format: int64 type: integer tradeId: format: int64 type: integer type: object GetBlockUserTradesV1Resp: example: '[ { "parentOrderId": "4675011431944499201", "crossType": "USER_BLOCK", "legs": [ { "createTime": 1730170445600, "updateTime": 1730170445600, "symbol": "BNB-241101-700-C", "orderId": "4675011431944499203", "orderPrice": 2.8, "orderQuantity": 1.2, "orderStatus": "FILLED", "executedQty": 1.2, "executedAmount": 3.36, "fee": 0.336, "orderType": "PREV_QUOTED", "orderSide": "BUY", "id": "1125899906900937837", "tradeId": 1, "tradePrice": 2.8, "tradeQty": 1.2, "tradeTime": 1730170445600, "liquidity": "TAKER", "commission": 0.336 } ], "blockTradeSettlementKey": "7d085e6e-a229-2335-ab9d-6a581febcd25" } ]' items: $ref: '#/components/schemas/GetBlockUserTradesV1RespItem' type: array GetBlockUserTradesV1RespItem: properties: blockTradeSettlementKey: type: string crossType: type: string legs: items: properties: commission: type: number createTime: format: int64 type: integer executedAmount: type: number executedQty: type: number fee: type: number id: type: string liquidity: type: string orderId: type: string orderPrice: type: number orderQuantity: type: number orderSide: type: string orderStatus: type: string orderType: type: string symbol: type: string tradeId: format: int64 type: integer tradePrice: type: number tradeQty: type: number tradeTime: format: int64 type: integer updateTime: format: int64 type: integer type: object type: array parentOrderId: type: string type: object GetCountdownCancelAllV1Resp: example: '{ "underlying": "ETHUSDT", "countdownTime": 100000 }' properties: countdownTime: format: int64 type: integer underlying: type: string type: object GetDepthV1Resp: example: '{ "T": 1589436922972, "u": 37461, "bids": [ [ "1000", "0.9" ] ], "asks": [ [ "1100", "0.1" ] ] }' properties: T: format: int64 type: integer asks: items: items: type: string type: array type: array bids: items: items: type: string type: array type: array u: type: integer type: object GetExerciseHistoryV1Resp: example: '[ { "symbol": "BTC-220121-60000-P", "strikePrice": "60000", "realStrikePrice": "38844.69652571", "expiryDate": 1642752000000, "strikeResult": "REALISTIC_VALUE_STRICKEN" } ]' items: $ref: '#/components/schemas/GetExerciseHistoryV1RespItem' type: array GetExerciseHistoryV1RespItem: properties: expiryDate: format: int64 type: integer realStrikePrice: type: string strikePrice: type: string strikeResult: type: string symbol: type: string type: object GetExerciseRecordV1Resp: example: '[ { "id": "1125899906842624042", "currency": "USDT", "symbol": "BTC-220721-25000-C", "exercisePrice": "25000.00000000", "markPrice": "25000.00000000", "quantity": "1.00000000", "amount": "0.00000000", "fee": "0.00000000", "createDate": 1658361600000, "priceScale": 2, "quantityScale": 2, "optionSide": "CALL", "positionSide": "LONG", "quoteAsset": "USDT" } ]' items: $ref: '#/components/schemas/GetExerciseRecordV1RespItem' type: array GetExerciseRecordV1RespItem: properties: amount: type: string createDate: format: int64 type: integer currency: type: string exercisePrice: type: string fee: type: string id: type: string markPrice: type: string optionSide: type: string positionSide: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string symbol: type: string type: object GetHistoricalTradesV1Resp: example: '[ { "id":"1", "tradeId": "159244329455993", "price": "1000", "qty": "-0.1", "quoteQty": "-100", "side": -1, "time": 1592449455993 } ]' items: $ref: '#/components/schemas/GetHistoricalTradesV1RespItem' type: array GetHistoricalTradesV1RespItem: properties: id: type: string price: type: string qty: type: string quoteQty: type: string side: type: integer time: format: int64 type: integer tradeId: type: string type: object GetHistoryOrdersV1Resp: example: '[ { "orderId": 4611922413427359795, "symbol": "BTC-220715-2000-C", "price": "18000.00000000", "quantity": "-0.50000000", "executedQty": "-0.50000000", "fee": "3.00000000", "side": "SELL", "type": "LIMIT", "timeInForce": "GTC", "reduceOnly": false, "postOnly": false, "createTime": 1657867694244, "updateTime": 1657867888216, "status": "FILLED", "reason": "0", "avgPrice": "18000.00000000", "source": "API", "clientOrderId": "", "priceScale": 2, "quantityScale": 2, "optionSide": "CALL", "quoteAsset": "USDT", "mmp": false } ]' items: $ref: '#/components/schemas/GetHistoryOrdersV1RespItem' type: array GetHistoryOrdersV1RespItem: properties: avgPrice: type: string clientOrderId: type: string createTime: format: int64 type: integer executedQty: type: string fee: type: string mmp: type: boolean optionSide: type: string orderId: format: int64 type: integer postOnly: type: boolean price: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string reason: type: string reduceOnly: type: boolean side: type: string source: type: string status: type: string symbol: type: string timeInForce: type: string type: type: string updateTime: format: int64 type: integer type: object GetIncomeAsynIdV1Resp: example: '{ "downloadId":"545923594199212032", "status":"completed", "url":"www.binance.com", "notified":true, "expirationTimestamp":1645009771000, "isExpired":null }' properties: downloadId: type: string expirationTimestamp: format: int64 type: integer isExpired: nullable: true type: object notified: type: boolean status: type: string url: type: string type: object GetIncomeAsynV1Resp: example: '{ "avgCostTimestampOfLast30d":7241837, "downloadId":"546975389218332672" }' properties: avgCostTimestampOfLast30d: type: integer downloadId: type: string type: object GetIndexV1Resp: example: '{ "time": 1656647305000, "indexPrice": "9200" }' properties: indexPrice: type: string time: format: int64 type: integer type: object GetKlinesV1Resp: example: '[ { "open": "950", "high": "1100", "low": "900", "close": "1000", "volume": "100", "amount": "2", "interval": "5m", "tradeCount": 10, "takerVolume": "100", "takerAmount": "10000", "openTime": 1499040000000, "closeTime": 1499644799999 } ]' items: $ref: '#/components/schemas/GetKlinesV1RespItem' type: array GetKlinesV1RespItem: properties: amount: type: string close: type: string closeTime: format: int64 type: integer high: type: string interval: type: string low: type: string open: type: string openTime: format: int64 type: integer takerAmount: type: string takerVolume: type: string tradeCount: type: integer volume: type: string type: object GetMarginAccountV1Resp: example: '{ "asset": [ { "asset": "USDT", "marginBalance": "10099.448", "equity": "10094.44662", "available": "8725.92524", "initialMargin": "1084.52138", "maintMargin": "151.00138", "unrealizedPNL": "-5.00138", "lpProfit": "-5.00138" } ], "greek": [ { "underlying":"BTCUSDT", "delta": "-0.05", "gamma": "-0.002", "theta": "-0.05", "vega": "-0.002" } ], "time": 1592449455993 }' properties: asset: items: properties: asset: type: string available: type: string equity: type: string initialMargin: type: string lpProfit: type: string maintMargin: type: string marginBalance: type: string unrealizedPNL: type: string type: object type: array greek: items: properties: delta: type: string gamma: type: string theta: type: string underlying: type: string vega: type: string type: object type: array time: format: int64 type: integer type: object GetMarkV1Resp: example: '[ { "symbol": "BTC-200730-9000-C", "markPrice": "1343.2883", "bidIV": "1.40000077", "askIV": "1.50000153", "markIV": "1.45000000", "delta": "0.55937056", "theta": "3739.82509871", "gamma": "0.00010969", "vega": "978.58874732", "highPriceLimit": "1618.241", "lowPriceLimit": "1068.3356", "riskFreeInterest": "0.1" } ]' items: $ref: '#/components/schemas/GetMarkV1RespItem' type: array GetMarkV1RespItem: properties: askIV: type: string bidIV: type: string delta: type: string gamma: type: string highPriceLimit: type: string lowPriceLimit: type: string markIV: type: string markPrice: type: string riskFreeInterest: type: string symbol: type: string theta: type: string vega: type: string type: object GetMmpV1Resp: example: '{ "underlyingId": 2, "underlying": "BTCUSDT", "windowTimeInMilliseconds": 3000, "frozenTimeInMilliseconds": 300000, "qtyLimit": "2", "deltaLimit": "2.3", "lastTriggerTime": 0 }' properties: deltaLimit: type: string frozenTimeInMilliseconds: type: integer lastTriggerTime: format: int64 type: integer qtyLimit: type: string underlying: type: string underlyingId: format: int64 type: integer windowTimeInMilliseconds: type: integer type: object GetOpenInterestV1Resp: example: '[ { "symbol": "ETH-221119-1175-P", "sumOpenInterest": "4.01", "sumOpenInterestUsd": "4880.2985615624", "timestamp": "1668754020000" } ]' items: $ref: '#/components/schemas/GetOpenInterestV1RespItem' type: array GetOpenInterestV1RespItem: properties: sumOpenInterest: type: string sumOpenInterestUsd: type: string symbol: type: string timestamp: type: string type: object GetOpenOrdersV1Resp: example: '[ { "orderId": 4611875134427365377, "symbol": "BTC-200730-9000-C", "price": "100", "quantity": "1", "executedQty": "0", "fee": "0", "side": "BUY", "type": "LIMIT", "timeInForce": "GTC", "reduceOnly": false, "postOnly": false, "createTime": 1592465880683, "updateTime": 1592465880683, "status": "ACCEPTED", "avgPrice": "0", "clientOrderId": "", "priceScale": 2, "quantityScale": 2, "optionSide": "CALL", "quoteAsset": "USDT", "mmp": false } ]' items: $ref: '#/components/schemas/GetOpenOrdersV1RespItem' type: array GetOpenOrdersV1RespItem: properties: avgPrice: type: string clientOrderId: type: string createTime: format: int64 type: integer executedQty: type: string fee: type: string mmp: type: boolean optionSide: type: string orderId: format: int64 type: integer postOnly: type: boolean price: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string reduceOnly: type: boolean side: type: string status: type: string symbol: type: string timeInForce: type: string type: type: string updateTime: format: int64 type: integer type: object GetOrderV1Resp: example: '{ "orderId": 4611875134427365377, "symbol": "BTC-200730-9000-C", "price": "100", "quantity": "1", "executedQty": "0", "fee": "0", "side": "BUY", "type": "LIMIT", "timeInForce": "GTC", "reduceOnly": false, "postOnly": false, "createTime": 1592465880683, "updateTime": 1566818724722, "status": "ACCEPTED", "avgPrice": "0", "source": "API", "clientOrderId": "", "priceScale": 2, "quantityScale": 2, "optionSide": "CALL", "quoteAsset": "USDT", "mmp": false }' properties: avgPrice: type: string clientOrderId: type: string createTime: format: int64 type: integer executedQty: type: string fee: type: string mmp: type: boolean optionSide: type: string orderId: format: int64 type: integer postOnly: type: boolean price: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string reduceOnly: type: boolean side: type: string source: type: string status: type: string symbol: type: string timeInForce: type: string type: type: string updateTime: format: int64 type: integer type: object GetPingV1Resp: example: '{}' type: object GetPositionV1Resp: example: '[ { "entryPrice": "1000", "symbol": "BTC-200730-9000-C", "side": "SHORT", "quantity": "-0.1", "reducibleQty": "0", "markValue": "105.00138", "ror": "-0.05", "unrealizedPNL": "-5.00138", "markPrice": "1050.0138", "strikePrice": "9000", "positionCost": "1000.0000", "expiryDate": 1593511200000, "priceScale": 2, "quantityScale": 2, "optionSide": "CALL", "quoteAsset": "USDT" } ]' items: $ref: '#/components/schemas/GetPositionV1RespItem' type: array GetPositionV1RespItem: properties: entryPrice: type: string expiryDate: format: int64 type: integer markPrice: type: string markValue: type: string optionSide: type: string positionCost: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string reducibleQty: type: string ror: type: string side: type: string strikePrice: type: string symbol: type: string unrealizedPNL: type: string type: object GetTickerV1Resp: example: '[ { "symbol": "BTC-200730-9000-C", "priceChange": "-16.2038", "priceChangePercent": "-0.0162", "lastPrice": "1000", "lastQty": "1000", "open": "1016.2038", "high": "1016.2038", "low": "0", "volume": "5", "amount": "1", "bidPrice":"999.34", "askPrice":"1000.23", "openTime": 1592317127349, "closeTime": 1592380593516, "firstTradeId": 1, "tradeCount": 5, "strikePrice": "9000", "exercisePrice": "3000.3356" } ]' items: $ref: '#/components/schemas/GetTickerV1RespItem' type: array GetTickerV1RespItem: properties: amount: type: string askPrice: type: string bidPrice: type: string closeTime: format: int64 type: integer exercisePrice: type: string firstTradeId: format: int64 type: integer high: type: string lastPrice: type: string lastQty: type: string low: type: string open: type: string openTime: format: int64 type: integer priceChange: type: string priceChangePercent: type: string strikePrice: type: string symbol: type: string tradeCount: type: integer volume: type: string type: object GetTimeV1Resp: example: '{ "serverTime": 1499827319559 }' properties: serverTime: format: int64 type: integer type: object GetTradesV1Resp: example: '[ { "id":"1", "symbol": "BTC-220722-19000-C", "price": "1000", "qty": "-0.1", "quoteQty": "-100", "side": -1, "time": 1592449455993 } ]' items: $ref: '#/components/schemas/GetTradesV1RespItem' type: array GetTradesV1RespItem: properties: id: format: int64 type: integer price: type: string qty: type: string quoteQty: type: string side: type: integer symbol: type: string time: format: int64 type: integer type: object GetUserTradesV1Resp: example: '[ { "id": 4611875134427365377, "tradeId": 239, "orderId": 4611875134427365377, "symbol": "BTC-200730-9000-C", "price": "100", "quantity": "1", "fee": "0", "realizedProfit": "0.00000000", "side": "BUY", "type": "LIMIT", "volatility": "0.9", "liquidity": "TAKER", "quoteAsset": "USDT", "time": 1592465880683, "priceScale": 2, "quantityScale": 2, "optionSide": "CALL", "quoteAsset": "USDT" } ]' items: $ref: '#/components/schemas/GetUserTradesV1RespItem' type: array GetUserTradesV1RespItem: properties: fee: type: string id: format: int64 type: integer liquidity: type: string optionSide: type: string orderId: format: int64 type: integer price: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string realizedProfit: type: string side: type: string symbol: type: string time: format: int64 type: integer tradeId: format: int64 type: integer type: type: string volatility: type: string type: object OptionsCreateBatchOrdersV1Req: properties: orders: description: JSON string containing array of order objects. Max 20 orders. example: '[{"symbol":"BTC-240329-50000-C","side":"BUY","type":"LIMIT","quantity":"1","price":"100"},{"symbol":"BTC-240329-55000-C","side":"BUY","type":"LIMIT","quantity":"1","price":"150"}]' type: string recvWindow: format: int64 type: integer timestamp: format: int64 type: integer required: - orders - timestamp type: object OptionsCreateBatchOrdersV1ReqOrdersItem: properties: clientOrderId: default: "" type: string isMmp: type: boolean newOrderRespType: default: "" type: string postOnly: default: false type: boolean price: default: "" type: string quantity: default: "" type: string reduceOnly: default: false type: boolean side: default: "" type: string symbol: default: "" type: string timeInForce: default: "" type: string type: default: "" type: string required: - symbol - side - type - quantity type: object OptionsCreateBatchOrdersV1Resp: example: '[ { "orderId": 4612288550799409153, "symbol": "ETH-220826-1800-C", "price": "100", "quantity": "0.01", "side": "BUY", "type": "LIMIT", "reduceOnly": false, "postOnly": false, "clientOrderId": "1001", "mmp": false } ]' items: oneOf: - $ref: '#/components/schemas/OptionsCreateBatchOrdersV1RespItem' - $ref: '#/components/schemas/APIError' type: array OptionsCreateBatchOrdersV1RespItem: properties: clientOrderId: type: string mmp: type: boolean orderId: format: int64 type: integer postOnly: type: boolean price: type: string quantity: type: string reduceOnly: type: boolean side: type: string symbol: type: string type: type: string type: object OptionsCreateBlockOrderCreateV1Req: properties: legs: items: type: string type: array liquidity: default: "" type: string price: default: "" type: string quantity: default: "" type: string recvWindow: type: integer side: default: "" type: string symbol: default: "" type: string timestamp: type: integer required: - liquidity - legs - symbol - side - price - quantity - timestamp type: object OptionsCreateBlockOrderCreateV1Resp: example: '{ "blockTradeSettlementKey": "3668822b8-1baa-6a2f-adb8-d3de6289b361", "expireTime": 1730171888109, "liquidity": "TAKER", "status": "RECEIVED", "legs": [ { "symbol": "BNB-241101-700-C", "side": "BUY", "quantity": "1.2", "price": "2.8" } ] }' properties: blockTradeSettlementKey: type: string expireTime: format: int64 type: integer legs: items: properties: price: type: string quantity: type: string side: type: string symbol: type: string type: object type: array liquidity: type: string status: type: string type: object OptionsCreateOrderV1Req: properties: clientOrderId: default: "" type: string isMmp: type: boolean newOrderRespType: default: "" type: string postOnly: default: false type: boolean price: default: "" type: string quantity: default: "" type: string recvWindow: format: int64 type: integer reduceOnly: default: false type: boolean side: default: "" type: string symbol: default: "" type: string timeInForce: default: "" type: string timestamp: format: int64 type: integer type: default: "" type: string required: - symbol - side - type - quantity - timestamp type: object OptionsCreateOrderV1Resp: example: '{ "orderId": 4611875134427365377, "symbol": "BTC-200730-9000-C", "price": "100", "quantity": "1", "side": "BUY", "type": "LIMIT", "createDate": 1592465880683, "reduceOnly": false, "postOnly": false, "mmp": false }' properties: avgPrice: type: string clientOrderId: type: string createDate: type: integer createTime: format: int64 type: integer executedQty: type: string fee: type: string mmp: type: boolean optionSide: type: string orderId: format: int64 type: integer postOnly: type: boolean price: type: string priceScale: type: integer quantity: type: string quantityScale: type: integer quoteAsset: type: string reduceOnly: type: boolean side: type: string status: type: string symbol: type: string timeInForce: type: string type: type: string updateTime: format: int64 type: integer type: object OptionsDeleteBatchOrdersV1Resp: example: '[ { "orderId": 4611875134427365377, "symbol": "BTC-200730-9000-C", "price": "100", "quantity": "1", "executedQty": "0", "fee": 0, "side": "BUY", "type": "LIMIT", "timeInForce": "GTC", "createTime": 1592465880683, "status": "ACCEPTED", "avgPrice": "0", "reduceOnly": false, "clientOrderId": "", "updateTime": 1566818724722 } ]' items: oneOf: - $ref: '#/components/schemas/OptionsDeleteBatchOrdersV1RespItem' - $ref: '#/components/schemas/APIError' type: array OptionsDeleteBatchOrdersV1RespItem: properties: avgPrice: type: string clientOrderId: type: string createTime: format: int64 type: integer executedQty: type: string fee: type: integer orderId: format: int64 type: integer price: type: string quantity: type: string reduceOnly: type: boolean side: type: string status: type: string symbol: type: string timeInForce: type: string type: type: string updateTime: format: int64 type: integer type: object OptionsDeleteBlockOrderCreateV1Resp: example: '{}' type: object OptionsGetExchangeInfoV1Resp: example: '{ "timezone": "UTC", "serverTime": 1592387337630, "optionContracts": [ { "baseAsset": "BTC", "quoteAsset": "USDT", "underlying": "BTCUSDT", "settleAsset": "USDT" } ], "optionAssets": [ { "name": "USDT" } ], "optionSymbols": [ { "expiryDate": 1660521600000, "filters": [ { "filterType": "PRICE_FILTER", "minPrice": "0.02", "maxPrice": "80000.01", "tickSize": "0.01" }, { "filterType": "LOT_SIZE", "minQty": "0.01", "maxQty": "100", "stepSize": "0.01" } ], "symbol": "BTC-220815-50000-C", "side": "CALL", "strikePrice": "50000", "underlying": "BTCUSDT", "unit": 1, "makerFeeRate": "0.0002", "takerFeeRate": "0.0002", "minQty": "0.01", "maxQty": "100", "initialMargin": "0.15", "maintenanceMargin": "0.075", "minInitialMargin": "0.1", "minMaintenanceMargin": "0.05", "priceScale": 2, "quantityScale": 2, "quoteAsset": "USDT" } ], "rateLimits": [ { "rateLimitType": "REQUEST_WEIGHT", "interval": "MINUTE", "intervalNum": 1, "limit": 2400 }, { "rateLimitType": "ORDERS", "interval": "MINUTE", "intervalNum": 1, "limit": 1200 }, { "rateLimitType": "ORDERS", "interval": "SECOND", "intervalNum": 10, "limit": 300 } ] }' properties: optionAssets: items: properties: name: type: string type: object type: array optionContracts: items: properties: baseAsset: type: string quoteAsset: type: string settleAsset: type: string underlying: type: string type: object type: array optionSymbols: items: properties: expiryDate: format: int64 type: integer filters: items: $ref: '#/components/schemas/OptionsSymbolFilter' type: array initialMargin: type: string maintenanceMargin: type: string makerFeeRate: type: string maxQty: type: string minInitialMargin: type: string minMaintenanceMargin: type: string minQty: type: string priceScale: type: integer quantityScale: type: integer quoteAsset: type: string side: type: string strikePrice: type: string symbol: type: string takerFeeRate: type: string underlying: type: string unit: type: integer type: object type: array rateLimits: items: properties: interval: type: string intervalNum: type: integer limit: type: integer rateLimitType: type: string type: object type: array serverTime: format: int64 type: integer timezone: type: string type: object OptionsSymbolFilter: properties: filterType: type: string maxPrice: type: string maxQty: type: string minPrice: type: string minQty: type: string stepSize: type: string tickSize: type: string UpdateBlockOrderCreateV1Req: properties: blockOrderMatchingKey: default: "" type: string recvWindow: type: integer timestamp: type: integer required: - blockOrderMatchingKey - timestamp type: object UpdateBlockOrderCreateV1Resp: example: '{ "blockTradeSettlementKey": "3668822b8-1baa-6a2f-adb8-d3de6289b361", "expireTime": 1730172007000, "liquidity": "TAKER", "status": "RECEIVED", "createTime": 1730170088111, "legs": [ { "symbol": "BNB-241101-700-C", "side": "BUY", "quantity": "1.2", "price": "2.8" } ] }' properties: blockTradeSettlementKey: type: string createTime: format: int64 type: integer expireTime: format: int64 type: integer legs: items: properties: price: type: string quantity: type: string side: type: string symbol: type: string type: object type: array liquidity: type: string status: type: string type: object UpdateListenKeyV1Resp: example: '{}' type: object securitySchemes: ApiKey: in: header name: X-MBX-APIKEY type: apiKey info: description: OpenAPI specification for Binance exchange - Options API title: Binance Options API version: 0.3.0 openapi: 3.0.3 paths: /eapi/v1/account: get: description: Get current account information. operationId: GetAccountV1 parameters: - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetAccountV1Resp' description: Successful operation security: - ApiKey: [] summary: Option Account Information(TRADE) tags: - Options /eapi/v1/allOpenOrders: delete: description: Cancel all active order on a symbol. operationId: DeleteAllOpenOrdersV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/DeleteAllOpenOrdersV1Resp' description: Successful operation security: - ApiKey: [] summary: Cancel all Option orders on specific symbol (TRADE) tags: - Options /eapi/v1/allOpenOrdersByUnderlying: delete: description: Cancel all active orders on specified underlying. operationId: DeleteAllOpenOrdersByUnderlyingV1 parameters: - description: Option underlying, e.g BTCUSDT in: query name: underlying required: true schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/DeleteAllOpenOrdersByUnderlyingV1Resp' description: Successful operation security: - ApiKey: [] summary: Cancel All Option Orders By Underlying (TRADE) tags: - Options /eapi/v1/batchOrders: delete: description: Cancel multiple orders. operationId: DeleteBatchOrdersV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - description: Order ID, e.g [4611875134427365377,4611875134427365378] in: query name: orderIds schema: type: string - description: User-defined order ID, e.g ["my_id_1","my_id_2"] in: query name: clientOrderIds schema: type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/OptionsDeleteBatchOrdersV1Resp' description: Successful operation security: - ApiKey: [] summary: Cancel Multiple Option Orders (TRADE) tags: - Options post: description: Send multiple option orders. operationId: CreateBatchOrdersV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OptionsCreateBatchOrdersV1Req' description: The request body for OptionsCreateBatchOrdersV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/OptionsCreateBatchOrdersV1Resp' description: Successful operation security: - ApiKey: [] summary: Place Multiple Orders(TRADE) tags: - Options /eapi/v1/bill: get: description: Query account funding flows. operationId: GetBillV1 parameters: - description: Asset type, only support USDT as of now in: query name: currency required: true schema: default: "" type: string - description: Return the recordId and subsequent data, the latest data is returned by default, e.g 100000 in: query name: recordId schema: format: int64 type: integer - description: Start Time, e.g 1593511200000 in: query name: startTime schema: format: int64 type: integer - description: End Time, e.g 1593512200000 in: query name: endTime schema: format: int64 type: integer - description: Number of result sets returned Default:100 Max:1000 in: query name: limit schema: type: integer - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetBillV1Resp' description: Successful operation security: - ApiKey: [] summary: Account Funding Flow (USER_DATA) tags: - Options /eapi/v1/block/order/create: delete: description: Cancel a block trade order. operationId: DeleteBlockOrderCreateV1 parameters: - in: query name: blockOrderMatchingKey required: true schema: default: "" type: string - description: The value cannot be greater than 60000 in: query name: recvWindow schema: type: integer - in: query name: timestamp required: true schema: type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/OptionsDeleteBlockOrderCreateV1Resp' description: Successful operation security: - ApiKey: [] summary: Cancel Block Trade Order (TRADE) tags: - Market Maker Block Trade post: description: Send in a new block trade order. operationId: CreateBlockOrderCreateV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OptionsCreateBlockOrderCreateV1Req' description: The request body for OptionsCreateBlockOrderCreateV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/OptionsCreateBlockOrderCreateV1Resp' description: Successful operation security: - ApiKey: [] summary: New Block Trade Order (TRADE) tags: - Market Maker Block Trade put: description: Extends a block trade expire time by 30 mins from the current time. operationId: UpdateBlockOrderCreateV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/UpdateBlockOrderCreateV1Req' description: The request body for UpdateBlockOrderCreateV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/UpdateBlockOrderCreateV1Resp' description: Successful operation security: - ApiKey: [] summary: Extend Block Trade Order (TRADE) tags: - Options /eapi/v1/block/order/execute: get: description: Query block trade details; returns block trade details from counterparty's perspective. operationId: GetBlockOrderExecuteV1 parameters: - in: query name: blockOrderMatchingKey required: true schema: default: "" type: string - description: The value cannot be greater than 60000 in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetBlockOrderExecuteV1Resp' description: Successful operation security: - ApiKey: [] summary: Query Block Trade Details (USER_DATA) tags: - Options post: description: Accept a block trade order operationId: CreateBlockOrderExecuteV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateBlockOrderExecuteV1Req' description: The request body for CreateBlockOrderExecuteV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/CreateBlockOrderExecuteV1Resp' description: Successful operation security: - ApiKey: [] summary: Accept Block Trade Order (TRADE) tags: - Options /eapi/v1/block/order/orders: get: description: Check block trade order status. operationId: GetBlockOrderOrdersV1 parameters: - description: If specified, returns the specific block trade associated with the blockOrderMatchingKey in: query name: blockOrderMatchingKey schema: default: "" type: string - in: query name: endTime schema: format: int64 type: integer - in: query name: startTime schema: format: int64 type: integer - in: query name: underlying schema: default: "" type: string - description: The value cannot be greater than 60000 in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetBlockOrderOrdersV1Resp' description: Successful operation security: - ApiKey: [] summary: Query Block Trade Order (TRADE) tags: - Options /eapi/v1/block/user-trades: get: description: Gets block trades for a specific account. operationId: GetBlockUserTradesV1 parameters: - in: query name: endTime schema: format: int64 type: integer - in: query name: startTime schema: format: int64 type: integer - in: query name: underlying schema: default: "" type: string - description: The value cannot be greater than 60000 in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetBlockUserTradesV1Resp' description: Successful operation security: - ApiKey: [] summary: Account Block Trade List (USER_DATA) tags: - Options /eapi/v1/blockTrades: get: description: Get recent block trades operationId: GetBlockTradesV1 parameters: - description: Option trading pair, e.g. BTC-200730-9000-C in: query name: symbol schema: default: "" type: string - description: 'Number of records; Default: 100 and Max: 500' in: query name: limit schema: default: 100 maximum: 500 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetBlockTradesV1Resp' description: Successful operation summary: Recent Block Trades List tags: - Options /eapi/v1/countdownCancelAll: get: description: This endpoint returns the auto-cancel parameters for each underlying symbol. Note only active auto-cancel parameters will be returned, if countdownTime is set to 0 (ie. countdownTime has been turned off), the underlying symbol and corresponding countdownTime parameter will not be returned in the response. operationId: GetCountdownCancelAllV1 parameters: - description: Option underlying, e.g BTCUSDT in: query name: underlying schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetCountdownCancelAllV1Resp' description: Successful operation security: - ApiKey: [] summary: Get Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) tags: - Options post: description: This endpoint sets the parameters of the auto-cancel feature which cancels all open orders (both market maker protection and non market maker protection order types) of the underlying symbol at the end of the specified countdown time period if no heartbeat message is sent. After the countdown time period, all open orders will be cancelled and new orders will be rejected with error code -2010 until either a heartbeat message is sent or the auto-cancel feature is turned off by setting countdownTime to 0. operationId: CreateCountdownCancelAllV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateCountdownCancelAllV1Req' description: The request body for CreateCountdownCancelAllV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/CreateCountdownCancelAllV1Resp' description: Successful operation security: - ApiKey: [] summary: Set Auto-Cancel All Open Orders (Kill-Switch) Config (TRADE) tags: - Options /eapi/v1/countdownCancelAllHeartBeat: post: description: This endpoint resets the time from which the countdown will begin to the time this messaged is received. It should be called repeatedly as heartbeats. Multiple heartbeats can be updated at once by specifying the underlying symbols as a list (ex. BTCUSDT,ETHUSDT) in the underlyings parameter. operationId: CreateCountdownCancelAllHeartBeatV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateCountdownCancelAllHeartBeatV1Req' description: The request body for CreateCountdownCancelAllHeartBeatV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/CreateCountdownCancelAllHeartBeatV1Resp' description: Successful operation security: - ApiKey: [] summary: Auto-Cancel All Open Orders (Kill-Switch) Heartbeat (TRADE) tags: - Options /eapi/v1/depth: get: description: Check orderbook depth on specific symbol operationId: GetDepthV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - description: Default:100 Max:1000.Optional value:[10, 20, 50, 100, 500, 1000] in: query name: limit schema: type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetDepthV1Resp' description: Successful operation summary: Order Book tags: - Options /eapi/v1/exchangeInfo: get: description: Current exchange trading rules and symbol information operationId: GetExchangeInfoV1 responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/OptionsGetExchangeInfoV1Resp' description: Successful operation summary: Exchange Information tags: - Options /eapi/v1/exerciseHistory: get: description: Get historical exercise records. operationId: GetExerciseHistoryV1 parameters: - description: Underlying index like BTCUSDT in: query name: underlying schema: default: "" type: string - description: Start Time in: query name: startTime schema: format: int64 type: integer - description: End Time in: query name: endTime schema: format: int64 type: integer - description: Number of records Default:100 Max:100 in: query name: limit schema: type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetExerciseHistoryV1Resp' description: Successful operation summary: Historical Exercise Records tags: - Options /eapi/v1/exerciseRecord: get: description: Get account exercise records. operationId: GetExerciseRecordV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol schema: default: "" type: string - description: startTime in: query name: startTime schema: format: int64 type: integer - description: endTime in: query name: endTime schema: format: int64 type: integer - description: default 1000, max 1000 in: query name: limit schema: default: 1000 maximum: 1000 type: integer - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetExerciseRecordV1Resp' description: Successful operation security: - ApiKey: [] summary: User Exercise Record (USER_DATA) tags: - Options /eapi/v1/historicalTrades: get: description: Get older market historical trades. operationId: GetHistoricalTradesV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - description: The UniqueId ID from which to return. The latest deal record is returned by default in: query name: fromId schema: format: int64 type: integer - description: Number of records Default:100 Max:500 in: query name: limit schema: type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetHistoricalTradesV1Resp' description: Successful operation security: - ApiKey: [] summary: Old Trades Lookup (MARKET_DATA) tags: - Options /eapi/v1/historyOrders: get: description: 'Query all finished orders within 5 days, finished status: CANCELLED FILLED REJECTED.' operationId: GetHistoryOrdersV1 parameters: - description: Option trading pair in: query name: symbol required: true schema: default: "" type: string - description: Returns the orderId and subsequent orders, the most recent order is returned by default in: query name: orderId schema: format: int64 type: integer - description: Start Time, e.g 1593511200000 in: query name: startTime schema: format: int64 type: integer - description: End Time, e.g 1593512200000 in: query name: endTime schema: format: int64 type: integer - description: Number of result sets returned Default:100 Max:1000 in: query name: limit schema: type: integer - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetHistoryOrdersV1Resp' description: Successful operation security: - ApiKey: [] summary: Query Option Order History (TRADE) tags: - Options /eapi/v1/income/asyn: get: description: Get download id for option transaction history operationId: GetIncomeAsynV1 responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetIncomeAsynV1Resp' description: Successful operation security: - ApiKey: [] summary: Get Download Id For Option Transaction History (USER_DATA) tags: - Options /eapi/v1/income/asyn/id: get: description: Get option transaction history download Link by Id operationId: GetIncomeAsynIdV1 parameters: - description: get by download id api in: query name: downloadId required: true schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetIncomeAsynIdV1Resp' description: Successful operation security: - ApiKey: [] summary: Get Option Transaction History Download Link by Id (USER_DATA) tags: - Options /eapi/v1/index: get: description: Get spot index price for option underlying. operationId: GetIndexV1 parameters: - description: Spot pair(Option contract underlying asset, e.g BTCUSDT) in: query name: underlying required: true schema: default: "" type: string responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetIndexV1Resp' description: Successful operation summary: Symbol Price Ticker tags: - Options /eapi/v1/klines: get: description: |- Kline/candlestick bars for an option symbol. Klines are uniquely identified by their open time. operationId: GetKlinesV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - description: Time interval in: query name: interval required: true schema: default: "" type: string - description: Start Time 1592317127349 in: query name: startTime schema: format: int64 type: integer - description: End Time in: query name: endTime schema: format: int64 type: integer - description: Number of records Default:500 Max:1500 in: query name: limit schema: type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetKlinesV1Resp' description: Successful operation summary: Kline/Candlestick Data tags: - Options /eapi/v1/listenKey: delete: description: Close out a user data stream. operationId: DeleteListenKeyV1 responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/DeleteListenKeyV1Resp' description: Successful operation security: - ApiKey: [] summary: Close User Data Stream (USER_STREAM) tags: - Options post: 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. operationId: CreateListenKeyV1 responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/CreateListenKeyV1Resp' description: Successful operation security: - ApiKey: [] summary: Start User Data Stream (USER_STREAM) tags: - Options put: 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 60 minutes. operationId: UpdateListenKeyV1 responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/UpdateListenKeyV1Resp' description: Successful operation security: - ApiKey: [] summary: Keepalive User Data Stream (USER_STREAM) tags: - Options /eapi/v1/marginAccount: get: description: Get current account information. operationId: GetMarginAccountV1 parameters: - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetMarginAccountV1Resp' description: Successful operation security: - ApiKey: [] summary: Option Margin Account Information (USER_DATA) tags: - Options /eapi/v1/mark: get: description: Option mark price and greek info. operationId: GetMarkV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol schema: default: "" type: string responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetMarkV1Resp' description: Successful operation summary: Option Mark Price tags: - Options /eapi/v1/mmp: get: description: Get config for MMP. operationId: GetMmpV1 parameters: - description: underlying, e.g BTCUSDT in: query name: underlying schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetMmpV1Resp' description: Successful operation security: - ApiKey: [] summary: Get Market Maker Protection Config (TRADE) tags: - Options /eapi/v1/mmpReset: post: description: Reset MMP, start MMP order again. operationId: CreateMmpResetV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateMmpResetV1Req' description: The request body for CreateMmpResetV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/CreateMmpResetV1Resp' description: Successful operation security: - ApiKey: [] summary: Reset Market Maker Protection Config (TRADE) tags: - Options /eapi/v1/mmpSet: post: description: |- Set config for MMP. Market Maker Protection(MMP) is a set of protection mechanism for option market maker, this mechanism is able to prevent mass trading in short period time. Once market maker's account branches the threshold, the Market Maker Protection will be triggered. When Market Maker Protection triggers, all the current MMP orders will be canceled, new MMP orders will be rejected. Market maker can use this time to reevaluate market and modify order price. operationId: CreateMmpSetV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateMmpSetV1Req' description: The request body for CreateMmpSetV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/CreateMmpSetV1Resp' description: Successful operation security: - ApiKey: [] summary: Set Market Maker Protection Config (TRADE) tags: - Options /eapi/v1/openInterest: get: description: Get open interest for specific underlying asset on specific expiration date. operationId: GetOpenInterestV1 parameters: - description: underlying asset, e.g ETH/BTC in: query name: underlyingAsset required: true schema: default: "" type: string - description: expiration date, e.g 221225 in: query name: expiration required: true schema: default: "" type: string responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetOpenInterestV1Resp' description: Successful operation summary: Open Interest tags: - Options /eapi/v1/openOrders: get: description: 'Query current all open orders, status: ACCEPTED PARTIALLY_FILLED' operationId: GetOpenOrdersV1 parameters: - description: return all orders if don't pass, Option trading pair, e.g BTC-200730-9000-C, in: query name: symbol schema: default: "" type: string - description: Returns the orderId and subsequent orders, the most recent order is returned by default in: query name: orderId schema: format: int64 type: integer - description: Start Time in: query name: startTime schema: format: int64 type: integer - description: End Time in: query name: endTime schema: format: int64 type: integer - description: Number of result sets returned Default:100 Max:1000 in: query name: limit schema: type: integer - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetOpenOrdersV1Resp' description: Successful operation security: - ApiKey: [] summary: Query Current Open Option Orders (USER_DATA) tags: - Options /eapi/v1/order: delete: description: Cancel an active order. operationId: DeleteOrderV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - description: Order ID, e.g 4611875134427365377 in: query name: orderId schema: format: int64 type: integer - description: User-defined order ID, e.g 10000 in: query name: clientOrderId schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/DeleteOrderV1Resp' description: Successful operation security: - ApiKey: [] summary: Cancel Option Order (TRADE) tags: - Options get: description: Check an order status. operationId: GetOrderV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - description: Order id in: query name: orderId schema: format: int64 type: integer - description: User-defined order ID cannot be repeated in pending orders in: query name: clientOrderId schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetOrderV1Resp' description: Successful operation security: - ApiKey: [] summary: Query Single Order (TRADE) tags: - Options post: description: Send a new order. operationId: CreateOrderV1 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/OptionsCreateOrderV1Req' description: The request body for OptionsCreateOrderV1 required: true responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/OptionsCreateOrderV1Resp' description: Successful operation security: - ApiKey: [] summary: New Order (TRADE) tags: - Options /eapi/v1/ping: get: description: Test connectivity to the Rest API. operationId: GetPingV1 responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetPingV1Resp' description: Successful operation summary: Test Connectivity tags: - Options /eapi/v1/position: get: description: Get current position information. operationId: GetPositionV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol schema: default: "" type: string - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetPositionV1Resp' description: Successful operation security: - ApiKey: [] summary: Option Position Information (USER_DATA) tags: - Options /eapi/v1/ticker: get: description: 24 hour rolling window price change statistics. operationId: GetTickerV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol schema: default: "" type: string responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetTickerV1Resp' description: Successful operation summary: 24hr Ticker Price Change Statistics tags: - Options /eapi/v1/time: get: description: Test connectivity to the Rest API and get the current server time. operationId: GetTimeV1 responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetTimeV1Resp' description: Successful operation summary: Check Server Time tags: - Options /eapi/v1/trades: get: description: Get recent market trades operationId: GetTradesV1 parameters: - description: Option trading pair, e.g BTC-200730-9000-C in: query name: symbol required: true schema: default: "" type: string - description: Number of records Default:100 Max:500 in: query name: limit schema: type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetTradesV1Resp' description: Successful operation summary: Recent Trades List tags: - Options /eapi/v1/userTrades: get: description: Get trades for a specific account and symbol. operationId: GetUserTradesV1 parameters: - description: Option symbol, e.g BTC-200730-9000-C in: query name: symbol schema: default: "" type: string - description: Trade id to fetch from. Default gets most recent trades, e.g 4611875134427365376 in: query name: fromId schema: format: int64 type: integer - description: Start time, e.g 1593511200000 in: query name: startTime schema: format: int64 type: integer - description: End time, e.g 1593512200000 in: query name: endTime schema: format: int64 type: integer - description: Default 100; max 1000 in: query name: limit schema: default: 100 maximum: 1000 type: integer - in: query name: recvWindow schema: format: int64 type: integer - in: query name: timestamp required: true schema: format: int64 type: integer responses: 4XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Client Error 5XX: content: application/json: schema: $ref: '#/components/schemas/APIError' description: Server Error "200": content: application/json: schema: $ref: '#/components/schemas/GetUserTradesV1Resp' description: Successful operation security: - ApiKey: [] summary: Account Trade List (USER_DATA) tags: - Options servers: - description: Binance Options API Server url: https://eapi.binance.com