Skip to main content
GET
/
v2
/
earn
/
positions_all
Python (SDK)
from compass_api_sdk import CompassAPI


with CompassAPI(
    api_key_auth="<YOUR_API_KEY_HERE>",
) as compass_api:

    res = compass_api.earn.earn_positions_all(owner="0x06A9aF046187895AcFc7258450B15397CAc67400")

    # Handle response
    print(res)
{
  "chains": {
    "arbitrum": {
      "aave": [],
      "pendle_pt": [],
      "vaults": []
    },
    "base": {
      "aave": [
        {
          "balance": "1250.5432100000",
          "deposits": [],
          "pnl": {
            "current_value": "1250.5432100000",
            "realized_pnl": "0.0000000000",
            "total_deposited": "1200.0000000000",
            "total_pnl": "50.5432100000",
            "total_pnl_percent": "4.2119341667",
            "unrealized_pnl": "50.5432100000"
          },
          "reserve_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "reserve_symbol": "USDC",
          "type": "AAVE",
          "withdrawals": []
        }
      ],
      "pendle_pt": [],
      "total_usd_value": "1250.54",
      "vaults": []
    },
    "ethereum": {
      "aave": [],
      "pendle_pt": [],
      "total_usd_value": "5000.12",
      "vaults": [
        {
          "balance": "5000.1234560000",
          "deposits": [],
          "pnl": {
            "current_value": "5000.1234560000",
            "realized_pnl": "0.0000000000",
            "total_deposited": "4800.0000000000",
            "total_pnl": "200.1234560000",
            "total_pnl_percent": "4.1692386667",
            "unrealized_pnl": "200.1234560000"
          },
          "type": "VAULT",
          "underlying_symbol": "USDC",
          "vault_address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB",
          "vault_name": "Steakhouse USDC",
          "withdrawals": []
        }
      ]
    }
  },
  "total_usd_value": "6250.66"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Query Parameters

owner
string
default:0x06A9aF046187895AcFc7258450B15397CAc67400
required

The address of the owner of the earn account.

Response

Successful Response

Positions across all chains, grouped by chain name.

Each chain key maps to an EarnPositionsResponse containing that chain's aave, vaults, and pendle_pt positions with per-chain total_usd_value.

chains
Chains · object
required

Positions grouped by chain. Keys: 'ethereum', 'base', 'arbitrum'.

Example:
{
"arbitrum": { "aave": [], "pendle_pt": [], "vaults": [] },
"base": {
"aave": [
{
"balance": "1250.5432100000",
"deposits": [],
"pnl": {
"current_value": "1250.5432100000",
"realized_pnl": "0.0000000000",
"total_deposited": "1200.0000000000",
"total_pnl": "50.5432100000",
"total_pnl_percent": "4.2119341667",
"unrealized_pnl": "50.5432100000"
},
"reserve_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"reserve_symbol": "USDC",
"type": "AAVE",
"withdrawals": []
}
],
"pendle_pt": [],
"total_usd_value": "1250.54",
"vaults": []
},
"ethereum": {
"aave": [],
"pendle_pt": [],
"total_usd_value": "5000.12",
"vaults": [
{
"balance": "5000.1234560000",
"deposits": [],
"pnl": {
"current_value": "5000.1234560000",
"realized_pnl": "0.0000000000",
"total_deposited": "4800.0000000000",
"total_pnl": "200.1234560000",
"total_pnl_percent": "4.1692386667",
"unrealized_pnl": "200.1234560000"
},
"type": "VAULT",
"underlying_symbol": "USDC",
"vault_address": "0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB",
"vault_name": "Steakhouse USDC",
"withdrawals": []
}
]
}
}
total_usd_value
string | null

Total USD value of all positions across all chains.

Example:

"6250.66"