Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Understanding API error responses and codes
{ "error": { "code": "INSUFFICIENT_BALANCE", "message": "Insufficient balance for transaction", "details": { "required": "1.5 SOL", "available": "1.2 SOL" } } }
INVALID_ASSET
AMOUNT_TOO_SMALL
INSUFFICIENT_LIQUIDITY
INVALID_QUOTE
INVALID_SIGNATURE
INSUFFICIENT_BALANCE
ROUTING_UNAVAILABLE
INVALID_API_KEY
EXPIRED_API_KEY
RATE_LIMIT_EXCEEDED
async function retryRequest(fn, maxRetries = 3) { for (let i = 0; i < maxRetries; i++) { try { return await fn(); } catch (error) { if (i === maxRetries - 1) throw error; await new Promise(r => setTimeout(r, 1000 * Math.pow(2, i))); } } }