Position
Returns the active position for a subaccount and product
Changed onget/v1/position/active
Request
- Base URLhttps://api.ethereal.trade
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
subaccountIdstring uuid required
Id representing the registered subaccount
productIdstring uuid required
Id of product to filter position by
Response
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
}Changes
- info
added the non-success response with the status
- info