现货接口
Body
clientOrderIdstringOptional
客户端自定义OrderID,可不填
typestring · enumOptionalPossible values:
订单类型: LIMIT=限价单, MARKET=市价单
directionstring · enumOptionalPossible values:
订单方向:LONG, SHORT
symbolstringOptional
订单交易对,例如:XBTC
pricenumberOptional
订单价格
quantitynumberOptional
订单数量
fillOrKillbooleanOptional
FOK(Fill or Kill)标志:完全成交或全部取消
immediateOrCancelbooleanOptional
IOC(Immediate or Cancel)标志:立即执行或取消
postOnlybooleanOptional
PostOnly标志:仅做市
hiddenbooleanOptional
Hidden标志:是否隐藏
Responses
200
OK
application/json
Responsestring
post
POST /v1/spots/orders HTTP/1.1
Host: dex-api.benpay.com
Content-Type: application/json
Accept: */*
Content-Length: 170
{
"clientOrderId": "text",
"type": "LIMIT",
"direction": "LONG",
"symbol": "text",
"price": 1,
"quantity": 1,
"fillOrKill": true,
"immediateOrCancel": true,
"postOnly": true,
"hidden": true
}
200
OK
text
Path parameters
orderIdinteger · int64Required
Responses
200
OK
*/*
get
GET /v1/spots/orders/{orderId} HTTP/1.1
Host: dex-api.benpay.com
Accept: */*
200
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,
"immediateOrCancel": true,
"fillOrKill": true,
"postOnly": true,
"symbol": "text",
"finalStatus": true
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}
Path parameters
orderIdinteger · int64Required
Responses
200
OK
*/*
get
GET /v1/spots/orders/{orderId}/matches HTTP/1.1
Host: dex-api.benpay.com
Accept: */*
200
OK
{
"success": true,
"data": [
{
"taker": true,
"price": 1,
"quantity": 1,
"fee": 1,
"createdAt": 1
}
],
"error": "text",
"errorField": "text",
"errorMessage": "text"
}
Responses
200
OK
*/*
get
GET /v1/spots/orders/open HTTP/1.1
Host: dex-api.benpay.com
Accept: */*
200
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,
"immediateOrCancel": true,
"fillOrKill": true,
"postOnly": true,
"symbol": "text",
"finalStatus": true
}
],
"error": "text",
"errorField": "text",
"errorMessage": "text"
}
Path parameters
orderIdinteger · int64Required
Responses
200
OK
*/*
get
GET /v1/spots/orders/open/{orderId} HTTP/1.1
Host: dex-api.benpay.com
Accept: */*
200
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,
"immediateOrCancel": true,
"fillOrKill": true,
"postOnly": true,
"symbol": "text",
"finalStatus": true
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}
Query parameters
rangestringOptionalExample:
查询范围,如2025年2月传入:202502
202502
symbolstringOptionalExample:
交易对名称
BTC_USD
fromMillisnumberOptionalDefault:
起始时间毫秒数
0
Example: 1738339200000
toMillisnumberOptionalDefault:
结束时间毫秒数
0
Example: 1739894400000
offsetIdnumberOptionalDefault:
订单id偏移量(上次查询返回的nextOffsetId)
0
Example: 0
limitnumberOptionalDefault:
分页大小
0
Example: 100
Responses
200
OK
*/*
get
GET /v1/spots/orders/closed HTTP/1.1
Host: dex-api.benpay.com
Accept: */*
200
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,
"immediateOrCancel": true,
"fillOrKill": true,
"postOnly": true,
"symbol": "text",
"finalStatus": true
}
],
"range": "text"
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}
Query parameters
rangestringOptionalExample:
查询范围(数据分片)
202502
symbolstringOptionalExample:
交易对名称
BTC_USD
directionstringOptionalExample:
方向.LONG/SHORT/空字符串
LONG
fromMillisnumberOptionalDefault:
起始时间毫秒数
0L
Example: 1738339200000
toMillisnumberOptionalDefault:
结束时间毫秒数
0L
Example: 1739894400000
offsetIdnumberOptionalDefault:
订单id偏移量(上次查询返回的nextOffsetId)
0
Example: 0
limitnumberOptionalDefault:
分页大小
0
Example: 100
Responses
200
OK
*/*
get
GET /v1/spots/match/clearings HTTP/1.1
Host: dex-api.benpay.com
Accept: */*
200
OK
{
"success": true,
"data": {
"hasMore": true,
"nextOffsetId": 1,
"results": [
{
"id": 1,
"orderId": 1,
"userId": 1,
"sequenceId": 1,
"direction": "LONG",
"type": "MAKER",
"matchPrice": 1,
"matchQuantity": 1,
"orderStatusAfterClearing": "PENDING",
"orderUnfilledQuantityAfterClearing": 1,
"feeCurrency": "text",
"fee": 1,
"rate": 1,
"createdAt": 1,
"symbol": "text"
}
],
"range": "text"
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}
Query parameters
symbolstringOptionalDefault:
""
timestampinteger · int64OptionalDefault:
0
Responses
200
OK
*/*
get
GET /v1/spots/fee/rate HTTP/1.1
Host: dex-api.benpay.com
Accept: */*
200
OK
{
"success": true,
"data": {
"taker": 1,
"maker": 1,
"timestamp": 1
},
"error": "text",
"errorField": "text",
"errorMessage": "text"
}
Last updated