Skip to main content

Public

Security: None

Endpoints under Public section can be accessed freely without requiring any API key or signatures.

Test Connectivity

GET https://futuresopenapi.idax.exchange/fapi/v1/ping
This endpoint checks connectivity to the host.
{}

Check Server Time

GET https://futuresopenapi.idax.exchange/fapi/v1/time
{
    "serverTime": 1607702400000,
    "timezone": "Chinese standard time"
}

Response:

NameTypeExampleDescription
serverTimelong1607702400000Server timestamp
timezonestringChina standard timeServer time zone

Futures List

GET https://futuresopenapi.idax.exchange/fapi/v1/contracts
[
    {
        "symbol": "H-HT-USDT",
        "pricePrecision": 8,
        "side": 1,
        "maxMarketVolume": 100000,
        "multiplier": 6,
        "minOrderVolume": 1,
        "maxMarketMoney": 10000000,
        "type": "H",
        "maxLimitVolume": 1000000,
        "maxValidOrder": 20,
        "multiplierCoin": "HT",
        "minOrderMoney": 0.001,
        "maxLimitMoney": 1000000,
        "status": 1,
        "minLever": 1,
        "maxLever": 75,
        "openTakerFee": 0.0002,
        "openMakerFee": 0.0002,
        "closeTakerFee": 0.0002,
        "closeMakerFee": 0.0002
    }
]

Response:

NameTypeExampleDescription
symbolstringE-BTC-USDTFutures name
statusnumber1Status (0: cannot trade, 1: can trade)
typestringSFutures type. E: perpetual futures, S: test futures, others are mixed futures
sidenumber1Futures direction (backwards: 0, forward: 1)
multipliernumber0.5Futures face value
multiplierCoinstringBTCFutures face value unit
pricePrecisionnumber4Precision of the price
minOrderVolumenumber10Minimum order volume, the unit is “sheet”
minOrderMoneynumber10Minimum order value
maxMarketVolumenumber100000Market price order maximum volume, the unit is “sheet”
maxMarketMoneynumber100000Market price order maximum value
maxLimitVolumenumber100000Limit price order maximum volume, the unit is “sheet”
maxValidOrdernumber100000Maximum valid order quantity
minLevernumber5Minimum leverage multiplier
maxLevernumber5Maximum leverage multiplier
openTakerFeenumber0.0002Taker fee for opening a position
openMakerFeenumber0.0002Maker fee for opening a position
closeTakerFeenumber0.0002Taker fee for closing a position
closeMakerFeenumber0.0002Maker fee for closing a position

Market

Security: None

Market section can be accessed freely without requiring any API key or signatures.

Depth

GET https://futuresopenapi.idax.exchange/fapi/v1/depth
Market depth data.

Query Parameters

NameTypeDescription
limitintegerDefault 100, Max 100
contractNamestringFutures Name E.g. E-BTC-USDT
{
  "bids": [
    [
      "3.90000000",
      "431.00000000"
    ],
    [
      "4.00000000",
      "431.00000000"
    ]
  ],
  "asks": [
    [
      "4.00000200",
      "12.00000000"
    ],
    [
      "5.10000000",
      "28.00000000"
    ]
  ]
}

Response:

NameTypeExampleDescription
timelong1595563624731Current timestamp (ms)
bidslistLook belowOrder book purchase info
askslistLook belowOrder book selling info
The fields bids and asks are lists of order book price level entries, sorted from best to worst.
NameTypeExampleDescription
float131.1Price level
float2.3Total order quantity for this price level

24hrs ticker

GET https://futuersopenapi.idax.exchange/fapi/v1/ticker
24 hour price change statistics.

Query Parameters

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT
{
    "high": "9279.0301",
    "vol": "1302",
    "last": "9200",
    "low": "9279.0301",
    "rose": "0",
    "time": 1595563624731
}

Response:

NameTypeExampleDescription
timelong1595563624731Open time
highfloat9900Higher price
lowfloat8800.34Lower price
lastfloat8900Newest price
volfloat4999Trade volume
rosestring+0.5Price variation

All market tickers

GET https://futuersopenapi.idax.exchange/fapi/v1/ticker_all
{
    "e_btcusdt": {
        "high": "9279.0301",
        "vol": "1302",
        "last": "9200",
        "low": "9279.0301",
        "rose": "0",
        "time": 1595563624731
    },
    "e_ethusdt": {
        "high": "9279.0301",
        "vol": "1302",
        "last": "9200",
        "low": "9279.0301",
        "rose": "0",
        "time": 1595563624731
    }
}

Response:

NameTypeExampleDescription
timelong1595563624731Open time
highfloat9900Higher price
lowfloat8800.34Lower price
lastfloat8900Newest price
volfloat4999Trade volume
rosestring+0.5Price variation

Get index/marked price

GET https://futuersopenapi.idax.exchange/fapi/v1/index

Query Parameters

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT
limitstringDefault 100, Max 100
{
    "markPrice": 581.5,
    "indexPrice": 646.3933333333333,
    "lastFundingRate": 0.001,
    "contractName": "E-ETH-USDT",
    "time": 1608273554063
}

Response:

NameTypeExampleDescription
indexPricefloat0.055Index price
markPricefloat0.0578Marked price
contractNamestringE-BTC-USDTContract name
lastFundingRatefloat0.123Current fund rate

Kline/charts data

GET https://futuresopenapi.idax.exchange/fapi/v1/klines

Query Parameters

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT
intervalstringK-line interval: 1min, 5min, 15min, 30min, 1h, 1day, 1week, 1month
limitintegerDefault 100, Max 300
[
    {
        "high": "6228.77",
        "vol": "111",
        "low": "6228.77",
        "idx": 1594640340,
        "close": "6228.77",
        "open": "6228.77"
    },
    {
        "high": "6228.77",
        "vol": "222",
        "low": "6228.77",
        "idx": 1587632160,
        "close": "6228.77",
        "open": "6228.77"
    },
    {
        "high": "6228.77",
        "vol": "333",
        "low": "6228.77",
        "idx": 1587632100,
        "close": "6228.77",
        "open": "6228.77"
    }
]

Response:

NameTypeExampleDescription
idxlong1538728740000Start timestamp (ms)
openfloat36.00000Open price
closefloat33.00000Closing price
highfloat36.00000Max price
lowfloat30.00000Min price
volfloat2456.111Trade volume

Trading

Security: TRADE

All interfaces under the transaction require signature and API key verification.

Order creation

POST https://futuresopenapi.idax.exchange/fapi/v1/order
Creation of single new orders.

Headers

NameTypeDescription
X-CH-TSstringTimestamp
X-CH-APIKEYstringYour API key
X-CH-SIGNstringSignature
futures-versionstringVersion: 101

Request Body

NameTypeDescription
volumenumberOrder quantity
pricenumberOrder price
orderUnitnumberOrder unit: 1 (cont), 2 (sheet), 3 (value). Default: 2
contractNamestringFutures name E.g. E-BTC-USDT
typestringOrder type: LIMIT/MARKET
sidestringTrade direction: BUY/SELL
openstringOpen balancing direction: OPEN/CLOSE
positionTypenumberHold-up position: 1 full position, 2 restrictive position
clientOrderIdstringClient order identity, a string with length less than 32 bits
timeInForcestringNot required when type is MARKET. Options: IOC, FOK, POST_ONLY
{
    "orderId": 256609229205684228
}

Response:

NameTypeExampleDescription
orderIdstring256609229205684228Order ID

Condition order creation

POST https://futuresopenapi.idax.exchange/fapi/v1/conditionOrder

Headers

NameTypeDescription
X-CH-TSstringTimestamp
X-CH-APIKEYstringYour API key
X-CH-SIGNstringSignature
futures-versionstringVersion: 101

Request Body

NameTypeDescription
volumenumberOrder quantity
triggerTypestringTrigger type: 3UP/4DOWN
triggerPricestringTrigger price
positionTypenumberHold-up position: 1 full position, 2 restrictive position
orderUnitnumberOrder unit: 1 (cont), 2 (sheet), 3 (value). Default: 2
openstringOpen balancing direction: OPEN/CLOSE
sidestringTrade direction: BUY/SELL
typestringOrder type: LIMIT/MARKET
contractNamestringFutures name E.g. E-BTC-USDT
pricenumberOrder price
{
    "orderId": 256609229205684228
}

Cancel order

POST https://futuresopenapi.idax.exchange/fapi/v1/cancel
Speed limit rules: 20 times/2 seconds

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp

Request Body

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT
orderIdstringOrder ID
{
    "orderId": 256609229205684228
}

Cancel all orders

POST https://futuresopenapi.idax.exchange/fapi/v1/cancel_all

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp
{
    "code": "0",
    "msg": "成功",
    "data": null
}

Order details

GET https://futuresopenapi.idax.exchange/fapi/v1/order

Request Body

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT
[
    {
        "side": "BUY",
        "executedQty": 0,
        "orderId": 259396989397942275,
        "price": 10000.0000000000000000,
        "origQty": 1.0000000000000000,
        "avgPrice": 0,
        "transactTime": "1607702400000",
        "action": "OPEN",
        "contractName": "E-BTC-USDT",
        "type": "LIMIT",
        "status": "INIT",
        "tradeFee": 2.700,
        "realizedAmount": 10.8
    }
]

Response:

NameTypeExampleDescription
orderIdlong150695552109032492Order ID (system generated)
contractNamestringE-BTC-USDTFutures name
pricefloat10.5Order price
origQtyfloat10.5Order quantity
executedQtyfloat20Executed quantity
avgPricefloat10.5Average transaction price
symbolstringBHTUSDTCoin pair name
statusstringNEWOrder status: NEW (new order, not filled), PARTIALLY_FILLED (partially filled), FILLED (fully filled), CANCELLED (already cancelled), REJECTED (rejected)
sidestringBUYOrder direction: BUY (buy long) and SELL (sell short)
actionstringOPENOPEN/CLOSE
transactTimelong1607702400000Order creation time
tradeFeefloat2.9Order trade fee
realizedAmountfloat10.6Order profit

Open order

GET https://futuresopenapi.idax.exchange/fapi/v1/openOrders
Obtain open futures — the user’s current orders.

Query Parameters

NameTypeDescription
contractNamestringContract name E.g. E-BTC-USDT. If not passed, all contracts will be queried.

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp
[
    {
        "side": "BUY",
        "executedQty": 0,
        "orderId": 259396989397942275,
        "price": 10000.0000000000000000,
        "origQty": 1.0000000000000000,
        "avgPrice": 0,
        "transactTime": "1607702400000",
        "action": "OPEN",
        "contractName": "E-BTC-USDT",
        "type": "LIMIT",
        "status": "INIT"
    }
]

Response:

NameTypeExampleDescription
orderIdlong150695552109032492Order ID (system generated)
contractNamestringE-BTC-USDTFutures name
pricefloat4765.29Order price
origQtyfloat1.01Order quantity
executedQtyfloat1.01Filled orders quantity
avgPricefloat4754.24Filled orders average price
typestringLIMITOrder type: LIMIT (limit price) and MARKET (market price)
sidestringBUYOrder direction: BUY (buy long) and SELL (sell short)
statusstringNEWOrder status: NEW (new order, not filled), PARTIALLY_FILLED (partially filled), FILLED (fully filled), CANCELLED (already cancelled), REJECTED (rejected)
actionstringOPENOPEN/CLOSE
transactTimelong1607702400000Order creation time

Order history

POST https://futuresopenapi.idax.exchange/fapi/v1/orderHistorical

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSstringTimestamp

Request Body

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT
limitstringLines per page, default 100, max 500
fromIdlongStart retrieving from this ID
[
    {
        "side": "BUY",
        "clientId": "0",
        "ctimeMs": 1632903411000,
        "positionType": 2,
        "orderId": 777293886968070157,
        "avgPrice": 41000,
        "openOrClose": "OPEN",
        "leverageLevel": 26,
        "type": 4,
        "closeTakerFeeRate": 0.00065,
        "volume": 2,
        "openMakerFeeRate": 0.00025,
        "dealVolume": 1,
        "price": 41000,
        "closeMakerFeeRate": 0.00025,
        "contractId": 1,
        "ctime": "2021-09-29T16:16:51",
        "contractName": "E-BTC-USDT",
        "openTakerFeeRate": 0.00065,
        "dealMoney": 4.1,
        "status": 4
    }
]

Profit history

POST https://futuresopenapi.idax.exchange/fapi/v1/profitHistorical

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSstringTimestamp

Request Body

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT. Defaults to all contracts if omitted.
limitstringLines per page, default 100, max 500
fromIdlongStart retrieving from this ID
startTimelongTimestamp (ms). Example: 1735721190000
endTimelongTimestamp (ms). Example: 1735721190000. startTime and endTime must be provided together. Defaults to all time if omitted.
[
    {
        "side": "SELL",
        "positionType": 2,
        "tradeFee": -5.23575,
        "realizedAmount": 0,
        "leverageLevel": 26,
        "openPrice": 44500,
        "settleProfit": 0,
        "mtime": 1632882739000,
        "shareAmount": 0,
        "openEndPrice": 44500,
        "closeProfit": -45,
        "volume": 900,
        "contractId": 1,
        "historyRealizedAmount": -50.23575,
        "ctime": 1632882691000,
        "id": 8764,
        "capitalFee": 0
    }
]

Order record

GET https://futuresopenapi.idax.exchange/fapi/v1/myTrades

Query Parameters

NameTypeDescription
contractNamestringFutures name E.g. E-BTC-USDT
limitstringLines per page, default 100, max 500
fromIdlongStart retrieving from this trade ID

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSstringTimestamp
[
  {
    "symbol": "ETHBTC",
    "id": 100211,
    "bidId": 150695552109032492,
    "askId": 150695552109032493,
    "price": "4.00000100",
    "qty": "12.00000000",
    "time": 1499865549590,
    "isBuyer": true,
    "isMaker": false,
    "fee": "0.001"
  }
]

Response:

NameTypeExampleDescription
symbolstringETHBTCCoin name (trade pair)
tradeIdnumber28457Trade ID
bidIdlong150695552109032492Buyer order ID
askIdlong150695552109032493Seller order ID
bidUserIdinteger10024Buyer user ID
askUserIdinteger10025Seller user ID
pricefloat4.01Filled price
qtyfloat12Trade quantity
amountfloat5.38Filled amount
timenumber1499865549590Trade timestamp
feenumber0.001Trading fees
sidestringBUYCurrent order direction: BUY (purchase), SELL (selling)
contractNamestringE-BTC-USDTFutures name
isMakerbooleantrueIs it maker?
isBuyerbooleantrueIs it buyer?

Change Position Mode

POST https://futuresopenapi.idax.exchange/fapi/v1/edit_user_position_model

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp

Request Body

NameTypeDescription
contractName *stringFutures name E.g. E-BTC-USDT
positionModel *integerPosition Mode (1. Net Position, 2. Two-way Position) — Enter 1 or 2
{
    "code": "0",
    "msg": "成功",
    "data": null
}

Change Margin Mode

POST https://futuresopenapi.idax.exchange/fapi/v1/edit_user_margin_model

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp

Request Body

NameTypeDescription
contractName *stringFutures name E.g. E-BTC-USDT
marginModel *integerMargin Mode (1. Cross Margin, 2. Isolated Margin) — Enter 1 or 2
{
    "code": "0",
    "msg": "成功",
    "data": null
}

Adjust Position Margin

POST https://futuresopenapi.idax.exchange/fapi/v1/edit_position_margin

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp

Request Body

NameTypeDescription
positionId *integerPosition ID
amount *numberAdjust amount
{
    "code": "0",
    "msg": "成功",
    "data": null
}

Change Leverage Ratio

POST https://futuresopenapi.idax.exchange/fapi/v1/edit_lever

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp

Request Body

NameTypeDescription
contractName *stringFutures name E.g. E-BTC-USDT
nowLevel *integerThe leverage ratio to be modified, e.g., 50
{
    "code": "0",
    "msg": "成功",
    "data": null
}

Account

Security: USER_DATA

All interfaces under the account require signature and API key verification.

Account info

GET https://futuresopenapi.idax.exchange/fapi/v1/account

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp
{
    "account": [
        {
            "marginCoin": "USDT",
            "accountNormal": 999.5606,
            "accountLock": 23799.5017,
            "partPositionNormal": 9110.7294,
            "totalPositionNormal": 0,
            "achievedAmount": 4156.5072,
            "unrealizedAmount": 650.6385,
            "totalMarginRate": 0,
            "totalEquity": 99964804.560,
            "partEquity": 13917.8753,
            "totalCost": 0,
            "sumMarginRate": 873.4608,
            "positionVos": [
                {
                    "contractId": 1,
                    "contractName": "E-BTC-USDT",
                    "contractSymbol": "BTC-USDT",
                    "positions": [
                        {
                            "id": 13603,
                            "uid": 10023,
                            "contractId": 1,
                            "positionType": 2,
                            "side": "BUY",
                            "volume": 69642.0,
                            "openPrice": 11840.2394,
                            "avgPrice": 11840.3095,
                            "closePrice": 12155.3005,
                            "leverageLevel": 24,
                            "holdAmount": 7014.2111,
                            "closeVolume": 40502.0,
                            "pendingCloseVolume": 0,
                            "realizedAmount": 8115.9125,
                            "historyRealizedAmount": 1865.3985,
                            "tradeFee": -432.0072,
                            "capitalFee": 2891.2281,
                            "closeProfit": 8117.6903,
                            "shareAmount": 0.1112,
                            "freezeLock": 0,
                            "status": 1,
                            "ctime": "2020-12-11T17:42:10",
                            "mtime": "2020-12-18T20:35:43",
                            "brokerId": 21,
                            "marginRate": 0.2097,
                            "reducePrice": 9740.8083,
                            "returnRate": 0.3086,
                            "unRealizedAmount": 2164.5289,
                            "openRealizedAmount": 2165.0173,
                            "positionBalance": 82458.2839,
                            "settleProfit": 0.4883,
                            "indexPrice": 12151.1175,
                            "keepRate": 0.005,
                            "maxFeeRate": 0.0025
                        }
                    ]
                }
            ]
        }
    ]
}

Response:

NameTypeDescription
accountarrayBalance collection
account field:
NameTypeExampleDescription
marginCoinstringUSDTMargin coin
accountNormalfloat10.05Balance account
accountLockfloat10.07Margin frozen account
partPositionNormalfloat10.07Restricted position margin balance
totalPositionNormalfloat10.07Full position initial margin
achievedAmountfloat10.07Profit and losses occurred
unrealizedAmountfloat10.05Unfilled profit and losses
totalMarginRatefloat10.05Full position margin rate
totalEquityfloat10.07Full position equity
partEquityfloat10.07Restricted position equity
totalCostfloat10.07Full position costs
sumMarginRatefloat10.07All accounts margin rate
positionVosarrayPosition contract record
positionVos field:
NameTypeExampleDescription
contractIdinteger2Futures ID
contractNamestringE-BTC-USDTFutures name
contractSymbolstringBTC-USDTFutures coin pair
positionsarrayPosition details
positions field:
NameTypeExampleDescription
idinteger2Position ID
uidinteger10023User ID
positionTypeinteger1Hold position type (1 full, 2 restrictive)
sidestringSELLHold position direction: BUY sell long, SELL buy short
volumeinteger1Hold quantity, the unit is “sheet”
openPricefloat1.05Open position price
avgPricefloat1.05Hold average price
closePricefloat1.05Balancing average price
leverageLevelinteger1Leverage multiple
holdAmountfloat1.05Hold position margin
closeVolumeinteger1Balanced quantity
pendingCloseVolumeinteger1Number of pending closing orders
realizedAmountfloat1.05Profit and losses occurred
historyRealizedAmountfloat1.05Historic accumulated profit and losses
tradeFeefloat1.05Trading fees
capitalFeefloat1.05Capital costs
closeProfitfloat1.05Balancing profit and loss
shareAmountfloat1.05Amount to share
freezeLockinteger0Position freeze status: 0 normal, 1 liquidation freeze, 2 delivery freeze
statusinteger0Position effectiveness: 0 ineffective, 1 effective
ctimetimeCreation time
mtimetimeUpdate time
brokerIdinteger1023Client ID
lockTimetimeLiquidation lock time
marginRatefloat1.05Margin rate
reducePricefloat1.05Price reduction
returnRatefloat1.05Return rate (profit rate)
unRealizedAmountfloat1.05Unfilled profit and losses
openRealizedAmountfloat1.05Open position unfilled profit and losses
positionBalancefloat1.05Position value
indexPricefloat1.05Newest marked price
keepRatefloat1.05Scaled minimum kept margin rate
maxFeeRatefloat1.05Balancing maximum fees rate

Account transaction info

POST https://futuresopenapi.idax.exchange/fapi/v1/get_user_transaction

Headers

NameTypeDescription
X-CH-SIGNstringSignature
X-CH-APIKEYstringYour API key
X-CH-TSintegerTimestamp

Request Body

NameTypeDescription
beginTime *stringRequired. Start time — pass in a timestamp.
endTime *stringRequired. End time — pass in a timestamp.
symbol *stringRequired. The type of margin for the transaction flow: USDT, EXUSD, DOGE
pageintegerThe current page. Default: 1
limitintegerNumber of items per page. Default: 200, max: 200
assetTypeintegerQuery account type. Default 0: Main account. 1: Bring the order account. 2: Follow the order account.
langKeystringLanguage type of the returned data. Default: en_US (English)
typestringTransaction scenario to filter. If not passed, all scenarios are returned. Options: 1 (into), 2 (transfer), 3 (clearing storehouse), 4 (settlement short positions), 5 (capital cost), 6 (open warehouse fee), 7 (unwind fees), 8 (share), 9 (poundage), 10 (give gold), 11 (give gold recovery), 12 (public and private transfer), 13 (unwinding profit and loss), 18 (KOL transfer), 1928 (documentary and single order operations)

Response:

NameTypeDescription
uidnumberUser ID
contractNamestringContract name
contractOtherNamestringContract other name
timeStampnumberTransaction timestamp
typestringTransaction type: fundingFee, transferIn, transferOut, openFee, closeFee, settlementLossShare, shareFee, coupon, couponRecycle, settlementClosePosition
datestringTransaction time
amountstringTransaction amount
pagenumberCurrent page count
limitnumberNumber of items per page
Transaction record detail fields:
NameTypeDescription
idnumberTransaction ID
contractOtherNamestringContract other name
ctimeMillisnumberTransaction timestamp
typestringTransaction type: fundingFee, transferIn, transferOut, openFee, closeFee, settlementLossShare, shareFee, coupon, couponRecycle, settlementClosePosition
ctimestringTransaction time
amountnumberTransaction amount
afterBalancenumberAccount balance after the transfer of funds
scenenumberTransaction scene ID
pagenumberCurrent page
limitnumberPage size
countnumberTotal transaction count