Contract Trades Endpoints
Last updated
Last updated
Rate Limit:10 requests per second
HTTP Requests new order
POST /api/swap/v3/order/placeOrder
Request Parameter
Parameters | Type | Required | Description |
---|---|---|---|
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests Place multiple orders
POST /api/swap/v3/order/batchOrders
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per seconds
HTTP Requests request to cancel order
POST /api/swap/v3/order/cancel_order
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per seconds
HTTP Requests Cancel multiple orders
POST /api/swap/v3/order/cancel_batch_orders
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests get the order details by order id
GET /api/swap/v3/order/detail
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests Get order history commission
GET /api/swap/v3/order/history
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests Get the current order of the order
GET /api/swap/v3/order/current
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests get transaction details
GET /api/swap/v3/order/fills
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests New trigger order
POST /api/swap/v3/order/plan_order
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests Cancel trigger order
POST /api/swap/v3/order/cancel_plan
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests Get current trigger orders
GET /api/swap/v3/order/currentPlan
Request Parameter
Response:
Response Filed
Rate Limit:10 requests per second
HTTP Requests Get The History Of Trigger Order
GET /api/swap/v3/order/historyPlan
Request Parameter
Response:
Response Filed
Field | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Parameters | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Parameters | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
Parameters | Type | Required | Description |
---|---|---|---|
Filed | Description |
---|---|
symbol
String
Yes
Contract name
client_oid
String
Yes
Custom order number (not more than 40 characters, and cannot be special characters, such as Martian characters, etc.), can not be repeated in the pending order. If vacant, the system will automatically assign value
size
String
Yes
Quantity to buy or sell (value not equal to 0 or negative)
type
String
Yes
1:Open long, 2:Open short,3: Close long,4: Close short
order_type
String
Yes
0: Normal order (Unfilled and 0 imply normal limit order) 1: Post only 2: Fill or Kill 3: Immediate Or Cancel
match_price
String
Yes
0 Limit price
1 market price
price
String
Yes
price
presetTakeProfitPrice
BigDecimal
Yes
Preset take profit price
presetStopLossPrice
BigDecimal
Yes
Preset stop Loss Price
client_oid
Client ID
order_id
Order ID
symbol
String
Yes
Contract name
orderDataList
List
Yes
Object attributes, e.g (price=5,size=2,type=1,match_price=1,order_type=1,client_oid="abc"),The fields refer to the [Contract trading] endpoints, and can only process up to 20 orders in batch
result
Contract name
client_oid
Client ID
order_id
Order ID
symbol
String
Yes
Contract name
orderId
String
Yes
Order ID
symbol
Contract name
order_id
Order id
client_oid
Client id
result
Cancellation status
symbol
String
Yes
Contract name
ids
List
Yes
Order id combination
symbol
Contract name
result
Processing result
order_ids
Orders
order_id
Order id
err_code
Error code
err_msg
Error message
symbol
String
Yes
Contract name
orderId
String
Yes
Order id
symbol
Contract name
size
The amount in this order
timestamp
System time
client_oid
Client id
createTime
Creation time
filled_qty
The amount which has been filled
fee
Transaction fee
order_id
Order id
price
The limit price of limit order
price_avg
Average filled price
status
Order status -1 Cancelled successful 0 submitted 1partial-filled 2filled
type
Commission type, 1,Open long 2 Open short 3 Close long 4 Close short 5 Buy limit 6Sell limit 7.Long close agreement 8. Short close agreement 9. Forced liquidity long 10 Forced liquidity short
order_type
Order Type 0. Normal limit order 1. Only be Maker (Post only)"2 Fill or Kill (FOK) 3. Immediate or Cancel (IOC)
totalProfits
Total profit and loss
symbol
String
Yes
Contract name
pageIndex
String
Yes
Page number, empty default first page, starting from 1
pageSize
String
Yes
Number of data per page
createDate
Integer
Yes
Number of days (the number of days must be less than or equal to 90, cannot be a negative number)
symbol
Contract name
size
The amount in this order
client_oid
Client id
createTime
Creation time
filled_qty
The amount which has been filled
fee
Transaction fee
order_id
Order id
price
The limit price of limit order
price_avg
Average filled price
status
Order status -1 Cancelled successful 0 submitted 1partial-filled 2filled
type
Commission type, 1,Open long 2 Open short 3 Close long 4 Close short 5 Buy limit 6Sell limit 7.Long close agreement 8. Short close agreement 9. Forced liquidity long 10 Forced liquidity short
order_type
Order Type 0. Normal limit order 1. Only be Maker (Post only)"2 Fill or Kill (FOK) 3. Immediate or Cancel (IOC)
totalProfits
Total profit and loss
symbol
String
Yes
Contract name
symbol
Contract name
size
The amount in this order
client_oid
Client id
createTime
Creation time
filled_qty
The amount which has been filled
fee
Transaction fee
order_id
Order id
price
The limit price of limit order
price_avg
Average filled price
status
Order status -1 Cancelled successful 0 submitted 1partial-filled 2filled
type
Commission type, 1,Open long 2 Open short 3 Close long 4 Close short 5 Buy limit 6Sell limit 7.Long close agreement 8. Short close agreement 9. Forced liquidity long 10 Forced liquidity short
order_type
Order Type 0. Normal limit order 1. Only be Maker (Post only)"2 Fill or Kill (FOK) 3. Immediate or Cancel (IOC)
totalProfits
Total profit and loss
symbol
String
Yes
Contract name
orderId
String
Yes
Order id
symbol
Contract name
trade_id
Trade Id
order_id
Order id
price
Deal price
order_qty
Quantity
fee
transaction fee
timestamp
Creation time
exec_type
Liquidity direction Taker or maker (T or M)
delegateType
Commission type, 1,Open long 2 Open short 3 Close long 4 Close short 5 Buy limit 6Sell limit 7.Long close agreement 8. Short close agreement 9. Forced liquidity long 10 Forced liquidity short
symbol
String
Yes
Contract name
client_oid
String
Yes
not more than 40 characters, and cannot be special characters, such as Martian characters, etc.
size
String
Yes
Quantity to buy or sell (value not equal to 0 or negative))
type
String
Yes
1 Open position
2 Close position
holdSide
String
Yes
Position Direction
1 Long,2 Short
match_type
String
Yes
Order Type
0 Limit price;1 market price
execute_price
String
Yes
execute price
trigger_price
String
Yes
trigger price
client_oid
Client ID
order_id
trigger order id
symbol
String
Yes
Contract name
orderId
String
Yes
order id
order_id
Order id
client_oid
Client id
result
Status of cancellation
err_code
Code of cancellation
err_msg
Reason of cancellation
symbol
String
Yes
Contract name
delegateType
String
Yes
Commission type 1 Open long 2 Open short 3 Close long 4 Close short
pageIndex
String
Yes
Current page (1-200)
pageSize
String
Yes
Number per page(1-100)
startTime
String
Yes
Query start time
endTime
String
Yes
Query stop time
symbol
Contract name
nextPage
Next page
execute_count
Amount of Stop
delegate_count
Wmount of Limit
create_time
Created time
update_time
Updated time
direction
Direction 1.Open long 2.Open short 3 Close long 4 Close short
direction_desc
1.Open long 2.Open short 3 Close long 4 Close short
trigger_price
Trigger price
execute_price
Execute price
order_id
Order id
order_type
Order Type
0 Limit price;1 market price
status
Status 1: waiting to order 2: order placing 3: failed status 4 under cancellation
status_desc
1: waiting to order 2: order placing 3: failed status 4 under cancellation
create_trade_price
Executed trade price
symbol
String
Yes
Contract name
delegateType
String
Yes
Commission type 1 Open long 2 Open short 3 Close long 4 Close short
pageIndex
String
Yes
current page(1-200)
pageSize
String
Yes
Number per page(1-100)
startTime
String
No
Query start time
endTime
String
No
Query end time
symbol
Contract name
nextPage
Next page
execute_count
amount of limit
delegate_count
amount of order
create_time
Created time
update_time
Updated time
direction
Direction 1.Open long 2.Open short 3 Close long 4 Close short
direction_desc
Direction
trigger_price
trigger price
execute_price
execute price
order_id
Order ID
order_type
0 Limit price
1 Market price
status
1: waiting to order 2: order placing 3: failed status 4 under cancellation
status_desc
description of 1: waiting to order 2: order placing 3: failed status 4 under cancellation
create_trade_price
Executed trade price