API Reference
Base URL
https://rpc.swiftnodes.io
HTTP RPC Endpoint
POST /rpc/{chain}?key={API_KEY}
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}Path Parameters
| Parameter | Type | Description |
|---|
| chain | string | Chain slug (e.g. eth, bsc, base, solana) |
Authentication
| Method | Example |
|---|
| Query parameter | ?key=sn_aBcDeF... |
| Header | x-api-key: sn_aBcDeF... |
Response Format
Success
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x134a3c7"
}Error
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32600,
"message": "Invalid Request"
}
}HTTP Status Codes
| Code | Description |
|---|
| 200 | Success (check JSON-RPC response for errors) |
| 401 | Missing or invalid API key |
| 404 | Unknown chain slug |
| 429 | Rate limited — retry after 1 second |
| 502 | Backend node error — upstream RPC unreachable |
Common EVM Methods
| Method | Description |
|---|
| eth_blockNumber | Latest block number |
| eth_getBalance | Account balance |
| eth_getTransactionByHash | Transaction details |
| eth_getTransactionReceipt | Transaction receipt |
| eth_call | Execute call without transaction |
| eth_estimateGas | Estimate gas for transaction |
| eth_sendRawTransaction | Submit signed transaction |
| eth_getLogs | Query event logs |
| eth_getBlockByNumber | Block details by number |
| eth_chainId | Chain identifier |
SwiftNodes proxies all standard JSON-RPC methods supported by the underlying chain node. Any method the chain supports will work.