Skip to content

Solana DEX Parser (Go)

Go Version License Tests

A Go library that turns Solana transactions into trades, liquidity events, meme-launchpad events and transfers.

Features

  • Trades with exact raw amounts, pools, fees from protocol events, bot attribution and relay tips
  • Jupiter v6 (including the *_v2 routes), Jupiter Z, DCA, Limit Order and VA
  • AMMs and prop AMMs: Raydium, Orca, Meteora, PumpSwap, HumidiFi, SolFi, GoonFi, BisonFi, TesseraV and more
  • Liquidity events for Raydium, Orca, Meteora and PumpSwap pools
  • Meme launchpads: Pump.fun, Raydium LaunchLab, Meteora DBC, Moonit, Heaven, Sugar, Boop.fun
  • Failed and version 1 transactions, address lookup tables with pluggable fetchers
  • ShredParser for pre-execution data (Jito ShredStream), converters for Yellowstone gRPC

The full protocol and bot tables are in the README.

Quick Install

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

Minimal Example

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

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

tx is a *adapter.SolanaTransaction: see Getting Started for how to fetch and decode one.

Documentation

License

MIT License, see LICENSE and NOTICE.

Acknowledgements

Ported from the TypeScript solana-dex-parser. The relay tip account list comes from sol-parser-sdk; its IDLs and those of solana-streamer and pump-public-docs served as references.