Logo

What is peaq RPC and how do you connect to the peaq network?

Key Takeaways

  • peaq is an EVM-compatible Layer-1 blockchain on Polkadot, focused on DePIN and the Machine Economy.
  • The peaq chain ID is 3338 and the native token is PEAQ.
  • Public RPC endpoints are available but may have rate limits; dedicated nodes offer better reliability.
  • OnFinality provides managed RPC infrastructure for peaq, suitable for production dApps.
  • Always verify RPC endpoint latency and uptime before integrating into your project.
  • WebSocket (WSS) endpoints are recommended for real-time subscriptions.
  • Use a reliable RPC provider to avoid connection drops and ensure data consistency.

What is peaq?

peaq is a Layer-1 blockchain built on Polkadot, designed specifically for Decentralized Physical Infrastructure Networks (DePIN) and the Machine Economy. It enables machines, vehicles, and devices to have their own blockchain identities, transact autonomously, and provide services to users. peaq is EVM-compatible, meaning developers can deploy Solidity smart contracts and use familiar Ethereum tooling.

The network uses a nominated proof-of-stake (NPoS) consensus mechanism and is secured by Polkadot's relay chain. Its native token, PEAQ, is used for transaction fees, staking, and governance. peaq's focus on DePIN makes it a unique platform for projects in mobility, energy, connectivity, and other real-world infrastructure verticals.

  • Chain ID: 3338
  • Native Token: PEAQ
  • Consensus: Nominated Proof-of-Stake (NPoS)
  • EVM Compatibility: Yes
  • Explorer: Subscan (https://peaq.subscan.io)

peaq RPC Endpoints Overview

RPC endpoints allow you to interact with the peaq blockchain by sending JSON-RPC requests. These endpoints are essential for reading blockchain data, submitting transactions, and subscribing to events. peaq supports standard Ethereum JSON-RPC methods, making it easy to integrate with existing Web3 libraries like ethers.js, web3.js, and viem.

Public RPC endpoints are available from various providers, but they often come with rate limits and no guaranteed uptime. For production applications, a managed RPC service or dedicated node is recommended. OnFinality offers reliable peaq RPC endpoints with high availability and low latency.

  • HTTPS Endpoint: For standard requests (e.g., eth_call, eth_getBalance)
  • WebSocket (WSS) Endpoint: For real-time subscriptions (e.g., newHeads, logs)
  • Public endpoints: Free but limited; suitable for testing
  • Managed endpoints: Better performance, support, and SLAs
CriterionWhat to checkWhy it matters
Endpoint TypeHTTPS or WSSHTTPS for one-off requests, WSS for real-time data
Rate LimitsRequests per second (RPS)Prevents abuse; ensure your app stays within limits
LatencyResponse time in millisecondsLow latency improves user experience and sync speed
Uptime SLAGuaranteed uptime percentageCritical for production dApps that require 24/7 availability

How to Connect to peaq RPC

Connecting to peaq is straightforward. You'll need an RPC URL and, optionally, an API key if using a managed provider. Below are steps to connect using popular tools.

For MetaMask or other wallets, add a custom network with the peaq chain ID (3338) and an RPC URL. For programmatic access, use a library like ethers.js:

Public vs. Managed peaq RPC Providers

Public RPC endpoints are free and easy to access, but they often have rate limits (e.g., 100 requests per second) and no guaranteed uptime. They are suitable for development, testing, and low-traffic applications. Examples include endpoints from ChainList and PublicNode.

Managed RPC providers like OnFinality offer dedicated infrastructure with higher rate limits, lower latency, and uptime SLAs. They also provide additional features like archive data, trace APIs, and dedicated nodes. For production DePIN applications that require high throughput and reliability, a managed provider is the better choice.

  • Public: Free, no registration, rate-limited, best-effort uptime
  • Managed: Paid, API key required, higher limits, SLA-backed uptime
  • Dedicated Node: Isolated resources, full control, highest performance

Best Practices for Using peaq RPC

To ensure a smooth experience when interacting with peaq, follow these best practices:

First, always use WebSocket for real-time data to avoid polling. Second, implement retry logic with exponential backoff in case of transient failures. Third, monitor your RPC usage to avoid hitting rate limits. Finally, consider using a dedicated node if your application requires consistent low latency.

  • Use WSS for event subscriptions (e.g., pending transactions, logs)
  • Implement fallback RPC endpoints for redundancy
  • Cache frequently accessed data (e.g., token balances, contract state)
  • Test your application on peaq testnet before mainnet deployment
  • Choose a provider with geographic diversity for lower latency

peaq RPC Troubleshooting

Common issues when connecting to peaq RPC include connection timeouts, rate limiting, and incorrect chain ID. Here's how to diagnose and resolve them.

If you receive a 'rate limit exceeded' error, reduce your request frequency or upgrade to a managed plan. For connection timeouts, check your network firewall and ensure the RPC URL is correct. Always verify the chain ID (3338) when adding peaq to your wallet.

  • Error: 'rate limit exceeded' → Reduce request frequency or use a dedicated node
  • Error: 'connection timeout' → Check firewall settings and RPC URL
  • Error: 'invalid chain ID' → Ensure chain ID is 3338
  • Error: 'nonce too low' → Wait for pending transactions to confirm

Why Choose OnFinality for peaq RPC?

OnFinality provides a robust RPC infrastructure for peaq, designed for developers building DePIN applications. Our managed endpoints offer high availability, low latency, and scalable rate limits. We also support dedicated nodes for projects that need isolated resources.

With OnFinality, you get access to a global network of nodes, automatic failover, and 24/7 support. Whether you're running a small prototype or a large-scale production system, our infrastructure can handle your peaq RPC needs.

  • High-performance peaq RPC endpoints with low latency
  • Scalable rate limits to match your application's growth
  • Dedicated node options for maximum reliability
  • Global node distribution for geographic optimization
  • Easy integration with existing Web3 tools

Frequently Asked Questions

What is the peaq chain ID?

The peaq chain ID is 3338.

What is the native token of peaq?

The native token is PEAQ, used for transaction fees, staking, and governance.

Is peaq EVM-compatible?

Yes, peaq is fully EVM-compatible, allowing you to deploy Solidity smart contracts and use Ethereum tooling.

Where can I find peaq RPC endpoints?

Public endpoints are listed on ChainList and other aggregators. For production use, consider a managed provider like OnFinality.

Does OnFinality support peaq RPC?

Yes, OnFinality offers managed peaq RPC endpoints with high availability and low latency. Visit our peaq network page for details.

rpc peaq
RPC Knowledge Base

Related RPC details

Background

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started