Nadcab logo

Funding Rate APIs vs RPC: What Perp Builders Need

Published on: 3 Nov 2026

Ai Overview

Teams building perpetuals products often ask for a funding rate API when the real problem is broader: they need reliable execution paths, accurate market data, and a clean way to separate the two. You get stale funding displays, unnecessary latency, harder debugging, and higher infrastructure cost. Nadcab RPC pricing is simple to reason about: pay as you go at $0. 375 per 1M compute units, with Nadcab Cloud starting from $10 and no rate tiers.

Key Takeaways

  • A funding rate API is a market-data service, while RPC is the transport layer for blockchain state and transaction execution.
  • Raw RPC is enough for wallet state, contract reads, event subscriptions, and transaction workflows, but usually not ideal for normalized historical funding analytics.
  • Perp teams should separate execution-critical paths from analytics and charting paths so stale market data does not block trading logic.
  • Archive access and WebSockets matter for perp builders that backfill historical state or run reactive bots and dashboards.
  • A multi-chain gateway like Nadcab RPC helps standardize execution infrastructure, while funding data should come from a dedicated indexed or exchange-specific layer.

Teams building perpetuals products often ask for a funding rate API when the real problem is broader: they need reliable execution paths, accurate market data, and a clean way to separate the two. That confusion shows up everywhere in perp stacks. Dashboards try to compute market context from raw chain calls. Bots overuse indexed APIs for state they could read directly from contracts. Backends mix slow historical queries with hot execution traffic on the same connection pool.

The result is fragile architecture. You get stale funding displays, unnecessary latency, harder debugging, and higher infrastructure cost. A funding rate feed and blockchain RPC are both important, but they do different jobs. If you treat them as interchangeable, your system usually breaks at the edges: reconnect storms, inconsistent snapshots, missing history, or failed order workflows during volatility.

This guide maps the boundary clearly. We will look at what a funding rate API actually returns, where raw RPC is enough, where it is not, and how to combine both into a practical stack for dashboards, bots, and trading backends. We will also show how a multi-chain gateway such as Nadcab RPC fits into the execution layer when you need one API key, HTTPS and WebSocket access, archive data on major EVM chains, and cleaner routing across networks.

One API key. 70+ blockchains. Production-grade RPC.

Nadcab RPC gives you HTTPS and WebSocket endpoints across 150+ chain endpoints with smart routing and a 99.99% gateway uptime target. Pay as you go from $0.375 per 1M compute units.

Get Your Free API Key →Browse Supported Chains

What a funding rate API actually provides

A funding rate API usually gives you a normalized view of perp market data that is expensive or awkward to derive in real time from raw blockchain state alone. Depending on the venue and market design, it may expose current funding, predicted funding, historical funding intervals, mark price, index price, open interest, premium, and timestamps aligned to each funding window.

That matters because funding is not just a single on-chain variable. In many perp systems, the value traders care about is the result of a formula applied over time, often using off-chain matching engine data, oracle inputs, internal market accounting, or exchange-specific settlement rules. Reading one smart contract slot does not always tell you the funding rate visible in the UI or charged at the next interval.

In practice, developers use a funding rate API for three common reasons:

  • Normalization: one predictable response shape across markets or venues.
  • Time-series access: historical funding intervals without replaying chain state block by block.
  • Exchange semantics: values that match the venue’s own calculation, rounding, and update cadence.

So a funding rate API is best thought of as a market-data service. It answers questions like:

  • What is the current funding for BTC perpetuals?
  • What was funding over the last 30 intervals?
  • When is the next funding event?
  • How does funding compare across markets?

It is usually not the service you rely on to send transactions, confirm contract state, estimate gas, stream new blocks, or read your own on-chain positions with finality.

RPC vs funding rate API: different jobs in a perp stack

RPC is your transport into blockchain state and transaction execution. A funding rate API is a market-data interface. Perp builders need both, but for different layers.

Workload Best fit Why
Send orders, liquidations, rebalances, keeper transactions RPC You need signed transaction submission, confirmations, gas estimation, and mempool-aware behavior.
Read wallet balances and contract storage RPC Direct state reads are the source of truth for user and protocol state.
Subscribe to new blocks or contract events RPC WebSocket Event streams and block heads are native RPC workloads.
Current displayed funding rate for a market Funding rate API The displayed value may depend on venue-specific calculations and update windows.
Historical funding series across many markets Funding rate API or indexer Replay through raw blocks is possible but costly and slow for production dashboards.
Cross-market analytics and leaderboards Indexed API + storage layer You need denormalized, queryable datasets rather than contract-by-contract reads.

Why developers mix them up

Perp apps sit in the middle of trading and blockchain infrastructure. The frontend wants exchange-like responsiveness, but settlement and collateral often live on-chain. That creates a natural temptation to ask one system to do everything.

RPC feels universal because every chain exposes some form of it. But raw JSON-RPC is not optimized for business-level analytics. It gives you blocks, logs, receipts, traces on some chains, and direct contract calls. It does not automatically give you a clean funding history table or a venue-specific “next funding” value.

If you want a deeper refresher on where RPC fits in the wider stack, Nadcab Labs has a useful primer on Web3 infrastructure: nodes, RPCs, and APIs.

When raw blockchain RPC is enough for your app

Not every perp product needs a dedicated funding data service. For some workloads, plain RPC is enough and often better.

1. You only need protocol state, not exchange-style analytics

If your app shows margin balances, open positions, collateral ratios, account health, or liquidation eligibility, contract reads are usually the cleanest source. You can call view functions or read events directly from the chain.

For example, a dashboard may need:

  • position size
  • entry price
  • collateral balance
  • pending PnL
  • last funding settlement timestamp

Those values often come from protocol contracts, and RPC is the right tool.

2. You compute your own strategy signals

Some bots do not need a fully packaged funding rate feed. They just need raw ingredients from the protocol and maybe an oracle. If your strategy already models funding from contract state, or you only care about a small set of markets on one chain, direct calls can be simpler than adding another dependency.

3. You need low-friction multi-chain execution access

If your keeper, hedger, or settlement service operates across multiple supported chains, a gateway can reduce operational overhead. Nadcab RPC supports 70+ networks and 150+ endpoints with one API key and both HTTPS and WebSocket access. That makes it easier to standardize client code for EVM networks while also handling non-EVM integrations where relevant.

Example: reading block and gas data over Nadcab RPC

The endpoint format is straightforward:

https://rpc.nadcab.com/<network-slug>/<your-api-key>

Here is a working ethers.js example for Ethereum:

import { JsonRpcProvider, formatUnits } from "ethers";

const provider = new JsonRpcProvider(
  "https://rpc.nadcab.com/ethereum/<your-api-key>"
);

async function main() {
  const blockNumber = await provider.getBlockNumber();
  const feeData = await provider.getFeeData();

  console.log("Latest block:", blockNumber);
  console.log("Max fee per gas:", feeData.maxFeePerGas ? formatUnits(feeData.maxFeePerGas, "gwei") : null, "gwei");
  console.log("Max priority fee:", feeData.maxPriorityFeePerGas ? formatUnits(feeData.maxPriorityFeePerGas, "gwei") : null, "gwei");
}

main().catch(console.error);

For teams getting started, the Nadcab RPC docs and API key signup page cover the basics quickly.

Stop overpaying for RPC requests

Nadcab Cloud starts at $10 with no rate tiers: you pay $0.375 per 1M compute units and scale up or down without contracts. Every plan includes archive and WebSocket access on supported networks.

See RPC Pricing →or start free

Where RPC falls short for perp market data

RPC becomes the wrong abstraction when the question you are asking is really analytical, historical, or venue-defined.

Historical funding is rarely a simple point lookup

Suppose you want a chart of funding for the last 90 days across 25 markets. You can reconstruct that from logs and state transitions if the protocol exposes enough information. But now you are running a mini indexing pipeline: block range partitioning, reorg handling, event decoding, backfilling, storage, gap detection, and possibly archive access.

That is not impossible. It is just no longer “use RPC and move on.” It is a data engineering problem.

Displayed funding may come from rules outside a single contract read

In some perp systems, the number shown to users depends on mark price, oracle price, premium sampling, time windows, or venue-specific smoothing. A raw contract call might tell you the last settled value, while the frontend needs the next projected value. Those are different products.

Cross-venue comparisons need normalization

If your app compares funding across multiple markets or execution venues, raw chain access alone does not standardize timestamps, interval lengths, symbols, or market identifiers. You need a normalization layer, whether that is your own indexer or a dedicated funding rate API.

This is also why many teams keep execution and analytics on separate paths: RPC for authoritative state and writes, indexed services for user-facing market intelligence.

Architecture patterns for bots, dashboards, and backends

The cleanest perp architectures treat RPC and funding data as separate services with separate failure budgets.

Pattern 1: Dashboard stack

  • RPC: wallet balances, open positions, claimable rewards, transaction status.
  • Funding/indexed API: current funding, historical funding chart, market rankings.
  • App database: cached user preferences, metadata, precomputed summaries.

Do not make the browser compute historical funding from logs on page load. Fetch normalized history from your backend or data service, and reserve live RPC calls for state that must be current per wallet.

Pattern 2: Execution bot

  • RPC: block heads, mempool-sensitive actions, transaction submission, receipts, failover reads.
  • Funding/indexed API: strategy inputs and screening.
  • Internal risk engine: position sizing, guardrails, timeouts, circuit breakers.

A bot should never block order flow because a charting API is degraded. Keep the strategy input plane separate from the execution plane.

Pattern 3: Backend for trading app

  • RPC gateway: chain reads and writes across supported networks.
  • Indexer or funding data source: denormalized market history.
  • Queue/worker system: retries, reconciliation, settlement tasks.
  • Observability: latency, stale-data alarms, chain lag, websocket reconnect metrics.

If your product spans Ethereum, Arbitrum, Base, and Polygon, using a single gateway pattern can simplify client management. Nadcab Cloud is built for shared auto-scaling endpoints, while Nadcab Core fits teams that want their own nodes behind Nadcab’s routing engine.

Pick the RPC setup that fits your stage

  • Nadcab Cloud: shared, auto-scaling endpoints for dApps and wallets
  • Nadcab Core: bring your own nodes and add our smart routing engine
  • Nadcab Craft: dedicated clusters, custom auth, compliance logging and enterprise SLA
  • Nadcab for Chains: RPC infrastructure for new L1 and L2 networks

Start Building Free →Read the Docs

How to reduce latency and failure points in data pipelines

Most production issues in perp apps are not caused by one bad call. They happen because multiple dependencies are chained together with no clear boundaries.

Use RPC only where freshness matters most

If a value can be five or ten seconds old without harming users, cache it. Save direct RPC traffic for account state, new blocks, pending transaction monitoring, and actions that need current chain data.

Split hot and cold paths

Hot path means order-triggering logic, keeper actions, and liquidation checks. Cold path means charts, rankings, daily reports, and historical funding screens. Put them on different workers, queues, and timeout policies.

Prefer subscriptions for heads and events

Polling works, but it is noisy and often slower to react. For event-driven workflows, WebSocket subscriptions reduce request chatter and simplify state updates. Nadcab RPC offers HTTPS and WebSocket access, which is useful when your bot needs subscriptions but your backend jobs still rely on standard HTTP.

Plan for reorgs and partial failures

Funding displays can tolerate eventual consistency. Liquidation and execution paths usually cannot. Your architecture should distinguish:

  • temporary RPC timeout
  • websocket disconnect
  • stale indexer data
  • archive query slowness
  • transaction accepted but receipt delayed

A practical reference here is Nadcab Labs’ guide to Web3 API integration, authentication, error handling, and RPC setup, which maps the kinds of resilience patterns teams end up needing.

Choosing infrastructure: gateway RPC, archive access, and WebSockets

Perp teams should choose infrastructure based on workload, not just habit.

Gateway RPC for multi-chain execution

If you need one access pattern across many networks, a gateway is usually the simplest starting point. With Nadcab RPC, endpoint structure stays consistent:

https://rpc.nadcab.com/arbitrum/<your-api-key>
https://rpc.nadcab.com/base/<your-api-key>
https://rpc.nadcab.com/polygon/<your-api-key>

That consistency matters when you deploy the same service across several chains or move traffic during incidents. Nadcab RPC uses smart routing across providers and regions, publishes a live status page, and targets 99.99% gateway uptime.

Archive access for backfills and historical state

If you reconstruct long-range funding history, validate historical positions, or query old block state, archive access becomes important. Nadcab provides archive data on major EVM chains including Ethereum, BNB Smart Chain, Polygon, Arbitrum, Optimism, and Base. That can remove a lot of operational friction for teams that do periodic reprocessing or audits.

WebSockets for reactive systems

Bots and live dashboards benefit from WebSocket subscriptions for block heads and contract events. But WebSockets are not a complete strategy by themselves. You still need reconnect logic, idempotent consumers, and a fallback read path over HTTPS if a subscription drops.

Cost model matters too

Some teams accidentally use RPC as a bulk analytics engine and then wonder why spend climbs. A better pattern is to keep RPC for execution-critical reads and writes, and move historical aggregation into storage or indexed APIs. Nadcab RPC pricing is simple to reason about: pay as you go at $0.375 per 1M compute units, with Nadcab Cloud starting from $10 and no rate tiers.

If you are deciding between managed gateway access and owning more of the stack, this Nadcab Labs article on self-hosted vs managed RPC is a helpful framework.

A practical checklist for perp teams before launch

Before you ship, answer these questions explicitly. Most avoidable failures come from skipping one of them.

Question If yes If no
Do you need current wallet or protocol state? Use RPC reads from chain. Consider serving from cache or your app database.
Do you need historical funding across many intervals or markets? Use a funding rate API or your own indexer. Direct contract reads may be enough.
Will a stale market-data response block execution? Separate strategy data from execution path. You can tolerate more caching.
Do you backfill old block state? Make sure archive access is available. Standard RPC may be enough.
Do you operate across multiple chains? Standardize endpoint and client configuration. Single-chain tuning may be simpler.
Do you need enterprise controls or dedicated clusters? Evaluate dedicated infrastructure options. Shared auto-scaling endpoints may be fine.

Launch checklist

  1. Define which endpoints are execution-critical and which are analytics-only.
  2. Document the source of truth for funding, PnL, collateral, and liquidation thresholds.
  3. Set separate timeout and retry policies for RPC, WebSocket streams, and indexed data APIs.
  4. Backtest with realistic reorg, disconnect, and stale-data scenarios.
  5. Use archive-capable infrastructure if you perform historical reconciliation.
  6. Monitor chain lag, websocket reconnects, failed sends, and data freshness independently.
  7. Publish internal runbooks for fallback modes during degraded market-data conditions.

For teams that outgrow shared endpoints, Nadcab Craft offers dedicated clusters, custom auth, compliance logging, and enterprise SLA options, while Nadcab for Chains is aimed at new L1 and L2 ecosystems that need RPC as part of their own infrastructure rollout.

If you are building the wider product around the trading stack, Nadcab also shares practical engineering guidance through services such as DeFi development, smart contract audit, and Web3 development services.

Final Thoughts

A funding rate API and RPC are not competing tools. They solve different layers of the same perp product. Use RPC for what only chain access can do well: reads of authoritative contract state, subscriptions, transaction submission, confirmations, and multi-chain execution plumbing. Use a funding rate API or indexing layer for what trading products need on top: normalized history, venue-specific funding semantics, and cross-market analytics.

The healthiest architecture is usually split by responsibility. Keep your execution plane lean and dependable. Keep your market-data plane normalized and cache-friendly. If you need a clean execution layer across supported networks, Nadcab RPC gives teams a consistent endpoint model, one API key, HTTPS and WebSocket access, archive data on major EVM chains, and products that scale from shared gateways to dedicated clusters. That separation will save you debugging time long before it saves you infrastructure spend.

Ship faster on infrastructure you don’t have to babysit

Get one API key for 70+ networks, HTTPS and WebSocket endpoints, smart routing and a live status page. Building something bigger? Our blockchain team can design and run the full stack with you.

Get Your Free API Key →Talk to Our Experts

Pay as you go · No rate tiers · 99.99% gateway uptime target

Frequently Asked Questions

Q1.Can I get funding rates directly from blockchain RPC?

A1.

Sometimes, but not always in the form your app needs. RPC can read raw contract state and events, which may let you reconstruct settled funding. But the displayed or predicted funding rate often depends on venue-specific formulas, time windows, or normalized historical processing, which are better served by a funding rate API or your own indexer.

Q2.When is RPC enough for a perpetuals dashboard?

A2.

RPC is usually enough when your dashboard focuses on wallet balances, open positions, collateral, transaction status, and protocol state from smart contracts. It becomes less suitable when you need long historical funding charts, cross-market comparisons, or exchange-style market summaries that require indexing and normalization beyond raw chain reads.

Q3.Why should bots separate funding data from execution infrastructure?

A3.

Because the two have different failure modes and latency requirements. Strategy inputs like funding history can often tolerate caching or short delays, while transaction submission, gas estimation, and receipt monitoring cannot. If a bot depends on one blended path, a stale data feed or timeout can block execution at the worst time.

Q4.Do I need archive RPC for perpetuals apps?

A4.

You need archive access if your system backfills old block state, replays historical position logic, or reconstructs data from earlier chain points without relying solely on event snapshots. For basic live reads and writes, standard RPC is often enough. For audits, reconciliation, and deep history, archive access is much more practical.

Q5.How do I choose between shared RPC and dedicated infrastructure?

A5.

Start with your workload. Shared auto-scaling endpoints are a good fit for many apps launching across multiple chains. If you need tighter control, dedicated capacity, custom auth, compliance logging, or enterprise support boundaries, dedicated infrastructure becomes more attractive. The right choice depends on traffic shape, governance requirements, and how much of the node layer you want to own.

Explore Services

Reviewed by

Aman Vaths profile photo

Aman Vaths

Founder of Nadcab Labs

Aman Vaths is the Founder & CTO of Nadcab Labs, a global digital engineering company delivering enterprise-grade solutions across AI, Web3, Blockchain, Big Data, Cloud, Cybersecurity, and Modern Application Development. With deep technical leadership and product innovation experience, Aman has positioned Nadcab Labs as one of the most advanced engineering companies driving the next era of intelligent, secure, and scalable software systems. Under his leadership, Nadcab Labs has built 2,000+ global projects across sectors including fintech, banking, healthcare, real estate, logistics, gaming, manufacturing, and next-generation DePIN networks. Aman’s strength lies in architecting high-performance systems, end-to-end platform engineering, and designing enterprise solutions that operate at global scale.