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

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

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

Next

  1. View Risk Settings
  2. Cover Short Positions
  3. Close All Positions

See Also