| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
High-performance WebSocket server for streaming Solana DEX events with microsecond-level latency
中文 | English | Website | Telegram | Discord
A WebSocket proxy server for Solana DEX events based on sol-parser-sdk. Real-time monitoring of DEX trading events from PumpFun, Raydium, Orca, and more, streamed to clients via WebSocket.
Parser Proxy WebSocket bridges Yellowstone gRPC DEX event parsing to browser, TypeScript, Python, and backend WebSocket clients. It is designed for dashboards, trading bots, copy-trading systems, stream processors, and parser pipelines that need filtered real-time Solana DEX events.
| Area | Coverage |
|---|---|
| Input | Yellowstone gRPC transaction stream parsed through sol-parser-sdk |
| Output | WebSocket broadcast server with HTML, TypeScript, and Python client examples |
| Protocols | PumpFun, PumpSwap, Bonk, Raydium AMM V4/CLMM/CPMM, Orca Whirlpool, Meteora AMM/DAMM/DLMM |
| Use cases | Real-time DEX dashboards, low-latency trading bots, copy-trading clients, parser proxy services |
┌─────────────────┐
│ Yellowstone gRPC│
│ (Solana RPC) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ sol-parser-sdk │
│ (10-20μs parse)│
└────────┬────────┘
│
▼
┌─────────────────┐
│ WebSocket Server│
│ (Broadcast) │
└────────┬────────┘
│
▼
┌─────────────────────────────────────┐
│ Clients (HTML/TS/Python/...) │
│ (Real-time DEX Events) │
└─────────────────────────────────────┘
git clone https://github.com/0xfnzero/parser-proxy-ws.git
cd parser-proxy-wscargo build --releaseEdit config.toml:
[server]
host = "127.0.0.1"
port = 9001
[grpc]
endpoint = "https://solana-yellowstone-grpc.publicnode.com:443"
token = "" # Optional: your gRPC token
enable_metrics = true
enable_tls = true
connection_timeout_ms = 10000
request_timeout_ms = 30000
[protocols]
pumpfun = true
raydium_amm_v4 = true
raydium_clmm = true
orca_whirlpool = true
# ... more protocols
[events]
pumpfun_trade = true
pumpfun_create = true
raydium_amm_v4_swap = true
# ... more event typesMethod 1: Using Script (Recommended)
./start-server.shMethod 2: Direct Run
cargo run --releaseServer will start based on config file (default ws://127.0.0.1:9001)
Method 1: Using Script (Recommended)
./start-client.shThe script will prompt you to choose client type:
Method 2: Manual Start
open examples/client.html✨ Features:
cd examples
npm install
npm start✨ Features:
pip3 install websockets base58
python3 examples/client.py✨ Features:
| Protocol | Config Field | Description |
|---|---|---|
| PumpFun | protocols.pumpfun | PumpFun Meme token trading |
| PumpSwap | protocols.pumpswap | PumpSwap exchange protocol |
| Bonk | protocols.bonk | Bonk launch platform |
| Raydium AMM V4 | protocols.raydium_amm_v4 | Raydium Automated Market Maker V4 |
| Raydium CLMM | protocols.raydium_clmm | Raydium Concentrated Liquidity MM |
| Raydium CPMM | protocols.raydium_cpmm | Raydium Constant Product MM |
| Orca Whirlpool | protocols.orca_whirlpool | Orca Whirlpool Concentrated Liquidity |
| Meteora AMM | protocols.meteora_amm | Meteora Dynamic AMM |
| Meteora DAMM | protocols.meteora_damm | Meteora Dynamic AMM V2 |
| Meteora DLMM | protocols.meteora_dlmm | Meteora Dynamic Liquidity MM |
Each protocol supports the following event types (enable in [events] config section):
See config.toml for complete event list.
[server]
host = "127.0.0.1" # WebSocket listen address
port = 9001 # WebSocket listen port[grpc]
endpoint = "https://solana-yellowstone-grpc.publicnode.com:443"
token = "" # gRPC auth token (optional)
enable_metrics = true # Enable performance metrics
enable_tls = true # Enable TLS
connection_timeout_ms = 10000 # Connection timeout (ms)
request_timeout_ms = 30000 # Request timeout (ms)Enable/disable specific protocols and events via config:
[protocols]
pumpfun = true # Enable PumpFun protocol
raydium_amm_v4 = false # Disable Raydium AMM V4
[events]
pumpfun_trade = true # Enable PumpFun trade events
pumpfun_create = false # Disable PumpFun create eventsNote: At least one protocol and one event type must be enabled, otherwise server will fail to start
Raw data from server:
{
"signature": [188, 230, 16, ...], // 64 bytes
"mint": [208, 230, 16, ...], // 32 bytes
"user": [123, 45, 67, ...] // 32 bytes
}Client display format:
{
"signature": "5Jb7XqKGPj8XqKGPj8XqKGPj8XqKGPj...",
"mint": "D0e610e3f14ed2960e95230e9d74e471...",
"user": "7xKGPj8XqKGPj8XqKGPj8XqKGPj8Xq..."
}{
"PumpFunTrade": {
"metadata": {
"signature": [byte array],
"slot": 123456,
"block_time": 1234567890,
"grpc_recv_us": 1234567890123456
},
"mint": [byte array],
"token_amount": 1000000,
"sol_amount": 500000,
"is_buy": true,
"user": [byte array],
"virtual_sol_reserves": 1000000000,
"virtual_token_reserves": 1000000000
}
}Each event is wrapped in its corresponding type field:
parser-proxy-ws/ ├── src/ │ ├── main.rs # Main entry point │ ├── config.rs # Config file loading and parsing │ └── ws_server.rs # WebSocket server implementation ├── examples/ │ ├── client.html # HTML visualization client │ ├── client.ts # TypeScript client example │ └── client.py # Python client example ├── sol-parser-sdk/ # Solana parser SDK (submodule) ├── config.toml # Configuration file ├── Cargo.toml # Rust project config └── README.md
cargo testPerformance metrics are displayed when server starts:
📊 gRPC receive time: 1234567890 μs ⚡ Event parsing took: 15 μs
MIT License
For issues or suggestions, please submit an Issue.
| Back | FazBrowse Home | New Git URL |