View Positions
Overview
Once you fund your collateral account and place a trade order, you can view your net open positions. Your net open positions are listed by asset and include the following information:
- Net Open Position - The balance of long positions and short positions for the asset.
- Net Open Position Value - The current value of the NOP in USD.
- Short Margin Position Notional Limit - The face value limit in USD for short positions using this asset.
- Long Margin Position Notional Limit - The face value limit in USD for long positions using this asset.
- Unrealized PnL - the sum of all your profits and losses for the asset in USD. This value may change with market movements.
Prerequisites
View Net Open Positions
Endpoint: Get Net Open Margin Position
1 2 3 4 5 6
export ACCOUNT_ID="<YOUR_ACCOUNT_ID>" export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>" curl -X GET \ https://app.bitgo-test.com/api/prime/trading/v1/accounts/$ACCOUNT_ID/margin/netopenpositions \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $ACCESS_TOKEN"
Step Result
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
{ "netOpenPositions": [ { "currency": "BTC", "enterpriseId": "63925f940c259a00061853808ffea830", "netOpenPosition": -2.3242, "netOpenPositionValue": -124017.22, "shortMarginPositionNotionalLimit": { "quantity": 1000000, "currency": "USD" }, "longMarginPositionNotionalLimit": { "quantity": 1000000, "currency": "USD" }, "unrealizedPnL": { "quantity": 1200, "currency": "USD" }, "lastModified": "2024-07-29T21:13:09.000Z" } ] }