My App

Retrieve comprehensive portfolio details

Retrieve detailed information about your portfolio, including asset balances, positions, total profit and loss (PnL), margin usage, and overall portfolio value.

Requires authentication.

GET
/portfolios/detail
OBSIDIAN-KEY<token>

In: header

OBSIDIAN-SECRET<token>

In: header

Response Body

application/json

application/json

curl -X GET "https://api.dev.obsidian.exchange/portfolios/detail"
{
  "user_address": "string",
  "summary": {
    "collateral_mode": "USDC_COLLATERAL",
    "collateral_margin_balance": "string",
    "cross_margin_balance": "string",
    "cross_margin_usage": "string",
    "cross_account_leverage": "string",
    "in_cross_liquidation": true,
    "free_collateral": "string",
    "total_account_value": "string",
    "total_cross_notional": "string",
    "unsettled_usdc": "string",
    "realized_pnl": "string",
    "total_cross_initial_margin": "string",
    "total_cross_maintenance_margin": "string",
    "collateral_assets": [
      {
        "asset": "string",
        "address": "string",
        "balance": "string",
        "withdrawable_amount": "string",
        "market_value_usd": "string",
        "collateral_value_usd": "string",
        "collateral_value_composition": "string"
      }
    ],
    "has_pending_withdrawal": true,
    "total_unrealized_pnl": "string",
    "total_collateral_value": "string",
    "margin_health": "string",
    "total_isolated_order_reserve": "string"
  },
  "positions": [
    {
      "product_index": 0,
      "product_id": "string",
      "net_size": "string",
      "avg_entry_price": "string",
      "quote_balance": "string",
      "mark_price": "string",
      "index_price": "string",
      "margin_mode": "MARGIN_MODE_CROSS",
      "leverage": "string",
      "margin_balance": "string",
      "initial_margin_requirement": "string",
      "maintenance_margin_requirement": "string",
      "liquidation_price": "string",
      "unrealized_pnl": "string",
      "unsettled_funding": "string",
      "funding_index": "string",
      "isolated_usdc_balance": "string",
      "free_isolated_usdc_balance": "string",
      "in_isolated_liquidation": true
    }
  ],
  "stats": {
    "order_stats": {
      "total_orders": "string",
      "total_done_orders": "string",
      "total_open_orders": "string",
      "total_pending_orders": "string"
    },
    "products": [
      {
        "product_id": "string",
        "order_stats": {
          "total_orders": "string",
          "total_done_orders": "string",
          "total_open_orders": "string",
          "total_pending_orders": "string"
        }
      }
    ],
    "trading_stats": {
      "total_trading_volume": "string"
    },
    "assets": [
      {
        "asset": "string",
        "address": "string",
        "total_deposit": "string",
        "total_withdraw": "string"
      }
    ]
  },
  "maker_fee": "string",
  "taker_fee": "string",
  "private_name": "string",
  "is_market_maker": true,
  "disable_post_order": true,
  "disable_withdrawal": true
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}