Integration with QuickNode API
When your DeFi service processes thousands of requests per minute, public RPC endpoints become a bottleneck. Rate limits, throttling, no SLA — unacceptable for production. QuickNode API is a key Web3 infrastructure component providing dedicated nodes with guaranteed throughput. Proper integration squeezes the most out of every credit. We have 15+ integrations over 3+ years. In one project with 1200 RPS load on Ethereum, we reduced latency by 40% and saved 35% credits through caching and batching. QuickNode SLA guarantees 99.9% uptime (QuickNode Documentation).
Case: DeFi aggregator with 1200 RPS load
The project: a DeFi aggregator processing user transactions via smart contracts. The initial architecture used public RPCs — latency reached 450 ms, periodic timeouts. After migrating to QuickNode with configured failover, latency dropped to 120 ms, 5xx errors disappeared. Additionally, batching and caching reduced credits by 35%, saving ~$1,750 per month. Failover to Infura triggered twice in a month — automatic switching when error rate exceeded the threshold.
Why QuickNode is faster than public RPCs?
Dedicated endpoint — no sharing traffic with others. Your requests don't compete with thousands of other clients on the same IP. Latency drops 2–3 times, throughput remains predictable even under peak load. For example, for a DeFi aggregator with a thousand active users, response time fell from 450 ms to 120 ms.
Add-ons — ready-made overlays: NFT API, Token API, DeFi stats, Trace API. Instead of aggregating data yourself, connect a ready endpoint. Getting a wallet's NFT balance in one request without external indexers.
Streams — push notifications about new blocks, transactions, events. Instead of polling, configure WebSocket with filters right in QuickNode's dashboard. This reduces server load and simplifies event handling.
Multi-chain — one account, dozens of networks. The same SDK works with Ethereum, Solana, Polygon, Arbitrum, Base without code changes.
What Add-ons are available and how to connect them?
| Add-on | Purpose | Example method |
|---|---|---|
| NFT API | Balance, metadata, collections | qn_fetchNFTs |
| Token API | Transfers, balances, prices | qn_getWalletToken |
| DeFi Stats | APY, TVL, pools | qn_getDefiStats |
| Trace API | Transaction tracing | debug_traceTransaction |
Connecting Add-ons in QuickNode dashboard is one click. After activation, they are available via the same endpoints with methods prefixed with qn_. Example request:
import { createPublicClient, http } from 'viem' import { mainnet } from 'viem/chains' const client = createPublicClient({ chain: mainnet, transport: http('https://your-endpoint.quiknode.pro/YOUR_KEY/'), }) // Getting wallet's NFT collection via QuickNode NFT API const nfts = await client.request({ method: 'qn_fetchNFTs' as any, params: [{ wallet: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', page: 1, perPage: 20, }], }) How to set up Streams for notifications?
Streams are configured in QuickNode dashboard. Choose stream type (new blocks, pending transactions, specific events), destination (webhook, Kafka, S3) and filters. This is an alternative to running your own WebSocket server — less code, but less control.
For webhook destination, QuickNode sends POST with batched records. Important: implement idempotency on your side — QuickNode may send duplicates on retry.
How to save credits with QuickNode?
QuickNode charges not per request but per credits. Simple eth_blockNumber is 20 credits, wide-range eth_getLogs up to 200+ credits. Expensive methods: debug_traceTransaction (500 credits), trace_block (200+ credits). Below is a table of some method costs:
| Method | Credits (approx) | Optimization tip |
|---|---|---|
eth_blockNumber |
20 | No need to cache, but can be batched |
eth_getBalance |
30 | Cache for 15 minutes |
eth_getLogs (wide range) |
200+ | Narrow filters by blocks and addresses |
debug_traceTransaction |
500 | Use only for debugging |
trace_block |
200+ | Analyze only relevant transactions |
Credit saving strategies:
- Cache static data:
decimals(),symbol(), historical blocks. - Use
eth_getLogswith narrow filters, don't scan the entire range. - For polling, cheaper to use WebSocket subscriptions.
- Batch requests via JSON-RPC batch: multiple calls in one HTTP request.
// JSON-RPC batch: one HTTP request instead of three const [block, balance, gasPrice] = await Promise.all([ httpClient.getBlock({ blockNumber: 20000000n }), httpClient.getBalance({ address: '0x...' }), httpClient.getGasPrice(), ]) // viem automatically batches when transport has batch option At a load of 5 million credits per month, caching and batching optimization yields 35–40% savings, i.e., 1.75–2 million credits. That's roughly $1,750–$2,000 monthly. Optimization significantly reduces infrastructure costs. Order an individual audit of your RPC infrastructure.
Monitoring and failover
QuickNode provides metrics in the dashboard, but for production you need your own monitoring. Here's a wrapper example with failover:
class RpcClient { private endpoints: string[] private currentIndex = 0 async request(method: string, params: any[]) { for (let attempt = 0; attempt < this.endpoints.length; attempt++) { try { const result = await this.callEndpoint( this.endpoints[this.currentIndex], method, params ) return result } catch (err) { // Rotate to next endpoint on error this.currentIndex = (this.currentIndex + 1) % this.endpoints.length if (attempt === this.endpoints.length - 1) throw err } } } } For serious production: keep two endpoints — QuickNode primary + Alchemy/Infura fallback. Automatic failover when error rate or latency exceeds thresholds. See QuickNode Documentation for details.
Process of work
Turnkey QuickNode integration stages:
- Analytics — assess current architecture, profile load, estimate credit budget.
- Design — choose plan, configure endpoints, set up add-ons and streams.
- Implementation — integrate via viem/ethers.js, configure batching, caching, WebSocket.
- Testing — load test (up to 2000 RPS), verify failover, monitor credits.
- Deployment — go live, train team, document.
What's included
- Setting up dedicated QuickNode endpoint (HTTPS + WSS) for one or multiple networks.
- Connecting Add-ons (NFT API, Token API, DeFi Stats, Trace API) as needed.
- Configuring Streams for block, transaction, and event notifications.
- Implementing failover (QuickNode + backup RPC) with automatic switching.
- Monitoring credits, latency, and error rate (Grafana, Prometheus on request).
- Optimizing requests: caching, batching, WebSocket subscriptions.
- Integration documentation and team training.
Contact us for a project evaluation — we'll prepare a transparent estimate and timeline. We guarantee 99.9% SLA on the configured infrastructure.







