Future Trade
Public
Security: None
Endpoints under Public section can be accessed freely without requiring any API-key or signatures
Test Connectivity
GET
https://futuresopenapi.zke.com/fapi/v1/ping
This endpoint checks connectivity to the host
Check Server Time
GET
https://futuresopenapi.zke.com/fapi/v1/time
Response:
name | type | example | description |
serverTime | long | 1607702400000 | server timestamp |
timezone | string | China standard time | server time zone |
Contract List
GET
https://futuresopenapi.zke.com /fapi/v1/contracts
Response:
name | type | example | description |
symbol | string |
| Contract name |
status | number |
| status(0:cannot trade,1:can trade |
type | string |
| contract type, E: perpetual contract, S: test contract, others are mixed contract |
side | number |
| Contract direction(backwards:0,1:forward) |
multiplier | number |
| Contract face value |
multiplierCoin | string |
| Contract face value unit |
pricePrecision | number |
| Precision of the price |
minOrderVolume | number |
| Minimum order volume |
minOrderMoney | number |
| Minimum order value |
maxMarketVolume | number |
| Market price order maximum volume |
maxMarketMoney | number |
| Market price order maximum value |
maxLimitVolume | number |
| Limit price order maximum volume |
maxValidOrder | number |
| Maximum valid order quantity |
Market
Security: None
Market section can be accessed freely without requiring any API-key or signatures.
Depth
GET
https://futuresopenapi.zke.com /fapi/v1/depth
Market depth data
Query Parameters
Name | Type | Description |
---|---|---|
limit | integer | Default 100, Max 100 |
Contract name | string | Contract Name E.g. E-BTC-USDT |
Response:
name | type | example | description |
time | long |
| Current Timestamp (ms) |
bids | list | Look below | Order book purchase info |
asks | list | Look below | Order book selling info |
The fields bids and asks are lists of order book price level entries, sorted from best to worst.
name | type | example | description |
' ' | float |
| price level |
' ' | float |
| Total order quantity for this price level |
24hours ticker
GET
https://futuresopenapi.zke.com /fapi/v1/ticker
24 hour price change statistics
Query Parameters
Name | Type | Description |
---|---|---|
Contract name | string | Contract name E.g. E-BTC-USDT |
Response:
name | type | example | description |
time | long |
| Open time |
high | float |
| Higher price |
low | float |
| Lower price |
last | float |
| Newest price |
vol | float |
| Trade volume |
rose | string | +0.5 | Price variation |
Get index/marked price
GET
https://futuersopenapi.zke.com /fapi/v1/index
Query Parameters
Name | Type | Description |
---|---|---|
Contract name | string | Contract name E.g. E-BTC-USDT |
limit | string | Default 100, Max 100 |
Response:
name | type | example | Description |
| float |
| Index price |
| float |
| Marked price |
| string |
| Contract name |
| float |
| Current fund rate |
Kline/charts data
GET
https://futuresopenapi.zke.com /fapi/v1/klines
Query Parameters
Name | Type | Description |
---|---|---|
ContractName | string | Contract name E.g. E-BTC-USDT |
interval | string | K-line interval, identifies the sent value as: |
limit | integer | Default 100, Max 300 |
Response:
name | type | example | description |
| long |
| Start timestamp (ms) |
| float |
| Open price |
| float |
| Closing price |
| float |
| Max price |
| float |
| Min price |
| float |
| Trade volume |
Trading
Security: TRADE
All interfaces under the transaction require signature and API-key verification
Order creation
POST
https://futuresopenapi.zke.com /fapi/v1/order
Creation of single new orders
Headers
Name | Type | Description |
---|---|---|
X-CH-TS | string | Time stamp |
X-CH-APIKEY | string | Your API-key |
X-CH-SIGN | string | Signature |
Request Body
Name | Type | Description |
---|---|---|
volume | number | Order quantity |
price | number | Order price |
contractName | string | Contract name E.g. |
type | string | Order type, |
side | string | trade direction, |
open | string | Open balancing direction, |
positionType | number | Hold-up position, |
clientOrderId | string | Client order identity, a string with length less than 32 bit |
timeInForce | string |
|
Response:
name | type | example | description |
orderId | String |
| Order ID |
Condition order creation
POST
https://futuresopenapi.zke.com /fapi/v1/conditionOrder
Headers
Name | Type | Description |
---|---|---|
X-CH-TS | string | Time stamp |
X-CH-APIKEY | string | Your API-key |
X-CH-SIGN | string | Signature |
Request Body
Name | Type | Description |
---|---|---|
volume | number | Order quantity |
triggerType | string | trigger type |
triggerPrice | string | trigger price |
positionType | number | Hold-up position, |
open | string | Open balancing direction, |
side | string | trade direction, |
type | string | Order type, |
contractName | string | Contract name E.g. |
price | number | Order price |
Cancel order
POST
https://futuresopenapi.zke.com /fapi/v1/cancel
Speed limit rules: 20 times/ 2 seconds
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | Signature |
X-CH-APIKEY | string | Your API-key |
X-CH-TS | integer | Time stamp |
Request Body
Name | Type | Description |
---|---|---|
contractName | string | Contract name E.g. |
orderId | string | Order ID |
Order details
GET
https://futuresopenapi.zke.com /fapi/v1/order
Request Body
Name | Type | Description |
---|---|---|
contractName | string |
Response:
name | type | example | description |
| long |
| Order ID(system generated |
| string |
| Contract name |
| float |
| Order price |
| float |
| Order quantity |
| float |
| Order quantity |
| float |
| Average transaction price |
| string |
| Coin pair name |
| string |
| Order status. Possible values are: |
| string |
| Order direction. Possible values can only be:BUY(buy long)and SELL(sell short) |
| string |
|
|
| long |
| Order creation time |
Open order
GET
https://futuresopenapi.zke.com /fapi/v1/openOrders
Speed limit rules: Obtain open contract, the user's current order
Query Parameters
Name | Type | Description |
---|---|---|
contractName | string | Contract name |
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | signature |
X-CH-APIKEY | string | Your API-key |
X-CH-TS | integer | time stamp |
Response:
name | type | example | description |
| long |
| Order ID(system generated) |
| string |
| Contract name |
| float |
| Order price |
| float |
| Order quantity |
| float |
| Filled orders quantity |
| float |
| Filled orders average price |
| string |
| Order type. Possible values can only be: |
| string |
| Order direction. Possible values can only be: |
| string |
| Order status. Possible values are: |
| string |
|
|
| long |
| Order creation time, |
order history
POST
https://futuresopenapi.zke.com/fapi/v1/orderHistorical
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | signature |
X-CH-APIKEY | string | Your API-key |
X-CH-TS | string | time stamp |
Request Body
Name | Type | Description |
---|---|---|
contractName | string | Contract name E.g. E-BTC-USDT |
limit | string | Lines per page, default 100, max 1000 |
fromId | long | Start retrieving from this Id |
profit history
POST
https://futuresopenapi.zke.com/fapi/v1/profitHistorical
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | signature |
X-CH-APIKEY | string | Your API-key |
X-CH-TS | string | time stamp |
Request Body
Name | Type | Description |
---|---|---|
contractName | string | Contract name E.g. E-BTC-USDT |
limit | string | Lines per page, default 100, max 1000 |
fromId | long | Start retrieving from this Id |
Order record
GET
https://futuresopenapi.zke.com /fapi/v1/myTrades
Query Parameters
Name | Type | Description |
---|---|---|
contractName | string | Contract name E.g. E-BTC-USDT |
limit | string | Lines per page, default 100, max 1000 |
fromId | long | Start retrieving from this tradeId |
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | signature |
X-CH-APIKEY | string | Your API-key |
X-CH-TS | string | time stamp |
Response:
name | type | example | description |
symbol | string | ETHBTC | Coin name(trade pair) |
tradeId | number | 28457 | Trade ID |
bidId | long | 150695552109032492 | Buyer order ID |
askId | long | 150695552109032493 | Seller order ID |
bidUserId | integer | 10024 | Buyer user ID |
askUserId | integer | 10025 | Seller user ID |
price | float | 4.01 | Filled price |
qty | float | 12 | Trade quantity |
amount | float | 5.38 | Filled amount |
time | number | 1499865549590 | Trade time stamp |
fee | number | 0.001 | Trading fees |
side | string | buy | Current order direction BUY purchase, SELL selling |
contractName | string | E-BTC-USDT | Contract name |
isMaker | boolean | true | is it maker? |
isBuyer | boolean | true | is it buyer? |
Account
Security: USER_DATA
All interfaces under the account require signature and API-key verification
Account info
GET
https://futuresopenapi.zke.com /fapi/v1/account
Headers
Name | Type | Description |
---|---|---|
X-CH-SIGN | string | Signature |
X-CH-APIKEY | string | Your API-key |
X-CH-TS | integer | time stamp |
Response:
name | type | description |
|
| Balance collection |
account
field:
name | type | example | description |
marginCoin | string | USDT | Margin coin |
accountNormal | float | 10.05 | Balance account |
accountLock | float | 10.07 | Margin frozen account |
partPositionNormal | float | 10.07 | Restricted position margin balance |
totalPositionNormal | float | 10.07 | Full position initial margin |
achievedAmount | float | 10.07 | Profit and losses occurred |
unrealizedAmount | float | 10.05 | Unfilled profit and losses |
totalMarginRate | float | 10.05 | Full position margin rate |
totalEquity | float | 10.07 | Full position equity |
partEquity | float | 10.07 | Restricted position equity |
totalCost | float | 10.07 | Full position costs |
sumMarginRate | float | 10.07 | All accounts margin rate |
positionVos | [ ] | | Position contract record |
positionVos
field:
name | type | example | description |
contractId | integer | 2 | Contract id |
contractName | string | E-BTC-USDT | Contract name |
contractSymbol | string | BTC-USDT | Contract coin pair |
positions | [ ] | | Position details |
positions
field:
name | type | example | description |
id | integer | 2 | Position id |
uid | integer | 10023 | User ID |
positionType | integer | 1 | Hold position type(1 full,2 restrictive) |
side | string | SELL | Hold position direction BUY sell long, SELL buy short |
volume | float | 1.05 | Hold quantity |
openPrice | float | 1.05 | Open position price |
avgPrice | float | 1.05 | Hold average price |
closePrice | float | 1.05 | Balancing average price |
leverageLevel | float | 1.05 | Leverage multiple |
holdAmount | float | 1.05 | Hold position margin |
closeVolume | float | 1.05 | Balanced quantity |
pendingCloseVolume | float | 1.05 | The number of pending closing orders |
realizedAmount | float | 1.05 | Profit and losses occurred |
historyRealizedAmount | float | 1.05 | Historic accumulated profit and losses |
tradeFee | float | 1.05 | Trading fees |
capitalFee | float | 1.05 | Capital costs |
closeProfit | float | 1.05 | Balancing profit and loss |
shareAmount | float | 1.05 | Amount to share |
freezeLock | integer | 0 | Position freeze status: 0 normal, 1 liquidation freeze, 2 delivery freeze |
status | integer | 0 | Position effectiveness,0 ineffective 1 effective |
ctime | time | | Creation time |
mtime | time | | Update time |
brokerId | integer | 1023 | Client id |
lockTime | time | | liquidation lock time |
marginRate | float | 1.05 | Margin rate |
reducePrice | float | 1.05 | Price reduction |
returnRate | float | 1.05 | Return rate (profit rate) |
unRealizedAmount | float | 1.05 | Unfilled profit and losses |
openRealizedAmount | float | 1.05 | Open position unfilled profit and losses |
positionBalance | float | 1.05 | Position value |
indexPrice | float | 1.05 | Newest marked price |
keepRate | float | 1.05 | Scaled minimum kept margin rate |
maxFeeRate | float | 1.05 | Balancing maximum fees rate |
Last updated