Skip to main content
Beta — PolyNode RPC is in early access.

Endpoint

https://rpc.polynode.dev
All requests use standard Ethereum JSON-RPC format over HTTPS POST.

Authentication

Include your API key as a header:
x-api-key: your_api_key
Or using Bearer token:
Authorization: Bearer your_api_key

Integration Examples

import { ethers } from 'ethers'

const provider = new ethers.JsonRpcProvider('https://rpc.polynode.dev', 137, {
  staticNetwork: true
})

// For authenticated requests, use a custom fetch
const provider = new ethers.JsonRpcProvider(
  new ethers.FetchRequest('https://rpc.polynode.dev'),
  137
)
provider.send = async (method, params) => {
  const resp = await fetch('https://rpc.polynode.dev', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'your_api_key'
    },
    body: JSON.stringify({ jsonrpc: '2.0', method, params, id: 1 })
  })
  const { result, error } = await resp.json()
  if (error) throw new Error(error.message)
  return result
}

// Send a transaction with priority routing
const wallet = new ethers.Wallet(privateKey, provider)
const tx = await wallet.sendTransaction({
  to: '0x...',
  value: ethers.parseEther('1.0')
})
console.log('TX Hash:', tx.hash)

Batch Requests

PolyNode RPC supports JSON-RPC batch requests:
curl -X POST https://rpc.polynode.dev \
  -H 'Content-Type: application/json' \
  -d '[
    {"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1},
    {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":2},
    {"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":3}
  ]'

Hardhat / Foundry

// hardhat.config.js
module.exports = {
  networks: {
    polygon: {
      url: 'https://rpc.polynode.dev',
      accounts: [process.env.PRIVATE_KEY],
      chainId: 137,
      httpHeaders: {
        'x-api-key': process.env.POLYNODE_API_KEY
      }
    }
  }
}

Response Format

All responses follow the standard Ethereum JSON-RPC specification:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x..."
}
For eth_sendRawTransaction, the result is the transaction hash:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
}