curl "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../apr?start_date=2024-01-01T00:00:00Z"
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../apr?start_date=2024-01-01T00:00:00Z'
);
const data = await response.json();
{
"apr": 5.5,
"sub_periods": [
{
"start_date": "2024-01-01T00:00:00Z",
"end_date": "2024-01-15T00:00:00Z",
"return_": 0.02,
"initial_value": 1000.0
}
]
}
{
"detail": "Not enough historical data for APR calculation"
}
Agents
Get Wallet APR
Get the APR for a wallet
GET
/
api
/
v1
/
{chain_id}
/
wallets
/
{wallet}
/
apr
curl "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../apr?start_date=2024-01-01T00:00:00Z"
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../apr?start_date=2024-01-01T00:00:00Z'
);
const data = await response.json();
{
"apr": 5.5,
"sub_periods": [
{
"start_date": "2024-01-01T00:00:00Z",
"end_date": "2024-01-15T00:00:00Z",
"return_": 0.02,
"initial_value": 1000.0
}
]
}
{
"detail": "Not enough historical data for APR calculation"
}
SDK Alternative: Use
agent.apr(options?) for a simpler TypeScript interface. See SDK docsDescription
Retrieves the Annual Percentage Rate (APR) for a wallet based on its historical performance.Path Parameters
Query Parameters
Response
curl "https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../apr?start_date=2024-01-01T00:00:00Z"
const response = await fetch(
'https://partners-backend-1038109371738.europe-west1.run.app/api/v1/8453/wallets/0x.../apr?start_date=2024-01-01T00:00:00Z'
);
const data = await response.json();
{
"apr": 5.5,
"sub_periods": [
{
"start_date": "2024-01-01T00:00:00Z",
"end_date": "2024-01-15T00:00:00Z",
"return_": 0.02,
"initial_value": 1000.0
}
]
}
{
"detail": "Not enough historical data for APR calculation"
}