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

ParameterTypeDescription
chainstringChain slug (e.g. eth, bsc, base, solana)

Authentication

MethodExample
Query parameter?key=sn_aBcDeF...
Headerx-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

CodeDescription
200Success (check JSON-RPC response for errors)
401Missing or invalid API key
404Unknown chain slug
429Rate limited — retry after 1 second
502Backend node error — upstream RPC unreachable

Common EVM Methods

MethodDescription
eth_blockNumberLatest block number
eth_getBalanceAccount balance
eth_getTransactionByHashTransaction details
eth_getTransactionReceiptTransaction receipt
eth_callExecute call without transaction
eth_estimateGasEstimate gas for transaction
eth_sendRawTransactionSubmit signed transaction
eth_getLogsQuery event logs
eth_getBlockByNumberBlock details by number
eth_chainIdChain identifier

SwiftNodes proxies all standard JSON-RPC methods supported by the underlying chain node. Any method the chain supports will work.