# GraphOps Substreams

Source: https://docs.graphops.xyz/substreams

Feed blockchain data into your own database, analytics pipeline, or event processor. GraphOps
Substreams runs standard Substreams packages and delivers their output over gRPC, so you can
backfill historical blocks and continue with a live stream.

## Substreams at a glance

_GraphOps runs your package over each block and streams module output to your app, which saves a cursor to resume from._

- Your app: Cursor
- Substreams: Modules
- Chain: New blocks
- [Run the Substreams quickstart](/substreams/getting-started)
- [Open the Substreams reference](/substreams/api)

## Where to start

- [Stream USDC Transfer events](/substreams/getting-started): Create an API key and stream USDC Transfer events from a standard package.

- [Backfill a bounded range](/substreams/guides/backfill-a-range): Replay deterministic package output and commit it to your own system.

- [Recover without losing work](/substreams/concepts/cursors-and-reorgs): Persist committed cursors and process undo signals after reversible blocks.

## How a Substreams pipeline is split

_GraphOps runs your pinned package and streams its output from historical blocks through to the chain head. Everything after the stream runs in your infrastructure._

- Package: `name@version`, output module
- GraphOps runs: endpoint (one per network), history (parallel execution), live (new blocks as they arrive)
- You run: consumer (your client or a standard sink), commit (output and cursor together), undo (revert after a reorg), and your database

GraphOps runs the package and delivers its output. Everything after the stream belongs to your
consumer: decoding the output type, writing it to storage, saving cursors, and reverting writes
after a reorg.

## What you can build

* **Historical backfills that continue live.** Start at the block your history needs and leave the
stop block open to keep following the chain. See [Backfill a range](/substreams/guides/backfill-a-range).
* **Consumers that preserve matching output.** Commit each received output with its cursor and resume
from that cursor after a restart. See [Resume with cursors](/substreams/guides/resume-with-cursors).
* **State that stays correct through reorgs.** Revert writes after the last valid block when an
undo signal arrives. See [Cursors and reorgs](/substreams/concepts/cursors-and-reorgs).
* **Package output in tables you own.** Run a standard sink that writes to Postgres, ClickHouse,
files, or Pub/Sub. See [Run a sink](/substreams/guides/run-a-sink).

## Choose Substreams when

Use Substreams when you need to process blocks in order, replay a range, or build a data model in
your own storage. You choose the package and output module; your consumer commits the data and
saves its progress.

Use another GraphOps service when your job is different:

| Need                                                                 | Use                     |
| -------------------------------------------------------------------- | ----------------------- |
| Direct node calls, transactions, or contract state reads             | [RPC](/rpc)             |
| Query indexed GraphQL entities without running your own materializer | [Subgraphs](/subgraphs) |

## Choose a package and destination

Find reusable packages on [substreams.dev](https://substreams.dev/packages) or in
[Discover Substreams](/substreams/guides/discover-packages), or use
your own `.spkg` file. Pin the package version, choose an output module that produces the data your
application needs, and connect it to a [supported network](/substreams/networks).

Your consumer can write to SQL, files, queues, or a custom store. If you want GraphOps to host the
sink, contact support about enterprise options.

## Plan for production

Backfills and live streaming use the same stream protocol. Before you rely on stored data:

* Save each cursor in the same transaction as the output it follows.
* Handle undo signals, or stream final blocks only if you cannot revert writes.
* Size backfills and reconnect loops to your organization's limits.

Usage follows the billable components and rates on [Usage and limits](/substreams/usage-and-limits).

## Next steps

* [Stream your first events](/substreams/getting-started): Stream USDC Transfer events with the Substreams CLI.
* [Discover Substreams packages](/substreams/guides/discover-packages): Find a package and pin the release you will run.
* [Supported networks](/substreams/networks): Copy the endpoint for the chain your package reads.