{"id":50495959,"url":"https://github.com/0xfnzero/sol-parser-sdk-golang","last_synced_at":"2026-06-02T07:02:48.842Z","repository":{"id":349401761,"uuid":"1202140832","full_name":"0xfnzero/sol-parser-sdk-golang","owner":"0xfnzero","description":"High-performance Go library for parsing Solana DEX events in real-time via Yellowstone gRPC","archived":false,"fork":false,"pushed_at":"2026-06-01T06:48:05.000Z","size":416,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T08:24:25.623Z","etag":null,"topics":["bonk","copy-trading-bot","fnzero","grpc","jito","letsbonk","pumpfun","pumpswap","raydium","raydium-launchlab","raydium-launchpad","shreds","shredstream","sniper","streaming","swqos","yellowstone","yellowstonegrpc","yellowstonegrpc-golang"],"latest_commit_sha":null,"homepage":"https://fnzero.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xfnzero.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-05T16:47:14.000Z","updated_at":"2026-06-01T06:48:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/0xfnzero/sol-parser-sdk-golang","commit_stats":null,"previous_names":["0xfnzero/sol-parser-sdk-golang"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/0xfnzero/sol-parser-sdk-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xfnzero","download_url":"https://codeload.github.com/0xfnzero/sol-parser-sdk-golang/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xfnzero%2Fsol-parser-sdk-golang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33810343,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bonk","copy-trading-bot","fnzero","grpc","jito","letsbonk","pumpfun","pumpswap","raydium","raydium-launchlab","raydium-launchpad","shreds","shredstream","sniper","streaming","swqos","yellowstone","yellowstonegrpc","yellowstonegrpc-golang"],"created_at":"2026-06-02T07:02:46.718Z","updated_at":"2026-06-02T07:02:48.830Z","avatar_url":"https://github.com/0xfnzero.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e⚡ Sol Parser SDK - Go\u003c/h1\u003e\n    \u003ch3\u003e\u003cem\u003eHigh-performance Solana DEX event parser for Go\u003c/em\u003e\u003c/h3\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/0xfnzero/sol-parser-sdk-golang\"\u003e\u003cimg src=\"https://img.shields.io/badge/go-sol--parser--sdk--golang-00ADD8.svg\" alt=\"Go\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"./README_CN.md\"\u003e中文\u003c/a\u003e |\n    \u003ca href=\"./README.md\"\u003eEnglish\u003c/a\u003e |\n    \u003ca href=\"https://fnzero.dev/\"\u003eWebsite\u003c/a\u003e |\n    \u003ca href=\"https://t.me/fnzero_group\"\u003eTelegram\u003c/a\u003e |\n    \u003ca href=\"https://discord.gg/vuazbGkqQE\"\u003eDiscord\u003c/a\u003e\n\u003c/p\u003e\n\n\u003e ☕ **Support This Project**\n\u003e\n\u003e This SDK is completely free and open source. However, maintaining and continuously updating it requires significant AI computing resources and token consumption. If this SDK helps with your development, consider making a monthly SOL donation — any amount is appreciated and helps keep this project alive!\n\u003e\n\u003e **Donation Wallet:** `6oW7AXz1yRb57pYSxysuXnMs2aR1ha5rzGzReZ1MjPV8`\n\n---\n\n## Other language SDKs\n\n| Language | Repository |\n|----------|------------|\n| Rust | [sol-parser-sdk](https://github.com/0xfnzero/sol-parser-sdk) |\n| Node.js | [sol-parser-sdk-nodejs](https://github.com/0xfnzero/sol-parser-sdk-nodejs) |\n| Python | [sol-parser-sdk-python](https://github.com/0xfnzero/sol-parser-sdk-python) |\n| Go | [github.com/0xfnzero/sol-parser-sdk-golang](https://github.com/0xfnzero/sol-parser-sdk-golang) |\n\n## Release notes\n\n### v0.5.6\n\n- Adds Meteora DBC log parsing with program-context routing and filter parity.\n- Adds Raydium CLMM/CPMM and Orca account parsers.\n- Preserves block transaction indexes in RPC and Geyser-to-RPC conversion.\n- Skips ShredStream instruction parsing early for account-only or empty include-only filters.\n- Tightens RPC log active-program tracking for low-latency parser correctness.\n\n### v0.5.5\n\n- Aligns ShredStream wire-transaction parsing with Rust/Node.js/Python.\n- Uses default pubkey placeholders for V0 ALT-loaded instruction accounts instead of dropping the instruction.\n- Adds discriminator fallback when the ShredStream outer program id is ALT-loaded.\n- Improves Pump.fun v2 short-account parsing, same-transaction post-merge enrichment, and multi-protocol routing parity.\n- Adds regression coverage for ShredStream ALT account and ALT program-id fallback.\n\n---\n\n## How to use\n\n### 1. Install\n\nThis repo’s `go.mod` module path is **`github.com/0xfnzero/sol-parser-sdk-golang`** (see [`go.mod`](go.mod)). Examples import `github.com/0xfnzero/sol-parser-sdk-golang/solparser`.\n\n**From source** (recommended)\n\n```bash\ngit clone https://github.com/0xfnzero/sol-parser-sdk-golang\ncd sol-parser-sdk-golang\ngo mod tidy\n```\n\n**Use in another module**\n\n```bash\ngo get github.com/0xfnzero/sol-parser-sdk-golang@v0.5.6\n```\n\n(Or use `replace github.com/0xfnzero/sol-parser-sdk-golang =\u003e ../sol-parser-sdk-golang` for local development.)\n\n### 2. Environment (examples)\n\n**Yellowstone / Geyser gRPC** (all examples that subscribe over gRPC use the same two names):\n\n| Variable | Meaning |\n|----------|---------|\n| **`GRPC_URL`** | Endpoint host or full URL (e.g. `https://solana-yellowstone-grpc.publicnode.com:443` or `host:443`). Parsed to `host:port` where needed. |\n| **`GRPC_TOKEN`** | `x-token` (or empty if the node allows unauthenticated access). |\n\n**ShredStream** (separate binary / HTTP-style endpoint — **not** the same as `GRPC_URL`):\n\n| Variable | Meaning |\n|----------|---------|\n| **`SHRED_URL`** | e.g. `http://127.0.0.1:10800` (plain-text gRPC to ShredStream proxy). |\n\nOptional ShredStream tuning: `SHRED_PARSE_DEX`, `SHRED_MAX_JSON_PER_ENTRY`, `SHRED_JSON_COMPACT`, `SHREDSTREAM_QUIET`, `SHRED_MAX_MSG` — see [examples/shredstream_entries.go](examples/shredstream_entries.go).\n\n**RPC utility** [parse_tx_by_signature.go](examples/parse_tx_by_signature.go): `TX_SIGNATURE`, `RPC_URL`.\n\n### 3. Smoke test\n\n```bash\ngo test ./...\n```\n\n### 4. Full gRPC transaction parse (recommended)\n\nUse **`ParseSubscribeTransaction`** (Geyser `SubscribeUpdateTransactionInfo` → RPC-shaped tx + meta) for **instruction accounts + Program data logs + merge + Pump fills**, aligned with Rust `parse_rpc_transaction` behavior.\n\n```go\nimport \"github.com/0xfnzero/sol-parser-sdk-golang/solparser\" // module path: see go.mod\n\nevents, err := solparser.ParseSubscribeTransaction(slot, txInfo, nil, grpcRecvUs)\nif err != nil {\n    // handle\n}\nfor _, ev := range events {\n    // ev.Type, ev.Data — JSON via json.Marshal(ev)\n}\n```\n\n**Lighter path:** `ParseLogOptimized` / logs-only helpers when you do not have full transaction + meta.\n\n### 5. ShredStream (HTTP endpoint — not Yellowstone gRPC)\n\nUses **`SHRED_URL`** only (e.g. `http://127.0.0.1:10800`). This is **not** `GRPC_URL` (different service).\n\n```bash\nexport SHRED_URL=\"http://127.0.0.1:10800\"\ngo run examples/shredstream_entries.go\n```\n\nThe example decodes `Entry.entries`, optionally parses outer instructions to **`DexEvent` JSON** via **`DexEventsFromShredTransactionWire`**. This hot path uses static account keys only; V0 ALT-loaded instruction accounts are represented with default pubkey placeholders, and ALT-loaded outer program ids are parsed best-effort by discriminator. Inner CPI/log-only events still require Yellowstone/RPC paths.\n\n---\n\n## Examples\n\nRun from the **repository root** after `go mod tidy`. One row per source file (links point to GitHub `main`).\n\n| Description | Run command | Source |\n|-------------|-------------|--------|\n| **PumpFun** | | |\n| PumpFun `DexEvent` + metrics | `GRPC_URL=… GRPC_TOKEN=… go run examples/pumpfun_with_metrics.go` | [pumpfun_with_metrics.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/pumpfun_with_metrics.go) |\n| PumpFun trade filter | `GRPC_URL=… GRPC_TOKEN=… go run examples/pumpfun_trade_filter.go` | [pumpfun_trade_filter.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/pumpfun_trade_filter.go) |\n| Quick connection test | `GRPC_URL=… GRPC_TOKEN=… go run examples/pumpfun_quick_test.go` | [pumpfun_quick_test.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/pumpfun_quick_test.go) |\n| **PumpSwap** | | |\n| PumpSwap + metrics | `GRPC_URL=… GRPC_TOKEN=… go run examples/pumpswap_with_metrics.go` | [pumpswap_with_metrics.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/pumpswap_with_metrics.go) |\n| Ultra-low latency | `GRPC_URL=… GRPC_TOKEN=… go run examples/pumpswap_low_latency.go` | [pumpswap_low_latency.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/pumpswap_low_latency.go) |\n| **Meteora DAMM** | | |\n| Meteora DAMM V2 | `GRPC_URL=… GRPC_TOKEN=… go run examples/meteora_damm_grpc.go` | [meteora_damm_grpc.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/meteora_damm_grpc.go) |\n| **ShredStream** (see **step 5** above) | | |\n| SubscribeEntries + decode + optional `DexEvent` JSON | `SHRED_URL=http://host:port go run examples/shredstream_entries.go` | [shredstream_entries.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/shredstream_entries.go) |\n| **Yellowstone** | | |\n| Geyser subscribe + `ParseSubscribeTransaction` | `GRPC_URL=… GRPC_TOKEN=… go run examples/yellowstone_grpc_parse.go` | [yellowstone_grpc_parse.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/yellowstone_grpc_parse.go) |\n| **Multi-protocol** | | |\n| All supported DEX programs | `GRPC_URL=… GRPC_TOKEN=… go run examples/multi_protocol_grpc.go` | [multi_protocol_grpc.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/multi_protocol_grpc.go) |\n| **Utility** | | |\n| Parse tx by signature (RPC, not gRPC stream) | `TX_SIGNATURE=… RPC_URL=… go run examples/parse_tx_by_signature.go` | [parse_tx_by_signature.go](https://github.com/0xfnzero/sol-parser-sdk-golang/blob/main/examples/parse_tx_by_signature.go) |\n\n---\n\n## Protocols\n\nPumpFun, PumpSwap, Raydium AMM V4 / CLMM / CPMM, Orca Whirlpool, Meteora DAMM V2 / DLMM, Raydium LaunchLab (see `solparser/`).\n\n---\n\n## Useful exports\n\n- **`ParseSubscribeTransaction`** — Geyser single-tx → `[]DexEvent` (instructions + logs + merge + Pump account fill).\n- **`ParseRpcTransaction`** / **`ParseTransactionFromRpc`** — HTTP RPC JSON → events.\n- **`ParseInstructionUnified`** / **`ParseInnerInstructionUnified`** — outer 8-byte / inner 16-byte discriminators.\n- **`DexEventsFromShredTransactionWire`** — wire tx bytes → outer `ParseInstructionUnified` (Shred static keys + ALT best-effort fallback).\n- **`DecodeGRPCEntry`** / **`DecodeEntriesBincode`** — ShredStream `Entry.entries` bytes → `DecodedTransaction` slices.\n- **`DexEvent`** — `json.Marshal` for `{ \"PumpSwapBuy\": { … } }` style output.\n\n---\n\n## Development\n\n```bash\ngo test ./...\ngo build ./...\ngo vet ./...\n```\n\n---\n\n## License\n\nMIT — https://github.com/0xfnzero/sol-parser-sdk-golang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfnzero%2Fsol-parser-sdk-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xfnzero%2Fsol-parser-sdk-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xfnzero%2Fsol-parser-sdk-golang/lists"}