Method Signature
Description
Calculates the Annual Percentage Rate (APR) realized by an agent over a specified time period. Optionally provides sub-period breakdown for detailed analysis.Parameters
Smart account wallet address.
Start date for APR calculation (ISO datetime format).Example:
"2024-01-01T00:00:00Z"End date for APR calculation (ISO datetime format).Example:
"2024-02-01T00:00:00Z"If
true, uses the exact end_date as the last performance point.Return Value
Annual Percentage Rate (as a percentage, e.g., 5.25 for 5.25%).
Optional breakdown of APR by sub-periods, each containing:
start_date- Period startend_date- Period endreturn_- Return for this periodinitial_value- Value at start of period
Example
Output
Error Handling
Notes
APR Calculation
APR Calculation
APR is calculated based on the actual returns realized by the agent, accounting for deposits and withdrawals during the period.
Minimum Data Required
Minimum Data Required
APR calculation requires at least two performance data points. If the agent was recently activated, the APR may not be available yet.