Skip to main content
GET
/
api
/
v1
/
user
/
portfolio
Get user portfolio
curl --request GET \
  --url https://api.ekiden.fi/api/v1/user/portfolio \
  --header 'Authorization: Bearer <token>'
{
  "positions": [
    {
      "epoch": 100,
      "funding_index": 1000,
      "margin": 5000,
      "market_addr": "0x42f1ee729364e2095a2f08019a56b310ba8980288dd1c6bbbd769f19182c692c",
      "price": 50000,
      "seq": 12345,
      "sid": "pos_123",
      "size": 1000,
      "timestamp": 1640995200,
      "timestamp_ms": 1640995200000
    }
  ],
  "summary": {
    "collateral_notional": 125000,
    "maintenance_margin_required": 2500,
    "total_available_balance": 17500,
    "total_balance": 25000,
    "total_margin_used": 7500,
    "total_positions": 3,
    "total_vaults": 2,
    "unrealized_funding_total": -250,
    "unrealized_pnl_total": 1500
  },
  "user_addr": "0x1234567890abcdef...",
  "vault_balances": [
    {
      "asset_addr": "0x9876543210fedcba...",
      "balance": 10000,
      "id": "1"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Successfully retrieved user portfolio

positions
object[]
required

List of all user's positions

summary
object
required

Portfolio summary

user_addr
string
required

User's address

Example:

"0x1234567890abcdef..."

vault_balances
object[]
required

List of all user's vault balances