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.
Overview
Important safety considerations when using AI assistants for Yield.xyz development. Follow these guidelines to protect your integration and users.Security Guardrails
Never Share API Keys
Never Share Private Keys or Seed Phrases
Don’t Share User Data
Code Review Guardrails
Always Verify Generated Code
Check API Calls
Verify endpoints and parameters match the API Reference
Common AI Mistakes
Watch for these common issues when using AI with Yield.xyz:Outdated API patterns
Outdated API patterns
AI may suggest v1 API patterns or deprecated endpoints. Always verify against the current API docs.v1 (deprecated):v2 (current):
Missing error handling
Missing error handling
AI often generates happy-path code. Add proper error handling for:
- Network failures
- API errors (400, 401, 404, 429, 500)
- Transaction failures
- Wallet connection issues
Hardcoded values
Hardcoded values
Watch for hardcoded:
- API URLs (should use environment variables)
- Yield IDs (may change or be deprecated)
- Network names
- Token addresses
Incorrect async handling
Incorrect async handling
Verify proper await/async patterns:
Wrong transaction execution order
Wrong transaction execution order
Yield.xyz returns transactions that must be executed in order (synchronous pattern). Don’t parallelize:
Missing passthrough for manage actions
Missing passthrough for manage actions
The passthrough field is required for manage actions and comes from the balance endpoint:
Verification Checklist
Before deploying AI-generated code:API Endpoints
- Correct base URL (
https://api.yield.xyz) - Correct HTTP methods
- Correct path parameters
- Correct request body structure
Authentication
- API key in
x-api-keyheader - Key loaded from environment
- No hardcoded keys
Error Handling
- All API calls have try/catch
- Rate limiting handled
- User-friendly error messages
Transaction Flow
- Sequential execution
- Hash submission after each tx
- Status polling implemented
Testing AI-Generated Code
Resources
API Reference
Official API documentation
OpenAPI Spec
Machine-readable API specification
Swagger UI
Interactive API explorer
Security Docs
Security best practices
Next Steps
Quickstart
Integration guide
Security
Security best practices

