Spot
Public
Security: None
Test Connectivity
GET
https://openapi.xxx.xx/sapi/v1/ping
This endpoint checks connectivity to the host
Check Server Time
GET
https://openapi.xxx.xx/sapi/v1/time
This endpoint checks connectivity to the server and retrieves server timestamp
Pairs List
GET
https://openapi.xxx.xx/sapi/v1/symbols
weight(IP/UID): 1
Response:
symbol | string |
| Name of the symbol | Currency to name | |
baseAsset | string |
| Underlying asset for the symbol | base currency | |
quoteAsset | string |
| Quote asset for the symbol | The base currency | |
pricePrecision | integer |
| Precision of the price | Price Accuracy | |
quantityPrecision | integer |
| Precision of the quantity | Quantity accuracy |
Market
Security Type: None
Depth
GET
https://openapi.xxx.xx/sapi/v1/depth
market detpth data
Query Parameters
Name | Type | Description |
---|---|---|
limit | integer | Default 100; Max 100 |
symbol* | String | Symbol Name E.g. BTCUSDT |
weight(IP/UID): 5
Response:
time | long |
| Current timestamp (ms) |
bids | list | ; | List of all bids, best bids first. See below for entry details. |
asks | list | ; | List of all asks, best asks first. See below for entry details. |
The fields bids and asks are lists of order book price level entries, sorted from best to worst.
' ' | float |
| price level |
' ' | float |
| The total quantity of orders for this price level |
24hrs ticker
GET
https://openapi.xxx.xx/sapi/v1/ticker
24 hour price change statistics.
Query Parameters
Name | Type | Description |
---|---|---|
symbol* | String | Symbol Name. E.g. |
weight(IP/UID): 5
Response:
time | long |
| Open Time | |
high | float |
| High Price | |
low | float |
| Low Price | |
open | float |
| Open Price | |
last | float |
| Last Price | |
vol | float |
| Trade Volume | |
rose | float | 0 | Price increase or Price rise |
Recent Trades List
GET
https://openapi.xxx.xx/sapi/v1/trades
Query Parameters
Name | Type | Description |
---|---|---|
symbol* | String | Symbol Name. E.g. |
limit | String | Default 100; Max 1000Responses200 |
weight(IP/UID): 5
Response:
price | float |
| The price of the trade | |
time | long |
| Current timestamp (ms) | |
qty | float |
| The quantity traded | |
side | string |
| Taker side |
Kline/candlestick data
GET
https://openapi.xxx.xx/sapi/v1/klines
Query Parameters
Name | Type | Description |
---|---|---|
symbol* | Symbol Name. E.g. | |
interval* | String | Interval of the Kline. Possible values include: |
Default 100; Max 300 | String | Default 100; Max 300Responses200 |
startTime | long | startTime example: |
endTime | long | endTime example: |
weight(IP/UID): 1
Response:
| long |
| Open time | |
open | float |
| open price | |
close | float |
| close price | |
high | float |
| high price | |
low | float |
| low price | |
vol | float |
| volume |
Trade
Security Type: TRADE
Endpoints under Trade require an API Key and a signature
New Order
POST
https://openapi.xxx.xx/sapi/v1/order
Rate Limit: 100times/2s
Query Parameters
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | Sign |
X-CH-APIKEY | string | Your API-key |
X-CH-TS | integer | timestamp |
Request Body
Name | Type | Description |
---|---|---|
symbol* | String | Symbol Name. E.g. |
volume* | number | Order vol. For MARKET BUY orders, vol=amount. |
side* | String | Side of the order, |
type* | String | Type of the order, |
price* | number | Order price, REQUIRED for LIMIT orders |
newClientOrderId | String | Unique order ID generated by users to mark their orders |
recvwindow | integer | Time window |
weight(IP/UID): 5
Response:
orderId | long |
| ID of the order | |
clientorderId | string |
| A unique ID of the order. | |
symbol | string |
| Symbol Name | |
transactTime | integer |
| Time the order is placed | |
price | float |
| Time the order is placed | |
origQty | float |
| Quantity ordered | |
executedQty | float |
| Quantity of orders that has been executed | |
type | string |
| Order type | |
side | string |
| Order side: | |
status | string |
| 0 = new order |
Test New Order
POST
https://openapi.xxx.xx/sapi/v1/order/test
Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send the order into the matching engine.
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestamp |
X-CH-SIGN | String | Sign |
Request Body
Name | Type | Description |
---|---|---|
type* | String | Type of the order, |
price* | number | Order price, REQUIRED for |
volume* | number | Order vol. For MARKET BUY orders, vol=amount. |
side* | String | Side of the order, |
symbol* | String | Symbol Name. E.g. |
recvwindow | integer | Time window |
newClientorderId | String | Unique order ID generated by users to mark their orders |
weight(IP/UID): 1
Batch Orders
POST
https://openapi.xxx.xx/sapi/v1/batchOrders
batch contains at most 10 orders
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestamp |
X-CH-SIGN | String | Sign |
Request Body
Name | Type | Description |
---|---|---|
orders | number | The batch order information can contain a maximum of 10 records.
|
symbol* | String | Symbol Name. E.g. |
weight(IP/UID): 10
Resquest orders
field:
orders
field:name | type | Example | Description |
---|---|---|---|
price | folat | 1000 | Price |
volume | folat | 20.1 | Quantity |
side | String | BUY/SELL | Direction |
batchType | String |
| Type |
Resquest
idsString | String | “3213213” | A collection of order numbers of type String. |
---|---|---|---|
ids | integer | 2100 | Collection of order numbers. |
Query Order
GET
https://openapi.xxx.xx/sapi/v1/order
Query Parameters
Name | Type | Description |
---|---|---|
orderId* | String | Order ID |
newClientorderId | String | Client Order Id, Unique order ID generated by users to mark their orders. E.g. 354444heihieddada |
symbol* | String | Symbol Name. E.g. |
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestampResponses200 |
X-CH-SIGN | String | Sign |
weight(IP/UID): 1
Response:
orderId | long |
| Order ID (system generated) | |
clientorderId | string |
| Order ID (sent by yourself) | |
symbol | string |
| Currency Pair Name | |
price | float |
| Order Price | |
origQty | float |
| Number of orders | |
executedQty | float |
| Number of orders already filled | |
avgPrice | float |
| Average price of orders already filled | |
type | string | limit | The order type | |
side | string |
| Order direction. Possible values can only be: BUY (buy long) and SELL (sell short) | |
status | string |
| Order status. Possible values are NEW (new order, no transaction), PARTIALLY_FILLED (partially filled), FILLED (fully filled), CANCELED (cancelled) and REJECTED (order rejected).POST | |
transactTime | string | 1574327555669 | Order Creation Time |
Cancel Order
POST
https://openapi.xxx.xx/sapi/v1/cancel
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestamp |
X-CH-SIGN | String | Sign |
Request Body
Name | Type | Description |
---|---|---|
newClientOrderId | String | Client Order Id, Unique order ID generated by users to mark their orders. E.g. 354444heihieddada |
orderId* | String | Order ID |
symbol* | String | Symbol Name. E.g. |
weight(IP/UID): 5
Response:
orderId | long |
| ID of the order | |
clientorderId | string |
| Unique ID of the order. | |
symbol | string |
| Name of the symbol | |
status | string |
| The state of the order.Possible values include |
Batch cancel orders
POST
https://openapi.xxx.xx/sapi/v1/batchCancel
batch contains at most 10 orders
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestamp |
X-CH-SIGN | String | Sign |
Request Body
Name | Type | Description |
---|---|---|
orderIds | String | Order ID collection |
symbol* | String | Symbol Name. E.g. |
weight(IP/UID): 10
Current Open Orders
GET
https://openapi.xxx.xx/sapi/v1/openOrders
Query Parameters
Name | Type | Description |
---|---|---|
symbol* | String | Symbol Name. E.g. |
limit | String | Default 100; Max 1000 |
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestamp |
X-CH-SIGN | String | Sign |
weight(IP/UID): 1
Response:
orderId | long |
| ID of the order | |
orderIdString | string | " | Character String Type Order ID (Recommended) | |
clientorderId | string |
| Unique ID of the order. | |
symbol | string |
| Name of the symbol | |
price | float |
| Price of the order | |
origQty | float |
| Quantity ordered | |
executedQty | float |
| Quantity of orders that has been executed | |
avgPrice | float |
| Average price of filled orders. | |
type | string |
| The order type | |
side | string |
| The order side | |
status | string |
| The state of the order.Possible values include | |
time | string | 1574327555669 | Creation Time |
Trades
GET
https://openapi.xxx.xx/sapi/v1/myTrades
Query Parameters
Name | Type | Description |
---|---|---|
symbol* | String | Symbol Name. E.g. |
limit | String | Default 100; Max1000 |
fromId | String | Trade Id to fetch from |
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestamp |
X-CH-SIGN | String | Sign |
weight(IP/UID): 1
Response:
symbol | string |
| Name of the symbol |
id | integer |
| Trade ID |
bidId | long |
| Bid Order ID |
askId | long |
| Ask Order ID |
price | integer |
| Price of the trade |
qty | float |
| Quantiry of the trade |
time | number |
| timestamp of the trade |
isBuyer | bool |
|
|
isMaker | bool |
|
|
feeCoin | string |
| Trading fee coin |
fee | number |
| Trading fee |
bidUserId | long | 23334 | Buyer UID |
askUserId | long | 44112 | Seller UID |
isSelf | bool | true | whether is self dealt |
Account
Security Type: USER_DATA
Endpoints under Account require an API-key and a signature.
Account Information
GET
https://openapi.xxx.xx/sapi/v1/account
Headers
Name | Type | Description |
---|---|---|
X-CH-APIKEY | String | Your API-key |
X-CH-TS | String | timestamp |
X-CH-SIGN | String | Sign |
weight(IP/UID): 1
Response:
name | type | description |
---|---|---|
| [] | Show balance details |
balances
field:
name | type | example | description |
---|---|---|---|
| string |
| Name of the asset |
| float | 1000.30 | Amount available for use |
| float | 400 | Amount locked (for open orders) |
Last updated