latestOpenAPI 3.1.02026-08-1051108155.9 KB
6e6f8dad92bf
Position
Returns a filtered list of positions for a given subaccount
get/v1/position
Query parameters
order'asc' | 'desc'
Direction to paginate through objects
limitinteger
Limit the number of objects to return
cursorstring
Pointer to the current object in pagination dataset
subaccountIdstring uuid required
Id representing the registered subaccount
productIdsstring[]
Array of product ids to filter for
openboolean
Example:true
Include or exclude open positions (i.e. non-zero size)
orderBy'size' | 'createdAt' | 'updatedAt' | 'realizedPnl'
Example:size
Order by field
createdAfterinteger
Filter by order fills created before timestamp exclusive (ms since Unix epoch)
createdBeforeinteger
Filter by order fills created before timestamp inclusive (ms since Unix epoch)
side0 | 1
Side as either BUY (0) or SELL (1)
isLiquidatedboolean
Filter by liquidated positions
Response
Example response
{
"data": [
{
"cost": "9.3",
"createdAt": 1712019600000,
"feesAccruedUsd": "0.5",
"fundingAccruedUsd": "10.5",
"fundingUsd": "1.35",
"id": "9036443a-441a-4a66-87f2-bd5c44cdca7a",
"isLiquidated": true,
"liquidationPrice": "1200.5",
"productId": "9c6bf870-a8ce-4de3-820b-542fd5c049ba",
"realizedPnl": "-12.5",
"size": "1.5",
"totalDecreaseNotional": "1050.0",
"totalDecreaseQuantity": "2.5",
"totalIncreaseNotional": "1000.0",
"totalIncreaseQuantity": "2.5",
"unrealizedPnl": "4.2",
"updatedAt": 1712019600000,
"wasDeleveraged": true
}
],
"hasNext": true
}