Skip to content

GETTING STARTED

Quickstart

Smart Router is a centralised RPC routing gateway. Point it at upstream RPC endpoints; it serves your traffic with QoS-based provider selection, caching, hedging, retries, and cross-validation.

  • Quickstart

    Run your first relay

    Install the binary, point it at an RPC, send a curl request. Three commands.

    Get started →

  • Using the API

    Integrate with your app

    Endpoint URLs, header directives, viem / ethers / web3.py / cosmjs samples.

    Use the API →

  • Configure

    Configure routing & failover

    Selection strategies, retry, hedging, consensus, timeouts.

    Configuration →

  • Supported chains

    Supported chains

    Ethereum, Lava, and 75+ chains across every major ecosystem out of the box.

    Supported chains →

Want it managed?

These docs cover the self-hosted Smart Router. If you'd rather not operate it yourself, talk to us.

Three steps to a running router

1. Get the binary

git clone https://github.com/Magma-Devs/smart-router.git
cd smart-router
make install-all

Or use Docker — see Deployment → Docker.

2. Run

./scripts/pre_setups/init_smartrouter_eth.sh

This generates a config from config/smartrouter_examples/ and starts the router on port 3360.

3. Make a request

curl -X POST http://127.0.0.1:3360 \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

Where to next