Spot
Terminology
base asset
refers to the asset that is thequantity
of a symbol.quote asset
refers to the asset that is theprice
of a symbol.
Symbol status:
TRADING
HALT
BREAK
Order status:
NEW
PARTIALLY_FILLED
FILLED
CANCELED
PENDING_CANCEL
REJECTED
Order types:
LIMIT
MARKET
Order side:
BUY
SELL
Time in force:
GTC
IOC
FOK
Kline/Candlestick chart intervals:
m -> minutes h -> hours d -> days w -> weeks M -> months
1m
5m
15m
30m
1h
2h
4h
6h
8h
12h
1d
1w
1M
Rate limiters (rateLimitType)
REQUESTS_WEIGHT
ORDERS
Rate limit intervals
SECOND
MINUTE
DAY
For example:
Public
Security Type: None
Endpoints under Public section can be accessed freely without requiring any API-key or signatures.
Test connectivity
Test connectivity to the Rest API.
Weight: 0
Parameters: NONE
Response:
Check server time
Test connectivity to the Rest API and get the current server time.
Weight: 0
Parameters: NONE
Response:
Cryptoasset trading pairs
a summary on cryptoasset trading pairs available on the exchange
Weight: 1
Parameters: None
Response:
Market
Security Type: None
Endpoints under Market section can be accessed freely without requiring any API-key or signatures.
Broker information
Current broker trading rules and symbol information
Weight: 0
Parameters:
type
STRING
NO
Trade section information. Possible values include token
, options
, and contracts
. If the parameter is not sent, all trading information will be returned.
Response:
Depth
Weight: Adjusted based on the limit:
5, 10, 20, 50, 100
1
500
5
1000
10
Parameters:
symbol
STRING
YES
limit
INT
NO
Default 100; max 100.
Caution: setting limit=0 can return a lot of data.
Response:
Merged depth (recommended)
This endpoint retrieve market depth data (not full depth). This endpoint updates every 300ms.
Parameters:
symbol
STRING
YES
limit
INT
NO
Default 40; max 40.
Response:
Recent trades list
Get recent trades (up to last 60).
Weight: 1
Parameters:
symbol
STRING
YES
limit
INT
NO
Default 500; max 1000.
Response:
Kline/candlestick data
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time. If startTime and endTime are not sent, the most recent klines are returned.
Weight: 1
Parameters:
symbol
STRING
YES
Symbol Name
interval
ENUM
YES
Interval of the Kline. Possible values include: 1m
, 5m
, 15m
, 30m
, 1h
, 1d
, 1w
, 1M
startTime
LONG
NO
Starting timestamp (ms)
endTime
LONG
NO
Ending timestamp (ms)
limit
INT
NO
Default 500; max 1000.
If startTime and endTime are not sent, the most recent klines are returned.
Response:
24hr ticker price change statistics
24 hour price change statistics. Careful when accessing this with no symbol.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Parameters:
symbol
STRING
NO
Symbol Name. E.g. BTCUSDT
If the symbol is not sent, tickers for all symbols will be returned in an array.
Response:
OR
Symbol price ticker
Latest price for a symbol or symbols.
Weight: 1
Parameters:
symbol
STRING
NO
If the symbol is not sent, prices for all symbols will be returned in an array.
Response:
OR
Symbol orderbook ticker
Best price/quantity on the order book for a symbol or symbols.
Weight: 1
Parameters:
symbol
STRING
NO
Symbol Name. E.g. BTCUSDT
If the symbol is not sent, bookTickers for all symbols will be returned in an array.
Response:
OR
Trade
Security Type: USER_DATA/TRADE
Endpoints under Trade require an API-key and a signature.
New order
Send in a new order.
Weight: 1
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
symbol
STRING
YES
Symbol Name. E.g. BTCUSDT
quantity
DECIMAL
YES
Order quantity. For MARKET BUY orders, quantity=amount
side
ENUM
YES
Side of the order, BUY/SELL
type
ENUM
YES
Type of the order, LIMIT/MARKET/LIMIT_MAKER
timeInForce
STRING
NO
Time in force. Possible values include GTC
(Default), FOK
, IOC
price
DECIMAL
NO
Order price, REQUIRED for LIMIT
orders
newClientOrderId
STRING
NO
A unique id for the order. Automatically generated if not sent.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
Test new order
Test new order creation and signature/recvWindow length. Creates and validates a new order but does not send it into the matching engine.
Weight: 1
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
symbol
STRING
YES
Symbol Name. E.g. BTCUSDT
quantity
DECIMAL
YES
Order quantity. For MARKET BUY orders, quantity=amount
side
ENUM
YES
Side of the order, BUY/SELL
type
ENUM
YES
Type of the order, LIMIT/MARKET/LIMIT_MAKER
timeInForce
STRING
NO
Time in force. Possible values include GTC
(Default), FOK
, IOC
price
DECIMAL
NO
Order price, REQUIRED for LIMIT
orders
newClientOrderId
STRING
NO
A unique id for the order. Automatically generated if not sent.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
Query order
Check an order's status.
Weight: 1
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
orderId
LONG
NO
Order Id. E.g. 507904211109878016
clientOrderId
STRING
NO
Client Order Id, Unique order ID generated by users to mark their orders. E.g. 12094ahsihsiad
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Notes:
Either
orderId
orclientOrderId
must be sent.For some historical orders
cummulativeQuoteQty
will be < 0, meaning the data is not available at this time.
Response:
Cancel order
Cancel an active order.
Weight: 1
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
orderId
LONG
NO
Order Id. E.g. 507904211109878016
clientOrderId
STRING
NO
Client Order Id, Unique order ID generated by users to mark their orders. E.g. 12094ahsihsiad
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Notes:
Either
orderId
orclientOrderId
must be sent.
Response:
Current open orders
GET all open orders on a symbol. Careful when accessing this with no symbol.
Weight: 1
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
symbol
STRING
NO
Symbol Name. E.g. BTCUSDT
orderId
LONG
NO
Order Id. E.g. 507904211109878016
limit
INT
NO
Default 500; max 1000.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Notes:
If
orderId
is set, it will get orders < thatorderId
. Otherwise most recent orders are returned.
Response:
History orders
Get all history orders. Careful when accessing this with no symbol.
Weight: 5
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
symbol
STRING
NO
Symbol Name. E.g. BTCUSDT
orderId
LONG
NO
Order Id. E.g. 507904211109878016
startTime
LONG
NO
Start time (ms)
endTime
LONG
NO
End time (ms)
limit
INT
NO
Default 500; max 1000.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Notes:
If
orderId
is set, it will get orders < thatorderId
. Otherwise most recent orders are returned.
Response:
Trades
Get historyical trades
Weight: 5
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
symbol
STRING
NO
Symbol Name. E.g. BTCUSDT
startTime
LONG
NO
Start time (ms)
endTime
LONG
NO
End time (ms)
fromId
LONG
NO
TradeId to fetch from.
toId
LONG
NO
TradeId to fetch to.
limit
INT
NO
Default 500; max 1000.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Notes:
If only
fromId
is set,it will get orders < thatfromId
in descending order.If only
toId
is set, it will get orders > thattoId
in ascending order.If
fromId
is set andtoId
is set, it will get orders < thatfromId
and > thattoId
in descending order.If
fromId
is not set andtoId
it not set, most recent order are returned in descending order.
Response:
Account
Security Type: USER_DATA/TRADE
Endpoints under Account require an API-key and a signature.
Account information
GET current account information (balances)
Weight: 5
Headers:
X-ACE-KEY
STRING
YES
Your API key
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
Account deposit information
GET deposit orders for a specific account.
Weight: 5
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
startTime
LONG
NO
Start time (ms)
endTime
LONG
NO
End time (ms)
fromId
LONG
NO
Deposit orderId to fetch from. Default gets the most recent deposit orders.
limit
INT
NO
Default 500; max 1000.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Notes:
If
fromId
is set, it will get orders > thatfromId
. Otherwise most recent orders are returned.
Response:
Account withdrawal information
GET withdrawal orders for a specific account.
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
token
STRING
NO
Token name. Default: All tokens.
startTime
LONG
NO
Start time (ms)
endTime
LONG
NO
End time (ms)
fromId
LONG
NO
Query from this OrderId. Defaults to latest records.
limit
INT
NO
Default 500; max 1000.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
1
BROKER_AUDITING_STATUS
Processing by broker
2
BROKER_REJECT_STATUS
Rejected by broker
3
AUDITING_STATUS
Processing by platform
4
AUDIT_REJECT_STATUS
Reject by platform
5
PROCESSING_STATUS
Processing by wallet
6
WITHDRAWAL_SUCCESS_STATUS
Withdrawal success
7
WITHDRAWAL_FAILURE_STATUS
Withdrawal failed
8
BLOCK_MINING_STATUS
Blockchain mining
Withdrawal detail
GET withdrawal info
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
orderId
LONG
NO
Either orderId or clientOrderId must be sent
clientOrderId
STRING
NO
Either orderId or clientOrderId must be sent
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
Get Sub-account list
Get your main-account and sub-accounts
Headers:
X-ACE-KEY
STRING
YES
Your API key
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Weight: 5
Response:
Internal account transfer
Internal transfer are permitted using this endpoint
Weight: 1
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
fromAccountType
INT
NO
Source account type: 1. token trading account 2. Options account 3. Contracts account
fromAccountIndex
INT
NO
Sub-account index (valid when using main-account api, get sub-account indices from /subAccount/query
endpoint)
toAccountType
INT
NO
Target account type: 1. token trading account 2. Options account 3. Contracts account
toAccountIndex
INT
NO
Sub-account index(valid when using main-account api, get sub-account indices from /subAccount/query
endpoint)
tokenId
STRING
YES
Token Id. E.g. BTC
, ETH
, XRP
amount
INT
YES
Amount of token(s) to be transferred
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
Explanation
Either transferring or receiving account must be the main account (Token trading account)
Main-account API can support transferring to other account(including sub-accounts) and receiving from other accounts
Sub-account API only supports transferring from current account to the main-account. Therefore
fromAccountType\fromAccountIndex\toAccountType\toAccountIndex
should be left empty.
Withdraw
Withdraw to external address
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
tokenId
STRING
YES
TokenId. E.g. BTC
、 ETH
...
clientOrderId
STRING
YES
Id generated from broker side, to prevent double withdrawal
address
STRING
YES
Withdrawal address (Note: the withdrawal address must be in current tag list in your PC/APP client)
addressExt
STRING
NO
EOS tag
withdrawalQuantity
STRING
Withdrawal amount
chainType
STRING
NO
chain type, USDT chain types are OMNI
ERC20
TRC20
default is OMNI
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
Check balance flow
Check balance flow for a specified account
Weight: 5
Headers:
X-ACE-KEY
STRING
YES
Your API key
Query Parameters:
accountType
INT
NO
Account type: 1. token trading account 2.Options account 3. Contracts account
accountIndex
INT
NO
Sub-account index(valid when using main-account api, get sub-account indices from /subAccount/query
endpoint)
tokenId
STRING
NO
Token Id. E.g. BTC
, ETH
, XRP
fromFlowId
LONG
NO
FlowId to start from
endFlowId
LONG
NO
FlowId to end with
startTime
LONG
NO
Time to start from
endTime
LONG
NO
Time to end with
limit
INT
NO
Number of entries returned. Default 500, max 500.
Body Parameters:
signature
STRING
YES
Authentication is needed for this endpoint
timestamp
LONG
YES
Current unix timestamp(ms)
recvWindow
LONG
NO
RecvWindow for this request.
Response:
Explanation
Main-account API can query balance flow for token account and other accounts (including sub-accounts, or designated
accountType
andaccountIndex
accounts)Sub-account API can only query current sub-account, therefore
accountType
andaccountIndex
is not required.
Balance flow types
General Balance Flow
TRADE
1
trades
General Balance Flow
FEE
2
trading fees
General Balance Flow
TRANSFER
3
transfer
General Balance Flow
DEPOSIT
4
deposit
Derivatives
PNL
28
PnL from contracts
Derivatives
SETTLEMENT
30
Settlement
Derivatives
FUNDING_SETTLEMENT
32
Funding fee settlement
Campaign
INVITATION_REFERRAL_BONUS
68
User rebates