Skip to main content

Account and Trading Endpoints

The API endpoint under the [Account and trading endpoints] module requires authentication.

Get All Account Assets

Response Example

{
"success": true,
"code": 0,
"data": [
{
"currency": "USDT",
"positionMargin": 0,
"availableBalance": 32.80984793658,
"cashBalance": 32.80984793,
"frozenBalance": 0,
"equity": 32.80984793,
"unrealized": 0,
"bonus": 0,
"availableCash": 32.80984793658,
"availableOpen": 32.80984793658,
"debtAmount": 0,
"contributeMarginAmount": 0,
"vcoinId": "128f589271cb4951b03e71e6323eb7be"
}
]
}
  • GET api/v1/private/account/assets

Required Permission: View Account Details

Request Parameters:

None

Response Parameters:

ParameterTypeDescription
currencystringCurrency
positionMargindecimalPosition margin
frozenBalancedecimalFrozen balance
availableBalancedecimalCurrently available balance
cashBalancedecimalWithdrawable balance
equitydecimalTotal equity
unrealizeddecimalUnrealized PnL
bonusdecimalTrial bonus
bonusExpireTimelongTrial bonus expiration time (ms)
availableCashdecimalTransferable amount
availableOpendecimalUsable amount
debtAmountdecimalDebt amount
contributeMarginAmountdecimalContributed effective margin
vcoinIdstringCurrency ID

Get Single Currency Asset Information

Response Example

{
"success": true,
"code": 0,
"data": {
"currency": "MX",
"positionMargin": 0,
"availableBalance": 0.99647149597724856,
"cashBalance": 0.99647149,
"frozenBalance": 0,
"equity": 0.99647149,
"unrealized": 0,
"bonus": 0,
"availableCash": 0.99647149597724856,
"availableOpen": 0.99647149597724856,
"debtAmount": 0,
"contributeMarginAmount": 0,
"vcoinId": "8c1e92655f9a4064808ce03ec1a48d38"
}
}
  • GET api/v1/private/account/asset/{currency}

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
currencystringtrueCurrency

Response Parameters:

ParameterTypeDescription
currencystringCurrency
positionMargindecimalPosition margin
frozenBalancedecimalFrozen balance
availableBalancedecimalCurrently available balance
cashBalancedecimalWithdrawable balance
equitydecimalTotal equity
unrealizeddecimalUnrealized PnL
bonusdecimalTrial bonus
bonusExpireTimelongTrial bonus expiration time (ms)
availableCashdecimalTransferable amount
availableOpendecimalUsable amount
debtAmountdecimalDebt amount
contributeMarginAmountdecimalContributed effective margin
vcoinIdstringCurrency ID

Get Asset Transfer Records

Response Example

{
"success": true,
"code": 0,
"data": {
"pageSize": 20,
"totalCount": 1,
"totalPage": 1,
"currentPage": 1,
"resultList": [
{
"id": 303381159,
"txid": "86f334f8850346e89ce4d0ba52b7aa87",
"currency": "USDT",
"amount": 1,
"type": "IN",
"state": "SUCCESS",
"createTime": 1760537642000,
"updateTime": 1760537641000
}
]
}
}
  • GET api/v1/private/account/transfer_record

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
currencystringfalseCurrency
statestringfalseStatus: WAIT 、SUCCESS 、FAILED
typestringfalseType: IN 、OUT
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
resultListlistResult set
idlongid
txidstringTransaction ID
currencystringCurrency
amountdecimalTransfer amount
typestringType: IN 、OUT
statestringStatus: WAIT 、SUCCESS 、FAILED
createTimelongCreated time
updateTimelongUpdated time

Get Historical Positions

Response Example

{
"success": true,
"code": 0,
"data": [
{
"positionId": 1027177055,
"symbol": "BTC_USDT",
"positionType": 1,
"openType": 1,
"state": 3,
"holdVol": 0,
"frozenVol": 0,
"closeVol": 2,
"holdAvgPrice": 112449.5,
"holdAvgPriceFullyScale": "112449.5",
"openAvgPrice": 112449.5,
"openAvgPriceFullyScale": "112449.5",
"closeAvgPrice": 113572.3,
"liquidatePrice": 56314.7,
"oim": 0,
"im": 0,
"holdFee": 0,
"realised": 0.2155,
"leverage": 2,
"createTime": 1757506663000,
"updateTime": 1757509217000,
"autoAddIm": false,
"version": 3,
"profitRatio": 0.0191,
"newOpenAvgPrice": 112449.5,
"newCloseAvgPrice": 113572.3,
"closeProfitLoss": 0.2245,
"fee": -0.009,
"positionShowStatus": "CLOSED",
"deductFeeList": [],
"totalFee": 0.009,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0.009
},
{
"positionId": 980739233,
"symbol": "BTC_USDT",
"positionType": 1,
"openType": 1,
"state": 3,
"holdVol": 0,
"frozenVol": 0,
"closeVol": 5,
"holdAvgPrice": 118272.2,
"holdAvgPriceFullyScale": "118272.2",
"openAvgPrice": 118272.2,
"openAvgPriceFullyScale": "118272.2",
"closeAvgPrice": 118669.1,
"liquidatePrice": 112474.5,
"oim": 0,
"im": 0,
"holdFee": 0,
"realised": 0.1747,
"leverage": 20,
"createTime": 1754827319000,
"updateTime": 1754835661000,
"autoAddIm": false,
"version": 3,
"profitRatio": 0.0586,
"newOpenAvgPrice": 118272.2,
"newCloseAvgPrice": 118669.1,
"closeProfitLoss": 0.1984,
"fee": -0.0236,
"positionShowStatus": "CLOSED",
"deductFeeList": [],
"totalFee": 0.0236,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0.0236
}
]
}
  • GET api/v1/private/position/list/history_positions

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract
typeintfalsePosition type, 1 long 2 short
start_timelongfalseStart time
end_timelongfalseEnd time
position_typeintfalsePosition type, 1 long 2 short
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
resultListlistResult set
positionIdlongPosition id
symbolstringContract
holdVoldecimalPosition size
positionTypeintPosition type, 1 long 2 short
openTypeintOpen type, 1 isolated 2 cross
stateintPosition status,1 holding 2 system-held 3 closed
frozenVoldecimalFrozen volume
closeVoldecimalClosed volume
holdAvgPricedecimalAverage position price
holdAvgPriceFullyScaledecimalFull precision position price
closeAvgPricedecimalAverage closing price
openAvgPricedecimalAverage opening price
openAvgPriceFullyScaledecimalFull precision opening price
liquidatePricedecimalLiquidation price in isolated mode
oimdecimalOriginal initial margin
imdecimalInitial margin, adjustable in isolated mode to tune liquidation price
holdFeedecimalFunding fee, positive = received, negative = paid
realiseddecimalRealized PnL
leverageintLeverage
marginRatiodecimalCurrent position margin ratio
autoAddImbooleanAuto-add initial margin supported
profitRatiodecimalReturn ratio = realized PnL/initial margin
newOpenAvgPricedecimalAverage opening price, differs from original
newCloseAvgPricedecimalAverage closing price, differs from original
closeProfitLossdecimalClose PnL (fees excluded)
feedecimalFees (excluding deductions)
totalFeedecimalAccumulated fees
createTimedateCreated time
updateTimedateUpdated time

Get Open Positions

Response Example

{
"success": true,
"code": 0,
"data": [
{
"positionId": 1109973831,
"symbol": "BTC_USDT",
"positionType": 1,
"openType": 1,
"state": 1,
"holdVol": 5,
"frozenVol": 0,
"closeVol": 0,
"holdAvgPrice": 109777.5,
"holdAvgPriceFullyScale": "109777.5",
"openAvgPrice": 109777.5,
"openAvgPriceFullyScale": "109777.5",
"closeAvgPrice": 0,
"liquidatePrice": 55020.5,
"oim": 27.444375,
"im": 27.444375,
"holdFee": 0,
"realised": 0,
"leverage": 2,
"marginRatio": 0.0027,
"createTime": 1761887133854,
"updateTime": 1761887133854,
"autoAddIm": false,
"version": 1,
"profitRatio": 0,
"newOpenAvgPrice": 109777.5,
"newCloseAvgPrice": 0,
"closeProfitLoss": 0,
"fee": 0,
"deductFeeList": [],
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0.0301,
"zeroTradeTotalFeeBinance": 0.0301
}
]
}
  • GET api/v1/private/position/open_positions

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract
positionIdlongfalsePosition ID

Response Parameters:

ParameterTypeDescription
positionIdlongPosition id
symbolstringContract
holdVoldecimalPosition size
positionTypeintPosition type, 1 long 2 short
openTypeintOpen type, 1 isolated 2 cross
stateintPosition status,1 holding 2 system-held 3 closed
frozenVoldecimalFrozen volume
closeVoldecimalClosed volume
holdAvgPricedecimalAverage position price
holdAvgPriceFullyScaledecimalFull precision position price
closeAvgPricedecimalAverage closing price
openAvgPricedecimalAverage opening price
openAvgPriceFullyScaledecimalFull precision opening price
liquidatePricedecimalLiquidation price in isolated mode
oimdecimalOriginal initial margin
adlLevelintadl reduction level, range 1-5, null means pending refresh
imdecimalInitial margin, adjustable in isolated mode to tune liquidation price
holdFeedecimalFunding fee, positive = received, negative = paid
realiseddecimalRealized PnL
leverageintLeverage
marginRatiodecimalCurrent position margin ratio
autoAddImbooleanAuto-add initial margin supported
profitRatiodecimalReturn ratio = realized PnL/initial margin
newOpenAvgPricedecimalAverage opening price, differs from original
newCloseAvgPricedecimalAverage closing price, differs from original
closeProfitLossdecimalClose PnL (fees excluded)
feedecimalFees (excluding deductions)
totalFeedecimalAccumulated fees
createTimedateCreated time
updateTimedateUpdated time

Get Funding Fee Details

Response Example

{
"success": true,
"code": 0,
"data": {
"symbol": "BTC_USDT",
"fundingRate": -0.000019,
"maxFundingRate": 0.0018,
"minFundingRate": -0.0018,
"collectCycle": 8,
"nextSettleTime": 1761897600000,
"timestamp": 1761887166142
}
}
  • GET api/v1/private/position/funding_records

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract
position_idintfalsePosition id
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100
position_typeinttruePosition type, 1 long 2 short
start_timelongtrueStart time
end_timelongtrueEnd time

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
resultListlistResult set
idlongid
symbolstringContract
positionTypeint1: long, 2: short
positionValuedecimalPosition value
fundingdecimalFee
ratedecimalFunding rate
settleTimedateSettlement time

Get Order by External ID

Response Example

{
"success": true,
"code": 0,
"data": {
"orderId": "739106551624717312",
"symbol": "BTC_USDT",
"positionId": 1109973831,
"price": 109777.5,
"priceStr": "109777.500000000000000000",
"vol": 5,
"leverage": 2,
"side": 1,
"category": 1,
"orderType": 5,
"dealAvgPrice": 109777.5,
"dealAvgPriceStr": "109777.500000000000000000",
"dealVol": 5,
"orderMargin": 27.444375,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 3,
"externalOid": "_m_903a9f81cc1148be99ac9ece15981374",
"errorCode": 0,
"usedMargin": 27.444375,
"createTime": 1761887134000,
"updateTime": 1761887134000,
"positionMode": 1,
"version": 2,
"showCancelReason": 0,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0
}
}
  • GET api/v1/private/order/external/{symbol}/{external_oid}

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
external_oidstringtrueExternal order ID

Response Parameters:

ParameterTypeDescription
orderIdlongOrder id
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder side 1 open long,2 close short,3 open short,4 close long
categoryintOrder category:1 limit,2 liquidation custody,3 custody close,4 ADL reduction
dealAvgPricedecimalAverage deal price
dealVoldecimalDeal quantity
orderMargindecimalOrder margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1 isolated,2 cross
stateintOrder status,1: pending,2 unfilled,3 filled,4 canceled,5 invalid
externalOidstringExternal order ID
createTimedateCreated time
updateTimedateUpdated time

Get Order Information by Order ID

Response Example

{
"success": true,
"code": 0,
"data": {
"orderId": "739106551624717312",
"symbol": "BTC_USDT",
"positionId": 1109973831,
"price": 109777.5,
"priceStr": "109777.500000000000000000",
"vol": 5,
"leverage": 2,
"side": 1,
"category": 1,
"orderType": 5,
"dealAvgPrice": 109777.5,
"dealAvgPriceStr": "109777.500000000000000000",
"dealVol": 5,
"orderMargin": 27.444375,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 3,
"externalOid": "_m_903a9f81cc1148be99ac9ece15981374",
"errorCode": 0,
"usedMargin": 27.444375,
"createTime": 1761887134000,
"updateTime": 1761887134000,
"positionMode": 1,
"version": 2,
"showCancelReason": 0,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0
}
}
  • GET api/v1/private/order/get/{orderId}

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
orderIdstringtrueOrder ID

Response Parameters:

ParameterTypeDescription
orderIdlongOrder ID
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder side 1: open long,2: close short,3: open short,4: close long
categoryintOrder category:1: limit,2: liquidation custody,3: custody close,4: ADL reduction
dealAvgPricedecimalAverage deal price
dealVoldecimalDeal quantity
orderMargindecimalOrder margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1: isolated,2: cross
stateintOrder status,1: pending,2: unfilled,3: filled,4: canceled,5: invalid
externalOidstringExternal order ID
createTimedateCreated time
updateTimedateUpdated time
bboTypeNumintLimit order type - BBO type; 0: not BBO;1: best opposite 1;2: best opposite 5;3: same-side 1;4: same-side 5;
lossTrendintStop-loss price type;1: latest price;2: fair price;3: index price
profitTrendintTake-profit price type;
takeProfitPricedecimalTake-profit price
stopLossPricedecimalStop-loss price
priceProtectintPrice difference protection 1: on;0: off
positionModeintPosition mode;1: dual-side;2: one-way

Get Current Open Orders

Response Example

{
"success": true,
"code": 0,
"data": {
"pageSize": 20,
"totalCount": 1,
"totalPage": 1,
"currentPage": 1,
"resultList": [
{
"orderId": "739112440414947358",
"symbol": "BTC_USDT",
"positionId": 0,
"price": 108000,
"priceStr": "108000",
"vol": 1,
"leverage": 2,
"side": 1,
"category": 1,
"orderType": 1,
"dealAvgPrice": 0,
"dealAvgPriceStr": "0",
"dealVol": 0,
"orderMargin": 5.4,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 2,
"externalOid": "_m_a01b688e13fb47ab88c973d80dbfe2b6",
"errorCode": 0,
"usedMargin": 0,
"createTime": 1761888537775,
"updateTime": 1761888537851,
"positionMode": 1,
"version": 1,
"showCancelReason": 0,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0
}
]
}
}
  • GET api/v1/private/order/open_orders/{symbol}

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract, if not provided returns all
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
resultListlistResult set
orderIdlongPage size
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder side 1 open long,2 close short,3 open short,4 close long
categoryintOrder category:1 limit,2 liquidation custody,3 custody close,4 ADL reduction
orderTypeint1: Limit,2: Post Only (maker only),3: Immediate-Or-Cancel,4: Fill-Or-Kill
dealAvgPricedecimalAverage deal price
dealVoldecimalDeal quantity
orderMargindecimalOrder margin
usedMargindecimalUsed margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1 isolated,2 cross
stateintOrder status,1: pending,2 unfilled,3 filled,4 canceled,5 invalid
errorCodeintError code,0: normal,1: parameter error,2: insufficient balance,3: position not found,4: insufficient available position,5: for long, order price < liquidation price; for short, order price > liquidation price,6: when opening long, liquidation price > fair price; when opening short, liquidation price < fair price,7: exceeds risk limit
externalOidstringExternal order ID
stopLossPricedecimalStop-loss price
takeProfitPricedecimalTake-profit price
createTimedateCreated time
updateTimedateUpdated time
bboTypeNumintLimit order type - BBO type; 0: not BBO;1: best opposite 1;2: best opposite 5;3: same-side 1;4: same-side 5
lossTrendintStop-loss price type;1: latest price;2: fair price;3: index price
profitTrendintTake-profit price type;
takeProfitPricedecimalTake-profit price
stopLossPricedecimalStop-loss price
priceProtectintPrice difference protection 1: on;0: off
positionModeintPosition mode;1: dual-side;2: one-way

Get Closed Orders

filled, canceled, invalid

Response Example

{
"success": true,
"code": 0,
"data": [
{
"orderId": "739113577038255616",
"symbol": "DOGE_USDT",
"positionId": 1109997350,
"price": 0.18537,
"priceStr": "0.185370000000000000",
"vol": 1,
"leverage": 20,
"side": 3,
"category": 1,
"orderType": 5,
"dealAvgPrice": 0.18537,
"dealAvgPriceStr": "0.185370000000000000",
"dealVol": 1,
"orderMargin": 0.92685,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 3,
"externalOid": "_m_5adebccaaf58438185c1e5a56bd8330c",
"errorCode": 0,
"usedMargin": 0.92685,
"createTime": 1761888809000,
"updateTime": 1761888809000,
"positionMode": 1,
"version": 2,
"showCancelReason": 1,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0
}
]
}
  • GET api/v1/private/order/close_orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract
categoryintfalseOrder category,1: limit,2: liquidation custody,3: custody close,4: ADL reduction
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100

Response Parameters:

| Parameter | Type | Description | | ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | | pageSize | int | Page size | | totalCount | int | Total count | | totalPage | int | Total pages | | currentPage | int | Current page | | resultList | list | Result set | | orderId | long | Page size | | symbol | string | Contract | | positionId | long | Position id | | price | decimal | Order price | | vol | decimal | Order quantity | | leverage | long | Leverage | | side | int | Order side 1 open long,2 close short,3 open short,4 close long | | category | int | Order category:1 limit,2 liquidation custody,3 custody close,4 ADL reduction | | orderType | int | 1: Limit,2: Post Only (maker only),3: Immediate-Or-Cancel,4: Fill-Or-Kill | | | dealAvgPrice | decimal | Average deal price | | dealVol | decimal | Deal quantity | | orderMargin | decimal | Order margin | | usedMargin | decimal | Used margin | | takerFee | decimal | Taker fee | | makerFee | decimal | Maker fee | | profit | decimal | Close PnL | | feeCurrency | string | Fee currency | | openType | int | Open type,1 isolated,2 cross | | state | int | Order status,1: pending,2: unfilled,3: filled,4: canceled,5: invalid | | errorCode | int | Error code,0: normal,1: parameter error,2: insufficient balance,3: position not found,4: insufficient available position,5: for long, order price < liquidation price; for short, order price > liquidation price,6: when opening long, liquidation price > fair price; when opening short, liquidation price < fair price ,7: exceeds risk limit | | externalOid | string | External order ID | | createTime | date | Created time | | updateTime | date | Updated time |

Batch Query Orders by Order ID

  • GET /api/v1/private/order/batch_query

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
order_idslongtrueArray of order IDs, comma-separated, e.g.: order_ids = 1,2,3 (max 50 orders):

Response Parameters:

ParameterTypeDescription
orderIdlongOrder ID
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder side 1: open long,2: close short,3: open short,4: close long
categoryintOrder category:1: limit,2: liquidation custody,3: custody close,4: ADL reduction
dealAvgPricedecimalAverage deal price
dealVoldecimalDeal quantity
orderMargindecimalOrder margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1: isolated,2: cross
stateintOrder status,1: pending,2: unfilled,3: filled,4: canceled,5: invalid
externalOidstringExternal order ID
createTimedateCreated time
updateTimedateUpdated time
bboTypeNumintLimit order type - BBO type; 0: not BBO;1: best opposite 1;2: best opposite 5;3: same-side 1;4: same-side 5;
lossTrendintStop-loss price type;1: latest price;2: fair price;3: index price
profitTrendintTake-profit price type;
takeProfitPricedecimalTake-profit price
stopLossPricedecimalStop-loss price
priceProtectintPrice difference protection 1: on;0: off
positionModeintPosition mode;1: dual-side;2: one-way

Get Trade Details by Order ID

Response Example

{
"success": true,
"code": 0,
"data": [
{
"id": "9463051796",
"symbol": "BTC_USDT",
"side": 1,
"vol": 5,
"price": 109777.5,
"fee": 0,
"feeCurrency": "USDT",
"profit": 0,
"category": 1,
"orderId": "739106551624717312",
"timestamp": 1761887134000,
"positionMode": 1,
"taker": true
}
]
}
  • GET api/v1/private/order/deal_details/{order_id}

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
order_idlongtrueOrder id

Response Parameters:

ParameterTypeDescription
idlongTrade id
symbolstringContract
sideintOrder side 1 open long,2 close short,3 open short,4 close long
voldecimalDeal quantity
pricedecimalDeal price
feedecimalFee
feeCurrencystringFee currency
timestamplongUpdated time

Get Trade Records by Order ID

Response Example

{
"success": true,
"code": 0,
"data": [
{
"id": "159274416",
"symbol": "ETH_USDT",
"side": 2,
"vol": 1,
"price": 1208.35,
"feeCurrency": "USDT",
"fee": 0.0072501,
"timestamp": 1609992674000,
"profit": 0,
"category": 1,
"orderId": "102015012431820288",
"taker": true
}
]
}
  • GET api/v1/private/order/deal_details/{orderId}

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
orderIdlongtrueOrder ID

Response Parameters:

ParameterTypeDescription
idlongTrade order ID
symbolstringTrading pair
sideintOrder side;1: open long,2: close short,3: open short,4: close long
voldecimalDeal quantity
pricedecimalPrice
feedecimalFee; positive means user pays, negative means user receives
feeCurrencystringFee currency
profitdecimalProfit
isTakerbooleanWhether taker
categoryintOrder category:1 limit,2 liquidation custody,3 custody close,4 ADL reduction
orderIdlongOrder ID
timestampdateDeal time

Get All Historical Orders

Response Example

{
"success": true,
"code": 0,
"data": [
{
"orderId": "739211854408619008",
"symbol": "DOGE_USDT",
"positionId": 1110417836,
"price": 0.18695,
"priceStr": "0.186950000000000000",
"vol": 1,
"leverage": 20,
"side": 3,
"category": 1,
"orderType": 5,
"dealAvgPrice": 0.18695,
"dealAvgPriceStr": "0.186950000000000000",
"dealVol": 1,
"orderMargin": 0.93475,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 3,
"externalOid": "test00002",
"errorCode": 0,
"usedMargin": 0.93475,
"createTime": 1761912240000,
"updateTime": 1761912240000,
"positionMode": 1,
"version": 2,
"showCancelReason": 1,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0.0102,
"zeroTradeTotalFeeBinance": 0.0102
},
{
"orderId": "739211257974395392",
"symbol": "DOGE_USDT",
"positionId": 1110417836,
"price": 0.18645,
"priceStr": "0.186450000000000000",
"vol": 1,
"leverage": 20,
"side": 3,
"category": 1,
"orderType": 5,
"dealAvgPrice": 0.18645,
"dealAvgPriceStr": "0.186450000000000000",
"dealVol": 1,
"orderMargin": 0.93225,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 3,
"externalOid": "test00001",
"errorCode": 0,
"usedMargin": 0.93225,
"createTime": 1761912098000,
"updateTime": 1761912098000,
"positionMode": 1,
"version": 2,
"showCancelReason": 1,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0.0102,
"zeroTradeTotalFeeBinance": 0.0102
}
]
}
  • GET api/v1/private/order/list/history_orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract
statesstringfalseOrder status,1: pending,2 unfilled,3 filled,4 canceled,5 invalid; multiple separated by ','
categoryintfalseOrder category,1: limit,2: liquidation custody,3: custody close,4: ADL reduction
startTimelongfalseStart time
endTimelongfalseEnd time
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100
orderIdlongfalseOrder ID

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
resultListlistResult set
orderIdlongPage size
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder side 1 open long,2 close short,3 open short,4 close long
categoryintOrder category:1 limit,2 liquidation custody,3 custody close,4 ADL reduction
orderTypeint1: Limit,2: Post Only (maker only),3: Immediate-Or-Cancel,4: Fill-Or-Kill
dealAvgPricedecimalAverage deal price
dealVoldecimalDeal quantity
orderMargindecimalOrder margin
usedMargindecimalUsed margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1 isolated,2 cross
stateintOrder status,1: pending,2 unfilled,3 filled,4 canceled,5 invalid
errorCodeintError code,0: normal,1: parameter error,2: insufficient balance,3: position not found,4: insufficient available position,5: for long, order price < liquidation price; for short, order price > liquidation price,6: when opening long, liquidation price > fair price; when opening short, liquidation price < fair price
externalOidstringExternal order ID
createTimedateCreated time
updateTimedateUpdated time
bboTypeNumintLimit order type - BBO type; 0: not BBO;1: best opposite 1;2: best opposite 5;3: same-side 1;4: same-side 5
lossTrendintStop-loss price type;1: latest price;2: fair price;3: index price
profitTrendintTake-profit price type;
takeProfitPricedecimalTake-profit price
stopLossPricedecimalStop-loss price
priceProtectintPrice difference protection 1: on;0: off
positionModeintPosition mode;1: dual-side;2: one-way

Note: The price returned by this interface is the platform takeover deal price. To query the liquidation price of a forced liquidation order, use Get Open Positions. For orders under forced liquidation, this price is the platform’s takeover price and may differ from the liquidation price. For details, see: Forced Liquidation and Risk Limits

Get Historical Order Deal Details

Response Example

{
"success": true,
"code": 0,
"data": [
{
"id": "9466823344",
"symbol": "DOGE_USDT",
"side": 3,
"vol": 1,
"price": 0.18695,
"fee": 0,
"feeCurrency": "USDT",
"profit": 0,
"category": 1,
"orderId": "739211854408619008",
"timestamp": 1761912240000,
"positionMode": 1,
"taker": true
},
{
"id": "9466784116",
"symbol": "DOGE_USDT",
"side": 3,
"vol": 1,
"price": 0.18645,
"fee": 0,
"feeCurrency": "USDT",
"profit": 0,
"category": 1,
"orderId": "739211257974395392",
"timestamp": 1761912098000,
"positionMode": 1,
"taker": true
}
]
}
  • GET api/v1/private/order/list/order_deals/v3

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueTrading pair
start_timelongfalseStart time
end_timelongfalseEnd time
page_numinttruePage number; default 1
page_sizeinttruePage size; default 20; max cannot exceed 1000

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
resultListlistResult set
idlongDeal order id
symbolstringContract
sideintOrder side 1 open long,2 close short,3 open short,4 close long
voldecimalDeal quantity
pricedecimalDeal price
feedecimalFee
feeCurrencystringFee currency
timestamplongUpdated time

Query Historical Orders

Response Example

{
"success": true,
"code": 0,
"data": [
{
"orderId": "739211854408619008",
"symbol": "DOGE_USDT",
"positionId": 1110417836,
"price": 0.18695,
"priceStr": "0.186950000000000000",
"vol": 1,
"leverage": 20,
"side": 3,
"category": 1,
"orderType": 5,
"dealAvgPrice": 0.18695,
"dealVol": 1,
"orderMargin": 0.93475,
"takerFee": 0,
"makerFee": 0,
"profit": 0,
"feeCurrency": "USDT",
"openType": 1,
"state": 3,
"externalOid": "test00002",
"errorCode": 0,
"usedMargin": 0.93475,
"createTime": 1761912240000,
"updateTime": 1761912240000,
"positionMode": 1,
"version": 2,
"showCancelReason": 1,
"showProfitRateShare": 0,
"bboTypeNum": 0,
"totalFee": 0,
"zeroSaveTotalFeeBinance": 0,
"zeroTradeTotalFeeBinance": 0
}
]
}
  • GET api/v1/private/order/list/close_orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueTrading pair
start_timelongfalseStart time
end_timelongfalseEnd time
page_numintfalsePage number; default 1
page_sizeintfalsePage size; default 20; max cannot exceed 1000

Response Parameters:

ParameterTypeDescription
pageSizeintPage size
totalCountintTotal count
totalPageintTotal pages
currentPageintCurrent page
orderIdlongOrder ID
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder side;1: open long,2: close short,3: open short,4: close long
categoryintOrder category;1: limit,2: liquidation custody,3: custody close,4: ADL reduction;5: delivery order;6: liquidation hedge
dealAvgPricedecimalAverage deal price
dealVoldecimalDeal quantity
orderMargindecimalOrder margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1: isolated,2: cross
stateintOrder status,1: pending,2: unfilled,3: filled,4: canceled,5: invalid
externalOidstringExternal order ID
createTimedateCreated time
updateTimedateUpdated time
bboTypeNumintLimit order type - BBO type; 0: not BBO;1: best opposite 1;2: best opposite 5;3: same-side 1;4: same-side 5;
lossTrendintStop-loss price type;1: latest price;2: fair price;3: index price
profitTrendintTake-profit price type;
takeProfitPricedecimalTake-profit price
stopLossPricedecimalStop-loss price
priceProtectintPrice difference protection 1: on;0: off
positionModeintPosition mode;1: dual-side;2: one-way

Get Plan Order List

Response Example

{
"success": true,
"code": 0,
"data": [
{
"id": "739114860879304259",
"symbol": "DOGE_USD",
"leverage": 2,
"side": 1,
"triggerPrice": 0.00001,
"price": 0.00001,
"vol": 1,
"openType": 1,
"triggerType": 2,
"state": 1,
"executeCycle": 87600,
"trend": 1,
"orderType": 1,
"errorCode": 0,
"priceProtect": 0,
"createTime": 1761889115000,
"updateTime": 1761889115000,
"positionMode": 1,
"lossTrend": 1,
"profitTrend": 1,
"reduceOnly": false
}
]
}
  • GET api/v1/private/planorder/list/orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract
statesstringfalseStatus,1: untriggered,2: canceled,3: executed,4: invalidated,5: execution failed; multiple separated by ','
sideintfalseOrder side,1: open long,2: close short,3: open short,4: close long
start_timelongtrueStart time, 13-digit timestamp
end_timelongtrueEnd time, 13-digit timestamp
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100

Response Parameters:

ParameterTypeDescription
idintOrder id
symbolstringContract
leveragedecimalLeverage
sidestringOrder side, 1 open long,3 open short
triggerPricedecimalTrigger price
pricedecimalExecution price
voldecimalOrder quantity
openTypeintOpen type,1: isolated,2: cross
triggerTypeintTrigger type,1: greater than or equal,2: less than or equal
stateintStatus,1: untriggered,2: canceled,3: executed,4: invalidated,5: execution failed
executeCycleintExecution cycle, unit: hours
trendintTrigger price type,1: latest price,2: fair price,3: index price
errorCodeintError code when execution fails, 0: normal
orderIdlongOrder id, returned when execution succeeds
orderTypeintOrder type,1: Limit,2: Post Only (maker only),3: Immediate-Or-Cancel,4: Fill-Or-Kill,5: Market
createTimelongCreated time
updateTimelongUpdated time
priceProtectintPrice difference protection 1 on 0 off
positionModeintUser-set position type Default 0: no record for historical orders 2: one-way 1: dual-side
lossTrendintStop-loss reference price type 1 latest price 2 fair price 3 index price
profitTrendintTake-profit reference price type 1 latest price 2 fair price 3 index price
stopLossPricedecimalStop-loss price
takeProfitPricedecimalTake-profit price
reduceOnlybooleanReduce-only

Modify Plan Order(Under Maintenance)

Response Example

{
"success": true,
"code": 0
}
  • POST api/v1/private/planorder/change_price

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
orderIdlongtrueOrder ID
triggerPricedecimaltrueTrigger price
pricedecimaltrueExecution price
orderTypeinttrueOrder type,1: Limit,2: Post Only (maker only),3: Immediate-Or-Cancel,4: Fill-Or-Kill,5: Market
triggerTypeinttrueTrigger type,1: greater than or equal,2: less than or equal
trendinttrueTrigger price type,1: latest price,2: fair price,3: index price
frominttrueInterface source 1 - modify in trade list 2 - modify in list; empty means price modified via kline drag

Response Parameters:

Common parameters, success: true success, false failure

Modify Take-Profit/Stop-Loss on Plan Order(Under Maintenance)

Response Example

{
"success": true,
"code": 0
}
  • POST api/v1/private/planorder/change_stop_order

Required Permission: Order Placing

Special Notes:

When (stopLossPrice != null && stopLossPrice > 0) is met, a stop-loss price is set. The stop-loss trigger price type field (lossTrend) must be provided and must be one of [1, 2, 3], otherwise an error is returned (errorcode: 3001, price type error); When (takeProfitPrice != null && takeProfitPrice > 0) is met, a take-profit price is set. The take-profit trigger price type field (profitTrend) must be provided and must be one of [1, 2, 3], otherwise an error is returned (errorcode: 3001, price type error); When stopLossPrice == null || stopLossPrice == 0, it means the stop-loss setting is canceled; When takeProfitPrice == null || takeProfitPrice == 0, it means the take-profit setting is canceled; When both stopLossPrice and takeProfitPrice are not provided, or both are 0, it means cancel both take-profit and stop-loss settings; lossTrend / profitTrend values: if not provided, default to 1 (latest price); if provided, must be one of [1, 2, 3], otherwise an error is returned (errorcode: 3001, price type error)

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
orderIdlongtrueOrder ID
lossTrendintfalseStop-loss reference price type 1 latest price 2 fair price 3 index price
profitTrendintfalseTake-profit reference price type 1 latest price 2 fair price 3 index price
stopLossPricedecimalfalseStop-loss price
takeProfitPricedecimalfalseTake-profit price

Response Parameters:

Common parameters, success: true success, false failure

Get Take-Profit/Stop-Loss Order List

Response Example

{
"success": false,
"code": 0,
"message": "",
"data": [
{
"id": 0,
"orderId": 0,
"symbol": "",
"positionId": 0,
"stopLossPrice": 0.0,
"takeProfitPrice": 0.0,
"state": 0,
"triggerSide": 0,
"positionType": 0,
"vol": 0.0,
"realityVol": 0.0,
"placeOrderId": 0,
"errorCode": 0,
"version": 0,
"isFinished": 0,
"createTime": "",
"updateTime": ""
}
]
}
  • GET api/v1/private/stoporder/list/orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract
is_finishedintfalseFinal-state flag:0: unfinished,1: finished
stateintfalseStatus:1 untriggered 2 canceled 3 executed 4 invalidated 5 execution failed
typeintfalsePosition type,1: long,2: short
start_timelongfalseStart time, 13-digit timestamp
end_timelongfalseEnd time, 13-digit timestamp
page_numinttrueCurrent page, default 1
page_sizeinttruePage size, default 20, max 100

Response Parameters:

ParameterTypeDescription
idlongTP/SL order id
symbolstringContract
orderIdlongLimit order id; if placed by position, this value is 0
positionIdlongPosition id
lossTrendintStop-loss type:1 latest price 2 fair price 3 index price
profitTrendintTake-profit type:1 latest price 2 fair price 3 index price
stopLossPricedecimalStop-loss price
takeProfitPricedecimalTake-profit price
stateintStatus,1: untriggered,2: canceled,3: executed,4: invalidated,5: execution failed
triggerSideintTrigger direction,0: not triggered,1: take-profit,2: stop-loss
positionTypeintPosition type,1: long,2: short
voldecimalOrder quantity
realityVoldecimalActual placed quantity
placeOrderIdlongOrder id after successful placement
errorCodeintError code,0: normal,others see error code details
isFinishedintWhether order is in final state (for query),0: non-final,1: final
versionintVersion
priceProtectintTrigger protection:"1","0"
profitLossVolTypestringTP/SL quantity type (SAME: same quantity;SEPARATE:different quantities)
takeProfitVoldecimalTake-profit quantity (when profitLossVolType == SEPARATE)
stopLossVoldecimalStop-loss quantity (when profitLossVolType == SEPARATE)
createTimelongCreated time
updateTimelongUpdated time
volTypeintQuantity type 1、partial TP/SL 2、position TP/SL
takeProfitReverseintTake-profit reverse: 1 yes 2 no
stopLossReverseintStop-loss reverse: 1 yes 2 no
takeProfitTypeintTake-profit type 0 - market TP 1 - limit TP
takeProfitOrderPricedecimalLimit TP order price
stopLossTypelongStop-loss type 0 - market SL 1 - limit SL
stopLossOrderPricedecimalLimit SL order price

Get Current Take-Profit/Stop-Loss Order List

Response Example

{
"success": true,
"code": 0,
"data": [
{
"id": 357859177,
"orderId": "720733527158642176",
"symbol": "BTC_USDT",
"positionId": "1027177055",
"lossTrend": 1,
"profitTrend": 1,
"stopLossPrice": 111325,
"takeProfitPrice": 113573.9,
"state": 3,
"triggerSide": 2,
"positionType": 1,
"vol": 2,
"realityVol": 2,
"placeOrderId": "720744238723187712",
"errorCode": 0,
"version": 2,
"isFinished": 1,
"priceProtect": 0,
"profitLossVolType": "SEPARATE",
"takeProfitVol": 2,
"stopLossVol": 2,
"createTime": 1757506663000,
"updateTime": 1757509217000,
"volType": 1,
"takeProfitReverse": 2,
"stopLossReverse": 2,
"closeTryTimes": 0,
"reverseTryTimes": 0,
"reverseErrorCode": 0,
"takeProfitType": 0,
"profit_LOSS_VOL_TYPE_SAME": "SAME",
"profit_LOSS_VOL_TYPE_DIFFERENT": "SEPARATE"
}
]
}
  • GET api/v1/private/stoporder/open_orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract

Response Parameters:

ParameterTypeDescription
idlongTP/SL order id
symbolstringContract
orderIdlongLimit order id; if placed by position, this value is 0
positionIdlongPosition id
lossTrendintStop-loss type:1 latest price 2 fair price 3 index price
profitTrendintTake-profit type:1 latest price 2 fair price 3 index price
stopLossPricedecimalStop-loss price
takeProfitPricedecimalTake-profit price
stateintStatus,1: untriggered,2: canceled,3: executed,4: invalidated,5: execution failed
triggerSideintTrigger direction,0: not triggered,1: take-profit,2: stop-loss
positionTypeintPosition type,1: long,2: short
voldecimalOrder quantity
realityVoldecimalActual placed quantity
placeOrderIdlongOrder id after successful placement
errorCodeintError code,0: normal,others see error code details
isFinishedintWhether order is in final state (for query),0: non-final,1: final
versionintVersion
priceProtectintTrigger protection:"1","0"
profitLossVolTypestringTP/SL quantity type (SAME: same quantity;SEPARATE:different quantities)
takeProfitVoldecimalTake-profit quantity (when profitLossVolType == SEPARATE)
stopLossVoldecimalStop-loss quantity (when profitLossVolType == SEPARATE)
createTimelongCreated time
updateTimelongUpdated time
volTypeintQuantity type 1、partial TP/SL 2、position TP/SL
takeProfitReverseintTake-profit reverse: 1 yes 2 no
stopLossReverseintStop-loss reverse: 1 yes 2 no
takeProfitTypeintTake-profit type 0 - market TP 1 - limit TP
takeProfitOrderPricedecimalLimit TP order price
stopLossTypelongStop-loss type 0 - market SL 1 - limit SL
stopLossOrderPricedecimalLimit SL order price

Get Risk Limits

Response Example

{
"success": true,
"code": 0,
"data": {
"BTC_USDT": [
{
"level": 6,
"maxVol": 4500000,
"mmr": 0.05,
"imr": 0.1,
"maxLeverage": 500,
"symbol": "BTC_USDT",
"positionType": 2,
"openType": 1,
"leverage": 2,
"limitBySys": false,
"currentMmr": 0.05
},
{
"level": 1,
"maxVol": 50000,
"mmr": 0.001,
"imr": 0.002,
"maxLeverage": 500,
"symbol": "BTC_USDT",
"positionType": 1,
"openType": 1,
"leverage": 2,
"limitBySys": false
}
]
}
}
  • GET api/v1/private/account/risk_limit

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract, if not provided returns all

Response Parameters:

ParameterTypeDescription
symbolstringContract
positionTypeintPosition type 1: long,2: short
levelintCurrent liquidation risk level, returns min(leverage risk level, position risk level)
maxVoldecimalMaximum position quantity; if contract is configured to limit by position value, it will be converted to the number of contracts based on the current fair price.
maxLeverageintMaximum leverage
mmrdecimalMaintenance margin rate for the liquidation risk level; to calculate initial margin, obtain maintenance margin rate via the user’s leverage info interface
imrdecimalInitial margin rate for the liquidation risk level

Get Fee Details

Response Example

{
"success": true,
"code": 0,
"data": {
"symbol": "BTC_USDT",
"joinDiscount": true,
"enjoyDiscount": true,
"discountRate": 0.5,
"joinDeduct": true,
"enjoyDeduct": true,
"deductRate": 0.8,
"originalMakerFee": 0,
"originalTakerFee": 0,
"realMakerFee": 0,
"realTakerFee": 0,
"dealAmount": 0,
"walletBalance": 35.10272884,
"inviterKyc": "",
"level": 9999,
"feeType": 1,
"agentFee": false,
"feeRateMode": "TIERED",
"leverageFeeRates": [],
"tieredFeeRates": [
{
"takerFeeRate": 0,
"makerFeeRate": 0,
"minTieredDealAmount": 0,
"maxTieredDealAmount": 10000000,
"realTakerFee": 0,
"realMakerFee": 0
},
{
"takerFeeRate": 0.0004,
"makerFeeRate": 0.0001,
"minTieredDealAmount": 10000001,
"realTakerFee": 0.0002,
"realMakerFee": 0.00005
}
],
"tieredDealAmount": 54,
"tieredEffectiveDay": 0,
"tieredAppointContract": true,
"tieredExcludeContractId": true,
"tieredContractIds": [10, 77, 1104],
"tieredExcludeZeroFee": false,
"statisticType": "FIXED",
"fixedStartTime": 1760544000000,
"fixedEndTime": 1763049600000
}
}
  • GET api/v1/private/account/tiered_fee_rate/v2

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract; when symbol is provided, query fee rate info under that contract

Response Parameters:

ParameterTypeDescription
originalMakerFeedecimalOriginal maker fee
originalTakerFeedecimalOriginal taker fee
joinDiscountbooleanParticipate in discount
enjoyDiscountbooleanEnjoy discount true enjoy discount false do not enjoy discount
joinDeductbooleanParticipate in deduction
enjoyDeductbooleanEnjoy deduction
realMakerFeedecimalActual maker fee
realTakerFeedecimalActual taker fee
discountRatedecimalDiscount rate
deductRatedecimalDeduction rate
dealAmountdecimalTrading volume in the last 30 days
walletBalancedecimalWallet balance of yesterday
inviterKycstringFee group configuration inviter KYC limit
feeRateModestringFee mode NORMAL:standard fee LEVERAGE:leverage fee。TIERED:tiered fee
tieredFeeRateslistTiered fee configuration list; has value only when feeRateMode is TIERED
tieredDealAmountdecimalTrading amount
tieredEffectiveDayintEffective days
tieredAppointContractbooleanWhether to specify contract;false:not specify;true:specify
tieredExcludeContractIdbooleanfalse: not include,true: include
tieredContractIdsstringContract IDs, e.g. [10,11]
tieredExcludeZeroFeebooleanfalse: do not exclude,true: exclude;whether to exclude 0-fee trading volume
leverageFeeRateslistLeverage fee configuration list; has value only when feeRateMode is LEVERAGE
statisticTypestringTiered fee trading volume statistic dimension ROLLING rolling FIXED fixed
fixedStartTimelongFixed mode start time (ms)
fixedEndTimelongFixed mode end time (ms)

Modify Position Margin(Under Maintenance)

Response Example

{
"success": true,
"code": 0
}
  • POST api/v1/private/position/change_margin

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
positionIdlongtruePosition id
amountdecimaltrueAmount
typestringtrueType,ADD: increase,SUB: decrease

Response Parameters:

Common parameters, success: true success, false failure

Enable or Disable Auto-Add Margin(Under Maintenance)

Response Example

{
"success": true,
"code": 0
}
  • POST api/v1/private/position/change_auto_add_im

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
positionIdlongtruePosition ID
isEnabledbooleantrueWhether to enable

Response Parameters:

Common fields; success: true means success, false means failure

Get Position Leverage Multipliers

Response Example

{
"success": true,
"code": 0,
"data": [
{
"level": 6,
"maxVol": 4500000,
"mmr": 0.05,
"imr": 0.1,
"positionType": 1,
"openType": 1,
"leverage": 2,
"limitBySys": false,
"currentMmr": 0.001,
"maxLeverageView": 500
},
{
"level": 6,
"maxVol": 4500000,
"mmr": 0.05,
"imr": 0.1,
"positionType": 2,
"openType": 1,
"leverage": 2,
"limitBySys": false,
"currentMmr": 0.001,
"maxLeverageView": 500
}
]
}
  • GET api/v1/private/position/leverage

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract name

Response Parameters:

ParameterTypeDescription
symbolstringContract
positionTypeintPosition type, 1 long 2 short
openTypeintOpen type,1: isolated,2: cross
leverageintLeverage
maxLeverageViewintMaximum leverage
currentMmrdecimalMaintenance margin rate

Modify Leverage(Under Maintenance)

Response Example

{
"success": true,
"code": 0
}
  • POST api/v1/private/position/change_leverage

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
positionIdlongfalsePosition id, provide when a position exists
leverageinttrueLeverage
openTypeintfalseRequired when no position exists, open type,1: isolated,2: cross
symbolstringfalseRequired when no position exists, contract name
positionTypeintfalseWhen no position exists, position type, 1 long 2 short
leverageModeintfalseLeverage mode 1: advanced mode 2: simple mode
marginSelectedbooleanfalseFlag for adjusting all contracts’ margin mode - whether selected
leverageSelectedbooleanfalseFlag for adjusting all contracts’ leverage mode - whether selected

Response Parameters:

Common parameters, success: true success,false failure

Get User Position Mode

Response Example

{
"success": true,
"code": 0,
"data": [
{
"level": 6,
"maxVol": 4500000,
"mmr": 0.05,
"imr": 0.1,
"positionType": 1,
"openType": 1,
"leverage": 2,
"limitBySys": false,
"currentMmr": 0.001,
"maxLeverageView": 500
},
{
"level": 6,
"maxVol": 4500000,
"mmr": 0.05,
"imr": 0.1,
"positionType": 2,
"openType": 1,
"leverage": 2,
"limitBySys": false,
"currentMmr": 0.001,
"maxLeverageView": 500
}
]
}
  • GET api/v1/private/position/position_mode

Required Permission: View Order Details

Request Parameters:

None

Response Parameters:

| Parameter | Type | Description | | ------------ | ---- | ----------- | ------------------------------------ | | positionMode | int | true | Position mode:1 dual-side 2 one-way |

Modify User Position Mode(Under Maintenance)

{
"success": true,
"code": 0
}
  • POST api/v1/private/position/change_position_mode

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
positionModeinttrue1: dual-side, 2: one-way. To modify the position mode, you must ensure there are no active orders, plan orders, or unfinished positions; otherwise, it cannot be modified. When switching from dual-side to one-way mode, the risk limit level will reset to level 1. To change it, call the interface to modify.

Response Parameters:

Common parameters, success: true success, false failure

Reverse Open Position(Under Maintenance)

{
"success": true,
"code": 0
}
  • POST api/v1/private/position/reverse

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
positionIdlongtruePosition id
voldecimaltrueQuantity

Response Parameters:

Close All(Under Maintenance)

{
"success": true,
"code": 0,
"data": []
}
  • POST api/v1/private/position/close_all

Required Permission: Order Placing

Request Parameters:

None

Response Parameters:

Common parameters, success: true success, false failure

Place Order (Under Maintenance)

Response Example

{
"success": true,
"code": 0,
"data": {
"orderId": "739113577038255616",
"ts": 1761888808839
}
}
  • POST api/v1/private/order/create

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
pricedecimaltruePrice
voldecimaltrueQuantity
leverageintfalseLeverage, must be provided when opening a position
sideinttrueOrder direction 1 open long, 2 close short, 3 open short, 4 close long
typeinttrueOrder type,1: limit,2: Post Only (maker only),3: IOC,4: FOK,5: market
openTypeinttrueOpen type,1: isolated,2: cross
externalOidstringfalseExternal order id
stopLossPricedecimalfalseStop-loss price
takeProfitPricedecimalfalseTake-profit price
lossTrendintfalseStop-loss price type;1: latest price (default);2: fair price;3: index price
profitTrendintfalseTake-profit price type;1: latest price (default);2: fair price;3: index price
priceProtectintfalseConditional order trigger protection: "1","0", default "0" disabled. Required only for plan orders/TP-SL orders
positionModeintfalsePosition mode, default dual-side; 2: one-way; 1: dual-side
reduceOnlybooleanfalseReduce-only, only applicable in one-way mode
marketCeilingbooleanfalse100% market open
flashClosebooleanfalseFlash close
bboTypeNumintfalseLimit order type - BBO type; 0: not BBO;1: opposite-1;2: opposite-5;3: same-side-1;4: same-side-5;

Response Parameters:

On success, success = true, data is the order id; on failure, success = false, data = null

Place TP/SL Order by Position(Under Maintenance)

Response Example

{
"success": false,
"code": 0,
"message": "",
"data": [
{
"id": 0,
"symbol": "",
"leverage": 0,
"side": 0,
"triggerPrice": 0.0,
"price": 0.0,
"vol": 0.0,
"openType": 0,
"triggerType": 0,
"state": 0,
"executeCycle": 0,
"trend": 0,
"orderType": 0,
"orderId": 0,
"errorCode": 0,
"createTime": "",
"updateTime": ""
}
]
}
  • POST api/v1/private/stoporder/place

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
lossTrendinttrueStop-loss type: 1 latest price 2 fair price 3 index price
profitTrendinttrueTake-profit type: 1 latest price 2 fair price 3 index price
positionIdlongtruePosition id
voldecimaltrueOrder quantity; must be within the allowed range for the contract; the order quantity plus existing TP/SL order quantity must be less than the closable quantity; position quantity will not be frozen, but checks are required
stopLossPricedecimalfalseStop-loss price; at least one of stop-loss or take-profit must be non-empty and greater than 0
takeProfitPricedecimalfalseTake-profit price; at least one of stop-loss or take-profit must be non-empty and greater than 0
priceProtectintfalseTrigger protection: "1","0"
profitLossVolTypestringfalseTP/SL quantity type (SAME: same quantity; SEPARATE: different quantities)
takeProfitVoldecimalfalseTake-profit quantity (when profitLossVolType == SEPARATE)
stopLossVoldecimalfalseStop-loss quantity (when profitLossVolType == SEPARATE)
volTypeintfalseQuantity type 1: partial TP/SL 2: position TP/SL
takeProfitReverseintfalseTake-profit reverse: 1 yes 2 no
stopLossReverseintfalseStop-loss reverse: 1 yes 2 no
mtokenstringfalseWeb device id
takeProfitTypeintfalseTake-profit type 0 - market TP 1 - limit TP
takeProfitOrderPricedecimaltrueLimit TP order price
stopLossTypelongtrueStop-loss type 0 - market SL 1 - limit SL
stopLossOrderPricedecimaltrueLimit SL order price

Response Parameters:

On success, success = true, data is the order id; on failure, success = false, data = null. If there is a non-final TP/SL order with the same price, the previous id is returned and the previous order quantity is updated asynchronously.

Modify Order Price & Quantity(Under Maintenance)

Response Example

{
"success": true,
"code": 0,
"data": "739204819784386560"
}
  • POST api/v1/private/order/change_limit_order

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
orderIdlongtrueOrder ID
pricedecimaltruePrice
voldecimaltrueQuantity

Response Parameters:

On success, success = true, data is the order id; on failure, success = false, data = null

Query In-Flight Order Counts

Response Example

{
"success": true,
"code": 0,
"data": {
"sumCount": 1,
"limitOrderCount": 1,
"stopOrderCount": 0,
"planOrderCount": 0,
"trackOrderCount": 0
}
}
  • POST api/v1/private/order/open_order_total_count

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
orderIdlongtrueOrder ID
pricedecimaltruePrice
voldecimaltrueQuantity

Response Parameters:

On success, success = true, data is the order id; on failure, success = false, data = null

Chase Order(Under Maintenance)

Modify order price to the corresponding one-tick price

Response Example

{
"success": true,
"code": 0
}
  • POST api/v1/private/order/chase_limit_order

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
orderIdlongtrueOrder ID

Response Parameters:

On success, success = true, data is the order id; on failure, success = false, data = null

Place Plan Order(Under Maintenance)

Response Example

{
"success": true,
"code": 0,
"data": "739206374277809664"
}
  • POST api/v1/private/planorder/place/v2

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract
pricedecimalfalseExecution price; not required for market
voldecimaltrueQuantity
leverageinttrueLeverage, required when opening
sideinttrue1 open long, 2 close short, 3 open short, 4 close long
openTypeinttrueOrder direction 1 open long, 2 close short, 3 open short, 4 close long
triggerPricedecimaltrueTrigger price
triggerTypeinttrueTrigger type,1: greater than or equal to,2: less than or equal to
executeCycleinttrueExecution cycle,1: 24 hours,2: 7 days
orderTypeinttrueOrder type,1: limit,2: Post Only (maker only),3: IOC,4: FOK,5: market
trendinttrueTrigger price type,1: latest price,2: fair price,3: index price
priceProtectintfalseConditional order trigger protection: "1","0", default "0" disabled. Required only for plan orders/TP-SL orders
positionModeintfalseUser-set position type default 0: historical orders no record 2: one-way 1: dual-side
lossTrendintfalseStop-loss reference price type 1 latest price 2 fair price 3 index price
profitTrendintfalseTake-profit reference price type 1 latest price 2 fair price 3 index price
stopLossPricedecimalfalseStop-loss price
takeProfitPricedecimalfalseTake-profit price
reduceOnlybooleanfalseReduce-only

Response Parameters:

On success, success = true, data is the order id; on failure, success = false, data = null

Cancel Orders (Under Maintenance)

Response Example

{
"success": true,
"code": 0,
"data": [
{
"orderId": 101716841474621953,
"errorCode": 2040,
"errorMsg": "order not exist"
},
{
"orderId": 108885377779302912,
"errorCode": 2041,
"errorMsg": "order state cannot be cancelled"
},
{
"orderId": 108886241042563584,
"errorCode": 0,
"errorMsg": "success"
}
]
}

Cancel previously placed unfinished orders, up to 50 orders per request.

  • POST api/v1/private/order/cancel

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
NoneList<Long>trueOrder id list, max 50

Response Parameters:

Common parameters, success: true success, false failure

Batch Cancel by External Order ID(Under Maintenance)

Response Example

{
"success": true,
"code": 0,
"data": [
{
"orderId": 101716841474621953,
"errorCode": 2040,
"errorMsg": "order not exist"
},
{
"orderId": 108885377779302912,
"errorCode": 2041,
"errorMsg": "order state cannot be cancelled"
},
{
"orderId": 108886241042563584,
"errorCode": 0,
"errorMsg": "success"
}
]
}
  • POST api/v1/private/order/batch_cancel_with_external

Required Permission: Order Placing

Request Parameters: list collection; e.g. [{"symbol":"BTC_USDT", "externalOid":"ext_11"}]

ParameterTypeRequiredDescription
symbolstringtrueTrading pair
externalOidstringtrueExternal order id

Response Parameters:

ParameterTypeDescription
orderIdlongOrder ID
errorCodeintError code
errorMsgstringError reason

Cancel by External Order ID(Under Maintenance)

Response Example

{
"success": true,
"code": 0,
"data": [
{
"orderId": 101716841474621953,
"errorCode": 2040,
"errorMsg": "order not exist"
},
{
"orderId": 108885377779302912,
"errorCode": 2041,
"errorMsg": "order state cannot be cancelled"
},
{
"orderId": 108886241042563584,
"errorCode": 0,
"errorMsg": "success"
}
]
}
  • POST api/v1/private/order/cancel_with_external

Required Permission: Order Placing

Request Parameters: list collection; e.g. [{"symbol":"BTC_USDT", "externalOid":"ext_11"}]

ParameterTypeRequiredDescription
symbolstringtrueContract
externalOidstringtrueExternal order id

Response Parameters:

ParameterTypeDescription
orderIdlongOrder ID
errorCodeintError code
errorMsgstringError reason

Cancel All Orders Under a Contract(Under Maintenance)

Response Example

{
"success": true,
"code": 0
}

Cancel all unfinished orders under a specific contract.

  • POST api/v1/private/order/cancel_all

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract; if provided, cancel only orders under that contract; if not, cancel orders under all contracts

Response Parameters:

Common parameters, success: true success, false failure

Batch Query - Get Orders by External Order ID

Response Example

{
"success": true,
"code": 0
}
  • POST api/v1/private/order/batch_query_with_external

Required Permission: View Order Details

Request Parameters: list collection

ParameterTypeRequiredDescription
symbolstringtrueContract
externalOidstringtrueExternal order id

Response Parameters:

ParameterTypeDescription
orderIdlongOrder ID
symbolstringContract
positionIdlongPosition id
pricedecimalOrder price
voldecimalOrder quantity
leveragelongLeverage
sideintOrder direction 1: open long,2: close short,3: open short,4: close long
categoryintOrder category:1: limit,2: forced-liquidation custody,3: custody close,4: ADL reduction
dealAvgPricedecimalAverage fill price
dealVoldecimalFilled quantity
orderMargindecimalOrder margin
takerFeedecimalTaker fee
makerFeedecimalMaker fee
profitdecimalClose PnL
feeCurrencystringFee currency
openTypeintOpen type,1: isolated,2: cross
stateintOrder status,1: pending,2: unfilled,3: filled,4: canceled,5: invalid
externalOidstringExternal order id
createTimedateCreated time
updateTimedateUpdated time
bboTypeNumintLimit order type - BBO type; 0: not BBO;1: opposite-1;2: opposite-5;3: same-side-1;4: same-side-5;
lossTrendintStop-loss price type;1: latest;2: fair;3: index
profitTrendintTake-profit price type;
takeProfitPricedecimalTake-profit price
stopLossPricedecimalStop-loss price
priceProtectintSpread protection 1: on;0: off
positionModeintPosition mode;1: dual-side;2: one-way

Change Risk Level(Under Maintenance)

Response Example

{
"success": true,
"code": 0
}

- POST api/v1/private/account/change_risk_level

Required Permission: Order Placing

- Disabled. Calling this returns error code 8817 with message: The risk limit feature has been upgraded. Please check the web page for details.

Cancel Planned Orders(Maintenance)

Response Example:

{
"success": true,
"code": 0
}
  • POST api/v1/private/planorder/cancel

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
NoneList<CancelOrderRequest>trueList of orders to cancel, up to 50

CancelOrderRequest:

Example:

[{"symbol":"BTC_USDT","orderId":1},{"symbol":"ETH_USDT","orderId":2}]

ParameterTypeRequiredDescription
symbolstringtrueContract name
orderIdstringtrueOrder ID

Response Parameters:

Common parameters; success: true for success, false for failure

Cancel All Planned Orders(Maintenance)

Response Example:

{
"success": true,
"code": 0
}
  • POST api/v1/private/planorder/cancel_all

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract name. If provided, only cancel orders under this contract; if not, cancel orders under all contracts

Response Parameters:

Common parameters; success: true for success, false for failure

Cancel TP/SL Planned Orders(Maintenance)

Response Example:

{
"success": true,
"code": 0
}
  • POST api/v1/private/stoporder/cancel

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
NoneList<CancelOrderRequest>trueList of orders to cancel, up to 50

CancelOrderRequest:

Example:

[{"stopPlanOrderId":1},{"stopPlanOrderId":2}]

ParameterTypeRequiredDescription
stopPlanOrderIdlongtrueTP/SL planned order ID

Response Parameters:

Common parameters; success: true for success, false for failure

Cancel All TP/SL Planned Orders(Maintenance)

Response Example:

{
"success": true,
"code": 0
}
  • POST api/v1/private/stoporder/cancel_all

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
positionIdlongfalsePosition ID. If provided, cancel only TP/SL orders for this position; if not provided, check symbol
symbolstringfalseContract name. If provided, cancel only TP/SL orders under this contract; if not, cancel TP/SL orders under all contracts

Response Parameters:

Common parameters; success: true for success, false for failure

Modify TP/SL Prices on a Limit Order(Under Maintenance)

Response Example:

{
"success": true,
"code": 0
}
  • POST api/v1/private/stoporder/change_price

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
lossTrendintfalseStop-loss price type: 1 Latest Price; 2 Fair Price; 3 Index Price
profitTrendintfalseTake-profit price type: 1 Latest Price; 2 Fair Price; 3 Index Price
orderIdlongtrueLimit order ID
stopLossPricedecimalfalseStop-loss price. If both TP and SL are empty or both are 0, the order’s TP/SL will be canceled
takeProfitPricedecimalfalseTake-profit price. If both TP and SL are empty or both are 0, the order’s TP/SL will be canceled
takeProfitReverseintfalseReverse on take-profit: 1 Yes; 2 No
stopLossReverseintfalseReverse on stop-loss: 1 Yes; 2 No

Response Parameters:

Common parameters; success: true for success, false for failure

Modify TP/SL Prices on a TP/SL Planned Order(Under Maintenance)

Response Example:

{
"success": true,
"code": 0
}
  • POST api/v1/private/stoporder/change_plan_price

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
lossTrendintfalseStop-loss price type: 1 Latest Price; 2 Fair Price; 3 Index Price
profitTrendintfalseTake-profit price type: 1 Latest Price; 2 Fair Price; 3 Index Price
stopPlanOrderIdlongtrueTP/SL planned order ID
stopLossPricedecimalfalseStop-loss price. At least one of TP/SL must be non-empty and greater than 0
takeProfitPricedecimalfalseTake-profit price. At least one of TP/SL must be non-empty and greater than 0
takeProfitReverseintfalseReverse on take-profit: 1 Yes; 2 No
stopLossReverseintfalseReverse on stop-loss: 1 Yes; 2 No

Response Parameters:

Common parameters; success: true for success, false for failure

Place Trailing Order(Under Maintenance)

Response Example:

{
"success": true,
"code": 0,
"data": "739218627261666816"
}
  • POST api/v1/private/trackorder/place

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract name
leverageinttrueLeverage
sideinttrue1 Open Long; 2 Close Short; 3 Open Short; 4 Close Long
voldecimaltrueOrder quantity
openTypeinttruePosition mode: 1 Isolated; 2 Cross
trendinttruePrice type: 1 Latest; 2 Fair; 3 Index
activePricedecimalfalseActivation price
backTypeinttrueCallback type: 1 Percentage; 2 Absolute value
backValuedecimaltrueCallback value
positionModeinttruePosition mode. Default 0: no record for historical orders; 1: Two-way (hedged); 2: One-way
reduceOnlybooleanfalseReduce-only

Response Parameters:

Common parameters; success: true for success, false for failure

Cancel Trailing Order(Under Maintenance)

{
"success": true,
"code": 0
}
  • POST api/v1/private/trackorder/cancel

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract name
trackOrderIdintfalseTrailing order ID

Response Parameters:

Common parameters; success: true for success, false for failure

Modify Trailing Order(Under Maintenance)

{
"success": true,
"code": 0
}
  • POST api/v1/private/trackorder/change_order

Required Permission: Order Placing

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract name
trackOrderIdlongtrueTrailing order ID
trendinttruePrice type: 1 Latest; 2 Fair; 3 Index
activePricedecimalfalseActivation price
backTypeinttrueCallback type: 1 Percentage; 2 Absolute value
backValuedecimaltrueCallback value
voldecimaltrueOrder quantity

Response Parameters:

Common parameters; success: true for success, false for failure

Query Trailing Orders

{
"success": true,
"code": 0,
"data": [
{
"id": "739628779353703936",
"symbol": "DOGE_USDT",
"leverage": 2,
"side": 1,
"vol": 100,
"openType": 1,
"trend": 1,
"activePrice": 0,
"markPrice": 0.18657,
"backType": 1,
"backValue": 0.02,
"triggerPrice": 0.1903,
"orderId": 0,
"errorCode": 0,
"state": 1,
"createTime": 1762011642623,
"updateTime": 1762011642623,
"positionMode": 1,
"reduceOnly": false,
"triggerType": 1
}
]
}
  • GET api/v1/private/trackorder/list/orders

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseContract name
statesList<int>trueOrder status: 0 Not activated; 1 Activated; 2 Triggered successfully; 3 Trigger failed; 4 Canceled
sideintfalse1 Open Long; 2 Close Short; 3 Open Short; 4 Close Long
start_timelongfalseStart time
end_timelongfalseEnd time
pageIndexintfalsePage index
pageSizeintfalsePage size

Response Parameters:

ParameterTypeDescription
idlongOrder ID
symbolstringContract name
leverageintLeverage
sideint1 Open Long; 2 Close Short; 3 Open Short; 4 Close Long
voldecimalOrder quantity
openTypeintPosition mode: 1 Isolated; 2 Cross
trendintPrice type: 1 Latest; 2 Fair; 3 Index
activePricedecimalActivation price
markPricedecimalReference price (highest or lowest after activation)
backTypeintCallback type: 1 Percentage; 2 Absolute value
backValuedecimalCallback value
triggerPricedecimalTrigger price (updates with the reference price)
orderIddecimalOrder ID after trigger success
errorCodedecimalError code when trigger fails
statedecimalCurrent trailing order state (0 Not activated; 1 Activated; 2 Executed successfully; 3 Execution failed; 4 Canceled)
createTimelongCreate time
updateTimelongUpdate time
positionModeintPosition mode. Default 0: no record for historical orders; 1: Two-way; 2: One-way
reduceOnlybooleanReduce-only
triggerTypeintTrigger condition: 1 ≥; 2 ≤

View Personal Profit Rate

{
"success": true,
"code": 0,
"data": {
"ranking": 0,
"profitRate": 0,
"statisticTime": 1666612800000
}
}
  • GET api/v1/private/account/profit_rate/{type}

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
typeinttrueType: 1 Day; 2 Week

Response Parameters:

ParameterTypeDescription
profitRatedecimalProfit rate
statisticTimelongStatistic time (ms)

Asset Analysis

{
"success": true,
"code": 0,
"data": {
"historyDailyData": {
"timeList": [],
"accumPnlList": [],
"accumPnlRateList": [],
"dailyPnlList": [],
"dailyPnlRateList": [],
"dailyEquityList": [],
"dailyIndexPriceRiseFallRateList": []
},
"todayPnl": 0,
"todayPnlRate": 0,
"totalPnl": 0,
"totalEquity": 0,
"winRate": 0
}
}
  • GET api/v1/private/account/asset/analysis/{type}

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
startTimelongfalseStart time (ms)
endTimelongfalseEnd time (ms)
currencystringtrueCurrency
typeinttrueType: 1 This week; 2 This month; 3 All; 4 Custom time range

Response Parameters:

ParameterTypeDescription
todayPnldecimalToday’s PnL
todayPnlRatedecimalToday’s PnL rate
totalPnldecimalTotal PnL
totalEquitydecimalTotal equity
winRatedecimalWin rate
historyDailyDataobjectDaily historical data

Deduction Configuration

{
"success": true,
"code": 0,
"data": [
{
"deductCoin": "MX",
"settleCoin": "USDT",
"discountRatio": 0.8
},
{
"deductCoin": "MXPOINT",
"settleCoin": "USDT",
"discountRatio": 1
}
]
}
  • GET api/v1/private/account/feeDeductConfigs

Required Permission: View Account Details

Request Parameters:

None

Response Parameters:

ParameterTypeDescription
deductCoinstringDeduction coin
settleCoinstringSettlement coin
discountRatiodecimalDiscount ratio

Yesterday’s PnL

{
"success": true,
"code": 0,
"data": 0.23697
}
  • GET api/v1/private/account/asset/analysis/yesterday_pnl

Required Permission: View Account Details

Request Parameters:

None

Response Parameters:

On success, success = true and data is the PnL amount (unit: USDT). On failure, data = null

User Asset Analysis API

{
"success": true,
"code": 0,
"data": {
"historyDailyData": {
"timeList": [1666540800000],
"accumPnlList": [0],
"accumPnlRateList": [0],
"dailyPnlList": [0],
"dailyEquityList": [0]
},
"todayPnl": -0.1672566436,
"todayPnlRate": -0.00333611,
"totalEquity": 49.967886076096049341976,
"recentPnl": -84.83699744258,
"recentPnlRate": -0.627705,
"recentPnl30": -84.83699744258,
"recentPnlRate30": -0.62609353,
"accurate": true,
"timestamp": 1762243513793,
"todayPnlFinished": true
}
}
  • POST api/v1/private/account/asset/analysis/v3

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
startTimelongtrueStart time (ms)
endTimelongtrueEnd time (ms)
reverseintfalseContract type: 0 All; 1 USDT-M; 2 Coin-M; 3 USDC-M
includeUnrealisedPnlintfalseInclude unrealized PnL: 0 No; 1 Yes
symbolstringfalseTrading pair

Response Parameters:

ParameterTypeDescription
todayPnldecimalToday’s PnL
todayPnlRatedecimalToday’s PnL rate
totalPnldecimalTotal PnL
recentPnldecimal7-day cumulative PnL
recentPnlRatedecimal7-day cumulative PnL rate
recentPnl30decimal30-day cumulative PnL
recentPnlRate30decimal30-day cumulative PnL rate
timestamplongTimestamp (ms)
historyDailyDataobjectDaily historical data

User Asset Calendar Analysis (Daily)

{
"success": true,
"code": 0,
"data": {
"dailyTimeList": [1666540800000],
"dailyPnlList": [0],
"todayPnlFinished": true
}
}
  • POST api/v1/private/account/asset/analysis/calendar/daily/v3

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
startTimelongtrueStart time (ms)
endTimelongtrueEnd time (ms)
reverseintfalseContract type: 0 All; 1 USDT-M; 2 Coin-M; 3 USDC-M
includeUnrealisedPnlintfalseInclude unrealized PnL: 0 No; 1 Yes

Response Parameters:

ParameterTypeDescription
dailyTimeListlistDaily time list
dailyPnlListlistDaily PnL list

User Asset Calendar Analysis (Monthly)

{
"success": true,
"code": 0,
"data": {
"monthlyTimeList": [
1730390400000, 1732982400000, 1735660800000, 1738339200000, 1740758400000,
1743436800000, 1746028800000, 1748707200000, 1751299200000, 1753977600000,
1756656000000, 1759248000000, 1761926400000
],
"monthlyPnlList": [
0, 0, 0, 0.59240408538617361076, 0, -0.08440522, 1.01141136563,
1.48665238855, 0.443981802, -5.07385427096, 0.215519128, 0.23697,
-85.07396744258
],
"todayPnlFinished": true
}
}
  • POST api/v1/private/account/asset/analysis/calendar/monthly/v3

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
reverseintfalseContract type: 0 All; 1 USDT-M; 2 Coin-M; 3 USDC-M
includeUnrealisedPnlintfalseInclude unrealized PnL: 0 No; 1 Yes

Response Parameters:

ParameterTypeDescription
monthlyTimeListlistMonthly time list
monthlyPnlListlistMonthly PnL list

Recent User Asset Analysis

{
"success": true,
"code": 0,
"data": {
"recentPnl60": -84.62147831458,
"recentPnlRate60": -0.62568913,
"recentPnl90": -84.44672244458,
"recentPnlRate90": -0.62697083,
"recentPnl120": -89.25135078354,
"recentPnlRate120": -0.6389013,
"recentPnl150": -87.83298114164,
"recentPnlRate150": -0.35204645,
"recentPnl180": -87.45807323443,
"recentPnlRate180": -0.3509743,
"recentPnl360": -86.24528816397382638924,
"recentPnlRate360": -0.22856267,
"todayPnlFinished": true
}
}
  • POST api/v1/private/account/asset/analysis/recent/v3

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
reverseintfalseContract type: 0 All; 1 USDT-M; 2 Coin-M; 3 USDC-M
includeUnrealisedPnlintfalseInclude unrealized PnL: 0 No; 1 Yes
symbolstringfalseTrading pair

Response Parameters:

ParameterTypeDescription
recentPnl60decimalPnL over last 60 days
recentPnlRate60decimalPnL rate over last 60 days
recentPnl90decimalPnL over last 90 days
recentPnlRate90decimalPnL rate over last 90 days
recentPnl120decimalPnL over last 120 days
recentPnlRate120decimalPnL rate over last 120 days
recentPnl150decimalPnL over last 150 days
recentPnlRate150decimalPnL rate over last 150 days
recentPnl180decimalPnL over last 180 days
recentPnlRate180decimalPnL rate over last 180 days
recentPnl360decimalPnL over last 360 days
recentPnlRate360decimalPnL rate over last 360 days

Today’s User Asset Analysis

{
"success": true,
"code": 0,
"data": {
"todayPnl": -0.26538358229,
"todayPnlRate": -0.0019614,
"todayPnlFinished": true
}
}
  • GET api/v1/private/account/asset/analysis/today_pnl

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
reverseintfalseContract type: 0 All; 1 USDT-M; 2 Coin-M; 3 USDC-M
includeUnrealisedPnlintfalseInclude unrealized PnL: 0 No; 1 Yes

Response Parameters:

ParameterTypeDescription
todayPnldecimalToday’s PnL
todayPnlRatedecimalToday’s PnL rate

Query All Spot Discount Configuration Information

{
"success": true,
"code": 200,
"message": "success",
"data": [
{
"id": 1,
"currency": "MX",
"state": "ENABLED",
"discountConfig": "[{\"day\":1,\"discount\":0.5,\"level\":1,\"volMax\":2147483647,\"volMin\":500}]",
"ineffectiveDiscountConfig": "",
"operator": "",
"createTime": 1699775818000,
"updateTime": 1732982217000,
"enabled": true
}
]
}
  • GET api/v1/private/account/config/contractFeeDiscountConfig

Required Permission: View Account Details

Request Parameters:

None

Response Parameters:

ParameterTypeDescription
currencystringDeduction currency
statestringStatus: ENABLED, DISABLED
discountConfigstringDiscount configuration, JSON: [{ "level":1, "volMin":0, "volMax":12, "day":7, "discount":0.8 }]
blackContractIdSetlistList of contract IDs excluded from discounts

Query Contract Fee Deduction Details

{
"success": true,
"code": 0,
"data": [
{
"id": 54236193,
"orderId": 739132568196170240,
"feeCurrency": "USDT",
"fee": 0.0906990372,
"deductType": 2,
"deductFeeCurrency": "USDT",
"deductFee": 0.0906990372,
"timestamp": 1761893337000
},
{
"id": 52060733,
"orderId": 735908917455962624,
"feeCurrency": "USDT",
"fee": 0.297936756,
"deductType": 0,
"timestamp": 1761124758000
}
]
}
  • GET api/v1/private/order/fee_details

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringtrueContract name
idslongfalseDeal ID; up to 20 can be sent in a batch
start_timelongfalseStart time; if omitted, defaults to current time minus 7 days; max span 90 days
end_timelongfalseEnd time; the span between start and end is 90 days
page_numintfalseCurrent page number, default 1
page_sizeintfalsePage size, default 20, max 100

Response Parameters:

ParameterTypeDescription
idlongDeal ID
symbolstringContract name
orderIdlongOrder ID
feeCurrencystringFee currency
feedecimalFee
deductTypestringDeduction type: 0 = No deduction, 1 = MXPOINT deduction, 2 = Trial bonus deduction
deductFeeCurrencystringDeducted fee currency
deductFeedecimalDeducted fee
timestamplongDeal time

Query User Discount Usage

If spot fee discount exists, spot discount config applies; if there is MX holding for contracts, MX deduction applies

{
"success": true,
"code": 0,
"data": {
"useFeeDiscount": true,
"useFeeDeduct": false
}
}
  • GET api/v1/private/account/discountType

Required Permission: View Account Details

Request Parameters:

None

Response Parameters:

ParameterTypeDescription
useFeeDiscountbooleanUse spot discount fee rate
useFeeDeductbooleanUse contract deduction fee rate

Export PnL Analysis

  • GET api/v1/private/account/asset/analysis/export

Required Permission: View Account Details

Header Request Parameters:

ParameterTypeRequiredDescription
timezone-loginstringtrueTimezone; e.g., UTC+08:00

Request Parameters:

ParameterTypeDescription
startTimelongExport start time (ms)
endTimelongExport end time
reverseintContract type: 0: All; 1: USDT-M; 2: Coin-M
includeUnrealisedPnlintInclude unrealized PnL: 0: No; 1: Yes
symbolstringTrading pair
fileTypeintFile type: 1-EXCEL 2-PDF
languagestringLanguage; e.g., zh-CN

Response Parameters:

None

30-Day Fee Statistics

{
"success": true,
"code": 0,
"data": {
"totalFee": 0,
"saveFee": 0
}
}
  • GET api/v1/private/account/asset_book/order_deal_fee/total

Required Permission: View Account Details

Request Parameters:

None

Response Parameters:

ParameterTypeDescription
totalFeedecimalTotal fees (4 decimals), default 0
saveFeedecimalSaved fees (4 decimals), default 0

Fee Details Under a Specific Contract

{
"success": true,
"code": 0,
"data": [
{
"contractId": 10,
"symbol": "BTC_USDT",
"isMaxLeverage": true,
"isZeroFeeRate": true,
"maxLeverage": 500,
"countryConfigContractMaxLeverage": 0,
"takerFeeRate": 0,
"makerFeeRate": 0,
"feeRateMode": "TIERED",
"leverageFeeRates": [],
"tieredFeeRates": [
{
"takerFeeRate": 0,
"makerFeeRate": 0,
"minTieredDealAmount": 0,
"maxTieredDealAmount": 10000000
},
{
"takerFeeRate": 0.0004,
"makerFeeRate": 0.0001,
"minTieredDealAmount": 10000001
}
],
"tieredDealAmount": 164,
"tieredEffectiveDay": 0,
"tieredAppointContract": true,
"tieredExcludeContractId": true,
"tieredContractIds": [10, 77, 1104],
"tieredExcludeZeroFee": false,
"statisticType": "FIXED",
"fixedStartTime": 1760544000000,
"fixedEndTime": 1763049600000,
"agentFee": false
}
]
}
  • GET api/v1/private/account/contract/fee_rate

Required Permission: View Account Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseTrading pair

Response Parameters:

ParameterTypeDescription
isZeroFeeRatebooleanZero-fee tag: true = zero-fee; false = not zero-fee
contractIdintContract ID
symbolstringTrading pair
maxLeverageintMaximum leverage
feeRateModestringFee mode: LEVERAGE / NORMAL / TIERED
takerFeeRatedecimalTaker fee
makerFeeRatedecimalMaker fee
leverageFeeRateslistLeverage fee list (present when feeRateMode = LEVERAGE)
tieredFeeRateslistTiered fee list (present when feeRateMode = TIERED)
tieredDealAmountdecimalTrading amount
tieredEffectiveDayintEffective days
tieredAppointContractbooleanSpecify contracts; false: not specified; true: specified
tieredExcludeContractIdbooleanfalse: not included; true: included
tieredContractIdsstringContract ID list, e.g., [10,11]
tieredExcludeZeroFeebooleanExclude zero-fee trading amount; false: do not exclude; true: exclude
statisticTypestringStatistic dimension for tiered trading amount: ROLLING / FIXED
fixedStartTimelongStart time for FIXED mode
fixedEndTimelongEnd time for FIXED mode

Zero-Fee Trading Pairs

{
"success": true,
"code": 0,
"data": {
"contracts": [
{
"contractId": 10,
"ifHotTag": false
}
],
"hotRecs": []
}
}
  • GET api/v1/private/account/contract/zero_fee_rate

Required Permission: View Order Details

Request Parameters:

ParameterTypeRequiredDescription
symbolstringfalseTrading pair

Response Parameters:

ParameterTypeDescription
contractslistZero-fee trading pairs; e.g., [{"contractId": <id>}]