Release 1.2.24
added settlement API
/api/v1/public/getlastsettlements
- settlements data.
/api/v1/private/settlementhistory
- private user's settlements
both requests have same set of parameters.
{
"instrument": "BTC-3NOV17" // optional, instrument filter if present
"count": "20", // maximal amount of returned entries, (not more than 10000)
"type": "settlement", // optional, settlement type filter if present
// ("settlement", "delivery", "bankruptcy")
"startTstamp": "1509630245845", // optional time stamp
// if present then those items are returned
// which are not newer than the startTstamp
"continuation": "xY7T6cut8W82TB1gc..." // optional, continuation for next page
}
result format:
{
"success": true,
"testnet": false,
"message": "",
"msIn": 1509717529613,
"msOut": 1509717529613,
"result": {
//list of settlements
"settlements": [
{
"type": "delivery", // type - "settlement" | "delivery" | "bankrupcy",
"instrument": "BTC-27OCT17", // instrument, not available in bankrupcy
"position": 5, // not available in bankrupcy,
// for futures in contracts for options in BTC,
"indexPrice": 5764.5, // index price
"markPrice": 5764.5, // mark price, not available in bankrupcy
"profitLoss": 0.000152424, // ot available in bankrupcy,
// for futures in contracts for options in BTC
"timeStamp": 1509117835978, //time stamp
"sessionProfitLoss": 0.000152424, // includes futures realized PL,
// for bankrupcy total PL over all instruments
"sessionBankrupcy": -1, // only in bakrupcy total session bankrupcy
"sessionTaxRate": 0.2, // only in bankrupcy
"sessionTax": -0.4 // only in bakrupcy, negative values for those who pays the tax,
// positive values for bankrupts
},
....
],
"continuation": "xY7T6H4MCdhxTVa8DdZ..." //continuation for next page or "none"
// if there is no more items
}
}