Logo
RPC Assistant

Polygon RPC Node: Endpoints, Chain Settings, and How to Choose a Provider

摘要

A Polygon RPC node is an endpoint that lets your dApp or wallet communicate with the Polygon network via JSON-RPC. This page covers the official chain settings for Polygon mainnet and Amoy testnet, lists public and paid RPC providers, and gives a decision checklist for selecting infrastructure that fits your workload.

Polygon RPC Node Decision Checklist

Before selecting a Polygon RPC node provider, evaluate these criteria:

CriterionWhat to checkWhy it matters
Workload typeRead-heavy (data fetching) vs write-heavy (transaction submission)Public RPCs may throttle writes; dedicated nodes handle high throughput better
Rate limitsRequests per second (RPS) and daily/monthly capsExceeding limits causes 429 errors and dropped requests
Archive dataDoes the provider offer archive nodes with historical state?Needed for block explorers, analytics, and certain dApp features
WebSocket supportWSS endpoint for real-time subscriptionsEssential for DEXs, NFT mints, and event listeners
Geographic distributionNodes in multiple regionsReduces latency and improves failover
Testnet availabilityAmoy testnet RPC for developmentRequired for staging and testing before mainnet deployment
Pricing modelPay-as-you-go vs flat monthly fee vs free tierMatch your budget and expected request volume
Uptime SLAProvider's historical uptime (not guaranteed)Frequent downtime breaks user experience

Polygon Network Overview

Polygon (formerly Matic) is a Layer-2 scaling solution for Ethereum that uses a sidechain architecture with a Proof-of-Stake consensus. It offers low transaction fees and fast finality, making it popular for DeFi, gaming, and NFT applications. To interact with Polygon, your application needs an RPC node—either one you run yourself or one provided by a third-party service.

Polygon Chain Settings

Mainnet

PropertyValue
Network namePolygon Mainnet
Parent chainEthereum
Chain ID137 (0x89)
Gas tokenPOL
RPC endpointhttps://polygon-rpc.com (public)
WSS endpointwss://polygon-rpc.com (public)
Block explorerhttps://polygonscan.com

Amoy Testnet

PropertyValue
Network nameAmoy
Parent chainSepolia
Chain ID80002
Gas tokenPOL
RPC endpointhttps://rpc-amoy.polygon.technology (public)
WSS endpointwss://rpc-amoy.polygon.technology (public)
Block explorerhttps://amoy.polygonscan.com
Faucethttps://faucet.polygon.technology

Public vs Paid RPC Nodes

Public (Free) RPC Nodes

Public RPC endpoints are free to use but often have rate limits, no reliability expectations, and may throttle heavy usage. They are suitable for development, testing, and low-traffic applications. Common public endpoints include:

Paid services offer higher rate limits, dedicated nodes, archive data, WebSocket support, and SLAs. They are recommended for production dApps with significant traffic. Providers include:

  • OnFinality (shared and dedicated nodes)
  • Alchemy
  • Infura
  • QuickNode
  • Chainstack
  • dRPC

How to Connect to a Polygon RPC Node

Using curl

curl https://polygon-rpc.com \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Using Web3.js (JavaScript)

const Web3 = require('web3');
const web3 = new Web3('https://polygon-rpc.com');

web3.eth.getBlockNumber().then(console.log);

Using ethers.js (JavaScript)

const { ethers } = require('ethers');
const provider = new ethers.providers.JsonRpcProvider('https://polygon-rpc.com');

provider.getBlockNumber().then(console.log);

Common RPC Methods for Polygon

Polygon supports standard Ethereum JSON-RPC methods. Some frequently used ones:

  • eth_blockNumber – Get the latest block number
  • eth_getBalance – Get POL balance of an address
  • eth_call – Execute a contract call without creating a transaction
  • eth_sendRawTransaction – Submit a signed transaction
  • eth_gasPrice – Get current gas price
  • eth_getTransactionReceipt – Get receipt of a transaction

Choosing the Right Provider

When to Use a Public Node

  • Prototyping and hackathons
  • Low-traffic personal projects
  • Read-only queries where occasional rate limiting is acceptable

When to Use a Paid Provider

  • Production dApps with real users
  • High-frequency trading or DeFi bots
  • Applications requiring archive data or trace API
  • Need for WebSocket subscriptions
  • Requirement for dedicated node resources

Dedicated vs Shared Nodes

  • Shared nodes: Multiple users share the same node. Lower cost but risk of noisy neighbors.
  • Dedicated nodes: A node reserved for your use. Higher cost but consistent performance, full control over resources, and ability to use custom RPC methods.

Troubleshooting Common Issues

Rate Limiting (HTTP 429)

If you receive 429 errors, your requests are being throttled. Solutions:

  • Upgrade to a paid plan with higher RPS
  • Implement request queuing or batching
  • Use a dedicated node

Connection Timeouts

  • Check your internet connection
  • Ensure the RPC URL is correct (mainnet vs testnet)
  • Try a different provider

Invalid Chain ID

  • Make sure your wallet or dApp is configured with chain ID 137 (mainnet) or 80002 (Amoy)
  • Verify the RPC endpoint matches the intended network

Key Takeaways

  • Polygon mainnet uses chain ID 137 and POL as gas token; Amoy testnet uses chain ID 80002.
  • Public RPC nodes are free but limited; paid providers offer scalability and reliability.
  • Choose a provider based on workload type, rate limits, archive needs, and geographic coverage.
  • Always test on Amoy testnet before deploying to mainnet.
  • For production, consider dedicated nodes or services with SLAs.

Frequently Asked Questions

What is a Polygon RPC node?

A Polygon RPC node is a server that exposes the Polygon blockchain via JSON-RPC, allowing applications to read data and submit transactions.

Can I run my own Polygon node?

Yes, you can run a full node using Polygon's client software (Bor and Heimdall). However, it requires significant hardware and maintenance effort.

What is the difference between Bor and Heimdall?

Bor is the block producer layer (execution layer), while Heimdall is the consensus layer that manages validators and checkpoints to Ethereum.

How do I get free POL for Amoy testnet?

Use the official Polygon faucet at https://faucet.polygon.technology.

Does OnFinality support Polygon?

Yes, OnFinality provides Polygon RPC endpoints and dedicated node options. See the Polygon network page for details.

What is the best Polygon RPC provider?

There is no single "best" provider—it depends on your requirements. Evaluate based on the checklist above and consider testing multiple providers.

For more information, check our RPC pricing and supported networks.

RPC 知识库

相关 RPC 内容

Ethereum Rpc

对于Web3应用,最佳的以太坊RPC API是什么?

最佳的以太坊RPC API为Web3应用提供可靠的主网和测试网访问、可预测的延迟、明确的请求限制、必要时支持归档或追踪,以及面向生产流量的专用基础设施升级路径。 以太坊应用通常需要的不仅仅是免费的公共端点。钱包、DeFi工具、NFT产品、分析平台和索引器在上线前应比较RPC提供商的正常运行时间、方法...

Rpc Provider Selection

如何为你的 dApp 选择合适的 Starknet RPC 提供商

# 如何为你的 dApp 选择合适的 Starknet RPC 提供商 Starknet 是以太坊上的一个有效性 Rollup(ZK-rollup),提供高吞吐量、低 Gas 成本和以太坊级别的安全性。要与 Starknet 交互,你的 dApp 需要一个可靠的 RPC(远程过程调用)提供商。本指南...

Network Rpc

关于 Monad RPC 端点,我需要了解什么?

# 关于 Monad RPC 端点,我需要了解什么? Monad RPC 端点之所以重要,是因为 Web3 应用程序依赖稳定的端点访问来进行读取、交易、仪表盘和后端工作流。正确的设置应匹配你的工作负载,支持你所需的网络和测试网,使限制可见,并在共享 RPC 不再足够时为你提供扩展路径。 对于 Mon...

Network Rpc

关于 Sonic RPC 端点,我需要了解什么?

# 关于 Sonic RPC 端点,我需要了解什么? Sonic RPC 端点之所以重要,是因为 Web3 应用程序依赖稳定的端点访问来进行读取、交易、仪表盘和后端工作流。正确的设置应匹配你的工作负载,支持你所需的网络和测试网,使限制可见,并在共享 RPC 不再足够时为你提供扩展路径。 对于 Son...

Network Rpc

关于BNB RPC端点,我需要了解什么?

# 关于BNB RPC端点,我需要了解什么? BNB RPC端点至关重要,因为Web3应用依赖于稳定的端点访问来进行读取、交易、仪表盘和后端工作流。正确的设置应匹配你的工作负载,支持你所需的网络和测试网,使限制可见,并在共享RPC不再足够时提供扩展路径。 对于BNB Chain的构建者、基础设施负责...

Rpc Provider Selection

什么因素决定了一个以太坊RPC服务是顶级评价的?

# 什么因素决定了一个以太坊RPC服务是顶级评价的? 为生产级dApp、DeFi协议和交易机器人选择顶级评价的以太坊RPC服务至关重要。最佳提供商结合了低延迟、高吞吐量、强大的安全功能(如MEV保护)以及透明的定价。本指南评估了区分普通端点与企业级基础设施的关键标准,帮助您将提供商与工作负载匹配。 ...

永远不用担心基础设施

OnFinality 消除了 DevOps 的繁重工作,让您能够更聪明、更快地构建。

开始