Making Your First API Call
Ready to get started? Here’s a simple example of fetching swap quotes:Common API Endpoints
Here’s a quick reference of the most commonly used endpoints:Common Parameters
These parameters are used across multiple endpoints:Response Time Expectations
Understanding typical response times helps you build better user experiences:Best Practices
Follow these best practices to build robust integrations:- Always validate quote_id before requesting deposit generation
- Poll status endpoint every 10-30 seconds, not more frequently
- Cache assets list for at least 20 seconds to reduce API calls
- Use streaming quotes for better UX with real-time updates
- Handle partial quote failures gracefully - some protocols may fail while others succeed
- Implement exponential backoff for failed requests
- Save transaction hashes immediately after broadcast
- Monitor trace IDs for debugging production issues
- Set reasonable slippage (1.5-3% for most swaps)
- Validate addresses before submitting to quote endpoint
Protocol Support by Ecosystem
Different protocols support different blockchain ecosystems:Error Code Categories
Understanding error codes helps with debugging:- 400-level: Client errors (validation, parameters, quotes)
- 403: Authentication failures
- 404: Resources not found (quotes, traces)
- 500-level: Server errors (internal, external API failures)
Next Steps
Now that you understand the basics, explore the detailed endpoint documentation to learn about:- Fetching and comparing swap quotes
- Generating unsigned transactions
- Tracking swap status
- Managing multi-chain assets and balances