Change Log
2019-12-23
Rest API
- Add interface get all orders
/api/v1/contract/batchOrder (HMAC SHA256)
get all orders.
2019-10-28
websocket
- Optimize websocket to make connections more stable
- It is recommended to use the combined streams method for connection. Each combined stream can subscribe to a maximum of 10 streams
2019-10-22
Rest API
- New contract order type:
stopLimit
,profitLimit
- User can preset the Take profit/Stop command with the trigger price, commission price, and commission quantity in advance. When the corresponding “indicator” satisfies the trigger price set by the user, the order will be triggered, then the system will submit an order according to the price and quantity set by the user
Trigger price of condition order must be:
Take Profit
- Long: when it's bullish, set the trigger price higher than the latest price (or mark price, index), you can set the sell Take profit order;
- Short: If it's bearish, set the trigger price below the latest price (or mark price, index), you can set the buy Take profit order;
Stop
- Long: when it's bearish, set the trigger price below the latest price (or mark the price, index), you can set the sell Stop order;
- Short: If it's bullish, set the trigger price higher than the latest price (or mark the price, index),you can set the buy Stop order;
When the trigger price = the latest price (or mark price, index), or no position, the Take profit/Stop order can not be set;
2019-10-15
- Document update
- Increase the log of document updates
- Add updates to frequently asked questions
2019-10-14
- Rest API
- Maximum 200 open orders per contract per account;
- Maximum 10 stop profit or stop orders per contract per account;
- When placing a new order that causes these caps to be exceeded, it will be rejected with the message “has reach max order number [200|10]
2019-10-11
- Rest API
- Add interface cancel all orders
/api/v1/contract/batchOrder (HMAC SHA256)
cancel all orders - Add interface Contract bill of obtained account
//api/v1/contract/userHistoricalTrades
Contract bill of obtained account
2019-09-27
Rest API
- New
intervalLetter
values for headers:- SECOND => S
- MINUTE => M
- HOUR => H
- DAY => D
- New Headers
X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)
will give your current used request weight for the (intervalNum)(intervalLetter) rate limiter. For example, if there is a one minute request rate weight limiter set, you will get aX-MBX-USED-WEIGHT-1M
header in the response. The legacy headerX-MBX-USED-WEIGHT
will still be returned and will represent the current used weight for the one minute request rate weight limit. - New Header
X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)
that is updated on any valid order placement and tracks your current order count for the interval; rejected/unsuccessful orders are not guaranteed to haveX-MBX-ORDER-COUNT-**
headers in the response.- Eg.
X-MBX-ORDER-COUNT-1S
for "orders per 1 second" andX-MBX-ORDER-COUNT-1D
for orders per "one day"
- Eg.
- GET api/v1/depth now supports
limit
5000 and 10000; weights are 50 and 100 respectively. - GET api/v1/exchangeInfo has a new parameter
ocoAllowed
.
General API
General API Information
- The base endpoint is: https://www.jex.com
- All endpoints return either a JSON object or array.
- Data is returned in ascending order. Oldest first, newest last。
- All time and timestamp related fields are in milliseconds
- HTTP
4XX
return codes are used for malformed requests; the issue is on the sender's side - HTTP
429
return code is used when breaking a request rate limit. - HTTP
418
return code is used when an IP has been auto-banned for continuing to send requests after receiving429
codes. - HTTP
5XX
return codes are used for internal errors; the issue is on jex's side. It is important to NOT treat this as a failure operation; the execution status is UNKNOWN and could have been a success. - Any endpoint can return an ERROR; the error payload is as follows:
{
"code": -1121,
"msg": "Invalid symbol."
}
- Specific error codes and messages defined in another document.
- For
GET
endpoints, parameters must be sent as aquery string
. - For
POST
,PUT
, andDELETE
endpoints, the parameters may be sent as aquery string
or in therequest body
with content typeapplication/x-www-form-urlencoded
. You may mix parameters between both thequery string
andrequest body
if you wish to do so. - Parameters may be sent in any order.
- If a parameter sent in both the
query string
andrequest body
, thequery string
parameter will be used.
LIMITS
- New intervalLetter values for headers:
- SECOND => S
- MINUTE => M
- HOUR => H
- DAY => D
- The
/api/v1/exchangeInfo
rateLimits
array contains objects related to the exchange'sRAW_REQUEST
, symbol accuracy,REQUEST_WEIGHT
, andORDER
rate limits. These are further defined in theENUM definitions
section underRate limiters (rateLimitType)
. - When a 429 is recieved, it's your obligation as an API to back off and not spam the API
- Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (http status 418).
- IP bans are tracked and scale in duration for repeat offenders, from 2 minutes to 3 days
- New Headers
X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)
will give your current used request weight for the (intervalNum)(intervalLetter) rate limiter. For example, if there is a one minute request rate weight limiter set, you will get aX-MBX-USED-WEIGHT-1M
header in the response. The legacy headerX-MBX-USED-WEIGHT
will still be returned and will represent the current used weight for the one minute request rate weight limit - New Header
X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)
that is updated on any valid order placement and tracks your current order count for the interval; rejected/unsuccessful orders are not guaranteed to haveX-MBX-ORDER-COUNT-**
headers in the response。- Eg.
X-MBX-ORDER-COUNT-1S
for "orders per 1 second" andX-MBX-ORDER-COUNT-1D
for orders per "one day"
- Eg.
- A
Retry-After
header is sent with a 418 or 429 responses and will give the number of seconds required to wait, in the case of a 418, to prevent a ban, or, in the case of a 429, until the ban is over.。 - Wrong order accuracy does not allow ordering
Order Count Limits * To keep an orderly market, jex imposes limits on the number of open orders per account. These limits are: * Maximum 200 open orders per contract per account; * Maximum 10 stop profit or stop orders per contract per account; * When placing a new order that causes these caps to be exceeded, it will be rejected with the message “has reach max order number [200|10]”.
Other instructions The number of contract orders sells for API is uniformly negative
Endpoint security type
- Each endpoint has a security type that determines the how you will interact with it
- API-keys are passed into the Rest API via the
X-JEX-APIKEY
header - API-keys and secret-keys are case sensitive
- API-keys can be configured to only access certain types of secure endpoints. For example, one API-key could be used for TRADE only, while another API-key can access everything except for TRADE routes.
Security Type | Description |
---|---|
NONE | Endpoint can be accessed freely. |
TRADE | Endpoint requires sending a valid API-Key and signature |
USER_DATA | Endpoint requires sending a valid API-Key and signature. |
USER_STREAM | Endpoint requires sending a valid API-Key. |
MARKET_DATA | Endpoint requires sending a valid API-Key. |
SIGNED (TRADE and USER_DATA) Endpoint security
SIGNED
endpoints require an additional parameter,signature
, to be sent in thequery string
orrequest body
.- Endpoints use
HMAC SHA256
signatures. TheHMAC SHA256 signature
is a keyedHMAC SHA256
operation. Use yoursecretKey
as the key andtotalParams
as the value for the HMAC operation. - The
signature
is not case sensitive. totalParams
is defined as thequery string
concatenated with therequest body
.- The parameters of signature must be transmitted in the order of interface documents.
Timing security
* A SIGNED
endpoint also requires a parameter, timestamp
, to be sent which
should be the millisecond timestamp of when the request was created and sent.
* An additional parameter, recvWindow
, may be sent to specify the number of
milliseconds after timestamp
the request is valid for. If recvWindow
is not sent, it defaults to 5000.
* The logic is as follows:
javascript
if (timestamp < (serverTime + 1000) && (serverTime - timestamp) <= recvWindow) {
// process request
} else {
// reject request
}
Serious trading is about timing. Networks can be unstable and unreliable,
which can lead to requests taking varying amounts of time to reach the
servers. With recvWindow
, you can specify that the request must be
processed within a certain number of milliseconds or be rejected by the
server.
- POST /api/v1/spot/order Examples for POST
Here is a step-by-step example of how to send a vaild signed payload from the
Linux command line using
echo
,openssl
, andcurl
.
Key | Value |
---|---|
apiKey | vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A |
secretKey | NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j |
Parameters | Value |
---|---|
symbol | LTCBTC |
side | BUY |
type | LIMIT |
timeInForce | GTC |
quantity | 1 |
price | 0.1 |
recvWindow | 5000 |
timestamp | 1499827319559 |
Example 1: As a query string
- queryString: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559
- HMAC SHA256 signature:
[linux]$ echo -n "symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"
(stdin)= c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71
- curl command:
(HMAC SHA256)
[linux]$ curl -H "X-JEX-APIKEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A" -X POST 'https://www.jex.com/api/v1/order?symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71'
Example 2: As a request body
- requestBody: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559
- HMAC SHA256 signature:
[linux]$ echo -n "symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"
(stdin)= c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71
- curl command:
(HMAC SHA256)
[linux]$ curl -H "X-JEX-APIKEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A" -X POST 'https://www.jex.com/api/v1/order' -d 'symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=c8db56825ae71d6d79447849e617115f4a920fa2acdcab2b053c4b2838bd6b71'
Example 3: Mixed query string and request body
- queryString: symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC
- requestBody: quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559
- HMAC SHA256 signature:
[linux]$ echo -n "symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTCquantity=1&price=0.1&recvWindow=5000×tamp=1499827319559" | openssl dgst -sha256 -hmac "NhqPtmdSJYdKjVHjA7PZj4Mge3R5YNiP1e3UZjInClVN65XAbvqqM6A7H5fATj0j"
(stdin)= 0fd168b8ddb4876a0358a8d14d0c9f3da0e9b20c5d52b2a00fcf7d1c602f9a77
- curl command:
(HMAC SHA256)
[linux]$ curl -H "X-JEX-APIKEY: vmPUZE6mv9SD5VNHk4HlWFsOr6aKE2zvsw0MuIgwCIPy6utIco14y7Ju91duEh8A" -X POST 'https://www.jex.com/api/v1/order?symbol=LTCBTC&side=BUY&type=LIMIT&timeInForce=GTC' -d 'quantity=1&price=0.1&recvWindow=5000×tamp=1499827319559&signature=0fd168b8ddb4876a0358a8d14d0c9f3da0e9b20c5d52b2a00fcf7d1c602f9a77'
Note that the signature is different in example 3. There is no & between "GTC" and "quantity=1".
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.
ENUM definitions
Symbol status (status):
- PRE_TRADING
- TRADING
- POST_TRADING
- END_OF_DAY
- HALT
- AUCTION_MATCH
- BREAK
Symbol type:
- SPOT
- OPTION
- CONTRACT
spot and option Order status (status):
- NEW
- PARTIALLY_FILLED
- FILLED
- CANCELED
- PENDING_CANCEL (currently unused))
- FAIL
- CANCLEFILLED
- REJECTED (currently unused)
- EXPIRED (currently unused)
contract status (status):
- ENTRUSTED
- ENTRUSTING
- FAIL
- PARTFILLED
- FILLED
- CANCEL
Order types (orderTypes, type):
- LIMIT
- MARKET
- STOPLIMIT
- STOPMARKET
- PROFITLIMIT
- PROFITMARKET
Order side (side):
- BUY
- SELL
Time in force:
- GTC - Good Till Cancel
- IOC - Immediate or Cancel
- FOK - Fill or Kill
Kline/Candlestick chart intervals:
m -> minutes; h -> hours; d -> days; w -> weeks; M -> months
- 1m
- 3m
- 5m
- 15m
- 30m
- 1h
- 2h
- 4h
- 6h
- 12h
- 1d
- 1w
Rate limiters (rateLimitType)
- REQUESTS_WEIGHT
- ORDERS
- RAW_REQUESTS
Rate limit intervals (interval)
- SECOND
- MINUTE
- DAY
Endpoints for futures account
- transfer
- fee
- funding
- closPosition
- liquidation
- adl
- autoMargin
- positionSize
General endpoints
Test connectivity PING
GET /api/v1/ping
Test connectivity
Weight: 1
Parameters: NONE
Response
{}
Check server time
GET /api/v1/time
Get the current server time.
Weight: 1
Parameters: NONE
Response
{
"serverTime": 1499827319595
}
Exchange information
GET /api/v1/exchangeInfo
Get the current trading rules and symbol information
Weight: 1
Parameters: NONE
Response
{
"timezone": "UTC",
"serverTime": 1551270414646,
"rateLimits": [
{
"rateLimitType": "requestsWeight",
"interval": "minute",
"intervalNum": 1,
"limit": 1200
},
{
"rateLimitType": "orders",
"interval": "second",
"intervalNum": 1,
"limit": 10
},
{
"rateLimitType": "orders",
"interval": "day",
"intervalNum": 1,
"limit": 100000
},
{
"rateLimitType": "rawRequests",
"interval": "minute",
"intervalNum": 5,
"limit": 5000
}
],
"optionSymbols": [
{
"symbol": "BTCCALLM",
"status": "TRADING",
"baseAsset": "月BTC看涨0226",
"baseAssetPrecision": 0,
"quoteAsset": "USDT",
"quotePrecision": 2,
"orderTypes": [
"LIMIT"
],
"icebergAllowed": false,
"filters": [
{
"filterType": "PRICE_FILTER",
"maxPrice": "100000"
},
{
"filterType": "LOT_SIZE",
"minQty": "0.00000000"
}
]
}
],
"contractSymbols": [
{
"symbol": "BTCUSDT",
"status": "TRADING",
"baseAsset": "btc",
"baseAssetPrecision": 4,
"quoteAsset": "usdt",
"quotePrecision": 0,
"orderTypes": [
"LIMIT",
"MARKET"
],
"icebergAllowed": false,
"filters": [
{
"filterType": "PRICE_FILTER",
"minPrice": "0.00000001000000000000",
"maxPrice": "1000000.00000000000000000000"
},
{
"filterType": "LOT_SIZE",
"minQty": "0.00010000000000000000",
"maxQty": "1000000.00000000000000000000"
}
]
}
],
"spotSymbols": [
{
"symbol": "DASHUSDT",
"status": "TRADING",
"baseAsset": "DASH",
"baseAssetPrecision": 4,
"quoteAsset": "USDT",
"quotePrecision": 2,
"orderTypes": [
"LIMIT"
],
"icebergAllowed": false,
"filters": [
{
"filterType": "PRICE_FILTER",
"maxPrice": "100000"
},
{
"filterType": "LOT_SIZE",
"minQty": "1.00000000"
}
]
}
]
}
Depth information for spot
GET /api/v1/spot/depth
Weight:1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
limit | INT | NO | Default 60; Max 60. Available:[5, 10, 20, 50, 60] |
Response
{
"lastUpdateId": 1027024,
"bids": [
[
"4.00000000", // PRICE
"431.00000000", // QTY
[] // IGNORE.
]
],
"asks": [
[
"4.00000200",
"12.00000000",
[]
]
]
}
Recent trades for spot
GET /api/v1/spot/trades
Get recent trades
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
limit | INT | NO | Default 60; max 60. |
Response
[
{
"price": "81.230000000000000000",
"qty": "0.001000000000000000",
"time": 0
},
{
"price": "81.230000000000000000",
"qty": "0.000400000000000000",
"time": 0
},
{
"price": "81.240000000000000000",
"qty": "0.001100000000000000",
"time": 0
}
]
Old trade lookup (MARKET_DATA)
GET /api/v1/spot/historicalTrades
Weight: 5
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
limit | INT | NO | Default 200; max 500. |
fromId | LONG | NO | TradeId to fetch from. Default gets most recent trades. |
Response
[
{
"id": "3489",
"price": "0.00001457",
"qty": "6",
"time": 1551129538000,
"buyerMaker": false
},
{
"id": "3488",
"price": "0.00001464",
"qty": "2",
"time": 1551129500000,
"buyerMaker": true
}
]
Kline/Candlestick data
GET /api/v1/spot/klines
Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
interval | ENUM | YES | "1m":minute"3m": minute"5m": minute"15m":minute"30m":minute"1h":hour"2h":hour"4h":hour"6h":"12h":hour"1d":day"3d":day"1w":week |
startTime | LONG | NO | |
endTime | LONG | NO | |
limit | INT | NO | Default 500; max 1000. |
- If startTime and endTime are not sent, the most recent klines are returned.
Response
[
[
1499040000000, // Open time
"0.01634790", // Open
"0.80000000", // High
"0.01575800", // Low
"0.01577100", // Close
"148976.11427815", // Volume
1499644799999, // Close time
"2434.19055334", // Quote asset volume
308, // Number of trades
"1756.87402397", // Taker buy base asset volume
"28.46694368", // Taker buy quote asset volume
"17928899.62484339" // Ignore
]
]
Current average price
GET /api/v1/spot/avgPrice
Weight: 1 Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES |
Response
{
"mins": 5,
"price": "9.35751834"
}
24hr ticker price change statistics
GET /api/v1/spot/ticker/24hr
24 hour rolling window price change statistics. Careful when accessing this with no symbol.
Weight: 1 for a single symbol; 40 when the symbol parameter is omitted
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | NO |
Response
{
"symbol": "BNBBTC",
"priceChange": "1.00000000",
"priceChangePercent": "50.00000000",
"weightedAvgPrice": "1.88",
"lastPrice": "3.00000000",
"bidPrice": "1.00000000",
"bidQty": "5.00000000",
"askPrice": "3.00000000",
"askQty": "9.00000000",
"openPrice": "2.00000000",
"highPrice": "18.00000000",
"lowPrice": "1.00000000",
"volume": "8.00000000",
"quoteVolume": "15.00000000",
"openTime": 1551174049782,
"closeTime": 1551173957144
}
OR
[
{
"symbol": "BNBBTC",
"priceChange": "1.00000000",
"priceChangePercent": "50.00000000",
"weightedAvgPrice": "1.88",
"lastPrice": "3.00000000",
"bidPrice": "1.00000000",
"bidQty": "5.00000000",
"askPrice": "3.00000000",
"askQty": "9.00000000",
"openPrice": "2.00000000",
"highPrice": "18.00000000",
"lowPrice": "1.00000000",
"volume": "8.00000000",
"quoteVolume": "15.00000000",
"openTime": 1551174049782,
"closeTime": 1551173957144
}
]
Price ticker for spot
GET /api/v1/spot/ticker/price
Back to newest price
Weight: 1 for a single symbol; 2 when the symbol parameter is omitted
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | NO |
- If the symbol is not sent, prices for all symbols will be returned in an array.
Response
{
"symbol": "LTCBTC",
"price": "4.00000200"
}
OR
[
{
"symbol": "LTCBTC",
"price": "4.00000200"
},
{
"symbol": "ETHBTC",
"price": "0.07946600"
}
]
Symbol order book ticker for spot
GET /api/v1/spot/ticker/bookTicker
Best price/qty on the order book for a symbol or symbols.
Weight: 1 for a single symbol; 2 when the symbol parameter is omitted
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | NO |
- If the symbol is not sent, prices for all symbols will be returned in an array.
Response
{
"symbol": "LTCBTC",
"bidPrice": "4.00000000",//Best price for buy
"bidQty": "431.00000000",//QTY
"askPrice": "4.00000200",//Best price for sell
"askQty": "9.00000000"//QTY
}
OR
[
{
"symbol": "LTCBTC",
"bidPrice": "4.00000000",
"bidQty": "431.00000000",
"askPrice": "4.00000200",
"askQty": "9.00000000"
},
{
"symbol": "ETHBTC",
"bidPrice": "0.07946700",
"bidQty": "9.00000000",
"askPrice": "100000.00000000",
"askQty": "1000.00000000"
}
]
Account endpoints
Place order in coins transaction(TRADE)
POST /api/v1/spot/order (HMAC SHA256)
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
side | ENUM | YES | |
type | ENUM | YES | LIMIT |
quantity | DECIMAL | YES | |
price | DECIMAL | YES | |
newOrderRespType | ENUM | NO | Specify response type ACK , RESULT ; Default is ACK . |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Two choices for newOrderRespType
Response ACK: Returning speed is fast, trading information not included, less information
Response
{
"symbol": "JEXBTC",
"orderId": 28,
"transactTime": 1507725176595
}
Response RESULT: Returning speed is slow, returning some information on taking order transaction
Response
{
"symbol": "JEXBTC",
"orderId": 2208,
"transactTime": 1551184078060,
"price": "0.00001464",
"origQty": "1",
"executedQty": "0",
"cummulativeQuoteQty": "0.00000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY"
}
Test placing order API of coins transaction(TRADE)
POST /api/v1/spot/order/test (HMAC SHA256)
Used for test placing order request, won’t be submitted to matchmaking trading engine
Weight: 1
Parameters:
Reference POST /api/v1/spot/order
Response
{}
Check orders of coins transaction(USER_DATA)
GET /api/v1/spot/order (HMAC SHA256)
Check order status
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | YES | |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
{
"symbol": "JEXBTC",
"orderId": "2208",
"price": "0.00001464",
"origQty": "1.00000000",
"executedQty": "1.00000000",
"cummulativeQuoteQty": "0.00001464",
"status": "FILLED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"time": 1551184037000,
"updateTime": 1551184037000,
"working": true
}
Cancel order for coins transaction(TRADE)
DELETE /api/v1/spot/order (HMAC SHA256)
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | YES | |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
{
"symbol": "JEXBTC",
"orderId": 75,
"transactTime": 1551238738296,
"price": "0.00001407",
"origQty": "4",
"executedQty": "0",
"cummulativeQuoteQty": "0.00000000",
"status": "CANCELED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY"
}
Check entry orders of coins transaction of this account(USER_DATA)
GET /api/v1/spot/openOrders (HMAC SHA256)
Weight:
5
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | NO | Only orders after this orderID will be returned. Only partial recent orders will be returned |
startTime | LONG | NO | |
endTime | LONG | NO | |
limit | INT | NO | Default 500; max 500. |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
[
{
"symbol": "JEXBTC",
"orderId": "76",
"price": "0.00001406",
"origQty": "5.00000000",
"executedQty": "0.00000000",
"cummulativeQuoteQty": "0.00000000",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"time": 1550659007000,
"updateTime": 1550659007000,
"working": true
}
]
Account information(USER_DATA)
GET /api/v1/account (HMAC SHA256)
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
{
"updateTime": 1523093528000
"contractBalances": [
{
"asset": "usdt",
"canDeposit": false,
"canTrade": true,
"canWithdraw": false,
"free": "8144.0412",
"locked": "1855.3288"
}
],
"optionBalances": [
{
"asset": "BCXBTC01",
"canDeposit": false,
"canTrade": true,
"canWithdraw": false,
"free": "0",
"locked": "0"
}
],
"spotBalances": [
{
"asset": "BTC",
"canDeposit": true,
"canTrade": true,
"canWithdraw": false,
"free": "999616.1363",
"locked": "0.7219"
}
],
}
Historical coins entry order of the account (USER_DATA)
GET /api/v1/spot/historyOrders (HMAC SHA256)
Obtain trading history of specified trading pair
Weight: 5
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | YES | |
orderId | LONG | NO | Only orders after this orderID will be returned. Only partial recent orders will be returned |
startTime | LONG | NO | |
endTime | LONG | NO | |
limit | INT | NO | Default 500; max 500. |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
[
{
"symbol": "JEXBTC",
"orderId": "15",
"price": "0.00001490",
"origQty": "3.00000000",
"executedQty": "3.00000000",
"cummulativeQuoteQty": "0.00004470",
"status": "FILLED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"time": 1550643800000,
"updateTime": 1550644851000,
"working": true
}
]
User data
User’s assets (USER_DATA)
GET /wapi/v1/assetDetail
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
{
"ADC": {
"minWithdrawAmount": 0,
"withdrawFee": "0",
"depositStatus": true,
"withdrawStatus": false
},
"ATT": {
"minWithdrawAmount": 10,
"withdrawFee": "[0.01]",
"depositStatus": false,
"withdrawStatus": false
}
}
Depositing address of the user(USER_DATA)
GET /wapi/v1/depositAddress
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
asset | STRING | YES | |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
{
"address": "chongzhidizhichongzhidizhi",
"asset": "BTC",
"success": true
}
Historical depositing records of the user (USER_DATA)
GET /wapi/v1/depositHistory
Weight: 5
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
asset | STRING | NO | |
status | int | NO | 0:pending,1:success |
startTime | LONG | NO | |
endTime | LONG | NO | |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
[
{
"insertTime": 1530096910000,
"amount": 1,
"asset": "BTC",
"address": "chongzhidizhichongzhidizhi",
"txId": "g3jrglkelmrioqnfmkcmxcmkllfemfkmfmseme",
"status": 2
},
{
"insertTime": 1530096910000,
"amount": 1,
"asset": "BTC",
"address": "chongzhidizhichongzhidizhi",
"txId": "gjrglkel4mrioqnfmkcmxcmkllfemfkmfmseme",
"status": 2
}
]
Service fee of the trading (USER_DATA)
GET /wapi/v1/tradeFee
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
symbol | STRING | NO | |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
[
{
"symbol": "DASHUSDT",
"maker": -0.001,
"taker": -0.001
},
{
"symbol": "BTCUSDT",
"maker": -0.1,
"taker": -0.1
}
]
Historical withdrawal records of the user(USER_DATA)
GET /wapi/v1/withdrawHistory
Weight: 5
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
asset | STRING | NO | |
status | INT | NO | 0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6Completed |
startTime | LONG | NO | |
endTime | LONG | NO | |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
Response
{
"withdrawRecordList": [
{
"id": "20F13F5291908F81",
"amount": 1,
"address": "swswsdgsdwesdfwsdw",
"asset": "BTC",
"txId": "g3jrglkelmrioqnfmkcmxcmkllfemfkmfmseme",
"applyTime": 1551339300000,
"status": 4
},
{
"id": "AAEAAECD5F890E47",
"amount": 1,
"address": "swswsdgsdwesdfwsdw",
"asset": "BTC",
"txId": "g3jrglkelmrioqnfmkcmxcmkllfemfkmfmseme",
"applyTime": 1551340680000,
"status": 4
}
],
"success": true
}
User Data Streams
- The base API endpoint is: https://www.jex.com
- A User Data Stream
listenKey
is valid for 60 minutes after creation. - Doing a
PUT
on alistenKey
will extend its validity for 60 minutes. - Doing a
DELETE
on alistenKey
will close the stream. - The base websocket endpoint is: wss://ws.jex.com
- User Data Streams are accessed at /ws/<listenKey>
- A single connection to stream.jex.com is only valid for 24 hours; expect to be disconnected at the 24 hour mark
User data stream payloads are not guaranteed to be in order during heavy periods; make sure to order your updates using E
Specifics on how user data streams work.
For detailed subscription method, please refer to another websocket document.
Start user data stream (USER_STREAM)
POST /api/v1/userDataStream
Start a new user data stream. The stream will close after 60 minutes unless a keepalive is sent.
Weight: 1
Parameters: NONE
Response
{
"listenKey": "pqia91ma19a5s61cv6a81va65sdf19v8a65a1a5s61cv6a81va65sdf19v8a65a1" //用于订阅的数据流名
}
Keepalive (USER_STREAM)
PUT /api/v1/userDataStream
Keepalive a user data stream to prevent a time out. User data streams will close after 60 minutes. It's recommended to send a ping about every 30 minutes.
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
listenKey | STRING | YES |
Response
{}
Close user data stream (USER_STREAM)
DELETE /api/v1/userDataStream
Weight: 1
Parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
listenKey | STRING | YES |
Response
{}
Account updates
- Event type of account updates is fixed to
accountSpotInfo
ANDaccountOptionInfo
ANDaccountContractInfo
They respectively refers to the asset related event of spot, options and futures. When there is a change of asset, relevant event will be pushed
Response
{
"e": "accountSpotInfo", // Event type
"E": 1499405658849, // Event time
"m": 0, // Fee rate of entry order
"t": 0, // Fee rate of taking order
"u": 1499405658848, // Time stamp of
"B": [ // Balance
{
"a": "LTC", // Asset name
"o": "1.57", // Order Margin(Only Furtures)
"p": "0" , // Position Margin(Only Furtures )
"f": "17366.18538083", // Free amount
"l": "0.00000000", // Locked amount
"T": true, // Can trade
"W": true, // Can withdraw
"D": true, // Can deposit
},
{
"a": "BTC",
"f": "10537.85314051",
"l": "2.19464093",
"T": true, // Can trade
"W": true, // Can withdraw
"D": true, // Can deposit
},
{
"T": true, // Can trade
"W": true, // Can withdraw
"D": true, // Can deposit
"a": "ETH",
"f": "17902.35190619",
"l": "0.00000000"
}
]
}
Update of orders
- Account state is updated with the outboundAccountInfo event.
event type is execSpotReport
AND execOptionReport
AND execContractReport
They respectively refers to the asset related event of spot、options、futures Event type
Possible executive type of contract(X field)
Response of spot and options:
{
"E": 1499405658849, // Event time
"e": "execSpotReport", // Event type
"s": "JEXBTC", // Symbol
"S": "BUY", // Order direction
"q": "1.00000000", // Order quantity
"p": "0.10264410", // Order price
"X": "NEW", // Current order state
"i": 4293153, // ID Order ID
"z": "0.00000000", // Cumulative filled quantity
"O": 1499405658657, // Transaction time
"Z": "0.00000000", // Total transaction sum
}
Possible executive type of spot and options (X field):
- NEW
- PARTIALLY_FILLED
- FILLED
- CANCELED
- FAIL
- CANCLEFILLED
Response contract :
{
"E": 1499405658849, // Event time
"e": "execContractReport", // Event type
"s": "ETHBTC", // Symbol (Not exist if refused)
"X": "NEW", // Current state of the order
"r": "NONE", // Refused reason of the order ( exist if refused)
"i": 4293153, // Order ID
"z": "0.00000000", // Cumulative filled quantity (Not exist if refused)
"Z": "0.00000000", // Cumulative filled sum(Not exist if refused)
}
Possible executive type of contract(X field):
- ENTRUSTED
- ENTRUSTING
- FAIL
- PARTFILLED
- FILLED
- CANCEL
Response example if refused:
{
E: 1571225843289
X: "FAIL"
e: "execContractReport"
i: "4612616205276108403"
r: "insufficient Available"
}
if refused(R field)
- insufficient Available
- too many pending requests
- position is being liquidated
- position is being closed
- closing empty position
- closing order is enough
- contract is disabled
- reach liquidation price
- reach risk limit
Contract positions
- Where there is a change in contract position
- event type is contractPositions
Response:
{
"E": 1553050064078,
"e": "contractPositions",
"p": [{
"M": "100", // Largest leverage available
"R": "3903.99060000", // Used risk limits
"S": "0", // sell Entrusted value
"a": "20", // Auto-deleverage sequence
"b": "0", // buy Entrusted value
"c": "1301.33020000", //Open price
"d": "longs", //Direction
"i": "0.05", //Initial margin
"l": "-49.9759", //Close price
"m": "0.005", //Maintenance Margin
"n": "0", //Current entrusted value
"o": "4088.0779300000", //Margin
"q": "3.0000",//Holding positions
"r": "900000",//Current risk value
"s": "EOSUSDT",//Symbol
"t": "3903.99060000", //Holding positions costs value
"v": "20.00"//Leverage
}]
}
Web Socket Streams
General WSS information
- The base endpoint is: wss://ws.jex.com
- Streams can be accessed either in a single raw stream or in a combined stream
- Raw streams are accessed at /ws/<streamName>
- Combined streams are accessed at /stream?streams=<streamName1>/<streamName2>/<streamName3>
- Combined stream events are wrapped as follows: {"stream":"<streamName>","data":<rawPayload>}
- All symbols for streams are lowercase
- A single connection to stream.jex.com is only valid for 24 hours; expect to be disconnected at the 24 hour mark
- The websocket server will send a
ping frame
every 3 minutes. If the websocket server does not receive apong frame
back from the connection within a 10 minute period, the connection will be disconnected. Unsolicitedpong frames
are allowed. - WSS contract order sells are uniformly negative
- It is recommended to use the combined streams method for connection. Each combined stream can subscribe to a maximum of 10 streams
Stream Detailed Stream information
Websocket Trade Streams
- Every 100 ms push, every single transaction in the last second is defined as a transaction between only one order taker and one bill holder.
Stream Name: <symbol>@<tradeType>
Response
[{
"e": "spotTrade", // Event type
"E": 123456789, // Event time
"s": "JEXBTC", // Symbol
"t": 12345, // Trade ID
"p": "0.001", // Price
"q": "100", // Quantity
"T": 123456785, // Trade time
"m": true, // Is the buyer the market maker?If true,this is a seller order,otherwise it is a buyer order.
},{...},...
]
tradeType
- Support 3 types as below:
- spotTrade
- optionTrade
- contractTrade
Websocket Kline/Candlestick Streams
The Kline/Candlestick Stream push updates to the current klines/candlestick every second
Booking Kline requires interval parameter, shortest one is minute line, longest one is week line. Support intervals as below:
- 1M
- 5M
- 15M
- 30M
- 1H
- 4H
- 1D
- 1W
Stream Name: <symbol>@<klineType>_<interval>
Response
{
"e": "spotKline", // Event type
"E": 123456789, // Event time
"s": "JEXBTC", // Symbol
"k": {
"t": 123400000, // Kline start time
"T": 123460000, // Kline close time
"s": "JEXBTC", // Symbol
"i": "1m", // Interval
"o": "0.0010", // Open price
"c": "0.0020", // Close price
"h": "0.0025", // High price
"l": "0.0015", // Low price
"v": "1000", // Base asset volume
"q": "1.0000", // Quote asset volume
}
}
klineType
-Support types - spotKline - optionKline - contractKline
Individual Symbol Mini Ticker Stream
- 24hr rolling window mini-ticker statistics for a single symbol pushed every second.
Stream Name: <symbol>@<miniTickerType>
Response
{
"e": "24hrSpotMiniTicker", // Event type
"E": 123456789, // Event time
"s": "JEXBTC", // Symbol
"c": "0.0025", // Close price
"h": "0.0025", // High price
"o": "0.0025", // Open price
"l": "0.0010", // Low price
"m": "10000", // mark price(Only contractMiniTicker have)
"i": "10000", // index price(Only contractMiniTicker have)
"v": "10000", // Base asset volume
"q": "18" // Total traded quote asset volume
}
miniTickerType
- Support types:
- spotMiniTicker
- optionMiniTicker
- contractMiniTicker
All Market Mini Tickers Stream
- 24hr rolling window mini-ticker statistics for all symbols that changed in an array pushed every second
StreamName: !<miniTickerType>@arr
Response
[
{
// Same as <symbol>@miniTicker payload
}
]
miniTickerType
- Support types:
- spotMiniTicker
- optionMiniTicker
- contractMiniTicker
Individual Symbol Ticker Streams
- 24hr rollwing window ticker statistics for a single symbol pushed every second.
Stream Name: <symbol>@<tickerType>
Response
{
"e": "24hrSpotTicker", // Event type
"E": 123456789, // Event time
"s": "JEXBTC", // Symbol
"p": "0.0015", // Price change in 24h
"P": "250.00", // Price change in 24h percent
"c": "0.0025", // Last price
"h": "0.0025", // Highest price in 24h
"l": "0.0010", // Lowest price in 24h
"v": "10000", // Trade volume in 24h
"q": "18", // Trade asset in 24h
"m": "10000", // mark price(Only contractMiniTicker have)
"i": "10000", // index price(Only contractMiniTicker have)
"O": 1234567890, // TODO 0 Starting time
"C": 86400000, // TODO 3600*24*1000,milliseconds in 24h ending time
}
All Market Tickers Stream
24hr rolling window ticker statistics for all symbols that changed in an array pushed every second.
StreamName: !<tickerType>@arr
Payload:
[
{
//Same as <symbol>@ticker payload
}
]
- tickerType
- spotTicker
- optionTicker
- contractTicker
Partial Book Depth Streams
- Top
bids and asks, pushed every second. Valid are 5, 10, or 20.
Stream Name: <symbol>@<depthType><levels>
Response :
{
"bids": [ // Buy
[
"0.0024", // Price
"10", // Quantity
]
],
"asks": [ // Sell
[
"0.0026", // Price
"100", // Quantity
]
]
}
- depthType
- spotDepth
- optionDepth
- contractDepth
- levels
- 5
- 10
- 20
Diff. Depth Stream
- Order book price and quantity depth updates used to locally manage an order book pushed every second.
Stream Name: <symbol>@<depthType>
Response :
{
"e": "spotDepthUpdate", // Event type
"s": "JEXBTC", // Symbol
"v": 157, // Version to be updated
"b": [ // Changing depth for buyer
[
"0.0024", // Price
"10", // Quantity
]
],
"a": [ // Changing depth for seller
[
"0.0026", // Price
"100", // Quantity
]
]
}
- depthType Support types
- spotDepth
- optionDepth
- contractDepth
- Types for Depth Streams
- spotDepthUpdate
- optionDepthUpdate
- contractDepthUpdate
Error Codes
JEX Rest接口(包括wapi)返回的错误包含两部分,错误码与错误信息. 错误码是大类,一个错误码可能对应多个不同的错误信息。
以下是一个完整错误码实例
javascript
{
"code":-1121,
"msg":"Invalid symbol."
}
-1
- 失败 fail #### 0
- 成功 success #### -5
- ip非法调用 fail #### -6
- method非法调用 fail
10xx - 服务器或网络问题
-1000 未知错误
- 未知错误
-1001 连接断开
- 通常是一个内部错误,一般重试即可解决。
-1002 未授权
- 请检查你的(API)权限
-1003 请求过多
- 请求过于频繁超过限制。如果导致了IP地址被封禁,错误消息中会给出解封时间。解决这类问题建议减少rest接口轮询,多采用websocket接收事务消息推送。
-1006 非常规响应
- (从内部)接收到了不符合预设格式的消息,下单状态未知。
-1007 超时
- 后端服务超时,下单状态未知。
-1014 不支持的订单参数(组合)
- 不支持的订单参数组合.
-1015 订单太多
- 下单(撤单)太多
-1016 服务器下线
- 服务器下线
-1020 不支持的操作
- 不支持的操作
-1021 时间同步问题
- 时延过大,服务器根据接请求中的时间戳判定耗时已经超出了recevWindow。请改善网络条件或者增大recevWindow。
- 时间偏移过大,服务器根据请求中的时间戳判定客户端时间比服务器时间提前了1秒钟以上。(该参数不可由客户端调节)
-1022 签名不正确
- 请求中携带的signature与服务器根据规则计算得到的signature不一致。通常是因为客户端代码中使用的apisecret错误。
11xx - 请求内容中的问题
-1100 非法字符
- Illegal characters found in a parameter.
- Illegal characters found in parameter '%s'; legal range is '%s'.
- Illegal characters found in parameter '%s' value '%s'
-1101 参数太多
- Too many parameters sent for this endpoint.
- Too many parameters; expected '%s' and received '%s'.
- Duplicate values for a parameter detected.
-1102 缺少必须参数
- A mandatory parameter was not sent, was empty/null, or malformed.
- Mandatory parameter '%s' was not sent, was empty/null, or malformed.
- Param '%s' or '%s' must be sent, but both were empty/null!
-1103 无法识别的参数
- An unknown parameter was sent.
-1104 冗余参数
- Not all sent parameters were read.
- Not all sent parameters were read; read '%s' parameter(s) but was sent '%s'.
-1105 空参数(仅有参数名)
- A parameter was empty.
- Parameter '%s' was empty.
-1106 非必需参数
- A parameter was sent when not required.
- Parameter '%s' sent when not required.
-1111 精度过高
- Precision is over the maximum defined for this asset.
-1112 空白的orderbook
- No orders on book for symbol.
-1114 错误地发送了不需要的TIF参数
- TimeInForce parameter sent when not required.
-1115 无效的TIF参数
- Invalid timeInForce.
-1116 无效的订单类型
- Invalid orderType.
-1117 无效的订单方向
- Invalid side.
-1118 空白的newClientOrderId
- New client order ID was empty.
-1119 空白的originalClientOrderId
- Original client order ID was empty.
-1120 无效的间隔(interval)
- Invalid interval.
-1121 无效的交易对
- Invalid symbol.
-1125 无效的listenKey
- This listenKey does not exist.
-1127 开始结束时间错误
- endTime befor startTime or More than '%s' between startTime and endTime.
- endTime befor startTime
-1128 无效的可选参数组合
- Combination of optional parameters invalid.
-1129 下单小数位错误
- error scale in parameter '%s',should be scale no more than '%s'
-2010 订单被拒绝
- NEW_ORDER_REJECTED
-2011 订单取消被拒绝
- CANCEL_REJECTED
-2012 不存在的订单
- Order does not exist.
-2013 不存在的订单
- Order does not exist.
-2014 API Key格式无效
- API-key format invalid.
-2015 API Key权限,例如该Key不存在、请求并非来自允许的IP范围、或者该接口对应权限未开放
- Invalid API-key, IP, or permissions for action.
-2016 NO_TRADING_WINDOW
- No trading window could be found for the symbol. Try ticker/24hrs instead. ### -2019 ORDER_NUMBER_MAX 达到此订单类型的最大的当前委托
- reach max order number
-1010 收到了错误消息
这个错误代码是由撮合引擎抛出的,引擎还会抛出2010和2011,具体原因需要参考下面列出的具体消息
错误消息 | 描述 |
---|---|
"Unknown order sent." | 找不到订单, (根据请求里发送的 orderId , clOrdId , origClOrdId ) |
"Duplicate order sent." | 客户自定义的订单号重复了 |
"Market is closed." | 该交易对交易关闭了 |
"Account has insufficient balance for requested action." | 账户金额不足。 |
"Market orders are not supported for this symbol." | 该交易对无法发起市价单 |
"Price * QTY is zero or less." | 订单金额必须大于0 |
"IcebergQty exceeds QTY." | 冰山订单中小订单的Quantity必须小于总的Quantity |
"This action disabled is on this account." | 账户被封禁,联系客服 |
"Unsupported order combination" | orderType , timeInForce , stopPrice , 某些参数取某些值的时候另一些参数必须/不得提供。 |
"Cancel order is invalid. Check origClOrdId and orderId." | 撤销订单必须提供origClOrdId 或者orderId 中的一个。 |
"Order would immediately match and take." | LIMIT_MAKER 订单如果按照规则会成为Taker,就会报此错。 |
-6000
- 禁止交易 user prohibit trade
-7001
- 转移保证金失败 Transfer margin error.
-7002
- 调整杠杆失败 Set leverage error.
-7003
- 设置风险值失败 Set risk limit error.
-7004
- 下单失败 Please try it later.
-7005
- 撤单失败 Cancel error, Please try it later.
-7006
- 超过风险限额 Over risk.
-7007
- 可用资产不足 asset not enough
-7008
- 可用保证金不足 margin not enough
-7009
- 发行数量已达到平台风控限额 system asset not enough
-7010
- 杠杆过大 Contract leverage too large
-7011
- 杠杆过小 Contract leverage too small
-7012
- 期权不存在 option not exist
-7013
- 期权行权时间已过 passed option exercise time
-7014
- 无可赎回期权,请先发行期权 no release option
-7015
- 赎回数量大于可赎数量 back amount greater than release amount
-7016
- 保证金冻结异常,请联系客服 margin anomaly
-7017
- 杠杆过大 Contract leverage too large,must smaller than 100
-7018
- 杠杆过小 Contract leverage too small,must larger than 1
-7019
- 平仓失败 Liquidation fail
-7020
- 仓位不存在 Contract position not exists
-8xxx 提现错误
-8000
- 提现数量错误 withdraw amount error
-8001
- 禁止提现 withdraw is forbidden
-8002
- 提现费率错误 withdraw fee error
-8003
- 提现地址错误 withdraw address error
-8004
- 资产不足 your balance is not enough
-8005
- 超过提币额度 withdraw day amount is limited
-8006
- 资产错误或资产不支持提现 withdraw asset error
-9xxx 订单未能通过过滤器
错误信息 | 描述 |
---|---|
"Filter failure: PRICE_FILTER" | 检查价格的上限、下限、步进间隔。 |
"Filter failure: PERCENT_PRICE" | 检查订单中价格是否相对于过去N分钟的平均价格变动超过了百分之X。 |
"Filter failure: LOT_SIZE" | 检查订单中数量的上限、下线、步进间隔。 |
"Filter failure: MIN_NOTIONAL" | price * quantity ,也就是订单金额,是否超过了最小值。 |
"Filter failure: MARKET_LOT_SIZE" | 与LOT_SIZE含义一致,只是对市价单生效。 |
"Filter failure: MAX_NUM_ORDERS" | 账户在该交易对下最多挂单数。 |
"Filter failure: EXCHANGE_MAX_NUM_ORDERS" | 账户在全交易所最多的挂单数。 |
-9000 下单被拒
- 下单被拒 校验参数