Skip to main content
GET
/
v2
/
entities
/
{entity_id}
/
cross_margin
/
prime
Get Prime Cross Margin Overview (Beta)
curl --request GET \
  --url https://api.prime.coinbase.com/v2/entities/{entity_id}/cross_margin/prime
{
  "control_status": "XM_CONTROL_STATUS_UNSPECIFIED",
  "margin_level": "XM_MARGIN_LEVEL_UNSPECIFIED",
  "evaluated_at": "2023-11-07T05:31:56.000Z",
  "margin_summary": {
    "margin_requirement": "10362.72",
    "margin_requirement_type": "MARGIN_REQUIREMENT_TYPE_UNSPECIFIED",
    "account_equity": "-21542.63",
    "margin_excess_shortfall": "-31891.67",
    "consumed_credit": "22906.34",
    "xm_credit_limit": "1222322.00",
    "xm_margin_limit": "22123.00",
    "consumed_margin_limit": "15000.00",
    "spot_equity": "-21505.91",
    "futures_equity": "-36.71",
    "gross_market_value": "160000.00",
    "net_market_value": "45000.00",
    "net_exposure": "12000.00",
    "gross_leverage": "2.35",
    "spot_equity_breakdown": {
      "cash_balance": "56166.60",
      "long_market_value": "85268.31",
      "short_market_value": "0.00",
      "short_collateral": "0.00",
      "pending_transfers": "15303.77"
    },
    "derivatives_equity_breakdown": {
      "cash_balance": "1000.00",
      "unrealized_pnl": "-252.40",
      "realized_pnl": "123.65",
      "accrued_funding_pnl": "-1.08"
    },
    "risk_netting_info": {
      "dco_margin_requirement": "9243.25",
      "portfolio_margin_requirement": "9003.67",
      "integrated_portfolio_margin_requirement": "10154.67",
      "ineligible_futures_margin_requirement": "194.36",
      "pmr_breakdown": {
        "base_margin": "30188.41",
        "volatility_addon": "0.00",
        "liquidity_addon": "0.49",
        "offset_credit": "-20.29",
        "futures_margin": "0.00"
      },
      "ipmr_breakdown": {
        "base_margin": "30188.41",
        "volatility_addon": "0.00",
        "liquidity_addon": "0.49",
        "offset_credit": "-20.29",
        "futures_margin": "0.00"
      },
      "portfolio_margin_offset_credit_breakdown": {
        "basis_credit": "0",
        "long_short_credit": "0",
        "long_long_credit": "-1.15",
        "short_short_credit": "0",
        "same_tier_credit": "-19.13",
        "total_credit": "-20.29"
      },
      "integrated_portfolio_margin_offset_credit_breakdown": {
        "basis_credit": "0",
        "long_short_credit": "0",
        "long_long_credit": "-1.15",
        "short_short_credit": "0",
        "same_tier_credit": "-19.13",
        "total_credit": "-20.29"
      },
      "xm_positions": [
        {
          "currency": "BTC",
          "market_price": "114531.73",
          "spot_balance": "-0.19652944",
          "spot_balance_notional": "-22508.85",
          "futures_balance": "-0.19652944",
          "futures_balance_notional": "-22508.85",
          "base_requirement": "8925.50",
          "total_position_margin": "9100.00",
          "basis_credit": "-5.25",
          "futures_netted_notional": "11510.00",
          "futures_netting_margin": "120.00",
          "long_amount": "0.75539174",
          "short_amount": "0.95292118",
          "volatility_addon": "0.00",
          "liquidity_addon": "0.49"
        }
      ]
    },
    "health_status": "HEALTH_STATUS_HEALTHY",
    "equity_ratio": "1.02",
    "deficit_ratio": "0.15",
    "margin_thresholds": {
      "deficit_threshold": "0.8",
      "warning_threshold": "0.8",
      "critical_threshold": "1.0",
      "liquidation_threshold": "1.5",
      "margin_thresholds": [
        {
          "margin_level": "XM_MARGIN_LEVEL_UNSPECIFIED",
          "threshold_type": "MARGIN_THRESHOLD_TYPE_UNSPECIFIED",
          "threshold_value": "0.8"
        }
      ]
    },
    "fcm_excess_available_to_return": "5000.00"
  }
}

Path Parameters

entity_id
string
required

Prime entity ID for the XM (cross-margin) customer.

Response

200 - application/json

A successful response.

control_status
enum<string>
default:XM_CONTROL_STATUS_UNSPECIFIED
  • TRADES_AND_WITHDRAWALS: Allowed to trade and withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled.
  • TRADES_ONLY: Allowed to trade but not withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled.
  • SESSION_LOCKED: Not allowed to trade or withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled.
Available options:
XM_CONTROL_STATUS_UNSPECIFIED,
TRADES_AND_WITHDRAWALS,
TRADES_ONLY,
SESSION_LOCKED
margin_level
enum<string>
default:XM_MARGIN_LEVEL_UNSPECIFIED
  • HEALTHY_THRESHOLD: Margin level is healthy.
  • WARNING_THRESHOLD: Margin level is breaching the warning threshold (WT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as defined in the margin methodology). WT is differentiated from DT in that it means margin health is approaching the UMCT.
  • URGENT_MARGIN_CALL_THRESHOLD: Urgent margin call threshold (UMCT): breaching UMCT per margin methodology.
  • LIQUIDATION_THRESHOLD: Liquidation threshold (LT): breaching LT; SESSION_LOCKED may apply and liquidation may commence per margin methodology.
  • DEFICIT_THRESHOLD: Margin level is breaching the deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the margin methodology).
Available options:
XM_MARGIN_LEVEL_UNSPECIFIED,
HEALTHY_THRESHOLD,
WARNING_THRESHOLD,
URGENT_MARGIN_CALL_THRESHOLD,
LIQUIDATION_THRESHOLD,
DEFICIT_THRESHOLD
evaluated_at
string<date-time>

When margin metrics were evaluated.

Example:

"2023-11-07T05:31:56.000Z"

margin_summary
object

Cross-margin account summary and nested breakdowns.