Documentation Index
Fetch the complete documentation index at: https://yieldxyz.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Error Response Format
All API errors follow a consistent JSON structure:Common Errors
400 Bad Request
Client-side errors due to invalid parameters. Do not retry — fix the request first.INSUFFICIENT_BALANCE
INSUFFICIENT_BALANCE
The user’s wallet does not have enough tokens to complete the transaction.Root cause: Attempting to stake or deposit more than available balance.Solution: Check user balance before creating actions. Validate that
balance >= amount + gas.INVALID_AMOUNT
INVALID_AMOUNT
Amount is below minimum or above maximum for the yield.Root cause: Not validating against yield metadata before submission.Solution: Fetch yield metadata and validate
amount >= minDeposit before calling the action endpoint.INVALID_ADDRESS
INVALID_ADDRESS
Malformed or incorrectly formatted address.Root cause: Copy-paste errors, incorrect network address format, or truncated addresses.Solution: Validate address format client-side before API calls. Use checksummed addresses for EVM chains.
401 Unauthorized
API key is missing, expired, revoked, or incorrect. Do not retry until authentication is fixed.- API key not included in
x-api-keyheader - Key was rotated but integration not updated
- Using a test key against production (or vice versa)
403 Forbidden
Access denied due to permissions, plan restrictions, or geoblocking.- Yield Not Enabled
- Geoblocking
- Read-Only Key
Most common 403 error. The requested yield is not activated for your API key.Root causes:
- Trial plan without access to this yield
- Yield requires approval or enterprise plan
- Integration not yet activated for your project
404 Not Found
The requested resource does not exist.- Mistyped or invalid
yieldId - Yield has been deprecated or removed
- Using an internal/test yield ID in production
GET /v1/yields or GET /v1/yields/{yieldId}.
429 Rate Limited
Request quota exceeded. Retry with backoff.- Automated scripts without throttling
- High-frequency polling during integration testing
- Burst traffic from multiple concurrent requests
retryAfter value. Consider upgrading your plan for higher limits.
5xx Server Errors
Temporary server-side issues. Retry with exponential backoff.Other Frequently Reported Issues
Transaction failures
Transaction failures
Transactions may fail due to:
- Expired signatures or tokens
- Incorrect transaction construction
- Insufficient gas fees
- Nonce conflicts
Stale yield data
Stale yield data
APY or availability data may be temporarily stale during network congestion or protocol updates.Solution: Implement reasonable caching (5-15 minutes for APY data). Re-fetch before critical operations.
Cross-chain routing failures
Cross-chain routing failures
Bridge or swap steps may fail due to liquidity or slippage issues.Solution: Check route availability before executing. Handle partial failures gracefully in multi-step flows.
Retry Strategy
Which Errors to Retry
| Status Code | Retry? | Action |
|---|---|---|
| 400 | No | Fix request parameters |
| 401 | No | Fix API key |
| 403 | No | Check permissions, plan, or geoblocking |
| 404 | No | Verify resource exists |
| 429 | Yes | Wait for retryAfter, then retry |
| 5xx | Yes | Exponential backoff |
Exponential Backoff Implementation
Best Practices
Validate before calling
Check balances, amounts, and addresses client-side before API calls
Verify yield access
Confirm your API key has access to specific yields before integration
Retry only transient errors
Only retry 429 and 5xx errors. All others require fixes.
Log everything
Log all errors with timestamps for debugging and support escalation
Show actionable messages
Translate API errors into user-friendly guidance
Contact support with details
Include error codes, timestamps, and request IDs when escalating
Next Steps
Rate Limits
Understand rate limiting by plan
Contact Support
Get help with persistent errors

