Base RPC endpoint दस्तावेज़ | ERPC
Base RPC endpoint दस्तावेज़
ERPC को अपने Base RPC endpoint के रूप में HTTP JSON-RPC requests और WebSocket subscriptions के लिए इस्तेमाल करें। Base RPC हमारे Global Edge Blockchain Infrastructure के भीतर ERPC के RPC APIs का हिस्सा है, और API key को ERPC Web Dashboard से मैनेज किया जा सकता है।
आप वही RPC key इस्तेमाल कर सकते हैं जो Solana, Ethereum और Avalanche के लिए इस्तेमाल होती है।
कृपया अपनी API key को
api-key parameter में जोड़ें।Endpoints
JSON-RPC 2.0 requests को HTTP POST के रूप में यहाँ भेजें:
text
https://base.erpc.global?api-key=<YOUR_API_KEY>https://base.erpc.global?api-key=<YOUR_API_KEY>Subscriptions के लिए, WebSocket पर यहाँ connect करें:
text
wss://base.erpc.global?api-key=<YOUR_API_KEY>wss://base.erpc.global?api-key=<YOUR_API_KEY>Requests केवल
/ पर स्वीकार किए जाते हैं।उदाहरण
यह रहा एक HTTP request का उदाहरण।
bash
curl 'https://base.erpc.global?api-key=<YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{
"jsonrpc":"2.0","id":1,
"method":"eth_blockNumber"
}'curl 'https://base.erpc.global?api-key=<YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{
"jsonrpc":"2.0","id":1,
"method":"eth_blockNumber"
}'आप अपनी API key ERPC Web Dashboard पर प्राप्त और verify कर सकते हैं: ERPC Web Dashboard
Batch Requests
प्रति HTTP request अधिकतम 256 calls वाले JSON-RPC batches समर्थित हैं। batch में हर call को अपने खुद के call के रूप में मीटर किया जाता है।
उपयोग मीटरिंग
उपयोग को प्रति JSON-RPC call tokens में मीटर किया जाता है। HTTP batch में हर entry और WebSocket connection पर भेजा गया हर JSON-RPC call अलग-अलग मीटर किया जाता है।
Free plan की सीमाएँ
Free plan पर, आपका account हर 10 सेकंड में एक request भेज सकता है। यह सीमा endpoint के अनुसार नहीं, बल्कि account के अनुसार गिनी जाती है, इसलिए किसी दूसरी chain को भेजा गया request भी इसमें गिना जा सकता है। इससे जल्दी भेजे गए request का जवाब HTTP
429 से दिया जाता है, और retry-after header प्रतीक्षा का समय सेकंड में बताता है।Free plan पर, दो या अधिक JSON-RPC calls वाले request का जवाब HTTP
429 से दिया जाता है, और उसकी कोई भी call नहीं भेजी जाती: हर call को code -32041 वाली JSON-RPC error मिलती है। इसके बजाय इन calls को एक-एक करके भेजें।Free plan पर WebSocket connections उपलब्ध नहीं हैं और उनका जवाब HTTP
403 से दिया जाता है।समर्थित Methods
Base EVM-compatible है और Ethereum वाले ही JSON-RPC methods इस्तेमाल करता है। ERPC, Base endpoint पर कोई तय method allowlist लागू नहीं करता। Ethereum method families के लिए Ethereum RPC Endpoint दस्तावेज़ देखें।
Response Status Codes
| HTTP status | अर्थ |
|---|---|
| 200 | Upstream JSON-RPC response। |
| 400 | Missing API key, Invalid JSON-RPC request, या JSON-RPC batch exceeds 256 calls। |
| 401 | Unauthorized API KEY। |
| 403 | Free plan पर WebSocket connection। |
| 404 | / के अलावा कोई अन्य path। |
| 429 | Rate limited, जिसमें ऊपर बताई गई Free plan की सीमाएँ भी शामिल हैं: हर 10 सेकंड में एक से अधिक request, या एक request में दो या अधिक calls। retry-after header प्रतीक्षा समय seconds में बताता है। |
| 502 | Upstream RPC request पूरा नहीं हो सका। |
| 503 | Service अस्थायी रूप से अनुपलब्ध है। |
WebSocket connections ऊपर दिए गए codes के अलावा
101 (protocol upgrade accepted) का इस्तेमाल करते हैं।Base RPC Methods और Documentation
Standard methods, parameters और specifications की पूरी सूची के लिए official documentation देखें।






