Futures API
Position type true = cross, false = isolated
Position leverage 1~upper limit
OK
POST /v1/contracts/positions/{symbol}/settings HTTP/1.1
Host: dex-api.benpay.com/
Content-Type: application/json
Accept: */*
Content-Length: 27
{
"cross": true,
"leverage": 1
}OK
textMargin to add or remove, negative means remove
OK
POST /v1/contracts/positions/{symbol}/margin HTTP/1.1
Host: dex-api.benpay.com/
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"addMargin": 1
}OK
textCustom client OrderID, optional
Order type: LIMIT = limit order, MARKET = market order
Order direction LONG, SHORT
Trading pair, e.g. XBTC
Order price
Order quantity
FOK (Fill or Kill) flag fully filled or canceled
IOC (Immediate or Cancel) flag execute immediately or cancel
PostOnly flag maker only
Hidden flag
ReduceOnly flag reduce position only, will not open reverse position
OK
POST /v1/contracts/orders HTTP/1.1
Host: dex-api.benpay.com/
Content-Type: application/json
Accept: */*
Content-Length: 188
{
"clientOrderId": "text",
"type": "LIMIT",
"direction": "LONG",
"symbol": "text",
"price": 1,
"quantity": 1,
"fillOrKill": true,
"immediateOrCancel": true,
"postOnly": true,
"hidden": true,
"reduceOnly": true
}OK
text""OK
POST /v1/contracts/orders/cancel HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}OK
GET /v1/contracts/positions HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": [
{
"id": "text",
"symbolId": 1,
"userId": 1,
"cross": true,
"leverage": 1,
"riskLevel": 1,
"maxQuantity": 1,
"margin": 1,
"realizedPNL": 1,
"symbol": "text",
"liquidationPrice": 1,
"createdAt": 1,
"updatedAt": 1,
"direction": "LONG",
"quantity": 1,
"entryPrice": 1,
"minimumMaintenanceMarginRate": 1,
"empty": true
}
],
"error": "text",
"errorField": "text",
"errorMessage": "text"
}OK
GET /v1/contracts/positions/{symbol} HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"id": "text",
"symbolId": 1,
"userId": 1,
"cross": true,
"leverage": 1,
"riskLevel": 1,
"maxQuantity": 1,
"margin": 1,
"realizedPNL": 1,
"symbol": "text",
"liquidationPrice": 1,
"createdAt": 1,
"updatedAt": 1,
"direction": "LONG",
"quantity": 1,
"entryPrice": 1,
"minimumMaintenanceMarginRate": 1,
"empty": true
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}OK
GET /v1/contracts/orders/{orderId} HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"id": 1,
"clientOrderId": "text",
"sequenceId": 1,
"baseCurrencyId": 1,
"quoteCurrencyId": 1,
"userId": 1,
"symbolId": 1,
"quantity": 1,
"unfilledQuantity": 1,
"type": "LIMIT",
"status": "PENDING",
"direction": "LONG",
"features": 1,
"fillPrice": 1,
"price": 1,
"makerFeeRate": 1,
"takerFeeRate": 1,
"fee": 1,
"createdAt": 1,
"updatedAt": 1,
"frozenMargin": 1,
"frozenQuantity": 1,
"finalStatus": true
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}OK
GET /v1/contracts/orders/{orderId}/matches HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": [
{
"taker": true,
"price": 1,
"quantity": 1,
"fee": 1,
"createdAt": 1
}
],
"error": "text",
"errorField": "text",
"errorMessage": "text"
}OK
GET /v1/contracts/orders/open HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": [
{
"id": 1,
"clientOrderId": "text",
"sequenceId": 1,
"baseCurrencyId": 1,
"quoteCurrencyId": 1,
"userId": 1,
"symbolId": 1,
"quantity": 1,
"unfilledQuantity": 1,
"type": "LIMIT",
"status": "PENDING",
"direction": "LONG",
"features": 1,
"fillPrice": 1,
"price": 1,
"makerFeeRate": 1,
"takerFeeRate": 1,
"fee": 1,
"createdAt": 1,
"updatedAt": 1,
"frozenMargin": 1,
"frozenQuantity": 1,
"finalStatus": true
}
],
"error": "text",
"errorField": "text",
"errorMessage": "text"
}OK
GET /v1/contracts/orders/open/{orderId} HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"id": 1,
"clientOrderId": "text",
"sequenceId": 1,
"baseCurrencyId": 1,
"quoteCurrencyId": 1,
"userId": 1,
"symbolId": 1,
"quantity": 1,
"unfilledQuantity": 1,
"type": "LIMIT",
"status": "PENDING",
"direction": "LONG",
"features": 1,
"fillPrice": 1,
"price": 1,
"makerFeeRate": 1,
"takerFeeRate": 1,
"fee": 1,
"createdAt": 1,
"updatedAt": 1,
"frozenMargin": 1,
"frozenQuantity": 1,
"finalStatus": true
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}""""0100OK
GET /v1/contracts/orders/closed HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"hasMore": true,
"nextOffsetId": 1,
"results": [
{
"id": 1,
"clientOrderId": "text",
"sequenceId": 1,
"baseCurrencyId": 1,
"quoteCurrencyId": 1,
"userId": 1,
"symbolId": 1,
"quantity": 1,
"unfilledQuantity": 1,
"type": "LIMIT",
"status": "PENDING",
"direction": "LONG",
"features": 1,
"fillPrice": 1,
"price": 1,
"makerFeeRate": 1,
"takerFeeRate": 1,
"fee": 1,
"createdAt": 1,
"updatedAt": 1,
"frozenMargin": 1,
"frozenQuantity": 1,
"finalStatus": true
}
],
"range": "text"
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}Query range (data shard)
202502Trading pair name
XBTCDirection. LONG/SHORT/empty string
LONGStart time in milliseconds
0LExample: 1738339200000End time in milliseconds
0LExample: 1739894400000Order ID offset (nextOffsetId from last query)
0Example: 0Page size
0Example: 100OK
GET /v1/contracts/match/clearings HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"hasMore": true,
"nextOffsetId": 1,
"results": [
{
"orderId": 1,
"counterOrderId": 1,
"type": "TAKER",
"sequenceId": 1,
"userId": 1,
"counterUserId": 1,
"symbolId": 1,
"price": 1,
"quantity": 1,
"direction": "LONG",
"feeCurrencyId": 1,
"fee": 1,
"orderCreatedAt": 1,
"createdAt": 1
}
],
"range": "text"
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}Query range (data shard)
202502Start time in milliseconds
0LExample: 1738339200000End time in milliseconds
0LExample: 1739894400000Order ID offset (nextOffsetId from last query)
0Example: 0Page size
0Example: 100OK
GET /v1/contracts/fund/flows HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"hasMore": true,
"nextOffsetId": "text",
"results": [
{
"createdAt": 1,
"type": "text",
"changed": 1,
"currencyId": 1,
"symbolId": 1
}
],
"range": "text"
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}""0OK
GET /v1/contracts/fee/rate HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"taker": 1,
"maker": 1,
"timestamp": 1
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}""""""0100OK
GET /v1/contracts/clearings/positions HTTP/1.1
Host: dex-api.benpay.com/
Accept: */*
OK
{
"success": true,
"data": {
"hasMore": true,
"nextOffsetId": 1,
"results": [
{
"id": 1,
"orderId": 1,
"counterOrderId": 1,
"userId": 1,
"counterUserId": 1,
"symbolId": 1,
"sequenceId": 1,
"direction": "LONG",
"type": "OPEN",
"clearingPrice": 1,
"fee": 1,
"rate": 1,
"quantityChanged": 1,
"quantityAfterClearing": 1,
"realizedPNLChanged": 1,
"createdAt": 1
}
],
"range": "text"
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}Last updated