Pinax
    Streaming-first blockchain indexing
    Resources & endpoints

    Quickstart

    Substreams is a streaming-first blockchain indexing engine. Pick a network, plug your PINAX_KEY into the CLI or graph-node TOML provider, and stream transformed blocks as the chain produces them, or backfill history in parallel.

    request.sh
    1# Set your API Key
    2export SUBSTREAMS_API_KEY=YOUR_API_KEY
    3
    4# Run Substreams
    5substreams run -e eth.substreams.pinax.network:443 blocks@v1.0.0 map_blocks -s -10
    Supported networks (42)
    EthereumEthereumSolanaSolanaBNBBNBBaseBasePolygonPolygonOptimismOptimismArbitrum OneArbitrum OneAvalancheAvalancheC-ChainUnichainUnichainArcArcBitcoinBitcoinCeloCeloVaultaVaultaEthereum BeaconEthereum BeaconGnosis BeaconGnosis BeaconHoodi BeaconHoodi BeaconHyperEVMHyperEVMInkInkLineaLineaLitecoinLitecoinMegaETHMegaETHRobinhood ChainRobinhood ChainSepolia BeaconSepolia BeaconSolanaSolanaDevnetSoneiumSoneiumTempoTempoWAXWAXX LayerX LayerzkSynczkSyncEraZoraZoraPolygonPolygonAmoyArbitrumArbitrumSepoliaBaseBaseSepoliaBNBBNBChapelEthereumEthereumHoodiVaultaVaultaJungle4LineaLineaSepoliaSoneiumSoneiumMinatoOptimismOptimismSepoliaEthereumEthereumSepoliaUnichainUnichainSepoliaWAXWAXTestnet

    Parallel workers

    In production mode, Substreams splits a historical block range across parallel workers. The number of workers a stream gets depends on your plan:

    • Free: 5 workers per stream, fixed (the header below is ignored), and at most 10 across all of your team's concurrent streams.
    • Pro: 15 workers per stream by default, up to 50 per stream when you ask for more with the header below. The 50 is a pool shared by all of your team's concurrent streams, not 50 per stream.
    • Enterprise: set per contract.

    To request more workers, send the X-Substreams-Parallel-Workers header. A value above your plan's maximum is lowered to the maximum.

    1substreams run -e <network>.substreams.pinax.network:443 ... \
    2 --production-mode \
    3 -H "X-Substreams-Parallel-Workers: 50"

    To check what you got, read max_parallel_workers in the session's SessionInit message; the CLI logs it when run with DLOG=info.

    More workers do not speed up every module equally. A simple map module processed about 9× as many blocks in the same time with 50 workers as with 5; modules with stores gain less.

    Reliability and reorgs

    Every BlockScopedData message carries a cursor and a final_block_height. Save the cursor in the same transaction as the data you wrote for that block, and pass it back as start_cursor (CLI: --cursor) to resume exactly after it, with nothing skipped or repeated.

    final_blocks_only: false (default)
    Blocks arrive as soon as they are produced. On a reorganization you receive a BlockUndoSignal: delete everything above last_valid_block and save last_valid_cursor, again in one transaction.
    final_blocks_only: true
    Only final blocks are sent and no undo signal ever arrives, at the cost of waiting for the chain's finality (see Per-chain notes).
    1# Resume from the cursor saved with the last block you processed
    2substreams run -e <network>.substreams.pinax.network:443 <package> <module> \
    3 --production-mode \
    4 --cursor "$(cat cursor.txt)"

    Data at or below final_block_height will never be undone. The official sinks (SQL, files, webhooks and others) store the cursor and handle undo signals for you, so most pipelines do not implement this by hand.

    Per-chain notes

    Every endpoint serves the chain from the earliest block below to the head. EVM data is either extended (from an instrumented node: call traces, balance and storage changes) or base (rebuilt from JSON-RPC: transactions, receipts and logs only); see Base vs Extended blocks. “Final when” says when a new block near the head becomes final and can no longer be undone. Older history is already final, including the base-tier history of chains that later moved to extended blocks.

    NetworkDataEarliest blockFinal whenBlock schema
    EthereumEthereumethExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    SolanaSolanasolanaNative block0Sent at confirmed, final at finalizedfirehose-solana
    BNBBNBbscExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    BaseBasebaseExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    PolygonPolygonpolygonExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    OptimismOptimismoptimismExtended from 105,235,064 (base before)0Node's finalized block (≤ 200 behind head)firehose-ethereum
    Arbitrum OneArbitrum OnearboneExtended from 22,207,818 (base before)0Node's finalized block (≤ 200 behind head)firehose-ethereum
    AvalancheAvalancheC-ChainavalancheBase0200 blocks behind headfirehose-ethereum
    UnichainUnichainunichainExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    ArcArcarcExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    BitcoinBitcoinbitcoinNative block06 blocks behind headfirehose-bitcoin
    CeloCeloceloBase0200 blocks behind headfirehose-ethereum
    VaultaVaultaeosNative block2Chain's last irreversible blockfirehose-antelope
    HyperEVMHyperEVMhyperevmExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    InkInkinkExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    LineaLinealineaExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    LitecoinLitecoinlitecoinNative block06 blocks behind headfirehose-bitcoin
    MegaETHMegaETHmegaethBase0200 blocks behind headfirehose-ethereum
    Robinhood ChainRobinhood ChainrobinhoodExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    SoneiumSoneiumsoneiumExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    TempoTempotempoBase0200 blocks behind headfirehose-ethereum
    WAXWAXwaxNative block2Chain's last irreversible blockfirehose-antelope
    X LayerX LayerxlayerBase0200 blocks behind headfirehose-ethereum
    zkSynczkSyncErazksynceraBase0200 blocks behind headfirehose-ethereum
    ZoraZorazoraExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    PolygonPolygonAmoyamoyExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    ArbitrumArbitrumSepoliaarbsepoliaExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    BaseBaseSepoliabasesepoliaExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    BNBBNBChapelchapelExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    Ethereum BeaconEthereum Beaconeth-clNative block0Finalized checkpointfirehose-beacon
    Gnosis BeaconGnosis Beacongnosis-clNative block0Finalized checkpointfirehose-beacon
    EthereumEthereumHoodihoodiExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    Hoodi BeaconHoodi Beaconhoodi-clNative block0Finalized checkpointfirehose-beacon
    VaultaVaultaJungle4jungle4Native block2Chain's last irreversible blockfirehose-antelope
    LineaLineaSepolialineasepoliaExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    SoneiumSoneiumMinatominatoExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    OptimismOptimismSepoliaopsepoliaExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    EthereumEthereumSepoliasepoliaExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    Sepolia BeaconSepolia Beaconsepolia-clNative block0Finalized checkpointfirehose-beacon
    SolanaSolanaDevnetsoldevNative block391,843,999Sent at confirmed, final at finalizedfirehose-solana
    UnichainUnichainSepoliaunisepoliaExtended0Node's finalized block (≤ 200 behind head)firehose-ethereum
    WAXWAXwaxtestNative block2Chain's last irreversible blockfirehose-antelope

    Use the finality the stream sends with each block (Firehose metadata.lib_num, Substreams final_block_height) rather than hard-coding a depth: it is the stream's own statement of finality and follows the rules above. Solana slot numbers skip slots that produced no block, so gaps in slot numbers are normal there.

    Gaps and integrity

    Blocks are delivered in order, and blocks are hash-linked to their parents. To check continuity, compare each new block's parent hash with the hash of the block before it; they match unless an undo arrived in between. A mismatch means the client missed a message, not that the chain skipped one; reconnect from the last cursor you saved.

    A Substreams response does not carry the parent hash: clock gives only the block's own number, hash and timestamp. To check continuity, include the parent hash in your module's output. final_block_height is the last irreversible block when the response was sent.

    Firehose protocol: forks, cursors and LIB

    Latency

    With final_blocks_only: false, live blocks are pushed as soon as the chain produces them; there is no polling interval on your side. With final_blocks_only: true, each block arrives only once it is final, so add the chain's finality delay (see Per-chain notes). End-to-end delay (chain tip to your client) also depends on the chain's block time, your network path and, for Substreams, your modules. Measure it from each block's timestamp in your own deployment. There is no latency SLA: the Free plan is best effort, and service levels for Enterprise are set in the contract.

    Billing

    • Processed blocks: each block your modules actually execute, including parallel back-processing of history. Blocks whose module outputs are served from cache are not counted.
    • Egress: the size of the messages sent to your client, measured as uncompressed protobuf before gRPC compression.
    • Free: when the included usage for the calendar month is used up, new requests are rejected and open streams are closed (checked about once a minute) until the next month starts, or until you upgrade.
    • Pro: usage beyond the included amount is added to your next invoice. Team owners can set a spending cap under Team settings → Usage limits; once it is reached, requests are rejected the same way.

    The usage page shows a warning once you pass half of your limit. Usage totals can lag by a few minutes. Rates and included usage per plan are on the pricing page.

    Errors and limits

    gRPC statusMessageMeaning and fix
    UNAUTHENTICATEDinvalid api keyThe key is mistyped or deleted. Check it on the API keys page. Do not retry.
    UNAUTHENTICATEDno authorization token foundNo key was sent. Firehose reads it from the X-Api-Key metadata; Substreams from SUBSTREAMS_API_KEY or X-Api-Key. Do not retry.
    PERMISSION_DENIEDapi key not foundThe key was deleted while the stream was open, so the stream was closed. Reconnect with a current key from your last cursor.
    PERMISSION_DENIED(varies)The key is valid but not allowed to use this stream. Check which project and plan the key belongs to; retrying with the same key will not help.
    RESOURCE_EXHAUSTEDyou have reached the limit of N credits as part of your "<plan>" subscription plan…Usage for the month reached the Free allowance or your team's spending cap (ErrorInfo reason CUSTOMER_CREDIT_EXHAUSTED). Upgrade or raise the cap; do not retry until then.
    RESOURCE_EXHAUSTEDConcurrent stream limit exceeded (active sessions: N/N)Your team has too many streams open (Free: 10). Close one, then retry.
    UNAVAILABLEservice under heavy load, please try connecting againTemporary. Reconnect with backoff from your last cursor.
    UNAVAILABLE · INTERNAL · connection reset(varies)Network or server interruption. Reconnect with backoff from your last cursor.

    Retry pattern: retry only interruptions (UNAVAILABLE, INTERNAL, dropped connections), with exponential backoff, for example from 1 second doubling to a 30-second cap. Always reconnect with the last cursor you saved, so no block is skipped or processed twice. Authentication and credit errors do not clear on retry.

    Limits: there is no request-rate limit on Substreams streams; usage is bounded by your plan's credits, by concurrent streams per team and by parallel workers (above).