Polygon
Polygon
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
https://polygon.therpc.io/YOUR_API_KEY) for single, stateless requests like balance and block reads. Use the WebSocket endpoint (wss://polygon.therpc.io/YOUR_API_KEY) for real-time subscriptions — streaming new Polygon blocks every ~2 seconds and watching contract logs without polling.-32029 error and retry; if you hit limits consistently, upgrade your plan for a higher Compute Unit allowance.When a Polygon call fails, TheRPC returns a standard JSON-RPC error whose code explains the cause — the table below maps each code to its meaning, from -32700 parse errors to the -32000 to -32099 server-error range. Four practices keep your integration resilient: always check the error field before reading result; retry transient failures with exponential backoff rather than tight loops; log the full error code and message so you can diagnose issues against chain ID 137; and set sensible timeouts so a slow request never hangs your app.
| Code | Meaning |
|---|---|
-32700 | Parse error |
-32600 | Invalid request |
-32601 | Method not found |
-32602 | Invalid params |
-32603 | Internal error |
-32000 to -32099 | Server error |
eth_getTransactionReceipt until it returns a non-null receipt, or subscribe via eth_subscribe over WebSocket for real-time updates — well suited to Polygon's ~2-second blocks.eth_getTransactionCount and use an application-level queue so each outgoing transaction from an address uses the correct nonce in order.eth_blockNumber, listen for newHeads via eth_subscribe, and confirm finality with eth_getBlockByNumber. On Polygon PoS, finality firms up as Heimdall checkpoints commit batches of Bor blocks to Ethereum L1, so deeper confirmations give stronger guarantees.net_version to confirm you are connected to the network you intend.https://polygon.therpc.io/YOUR_API_KEY and it runs unchanged. Polygon PoS uses chain ID 137 (0x89), which you can verify at any time with eth_chainId.eth_blockNumber call against chain ID 137, and monitor performance and Compute Unit usage before going to production.