Integrate Ankr API: Multi-chain Access to 50+ Networks and Advanced Methods
Public RPC endpoints are a bottleneck for any Web3 project. Under peak load of 5–10 requests per second, transactions hang, balances don't refresh, NFTs fail to load. Developers waste time building custom indexers and proxies to bypass rate limits. We solve this by integrating Ankr API – multi-chain access with 50+ networks, archive nodes, and specialized methods. Our experience shows that proper setup reduces development time by 30% and infrastructure costs by up to 60%. The key benefit: you get a single endpoint for all chains.
Why Integrate with Ankr API?
Standard JSON-RPC endpoints are inefficient for complex queries: getting all token balances for an address across all networks requires hundreds of calls and a custom indexer. Ankr solves this with one request. The Advanced API additionally provides NFT data and transaction history without third-party services.
Comparison: Standard RPC vs Ankr
| Feature | Public RPC | Ankr Premium | Ankr Advanced API |
|---|---|---|---|
| Rate limits | 5–10 req/s | 1500+ req/s | 1500+ req/s |
| Archive data | No | Yes | Yes |
| Multi-chain balances | No | No | Yes |
| NFT data | No | No | Yes |
| Transaction history | No | No | Yes |
Why Ankr API is Faster and Cheaper Than Own Infrastructure?
Deploying your own nodes for 5–10 networks requires server costs, maintenance, and sync time. Ankr provides ready-made infrastructure with SLA 99.9%. For startups, it's the only way to get archive data without capital investment. For large projects, combining Ankr with own nodes ensures redundancy. Infrastructure savings in this hybrid approach reach 60% compared to full self-hosting. Development costs drop by 30% thanks to ready SDKs. Monetary savings can be tens of thousands of dollars annually.
Ankr Pricing Comparison
| Parameter | Free | Premium | Enterprise |
|---|---|---|---|
| Rate limit | 30 req/s | 1500 req/s | Custom |
| Archive nodes | No | Yes | Yes |
| Advanced API | No | Yes | Yes |
| SLA | 99.5% | 99.9% | 99.99% |
| Cost | Free | From $99/mo | Custom |
What's Included in Our Work?
- Setting up Premium RPC endpoints for all required networks
- Connecting Advanced API (balances, NFTs, transactions)
- Writing SDK wrapper with retry and exponential backoff
- Load testing (up to 5000 RPS)
- Documentation for usage and monitoring
- Post-launch support (2 weeks free)
- Optional: Gas optimization for smart contracts
How We Set Up Ankr API Integration?
- Analysis: Determine the network list, required methods, and expected load.
- Design: Choose a tariff (Free/Premium/Enterprise) and architecture – fallback with other providers.
- Implementation: Replace RPC URLs and integrate SDK.
import { createPublicClient, http } from "viem"; import { mainnet, polygon, bsc } from "viem/chains"; const ankrKey = process.env.ANKR_API_KEY; const ethClient = createPublicClient({ chain: mainnet, transport: http(`https://rpc.ankr.com/eth/${ankrKey}`), }); // Advanced API via separate SDK import AnkrProvider from "@ankr.com/ankr.js"; const ankr = new AnkrProvider(`https://rpc.ankr.com/multichain/${ankrKey}`); // Get all token balances for an address across all networks in one request const { assets } = await ankr.getAccountBalance({ walletAddress: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", blockchain: ["eth", "polygon", "bsc", "arbitrum"], }); Error Handling and Retry
Ankr returns standard JSON-RPC errors plus codes 429 (rate limit) and -32603 (internal error). Mandatory pattern with exponential backoff:
async function withRetry<T>( fn: () => Promise<T>, maxAttempts = 3, baseDelayMs = 500 ): Promise<T> { for (let attempt = 0; attempt < maxAttempts; attempt++) { try { return await fn(); } catch (err: any) { const isRateLimit = err?.code === 429 || err?.message?.includes("rate limit"); const isRetryable = isRateLimit || err?.code === -32603; if (!isRetryable || attempt === maxAttempts - 1) throw err; await delay(baseDelayMs * 2 ** attempt); } } throw new Error("unreachable"); } Load Testing
We verify SLA under peak loads and set up monitoring via Tenderly or custom metrics. We guarantee stability up to 5000 RPS when combining Ankr with own nodes.
What Limitations Should You Know?
Rate limits depend on the plan: Free – 30 req/s, Premium – up to 1500 req/s. Under high load, we combine Ankr with own nodes. Advanced API does not cover all networks: standard RPC is available for 50+, Advanced for ~20 major ones. Check the current list in Ankr documentation. Advanced API data is not real-time: the indexer updates with 30–60 second delay. For critical financial data on the latest block, use direct RPC.
Typical Use Cases for Ankr API
Ankr is justified if you need: quick start with multi-chain support, archive data without your own node, high-level methods without writing a custom indexer. For loads >1M requests/day, we evaluate economics: own node may pay off faster, but we'll find the optimal solution. For example, an NFT marketplace aggregating collections from multiple networks – Ankr Advanced API cuts query time from seconds to milliseconds. For DeFi projects based on smart contracts, Ankr provides reliable historical data via archive nodes. EVM-compatible networks integrate without extra adapters.
We have been working with Ankr for several years and have completed over 50 integrations for DeFi, NFT marketplaces, and wallets. Want to speed up integration? Contact us – we'll prepare a custom proposal and calculate savings for your project. Request a consultation on Ankr API integration to get a ready solution in 1–3 days.







