components:
schemas:
APIError:
description: binance API error
properties:
code:
type: integer
msg:
type: string
type: object
CmfuturesCreateBatchOrderV1ReqBatchOrdersItem:
properties:
activationPrice:
default: ""
type: string
callbackRate:
default: ""
type: string
closePosition:
default: ""
type: string
newClientOrderId:
default: ""
type: string
newOrderRespType:
default: ""
type: string
positionSide:
default: ""
type: string
price:
default: ""
type: string
priceMatch:
default: ""
type: string
priceProtect:
default: ""
type: string
quantity:
default: ""
type: string
reduceOnly:
default: ""
type: string
selfTradePreventionMode:
default: ""
type: string
side:
default: ""
type: string
stopPrice:
default: ""
type: string
symbol:
default: ""
type: string
timeInForce:
default: ""
type: string
type:
default: ""
type: string
workingType:
default: ""
type: string
required:
- symbol
- side
- type
type: object
CmfuturesCreateBatchOrdersV1Req:
properties:
batchOrders:
type: string
recvWindow:
format: int64
type: integer
timestamp:
format: int64
type: integer
required:
- batchOrders
- timestamp
type: object
CmfuturesCreateBatchOrdersV1Resp:
example: '[ { "clientOrderId": "testOrder", "cumQty": "0", "cumBase": "0", "executedQty": "0", "orderId": 22542179, "avgPrice": "0.0", "origQty": "10", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "NEW", "stopPrice": "9300", "symbol": "BTCUSD_200925", "pair": "BTCUSD", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "origType": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1566818724722, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE" }, { "code": -2022, "msg": "ReduceOnly Order is rejected." } ]'
items:
oneOf:
- $ref: '#/components/schemas/CmfuturesCreateBatchOrdersV1RespItem'
- $ref: '#/components/schemas/APIError'
type: array
CmfuturesCreateBatchOrdersV1RespItem:
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
cumQty:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
CmfuturesDeleteBatchOrdersV1Resp:
example: '[ { "avgPrice": "0.0", "clientOrderId": "myOrder1", "cumQty": "0", "cumBase": "0", "executedQty": "0", "orderId": 283194212, "origQty": "11", "origType": "TRAILING_STOP_MARKET", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "CANCELED", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSD_200925", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "updateTime": 1571110484038 }, { "code": -2011, "msg": "Unknown order sent." } ]'
items:
oneOf:
- $ref: '#/components/schemas/CmfuturesDeleteBatchOrdersV1RespItem'
- $ref: '#/components/schemas/APIError'
type: array
CmfuturesDeleteBatchOrdersV1RespItem:
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
cumQty:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
CmfuturesGetContinuousKlinesV1Resp:
example: '[ [ 1591258320000, "9640.7", "9642.4", "9640.6", "9642.0", "206", 1591258379999, "2.13660389", 48, "119", "1.23424865", "0" ] ]'
items:
items:
oneOf:
- format: int64
type: integer
- type: string
type: array
type: array
CmfuturesGetExchangeInfoV1Resp:
example: '{ "exchangeFilters": [], "rateLimits": [ { "interval": "MINUTE", "intervalNum": 1, "limit": 6000, "rateLimitType": "REQUEST_WEIGHT" }, { "interval": "MINUTE", "intervalNum": 1, "limit": 6000, "rateLimitType": "ORDERS" } ], "serverTime": 1565613908500, "symbols": [ { "filters": [ { "filterType": "PRICE_FILTER", "maxPrice": "100000", "minPrice": "0.1", "tickSize": "0.1" }, { "filterType": "LOT_SIZE", "maxQty": "100000", "minQty": "1", "stepSize": "1" }, { "filterType": "MARKET_LOT_SIZE", "maxQty": "100000", "minQty": "1", "stepSize": "1" }, { "filterType": "MAX_NUM_ORDERS", "limit": 200 }, { "filterType": "PERCENT_PRICE", "multiplierUp": "1.0500", "multiplierDown": "0.9500", "multiplierDecimal": 4 } ], "OrderType": [ "LIMIT", "MARKET", "STOP", "TAKE_PROFIT", "TRAILING_STOP_MARKET" ], "timeInForce": [ "GTC", "IOC", "FOK", "GTX" ], "liquidationFee": "0.010000", "marketTakeBound": "0.30", "symbol": "BTCUSD_200925", "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "deliveryDate": 1601020800000, "onboardDate": 1590739200000, "contractStatus": "TRADING", "contractSize": 100, "quoteAsset": "USD", "baseAsset": "BTC", "marginAsset": "BTC", "pricePrecision": 1, "quantityPrecision": 0, "baseAssetPrecision": 8, "quotePrecision": 8, "equalQtyPrecision": 4, "triggerProtect": "0.0500", "maintMarginPercent": "2.5000", "requiredMarginPercent": "5.0000", "underlyingType": "COIN", "underlyingSubType": [] } ], "timezone": "UTC" }'
properties:
exchangeFilters:
items:
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
symbols:
items:
properties:
OrderType:
items:
type: string
type: array
baseAsset:
type: string
baseAssetPrecision:
type: integer
contractSize:
type: integer
contractStatus:
type: string
contractType:
type: string
deliveryDate:
format: int64
type: integer
equalQtyPrecision:
type: integer
filters:
items:
$ref: '#/components/schemas/CmfuturesSymbolFilter'
type: array
liquidationFee:
type: string
maintMarginPercent:
type: string
marginAsset:
type: string
marketTakeBound:
type: string
onboardDate:
format: int64
type: integer
pair:
type: string
pricePrecision:
type: integer
quantityPrecision:
type: integer
quoteAsset:
type: string
quotePrecision:
type: integer
requiredMarginPercent:
type: string
symbol:
type: string
timeInForce:
items:
type: string
type: array
triggerProtect:
type: string
underlyingSubType:
items:
type: string
type: array
underlyingType:
type: string
type: object
type: array
timezone:
type: string
type: object
CmfuturesGetForceOrdersV1Resp:
example: '[ { "orderId": 165123080, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "status": "FILLED", "clientOrderId": "autoclose-1596542005017000006", "price": "11326.9", "avgPrice": "11326.9", "origQty": "1", "executedQty": "1", "cumBase": "0.00882854", "timeInForce": "IOC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "BOTH", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "time": 1596542005019, "updateTime": 1596542005050 }, { "orderId": 207251986, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "status": "FILLED", "clientOrderId": "autoclose-1597307316020000006", "price": "11619.4", "avgPrice": "11661.2", "origQty": "1", "executedQty": "1", "cumBase": "0.00857544", "timeInForce": "IOC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "SELL", "positionSide": "LONG", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "time": 1597307316022, "updateTime": 1597307316035 } ]'
items:
$ref: '#/components/schemas/CmfuturesGetForceOrdersV1RespItem'
type: array
CmfuturesGetForceOrdersV1RespItem:
properties:
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceProtect:
type: boolean
reduceOnly:
type: boolean
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
time:
format: int64
type: integer
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
CmfuturesGetIndexPriceKlinesV1Resp:
example: '[ [ 1591256400000, "9653.69440000", "9653.69640000", "9651.38600000", "9651.55200000", "0", 1591256459999, "0", 60, "0", "0", "0" ] ]'
items:
items:
oneOf:
- format: int64
type: integer
- type: string
type: array
type: array
CmfuturesGetKlinesV1Resp:
example: '[ [ 1591258320000, "9640.7", "9642.4", "9640.6", "9642.0", "206", 1591258379999, "2.13660389", 48, "119", "1.23424865", "0" ] ]'
items:
items:
oneOf:
- format: int64
type: integer
- type: string
type: array
type: array
CmfuturesGetMarkPriceKlinesV1Resp:
example: '[ [ 1591256460000, "9653.29201333", "9654.56401333", "9653.07367333", "9653.07367333", "0", 1591256519999, "0", 60, "0", "0", "0" ] ]'
items:
items:
oneOf:
- format: int64
type: integer
- type: string
type: array
type: array
CmfuturesGetPremiumIndexKlinesV1Resp:
example: '[ [ 1691603820000, "-0.00042931", "-0.00023641", "-0.00059406", "-0.00043659", "0", 1691603879999, "0", 12, "0", "0", "0" ] ]'
items:
items:
oneOf:
- format: int64
type: integer
- type: string
type: array
type: array
CmfuturesSymbolFilter:
properties:
filterType:
type: string
limit:
type: integer
maxPrice:
type: string
maxQty:
type: string
minPrice:
type: string
minQty:
type: string
multiplierDecimal:
type: string
multiplierDown:
type: string
multiplierUp:
type: string
stepSize:
type: string
tickSize:
type: string
type: object
CmfuturesUpdateBatchOrdersV1Req:
properties:
batchOrders:
description: JSON string containing array of order modification objects. Max 5 orders.
example: '[{"symbol":"BTCUSD_PERP","orderId":12345,"side":"BUY","quantity":"1","price":"30000"},{"symbol":"BTCUSD_PERP","orderId":12346,"side":"BUY","quantity":"1","price":"31000"}]'
type: string
recvWindow:
format: int64
type: integer
timestamp:
format: int64
type: integer
required:
- batchOrders
- timestamp
type: object
CmfuturesUpdateBatchOrdersV1ReqBatchOrdersItem:
properties:
orderId:
format: int64
type: integer
origClientOrderId:
default: ""
type: string
price:
default: ""
type: string
quantity:
default: ""
type: string
recvWindow:
format: int64
type: integer
side:
default: ""
type: string
symbol:
default: ""
type: string
timestamp:
format: int64
type: integer
required:
- symbol
- side
- timestamp
type: object
CmfuturesUpdateBatchOrdersV1Resp:
example: '[ { "orderId": 20072994037, "symbol": "BTCUSD_PERP", "pair": "BTCUSD", "status": "NEW", "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "price": "30005", "avgPrice": "0.0", "origQty": "1", "executedQty": "0", "cumQty": "0", "cumBase": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "LONG", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "updateTime": 1629182711600 }, { "code": -2022, "msg": "ReduceOnly Order is rejected." } ]'
items:
oneOf:
- $ref: '#/components/schemas/CmfuturesUpdateBatchOrdersV1RespItem'
- $ref: '#/components/schemas/APIError'
type: array
CmfuturesUpdateBatchOrdersV1RespItem:
properties:
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
cumQty:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
CreateCountdownCancelAllV1Req:
properties:
countdownTime:
format: int64
type: integer
recvWindow:
format: int64
type: integer
symbol:
default: ""
type: string
timestamp:
format: int64
type: integer
required:
- symbol
- countdownTime
- timestamp
type: object
CreateCountdownCancelAllV1Resp:
example: '{ "symbol": "BTCUSD_200925", "countdownTime": "100000" }'
properties:
countdownTime:
type: string
symbol:
type: string
type: object
CreateLeverageV1Req:
properties:
leverage:
type: integer
recvWindow:
format: int64
type: integer
symbol:
default: ""
type: string
timestamp:
format: int64
type: integer
required:
- symbol
- leverage
- timestamp
type: object
CreateLeverageV1Resp:
example: '{ "leverage": 21, "maxQty": "1000", "symbol": "BTCUSD_200925" }'
properties:
leverage:
type: integer
maxQty:
type: string
symbol:
type: string
type: object
CreateListenKeyV1Resp:
example: '{ "listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" }'
properties:
listenKey:
type: string
type: object
CreateMarginTypeV1Req:
properties:
marginType:
default: ""
type: string
recvWindow:
format: int64
type: integer
symbol:
default: ""
type: string
timestamp:
format: int64
type: integer
required:
- symbol
- marginType
- timestamp
type: object
CreateMarginTypeV1Resp:
example: '{ "code": 200, "msg": "success" }'
properties:
code:
type: integer
msg:
type: string
type: object
CreateOrderV1Req:
properties:
activationPrice:
default: ""
type: string
callbackRate:
default: ""
type: string
closePosition:
default: ""
type: string
newClientOrderId:
default: ""
type: string
newOrderRespType:
default: ""
type: string
positionSide:
default: ""
type: string
price:
default: ""
type: string
priceMatch:
default: ""
type: string
priceProtect:
default: ""
type: string
quantity:
default: ""
type: string
recvWindow:
format: int64
type: integer
reduceOnly:
default: ""
type: string
selfTradePreventionMode:
default: ""
type: string
side:
default: ""
type: string
stopPrice:
default: ""
type: string
symbol:
default: ""
type: string
timeInForce:
default: ""
type: string
timestamp:
format: int64
type: integer
type:
default: ""
type: string
workingType:
default: ""
type: string
required:
- symbol
- side
- type
- timestamp
type: object
CreateOrderV1Resp:
example: '{ "clientOrderId": "testOrder", "cumQty": "0", "cumBase": "0", "executedQty": "0", "orderId": 22542179, "avgPrice": "0.0", "origQty": "10", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "NEW", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "origType": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1566818724722, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE" }'
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
cumQty:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
CreatePositionMarginV1Req:
properties:
amount:
default: ""
type: string
positionSide:
default: ""
type: string
recvWindow:
format: int64
type: integer
symbol:
default: ""
type: string
timestamp:
format: int64
type: integer
type:
type: integer
required:
- symbol
- amount
- type
- timestamp
type: object
CreatePositionMarginV1Resp:
example: '{ "amount": 100.0, "code": 200, "msg": "Successfully modify position margin.", "type": 1 }'
properties:
amount:
type: number
code:
type: integer
msg:
type: string
type:
type: integer
type: object
CreatePositionSideDualV1Req:
properties:
dualSidePosition:
default: ""
type: string
recvWindow:
format: int64
type: integer
timestamp:
format: int64
type: integer
required:
- dualSidePosition
- timestamp
type: object
CreatePositionSideDualV1Resp:
example: '{ "code": 200, "msg": "success" }'
properties:
code:
type: integer
msg:
type: string
type: object
DeleteAllOpenOrdersV1Resp:
example: '{ "code": 200, "msg": "The operation of cancel all open order is done." }'
properties:
code:
type: integer
msg:
type: string
type: object
DeleteListenKeyV1Resp:
example: '{}'
type: object
DeleteOrderV1Resp:
example: '{ "avgPrice": "0.0", "clientOrderId": "myOrder1", "cumQty": "0", "cumBase": "0", "executedQty": "0", "orderId": 283194212, "origQty": "11", "origType": "TRAILING_STOP_MARKET", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "CANCELED", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1571110484038, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE" }'
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
cumQty:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
GetAccountV1Resp:
example: '{ "assets": [ { "asset": "BTC", "walletBalance": "0.00241969", "unrealizedProfit": "0.00000000", "marginBalance": "0.00241969", "maintMargin": "0.00000000", "initialMargin": "0.00000000", "positionInitialMargin": "0.00000000", "openOrderInitialMargin": "0.00000000", "maxWithdrawAmount": "0.00241969", "crossWalletBalance": "0.00241969", "crossUnPnl": "0.00000000", "availableBalance": "0.00241969", "updateTime": 1625474304765 } ], "positions": [ { "symbol": "BTCUSD_201225", "positionAmt":"0", "initialMargin": "0", "maintMargin": "0", "unrealizedProfit": "0.00000000", "positionInitialMargin": "0", "openOrderInitialMargin": "0", "leverage": "125", "isolated": false, "positionSide": "BOTH", "entryPrice": "0.0", "breakEvenPrice": "0.0", "maxQty": "50", "updateTime": 0 }, { "symbol": "BTCUSD_201225", "positionAmt":"0", "initialMargin": "0", "maintMargin": "0", "unrealizedProfit": "0.00000000", "positionInitialMargin": "0", "openOrderInitialMargin": "0", "leverage": "125", "isolated": false, "positionSide": "LONG", "entryPrice": "0.0", "breakEvenPrice": "0.0", "maxQty": "50", "updateTime": 0 }, { "symbol": "BTCUSD_201225", "positionAmt":"0", "initialMargin": "0", "maintMargin": "0", "unrealizedProfit": "0.00000000", "positionInitialMargin": "0", "openOrderInitialMargin": "0", "leverage": "125", "isolated": false, "positionSide": "SHORT", "entryPrice": "0.0", "breakEvenPrice": "0.0", "maxQty": "50", "notionalValue": "0", "updateTime":1627026881327 } ], "canDeposit": true, "canTrade": true, "canWithdraw": true, "feeTier": 2, "updateTime": 0 }'
properties:
assets:
items:
properties:
asset:
type: string
availableBalance:
type: string
crossUnPnl:
type: string
crossWalletBalance:
type: string
initialMargin:
type: string
maintMargin:
type: string
marginBalance:
type: string
maxWithdrawAmount:
type: string
openOrderInitialMargin:
type: string
positionInitialMargin:
type: string
unrealizedProfit:
type: string
updateTime:
format: int64
type: integer
walletBalance:
type: string
type: object
type: array
canDeposit:
type: boolean
canTrade:
type: boolean
canWithdraw:
type: boolean
feeTier:
type: integer
positions:
items:
properties:
breakEvenPrice:
type: string
entryPrice:
type: string
initialMargin:
type: string
isolated:
type: boolean
leverage:
type: string
maintMargin:
type: string
maxQty:
type: string
openOrderInitialMargin:
type: string
positionAmt:
type: string
positionInitialMargin:
type: string
positionSide:
type: string
symbol:
type: string
unrealizedProfit:
type: string
updateTime:
format: int64
type: integer
type: object
type: array
updateTime:
format: int64
type: integer
type: object
GetAdlQuantileV1Resp:
example: '[ { "symbol": "BTCUSD_200925", "adlQuantile": { "LONG": 3, "SHORT": 3, "HEDGE": 0 } }, { "symbol": "BTCUSD_201225", "adlQuantile": { "LONG": 1, "SHORT": 2, "BOTH": 0 } } ]'
items:
$ref: '#/components/schemas/GetAdlQuantileV1RespItem'
type: array
GetAdlQuantileV1RespItem:
properties:
adlQuantile:
properties:
HEDGE:
type: integer
LONG:
type: integer
SHORT:
type: integer
type: object
symbol:
type: string
type: object
GetAggTradesV1Resp:
example: '[ { "a": 416690, "p": "9642.4", "q": "3", "f": 595259, "l": 595259, "T": 1591250548649, "m": false } ]'
items:
$ref: '#/components/schemas/GetAggTradesV1RespItem'
type: array
GetAggTradesV1RespItem:
properties:
T:
format: int64
type: integer
a:
type: integer
f:
type: integer
l:
type: integer
m:
type: boolean
p:
type: string
q:
type: string
type: object
GetAllOrdersV1Resp:
example: '[ { "avgPrice": "0.0", "clientOrderId": "abc", "cumBase": "0", "executedQty": "0", "orderId": 1917641, "origQty": "0.40", "origType": "TRAILING_STOP_MARKET", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "NEW", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE" } ]'
items:
$ref: '#/components/schemas/GetAllOrdersV1RespItem'
type: array
GetAllOrdersV1RespItem:
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
time:
format: int64
type: integer
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
GetBalanceV1Resp:
example: '[ { "accountAlias": "SgsR", "asset": "BTC", "balance": "0.00250000", "withdrawAvailable": "0.00250000", "crossWalletBalance": "0.00241969", "crossUnPnl": "0.00000000", "availableBalance": "0.00241969", "updateTime": 1592468353979 } ]'
items:
$ref: '#/components/schemas/GetBalanceV1RespItem'
type: array
GetBalanceV1RespItem:
properties:
accountAlias:
type: string
asset:
type: string
availableBalance:
type: string
balance:
type: string
crossUnPnl:
type: string
crossWalletBalance:
type: string
updateTime:
format: int64
type: integer
withdrawAvailable:
type: string
type: object
GetCommissionRateV1Resp:
example: '{ "symbol": "BTCUSD_PERP", "makerCommissionRate": "0.00015", "takerCommissionRate": "0.00040" }'
properties:
makerCommissionRate:
type: string
symbol:
type: string
takerCommissionRate:
type: string
type: object
GetConstituentsV1Resp:
example: '{ "symbol": "BTCUSD", "time": 1697422647853, "constituents": [ { "exchange": "bitstamp", "symbol": "btcusd" }, { "exchange": "coinbase", "symbol": "BTC-USD" }, { "exchange": "kraken", "symbol": "XBT/USD" }, { "exchange": "binance_cross", "symbol": "BTCUSDC*index(USDCUSD)" } ] }'
properties:
constituents:
items:
properties:
exchange:
type: string
symbol:
type: string
type: object
type: array
symbol:
type: string
time:
format: int64
type: integer
type: object
GetDepthV1Resp:
example: '{ "lastUpdateId": 16769853, "symbol": "BTCUSD_PERP", "pair": "BTCUSD", "E": 1591250106370, "T": 1591250106368, "bids": [ [ "9638.0", "431" ] ], "asks": [ [ "9638.2", "12" ] ] }'
properties:
E:
format: int64
type: integer
T:
format: int64
type: integer
asks:
items:
items:
type: string
type: array
type: array
bids:
items:
items:
type: string
type: array
type: array
lastUpdateId:
format: int64
type: integer
pair:
type: string
symbol:
type: string
type: object
GetFundingInfoV1Resp:
example: '[ { "symbol": "BLZUSDT", "adjustedFundingRateCap": "0.02500000", "adjustedFundingRateFloor": "-0.02500000", "fundingIntervalHours": 8, "disclaimer": false } ]'
items:
$ref: '#/components/schemas/GetFundingInfoV1RespItem'
type: array
GetFundingInfoV1RespItem:
properties:
adjustedFundingRateCap:
type: string
adjustedFundingRateFloor:
type: string
disclaimer:
type: boolean
fundingIntervalHours:
type: integer
symbol:
type: string
type: object
GetFundingRateV1Resp:
example: '[ { "symbol": "BTCUSD_PERP", "fundingTime": 1596038400000, "fundingRate": "-0.00300000" }, { "symbol": "BTCUSD_PERP", "fundingTime": 1596067200000, "fundingRate": "-0.00300000" } ]'
items:
$ref: '#/components/schemas/GetFundingRateV1RespItem'
type: array
GetFundingRateV1RespItem:
properties:
fundingRate:
type: string
fundingTime:
format: int64
type: integer
symbol:
type: string
type: object
GetFuturesDataBasisResp:
example: '[ { "indexPrice": "29269.93972727", "contractType": "CURRENT_QUARTER", "basisRate": "0.0024", "futuresPrice": "29341.3", "annualizedBasisRate": "0.0283", "basis": "71.36027273", "pair": "BTCUSD", "timestamp": 1653381600000 } ]'
items:
$ref: '#/components/schemas/GetFuturesDataBasisRespItem'
type: array
GetFuturesDataBasisRespItem:
properties:
annualizedBasisRate:
type: string
basis:
type: string
basisRate:
type: string
contractType:
type: string
futuresPrice:
type: string
indexPrice:
type: string
pair:
type: string
timestamp:
format: int64
type: integer
type: object
GetFuturesDataGlobalLongShortAccountRatioResp:
example: '[ { "pair": "BTCUSD", "longShortRatio": "0.1960", "longAccount": "0.6622", "shortAccount": "0.3378", "timestamp": 1583139600000 }, { "pair": "BTCUSD", "longShortRatio": "1.9559", "longAccount": "0.6617", "shortAccount": "0.3382", "timestamp": 1583139900000 } ]'
items:
$ref: '#/components/schemas/GetFuturesDataGlobalLongShortAccountRatioRespItem'
type: array
GetFuturesDataGlobalLongShortAccountRatioRespItem:
properties:
longAccount:
type: string
longShortRatio:
type: string
pair:
type: string
shortAccount:
type: string
timestamp:
format: int64
type: integer
type: object
GetFuturesDataOpenInterestHistResp:
example: '[ { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "sumOpenInterest": "20403", "sumOpenInterestValue": "176196512.23400000", "timestamp": 1591261042378 }, { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "sumOpenInterest": "20401", "sumOpenInterestValue": "176178704.98700000", "timestamp": 1583128200000 } ]'
items:
$ref: '#/components/schemas/GetFuturesDataOpenInterestHistRespItem'
type: array
GetFuturesDataOpenInterestHistRespItem:
properties:
contractType:
type: string
pair:
type: string
sumOpenInterest:
type: string
sumOpenInterestValue:
type: string
timestamp:
format: int64
type: integer
type: object
GetFuturesDataTakerBuySellVolResp:
example: '[ { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "takerBuyVol": "387", "takerSellVol": "248", "takerBuyVolValue": "2342.1220", "takerSellVolValue": "4213.9800", "timestamp": 1591261042378 }, { "pair": "BTCUSD", "contractType": "CURRENT_QUARTER", "takerBuyVol": "234", "takerSellVol": "121", "takerBuyVolValue": "4563.1320", "takerSellVolValue": "3313.3940", "timestamp": 1585615200000 } ]'
items:
$ref: '#/components/schemas/GetFuturesDataTakerBuySellVolRespItem'
type: array
GetFuturesDataTakerBuySellVolRespItem:
properties:
contractType:
type: string
pair:
type: string
takerBuyVol:
type: string
takerBuyVolValue:
type: string
takerSellVol:
type: string
takerSellVolValue:
type: string
timestamp:
format: int64
type: integer
type: object
GetFuturesDataTopLongShortAccountRatioResp:
example: '[ { "pair": "BTCUSD", "longShortRatio": "1.8105", "longAccount": "0.6442", "shortAccount": "0.3558", "timestamp": 1591261042378 }, { "pair": "BTCUSD", "longShortRatio": "1.1110", "longAccount": "0.5263", "shortAccount": "0.4737", "timestamp": 1592870400000 } ]'
items:
$ref: '#/components/schemas/GetFuturesDataTopLongShortAccountRatioRespItem'
type: array
GetFuturesDataTopLongShortAccountRatioRespItem:
properties:
longAccount:
type: string
longShortRatio:
type: string
pair:
type: string
shortAccount:
type: string
timestamp:
format: int64
type: integer
type: object
GetFuturesDataTopLongShortPositionRatioResp:
example: '[ { "pair": "BTCUSD", "longShortRatio": "0.7869", "longPosition": "0.6442", "shortPosition": "0.4404", "timestamp": 1592870400000 }, { "pair": "BTCUSD", "longShortRatio": "1.1231", "longPosition": "0.2363", "shortPosition": "0.4537", "timestamp": 1592956800000 } ]'
items:
$ref: '#/components/schemas/GetFuturesDataTopLongShortPositionRatioRespItem'
type: array
GetFuturesDataTopLongShortPositionRatioRespItem:
properties:
longPosition:
type: string
longShortRatio:
type: string
pair:
type: string
shortPosition:
type: string
timestamp:
format: int64
type: integer
type: object
GetHistoricalTradesV1Resp:
example: '[ { "id": 595103, "price": "9642.2", "qty": "1", "baseQty": "0.01037108", "time": 1499865549590, "isBuyerMaker": true } ]'
items:
$ref: '#/components/schemas/GetHistoricalTradesV1RespItem'
type: array
GetHistoricalTradesV1RespItem:
properties:
baseQty:
type: string
id:
format: int64
type: integer
isBuyerMaker:
type: boolean
price:
type: string
qty:
type: string
time:
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
GetIncomeV1Resp:
example: '[ { "symbol": "", "incomeType": "TRANSFER", "income": "-0.37500000", "asset": "BTC", "info":"WITHDRAW", "time": 1570608000000, "tranId":"9689322392", "tradeId":"" }, { "symbol": "BTCUSD_200925", "incomeType": "COMMISSION", "income": "-0.01000000", "asset": "BTC", "info":"", "time": 1570636800000, "tranId":"9689322392", "tradeId":"2059192" } ]'
items:
$ref: '#/components/schemas/GetIncomeV1RespItem'
type: array
GetIncomeV1RespItem:
properties:
asset:
type: string
income:
type: string
incomeType:
type: string
info:
type: string
symbol:
type: string
time:
format: int64
type: integer
tradeId:
type: string
tranId:
format: int64
type: integer
type: object
GetLeverageBracketV1Resp:
example: '[ { "pair": "BTCUSD", "brackets": [ { "bracket": 1, "initialLeverage": 125, "qtyCap": 50, "qtylFloor": 0, "maintMarginRatio": 0.004, "cum": 0.0 } ] } ]'
items:
$ref: '#/components/schemas/GetLeverageBracketV1RespItem'
type: array
GetLeverageBracketV1RespItem:
properties:
brackets:
items:
properties:
bracket:
type: integer
cum:
type: number
initialLeverage:
type: integer
maintMarginRatio:
type: number
qtyCap:
format: int64
type: integer
qtylFloor:
format: int64
type: integer
type: object
type: array
pair:
type: string
type: object
GetLeverageBracketV2Resp:
example: '[ { "symbol": "BTCUSD_PERP", "notionalCoef": 1.50, "brackets": [ { "bracket": 1, "initialLeverage": 125, "qtyCap": 50, "qtylFloor": 0, "maintMarginRatio": 0.004, "cum": 0.0 } ] } ]'
items:
$ref: '#/components/schemas/GetLeverageBracketV2RespItem'
type: array
GetLeverageBracketV2RespItem:
properties:
brackets:
items:
properties:
bracket:
type: integer
cum:
type: number
initialLeverage:
type: integer
maintMarginRatio:
type: number
qtyCap:
format: int64
type: integer
qtylFloor:
format: int64
type: integer
type: object
type: array
notionalCoef:
type: number
symbol:
type: string
type: object
GetOpenInterestV1Resp:
example: '{ "symbol": "BTCUSD_200626", "pair": "BTCUSD", "openInterest": "15004", "contractType": "CURRENT_QUARTER", "time": 1591261042378 }'
properties:
contractType:
type: string
openInterest:
type: string
pair:
type: string
symbol:
type: string
time:
format: int64
type: integer
type: object
GetOpenOrderV1Resp:
example: '{ "avgPrice": "0.0", "clientOrderId": "abc", "cumBase": "0", "executedQty": "0", "orderId": 1917641, "origQty": "0.40", "origType": "TRAILING_STOP_MARKET", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "NEW", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE" }'
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
time:
format: int64
type: integer
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
GetOpenOrdersV1Resp:
example: '[ { "avgPrice": "0.0", "clientOrderId": "abc", "cumBase": "0", "executedQty": "0", "orderId": 1917641, "origQty": "0.40", "origType": "TRAILING_STOP_MARKET", "price": "0", "reduceOnly": false, "side": "BUY", "positionSide": "SHORT", "status": "NEW", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSD_200925", "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE" } ]'
items:
$ref: '#/components/schemas/GetOpenOrdersV1RespItem'
type: array
GetOpenOrdersV1RespItem:
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
time:
format: int64
type: integer
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
GetOrderAmendmentV1Resp:
example: '[ { "amendmentId": 5363, "symbol": "BTCUSD_PERP", "pair": "BTCUSD", "orderId": 20072994037, "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "time": 1629184560899, "amendment": { "price": { "before": "30004", "after": "30003.2" }, "origQty": { "before": "1", "after": "1" }, "count": 3 } }, { "amendmentId": 5361, "symbol": "BTCUSD_PERP", "pair": "BTCUSD", "orderId": 20072994037, "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "time": 1629184533946, "amendment": { "price": { "before": "30005", "after": "30004" }, "origQty": { "before": "1", "after": "1" }, "count": 2 } }, { "amendmentId": 5325, "symbol": "BTCUSD_PERP", "pair": "BTCUSD", "orderId": 20072994037, "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "time": 1629182711787, "amendment": { "price": { "before": "30002", "after": "30005" }, "origQty": { "before": "1", "after": "1" }, "count": 1 } } ]'
items:
$ref: '#/components/schemas/GetOrderAmendmentV1RespItem'
type: array
GetOrderAmendmentV1RespItem:
properties:
amendment:
properties:
count:
type: integer
origQty:
properties:
after:
type: string
before:
type: string
type: object
price:
properties:
after:
type: string
before:
type: string
type: object
type: object
amendmentId:
format: int64
type: integer
clientOrderId:
type: string
orderId:
format: int64
type: integer
pair:
type: string
symbol:
type: string
time:
format: int64
type: integer
type: object
GetOrderAsynIdV1Resp:
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
GetOrderAsynV1Resp:
example: '{ "avgCostTimestampOfLast30d":7241837, "downloadId":"546975389218332672" }'
properties:
avgCostTimestampOfLast30d:
type: integer
downloadId:
type: string
type: object
GetOrderV1Resp:
example: '{ "avgPrice": "0.0", "clientOrderId": "abc", "cumBase": "0", "executedQty": "0", "orderId": 1917641, "origQty": "0.40", "origType": "TRAILING_STOP_MARKET", "price": "0", "reduceOnly": false, "side": "BUY", "status": "NEW", "stopPrice": "9300", "closePosition": false, "symbol": "BTCUSD_200925", "pair": "BTCUSD", "time": 1579276756075, "timeInForce": "GTC", "type": "TRAILING_STOP_MARKET", "activatePrice": "9020", "priceRate": "0.3", "updateTime": 1579276756075, "workingType": "CONTRACT_PRICE", "priceProtect": false, "priceMatch": "NONE", "selfTradePreventionMode": "NONE" }'
properties:
activatePrice:
type: string
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
priceRate:
type: string
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
time:
format: int64
type: integer
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
GetPingV1Resp:
example: '{}'
type: object
GetPmAccountInfoV1Resp:
example: '{ "maxWithdrawAmountUSD": "25347.92083245", "asset": "BTC", "maxWithdrawAmount": "1.33663654" }'
properties:
asset:
type: string
maxWithdrawAmount:
type: string
maxWithdrawAmountUSD:
type: string
type: object
GetPositionMarginHistoryV1Resp:
example: '[ { "amount": "23.36332311", "asset": "BTC", "symbol": "BTCUSD_200925", "time": 1578047897183, "type": 1, "positionSide": "BOTH" }, { "amount": "100", "asset": "BTC", "symbol": "BTCUSD_200925", "time": 1578047900425, "type": 1, "positionSide": "LONG" } ]'
items:
$ref: '#/components/schemas/GetPositionMarginHistoryV1RespItem'
type: array
GetPositionMarginHistoryV1RespItem:
properties:
amount:
type: string
asset:
type: string
positionSide:
type: string
symbol:
type: string
time:
format: int64
type: integer
type:
type: integer
type: object
GetPositionRiskV1Resp:
example: '[ { "symbol": "BTCUSD_201225", "positionAmt": "0", "entryPrice": "0.0", "breakEvenPrice": "0.0", "markPrice": "0.00000000", "unRealizedProfit": "0.00000000", "liquidationPrice": "0", "leverage": "125", "maxQty": "50", "marginType": "cross", "isolatedMargin": "0.00000000", "isAutoAddMargin": "false", "positionSide": "BOTH", "updateTime": 0 }, { "symbol": "BTCUSD_201225", "positionAmt": "1", "entryPrice": "11707.70000003", "breakEvenPrice": "11707.80000005", "markPrice": "11788.66626667", "unRealizedProfit": "0.00005866", "liquidationPrice": "11667.63509587", "leverage": "125", "maxQty": "50", "marginType": "cross", "isolatedMargin": "0.00000000", "isAutoAddMargin": "false", "positionSide": "LONG", "updateTime": 1627026881327 }, { "symbol": "BTCUSD_201225", "positionAmt": "0", "entryPrice": "0.0", "breakEvenPrice": "0.0", "markPrice": "0.00000000", "unRealizedProfit": "0.00000000", "liquidationPrice": "0", "leverage": "125", "maxQty": "50", "marginType": "cross", "isolatedMargin": "0.00000000", "isAutoAddMargin": "false", "positionSide": "SHORT", "updateTime":1627026881327 } ]'
items:
$ref: '#/components/schemas/GetPositionRiskV1RespItem'
type: array
GetPositionRiskV1RespItem:
properties:
breakEvenPrice:
type: string
entryPrice:
type: string
isAutoAddMargin:
type: string
isolatedMargin:
type: string
leverage:
type: string
liquidationPrice:
type: string
marginType:
type: string
markPrice:
type: string
maxQty:
type: string
positionAmt:
type: string
positionSide:
type: string
symbol:
type: string
unRealizedProfit:
type: string
updateTime:
format: int64
type: integer
type: object
GetPositionSideDualV1Resp:
example: '{ "dualSidePosition": true }'
properties:
dualSidePosition:
type: boolean
type: object
GetPremiumIndexV1Resp:
example: '[ { "symbol": "BTCUSD_PERP", "pair": "BTCUSD", "markPrice": "11029.69574559", "indexPrice": "10979.14437500", "estimatedSettlePrice": "10981.74168236", "lastFundingRate": "0.00071003", "interestRate": "0.00010000", "nextFundingTime": 1596096000000, "time": 1596094042000 }, { "symbol": "BTCUSD_200925", "pair": "BTCUSD", "markPrice": "12077.01343750", "indexPrice": "10979.10312500", "estimatedSettlePrice": "10981.74168236", "lastFundingRate": "", "interestRate": "", "nextFundingTime": 0, "time": 1596094042000 } ]'
items:
$ref: '#/components/schemas/GetPremiumIndexV1RespItem'
type: array
GetPremiumIndexV1RespItem:
properties:
estimatedSettlePrice:
type: string
indexPrice:
type: string
interestRate:
type: string
lastFundingRate:
type: string
markPrice:
type: string
nextFundingTime:
format: int64
type: integer
pair:
type: string
symbol:
type: string
time:
format: int64
type: integer
type: object
GetTicker24hrV1Resp:
example: '[ { "symbol": "BTCUSD_200925", "pair": "BTCUSD", "priceChange": "136.6", "priceChangePercent": "1.436", "weightedAvgPrice": "9547.3", "lastPrice": "9651.6", "lastQty": "1", "openPrice": "9515.0", "highPrice": "9687.0", "lowPrice": "9499.5", "volume": "494109", "baseVolume": "5192.94797687", "openTime": 1591170300000, "closeTime": 1591256718418, "firstId": 600507, "lastId": 697803, "count": 97297 } ]'
items:
$ref: '#/components/schemas/GetTicker24hrV1RespItem'
type: array
GetTicker24hrV1RespItem:
properties:
baseVolume:
type: string
closeTime:
format: int64
type: integer
count:
type: integer
firstId:
format: int64
type: integer
highPrice:
type: string
lastId:
format: int64
type: integer
lastPrice:
type: string
lastQty:
type: string
lowPrice:
type: string
openPrice:
type: string
openTime:
format: int64
type: integer
pair:
type: string
priceChange:
type: string
priceChangePercent:
type: string
symbol:
type: string
volume:
type: string
weightedAvgPrice:
type: string
type: object
GetTickerBookTickerV1Resp:
example: '[ { "lastUpdateId": 1027024, "symbol": "BTCUSD_200626", "pair": "BTCUSD", "bidPrice": "9650.1", "bidQty": "16", "askPrice": "9650.3", "askQty": "7", "time": 1591257300345 } ]'
items:
$ref: '#/components/schemas/GetTickerBookTickerV1RespItem'
type: array
GetTickerBookTickerV1RespItem:
properties:
askPrice:
type: string
askQty:
type: string
bidPrice:
type: string
bidQty:
type: string
lastUpdateId:
format: int64
type: integer
pair:
type: string
symbol:
type: string
time:
format: int64
type: integer
type: object
GetTickerPriceV1Resp:
example: '[ { "symbol": "BTCUSD_200626", "ps": "9647.8", "price": "9647.8", "time": 1591257246176 } ]'
items:
$ref: '#/components/schemas/GetTickerPriceV1RespItem'
type: array
GetTickerPriceV1RespItem:
properties:
price:
type: string
ps:
type: string
symbol:
type: string
time:
format: int64
type: integer
type: object
GetTimeV1Resp:
example: '{ "serverTime": 1499827319559 }'
properties:
serverTime:
format: int64
type: integer
type: object
GetTradeAsynIdV1Resp:
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
GetTradeAsynV1Resp:
example: '{ "avgCostTimestampOfLast30d":7241837, "downloadId":"546975389218332672" }'
properties:
avgCostTimestampOfLast30d:
type: integer
downloadId:
type: string
type: object
GetTradesV1Resp:
example: '[ { "id": 28457, "price": "9635.0", "qty": "1", "baseQty": "0.01037883", "time": 1591250192508, "isBuyerMaker": true } ]'
items:
$ref: '#/components/schemas/GetTradesV1RespItem'
type: array
GetTradesV1RespItem:
properties:
baseQty:
type: string
id:
format: int64
type: integer
isBuyerMaker:
type: boolean
price:
type: string
qty:
type: string
time:
format: int64
type: integer
type: object
GetUserTradesV1Resp:
example: '[ { "symbol": "BTCUSD_200626", "id": 6, "orderId": 28, "pair": "BTCUSD", "side": "SELL", "price": "8800", "qty": "1", "realizedPnl": "0", "marginAsset": "BTC", "baseQty": "0.01136364", "commission": "0.00000454", "commissionAsset": "BTC", "time": 1590743483586, "positionSide": "BOTH", "buyer": false, "maker": false } ]'
items:
$ref: '#/components/schemas/GetUserTradesV1RespItem'
type: array
GetUserTradesV1RespItem:
properties:
baseQty:
type: string
buyer:
type: boolean
commission:
type: string
commissionAsset:
type: string
id:
format: int64
type: integer
maker:
type: boolean
marginAsset:
type: string
orderId:
format: int64
type: integer
pair:
type: string
positionSide:
type: string
price:
type: string
qty:
type: string
realizedPnl:
type: string
side:
type: string
symbol:
type: string
time:
format: int64
type: integer
type: object
UpdateListenKeyV1Resp:
example: '{}'
type: object
UpdateOrderV1Req:
properties:
orderId:
format: int64
type: integer
origClientOrderId:
default: ""
type: string
price:
default: ""
type: string
priceMatch:
default: ""
type: string
quantity:
default: ""
type: string
recvWindow:
format: int64
type: integer
side:
default: ""
type: string
symbol:
default: ""
type: string
timestamp:
format: int64
type: integer
required:
- symbol
- side
- timestamp
type: object
UpdateOrderV1Resp:
example: '{ "orderId": 20072994037, "symbol": "BTCUSD_PERP", "pair": "BTCUSD", "status": "NEW", "clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW", "price": "30005", "avgPrice": "0.0", "origQty": "1", "executedQty": "0", "cumQty": "0", "cumBase": "0", "timeInForce": "GTC", "type": "LIMIT", "reduceOnly": false, "closePosition": false, "side": "BUY", "positionSide": "LONG", "stopPrice": "0", "workingType": "CONTRACT_PRICE", "priceProtect": false, "origType": "LIMIT", "priceMatch": "NONE", "selfTradePreventionMode": "NONE", "updateTime": 1629182711600 }'
properties:
avgPrice:
type: string
clientOrderId:
type: string
closePosition:
type: boolean
cumBase:
type: string
cumQty:
type: string
executedQty:
type: string
orderId:
format: int64
type: integer
origQty:
type: string
origType:
type: string
pair:
type: string
positionSide:
type: string
price:
type: string
priceMatch:
type: string
priceProtect:
type: boolean
reduceOnly:
type: boolean
selfTradePreventionMode:
type: string
side:
type: string
status:
type: string
stopPrice:
type: string
symbol:
type: string
timeInForce:
type: string
type:
type: string
updateTime:
format: int64
type: integer
workingType:
type: string
type: object
securitySchemes:
ApiKey:
in: header
name: X-MBX-APIKEY
type: apiKey
info:
description: OpenAPI specification for Binance exchange - Cmfutures API
title: Binance COIN-M Futures API
version: 0.3.0
openapi: 3.0.3
paths:
/dapi/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: Account Information (USER_DATA)
tags:
- Futures
/dapi/v1/adlQuantile:
get:
description: Query position ADL quantile estimation
operationId: GetAdlQuantileV1
parameters:
- 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/GetAdlQuantileV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Position ADL Quantile Estimation(USER_DATA)
tags:
- Futures
/dapi/v1/aggTrades:
get:
description: Get compressed, aggregate trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated.
operationId: GetAggTradesV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: ID to get aggregate trades from INCLUSIVE.
in: query
name: fromId
schema:
format: int64
type: integer
- description: Timestamp in ms to get aggregate trades from INCLUSIVE.
in: query
name: startTime
schema:
format: int64
type: integer
- description: Timestamp in ms to get aggregate trades until INCLUSIVE.
in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 500; max 1000.
in: query
name: limit
schema:
default: 500
maximum: 1000
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/GetAggTradesV1Resp'
description: Successful operation
summary: Compressed/Aggregate Trades List
tags:
- Futures
/dapi/v1/allOpenOrders:
delete:
description: Cancel All Open Orders
operationId: DeleteAllOpenOrdersV1
parameters:
- 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 Open Orders(TRADE)
tags:
- Futures
/dapi/v1/allOrders:
get:
description: Get all account orders; active, canceled, or filled.
operationId: GetAllOrdersV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: pair
schema:
default: ""
type: string
- in: query
name: orderId
schema:
format: int64
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 50; max 100.
in: query
name: limit
schema:
default: 50
maximum: 100
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/GetAllOrdersV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: All Orders (USER_DATA)
tags:
- Futures
/dapi/v1/balance:
get:
description: Check futures account balance
operationId: GetBalanceV1
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/GetBalanceV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Futures Account Balance (USER_DATA)
tags:
- Futures
/dapi/v1/batchOrders:
delete:
description: Cancel Multiple Orders
operationId: DeleteBatchOrdersV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: max length 10
e.g. [1234567,2345678]
in: query
name: orderIdList
schema:
example: '[1234567,2345678]'
type: string
- description: max length 10
e.g. ["my_id_1","my_id_2"], encode the double quotes. No space after comma.
in: query
name: origClientOrderIdList
schema:
example: '["my_id_1","my_id_2"]'
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/CmfuturesDeleteBatchOrdersV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Cancel Multiple Orders(TRADE)
tags:
- Futures
post:
description: Place multiple orders
operationId: CreateBatchOrdersV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CmfuturesCreateBatchOrdersV1Req'
description: The request body for CmfuturesCreateBatchOrdersV1
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/CmfuturesCreateBatchOrdersV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Place Multiple Orders(TRADE)
tags:
- Futures
put:
description: Modify Multiple Orders
operationId: UpdateBatchOrdersV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CmfuturesUpdateBatchOrdersV1Req'
description: The request body for CmfuturesUpdateBatchOrdersV1
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/CmfuturesUpdateBatchOrdersV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Modify Multiple Orders(TRADE)
tags:
- Futures
/dapi/v1/commissionRate:
get:
description: Query user commission rate
operationId: GetCommissionRateV1
parameters:
- 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/GetCommissionRateV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: User Commission Rate (USER_DATA)
tags:
- Futures
/dapi/v1/constituents:
get:
description: Query index price constituents
operationId: GetConstituentsV1
parameters:
- in: query
name: symbol
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/GetConstituentsV1Resp'
description: Successful operation
summary: Query Index Price Constituents
tags:
- Futures
/dapi/v1/continuousKlines:
get:
description: |-
Kline/candlestick bars for a specific contract type.
Klines are uniquely identified by their open time.
operationId: GetContinuousKlinesV1
parameters:
- in: query
name: pair
required: true
schema:
default: ""
type: string
- in: query
name: contractType
required: true
schema:
default: ""
type: string
- in: query
name: interval
required: true
schema:
default: ""
type: string
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 500; max 1500.
in: query
name: limit
schema:
default: 500
maximum: 1500
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/CmfuturesGetContinuousKlinesV1Resp'
description: Successful operation
summary: Continuous Contract Kline/Candlestick Data
tags:
- Futures
/dapi/v1/countdownCancelAll:
post:
description: Cancel all open orders of the specified symbol at the end of the specified countdown. This rest endpoint means to ensure your open orders are canceled in case of an outage. The endpoint should be called repeatedly as heartbeats so that the existing countdown time can be canceled and repalced by a new one. The system will check all countdowns approximately every 10 milliseconds, so please note that sufficient redundancy should be considered when using this function. We do not recommend setting the countdown time to be too precise or too small.
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: Auto-Cancel All Open Orders (TRADE)
tags:
- Futures
/dapi/v1/depth:
get:
description: Query orderbook on specific symbol
operationId: GetDepthV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: Default 500; Valid limits:[5, 10, 20, 50, 100, 500, 1000]
in: query
name: limit
schema:
default: 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/GetDepthV1Resp'
description: Successful operation
summary: Order Book
tags:
- Futures
/dapi/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/CmfuturesGetExchangeInfoV1Resp'
description: Successful operation
summary: Exchange Information
tags:
- Futures
/dapi/v1/forceOrders:
get:
description: User's Force Orders
operationId: GetForceOrdersV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: autoCloseType
schema:
default: ""
type: string
- in: query
name: recvWindow
schema:
format: int64
type: integer
- in: query
name: timestamp
required: true
schema:
format: int64
type: integer
- in: query
name: limit
schema:
default: 50
maximum: 100
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
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/CmfuturesGetForceOrdersV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: User's Force Orders(USER_DATA)
tags:
- Futures
/dapi/v1/fundingInfo:
get:
description: Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / fundingIntervalHours adjustment
operationId: GetFundingInfoV1
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/GetFundingInfoV1Resp'
description: Successful operation
summary: Get Funding Rate Info
tags:
- Futures
/dapi/v1/fundingRate:
get:
description: Get Funding Rate History of Perpetual Futures
operationId: GetFundingRateV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: Timestamp in ms to get funding rate from INCLUSIVE.
in: query
name: startTime
schema:
format: int64
type: integer
- description: Timestamp in ms to get funding rate until INCLUSIVE.
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
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/GetFundingRateV1Resp'
description: Successful operation
summary: Get Funding Rate History of Perpetual Futures
tags:
- Futures
/dapi/v1/historicalTrades:
get:
description: Get older market historical trades.
operationId: GetHistoricalTradesV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: Default 100; max 500.
in: query
name: limit
schema:
default: 100
maximum: 500
type: integer
- description: TradeId to fetch from. Default gets most recent trades.
in: query
name: fromId
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/GetHistoricalTradesV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Old Trades Lookup(MARKET_DATA)
tags:
- Futures
/dapi/v1/income:
get:
description: Get income history
operationId: GetIncomeV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- description: '"TRANSFER","WELCOME_BONUS", "FUNDING_FEE", "REALIZED_PNL", "COMMISSION", "INSURANCE_CLEAR", and "DELIVERED_SETTELMENT"'
in: query
name: incomeType
schema:
default: ""
type: string
- description: Timestamp in ms to get funding from INCLUSIVE.
in: query
name: startTime
schema:
format: int64
type: integer
- description: Timestamp in ms to get funding until INCLUSIVE.
in: query
name: endTime
schema:
format: int64
type: integer
- in: query
name: page
schema:
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/GetIncomeV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Income History(USER_DATA)
tags:
- Futures
/dapi/v1/income/asyn:
get:
description: Get download id for futures transaction history
operationId: GetIncomeAsynV1
parameters:
- description: Timestamp in ms
in: query
name: startTime
required: true
schema:
format: int64
type: integer
- description: Timestamp in ms
in: query
name: endTime
required: true
schema:
format: int64
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/GetIncomeAsynV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Download Id For Futures Transaction History(USER_DATA)
tags:
- Futures
/dapi/v1/income/asyn/id:
get:
description: Get futures 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 Futures Transaction History Download Link by Id (USER_DATA)
tags:
- Futures
/dapi/v1/indexPriceKlines:
get:
description: Kline/candlestick bars for the index price of a pair. Klines are uniquely identified by their open time.
operationId: GetIndexPriceKlinesV1
parameters:
- in: query
name: pair
required: true
schema:
default: ""
type: string
- in: query
name: interval
required: true
schema:
default: ""
type: string
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 500; max 1500.
in: query
name: limit
schema:
default: 500
maximum: 1500
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/CmfuturesGetIndexPriceKlinesV1Resp'
description: Successful operation
summary: Index Price Kline/Candlestick Data
tags:
- Futures
/dapi/v1/klines:
get:
description: |-
Kline/candlestick bars for a symbol.
Klines are uniquely identified by their open time.
operationId: GetKlinesV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- in: query
name: interval
required: true
schema:
default: ""
type: string
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 500; max 1500.
in: query
name: limit
schema:
default: 500
maximum: 1500
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/CmfuturesGetKlinesV1Resp'
description: Successful operation
summary: Kline/Candlestick Data
tags:
- Futures
/dapi/v1/leverage:
post:
description: |-
Change user's initial leverage in the specific symbol market.
For Hedge Mode, LONG and SHORT positions of one symbol use the same initial leverage and share a total notional value.
operationId: CreateLeverageV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateLeverageV1Req'
description: The request body for CreateLeverageV1
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/CreateLeverageV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Change Initial Leverage (TRADE)
tags:
- Futures
/dapi/v1/leverageBracket:
get:
description: Not recommended to continue using this v1 endpoint
operationId: GetLeverageBracketV1
parameters:
- in: query
name: pair
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/GetLeverageBracketV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Notional Bracket for Pair(USER_DATA)
tags:
- Futures
/dapi/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:
- Futures
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:
- Futures
put:
description: Keepalive a user data stream to prevent a time out. User data streams will close after 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:
- Futures
/dapi/v1/marginType:
post:
description: |-
Change user's margin type in the specific symbol market.For Hedge Mode, LONG and SHORT positions of one symbol use the same margin type.
With ISOLATED margin type, margins of the LONG and SHORT positions are isolated from each other.
operationId: CreateMarginTypeV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateMarginTypeV1Req'
description: The request body for CreateMarginTypeV1
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/CreateMarginTypeV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Change Margin Type (TRADE)
tags:
- Futures
/dapi/v1/markPriceKlines:
get:
description: |-
Kline/candlestick bars for the mark price of a symbol.
Klines are uniquely identified by their open time.
operationId: GetMarkPriceKlinesV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- in: query
name: interval
required: true
schema:
default: ""
type: string
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 500; max 1500.
in: query
name: limit
schema:
default: 500
maximum: 1500
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/CmfuturesGetMarkPriceKlinesV1Resp'
description: Successful operation
summary: Mark Price Kline/Candlestick Data
tags:
- Futures
/dapi/v1/openInterest:
get:
description: Get present open interest of a specific symbol.
operationId: GetOpenInterestV1
parameters:
- in: query
name: symbol
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:
- Futures
/dapi/v1/openOrder:
get:
description: Query Current Open Order
operationId: GetOpenOrderV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- in: query
name: orderId
schema:
format: int64
type: integer
- in: query
name: origClientOrderId
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/GetOpenOrderV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Query Current Open Order(USER_DATA)
tags:
- Futures
/dapi/v1/openOrders:
get:
description: Get all open orders on a symbol. Careful when accessing this with no symbol.
operationId: GetOpenOrdersV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: pair
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/GetOpenOrdersV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Current All Open Orders (USER_DATA)
tags:
- Futures
/dapi/v1/order:
delete:
description: Cancel an active order.
operationId: DeleteOrderV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- in: query
name: orderId
schema:
format: int64
type: integer
- in: query
name: origClientOrderId
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 Order (TRADE)
tags:
- Futures
get:
description: Check an order's status.
operationId: GetOrderV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- in: query
name: orderId
schema:
format: int64
type: integer
- in: query
name: origClientOrderId
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 Order (USER_DATA)
tags:
- Futures
post:
description: Send in a new order.
operationId: CreateOrderV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreateOrderV1Req'
description: The request body for CreateOrderV1
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/CreateOrderV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: New Order (TRADE)
tags:
- Futures
put:
description: Order modify function, currently only LIMIT order modification is supported, modified orders will be reordered in the match queue
operationId: UpdateOrderV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UpdateOrderV1Req'
description: The request body for UpdateOrderV1
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/UpdateOrderV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Modify Order (TRADE)
tags:
- Futures
/dapi/v1/order/asyn:
get:
description: Get Download Id For Futures Order History
operationId: GetOrderAsynV1
parameters:
- description: Timestamp in ms
in: query
name: startTime
required: true
schema:
format: int64
type: integer
- description: Timestamp in ms
in: query
name: endTime
required: true
schema:
format: int64
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/GetOrderAsynV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Download Id For Futures Order History (USER_DATA)
tags:
- Futures
/dapi/v1/order/asyn/id:
get:
description: Get futures order history download link by Id
operationId: GetOrderAsynIdV1
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/GetOrderAsynIdV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Futures Order History Download Link by Id (USER_DATA)
tags:
- Futures
/dapi/v1/orderAmendment:
get:
description: Get order modification history
operationId: GetOrderAmendmentV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- in: query
name: orderId
schema:
format: int64
type: integer
- in: query
name: origClientOrderId
schema:
default: ""
type: string
- description: Timestamp in ms to get modification history from INCLUSIVE
in: query
name: startTime
schema:
format: int64
type: integer
- description: Timestamp in ms to get modification history until INCLUSIVE
in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 50; max 100
in: query
name: limit
schema:
default: 50
maximum: 100
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/GetOrderAmendmentV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Order Modify History (USER_DATA)
tags:
- Futures
/dapi/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:
- Futures
/dapi/v1/pmAccountInfo:
get:
description: Get Classic Portfolio Margin current account information.
operationId: GetPmAccountInfoV1
parameters:
- in: query
name: asset
required: true
schema:
default: ""
type: string
- in: query
name: recvWindow
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/GetPmAccountInfoV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Classic Portfolio Margin Account Information (USER_DATA)
tags:
- Futures
/dapi/v1/positionMargin:
post:
description: Modify Isolated Position Margin
operationId: CreatePositionMarginV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreatePositionMarginV1Req'
description: The request body for CreatePositionMarginV1
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/CreatePositionMarginV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Modify Isolated Position Margin(TRADE)
tags:
- Futures
/dapi/v1/positionMargin/history:
get:
description: Get position margin change history
operationId: GetPositionMarginHistoryV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: '1: Add position margin,2: Reduce position margin'
in: query
name: type
schema:
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: 'Default: 50'
in: query
name: limit
schema:
default: 50
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/GetPositionMarginHistoryV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Position Margin Change History(TRADE)
tags:
- Futures
/dapi/v1/positionRisk:
get:
description: Get current account information.
operationId: GetPositionRiskV1
parameters:
- in: query
name: marginAsset
schema:
default: ""
type: string
- in: query
name: pair
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/GetPositionRiskV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Position Information(USER_DATA)
tags:
- Futures
/dapi/v1/positionSide/dual:
get:
description: Get user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol
operationId: GetPositionSideDualV1
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/GetPositionSideDualV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Current Position Mode(USER_DATA)
tags:
- Futures
post:
description: Change user's position mode (Hedge Mode or One-way Mode ) on EVERY symbol
operationId: CreatePositionSideDualV1
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/CreatePositionSideDualV1Req'
description: The request body for CreatePositionSideDualV1
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/CreatePositionSideDualV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Change Position Mode(TRADE)
tags:
- Futures
/dapi/v1/premiumIndex:
get:
description: Query index price and mark price
operationId: GetPremiumIndexV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: pair
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/GetPremiumIndexV1Resp'
description: Successful operation
summary: Index Price and Mark Price
tags:
- Futures
/dapi/v1/premiumIndexKlines:
get:
description: Premium index kline bars of a symbol. Klines are uniquely identified by their open time.
operationId: GetPremiumIndexKlinesV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- in: query
name: interval
required: true
schema:
default: ""
type: string
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: Default 500; max 1500.
in: query
name: limit
schema:
default: 500
maximum: 1500
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/CmfuturesGetPremiumIndexKlinesV1Resp'
description: Successful operation
summary: Premium index Kline Data
tags:
- Futures
/dapi/v1/ticker/24hr:
get:
description: 24 hour rolling window price change statistics.
operationId: GetTicker24hrV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: pair
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/GetTicker24hrV1Resp'
description: Successful operation
summary: 24hr Ticker Price Change Statistics
tags:
- Futures
/dapi/v1/ticker/bookTicker:
get:
description: Best price/qty on the order book for a symbol or symbols.
operationId: GetTickerBookTickerV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: pair
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/GetTickerBookTickerV1Resp'
description: Successful operation
summary: Symbol Order Book Ticker
tags:
- Futures
/dapi/v1/ticker/price:
get:
description: Latest price for a symbol or symbols.
operationId: GetTickerPriceV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: pair
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/GetTickerPriceV1Resp'
description: Successful operation
summary: Symbol Price Ticker
tags:
- Futures
/dapi/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:
- Futures
/dapi/v1/trade/asyn:
get:
description: Get download id for futures trade history
operationId: GetTradeAsynV1
parameters:
- description: Timestamp in ms
in: query
name: startTime
required: true
schema:
format: int64
type: integer
- description: Timestamp in ms
in: query
name: endTime
required: true
schema:
format: int64
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/GetTradeAsynV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Download Id For Futures Trade History (USER_DATA)
tags:
- Futures
/dapi/v1/trade/asyn/id:
get:
description: Get futures trade download link by Id
operationId: GetTradeAsynIdV1
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/GetTradeAsynIdV1Resp'
description: Successful operation
security:
- ApiKey: []
summary: Get Futures Trade Download Link by Id(USER_DATA)
tags:
- Futures
/dapi/v1/trades:
get:
description: Get recent market trades
operationId: GetTradesV1
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: Default 500; max 1000.
in: query
name: limit
schema:
default: 500
maximum: 1000
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:
- Futures
/dapi/v1/userTrades:
get:
description: Get trades for a specific account and symbol.
operationId: GetUserTradesV1
parameters:
- in: query
name: symbol
schema:
default: ""
type: string
- in: query
name: pair
schema:
default: ""
type: string
- in: query
name: orderId
schema:
default: ""
type: string
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
schema:
format: int64
type: integer
- description: Trade id to fetch from. Default gets most recent trades.
in: query
name: fromId
schema:
format: int64
type: integer
- description: Default 50; max 1000
in: query
name: limit
schema:
default: 50
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:
- Futures
/dapi/v2/leverageBracket:
get:
description: Get the symbol's notional bracket list.
operationId: GetLeverageBracketV2
parameters:
- 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/GetLeverageBracketV2Resp'
description: Successful operation
security:
- ApiKey: []
summary: Notional Bracket for Symbol(USER_DATA)
tags:
- Futures
/futures/data/basis:
get:
description: Query basis
operationId: GetFuturesDataBasis
parameters:
- description: BTCUSD
in: query
name: pair
required: true
schema:
default: ""
type: string
- description: CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL
in: query
name: contractType
required: true
schema:
default: ""
type: string
- description: '"5m","15m","30m","1h","2h","4h","6h","12h","1d"'
in: query
name: period
required: true
schema:
default: ""
type: string
- description: Default 30,Max 500
in: query
name: limit
schema:
default: 30
format: int64
maximum: 500
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
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/GetFuturesDataBasisResp'
description: Successful operation
summary: Basis
tags:
- Futures
/futures/data/globalLongShortAccountRatio:
get:
description: Query symbol Long/Short Ratio
operationId: GetFuturesDataGlobalLongShortAccountRatio
parameters:
- description: BTCUSD
in: query
name: pair
required: true
schema:
default: ""
type: string
- description: '"5m","15m","30m","1h","2h","4h","6h","12h","1d"'
in: query
name: period
required: true
schema:
default: ""
type: string
- description: Default 30,Max 500
in: query
name: limit
schema:
default: 30
format: int64
maximum: 500
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
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/GetFuturesDataGlobalLongShortAccountRatioResp'
description: Successful operation
summary: Long/Short Ratio
tags:
- Futures
/futures/data/openInterestHist:
get:
description: Query open interest stats
operationId: GetFuturesDataOpenInterestHist
parameters:
- description: BTCUSD
in: query
name: pair
required: true
schema:
default: ""
type: string
- description: ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL
in: query
name: contractType
required: true
schema:
default: ""
type: string
- description: '"5m","15m","30m","1h","2h","4h","6h","12h","1d"'
in: query
name: period
required: true
schema:
default: ""
type: string
- description: Default 30,Max 500
in: query
name: limit
schema:
default: 30
format: int64
maximum: 500
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
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/GetFuturesDataOpenInterestHistResp'
description: Successful operation
summary: Open Interest Statistics
tags:
- Futures
/futures/data/takerBuySellVol:
get:
description: |-
Taker Buy Volume: the total volume of buy orders filled by takers within the period.
Taker Sell Volume: the total volume of sell orders filled by takers within the period.
operationId: GetFuturesDataTakerBuySellVol
parameters:
- description: BTCUSD
in: query
name: pair
required: true
schema:
default: ""
type: string
- description: ALL, CURRENT_QUARTER, NEXT_QUARTER, PERPETUAL
in: query
name: contractType
required: true
schema:
default: ""
type: string
- description: '"5m","15m","30m","1h","2h","4h","6h","12h","1d"'
in: query
name: period
required: true
schema:
default: ""
type: string
- description: Default 30,Max 500
in: query
name: limit
schema:
default: 30
format: int64
maximum: 500
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
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/GetFuturesDataTakerBuySellVolResp'
description: Successful operation
summary: Taker Buy/Sell Volume
tags:
- Futures
/futures/data/topLongShortAccountRatio:
get:
description: |-
The proportion of net long and net short accounts to total accounts of the top 20% users with the highest margin balance. Each account is counted once only.
Long Account % = Accounts of top traders with net long positions / Total accounts of top traders with open positions
Short Account % = Accounts of top traders with net short positions / Total accounts of top traders with open positions
Long/Short Ratio (Accounts) = Long Account % / Short Account %
operationId: GetFuturesDataTopLongShortAccountRatio
parameters:
- in: query
name: symbol
required: true
schema:
default: ""
type: string
- description: '"5m","15m","30m","1h","2h","4h","6h","12h","1d"'
in: query
name: period
required: true
schema:
default: ""
type: string
- description: default 30, max 500
in: query
name: limit
schema:
default: 30
format: int64
maximum: 500
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
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/GetFuturesDataTopLongShortAccountRatioResp'
description: Successful operation
summary: Top Trader Long/Short Ratio (Accounts)
tags:
- Futures
/futures/data/topLongShortPositionRatio:
get:
description: |-
The proportion of net long and net short positions to total open positions of the top 20% users with the highest margin balance.
Long Position % = Long positions of top traders / Total open positions of top traders
Short Position % = Short positions of top traders / Total open positions of top traders
Long/Short Ratio (Positions) = Long Position % / Short Position %
operationId: GetFuturesDataTopLongShortPositionRatio
parameters:
- description: BTCUSD
in: query
name: pair
required: true
schema:
default: ""
type: string
- description: '"5m","15m","30m","1h","2h","4h","6h","12h","1d"'
in: query
name: period
required: true
schema:
default: ""
type: string
- description: Default 30,Max 500
in: query
name: limit
schema:
default: 30
format: int64
maximum: 500
type: integer
- in: query
name: startTime
schema:
format: int64
type: integer
- in: query
name: endTime
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/GetFuturesDataTopLongShortPositionRatioResp'
description: Successful operation
summary: Top Trader Long/Short Ratio (Positions)
tags:
- Futures
servers:
- description: Binance Cmfutures API Server
url: https://dapi.binance.com