Skip to content

DefaultPerson/solana-dex-parser-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Solana DEX Parser (Go)

Go Version License Docs

A high-performance Go library for parsing Solana DEX transactions.

Supports 23 full parsers + 55 routing detection (program IDs), including Jupiter, Raydium, Orca, Meteora, Pumpfun, Pumpswap, and 14 trading bots with fee detection + 6 bot programs.

Installation

go get github.com/DefaultPerson/solana-dex-parser-go

Quick Start

package main

import (
    "encoding/json"
    "fmt"

    dexparser "github.com/DefaultPerson/solana-dex-parser-go"
)

func main() {
    var tx dexparser.SolanaTransaction
    json.Unmarshal([]byte(txJSON), &tx)

    parser := dexparser.NewDexParser()
    result := parser.ParseAll(&tx, nil)

    fmt.Printf("Trades: %d\n", len(result.Trades))
    fmt.Printf("Liquidities: %d\n", len(result.Liquidities))
    fmt.Printf("MemeEvents: %d\n", len(result.MemeEvents))
}

Features

  • Multi-Protocol - Jupiter, Raydium, Orca, Meteora, Pumpfun, Moonit, etc.
  • Rich Data - Trades, liquidity events, transfers, meme events
  • High Performance - Optimized JSON parsing, memory pooling
  • gRPC Support - ShredParser for Helius/Triton streams

Documentation

Supported Protocols

Status Legend:

  • βœ… Parser β€” Full trade/liquidity parsing with instruction decoding
  • πŸ”— Constants β€” Program ID defined for routing detection only

DEX Aggregators & Routers

Protocol Trades Liquidity Transfers Status
Jupiter (V6, DCA, Limit, VA) βœ… ❌ βœ… βœ… Parser
OKX DEX βœ… ❌ βœ… πŸ”— Constants
DFlow βœ… ❌ βœ… βœ… Parser
Sanctum βœ… ❌ βœ… πŸ”— Constants
Photon βœ… ❌ βœ… βœ… Parser
Raydium Route βœ… ❌ βœ… βœ… Parser

Major AMMs

Protocol Trades Liquidity Transfers Status
Raydium V4 βœ… βœ… βœ… βœ… Parser
Raydium CPMM βœ… βœ… βœ… βœ… Parser
Raydium CL βœ… βœ… βœ… βœ… Parser
Orca Whirlpool βœ… βœ… βœ… βœ… Parser
Meteora DLMM βœ… βœ… βœ… βœ… Parser
Meteora Pools βœ… βœ… βœ… βœ… Parser
Meteora DAMM βœ… βœ… βœ… βœ… Parser
PumpSwap βœ… βœ… βœ… βœ… Parser
Phoenix βœ… ❌ βœ… πŸ”— Constants
Lifinity βœ… ❌ βœ… πŸ”— Constants
Lifinity V2 βœ… ❌ βœ… πŸ”— Constants
OpenBook βœ… ❌ βœ… πŸ”— Constants

Prop AMM / Dark Pools

Protocol Trades Liquidity Transfers Status
SolFi βœ… ❌ βœ… βœ… Parser
GoonFi βœ… ❌ βœ… βœ… Parser
Obric V2 βœ… ❌ βœ… βœ… Parser
HumidiFi βœ… ❌ βœ… βœ… Parser

Meme & Launch Platforms

Protocol Trades Create Migrate Status
Pumpfun βœ… βœ… βœ… βœ… Parser
Raydium Launchpad βœ… βœ… βœ… βœ… Parser
Meteora DBC βœ… βœ… βœ… βœ… Parser
Moonit βœ… βœ… βœ… βœ… Parser
Heaven.xyz βœ… βœ… βœ… βœ… Parser
Sugar.money βœ… βœ… βœ… βœ… Parser
Bonk βœ… βœ… βœ… πŸ”— Constants
BoopFun βœ… βœ… βœ… βœ… Parser

Trading Bots (Fee Account Detection)

Bot Detection Status
Trojan βœ… βœ… Parser
BONKbot βœ… βœ… Parser
Axiom βœ… βœ… Parser
GMGN βœ… βœ… Parser
BullX βœ… βœ… Parser
Maestro βœ… βœ… Parser
Bloom βœ… βœ… Parser
BananaGun βœ… βœ… Parser
Raybot βœ… βœ… Parser
Photon βœ… βœ… Parser
Padre βœ… βœ… Parser
PepeBoost βœ… βœ… Parser
STBot βœ… βœ… Parser
MevX βœ… βœ… Parser

Trading Bots (Program Detection)

Bot Detection Status
Mintech βœ… πŸ”— Constants
Nova βœ… πŸ”— Constants
Apepro βœ… πŸ”— Constants
BananaGun βœ… πŸ”— Constants
Bloom βœ… πŸ”— Constants
Maestro βœ… πŸ”— Constants

Additional AMMs

Protocol Trades Liquidity Transfers Status
GooseFX βœ… ❌ βœ… πŸ”— Constants
Mercurial βœ… ❌ βœ… πŸ”— Constants
Stabble βœ… ❌ βœ… πŸ”— Constants
1Dex βœ… ❌ βœ… πŸ”— Constants
ZeroFi βœ… ❌ βœ… πŸ”— Constants

Legacy Protocols

Protocol Trades Liquidity Status
Serum V3 βœ… ❌ πŸ”— Constants
Aldrin βœ… ❌ πŸ”— Constants
Aldrin V2 βœ… ❌ πŸ”— Constants
Crema βœ… ❌ πŸ”— Constants
Saber βœ… ❌ πŸ”— Constants
Saros βœ… ❌ πŸ”— Constants

Total: 23 full parsers + 55 routing detection (program IDs)

Shred Parser Support

Real-time shred-stream processing for live blockchain data analysis via gRPC streams (Helius, Triton, etc.):

parser := dexparser.NewShredParser()
result := parser.ParseAll(&tx, nil)

// Access parsed instructions by program
for program, instructions := range result.Instructions {
    fmt.Printf("%s: %d instructions\n", program, len(instructions))
}

Key Differences: ShredParser vs DexParser

Feature DexParser ShredParser
Input Data Complete transaction Raw message only
Execution State Post-execution Pre-execution
Transfer Data βœ… Actual results ❌ No execution
Use Case Historical analysis Real-time monitoring

Shred Parser Protocol Support

Protocol Status Notes
Pumpfun βœ… Buy, Sell, Create, Migrate
PumpSwap βœ… Buy, Sell, Add/Remove Liquidity
Jupiter V6 βœ… Route, SharedAccountsRoute
Raydium V4 βœ… Swap instructions
Raydium Launchpad βœ… Buy, Sell, Create
Meteora DBC βœ… Dynamic bonding curve
DFlow βœ… Swap routing
Photon βœ… Multi-hop aggregation
System Program βœ… SOL transfers
Token Program βœ… SPL transfers
Token 2022 βœ… Token extensions

License

MIT License - see LICENSE

Acknowledgments

About

Solana Dex Transaction Parser. A Golang library for parsing Solana DEX swap transactions. Supports multiple DEX protocols including Jupiter, Raydium, Meteora, PumpFun, and Moonshot.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages