# Routescan Documentation > Routescan is a blockchain data platform for applications, analysts and AI agents. Read indexed transactions and balances, inspect historical state, and explore on-chain activity across EVM networks. # Routescan documentation Routescan is a blockchain data platform for applications, analysts and AI agents. Read indexed transactions and balances, inspect historical state, and explore on-chain activity across EVM networks. Routescan indexes active networks including Ethereum, Avalanche C-Chain, Mantle, and FIFA Blockchain. Service coverage varies by chain: check the supported-chain catalog before choosing an endpoint. [Install the CLI](#install-the-cli) to sign in from your terminal, discover chains and make your first request. Or [start with HTTP](/getting-started/get-started) and use the API directly. ## Choose a product ### Data API Query indexed balances, transfers, transactions and tokens across supported chains, including Ethereum, Avalanche C-Chain, Mantle, and FIFA Blockchain. [Open documentation](/api) ### Etherscan-compatible API Keep the module/action request format when moving an existing Etherscan integration to Routescan. [Open documentation](/api/etherscan) ### Blockscout-compatible API Use the Blockscout API v2 format with your Routescan key on supported API chains. Available on paid plans. [Open documentation](/api/blockscout) ### Archive RPC Read historical state and use supported debug and trace methods on Ethereum, Avalanche C-Chain, Mantle, and FIFA Blockchain. Free RPC keys support eth_* methods; paid plans also include debug and trace. [Open documentation](/archive-rpc) ### Streams Run pipelines that filter chain datasets with SQL and deliver the messages to webhooks, queues and databases. [Open documentation](/streams) ### MCP Connect an AI assistant to blockchain data tools. Chain and method availability depend on the tool. [Open documentation](/build-with-ai) ## Install the CLI Install rts on macOS or Linux with one command. The installer verifies SHA-256 checksums over HTTPS on both platforms. macOS releases are not yet Developer ID signed or notarized by Apple. For Apple-signed releases, the installer also checks the developer identity and notarization using system tools. No Python, GPG or Cosign is required for installation. The installer also adds the rts skill for Claude Code and Codex; start a new agent session to load it. Set RTS_NO_AGENT_SKILLS=1 on the installer process to skip skill installation. For an independent signature check before installation, see [Verify CLI downloads](/getting-started/cli-verification). ```bash curl -fsSL https://console.routescan.io/install.sh | bash ``` Supported platforms: macOS and Linux, arm64 and x64. ## Check the installation Open your terminal and check the installed version. A successful installation prints the rts version and platform. ```sh rts --version ``` ## Use with an agent The installer adds a skill that teaches Claude Code and Codex when to use rts, how to discover Archive RPC endpoints and how to authenticate with an API key or device key. Start a new agent session, then ask it to use rts. If you copied the binary manually, install the skill with this command. Use --client claude or --client codex to choose one client; the default installs both. Customized existing skills are preserved. ```sh rts skill install ``` ## Sign in Sign in through the console in your browser. In a local desktop terminal, rts opens the browser automatically. Over SSH or on a headless server, open the printed link on your computer. Compare the authorization code and requested permissions before approving access. On the authorization page, choose Data access, Full access or Custom before approving. Full access is selected by default and includes account, API key and billing management. Choose Data access or Custom to restrict access. You do not need to copy an API key. ```sh rts auth login ``` ## Preselect permissions Login preselects every supported permission by default. Use a comma-separated list to request less access for a specific task; --permissions full explicitly selects the default. Review and adjust the selection on the authorization page before approving. A successful login replaces the credential saved on this device; it does not revoke previously issued keys. ```sh rts auth login --permissions full rts auth login --permissions api:read,keys:read,keys:write ``` ## Check access Verify your saved credential and its permissions before making a request. ```sh rts auth status ``` ## Find a chain List the available networks and Routescan chain IDs. This catalog is public and can also be viewed before signing in. ```sh rts chains list ``` ## Discover Archive RPC endpoints List endpoint templates and authentication instructions for direct JSON-RPC calls. The CLI checks RTS_API_KEY or ROUTESCAN_API_KEY from the environment first, then the nearest project .env.local or .env, then the saved device key. It verifies rpc:read and reports a fallback to the device when needed. The output contains only a credential reference, never the secret. Agents should read that reference into memory and authenticate requests without printing the key or putting it in command arguments. The MCP RPC tool has separate method restrictions. ```sh rts rpc list --json ``` ## Read blockchain data Request five indexed mainnet transactions across the supported chains. Replace all with a Routescan chain ID from the catalog to query a specific chain. ```sh rts api get --path /network/mainnet/evm/all/transactions --query 'limit=5' ``` ## Manage Streams pipelines List the chains and datasets a pipeline can read, check a definition, then create the pipeline and follow its messages. validate only reads and exits with code 1 when the definition is not valid; commands that change something need --yes. Commands that act on one item take its name as the first argument. The Streams documentation describes the definition format and every streams command. ```sh rts streams chains rts streams datasets erc20_transfers rts streams pipelines validate --body-file pipeline.json rts streams pipelines apply --body-file pipeline.json --yes rts streams pipelines inspect usdc-transfers --limit 10 ``` ## Explore commands Use the JSON command catalog and per-command help to discover the interface; per-command help lists flags, query parameters and examples. Output is JSON automatically when piped or captured; --json makes that choice explicit. Use --json=false for text. --query can be repeated. Errors and progress stay on stderr; in JSON mode they are JSON lines. Failures include an exit code and recovery guidance when available: 2 for invalid input, including input errors rejected by the API, 3 for failed authentication or a missing permission, 4 for rate limits and 5 for network errors. Use --no-input to disable authentication prompts and automatic browser launch. ```sh rts help --json rts rpc list --help --json rts api get --help --json ``` ## Update Shell installations check for updates in the background once an hour. Set RTS_NO_AUTO_UPDATE=1 to disable automatic updates, or set RTS_VERSION=X.Y.Z when installing to pin a version. Run rts update to update manually. A binary copied manually does not include this updater; run the installer to use it. ```bash curl -fsSL https://console.routescan.io/install.sh | bash ``` ## Sign out When you want to disconnect, sign out to revoke the saved credential and remove it from this device. Credentials supplied through RTS_API_KEY are not revoked by this command. ```sh rts auth logout ``` ## Troubleshooting ### Command not found Open a new terminal and retry rts --version. If it still fails, check that ~/.local/bin is on PATH, or the directory you selected with RTS_INSTALL_DIR. ### Browser did not open Over SSH or on a headless server, this is expected: open the printed URL in a browser on your computer. Compare the code and permissions, approve access, then return to the terminal on the server. The CLI waits for approval automatically. To prevent automatic browser opening in any environment, use --no-open. ```sh rts auth login --no-open ``` ## Coming next **Querybase — coming soon.** A serverless SQL database of decoded chain history. ## Manage your workspace Use the [console](https://console.routescan.io) to manage access and review usage. Browse [supported chains](https://routescan.io/chains) for API coverage and [Archive RPC](/archive-rpc) for node endpoints. # Verify CLI downloads Check the integrity and origin of rts before running it. ## Release signing fingerprint 51FA8DD7E85DC7804FACD0DFD9014CA841D63028 [Download public key](https://console.routescan.io/keys/rts.asc) · [Independent keyserver](https://keys.openpgp.org/vks/v1/by-fingerprint/51FA8DD7E85DC7804FACD0DFD9014CA841D63028) ## What the installer checks The standard installer downloads a release and its SHA-256 checksums over HTTPS, then checks the archive before extraction. For Apple-signed macOS releases it also checks the Developer ID signature, developer identity and notarization. SHA-256 detects a mismatched download; it does not independently authenticate the publisher. GPG verification is optional and separate from installation. ## macOS signing and notarization macOS releases are not yet Developer ID signed or notarized by Apple. The installer reports this and checks the archive checksum; macOS may identify the binary as coming from an unidentified developer. For Apple-signed releases, the installer also checks the exact developer identity, io.routescan.rts identifier and notarization. GPG verification remains available for all release archives. Do not disable Gatekeeper. ## Verify a Linux release with GPG You need curl and GnuPG. Run each step in the same terminal, in an empty directory. Replace X.Y.Z with the release you want to verify. Stop if a command fails or a fingerprint, signature or checksum does not match. ## 1. Download and check the signing key Display the public key and compare its full fingerprint with the release signing fingerprint published above. Continue only if they match. ```bash VERSION=X.Y.Z REPO="https://console.routescan.io/cli/releases/production/$VERSION" curl -fsSL https://console.routescan.io/keys/rts.asc -o release-key.asc gpg --show-keys --fingerprint release-key.asc ``` ## 2. Import the key and download the checksums Import the verified key, then download the checksum file and its detached signature. ```bash gpg --import release-key.asc curl -fsSLO "$REPO/SHA256SUMS" curl -fsSLO "$REPO/SHA256SUMS.sig" ``` ## 3. Verify the signature GPG must report a good signature from the key you checked in step 1. A warning that the key is not certified with a trusted signature is normal for a newly imported key; the fingerprint comparison is how you confirm its identity. ```bash gpg --verify SHA256SUMS.sig SHA256SUMS ``` ## 4. Check the download Use amd64 for x64, or change ARCH to arm64. Compare the SHA-256 printed by sha256sum with the entry for the exact archive filename in the signed SHA256SUMS file. Only extract or run the download if they match. ```bash ARCH=amd64 ARCHIVE="rts_${VERSION}_linux_${ARCH}.tar.gz" curl -fsSLO "$REPO/$ARCHIVE" sha256sum "$ARCHIVE" cat SHA256SUMS ``` ## Use the verified archive Only after all checks succeed, extract the verified archive in its download directory with tar -xzf followed by the archive filename. Run ./rts --version, then move rts to a directory on PATH. This manual installation does not include the automatic-update launcher: repeat verification for each new release. manifest.json and its detached manifest.json.sig signature are also published for tooling. ## Trust the signing key Compare the complete fingerprint, not just the key ID or the name reported by GPG. A good signature is meaningful only after this comparison. Downloading a key and a signature together is not an independent identity check. The fingerprint on this documentation site is the trust reference; organizations can also pin it in their own approved configuration. A bad signature or fingerprint mismatch means you should stop. # Supported chains See the [chain directory](https://routescan.io/chains) for explorer, API, Archive RPC and Streams availability on each network. The Data API, Etherscan-compatible API and Blockscout-compatible API serve the networks listed below. Use the Routescan chain id listed here in API request paths, including any suffix. Archive RPC uses the EVM chain id. The same API key works across networks. ## Mainnet (24) - Ethereum: 1 - Avalanche C-Chain: 43114 - Mantle: 5000 - FIFA Blockchain: 13322 - Chiliz: 88888 - Beam: 4337 - GUNZ: 43419 - Hemi: 43111 - Henesys: 68414 - Boba Ethereum: 288 - Nibiru: 6900 - Dexalot: 432204 - PHASE: 1015_2 - Redbelly: 151 - StraitsX: 5566 - Numine: 8021 - Numbers: 10507 - PLAYA3ULL Games: 3011 - Titan: 84358 - Apertum: 2786 - DFK: 53935 - Space: 8227 - Step Network: 1234 - UPTN: 6119 ## Testnet (12) - Hoodi: 560048 - Sepolia: 11155111 - Fuji: 43113 - Chiliz Spicy: 88882 - Beam: 13337 - Hemi: 743111 - Boba Sepolia: 28882 - Nibiru Testnet-2: 6911 - Dexalot: 432201 - Redbelly Testnet: 153_2 - PLAYA3ULL Games: 3012 - Blast Sepolia: 168587773 Archive RPC has separate chain coverage listed at /archive-rpc. MCP coverage depends on the tool. Streams chains are listed at /streams/datasets#chains. Querybase coverage is agreed per managed solution. # API conventions Conventions shared by every Routescan endpoint, read this once to call the API correctly. ## Base URL and networks ``` https://api.routescan.io/v2/network/{network}/evm/{chainId}/... ``` - `{network}`, `mainnet` or `testnet`. - `{chainId}`, Routescan chain id (e.g. `1` = Ethereum, `43114` = Avalanche C-Chain). See the supported-chains directory for API coverage. ## Multichain queries - Use `{chainId}` = `all` to query across every supported API chain in one call. - Narrow an `all` query with `includedChainIds` / `excludedChainIds` (comma-separated ids) or `ecosystem` (e.g. `avalanche`). ## Authentication - The `apikey` is sent as an HTTP **header**, not a query parameter. - It is optional on the free tier; an API key raises your rate limits. ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/blocks' -H 'apikey: YourApiKeyToken' ``` ## Rate limits The free tier needs no API key; an API key raises your limits, and paid plans raise them further. A `429` response means you have been rate limited. See the Rate limits page for the current per-second and daily limits: /plans-and-limits/rate-limits ## Pagination (cursor-based) List endpoints return a `link` object with cursors: ```json { "items": [ /* ... */ ], "link": { "next": "...&next=", "nextToken": "", "prevToken": "" } } ``` - Pass `link.nextToken` back as the `next` query parameter for the following page (and `prevToken` as `prev`). - `limit` controls page size; `count=true` includes a total count where supported. ## Errors Non-2xx responses carry an error message in the body. Always check the HTTP status code before parsing. ## Machine-readable resources - OpenAPI spec: https://api.routescan.io/v2/documentation/json - `/llms.txt`, index of every docs page for LLMs. - `/llms-full.txt`, the full documentation as plain text. - Append `.md` to any API reference page (e.g. `/api/addresses.md`) for its Markdown. - MCP server, see the Build with AI section. # Data API reference OpenAPI 3.0 spec (import into Postman, Insomnia or Bruno): https://api.routescan.io/v2/documentation/json ## Addresses ### Address ERC1155 holdings `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/erc1155-holdings` **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/erc1155-holdings?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address ERC1155 transfers `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/erc1155-transfers` **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `direction`: string (one of: received, sent, ) - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/erc1155-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address ERC20 approvals `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/erc20-approvals` Lists the ERC20 token approvals of a specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `status`: string (one of: active, all) - `sort`: string (one of: timestamp,desc, timestamp,asc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/erc20-approvals?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=timestamp%2Cdesc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address ERC20 holdings `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/erc20-holdings` Lists the ERC20 token holdings of a specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/erc20-holdings?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address ERC20 transfers `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/erc20-transfers` Lists the ERC20 token transfers of a specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `direction`: string (one of: received, sent, ) - `count`: boolean - `excludeZeroValue`: boolean. Exclude zero-value (zero-amount) token transfers - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/erc20-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address ERC721 holdings `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/erc721-holdings` Lists the ERC721 tokens holdings of specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/erc721-holdings?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address ERC721 transfers `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/erc721-transfers` Lists the ERC721 token transfers of specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `direction`: string (one of: received, sent, ) - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/erc721-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address gas balance `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/gas-balance` Retrieves the gas balance of a specific address. **Path parameters** - `address` (required): string **Query parameters** - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/gas-balance?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address internal operations `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/internal-operations` Lists the internal operations related to a specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `direction`: string (one of: received, sent, ) - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `fromAddresses`: array - `toAddresses`: array - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/
/internal-operations?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address transactions `GET /v2/network/{networkId}/evm/{chainId}/address/{address}/transactions` Lists the transactions related to a specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `direction`: string (one of: received, sent, ) - `senders`: array. Counterparty filter applied to the receiver branch: only transactions where the address is the receiver and the sender is in this list. - `receivers`: array. Counterparty filter applied to the sender branch: only transactions where the address is the sender and the receiver is in this list. - `count`: boolean - `blockNumberFrom`: number - `blockNumberTo`: number - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `type`: string (one of: evm_tx, atomic_tx). 2023-10-23: DEPRECATED, use categories instead - `categories`: string - `sort`: string (one of: asc, desc) - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/address/0x565F0fe9715E3cb0Df579f186C299D6707887E83/transactions?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&categories=evm_tx&sort=desc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Addresses `GET /v2/network/{networkId}/evm/{chainId}/addresses` Lists the addresses. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `ids`: array - `sort`: string (one of: balance,desc, balance,asc, balanceValueUsd,desc, balanceValueUsd,asc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/addresses?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=balance%2Cdesc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Addresses by address `GET /v2/network/{networkId}/evm/{chainId}/addresses/{address}` Retrieves the details of a specific address. **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/addresses/
?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## Transactions ### Internal operations `GET /v2/network/{networkId}/evm/{chainId}/internal-operations` Lists the internal operations. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `fromAddresses`: array - `toAddresses`: array - `valueFromEq`: string. Inclusive - `valueToEq`: string. Inclusive - `txHash`: string - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/internal-operations?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions `GET /v2/network/{networkId}/evm/{chainId}/transactions` Lists the transactions. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `fromAddresses`: array - `toAddresses`: array - `blockNumberFrom`: number. Inclusive - `blockNumberTo`: number. Exclusive - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `categories`: string - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/transactions?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&categories=evm_tx&sort=desc' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions by transactionId `GET /v2/network/{networkId}/evm/{chainId}/transactions/{transactionId}` Retrieves the details of a specific transaction. **Path parameters** - `transactionId` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/transactions/2PqepdbFLrEsHvbJ5VPW7JjPJEA64LCSnB8xSw9336JRxFGVXa' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## Tokens ### ERC1155 `GET /v2/network/{networkId}/evm/{chainId}/erc1155` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `sort`: string (one of: createdAt,desc, createdAt,asc, transfers24,desc, transfers24,asc, transfers72,desc, transfers72,asc, holders,desc, holders,asc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc1155?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=createdAt%2Cdesc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC1155 transfers `GET /v2/network/{networkId}/evm/{chainId}/erc1155-transfers` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `tokenAddress`: string - `tokenId`: string - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc1155-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC1155 holders `GET /v2/network/{networkId}/evm/{chainId}/erc1155/{address}/holders` Get holders list **Path parameters** - `address` (required): string **Query parameters** - `count`: boolean - `tokenId`: string - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc1155/
/holders?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC20 `GET /v2/network/{networkId}/evm/{chainId}/erc20` Lists all ERC20 tokens. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `sort`: string (one of: createdAt,desc, createdAt,asc, holders,desc, holders,asc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc20?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=createdAt%2Cdesc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC20 swaps `GET /v2/network/{networkId}/evm/{chainId}/erc20-swaps` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `token`: string - `tokenIn`: string - `tokenOut`: string - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc20-swaps?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=asc' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC20 transfers `GET /v2/network/{networkId}/evm/{chainId}/erc20-transfers` Lists the transfers of a specific ERC20 token. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `tokenAddress`: string - `sort`: string (one of: asc, desc) - `count`: boolean - `excludeZeroValue`: boolean. Exclude zero-value (zero-amount) token transfers - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc20-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC20 holders `GET /v2/network/{networkId}/evm/{chainId}/erc20/{address}/holders` Lists the holders of a specific ERC20 token. **Path parameters** - `address` (required): string **Query parameters** - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc20/
/holders?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC721 `GET /v2/network/{networkId}/evm/{chainId}/erc721` Lists the ERC721 tokens. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `sort`: string (one of: createdAt,desc, createdAt,asc, transfers24,desc, transfers24,asc, transfers72,desc, transfers72,asc, holders,desc, holders,asc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc721?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=createdAt%2Cdesc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC721 transfers `GET /v2/network/{networkId}/evm/{chainId}/erc721-transfers` Lists the ERC721 token transfers. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `tokenAddress`: string - `tokenId`: string - `sort`: string (one of: asc, desc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc721-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC721 holders `GET /v2/network/{networkId}/evm/{chainId}/erc721/{address}/holders` Lists the holders of a specific ERC721 token. **Path parameters** - `address` (required): string **Query parameters** - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc721/
/holders?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### ERC721 tokens `GET /v2/network/{networkId}/evm/{chainId}/erc721/{address}/tokens` Lists the tokens of a specific ERC721. **Path parameters** - `address` (required): string **Query parameters** - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/erc721/
/tokens?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Supply `GET /v2/network/{networkId}/evm/{chainId}/supply` Retrieves the total and circulating supply for a specific chain. Values are returned in the chain's native currency (e.g., AVAX, ETH), NOT in subcurrency units like WEI or Gwei. **Query parameters** - `q`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/supply' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Top ERC20 `GET /v2/network/{networkId}/evm/{chainId}/top-erc20` Lists the top ERC20 tokens (trusted only). **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `sort`: string (one of: createdAt,desc, createdAt,asc, marketCap,desc, marketCap,asc, transfers24,desc, transfers24,asc, transfers72,desc, transfers72,asc, holders,desc, holders,asc) - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/top-erc20?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=createdAt%2Cdesc&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## Contracts ### Contracts `GET /v2/network/{networkId}/evm/{chainId}/contracts` Lists the contracts. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `verified`: boolean - `compilerName`: string. Filter by compiler name (e.g. "Solidity", "vyper", "stylus") - `count`: boolean - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/contracts?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Stylus verifications `POST /v2/network/{networkId}/evm/{chainId}/stylus-verifications` Verifies a Stylus (Rust/WASM) contract. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/stylus-verifications' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Stylus verifications by id `GET /v2/network/{networkId}/evm/{chainId}/stylus-verifications/{id}` Retrieves the status of the provided Stylus verification. **Path parameters** - `id` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/stylus-verifications/' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Vyper verifications `POST /v2/network/{networkId}/evm/{chainId}/vyper-verifications` Verifies a vyper contract. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/vyper-verifications' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Vyper verifications by id `GET /v2/network/{networkId}/evm/{chainId}/vyper-verifications/{id}` Retrieves the status of the provided Vyper verification. **Path parameters** - `id` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/vyper-verifications/' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## Blocks ### Blocks `GET /v2/network/{networkId}/evm/{chainId}/blocks` Lists the blocks. **Query parameters** - `count`: boolean - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `sort`: string (one of: asc, desc) - `address`: string. Miner/validator address - `next`: string - `prev`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/blocks?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=desc' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## Stats & aggregations ### Aggregations address burned fees tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/address/{address}/burned-fees/tot` **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/address/
/burned-fees/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations address gas used tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/address/{address}/gas-used/tot` **Path parameters** - `address` (required): string **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/address/
/gas-used/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations addresses `GET /v2/network/{networkId}/evm/{chainId}/aggregations/addresses` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/addresses?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations addresses tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/addresses/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/addresses/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations avg gas price `GET /v2/network/{networkId}/evm/{chainId}/aggregations/avg-gas-price` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string - `unit`: string (one of: second, minute, hour, day) **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/avg-gas-price?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations avg gas price tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/avg-gas-price/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/avg-gas-price/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations blocks `GET /v2/network/{networkId}/evm/{chainId}/aggregations/blocks` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/blocks?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations blocks tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/blocks/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/blocks/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations burned fees `GET /v2/network/{networkId}/evm/{chainId}/aggregations/burned-fees` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/burned-fees?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations burned fees tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/burned-fees/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/burned-fees/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations contracts `GET /v2/network/{networkId}/evm/{chainId}/aggregations/contracts` Lists the daily contracts counts. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string - `sort`: string (one of: asc, desc) **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/contracts?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=asc' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations contracts verified `GET /v2/network/{networkId}/evm/{chainId}/aggregations/contracts-verified` Lists the daily counts of verified contracts. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string - `sort`: string (one of: asc, desc) **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/contracts-verified?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=asc' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations contracts verified tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/contracts-verified/tot` Lists the total count of verified contracts. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/contracts-verified/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations contracts tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/contracts/tot` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/contracts/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations ERC1155 transfers `GET /v2/network/{networkId}/evm/{chainId}/aggregations/erc1155-transfers` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/erc1155-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations ERC1155 transfers tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/erc1155-transfers/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/erc1155-transfers/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations ERC20 transfers `GET /v2/network/{networkId}/evm/{chainId}/aggregations/erc20-transfers` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/erc20-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations ERC20 transfers tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/erc20-transfers/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/erc20-transfers/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations ERC721 transfers `GET /v2/network/{networkId}/evm/{chainId}/aggregations/erc721-transfers` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/erc721-transfers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations ERC721 transfers tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/erc721-transfers/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/erc721-transfers/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations gas used `GET /v2/network/{networkId}/evm/{chainId}/aggregations/gas-used` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/gas-used?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations gas used tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/gas-used/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/gas-used/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations internal operations `GET /v2/network/{networkId}/evm/{chainId}/aggregations/internal-operations` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/internal-operations?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations internal operations tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/internal-operations/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/internal-operations/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations network fees `GET /v2/network/{networkId}/evm/{chainId}/aggregations/network-fees` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/network-fees?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations network fees usd `GET /v2/network/{networkId}/evm/{chainId}/aggregations/network-fees-usd` Returns daily network fees converted to USD using historical token prices. **Query parameters** - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/network-fees-usd' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations network fees usd tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/network-fees-usd/tot` Returns the total network fees in USD for the given date range. **Query parameters** - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/network-fees-usd/tot' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations network fees tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/network-fees/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/network-fees/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations receivers `GET /v2/network/{networkId}/evm/{chainId}/aggregations/receivers` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/receivers?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations receivers tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/receivers/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/receivers/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations senders `GET /v2/network/{networkId}/evm/{chainId}/aggregations/senders` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/senders?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations senders tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/senders/tot` Note: date filter granularity is by day **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/senders/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations txs `GET /v2/network/{networkId}/evm/{chainId}/aggregations/txs` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string - `fromAddresses`: array - `toAddresses`: array - `unit`: string (one of: second, minute, hour, day) **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/txs?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations txs tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/txs/tot` **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `dateFrom`: string - `dateTo`: string - `fromAddresses`: array - `toAddresses`: array **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/txs/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations unique addresses `GET /v2/network/{networkId}/evm/{chainId}/aggregations/unique-addresses` Lists the daily running counts of unique addresseses. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `sort`: string (one of: asc, desc) - `unit`: string (one of: day, week, month) - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/unique-addresses?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=asc&unit=day' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Aggregations unique addresses tot `GET /v2/network/{networkId}/evm/{chainId}/aggregations/unique-addresses/tot` Retrieves the total count of unique addresses. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `sort`: string (one of: asc, desc) - `dateFrom`: string - `dateTo`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/aggregations/unique-addresses/tot?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&sort=asc' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## Cross-chain ### Cross transactions actions `GET /v2/network/{networkId}/evm/cross-transactions/actions` **Query parameters** - `chainId`: string - `srcChainIds`: array - `dstChainIds`: array - `srcEcosystem`: string - `dstEcosystem`: string - `count`: boolean - `types`: array - `fromAddress`: string - `toAddress`: string - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `txHash`: string. Source or destination transaction hashes - `status`: array - `sort`: string (one of: asc, desc) - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/cross-transactions/actions?chainId=43114&sort=desc&ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Cross transactions actions by id `GET /v2/network/{networkId}/evm/cross-transactions/actions/{id}` **Path parameters** - `id` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/cross-transactions/actions/' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Cross transactions messages `GET /v2/network/{networkId}/evm/cross-transactions/messages` **Query parameters** - `chainId`: string - `srcChainIds`: array - `dstChainIds`: array - `srcEcosystem`: string - `dstEcosystem`: string - `count`: boolean - `types`: array - `fromAddress`: string - `toAddress`: string - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `txHash`: string. Source or destination transaction hashes - `sort`: string (one of: asc, desc) - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/cross-transactions/messages?chainId=43114&sort=desc&ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Cross transactions messages by id `GET /v2/network/{networkId}/evm/cross-transactions/messages/{id}` **Path parameters** - `id` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/cross-transactions/messages/' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## X-Chain ### Address transactions `GET /v2/network/{networkId}/avm/{blockchainId}/address/{addressId}/transactions` **Path parameters** - `addressId` (required): string **Query parameters** - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/avm//address//transactions?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions by transactionId `GET /v2/network/{networkId}/avm/{blockchainId}/transactions/{transactionId}` **Path parameters** - `transactionId` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/avm//transactions/2NjQmivWRhUAKzJZtBTk3APVBaAa8YCGxAs4CBjBMKqYZ6DUjZ' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions inputs `GET /v2/network/{networkId}/avm/{blockchainId}/transactions/{transactionId}/inputs` Lists inputs of a specific transaction. **Path parameters** - `transactionId` (required): string **Query parameters** - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/avm//transactions/2NjQmivWRhUAKzJZtBTk3APVBaAa8YCGxAs4CBjBMKqYZ6DUjZ/inputs?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions outputs `GET /v2/network/{networkId}/avm/{blockchainId}/transactions/{transactionId}/outputs` Lists the outputs of a specific transaction. **Path parameters** - `transactionId` (required): string **Query parameters** - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/avm//transactions/2NjQmivWRhUAKzJZtBTk3APVBaAa8YCGxAs4CBjBMKqYZ6DUjZ/outputs?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## P-Chain ### Address transactions `GET /v2/network/{networkId}/pvm/{blockchainId}/address/{addressId}/transactions` Lists the transactions of a specific address. **Path parameters** - `addressId` (required): string **Query parameters** - `timestampFrom`: string. Inclusive - `timestampTo`: string. Exclusive - `categories`: string - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//address/P-avax1qqx0ng4vkklr5gne6p89dwkmw2u3vl07p8ehlm/transactions?categories=add_validator&limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address by addressId `GET /v2/network/{networkId}/pvm/{blockchainId}/staking/address/{addressId}` Retrieves the staking information of a specific address. **Path parameters** - `addressId` (required): string **Query parameters** - `withPotentialRewards`: number **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//staking/address/' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Address overview `GET /v2/network/{networkId}/pvm/{blockchainId}/staking/address/{addressId}/overview` Retrieves the staking informations of a specific address. **Path parameters** - `addressId` (required): string **Query parameters** - `monthFrom`: string. ISO date string representing the first day of the month - `monthTo`: string. ISO date string representing the first day of the month **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//staking/address//overview' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Delegations `GET /v2/network/{networkId}/pvm/{blockchainId}/staking/delegations` Retrieves the details of a specific delegation. **Query parameters** - `nodeIds`: array - `subnetIds`: array - `status`: array - `next`: string - `prev`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//staking/delegations' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Subnets `GET /v2/network/{networkId}/pvm/{blockchainId}/staking/subnets` Lists the subnets. **Query parameters** - `next`: string - `prev`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//staking/subnets' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Validations `GET /v2/network/{networkId}/pvm/{blockchainId}/staking/validations` Lists validations. **Query parameters** - `nodeIds`: array - `subnetIds`: array - `status`: array - `blockchainIds`: array - `next`: string - `prev`: string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//staking/validations' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Validations by validationId `GET /v2/network/{networkId}/pvm/{blockchainId}/staking/validations/{validationId}` Retrieves the details of a specific validation. **Path parameters** - `validationId` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//staking/validations/' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions by transactionId `GET /v2/network/{networkId}/pvm/{blockchainId}/transactions/{transactionId}` Retrieves the details of a specific transaction. **Path parameters** - `transactionId` (required): string **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//transactions/2KNk31TmXvsRuZMCWmNeveJaunNwQNtcvEwq1e7Ghx4DTJctHk' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions inputs `GET /v2/network/{networkId}/pvm/{blockchainId}/transactions/{transactionId}/inputs` Lists the inputs of a specific transaction. **Path parameters** - `transactionId` (required): string **Query parameters** - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//transactions/2KNk31TmXvsRuZMCWmNeveJaunNwQNtcvEwq1e7Ghx4DTJctHk/inputs?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Transactions outputs `GET /v2/network/{networkId}/pvm/{blockchainId}/transactions/{transactionId}/outputs` Lists the outputs of a specific transaction. **Path parameters** - `transactionId` (required): string **Query parameters** - `next`: string - `prev`: string - `limit`: number. Max value: 100 **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/pvm//transactions/2KNk31TmXvsRuZMCWmNeveJaunNwQNtcvEwq1e7Ghx4DTJctHk/outputs?limit=25' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ## Network ### Evm rate limit status `GET /v2/evm/{chainId}/rate-limit-status` Retrieves the rate limit status of a specific blockchain. **Query parameters** - `adminKey`: string - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array **Example request** ```bash curl 'https://api.routescan.io/v2/evm/all/rate-limit-status?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Blockchains `GET /v2/network/{networkId}/evm/{chainId}/blockchains` Lists the blockchains. **Query parameters** - `ecosystem`: string - `includedChainIds`: array - `excludedChainIds`: array - `description`: boolean - `tags`: boolean **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/all/blockchains?ecosystem=ethereum&includedChainIds=43114%2C73772&excludedChainIds=43114%2C73772&description=false&tags=false' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Ping `GET /v2/ping` Ping **Example request** ```bash curl 'https://api.routescan.io/v2/ping' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response ### Rate limit status `GET /v2/rate-limit-status` Retrieves the rate limit status. **Query parameters** - `adminKey`: string **Example request** ```bash curl 'https://api.routescan.io/v2/rate-limit-status' -H 'apikey: YourApiKeyToken' ``` **Responses** - `200` Default Response # Etherscan-compatible APIs reference ## Accounts (Etherscan-compatible) ### Get Ether Balance for a Single Address Returns the Ether balance of a given address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=balance&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae&tag=latest' ``` ### Get Ether Balance for Multiple Addresses in a Single Call Returns the balance of the accounts from a list of addresses. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=balancemulti&address=0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a,0x63a9975ba31b0b9626b34300f7f627147df1f526,0x198ef1ec325a96cc354c7266a038be8b5c558f67&tag=latest' ``` ### Get a list of 'Normal' Transactions By Address Returns the list of transactions performed by an address, with optional pagination. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=txlist&address=0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a&startblock=0&endblock=99999999&page=1&offset=10&sort=asc' ``` ### Get a list of 'Internal' Transactions by Address Returns the list of internal transactions performed by an address, with optional pagination. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=txlistinternal&address=0x2c1ba59d6f58433fb1eaee7d20b26ed83bda51a3&startblock=0&endblock=2702578&page=1&offset=10&sort=asc' ``` ### Get 'Internal Transactions' by Transaction Hash Returns the list of internal transactions performed within a transaction. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=txlistinternal&txhash=0x40eb908387324f2b575b4879cd9d7188f69c8fc9d87c901b9e2daaea4b442170' ``` ### Get "Internal Transactions" by Block Range Returns the list of internal transactions performed within a block range, with optional pagination. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=txlistinternal&startblock=13481773&endblock=13491773&page=1&offset=10&sort=asc' ``` ### Get a list of 'ERC20 - Token Transfer Events' by Address Returns the list of ERC-20 tokens transferred by an address, with optional filtering by token contract. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=account&action=tokentx&contractaddress=0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7&address=0x77134cbC06cB00b66F4c7e623D5fdBF6777635EC&page=1&offset=100&startblock=34372864&endblock=34472864&sort=asc' ``` ### Get a list of 'ERC721 - Token Transfer Events' by Address Returns the list of ERC-721 ( NFT ) tokens transferred by an address, with optional filtering by token contract. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=account&action=tokennfttx&contractaddress=0x3025c5c2aa6eb7364555aac0074292195701bbd6&address=0x6f50142e432b0f6cb851d93430fd5afaafa0734a&page=1&offset=100&startblock=25176525&endblock=35676525&sort=desc' ``` ### Get a list of 'ERC1155 - Token Transfer Events' by Address Returns the list of ERC-1155 ( Multi Token Standard ) tokens transferred by an address, with optional filtering by token contract. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=account&action=token1155tx&contractaddress=0xa695ea0c90d89a1463a53fa7a02168bc46fbbf7e&address=0xd550d3fa339f8a6ba2957c83e379d7d7da0fd529&page=1&offset=100&startblock=0&endblock=99999999&sort=desc' ``` ### Get Historical Ether Balance for a Single Address By BlockNo Returns the balance of an address at a certain block height. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=balancehistory&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae&blockno=8000000' ``` ### Get Gas Oracle Returns the current Safe, Propose and Fast gas prices. Response includes LastBlock (last block number), SafeGasPrice (low gas price), ProposeGasPrice (median gas price), FastGasPrice (high gas price), and suggestBaseFee (base gas price). **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=gastracker&action=gasoracle' ``` ## Blocks (Etherscan-compatible) ### Get Estimated Block Countdown Time by BlockNo Returns the estimated time remaining, in seconds, until a certain block is mined. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=block&action=getblockcountdown&blockno=99999999' ``` ### Get Block Number by Timestamp Returns the block number that was mined at a certain timestamp. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=block&action=getblocknobytime×tamp=1619638524&closest=before' ``` ## Contracts (Etherscan-compatible) ### Get Contract Creator and Creation Tx Hash Returns a contract's deployer address and transaction hash it was created, up to 5 at a time. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=contract&action=getcontractcreation&contractaddresses=0xB83c27805aAcA5C7082eB45C868d955Cf04C337F,0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45,0xe4462eb568E2DFbb5b0cA2D3DbB1A35C9Aa98aad,0xdAC17F958D2ee523a2206206994597C13D831ec7,0xf5b969064b91869fBF676ecAbcCd1c5563F591d0' ``` ### Get Contract ABI for Verified Contract Source Codes Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=contract&action=getabi&address=0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7' ``` ### Get Contract Source Code for Verified Contract Source Codes Returns the Solidity source code of a verified smart contract. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=contract&action=getsourcecode&address=0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7' ``` ### Verify Source Code **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=contract&action=verifysourcecode&contractaddress=0x2A1D1C87d18dd13d7a1e91A42C9fFEc486EB6433&sourceCode=// SPDX-License-Identifier: MIT // compiler version must be greater than or equal to 0.8.10 and less than 0.9.0 pragma solidity ^0.8.10; contract HelloWorld { string public greet = "Hello World!"; } &codeformat=solidity-single-file&contractname=HelloWorld&compilerversion=v0.8.10+commit.fc410830&optimizationUsed=0&runs=200&licenseType=1' ``` ### Check Source Code Verification Submission Status **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=contract&action=checkverifystatus&guid=ezq878u486pzijkvvmerl6a9mzwhv6sefgvqi5tkwceejc7tvn' ``` ## Geth-Parity Proxy (Etherscan-compatible) ### eth_blockNumber Returns the number of most recent block **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_blockNumber' ``` ### eth_getBlockByNumber Returns information about a block by block number. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getBlockByNumber&tag=0x10d4f&boolean=true' ``` ### eth_getUncleByBlockNumberAndIndex Returns information about a uncle by block number. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getUncleByBlockNumberAndIndex&tag=0xC63276&index=0x0' ``` ### eth_getBlockTransactionCountByNumber Returns the number of transactions in a block. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getBlockTransactionCountByNumber&tag=0x10FB78' ``` ### eth_getTransactionByHash Returns the information about a transaction requested by transaction hash. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getTransactionByHash&txhash=0xbc78ab8a9e9a0bca7d0321a27b2c03addeae08ba81ea98b03cd3dd237eabed44' ``` ### eth_getTransactionByBlockNumberAndIndex Returns information about a transaction by block number and transaction index position. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getTransactionByBlockNumberAndIndex&tag=0xC6331D&index=0x11A' ``` ### eth_getTransactionCount Returns the number of transactions performed by an address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getTransactionCount&address=0x4bd5900Cb274ef15b153066D736bf3e83A9ba44e&tag=latest' ``` ### eth_getTransactionReceipt Returns the receipt of a transaction by transaction hash. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getTransactionReceipt&txhash=0xadb8aec59e80db99811ac4a0235efa3e45da32928bcff557998552250fa672eb' ``` ### eth_call Executes a new message call immediately without creating a transaction on the block chain. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_call&to=0xAEEF46DB4855E25702F8237E8f403FddcaF931C0&data=0x70a08231000000000000000000000000e16359506c028e51f16be38986ec5746251e9724&tag=latest' ``` ### eth_getCode Returns code at a given address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getCode&address=0xf75e354c5edc8efed9b59ee9f67a80845ade7d0c&tag=latest' ``` ### eth_getStorageAt Returns the value from a storage position at a given address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_getStorageAt&address=0x6e03d9cce9d60f3e9f2597e13cd4c54c55330cfd&position=0x0&tag=latest' ``` ### eth_gasPrice Returns the current price per gas in wei. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_gasPrice' ``` ### eth_estimateGas Makes a call or transaction, which won't be added to the blockchain and returns the used gas. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=proxy&action=eth_estimateGas&data=0x4e71d92d&to=0xf0160428a8552ac9bb7e050d90eeade4ddd52843&value=0xff22&gasPrice=0x51da038cc&gas=0x5f5e0ff' ``` ## Gas Tracker (Etherscan-compatible) ### Get Gas Oracle Returns the current Safe, Proposed and Fast gas prices. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=gastracker&action=gasoracle' ``` ## Logs (Etherscan-compatible) ### Get Event Logs by Address Returns the event logs from an address, with optional filtering by block range. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=logs&action=getLogs&address=0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7&fromBlock=37000000&toBlock=37200000&page=1&offset=1000' ``` ### Get Event Logs by Topics Returns the events log in a block range, filtered by topics. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=logs&action=getLogs&fromBlock=37000000&toBlock=37200000&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&topic0_1_opr=and&topic1=0x0000000000000000000000000000000000000000000000000000000000000000&page=1&offset=1000' ``` ### Get Event Logs by Address filtered by Topics Returns the event logs from an address, filtered by topics and block range. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=logs&action=getLogs&fromBlock=37000000&toBlock=37200000&address=0x9e66eba102b77fc75cd87b5e60141b85573bc8e8&topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef&topic0_1_opr=and&topic1=0x0000000000000000000000000000000000000000000000000000000000000000&page=1&offset=1000' ``` ## Nametags (Etherscan-compatible) ### Get Nametag (Metadata) for an Address Returns name tags and metadata for the specified address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?action=getaddresstag&module=nametag&address=0xF977814e90dA44bFA03b6295A0616a897441aceC' ``` ## Stats (Etherscan-compatible) ### Get Ether Last Price Returns the latest price of 1 ETH. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=stats&action=ethprice' ``` ## Tokens (Etherscan-compatible) ### Get ERC20-Token TotalSupply by ContractAddress Returns the current amount of an ERC-20 token in circulation. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=stats&action=tokensupply&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055' ``` ### Get ERC20-Token Account Balance for TokenContractAddress Returns the current balance of an ERC-20 token of an address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=tokenbalance&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055&address=0xe04f27eb70e025b78871a2ad7eabe85e61212761&tag=latest' ``` ### Get Historical ERC20-Token TotalSupply by ContractAddress & BlockNo Returns the amount of an ERC-20 token in circulation at a certain block height. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=stats&action=tokensupplyhistory&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055&blockno=8000000' ``` ### Get Historical ERC20-Token Account Balance for TokenContractAddress by BlockNo Returns the balance of an ERC-20 token of an address at a certain block height. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=tokenbalancehistory&contractaddress=0x57d90b64a1a57749b0f932f1a3395792e12e7055&address=0xe04f27eb70e025b78871a2ad7eabe85e61212761&blockno=8000000' ``` ### Get Token Holder List by Contract Address Return the current ERC20 token holders and number of tokens held. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=token&action=tokenholderlist&contractaddress=0xaaaebe6fe48e54f431b0c390cfaf0b017d09d42d&page=1&offset=10' ``` ### Get Token Holder Count by Contract Address Return the current ERC20 token holders count **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm//etherscan/api?module=token&action=tokenholdercount&contractaddress=0xaaaebe6fe48e54f431b0c390cfaf0b017d09d42d&apikey=YourApiKeyToken' ``` ### Get Token Info by ContractAddress Returns project information and social media links of an ERC20/ERC721/ERC1155 token. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=token&action=tokeninfo&contractaddress=0x0e3a2a1f2146d86a604adc220b4967a898d7fe07' ``` ### Get Address ERC20 Token Holding Returns the ERC-20 tokens and amount held by an address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=account&action=addresstokenbalance&address=0x983e3660c0bE01991785F80f266A84B911ab59b0&page=1&offset=100' ``` ### Get Address ERC721 Token Holding Returns the ERC-721 tokens and amount held by an address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=account&action=addresstokennftbalance&address=0x0000000000000000000000000000000000000000&page=1&offset=100' ``` ### Get Address ERC721 Token Inventory By Contract Address Returns the ERC-721 token inventory of an address, filtered by contract address. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api?module=account&action=addresstokennftinventory&address=0x6B59918Cfa9a4A360482b98E32bd0EBC61AEe89e&contractaddress=0x41fc45DCaaeAc616590f32E09E08294762aF0DB8&page=1&offset=100' ``` ## Transactions (Etherscan-compatible) ### Check Contract Execution Status Returns the status code of a contract execution. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=transaction&action=getstatus&txhash=0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a' ``` ### Check Transaction Receipt Status Returns the status code of a transaction execution. **Example request** ```bash curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=transaction&action=gettxreceiptstatus&txhash=0x513c1ba0bebf66436b5fed86ab668452b7805593c05073eb2d51d3a52f480a76' ``` # Blockscout-compatible APIs Blockscout API v2 endpoints served from Routescan’s index. Wallets, apps and scripts built on the Blockscout API read any supported API chain by changing the host and adding an API key. ## Base URL ``` https://blockscout.routescan.io/{chainId}/api/v2 ``` - `{chainId}`: the Routescan chain id (e.g. `1` Ethereum, `43114` Avalanche C-Chain). Mainnet and testnet chains share the host. One request covers one chain; there is no `all`. - Paths after `/api/v2` are the Blockscout ones. ## Authentication The Blockscout-compatible APIs are part of the paid Routescan API plans. Send the key of a paid plan in the `x-api-key` header (or the `apikey` query parameter). It is the same key as for the Data API and Etherscan-compatible API. ``` curl "https://blockscout.routescan.io/1/api/v2/stats" -H "x-api-key: YourApiKeyToken" ``` - 401 `{"message":"A paid Routescan API key is required"}`: no key, or an unknown key. - 403 `{"message":"The Blockscout API requires a paid Routescan API plan"}`: key of the free plan. - 403 `Forbidden`: disabled key. ## Rate limits Requests count against the limits of your plan, on the same counters as api.routescan.io: the Blockscout-compatible, Data API and Etherscan-compatible API share one quota. Over the limit the API answers 429. The `x-ratelimit-limit`, `x-ratelimit-remaining` and `x-ratelimit-reset` headers show the state of the quota. ## Pagination and parameters Lists return up to 50 items and `next_page_params`; pass its `cursor` value as the `cursor` query parameter for the next page (`null` on the last page). A query parameter the endpoint does not accept is rejected with a 422. ## Blocks (Blockscout-compatible) Latest blocks, a single block and the transactions, internal calls and withdrawals it contains. ### Get blocks `GET /{chainId}/api/v2/blocks` Latest blocks, newest first, 50 per page. **Query parameters** - `type`: string (one of: block, uncle, reorg). Block kind. Defaults to block. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/blocks?type=block' -H 'x-api-key: YourApiKeyToken' ``` ### Get block `GET /{chainId}/api/v2/blocks/{block_number_or_hash}` Block header, producer, gas, fees and rewards. **Path parameters** - `block_number_or_hash` (required): string. Block number or block hash. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/blocks/18000000' -H 'x-api-key: YourApiKeyToken' ``` ### Get block transactions `GET /{chainId}/api/v2/blocks/{block_number_or_hash}/transactions` Transactions included in a block. **Path parameters** - `block_number_or_hash` (required): string. Block number or block hash. **Query parameters** - `type`: string (one of: coin_transfer, contract_call, contract_creation, token_transfer, token_creation, blob_transaction). Only transactions of this kind. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/blocks/18000000/transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get block internal transactions `GET /{chainId}/api/v2/blocks/{block_number_or_hash}/internal-transactions` Internal calls executed by the transactions of a block. **Path parameters** - `block_number_or_hash` (required): string. Block number or block hash. **Query parameters** - `call_type`: string (one of: call, callcode, delegatecall, staticcall). Only calls of this type. - `internal_type`: string (one of: call, create, create2, reward, selfdestruct, stop). Only internal transactions of this type. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/blocks/18000000/internal-transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get block withdrawals `GET /{chainId}/api/v2/blocks/{block_number_or_hash}/withdrawals` Validator withdrawals processed in a block. **Path parameters** - `block_number_or_hash` (required): string. Block number or block hash. **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/blocks/26000000/withdrawals' -H 'x-api-key: YourApiKeyToken' ``` ## Transactions (Blockscout-compatible) Latest transactions, a single transaction and its token transfers, internal calls, logs and traces. ### Get transactions `GET /{chainId}/api/v2/transactions` Latest validated or pending transactions, 50 per page. **Query parameters** - `filter`: string (one of: validated, pending). Validated (default) or pending transactions. - `type`: string (one of: blob_transaction). Only blob-carrying transactions. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get transaction `GET /{chainId}/api/v2/transactions/{transaction_hash}` Status, value, fee, gas, decoded input and token transfers of a transaction. **Path parameters** - `transaction_hash` (required): string. Transaction hash, 0x-prefixed (64 hex characters). **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions/0xe4bee4633e263bed39ad812b2c8078fb7328c052c64f62903993074d20702fb2' -H 'x-api-key: YourApiKeyToken' ``` ### Get transaction token transfers `GET /{chainId}/api/v2/transactions/{transaction_hash}/token-transfers` ERC-20, ERC-721 and ERC-1155 transfers emitted by a transaction. **Path parameters** - `transaction_hash` (required): string. Transaction hash, 0x-prefixed (64 hex characters). **Query parameters** - `type`: string. Comma-separated token standards, e.g. ERC-20,ERC-721,ERC-1155,ERC-404. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions/0xe4bee4633e263bed39ad812b2c8078fb7328c052c64f62903993074d20702fb2/token-transfers' -H 'x-api-key: YourApiKeyToken' ``` ### Get transaction internal transactions `GET /{chainId}/api/v2/transactions/{transaction_hash}/internal-transactions` Internal calls of a transaction, from its execution trace. **Path parameters** - `transaction_hash` (required): string. Transaction hash, 0x-prefixed (64 hex characters). **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions/0xe4bee4633e263bed39ad812b2c8078fb7328c052c64f62903993074d20702fb2/internal-transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get transaction logs `GET /{chainId}/api/v2/transactions/{transaction_hash}/logs` Event logs emitted by a transaction, decoded when the contract is verified. **Path parameters** - `transaction_hash` (required): string. Transaction hash, 0x-prefixed (64 hex characters). **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions/0xe4bee4633e263bed39ad812b2c8078fb7328c052c64f62903993074d20702fb2/logs' -H 'x-api-key: YourApiKeyToken' ``` ### Get transaction raw trace `GET /{chainId}/api/v2/transactions/{transaction_hash}/raw-trace` The full call trace of a transaction, as returned by the node. **Path parameters** - `transaction_hash` (required): string. Transaction hash, 0x-prefixed (64 hex characters). **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions/0xe4bee4633e263bed39ad812b2c8078fb7328c052c64f62903993074d20702fb2/raw-trace' -H 'x-api-key: YourApiKeyToken' ``` ### Get transaction state changes `GET /{chainId}/api/v2/transactions/{transaction_hash}/state-changes` Balance changes caused by a transaction, for native coin and tokens. **Path parameters** - `transaction_hash` (required): string. Transaction hash, 0x-prefixed (64 hex characters). **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions/0xe4bee4633e263bed39ad812b2c8078fb7328c052c64f62903993074d20702fb2/state-changes' -H 'x-api-key: YourApiKeyToken' ``` ### Get transaction summary `GET /{chainId}/api/v2/transactions/{transaction_hash}/summary` A human-readable summary of what a transaction did. **Path parameters** - `transaction_hash` (required): string. Transaction hash, 0x-prefixed (64 hex characters). **Query parameters** - `just_request_body`: boolean. Return the summary request body instead of the summary. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/transactions/0xe4bee4633e263bed39ad812b2c8078fb7328c052c64f62903993074d20702fb2/summary' -H 'x-api-key: YourApiKeyToken' ``` ### Get internal transactions `GET /{chainId}/api/v2/internal-transactions` Latest internal transactions across the chain. **Query parameters** - `transaction_hash`: string. Only internal transactions of this transaction. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/internal-transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get token transfers `GET /{chainId}/api/v2/token-transfers` Latest token transfers across the chain. **Query parameters** - `type`: string. Comma-separated token standards, e.g. ERC-20,ERC-721,ERC-1155,ERC-404. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/token-transfers' -H 'x-api-key: YourApiKeyToken' ``` ## Addresses (Blockscout-compatible) Balances, counters, transactions, transfers, token holdings and history of an address. ### Get top addresses `GET /{chainId}/api/v2/addresses` Addresses ranked by native balance. **Query parameters** - `sort`: string (one of: balance, transactions_count). Sort field, used together with order. - `order`: string (one of: asc, desc). Sort direction, used together with sort. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses' -H 'x-api-key: YourApiKeyToken' ``` ### Get address `GET /{chainId}/api/v2/addresses/{address_hash}` Native balance, contract details, name tags and token info of an address. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' -H 'x-api-key: YourApiKeyToken' ``` ### Get address counters `GET /{chainId}/api/v2/addresses/{address_hash}/counters` Number of transactions, token transfers and validations, plus gas used. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/counters' -H 'x-api-key: YourApiKeyToken' ``` ### Get address tab counters `GET /{chainId}/api/v2/addresses/{address_hash}/tabs-counters` Item counts for each address tab, capped like on Blockscout. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/tabs-counters' -H 'x-api-key: YourApiKeyToken' ``` ### Get address transactions `GET /{chainId}/api/v2/addresses/{address_hash}/transactions` Transactions sent or received by an address, newest first. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `filter`: string (one of: to, from). Only transactions sent (from) or received (to) by the address. - `sort`: string (one of: block_number, value, fee). Sort field, used together with order. - `order`: string (one of: asc, desc). Sort direction, used together with sort. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get address token transfers `GET /{chainId}/api/v2/addresses/{address_hash}/token-transfers` Token transfers sent or received by an address. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `filter`: string (one of: to, from). Only transfers sent (from) or received (to) by the address. - `type`: string. Comma-separated token standards, e.g. ERC-20,ERC-721,ERC-1155,ERC-404. - `token`: string. Only transfers of this token contract. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/token-transfers' -H 'x-api-key: YourApiKeyToken' ``` ### Get address internal transactions `GET /{chainId}/api/v2/addresses/{address_hash}/internal-transactions` Internal transactions to or from an address. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `filter`: string (one of: to, from). Only internal transactions sent (from) or received (to) by the address. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/internal-transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get address logs `GET /{chainId}/api/v2/addresses/{address_hash}/logs` Event logs emitted by a contract address. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `topic`: string. Only logs with this topic (0x hex). - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xdAC17F958D2ee523a2206206994597C13D831ec7/logs' -H 'x-api-key: YourApiKeyToken' ``` ### Get address tokens `GET /{chainId}/api/v2/addresses/{address_hash}/tokens` Token balances of an address, paginated and filterable by standard. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `type`: string. Comma-separated token standards, e.g. ERC-20,ERC-721,ERC-1155,ERC-404. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/tokens' -H 'x-api-key: YourApiKeyToken' ``` ### Get address token balances `GET /{chainId}/api/v2/addresses/{address_hash}/token-balances` Every token balance of an address in a single response. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/token-balances' -H 'x-api-key: YourApiKeyToken' ``` ### Get address NFTs `GET /{chainId}/api/v2/addresses/{address_hash}/nft` NFT instances owned by an address. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `type`: string. Comma-separated NFT standards, e.g. ERC-721,ERC-1155. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/nft' -H 'x-api-key: YourApiKeyToken' ``` ### Get address NFT collections `GET /{chainId}/api/v2/addresses/{address_hash}/nft/collections` NFTs owned by an address, grouped by collection. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `type`: string. Comma-separated NFT standards, e.g. ERC-721,ERC-1155. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/nft/collections' -H 'x-api-key: YourApiKeyToken' ``` ### Get address coin balance history `GET /{chainId}/api/v2/addresses/{address_hash}/coin-balance-history` Native balance changes of an address, block by block. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/coin-balance-history' -H 'x-api-key: YourApiKeyToken' ``` ### Get address coin balance history by day `GET /{chainId}/api/v2/addresses/{address_hash}/coin-balance-history-by-day` Daily closing native balance of an address, for charts. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045/coin-balance-history-by-day' -H 'x-api-key: YourApiKeyToken' ``` ### Get address blocks validated `GET /{chainId}/api/v2/addresses/{address_hash}/blocks-validated` Blocks produced by an address. **Path parameters** - `address_hash` (required): string. Address, 0x-prefixed (40 hex characters). **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/addresses/0x388C818CA8B9251b393131C08a736A67ccB19297/blocks-validated' -H 'x-api-key: YourApiKeyToken' ``` ## Tokens (Blockscout-compatible) Token list, token details, transfers, holders and NFT instances. ### Get tokens `GET /{chainId}/api/v2/tokens` Tokens ranked by market cap and holders, with optional search. **Query parameters** - `q`: string. Filter by token name or symbol. - `type`: string. Comma-separated token standards, e.g. ERC-20,ERC-721,ERC-1155,ERC-404. - `sort`: string (one of: fiat_value, holders_count, circulating_market_cap). Sort field, used together with order. - `order`: string (one of: asc, desc). Sort direction, used together with sort. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens' -H 'x-api-key: YourApiKeyToken' ``` ### Get token `GET /{chainId}/api/v2/tokens/{token_address}` Name, symbol, decimals, supply, holders and price of a token. **Path parameters** - `token_address` (required): string. Token contract address. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xdAC17F958D2ee523a2206206994597C13D831ec7' -H 'x-api-key: YourApiKeyToken' ``` ### Get token counters `GET /{chainId}/api/v2/tokens/{token_address}/counters` Number of holders and transfers of a token. **Path parameters** - `token_address` (required): string. Token contract address. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xdAC17F958D2ee523a2206206994597C13D831ec7/counters' -H 'x-api-key: YourApiKeyToken' ``` ### Get token transfers by token `GET /{chainId}/api/v2/tokens/{token_address}/transfers` Latest transfers of a token. **Path parameters** - `token_address` (required): string. Token contract address. **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xdAC17F958D2ee523a2206206994597C13D831ec7/transfers' -H 'x-api-key: YourApiKeyToken' ``` ### Get token holders `GET /{chainId}/api/v2/tokens/{token_address}/holders` Holders of a token, largest balance first. **Path parameters** - `token_address` (required): string. Token contract address. **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xdAC17F958D2ee523a2206206994597C13D831ec7/holders' -H 'x-api-key: YourApiKeyToken' ``` ### Get NFT instances `GET /{chainId}/api/v2/tokens/{token_address}/instances` Instances of an NFT collection, with metadata and owner. **Path parameters** - `token_address` (required): string. Token contract address. **Query parameters** - `holder_address_hash`: string. Only instances held by this address. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/instances' -H 'x-api-key: YourApiKeyToken' ``` ### Get NFT instance `GET /{chainId}/api/v2/tokens/{token_address}/instances/{token_id}` Metadata, media and owner of a single NFT. **Path parameters** - `token_address` (required): string. Token contract address. - `token_id` (required): string. Token id of the NFT instance, in decimal. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/instances/1' -H 'x-api-key: YourApiKeyToken' ``` ### Get NFT instance transfers `GET /{chainId}/api/v2/tokens/{token_address}/instances/{token_id}/transfers` Transfer history of a single NFT. **Path parameters** - `token_address` (required): string. Token contract address. - `token_id` (required): string. Token id of the NFT instance, in decimal. **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/instances/1/transfers' -H 'x-api-key: YourApiKeyToken' ``` ### Get NFT instance holders `GET /{chainId}/api/v2/tokens/{token_address}/instances/{token_id}/holders` Holders of a single NFT, useful for ERC-1155 editions. **Path parameters** - `token_address` (required): string. Token contract address. - `token_id` (required): string. Token id of the NFT instance, in decimal. **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/instances/1/holders' -H 'x-api-key: YourApiKeyToken' ``` ### Get NFT instance transfers count `GET /{chainId}/api/v2/tokens/{token_address}/instances/{token_id}/transfers-count` Number of transfers of a single NFT. **Path parameters** - `token_address` (required): string. Token contract address. - `token_id` (required): string. Token id of the NFT instance, in decimal. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/tokens/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/instances/1/transfers-count' -H 'x-api-key: YourApiKeyToken' ``` ## Smart contracts (Blockscout-compatible) Verified contracts, their source code and ABI. ### Get verified contracts `GET /{chainId}/api/v2/smart-contracts` Recently verified contracts, with optional search and language filter. **Query parameters** - `q`: string. Filter by contract name or address. - `filter`: string (one of: solidity, vyper, yul, geas). Only contracts written in this language. - `sort`: string (one of: balance, transactions_count). Sort field, used together with order. - `order`: string (one of: asc, desc). Sort direction, used together with sort. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/smart-contracts' -H 'x-api-key: YourApiKeyToken' ``` ### Get verified contracts counters `GET /{chainId}/api/v2/smart-contracts/counters` Total and new (last 24 hours) contracts and verified contracts. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/smart-contracts/counters' -H 'x-api-key: YourApiKeyToken' ``` ### Get smart contract `GET /{chainId}/api/v2/smart-contracts/{address_hash}` Source code, ABI, compiler settings and proxy implementations of a contract. **Path parameters** - `address_hash` (required): string. Contract address. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/smart-contracts/0xdAC17F958D2ee523a2206206994597C13D831ec7' -H 'x-api-key: YourApiKeyToken' ``` ## Search (Blockscout-compatible) Find addresses, tokens, blocks, transactions and contracts by name or identifier. ### Search `GET /{chainId}/api/v2/search` Full search, paginated, across tokens, addresses, contracts, blocks and transactions. **Query parameters** - `q` (required): string. Search term: name, symbol, address, hash or block number. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/search?q=usdt' -H 'x-api-key: YourApiKeyToken' ``` ### Quick search `GET /{chainId}/api/v2/search/quick` Top matches for a search term, unpaginated, for autocomplete. **Query parameters** - `q` (required): string. Search term: name, symbol, address, hash or block number. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/search/quick?q=usdt' -H 'x-api-key: YourApiKeyToken' ``` ### Check search redirect `GET /{chainId}/api/v2/search/check-redirect` Whether a search term resolves to a single entity page (address, block or transaction). **Query parameters** - `q` (required): string. Search term to resolve. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/search/check-redirect?q=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' -H 'x-api-key: YourApiKeyToken' ``` ## Stats (Blockscout-compatible) Chain counters, charts and the most active contracts. ### Get stats `GET /{chainId}/api/v2/stats` Totals, average block time, coin price, market cap, gas prices and network utilization. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/stats' -H 'x-api-key: YourApiKeyToken' ``` ### Get transactions chart `GET /{chainId}/api/v2/stats/charts/transactions` Daily transaction counts for the last month. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/stats/charts/transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get market chart `GET /{chainId}/api/v2/stats/charts/market` Daily price and market cap of the native coin. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/stats/charts/market' -H 'x-api-key: YourApiKeyToken' ``` ### Get hot contracts `GET /{chainId}/api/v2/stats/hot-smart-contracts` Contracts with the most transactions over a time window. **Query parameters** - `scale` (required): string (one of: 5m, 1h, 3h, 1d, 7d, 30d). Time window. - `sort`: string (one of: transactions_count, total_gas_used). Sort field, used together with order. - `order`: string (one of: asc, desc). Sort direction, used together with sort. - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/stats/hot-smart-contracts?scale=1d' -H 'x-api-key: YourApiKeyToken' ``` ## Main page & indexing (Blockscout-compatible) The short lists a Blockscout home page shows, plus indexing progress. ### Get main page blocks `GET /{chainId}/api/v2/main-page/blocks` The latest blocks, as shown on the home page. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/main-page/blocks' -H 'x-api-key: YourApiKeyToken' ``` ### Get main page transactions `GET /{chainId}/api/v2/main-page/transactions` The latest transactions, as shown on the home page. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/main-page/transactions' -H 'x-api-key: YourApiKeyToken' ``` ### Get indexing status `GET /{chainId}/api/v2/main-page/indexing-status` Whether blocks and internal transactions are fully indexed. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/main-page/indexing-status' -H 'x-api-key: YourApiKeyToken' ``` ## Withdrawals (Blockscout-compatible) Validator withdrawals on proof-of-stake chains. ### Get withdrawals `GET /{chainId}/api/v2/withdrawals` Latest validator withdrawals, newest first. **Query parameters** - `cursor`: string. Opaque page cursor: pass next_page_params.cursor from the previous response. **Example request** ```bash curl 'https://blockscout.routescan.io/1/api/v2/withdrawals' -H 'x-api-key: YourApiKeyToken' ``` # Archive RPC Standard JSON-RPC with full archive state and debug and trace methods, on supported mainnet and testnet networks. Point an existing client at the endpoint URL to read historical state or trace a call without running a node. ## Base URL The chain and the API key are both in the path: ``` https://rpc.routescan.io/evm/{chainId}/{apiKey} ``` - `{chainId}`: the numeric chain id (e.g. `1` Ethereum). - `{apiKey}`: your API key. JSON-RPC requests count against the account's RPC allowance. ## Chains See [supported chains](https://routescan.io/chains?product=rpc) for Archive RPC availability. Filter by mainnet or testnet to find the network and EVM chain ID to use. ## Authentication Put your API key in the path. Paid plans include debug and trace methods. Free API keys can call eth_* methods, without debug, trace or Beacon access: 86,400 RU per day and 1 RU/s. Without an API key, only eth_blockNumber is available at /evm/{chainId}: 86,400 RU per day and 1 RU/s, counted per client IP (per /64 for IPv6). ``` curl "https://rpc.routescan.io/evm/1/YourApiKeyToken" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae","0x1"]}' ``` ## Methods and Request Units Archive RPC supports the methods below. Availability also depends on the selected chain and node client. RPC usage is measured in Request Units (RU). Every JSON-RPC call costs 1 RU, including trace and debug. A batch of N calls costs N RU. JSON-RPC has an RU allowance separate from indexed API request limits, shared across all keys and chains of the same user. Paid JSON-RPC quotas use fixed 30-day windows, independent of calendar months and Stripe billing cycles. Rate limits are measured in RU and enforced over one-minute windows. Each JSON-RPC call counts toward the rate limit: a batch of N calls uses N RU. Failed requests are not refunded. | JSON-RPC method | RU per call | | --- | ---: | | `debug_getBadBlocks` | 1 | | `debug_getRawBlock` | 1 | | `debug_getRawHeader` | 1 | | `debug_getRawReceipts` | 1 | | `debug_getRawTransaction` | 1 | | `debug_traceBlock` | 1 | | `debug_traceBlockByHash` | 1 | | `debug_traceBlockByNumber` | 1 | | `debug_traceCall` | 1 | | `debug_traceTransaction` | 1 | | `eth_blockNumber` | 1 | | `eth_call` | 1 | | `eth_chainId` | 1 | | `eth_coinbase` | 1 | | `eth_estimateGas` | 1 | | `eth_feeHistory` | 1 | | `eth_gasPrice` | 1 | | `eth_getBalance` | 1 | | `eth_getBlockByHash` | 1 | | `eth_getBlockByNumber` | 1 | | `eth_getBlockReceipts` | 1 | | `eth_getBlockTransactionCountByHash` | 1 | | `eth_getBlockTransactionCountByNumber` | 1 | | `eth_getCode` | 1 | | `eth_getFilterChanges` | 1 | | `eth_getFilterLogs` | 1 | | `eth_getLogs` | 1 | | `eth_getProof` | 1 | | `eth_getRawTransactionByHash` | 1 | | `eth_getStorageAt` | 1 | | `eth_getTransactionByBlockHashAndIndex` | 1 | | `eth_getTransactionByBlockNumberAndIndex` | 1 | | `eth_getTransactionByHash` | 1 | | `eth_getTransactionCount` | 1 | | `eth_getTransactionReceipt` | 1 | | `eth_getUncleByBlockHashAndIndex` | 1 | | `eth_getUncleByBlockNumberAndIndex` | 1 | | `eth_getUncleCountByBlockHash` | 1 | | `eth_getUncleCountByBlockNumber` | 1 | | `eth_maxPriorityFeePerGas` | 1 | | `eth_mining` | 1 | | `eth_newBlockFilter` | 1 | | `eth_newFilter` | 1 | | `eth_newPendingTransactionFilter` | 1 | | `eth_protocolVersion` | 1 | | `eth_sendRawTransaction` | 1 | | `eth_syncing` | 1 | | `eth_uninstallFilter` | 1 | | `trace_block` | 1 | | `trace_call` | 1 | | `trace_callMany` | 1 | | `trace_filter` | 1 | | `trace_get` | 1 | | `trace_rawTransaction` | 1 | | `trace_replayBlockTransactions` | 1 | | `trace_replayTransaction` | 1 | | `trace_transaction` | 1 | | `txpool_content` | 1 | ### Beacon API operations Beacon API operations keep separate weighted units and counters. The one-call, one-RU rule applies only to JSON-RPC. | Beacon operation | Weighted units per operation | | --- | ---: | | `genesis` | 1 | | `headers` | 1 | | `block` | 2 | | `block_parts` | 1 | | `blob_sidecars` | 2 | | `state` | 1 | | `validator` | 1 | | `validators` | 25 | | `validator_balances` | 25 | | `committees` | 10 | | `light_client` | 2 | | `config` | 1 | | `node` | 1 | ## Limits - `eth_getLogs` spans at most 10,000 blocks per query. Split a wider range into several requests. - HTTP only. There is no WebSocket endpoint, so `eth_subscribe` and other subscription methods are not available. # Streams Streams runs pipelines that read decoded EVM datasets, such as ERC-20 transfers or raw logs, transform the rows with SQL or a script, and deliver them to your systems: webhooks, queues, object storage and databases. Manage pipelines from the console, with the rts CLI or with the REST API. ## How Streams works A **pipeline** is a graph of named nodes, defined in JSON. Rows flow from sources, through optional transforms, to one or more sinks. Each account has one Streams project, created the first time it uses Streams, and every pipeline in it is identified by its name. - **Sources** read one dataset on one chain, such as `ethereum.erc20_transfers`, from the latest block or from the earliest available data. A source can filter rows with a SQL condition. See [Chains and datasets](/streams/datasets). - **Transforms** are optional. A `sql` transform selects, filters and reshapes rows, a `script` transform runs TypeScript or JavaScript on each row, and a `dynamic_table` holds a set of values, such as a watchlist, that SQL can check. See [Pipelines and transforms](/streams/pipelines). - **Sinks** deliver rows to a webhook, Amazon SQS, S3 or EventBridge, Postgres, MySQL, ClickHouse, Kafka, Google Pub/Sub or S2. See [Sinks and secrets](/streams/sinks). - **Secrets** hold the credentials of sinks. A pipeline references them by name; their values are stored once and never returned. A pipeline runs until you pause or delete it. A **job** is a pipeline with a bounded range of blocks that stops by itself when it reaches the end, for one-off exports and backfills. ## What you can build - **Deposit notifications**: ERC-20 transfers to your addresses, posted to a webhook within seconds of the block. See the [quickstart](/streams/quickstart). - **Contract events in your database**: the logs of a contract, filtered by event topic and written to Postgres, MySQL or ClickHouse, from the earliest available data and then live. - **Data lake exports**: every transfer of a token written to S3 as Parquet files, partitioned by the columns you choose. - **Event-driven services**: rows published to Kafka, Amazon SQS, EventBridge or Google Pub/Sub, for services that already consume a queue. - **Watchlists**: transfers that involve any address of a list you update while the pipeline runs, with a dynamic table. ## Delivery - Rows go out as each block is indexed, in batches. `batch_size` and `batch_flush_interval` on the sink tune how many rows a batch holds and how long it waits. - Delivery is at least once: after a retry, a receiver can see the same row again. Deduplicate on the `primary_key` of the node the sink reads, for example the `id` column of the dataset. - A webhook receives a `POST` with a JSON array of rows, or one row per request with `one_row_per_request`. Responses `408`, `429` and `5xx`, timeouts and network errors are retried; other errors stop the delivery and the pipeline reports them in its status and logs. - The columns of a row are the ones the node selects. Run `rts streams pipelines inspect` to see real rows before you point a sink at your systems. ## Access and permissions Sign in to the [console](https://console.routescan.io) to manage pipelines and secrets from the Streams page, or use the rts CLI and the REST API with an API key. Keys need these permissions: | Permission | Allows | | --- | --- | | `streams:read` | Read pipelines, their status, state, logs and messages, secrets names and dynamic tables. | | `streams:write` | Create, update, validate, pause, resume, restart and delete pipelines, secrets and table values. | | `usage:read` | Read usage and estimated cost. | | `billing:read` | Read the usage credit and its history. | | `billing:write` | Buy credit with a top-up. | The catalog of chains and datasets and the price list need no key. ## Next steps - [Quickstart](/streams/quickstart): deliver USDC transfers to a webhook in a few commands. - [Pipelines and transforms](/streams/pipelines): the definition format, SQL rules and examples. - [Billing and usage credit](/streams/billing): what a pipeline costs and how the credit pays for it. - [Limits and FAQ](/streams/limits): what an account can run and common questions. # Streams quickstart This tutorial delivers every USDC transfer on Ethereum to a webhook. It takes a few minutes with the rts CLI; the same steps work with the REST API. ## 1. Install and sign in Install the rts CLI on macOS or Linux: ```bash curl -fsSL https://console.routescan.io/install.sh | bash ``` Sign in through the browser. The default selection of permissions includes `streams:read` and `streams:write`; with a custom selection, keep both. ```bash rts auth login rts auth status ``` ## 2. Pick a chain and a dataset List the chains you can read, then the columns of the dataset you need. A source names its dataset as `.`, here `ethereum.erc20_transfers`. ```bash rts streams chains rts streams datasets erc20_transfers ``` `erc20_transfers` has, among others, `id`, `block_number`, `transaction_hash`, `address` (the token contract), `sender`, `recipient` and `amount` in the token’s smallest unit. ## 3. Store the webhook credential Streams sends the credential as a request header. Write it to `secret.json`, so the value stays out of your shell history: ```json { "name": "USDC_HOOK", "type": "httpauth", "value": { "secretKey": "Authorization", "secretValue": "Bearer YOUR_WEBHOOK_TOKEN" } } ``` ```bash rts streams secrets create --body-file secret.json --yes ``` Every command that changes something needs `--yes`. Delete `secret.json` once the secret exists: the API never returns its value. ## 4. Write the pipeline Save this as `pipeline.json`. The source keeps the transfers of the USDC contract and starts from the latest block; the SQL transform picks the columns to deliver and turns the amount into text; the sink posts them to your webhook with the `USDC_HOOK` secret. ```json { "name": "usdc-transfers", "description": "USDC transfers on Ethereum", "definition": { "sources": { "transfers": { "type": "dataset", "dataset_name": "ethereum.erc20_transfers", "version": "1.2.0", "start_at": "latest", "filter": "address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'" } }, "transforms": { "usdc": { "type": "sql", "primary_key": "id", "sql": "SELECT id, block_number, transaction_hash, sender, recipient, CAST(amount AS TEXT) AS amount FROM transfers" } }, "sinks": { "delivery": { "type": "webhook", "from": "usdc", "url": "https://hooks.example.com/streams/usdc", "secret_name": "USDC_HOOK" } } } } ``` ## 5. Validate and deploy Validation checks the definition and plans the SQL without deploying anything. It needs no `--yes` and exits with code 1 when the definition is not valid. ```bash rts streams pipelines validate --body-file pipeline.json ``` Each issue has a `code`, a `message`, its path in `field` and, when available, `suggestions`: ```json { "valid": false, "errors": [ { "field": "sinks.delivery.secret_name", "code": "invalid_value", "message": "secret \"USDC_HOOK\" does not exist in this project" } ], "warnings": [] } ``` When it is valid, apply it. A new pipeline starts in `DEPLOYING`, then `RUNNING`. ```bash rts streams pipelines apply --body-file pipeline.json --yes ``` ## 6. Watch the messages Inspect shows the rows flowing through each source, transform and sink as blocks arrive. `--limit` stops after that many messages. ```bash rts streams pipelines inspect usdc-transfers --limit 5 ``` Your webhook receives a JSON array of rows with the columns of the `usdc` transform. Answer with a `2xx` status; deduplicate on `id`, since a retried batch can arrive twice. ## 7. Check progress and errors Status reports the pipeline status and its recent errors, state the position on the chain and the delivery backlog, and logs what happened: ```bash rts streams pipelines status usdc-transfers rts streams pipelines state usdc-transfers rts streams pipelines logs usdc-transfers --query 'logLevels=warn,error&direction=desc' ``` See [Lifecycle and monitoring](/streams/monitoring) for every field. ## 8. Pause or delete A running pipeline is billed per active hour and per delivered message; a paused one costs nothing. Pause it to keep its position and resume later, or delete it when you are done. See [Billing and usage credit](/streams/billing). ```bash rts streams pipelines pause usdc-transfers --yes rts streams pipelines delete usdc-transfers --yes ``` # Pipelines and transforms A pipeline body is JSON with a name, optional settings and a `definition` of sources, transforms and sinks. This page describes every field and the rules validation applies, with examples you can apply as they are. ## Pipeline definition Settings can go at the top level or inside `definition`; when both are set, the top level wins. Sending a body with an existing name updates that pipeline, raises its version and logs "pipeline updated to version N". | Field | Type | Rules | | --- | --- | --- | | `name` | string | Required. 1 to 50 lowercase letters, digits and hyphens, starting and ending with a letter or digit. | | `definition` | object | Required. `sources`, `sinks` and optional `transforms`. | | `description` | string | Optional. | | `use_dedicated_ip` | boolean | Default `false`. Dedicated egress IPs are not available yet: `true` returns a warning and the pipeline uses shared egress. | | `job` | boolean | Default `false`. A job stops at the end of its sources; every source needs a `filter` and `start_at: "earliest"`. | Node names match `^[A-Za-z_][A-Za-z0-9_]*$` and are unique across sources, transforms and sinks. A pipeline needs at least one source and one sink. A source or transform that nothing reads produces the warning "not used by any transform or sink". ## Sources The only source type is `dataset`. | Field | Rules | | --- | --- | | `type` | `dataset`. | | `dataset_name` | Required. `.`, for example `ethereum.raw_logs`. | | `version` | Required. One of the versions of the dataset. | | `start_at` | `latest` (default) or `earliest`. Block numbers are not accepted. | | `filter` | Optional SQL condition, with the same restrictions as `sql` transforms. | | `end_block` | Ignored, with a warning. | A `filter` drops rows before any transform reads them, so it is the cheapest place for a condition on a column such as `address`. `rts streams datasets ` shows which columns a filter can use. ## SQL transforms A `sql` transform needs `sql` and `primary_key`. It reads from a source or another transform named in `FROM`. A transform cannot read from itself, and cycles are rejected. Validation plans the SQL on the server: unknown columns or functions are errors with the code `sql_error`. - `JOIN` is not allowed, except with `unnest`. - `GROUP BY` is not allowed; aggregate with the `postgres_aggregate` sink instead. - Window functions (`OVER (...)`) are not allowed. - Volatile functions are not allowed: `now`, `random`, `rand`, `uuid` functions, `gen_random_uuid`, `clock_timestamp`, `current_timestamp`, `current_date`, `current_time` and `localtime` functions. - To match against a dynamic table, use `dynamic_table_check('', column)`. Large integers such as token amounts are decimals with up to 78 digits. `CAST(amount AS TEXT)` delivers them as exact strings, which every destination can store. Transforms can be chained. Here the first one keeps transfers of at least 1,000,000 USDC (amounts are in 6-decimal units), and the second keeps those sent from one address: ```json "transforms": { "large": { "type": "sql", "primary_key": "id", "sql": "SELECT id, block_number, sender, recipient, amount FROM transfers WHERE amount >= 1000000000000" }, "outgoing": { "type": "sql", "primary_key": "id", "sql": "SELECT id, block_number, recipient, CAST(amount AS TEXT) AS amount FROM large WHERE sender = '0x28c6c06298d514db089934071355e5743bf21d60'" } } ``` ## Script transforms A `script` transform runs TypeScript or JavaScript on each row of the node it reads. The script defines a top-level, synchronous function `invoke(data)` that returns an object, an array of objects for several rows, or `null` to drop the row. `import` and `export` are not available. The script is compiled during validation, and compilation errors are returned as validation errors. ```typescript type Transfer = { id: string; block_number: number; sender: string; recipient: string; amount: string }; function invoke(data: Transfer) { const usdc = BigInt(String(data.amount).split('.')[0]) / 1_000_000n; const size = usdc >= 100_000n ? 'whale' : usdc >= 1_000n ? 'large' : 'small'; return { id: data.id, block_number: data.block_number, sender: data.sender, recipient: data.recipient, usdc: usdc.toString(), size }; } ``` In the definition the script is a JSON string, and `schema` declares the output columns: ```json "transforms": { "sized": { "type": "script", "from": "transfers", "primary_key": "id", "language": "typescript", "schema": { "id": "string", "block_number": "uint64", "sender": "string", "recipient": "string", "usdc": "string", "size": "string" }, "script": "type Transfer = { id: string; block_number: number; sender: string; recipient: string; amount: string };\n\nfunction invoke(data: Transfer) {\n const usdc = BigInt(String(data.amount).split('.')[0]) / 1_000_000n;\n const size = usdc >= 100_000n ? 'whale' : usdc >= 1_000n ? 'large' : 'small';\n return { id: data.id, block_number: data.block_number, sender: data.sender, recipient: data.recipient, usdc: usdc.toString(), size };\n}" } } ``` | Field | Rules | | --- | --- | | `primary_key` | Required string. | | `from` | Required. A source or transform. | | `language` | `typescript`, `ts`, `javascript` or `js`, in any case. | | `script` | Required, not empty. | | `schema` | Optional `{ "column": "type" }`. Types: `string`, `utf8`, `large_string`, `large_utf8`, `int8` to `int64`, `uint8` to `uint64`, `float16`, `float32`, `float64`, `boolean`, `bool`, `binary`, `date32`, `date64`, `timestamp`, `time32`, `time64`, `duration`, `null`. | | `parallelism` | Integer, at least 1. | | `batch_size` | Integer, at least 0. | Scripts must be deterministic: `Date.now()`, `new Date()` without arguments and `Math.random()` throw. `new Date(value)`, `Date.parse` and `Date.UTC` work. `console.log` and the other console methods write to the pipeline logs. See [Limits](/streams/limits#script-limits) for time and memory. ## Dynamic tables A dynamic table lets a running pipeline match rows against a set of values that you change over time, such as the tokens or addresses you watch. Declare it as a transform and check it from SQL with `dynamic_table_check`: ```json "transforms": { "tokens": { "type": "dynamic_table", "backend_type": "Hosted", "backend_entity_name": "watched_tokens" }, "watched": { "type": "sql", "primary_key": "id", "sql": "SELECT id, block_number, address AS token, sender, recipient, CAST(amount AS TEXT) AS amount FROM transfers WHERE dynamic_table_check('tokens', address)" } } ``` | Field | Rules | | --- | --- | | `backend_type` | Required. `Hosted` or `Postgres`, in any case. | | `backend_entity_name` | Required identifier: the table name. | | `schema` | Optional identifier. Default `streamling`. | | `column` | Optional identifier. Default `value`. | | `time_column` | Optional identifier. Default `updated_at`. | | `secret_name` | Required with `Postgres`: an existing `jdbc` secret. | | `cache` | Optional boolean. | | `cache_refresh_debounce_ms` | Integer, at least 1. Only with `cache: true`. | | `max_connections` | Integer, at least 1. | | `sql` | Optional. Reads from exactly one source. | With the `Hosted` backend, you manage the values with the CLI or the API. With the `Postgres` backend, the transform reads the table from your database through a `jdbc` secret. A table is addressed by its `backend_entity_name`, with the `schema` query parameter (default `streamling`); both must match `^[A-Za-z_][A-Za-z0-9_]*$`. ```bash rts streams tables add watched_tokens --body '{"values":["0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"]}' --yes rts streams tables list watched_tokens --query 'limit=100' ``` - Adding and removing take `{"values": [...]}` with up to 10,000 strings and return `{"seq", "count"}`. Values are stored exactly as sent, without lowercasing or trimming, so match the case of the column you check. - Listing returns values sorted in ascending order with their `updated_at`, `next_cursor` for the next page and `count`, the total number of active values. `limit` ranges from 1 to 10,000, default 1,000. - Deleting a table removes every value. It returns `409` `table_in_use` while a running, deploying or restarting pipeline declares the table, unless you pass `force=true`. ## Jobs A job reads a bounded range and ends in `COMPLETED`. Every source needs `start_at: "earliest"` and a `filter` on the block number. This one reads ten Avalanche blocks: ```json { "name": "avax-blocks-job", "definition": { "job": true, "sources": { "blocks": { "type": "dataset", "dataset_name": "avalanche.raw_blocks", "version": "1.0.0", "start_at": "earliest", "filter": "number >= 99927100 AND number <= 99927109" } }, "transforms": {}, "sinks": { "discard": { "type": "blackhole", "from": "blocks" } } } } ``` ## Example: contract events to Postgres This pipeline reads the logs of a Uniswap v3 pool on Ethereum from the earliest available data, keeps the `Swap` events by their first topic and writes them to a Postgres table, skipping rows already there. `ANALYTICS_DB` is a `jdbc` secret; see [Sinks and secrets](/streams/sinks#secrets). ```json { "name": "pool-swaps", "definition": { "sources": { "logs": { "type": "dataset", "dataset_name": "ethereum.raw_logs", "version": "1.2.0", "start_at": "earliest", "filter": "address = '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640'" } }, "transforms": { "swaps": { "type": "sql", "primary_key": "id", "sql": "SELECT id, block_number, block_timestamp, transaction_hash, log_index, data FROM logs WHERE topics LIKE '0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67%'" } }, "sinks": { "warehouse": { "type": "postgres", "from": "swaps", "secret_name": "ANALYTICS_DB", "schema": "public", "table": "pool_swaps", "primary_key": "id", "on_conflict": "nothing" } } } } ``` `topics` holds the lowercase topics separated by commas, starting with the event signature hash. Validate the pipeline and inspect a few rows before you create the table, so the columns match. # Chains and datasets A source reads one dataset on one chain, named `.`, for example `avalanche.erc20_transfers` or `ethereum_sepolia.raw_logs`. The catalog behind these lists is public: `GET /catalog` needs no API key. ## Chains Run `rts streams chains` for the current list, with each chain’s finality. Every chain serves the trace-based datasets. | Slug | Chain | EVM chain ID | Network | | --- | --- | --- | --- | | `ethereum` | Ethereum | 1 | Mainnet | | `avalanche` | Avalanche C-Chain | 43114 | Mainnet | | `mantle` | Mantle | 5000 | Mainnet | | `hemi` | Hemi | 43111 | Mainnet | | `phase` | PHASE | 1015 | Mainnet | | `chiliz` | Chiliz | 88888 | Mainnet | | `nibiru` | Nibiru | 6900 | Mainnet | | `gunz` | GUNZ | 43419 | Mainnet | | `numbers` | Numbers | 10507 | Mainnet | | `playa3ull` | PLAYA3ULL Games | 3011 | Mainnet | | `ethereum_sepolia` | Sepolia | 11155111 | Testnet | | `eth_hoodi` | Hoodi | 560048 | Testnet | | `blast_sepolia` | Blast Sepolia | 168587773 | Testnet | | `hemi_sepolia` | Hemi Sepolia | 743111 | Testnet | | `boba_sepolia` | Boba Sepolia | 28882 | Testnet | | `chiliz_spicy` | Chiliz Spicy | 88882 | Testnet | | `nibiru_testnet_2` | Nibiru Testnet-2 | 6911 | Testnet | ## Datasets Pin a `version` in each source. `rts streams datasets` lists them; `rts streams datasets ` shows the columns, their types and which ones a filter can use. | Dataset | Versions | Contents | | --- | --- | --- | | `raw_blocks` | `1.0.0` | One row per block. | | `receipt_transactions` | `1.0.0`, `1.2.0` | Transactions with their receipt fields. `raw_transactions` is an alias. | | `raw_logs` | `1.0.0`, `1.2.0` | Every event log, with its topics and data. | | `raw_traces` | `1.1.0`, `1.2.0` | Call traces, derived from debug traces. | | `native_transfers` | `1.0.0` | Native coin transfers, derived from debug traces. | | `erc20_transfers` | `1.2.0` | Decoded ERC-20 `Transfer` events. | | `erc721_transfers` | `1.2.0` | Decoded ERC-721 transfers. | | `erc1155_transfers` | `1.2.0` | Decoded ERC-1155 transfers. | ## Columns of common datasets Every row has an `id`, unique within the dataset, which makes a good `primary_key`. Hashes and addresses are lowercase strings; amounts and values are decimals of up to 78 digits in the smallest unit; `block_timestamp` is in Unix seconds. | Dataset | Columns | | --- | --- | | `erc20_transfers` 1.2.0 | `id`, `block_number`, `block_timestamp`, `block_hash`, `transaction_hash`, `transaction_index`, `log_index`, `address` (token contract), `sender`, `recipient`, `amount` | | `erc721_transfers` 1.2.0 | `id`, `block_number`, `block_timestamp`, `block_hash`, `transaction_hash`, `transaction_index`, `log_index`, `address`, `sender`, `recipient`, `token_id` | | `erc1155_transfers` 1.2.0 | `id`, `address`, `sender`, `recipient`, `token_id`, `amount`, `block_number`, `block_timestamp`, `block_hash`, `log_index`, `transaction_hash`, `transaction_index` | | `raw_logs` 1.2.0 | `id`, `block_number`, `block_hash`, `transaction_hash`, `transaction_index`, `log_index`, `address`, `data`, `topics`, `block_timestamp` | | `native_transfers` 1.0.0 | `id`, `block_number`, `block_timestamp`, `block_hash`, `transaction_hash`, `transaction_index`, `trace_address`, `trace_type`, `call_type`, `tx_type`, `sender`, `recipient`, `amount` | | `raw_blocks` 1.0.0 | `id`, `number`, `hash`, `parent_hash`, `miner`, `gas_limit`, `gas_used`, `timestamp`, `transaction_count`, `base_fee_per_gas` and the other header fields | `receipt_transactions` adds the receipt to each transaction: `from_address`, `to_address`, `value`, `input`, `receipt_status`, `receipt_gas_used`, `receipt_contract_address` and, on rollups, the L1 fee fields. `raw_traces` has one row per call, with `from_address`, `to_address`, `value`, `input`, `output`, `trace_type`, `call_type`, `trace_address`, `status` and `error`. # Sinks and secrets A sink delivers the rows of one node to a destination you control. Its credentials live in a secret that the sink references by name. ## Common fields Every sink needs `from`, the source or transform it delivers. All sinks accept `batch_size`, an integer greater than 0, and `batch_flush_interval`, in milliseconds as a number of at least 0 or as a string such as `500ms`, `5s` or `1m`. A `secret_name` must name a secret that exists in the project. A pipeline can have several sinks, each reading any node. ## Sink types | Type | Fields | | --- | --- | | `webhook` | Required: `url` (http or https). Optional: `headers` (string map), `one_row_per_request`, `secret_name` (`httpauth`). | | `blackhole` | No fields. | | `postgres` | Required: `schema`, `table`, `secret_name` (`jdbc`). Optional: `primary_key`, `on_conflict` (`update` or `nothing`), `update_where` (`{ "column": "op" }` with `=`, `>`, `>=`, `<`, `<=`, `!=` or `<>`). | | `postgres_aggregate` | Required: `schema`, `landing_table`, `agg_table`, `primary_key`, `secret_name` (`jdbc`), `aggregate` (`{ "name": { "fn": "sum" \| "count" \| "avg", "from", "type" } }`). Optional: `group_by` (`{ "name": { "from", "type" } }`). | | `mysql`, `mysql_sink` | Required: `schema`, `table`, `secret_name` (`jdbc`). Optional: `primary_key`, `on_conflict` (`update` or `nothing`). | | `clickhouse` | Required: `table`, `primary_key`, `secret_name` (`clickHouse`). Optional: `append_only_mode`, `version_column_name`, `schema_override` (`{ "column": "ClickHouse type" }`). | | `kafka` | Required: `topic`, `data_format` (`json` or `avro`), `secret_name` (`kafka`). Optional: `primary_key`, `topic_partitions`. | | `s3_sink` | Required: `bucket`, and credentials (`secret_name`, or `access_key_id` and `secret_access_key`). Optional: `prefix`, `region` (default `us-east-1`), `endpoint`, `partition_columns`, `compression` (`zstd`, `gzip`, `brotli`, `snappy`, `lz4_raw` or `uncompressed`, the default), `max_concurrent_partition_uploads` (1 to 64), `session_token`. | | `sqs`, `sqs_sink` | Required: `queue_url` (`https://sqs..amazonaws.com//`), and credentials (`secret_name`, or `access_key_id` and `secret_access_key`). Optional: `region`, `endpoint_url`, `session_token`. | | `pubsub` | Required: `topic` (a name or `projects/...`), `secret_name` (`pubsub`). Optional: `endpoint_url`. | | `eventbridge` | Required: `detail_type`, and credentials (`secret_name`, or `access_key_id` and `secret_access_key`). Optional: `event_bus_name`, `region`, `source`, `event_source_name`, `endpoint_url`, `session_token`. | | `s2_sink` | Required: `basin`, `stream`, and `access_token` or `secret_name`. Optional: `endpoint_url`. | A `blackhole` sink discards the rows. Use it to try a definition on live data with `inspect` before you deliver anywhere. S3 writes Parquet files under `prefix`, one per batch. S3, SQS and EventBridge accept plain AWS keys in the definition, with a warning: prefer a secret. ## Configuration examples ### Webhook Posts batches of up to 100 rows, sending a partial batch after one second, with an extra header and the credential from `USDC_HOOK`: ```json "sinks": { "delivery": { "type": "webhook", "from": "usdc", "url": "https://hooks.example.com/streams/usdc", "secret_name": "USDC_HOOK", "headers": { "X-Source": "routescan-streams" }, "batch_size": 100, "batch_flush_interval": "1s" } } ``` ### Postgres Upserts rows by `id` into an existing table, whose columns match the ones the node selects: ```json "sinks": { "warehouse": { "type": "postgres", "from": "usdc", "secret_name": "ANALYTICS_DB", "schema": "public", "table": "usdc_transfers", "primary_key": "id", "on_conflict": "update" } } ``` ### ClickHouse ```json "sinks": { "olap": { "type": "clickhouse", "from": "usdc", "secret_name": "OLAP", "table": "usdc_transfers", "primary_key": "id" } } ``` ### Kafka Publishes each row as JSON, keyed by `id`. With `avro`, the `kafka` secret also needs the Schema Registry fields. ```json "sinks": { "events": { "type": "kafka", "from": "usdc", "secret_name": "EVENTS_KAFKA", "topic": "usdc-transfers", "data_format": "json", "primary_key": "id" } } ``` ### Amazon S3 ```json "sinks": { "archive": { "type": "s3_sink", "from": "usdc", "secret_name": "ARCHIVE_AWS", "bucket": "chain-archive", "prefix": "usdc/transfers", "region": "eu-west-1", "compression": "zstd" } } ``` ### Amazon SQS ```json "sinks": { "queue": { "type": "sqs", "from": "usdc", "secret_name": "QUEUE_AWS", "queue_url": "https://sqs.eu-west-1.amazonaws.com/123456789012/usdc-transfers" } } ``` ## Secrets A secret stores the credentials of a sink or of a Postgres dynamic table. Create one with a name, a type and a value; sending an existing name replaces the secret, and the pipelines that use it are updated automatically. The API returns names, types and timestamps, never values. - `name`: 1 to 64 letters, digits, underscores or hyphens. - `type`: `httpauth`, `jdbc`, `clickHouse`, `kafka`, `s3`, `sqs` or `pubsub`. Case matters. - `value`: a string or a JSON object, not empty, in the format of its type. A missing required field returns `400`; fields the type does not use are ignored. | Type | Used by | Value | | --- | --- | --- | | `httpauth` | `webhook` | `{ "secretKey", "secretValue" }` (also `name` or `header`, and `value`), or the string `"Header: value"` | | `jdbc` | `postgres`, `postgres_aggregate`, `mysql`, Postgres dynamic tables | `{ "host", "port", "user", "password", "databaseName", "ssl" }` (`database` also accepted; default ports 5432 and 3306), or a `postgres://user:pass@host:port/db?sslmode=...` URL | | `clickHouse` | `clickhouse` | `{ "url", "username", "password", "databaseName" }` (`user` and `database` also accepted; default database `default`) | | `kafka` | `kafka` | `{ "bootstrapServers", "securityProtocol", "saslMechanism", "saslJaasUsername", "saslJaasPassword", "schemaRegistryUrl", "schemaRegistryUsername", "schemaRegistryPassword" }`; the Schema Registry fields are for `avro` | | `s3`, `sqs` | `s3_sink`, `sqs`, `eventbridge` | `{ "accessKeyId", "secretAccessKey", "sessionToken", "region" }` (`accessKey`, `access_key_id` and `secret_access_key` also accepted) | | `pubsub` | `pubsub` | `{ "projectId", "credentialsJson" }`, where `credentialsJson` is the service account JSON, as an object or a string | Required fields: `secretKey` and `secretValue` for an `httpauth` object, `host` for a `jdbc` object, `url` for `clickHouse`, `bootstrapServers` for `kafka`, `accessKeyId` and `secretAccessKey` for `s3` and `sqs`, `projectId` for `pubsub`. The alternative names in the table count as the same field. For `s2_sink`, the secret value is the access token as a plain string. Validation rejects a sink or a Postgres dynamic table that references a secret of a type it cannot use. ### Secret examples ```json { "name": "ANALYTICS_DB", "type": "jdbc", "value": "postgres://streams:YOUR_PASSWORD@db.example.com:5432/analytics?sslmode=require" } ``` ```json { "name": "EVENTS_KAFKA", "type": "kafka", "value": { "bootstrapServers": "broker-1.example.com:9092", "securityProtocol": "SASL_SSL", "saslMechanism": "PLAIN", "saslJaasUsername": "streams", "saslJaasPassword": "YOUR_PASSWORD" } } ``` ```json { "name": "ARCHIVE_AWS", "type": "s3", "value": { "accessKeyId": "YOUR_ACCESS_KEY_ID", "secretAccessKey": "YOUR_SECRET_ACCESS_KEY", "region": "eu-west-1" } } ``` ```bash rts streams secrets create --body-file secret.json --yes rts streams secrets list ``` # Lifecycle and monitoring A pipeline moves through a small set of statuses. Status, state, logs and inspect tell you where it is, how far behind the chain head and what it delivers. ## Lifecycle A pipeline status is one of `DEPLOYING`, `RUNNING`, `PAUSED`, `RESTARTING`, `STOPPED`, `FAILED` or `COMPLETED`. A new or updated pipeline starts in `DEPLOYING`, or in `PAUSED` when it is held by a `publication_block`. When `publication_block` is not `null`, its `reason` explains why. | Action | Allowed from | Result | | --- | --- | --- | | Pause | `RUNNING`, `DEPLOYING`, `RESTARTING`, `FAILED` | `PAUSED` | | Resume | `PAUSED`, `STOPPED`, `FAILED` | `DEPLOYING` | | Restart | `RUNNING`, `DEPLOYING`, `PAUSED`, `STOPPED`, `FAILED`, `RESTARTING` | `RESTARTING` | An action from any other status returns `409` with "cannot a pipeline in status X". - **Pause, resume and restart** return the same receipt: `name`, `status`, `previous_status`, `revision`, `generation`, `version`, `reconciliation` and `state_cleared`. `reconciliation` is `pending`, `complete` or `superseded`. - **Resume** also returns `chains`. Send an `Idempotency-Key` header (1 to 128 letters, digits, underscores or hyphens) and reuse it when you retry: the same key returns the stored receipt. In the CLI, use `--idempotency-key`. - **Restart** keeps the pipeline state by default. With the body `{"clearState": true}`, it discards the state and starts again from the latest block; this can return `503` when the chain RPC is unavailable. - **Delete** removes the pipeline with its versions and logs and returns `200` with `{"name", "status": "DELETED", "deleted": true, "revision", "generation"}`. If the pipeline changes during the request, it returns `409` "pipeline changed; retry the request". Creating a pipeline with the name of a deleted one returns `result: "recreated"`, and its `version` keeps counting from the deleted one. ```bash rts streams pipelines restart usdc-transfers --body '{"clearState": true}' --yes ``` ### Trying a definition To check a definition without deploying it, run `rts streams pipelines validate`. To try it on live data, create a pipeline with a `blackhole` sink, follow its messages with `rts streams pipelines inspect`, then update or delete it. There are no temporary pipelines: `POST /pipelines/preview` returns `410` with the code `preview_removed`. ## Status, state and logs - **Status** returns the name, the status, the `publication_block` and `errors`: the errors logged since the last apply, resume or restart, with their timestamp, while `previous_errors` counts the older ones. - **State** returns the pipeline version, the progress on each chain and the delivery backlog of the sink. A chain entry can be `null`, as can its fields other than `status`, and `sink.last_delivery_at`. Each chain also reports `start_block`, `head_age_ms` and its `phase`: `waiting_for_head`, `catching_up`, `live` or `backfilling`. - **Logs** return up to 100 lines per page. Validation warnings and version changes are logged too. - **Error count** returns `{"data": {"count"}}` for the last `since_hours` hours (default 24). ```json { "name": "usdc-transfers", "version": 3, "chains": { "ethereum": { "status": "active", "cursor": 23781455, "head": 23781457, "head_lag_ms": 2380, "head_age_ms": 1120, "start_block": 23779001, "phase": "live" } }, "sink": { "pending_batches": 2, "pending_rows": 148, "pending_bytes": 61440, "delivered_rows": 1284310, "last_delivery_at": "2026-11-09T11:42:17.204Z" } } ``` | Parameter | Meaning | | --- | --- | | `log_levels` | Comma-separated levels: `info`, `warn`, `error`. `logLevels` is an alias. | | `direction` | `asc` (default) or `desc`. | | `cursor` | The `next_cursor` of the previous page; `after` is an alias. Returns lines strictly after it (`asc`) or before it (`desc`). | | `search` | Substring to match in the log text. | ```json { "items": [ { "timestamp": 1794223317402, "level": "warn", "text": "sink delivery: HTTP 503 from hooks.example.com, retrying in 30s" }, { "timestamp": 1794223205118, "level": "info", "text": "pipeline updated to version 3" } ], "next_cursor": "1794223205118:0", "has_more": true } ``` `has_more` tells whether another page follows. Treat the cursor as opaque: a timestamp in milliseconds is still accepted. The response keeps the older `data` envelope (`results` and `cursor`) too. ## Inspect live messages Inspect samples the rows of each node of a running pipeline. Each request keeps sampling active for 60 seconds; at most 20 messages per node per block are kept, and only blocks the pipeline has published are shown. Pass the returned cursor as `after` to receive newer messages. | Parameter | Meaning | | --- | --- | | `nodes` | Comma-separated node names, at most 64; default every node. | | `limit` | 1 to 500, default 200. | | `after` | The cursor of the previous response. | ```bash curl "https://api.console.routescan.io/v1/streams/pipelines/usdc-transfers/inspect?nodes=usdc&limit=20" \ -H "apikey: YOUR_API_KEY" ``` In the CLI, `rts streams pipelines inspect NAME` keeps polling; `--limit` and `--duration` stop it with exit code 0. # Streams CLI The rts CLI covers the whole Streams API, the usage credit and the catalog. It signs in through the browser and keeps the session on your machine. ## Using the CLI ```bash curl -fsSL https://console.routescan.io/install.sh | bash rts auth login rts auth status ``` Most `rts streams` commands map to one endpoint of the [REST API](/streams/api). `chains`, `datasets` and `catalog` read the public catalog, and `inspect` follows the live messages of a pipeline. Pass the pipeline, secret or table name as the first argument or with `--id`, query parameters with `--query` (for example `--query 'page_size=20&page_token=...'`, which can be repeated), and request bodies with `--body` or `--body-file` (`-` reads standard input). Output is JSON when piped or with `--json`. Every command that changes something needs `--yes`; without it rts exits with `confirmation_required`. `validate` is read-only and needs no `--yes`, although the API requires `streams:write` for it. `--dry-run` prints the request without sending it. Run `rts help --json` for the full command catalog, and `rts streams pipelines apply --help --json` for the definition format with examples. ## Commands | Command | Description | | --- | --- | | `rts streams chains` | Chains available to Streams pipelines, with their slug and finality. | | `rts streams datasets [DATASET]` | Datasets with their versions; with a dataset name, its column types and filterable columns. | | `rts streams catalog` | The full catalog: chains, datasets, transform and sink types, secret types and table backends. | | `rts streams pipelines list` | List pipelines; use `--query` for `page_size` and `page_token`. | | `rts streams pipelines get NAME` | Read a pipeline and its definition. | | `rts streams pipelines validate` | Validate a pipeline body without deploying it; read-only, exits 1 when invalid. | | `rts streams pipelines apply` | Create or update a pipeline from a JSON body with name and definition. | | `rts streams pipelines status NAME` | Status and recent errors. | | `rts streams pipelines state NAME` | Cursor, head, lag and delivery backlog per chain. | | `rts streams pipelines logs NAME` | Pipeline logs; use `--query` for `logLevels`, `direction`, `cursor` and `search`. | | `rts streams pipelines inspect NAME` | Live messages flowing through each source, transform and sink; `--limit` and `--duration` stop it with exit code 0. | | `rts streams pipelines errors NAME` | Number of error logs. | | `rts streams pipelines pause NAME` | Pause a pipeline. | | `rts streams pipelines resume NAME` | Resume a pipeline; reuse `--idempotency-key` when retrying. | | `rts streams pipelines restart NAME` | Restart a pipeline; the body can clear its state. | | `rts streams pipelines delete NAME` | Permanently delete a pipeline. | | `rts streams secrets list` | List secret names and types without values. | | `rts streams secrets create` | Create or replace a secret from a JSON body; prefer `--body-file -`. | | `rts streams secrets delete NAME` | Delete a secret. | | `rts streams tables list TABLE` | List dynamic table values; use `--query` for `schema`, `limit` and `cursor`. | | `rts streams tables add TABLE` | Add dynamic table values from a JSON body. | | `rts streams tables remove TABLE` | Remove dynamic table values from a JSON body. | | `rts streams tables delete TABLE` | Delete every value of a dynamic table; refused while active pipelines use it unless `force=true`. | | `rts streams usage` | Usage and estimated USD cost per day and pipeline; use `--query` for `from` and `to`. | | `rts streams pricing` | Price per active pipeline hour and message tiers. | | `rts credits get` | Usage credit balance, plan credit and the next expiry. | | `rts credits history` | Credit grants, daily debits and corrections; `--service streams` keeps the Streams lines. | | `rts credits topup` | A Stripe Checkout URL to buy credit, with `--amount` in USD and `--idempotency-key`. | ## Exit codes | Code | Meaning | | --- | --- | | `0` | Success. | | `1` | Error, including an invalid definition in `validate` and state conflicts such as `409`. | | `2` | Invalid input: missing or malformed arguments, a missing `--yes`, or a `400` or `422` input error from the API. | | `3` | Authentication failed or the key lacks the permission (`401` or `403`). | | `4` | Rate limited. | | `5` | Network error. | | `130`, `143`, `129` | Interrupted by `SIGINT`, `SIGTERM` or `SIGHUP`. | ## Scripting With JSON output and exit codes, the CLI fits in deploy scripts and CI. This applies every pipeline file of a directory after validating it, and stops at the first invalid one: ```bash for file in pipelines/*.json; do rts streams pipelines validate --body-file "$file" || exit 1 rts streams pipelines apply --body-file "$file" --yes done ``` # Streams REST API Every Streams operation is a REST call on the console API, authenticated with an API key. The rts CLI uses the same endpoints. ## Base URL and authentication All paths are relative to the base URL: ```text https://api.console.routescan.io/v1/streams ``` Send your API key in the `apikey` header. `GET` requests need the `streams:read` permission and every other method needs `streams:write`; `GET /usage` needs `usage:read`, and `GET /catalog` and `GET /pricing` need no key. Request bodies are JSON with `Content-Type: application/json`; other content types return `415`. ```bash curl "https://api.console.routescan.io/v1/streams/pipelines?limit=20" \ -H "apikey: YOUR_API_KEY" ``` ```bash curl "https://api.console.routescan.io/v1/streams/pipelines/validate" \ -H "apikey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ --data @pipeline.json ``` ```bash curl "https://api.console.routescan.io/v1/streams/pipelines" \ -H "apikey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ --data @pipeline.json ``` ```bash curl -X PUT "https://api.console.routescan.io/v1/streams/pipelines/usdc-transfers/resume" \ -H "apikey: YOUR_API_KEY" \ -H "Idempotency-Key: resume-usdc-transfers-1" ``` ## Endpoints | Method | Path | Permission | Purpose | | --- | --- | --- | --- | | `GET` | `/catalog` | `none` | Public catalog: chains, datasets with their columns, transforms and sinks. | | `GET` | `/pipelines` | `streams:read` | List pipelines, sorted by name. | | `POST` | `/pipelines` | `streams:write` | Create or update a pipeline by name. | | `POST` | `/pipelines/validate` | `streams:write` | Validate a pipeline body without deploying it. | | `GET` | `/pipelines/{name}` | `streams:read` | Read a pipeline. | | `DELETE` | `/pipelines/{name}` | `streams:write` | Delete a pipeline with its versions and logs. | | `PUT` | `/pipelines/{name}/pause` | `streams:write` | Pause a pipeline. | | `PUT` | `/pipelines/{name}/resume` | `streams:write` | Resume a pipeline. | | `PUT` | `/pipelines/{name}/restart` | `streams:write` | Restart a pipeline, optionally clearing its state. | | `GET` | `/pipelines/{name}/status` | `streams:read` | Status and recent errors. | | `GET` | `/pipelines/{name}/state` | `streams:read` | Cursor, head, lag and delivery backlog per chain. | | `GET` | `/pipelines/{name}/inspect` | `streams:read` | A live sample of the messages flowing through each node. | | `GET` | `/pipelines/{name}/logs` | `streams:read` | Read pipeline logs. | | `GET` | `/pipelines/{name}/logs/error-count` | `streams:read` | Count error logs in a time window. | | `GET` | `/secrets` | `streams:read` | List secret names and types. | | `POST` | `/secrets` | `streams:write` | Create or replace a secret by name. | | `DELETE` | `/secrets/{name}` | `streams:write` | Delete a secret. | | `GET` | `/dynamic-tables/{name}/values` | `streams:read` | List the values of a dynamic table. | | `POST` | `/dynamic-tables/{name}/values` | `streams:write` | Add values to a dynamic table. | | `DELETE` | `/dynamic-tables/{name}/values` | `streams:write` | Remove values from a dynamic table. | | `DELETE` | `/dynamic-tables/{name}` | `streams:write` | Remove every value of a dynamic table. | | `GET` | `/usage` | `usage:read` | Usage and estimated USD cost per day and pipeline, for up to 92 days. | | `GET` | `/pricing` | `none` | Price per active pipeline hour and message tiers. | Creating or updating a pipeline returns the pipeline with `result` (`created`, `updated` or `recreated`), `version`, `generation` and `revision`. Pause, resume and restart return their receipt. Creating a secret returns `201` with its name and type. Deleting a pipeline returns `200` with its final status; deleting a secret returns `204` with no body. ## Pagination - Lists return `items`, `next_cursor` and `has_more`. Pass `next_cursor` as `cursor` to read the next page, while `has_more` is `true`. - Pipelines: `limit` from 1 to 100 (default 50) and `cursor`. Results are sorted by name. `page_size` and `page_token` are aliases, and the response keeps `data` and `pagination` too. - Logs: `cursor`, as described in [Lifecycle and monitoring](/streams/monitoring#monitoring). - Dynamic table values: `cursor` and `limit`; `values` is the same list as `items`. - Secrets are returned in one list, sorted by name. ## Errors Errors return `{"error": {"code", "message", "errors", "warnings"}}`. `errors` and `warnings` are present for invalid definitions and list `{"field", "message"}` issues. ```json {"error":{"code":"not_found","message":"pipeline not found"}} ``` | Code | Status | When | | --- | --- | --- | | `invalid_request` | 400 | A parameter or field is not valid. | | `invalid_definition` | 400 | Create with a definition that is not valid; includes `errors` and `warnings`. | | `unauthorized` | 401 | Missing or unknown credentials. | | `forbidden` | 403 | The key lacks the permission, or Streams is not enabled for the account. | | `not_found` | 404 | The pipeline, secret or route does not exist. | | `table_in_use` | 409 | A running pipeline reads the dynamic table; delete it with `force=true`. | | `pipeline_limit` | 409 | Creating or resuming a pipeline would exceed the active pipelines of the account, or creating one would exceed its total pipelines. | | `preview_removed` | 410 | `POST /pipelines/preview`, which no longer exists. | | `invalid_state` | 409 | The action is not allowed in the current status, or the pipeline changed. | | `unsupported_media_type` | 415 | The request body is not JSON. | | `internal_error` | 500 | Unexpected server error. | | `source_unavailable` | 503 | The latest block could not be read because the chain RPC is unavailable; retry later. | # Billing and usage credit Streams bills two things: the time your pipelines are active and the messages they deliver. Both are paid from the usage credit of your account, in US dollars. ## What you pay for - **Active hours.** Every pipeline costs the same per active hour, whatever it reads or delivers, and the time is counted to the second, backfill included. Paused and completed pipelines cost nothing. - **Messages.** A message is one row delivered to a sink. A pipeline with two sinks counts every row twice, and a filter or SQL condition that drops rows lowers the count. Message tiers apply to the monthly total of the account, across all its pipelines, and reset at the start of each UTC month. There are no sizes to choose and no free messages: every message is paid from the credit, including the credit that comes with your plan. ## Current prices The current prices are on the [pricing page](https://routescan.io/pricing#streams) and in `GET /pricing`, which needs no API key. ## Usage and estimated cost The Usage tab of Streams in the console shows active hours, messages and estimated cost per day and pipeline. The same figures come from `rts streams usage` and `GET /usage`, for ranges of up to 92 days: ```bash rts streams usage --query 'from=2026-11-01&to=2026-11-30' ``` ```bash curl "https://api.console.routescan.io/v1/streams/usage?from=2026-11-01&to=2026-11-30" \ -H "apikey: YOUR_API_KEY" ``` - Amounts are estimates in USD with nine decimals. Recent activity can take about 5 minutes to appear, and today stays provisional until the day closes. - Each day uses the price in effect on that day. Deleted pipelines are listed and billed like the others. ## Usage credit The usage credit is a balance in US dollars, shared by every Routescan service billed by usage. Each UTC day of usage draws on the credit that expires first. | Credit | How you get it | Expiry | | --- | --- | --- | | Sign-up credit | Granted once to new accounts. | Shown in Billing in the console. | | Plan credit | Included with paid API plans, every month of the plan. | At the end of each plan month. | | Purchased credit | A top-up from the console or the CLI. | Never. | The credit amounts are on the [pricing page](https://routescan.io/pricing#streams) and in `GET /pricing`. Billing in the console shows the available credit, what the current plan month granted and used, each grant with what is left, and a daily cost chart by service. From the CLI: ```bash rts credits get rts credits history --service streams --query 'from=2026-11-01&to=2026-11-30&lines=true' ``` A day of usage can be corrected after it closes, when late data arrives: the history adds a correction entry instead of changing the past one. ## Top up Buy credit from **Top up** on the console home or on Billing, with any amount from $25 to $10,000, cents included. Payment goes through Stripe Checkout, and the credit is added when the payment completes. Purchased credit never expires and pays for every service. With the CLI, `rts credits topup` returns the Checkout URL; it does not open a browser. It needs the `billing:write` permission and an idempotency key of 16 to 128 characters, which you reuse when you retry: ```bash rts credits topup --amount 25 --idempotency-key topup-2026-11-account-1 --yes ``` # Limits and FAQ The limits that apply to every account, and short answers to the questions that come up most. ## Limits | What | Limit | | --- | --- | | Active pipelines (running, deploying or restarting) | 20 per account. Creating or resuming another one returns `409` `pipeline_limit` until one is paused or deleted. | | Pipelines in any status | 500 per account. Creating another one returns `409` `pipeline_limit` until one is deleted. | | Pipeline name | 1 to 50 lowercase letters, digits and hyphens. | | Dynamic table values per request | 10,000. | | Usage and credit history range | 92 days per request. | | Pipeline logs | 1,000 characters per line, 120 lines per minute, up to 10,000 lines and 7 days per pipeline. | ### Script transforms - 1 second per invocation, a 1 MiB stack and at least 32 MiB of heap per sandbox. - At most 64 MiB and 200,000 rows of output per block, and 2 MiB per row. - Console output is cut to 2,000 characters and 20 lines per evaluation. ## FAQ ### Can a pipeline start from a past block? A source starts from the latest block or from the earliest available data of its dataset; block numbers are not accepted in `start_at`. To export a bounded range, use a [job](/streams/pipelines#jobs) with a filter on the block number. ### Can a receiver get the same row twice? Yes. Delivery is at least once, so a retried batch can arrive again. Deduplicate on the primary key, such as `id`, or use `on_conflict` with the database sinks. ### What happens when my endpoint is down? Timeouts, network errors and responses `408`, `429` and `5xx` are retried, and the backlog shows in the pipeline state. Other errors stop the delivery and appear in the status and logs; fix the cause, then resume or restart the pipeline. ### Does a paused pipeline cost anything? No. Only active time and delivered messages are billed. A paused pipeline keeps its position and continues from there when you resume it. ### Is there a free tier? There are no free messages or hours, but new accounts start with a one-time sign-up credit and paid API plans include credit every month. See [Billing and usage credit](/streams/billing). ### Where do I see what I spent? In the console, the Usage tab of Streams for each pipeline and Billing for the credit and the daily cost; or with `rts streams usage` and `rts credits history`. ### Which chains and datasets will be added? The catalog grows over time. [Chains and datasets](/streams/datasets) and `rts streams chains` always show the current list. To ask for a chain, [contact us](https://routescan.io/contactus). MCP server: https://docs.routescan.io/mcp