latestOpenAPI 3.1.02026-08-1051108155.9 KB

6e6f8dad92bf

Position

Returns the active position for a subaccount and product

get/v1/position/active

Query parameters

subaccountIdstring uuid required

Id representing the registered subaccount

productIdstring uuid required

Id of product to filter position by

Response

coststring decimal required

Current cost of the position in USD expressed as a decimal (precision: 9)

createdAtinteger required

Position creation timestamp (ms since Unix Epoch)

feesAccruedUsdstring decimal required

Fees accrued in USD expressed as a decimal (precision: 9)

fundingAccruedUsdstring decimal required

Charged and applied funding on position, negative if paid, expressed as a decimal (precision: 9)

fundingUsdstring decimal required

Charged but unapplied funding on position, negative if paid, expressed as a decimal (precision: 9)

idstring uuid required

Id representing the position

isLiquidatedboolean required

Whether the position was liquidated

liquidationPricestring decimal

Product price at the time of liquidation (undefined if not liquidated, precision: 9)

productIdstring uuid required

Id of product to this position belongs to

realizedPnlstring decimal required

Realized PnL in USD expressed as a decimal (precision: 9)

side0 | 1 required
sizestring decimal required

Position size in native units expressed as a decimal (precision: 9)

totalDecreaseNotionalstring decimal required

Cumulative USD value of all position decreases expressed as a decimal (precision: 9)

totalDecreaseQuantitystring decimal required

Cumulative quantity of all position decreases expressed as a decimal (precision: 9)

totalIncreaseNotionalstring decimal required

Cumulative USD value of all position increases expressed as a decimal (precision: 9)

totalIncreaseQuantitystring decimal required

Cumulative quantity of all position increases expressed as a decimal (precision: 9)

unrealizedPnlstring decimal

Unrealized PnL in USD (negative if loss, positive if profit) approximated against the latest mark price, expressed as a decimal (precision: 9)

updatedAtinteger required

Position last updated timestamp (ms since Unix Epoch)

wasDeleveragedboolean required

Whether the position has any associated deleverage records

Example response

{
  "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
}