This endpoint returns the size and average entry price of all open positions in Futures contracts. This includes Futures contracts that have matured but have not yet been settled.
Authentication is required.
Endpoint |
Request Type | Permissible API Keys |
/api/v3/openpositions
|
GET | Read-only, Read-write, Master |
Arguments | |||
none |
Sample Call |
https://www.cryptofacilities.com/derivatives/api/v3/openpositions |
Sample Return if Successful |
{ "result":"success", "serverTime":"2016-02-25T09:45:53.818Z", "openPositions":[ { "fillTime":"2016-02-25T09:47:01.000Z", "symbol":"fi_xbtusd_180615", "side":"long", "size":1000, "price":4255, }, { "fillTime":"2016-02-25T09:47:01.000Z", "symbol":"ti_xbtusd_180615", "side":"short", "size":5000, "price":4655, }, ..., ], } |
Field |
Type | Description |
result
|
String | Always success |
serverTime
|
ISO8601 datetime | The server date and time |
openPositions
|
list of structures | A list containing structures with information on open positions, see below. The list is sorted descending by fillTime |
fillTime (deprecated) | ISO8601 datetime | The date and time the position was entered into |
symbol | string | The symbol of the Futures, see Section 3.4.4 |
side | string | The direction of the position, either long for a long position or short for a short position |
size | positive integer | The size of the position |
price | positive float | The average price at which the position was entered into |
Sample Return if Unsuccessful |
{ "result":"error", "serverTime":"2016-02-25T09:45:53.818Z", "error":"apiLimitExceeded", } |
Field |
Type | Description |
result
|
String | Always error |
serverTime
|
ISO8601 datetime | The server date and time |
error
|
string |
The reason the API call failed, either of:
|