ඔබේම JSON-RPC අන්ත ලක්ෂ්යය, දේශීයව ක්රියාත්මක කරන ලද ආකිව් නෝඩ් මගින් සහාය දක්වයි. පොදු RPC සමඟ අනුපාත බෙදා නොගැනීම, සීතල ආරම්භක ප්රමාදයක් නොමැතිව, ඔබ පාලනය නොකරන මධ්යස්ථ මෘදුකාංග නොමැත.
සෑම තත්පර 5 කට ස්වයංක්රීයව යාවත්කාලීන වේ · —
curl -X POST \ -H "X-API-Key: rpc_YOUR_KEY_HERE" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \ "https://api.smartmoneyapi.com/rpc/v1/bsc"
යතුරු උපසර්ග කර ඇත rpc_ සහ ඔබේ Smart Money API දත්ත යතුරු වලින් වෙනස් වේ. යතුරු නිර්මාණයේදී එක් වරක් පමණක් පෙන්වනු ලැබේ — ඒවා ආරක්ෂිතව ගබඩා කරන්න.
curl -X POST \ -H "X-API-Key: rpc_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \ "https://api.smartmoneyapi.com/rpc/v1/bsc" // ප්රතිචාරය: {"jsonrpc":"2.0","result":"0x286c1b2","id":1}
curl -X POST \ -H "X-API-Key: rpc_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xYOUR_ADDRESS","latest"],"id":1}' \ "https://api.smartmoneyapi.com/rpc/v1/avax-c"
curl -X POST \ -H "X-API-Key: rpc_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '[ {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}, {"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":2}, {"jsonrpc":"2.0","method":"net_version","params":[],"id":3} ]' \ "https://api.smartmoneyapi.com/rpc/v1/bsc" // පොකුරේ ඇති සෑම ඇමතුමක්ම ඔබේ කොටස් ප්රමාණය දෙසට ගණන් ගනී.
curl -X POST \ -H "X-API-Key: rpc_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","method":"info.isBootstrapped","params":{"chain":"C"},"id":1}' \ "https://api.smartmoneyapi.com/rpc/v1/avax-info"
curl "https://api.smartmoneyapi.com/rpc/v1/health" // ආපසු එයි: {"chains":{"bsc":{"ok":true,"block":42000000,"ms":45}, ...}}
ආරක්ෂාව සහ කාර්ය සාධනය සඳහා, පහත ක්රම උපසර්ග සියලුම EVM දාම වල අවහිර කර ඇත. ඒවා භාවිතා කරන ඉල්ලීම් -32601 දෝෂයක් ආපසු ලබා දෙයි.
පමණක් info.* methods are permitted. All other namespaces return a -32601 දෝෂයකි.
| HTTP | JSON-RPC කේතය | අර්ථය |
|---|---|---|
| 401 | -32001 | API යතුර නැති හෝ වලංගු නැති |
| 429 | -32005 | Rate limit exceeded (rpm or daily). Check Retry-After header. |
| 413 | -32600 | ඉල්ලීමේ ශරීරය 1 MB ඉක්මවා ඇත |
| 403 | -32601 | අවහිර කරන ලද හෝ අවසර නැති ක්රමය |
| 400 | -32700 | JSON parse error |
| 502 | -32002 | Upstream node unreachable or timed out |
{"jsonrpc":"2.0","error":{"code":-32001,"message":"invalid api key"},"id":null}
Paid plan keys are managed separately from Smart Money data API keys. Contact us via the dashboard to upgrade an existing RPC key.
| විශේෂාංගය | පොදු RPC | Smart Money RPC |
|---|---|---|
| Rate limits | Shared, unpredictable | Dedicated per key |
| Latency | Variable, cold-start | Consistent, warm |
| Uptime SLA | No guarantees | Monitored 24/7 |
| Batch calls | Often blocked | Up to 50 per request |
| Usage analytics | None | Per-chain, per-day |