Get open positions
GET/openpositions
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.
Responses
- 200
- application/json
- Schema
- success
- failure
Schema
- Success Response
- ErrorResponse
- Array [
- ]
accountInactive
: The Futures account the request refers to is inactiveapiLimitExceeded
: The API limit for the calling IP address has been exceededauthenticationError
: The request could not be authenticatedinsufficientFunds
: The amount requested for transfer is below the amount of funds availableinvalidAccount
: The Futures account the transfer request refers to is invalidinvalidAmount
: The amount the transfer request refers to is invalidinvalidArgument
: One or more arguments provided are invalidinvalidUnit
: The unit the transfer request refers to is invalidJson Parse Error
: The request failed to pass valid JSON as an argumentmarketUnavailable
: The market is currently unavailablenonceBelowThreshold
: The provided nonce is below the thresholdnonceDuplicate
: The provided nonce is a duplicate as it has been used in a previous requestnotFound
: The requested information could not be foundrequiredArgumentMissing
: One or more required arguments are missingServer Error
: There was an error processing the requestUnavailable
: The endpoint being called is unavailableunknownError
: An unknown error has occurred
openPositions object[]
A list containing structures with information on open positions.
The list is sorted descending by fillTime.
The symbol of the Futures.
Possible values: [long
, short
]
The direction of the position.
The size of the position.
The average price at which the position was entered into.
The date and time the position was entered into (Deprecated field, fills endpoint for fill time is recommended).
Unrealised funding on the position.
Possible values: [USD
, EUR
, GBP
, USDC
, USDT
, BTC
, ETH
]
Selected pnl currency for the position (default: USD)
Max leverage selected for isolated position.
greeks object
The current Greeks, if this is an option position
Possible values: [success
]
Server time in Coordinated Universal Time (UTC)
Possible values: [accountInactive
, apiLimitExceeded
, authenticationError
, insufficientFunds
, invalidAccount
, invalidAmount
, invalidArgument
, invalidUnit
, Json Parse Error
, marketUnavailable
, nonceBelowThreshold
, nonceDuplicate
, notFound
, requiredArgumentMissing
, Server Error
, Unavailable
, unknownError
]
Possible values: [accountInactive
, apiLimitExceeded
, authenticationError
, insufficientFunds
, invalidAccount
, invalidAmount
, invalidArgument
, invalidUnit
, Json Parse Error
, marketUnavailable
, nonceBelowThreshold
, nonceDuplicate
, notFound
, requiredArgumentMissing
, Server Error
, Unavailable
, unknownError
]
Error description.
Possible values: [error
]
Server time in Coordinated Universal Time (UTC)
{
"result": "success",
"openPositions": [
{
"side": "short",
"symbol": "PI_XBTUSD",
"price": 9392.749993345933,
"fillTime": "2020-07-22T14:39:12.376Z",
"size": 10000,
"unrealizedFunding": 0.00001045432180096817
},
{
"side": "long",
"symbol": "FI_XBTUSD_201225",
"price": 9399.749966754434,
"fillTime": "2020-07-22T14:39:12.376Z",
"size": 20000
},
{
"side": "long",
"symbol": "PF_DEFIUSD",
"price": 570,
"fillTime": "2022-04-20T19:15:25.438Z",
"size": 1,
"unrealizedFunding": -0.0073428045972263895,
"pnlCurrency": "BTC",
"maxFixedLeverage": 5
}
],
"serverTime": "2020-07-22T14:39:12.376Z"
}
{
"result": "error",
"serverTime": "2016-02-25T09:45:53.818Z",
"error": "apiLimitExceeded"
}