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


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

    res = compass_api.earn.earn_balances(chain=models.V2EarnBalancesChain.BASE, owner="0x01E62835dd7F52173546A325294762143eE4a882")

    # Handle response
    print(res)
{
  "earn_account_address": "<string>",
  "balances": {},
  "total_usd_value": "<string>"
}

Authorizations

x-api-key
string
header
required

Your Compass API Key. Get your key here.

Query Parameters

chain
enum<string>
default:base
required
Available options:
arbitrum,
base,
ethereum
owner
string
default:0x01E62835dd7F52173546A325294762143eE4a882
required

The address of the owner of the earn account.

Response

Successful Response

Response containing earn account balances and transfer history.

earn_account_address
string
required

The derived earn account address.

balances
Balances · object

Token balances keyed by token symbol.

total_usd_value
string | null

Total USD value of all balances (sum of available values).