Method Signature
Description
Claims accrued rewards from DeFi protocols for an agent. Many protocols distribute reward tokens (like AAVE, COMP, etc.) that accumulate over time and can be claimed.Parameters
Smart account wallet address.
Return Value
Array of claimed rewards, each containing:
token- Token address of the rewardamount- Raw amount claimedamount_float- Human-readable amountcurrent_price_in_underlying- Price in the underlying token
Example
Output
Error Handling
Common Errors
| Error | Cause | Solution |
|---|---|---|
ValidationError: wallet address is required | Missing wallet parameter | Provide a valid wallet address |
GizaAPIError: No rewards to claim | No accrued rewards available | Wait for rewards to accumulate |
GizaAPIError: Agent not active | Agent is not active | Only active agents can claim rewards |
Notes
When to Claim
When to Claim
Rewards accumulate over time from various protocols. There’s no need to claim frequently - the agent will continue earning rewards even if unclaimed.
Reward Types
Reward Types
Different protocols distribute different reward tokens. AAVE distributes AAVE tokens, Compound distributes COMP tokens, etc.