Skip to content

Order

Quick Start

Restful API

Public Interface

User Interface

Order Interface

WebSocket API

WebSocket Introduction

Public Interface

User Interface

Order Interface


1. Place order

Sign

HTTP Request

POST: /api/spot/v1/order/place_order

Parameters

Name Type Required Notes
side number Y Side (1 Sell 2 Buy)
type number Y Order Type(1:Limit 2:Market)
volume string Y when put limit order, volume means base coin's quantity,
when put market order, volume means quote coin's quantity
price string Y Price
symbol string Y Trading pair

Returned Data

Name Type Required Notes
code number Y Error code
msg string Y Description
data object N Order details

Data

Name Type Required Notes
orderId string Y Order ID
side number Y Side (1 Sell 2 Buy)
type number Y Order Type(1:Limit 2:Market)
volume string Y Amount
price string Y Price
symbol string Y Trading pair
placeStatus string Y Whether the order was successful or not, 1 Success

2. Batch Order

Sign

HTTP Request

POST: /api/spot/v1/order/place_order/batch

Parameters

Name Type Required Notes
orderList object[] Y Batch Order

orderList

Name Type Required Notes
side number Y Side (1 Sell 2 Buy)
type number Y Order Type(1:Limit 2:Market)
volume string Y when put limit order, volume means base coin's quantity,
when put market order, volume means quote coin's quantity
price string Y Price
symbol string Y Trading pair

Returned Data

Name Type Required Notes
code number Y Error code
msg string Y Description
data object[] N Batch order details

data

Name Type Required Notes
orderId string Y Order ID
side number Y Side (1 Sell 2 Buy)
type number Y Order Type(1:Limit 2:Market)
volume string Y Amount
price string Y Price
symbol string Y Trading pair
placeStatus string Y Whether the order was successful or not, 1 Success

3. Cancel order / Batch cancel

Sign

HTTP Request

POST: /api/spot/v1/order/cancel

Parameters

Name Type Required Notes
orderIdList object[] Y Orders cancelled

orderIdList

Name Type Required Notes
orderId string Y Order ID
symbol string Y Pairs

Returned Data

Name Type Required Notes
code number Y Error code
msg string Y Description
data object N

4. Query matching orders

Sign

HTTP Request

POST: /api/spot/v1/order/deal/list

Parameters

Name Type Required Notes
orderId string Y Order ID
symbol string Y Trading Pair

Returned Data

Name Type Required Notes
code number Y Error code
msg string Y Description
data object N Order details

data

Name Type Required Notes
volume string Y Amount
price string Y Price
fee string Y Fee
feeCoin string Y Token of fees
role string Y Role(1-Maker 2-Taker)
ctime string Y Filled time(ISO8601)
id string Y Matching Order id

5. Query order history

Sign

HTTP Request

POST: /api/spot/v1/order/history/page

Parameters

Name Type Required Notes
page number N Page number
pageSize number N Display amount
startTime string N Order creation starting time(ISO8601)
endTime string N Order cereation ending time (ISO8601)
status string N Order status(1 Unfilled,2 Filled,3 Partially filled,4 Cancelled,7 Partially filled/Canceled)
side string N Side (1Sell2Buy)
type string N Order type(1 Limit, 2 Market)
symbol string Y Trading pair

Returned Data

Name Type Required Notes
code number Y Error code
msg string Y Description
data object N Order details

data

Name Type Required Notes
total number Y Total number
pageNum string Y Page number
pageSize object N Items displayed
data object[] N Order details

data

Name Type Required Notes
orderId string Y Order ID
userId string Y UID
orderType string Y Order type,1.Limit,2.Market
amount string Y Total value (Quote token)
dealAmount string Y Filled quantity
volume string Y Filled value (Quote token)
leftAmount string Y Remaining value (Quote token)
volume string Y Order qty (Base token)
dealVolume string Y Filled qty (Base token)
leftVolume string Y Remaining qty (Base token)
status string Y Order status(1 Unfilled,2 Filled,3 Partially filled,4 Cancelled,7 Partially filled/Canceled)
type string Y 1.Limit,2.Market
side string Y Side (1 Sell 2 Buy)
price string Y Order price
avgPrice string Y Avg price
progress string Y Filled percentage Unit:1% 15.8 means 15.8%
ctime string Y Order creation time
utime string Y Order edit time
base string Y Base token
quote string Y Quote token
symbol string Y Trading pair
fee string Y Fee
feeCoin string Y Token of fee

6. Query current orders

Sign

HTTP Request

POST: /api/spot/v1/order/pending/list

Parameters

Name Type Required Notes
symbol string Y Trading pair

Returned Data

Name Type Required Notes
code number Y Error code
msg string Y Description
data object N Order details

data

Name Type Required Notes
orderId string Y Order ID
userId string Y UID
orderType string Y Order type,1.Limte,2.Market
amount string Y Total value (Quote token)
dealAmount string Y Filled qty
volume string Y Filled value (Quote token)
leftAmount string Y Remaining value (Quote token)
volume string Y Order qty (Base token)
dealVolume string Y Filled qty (Base token)
leftVolume string Y Remaining qty (Base token)
status string Y Order status(1 Unfilled,2 Filled,3 Partially filled,4 Cancelled,7 Partially filled/Canceled)
type string Y 1.Limite,2.Market
side string Y Side (1 Sell 2 Buy)
price string Y Price
avgPrice string Y Average price
progress string Y Filled percentage Unit:1% 15.8 means 15.8%
ctime string Y Order creation time
utime string Y Order edit time
base string Y Base token
quote string Y Quote token
symbol string Y Trading Pair
fee string Y Fee
feeCoin string Y Token of fee