Release 1.2.19
/api/v1/private/position
changes:
- added filed
settlementPrice
(USD for futures, BTC for options)
Added /api/v1/private/datatable
API (DataTable)[https://datatables.net/] compatible):
/api/v1/private/datatable
parameters:
parameter table
- name of table, following tables are supported
ftu_oo
(futures open orders),opt_oo
(options open orders),ftu_his
(futures history),opt_his
(options history),options
(big table of options order book)draw
- returned back without changestart
- used forftu_oo
,opt_oo
,ftu_his
,opt_his
as offset for pagination. This is the start point in the current data set (0 index based - i.e. 0 is the first record)length
- length of page (it is expected that the number of records returned will be equal to this number, unless the server has fewer records to return).
Returned JSON data of /api/v1/private/datatable
is identical to the format used by Deribit page for the corresponding tables, returned rows are contained in data
field of the result, also result contains draw
and recordsTotal
fields (except for options
- in that case all data returned always).
format of data
field (client rounds data to necessary decimals, if data absent client uses -
sign or appropriate symbol etc):
ftu_oo
- data is list of arrays:
[
6256110, // order id
"buy", // order side
"BTC-14JUL17", // instrument
"0.00412711", // size in BTC,
// to convert size in $10 Contracts - use price
"2423.00", // price in USD
"0.00000000", // completed in BTC
"0.00412711", // remaining in BTC (need to convert to $10 Contracts using price)
"0.0000", // average price
"0.0006", // initial margin
"07-01 19:17:39", // short date time
"0.00" // completed in USD
]
opt_oo
- data is list of arrays:
[
6277908, // order id
"sell", // order side
"BTC-25AUG17-2000-C", // instrument
"1.00", // size
"0.4000", // price
"0.00", // completed
"1.00", // remaining
"0.0000", // average price
"0.2000", // initial margin
"07-03 19:53:28", // short date time
{
"adv_type": "", // advanced type if applicable
"iv": "", // impied volatility of adv. order if applicable
"usd": "" // usd of adv. order if applcable
}
],
ftu_his
- data is list of objects:
{
"DT_RowId": "ord_his_6279359",
"side": "buy", // side
"ins": "BTC-7JUL17", // instrument
"qty": 0.040567054, // size in btc
"cts": 11, // size in contracts
"price": 2711.56, // price
"completed": 0.033191226, // completed in btc
"status": "Open", // status
"avg": 2711.560000032567, // average price
"time": "07-03 20:44:16", // short date time
"fee": 0.000016596, // fees in BTC
"completed_usd": 90.000000773, // completed in USD
"pl": 0, // PnL
"cashflow": 0 // cashflow
}
opt_his
- data is list of objects:
{
"DT_RowId": "ord_his_6277906",
"side": "sell", // side
"ins": "BTC-25AUG17-2000-C", // instrument
"qty": 0.01, // size
"price": 0.2, // price
"completed": 0.01, // completed
"status": "Filled", // status
"avg": 0.2, //average
"time": "07-03 19:53:17", //short date time
"fee": 0.000005, //fees
"pl": 0, // PnL
"cashflow": 0.002 //cashflow
}
options
- data is list of objects composing options big table (to shrink response, empty values may be absent):
{
"bid_qty": "0.59", //bid size
"bid_iv": "0.0%", // bid implied volatility
"bid": "0.2000", // best bid in BTC
"bid_usd": "511.47", // best bid in USD
"ask_qty": "1.00", // ask size
"ask_iv": "212.6%", // ask imp. volatility
"ask": "0.4000", // best ask in BTC
"ask_usd": "1022.94",// best ask in USD
"ask_volume": 1, // ask volume
"bid_volume": 0.59, // bid volume
"open_interest": 0.01, // open interest
"delta": "0.77", // delta
"gamma": "0.0002", // gamma
"theta": "-3.54", // theta
"vega": "2.92", // vega
"exp_ms": 1503648000000, // expiration time in ms
"pos": -0.01, // position
"last": 0.2, // last
"volume": 0.01, // volume
"strike": 2000, // strike price
"date": "25 August 2017", // expiration date in english
"exp_time": 0.14372146118721463, // expiration time
"days_to_exp": 52, // days to expiration
"type": "call", // kind of the option
"name": "BTC-25AUG17-2000-C" // instrument
}