Skip to content

TopTrenDev/solana-dex-data-indexer-substream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Solana Substreams

โšก Solana DEX Data Indexer (Substream)

High-performance Solana DEX transaction indexer built with Substreams. Stream and parse swap transactions across multiple DEX protocols in real timeโ€”for analytics, MEV research, trading bots, and on-chain data pipelines.


๐Ÿ“‘ Table of Contents


โœจ Features

Real-time Stream Solana DEX swaps as they land on-chain
Substreams Built on StreamingFast Substreams for scalable, deterministic indexing
Program filtering Only processes transactions that touch supported DEX Program IDs
Multi-protocol Single pipeline for multiple DEX protocols
Use-case ready Analytics, MEV, trading signals, and data pipelines

๐Ÿฆ Supported DEX Protocols

Protocol Status
Raydium โœ…
Orca โœ…
Meteora โœ…
Pump.fun โœ…
PumpSwap โœ…
Bonk.fun โœ…

๐Ÿ— Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Solana Blocks  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Substreams Engine      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  map_filtered_transactions      โ”‚  โ† Filter by Program IDs, exclude voting
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  DEX Swap Parser                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Structured Trade Events         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  JSON / Your Data Pipeline      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Module: map_filtered_transactions

  • Input: Solana blocks from the Substreams engine
  • Logic: Keeps only transactions that interact with supported DEX Program IDs; voting transactions are excluded.
  • Output: Filtered transactions ready for the DEX swap parser.

๐Ÿš€ Quick Start

  1. Install the Substreams CLI

    Download & install โ†’

  2. Build the project

    substreams build
  3. Authenticate (see Authentication)

  4. Run (see Running the Indexer)


๐Ÿ” Authentication

Log in to the StreamingFast endpoint before running the indexer:

substreams auth

โ–ถ Running the Indexer

Stream filtered DEX transactions and write them to a file:

substreams run \
  -e mainnet.sol.streamingfast.io:443 \
  substreams.yaml \
  map_filtered_transactions \
  -s 355325435 \
  -t +1 \
  > trades.jsonl
  • -s โ€” start slot
  • -t +1 โ€” stream one block (adjust for continuous streaming)

๐Ÿ“ค Example Output

Each emitted event is a structured trade record (e.g. one line per trade in trades.jsonl):

{
  "dex": "Raydium",
  "token_in": "SOL",
  "token_out": "USDC",
  "amount_in": 1.5,
  "amount_out": 150.2,
  "wallet": "abc123",
  "slot": 355325435
}

Use this stream for dashboards, research, or downstream pipelines.


๐ŸŽฏ Use Cases

  • DEX analytics dashboards โ€” volume, pairs, and flow in real time
  • MEV research โ€” detect and analyze sandwich and arbitrage patterns
  • Trading bots โ€” use on-chain swap flow as signals
  • On-chain data pipelines โ€” feed data warehouses or ML models
  • Market monitoring โ€” track liquidity and large trades across DEXes

๐Ÿ“ฆ Publishing

Publish this Substream to the Substreams registry:

substreams registry login
substreams registry publish

๐Ÿ”— Connect

Twitter Telegram


Built with Substreams for the Solana ecosystem.

About

๐Ÿง  Solana DEX Swap Data Indexer Substream-powered swap indexer for Solana โ€” supports Pump.fun, PumpSwap, BonkFun, Meteora, Raydium, Orca & more. โšก๐Ÿ“Š๐Ÿ”ฅ Designed for real-time trade analytics, MEV research, and on-chain data pipelines. ๐Ÿ“ก

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

โšก