Overview

Once you have funded your collateral account, you can view your risk settings and risk profile.

Your risk profile can help you make trading decisions to prevent a margin call or liquidation. Your risk profile lists your:

  • Net Open Position - The difference between your total open long positions and your total open short positions.
  • Collateral - Assets currently in your collateral account.
  • Unrealized Profit and Loss (PnL) - The current profit or loss on your open positions.
  • Margin Balance - Assets currently in your margin account.
  • Margin Requirement - The minimum amount of funds required to maintain your open positions.
  • Margin Utilization Percentage - The percentage of available margin that you're using for margin trading.

BitGo determines your risk settings limits, which include the following:

  • Total Short Position Limit - The total amount (in USD) that you can short.
  • Margin Call Percentage - The percentage at which a margin call triggers.
  • Liquidation Threshold Percentage - The percentage at which your position falls undercollateralized. If you reach this limit, BitGo automatically closes all your positions at the best available rate.
  • Margin Requirement Percentage - The percentage that BitGo multiplies your total short position by to calculate your margin requirement.

Prerequisites

Cookbook

Need just the steps? Expand the cookbook below to get started:

View Margin Risk Settings and ProfileOpen Cookbook

View Risk Profile

Endpoint: Get Margin Risk Profile

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/riskprofile \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Step Result

{
  "riskProfile": {
    "netOpenPosition": {
      "quantity": "1000000",
      "currency": "USD"
    },
    "transferredCollateral": {
      "quantity": "500000",
      "currency": "USD"
    },
    "unrealizedPnL": {
      "quantity": "200000",
      "currency": "USD"
    },
    "marginBalance": {
      "quantity": "700000",
      "currency": "USD"
    },
    "marginRequirement": {
      "quantity": "600000",
      "currency": "USD"
    },
    "marginUtilizationPercentage": 0.85
  }
}

View Risk Settings

Endpoint: Get Margin Risk Settings

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/risksettings \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Step Result


{
  "totalShortPositionLimit": {
    "quantity": "1000000",
    "currency": "USD"
  },
  "marginCallPercentage": "1.1",
  "liquidationThresholdPercentage": "1.2",
  "marginRequirementPercentage": "0.2",
  "minimumTransferredCollateral": {
    "quantity": "50000",
    "currency": "USD"
  }
}

Next

  1. Cover Short Positions
  2. Close All Positions

See Also