Environment Variables
All configuration is managed through environment variables in your.env file.
Quick Reference
| Variable | Description | Default | Required |
|---|---|---|---|
SOLANA_RPC_URL | Solana RPC endpoint URL | https://api.mainnet-beta.solana.com | Yes |
SOLANA_WS_URL | Solana WebSocket endpoint URL | wss://api.mainnet-beta.solana.com | No |
PORT | Server port | 3000 | No |
NODE_ENV | Node.js environment | production | No |
DEX_FORK_TYPE | DEX fork type identifier | Custom | Yes |
FACTORY_ADDRESS | Factory program address | (empty) | Yes |
ROUTER_ADDRESS | Router program address | (empty) | Yes |
PROTOCOL_FEE_RATE | Protocol fee rate for volume calculation | 0.0025 (0.25%) | No |
EXCLUDED_DAOS | Comma-separated list of DAO addresses to exclude | (empty) | No |
Solana Configuration
The Solana RPC endpoint URL for fetching blockchain data.Recommendations:
- Use a dedicated RPC provider (e.g., Helius, QuickNode) for production
- Public endpoints may be rate-limited
The Solana WebSocket endpoint URL for real-time updates.
Server Configuration
The port on which the API server will listen.
The Node.js environment. Options:
development, production, testDEX Configuration
The DEX fork type identifier for CoinGecko compatibility.Supported Types:
Custom(recommended for Futarchy)Uniswap V2,Uniswap V3,Uniswap V4Raydium,Raydium CLMMOrca- See full list
The factory program address that creates and manages DAO instances.
The router program address for executing swaps.
Protocol Configuration
The protocol fee rate used for volume calculation. Default is 0.0025 (0.25%).Formula:
volume = protocolFees / feeRateComma-separated list of DAO addresses to exclude from the API responses.
Supported DEX Forks
The following DEX fork types are supported for CoinGecko compatibility:AMM Protocols
AMM Protocols
- Uniswap V2, V3, V4
- Raydium
- Raydium CLMM
- Orca
- Balancer V2, V3
- Curve
Concentrated Liquidity
Concentrated Liquidity
- Algebra
- Algebra Integral
- Camelot V3
- Cetus
- Iziswap
- Kyberswap
- Kyberswap Elastic
- Quickswap V3
- Maverick V2
Other Protocols
Other Protocols
- Solidly V2, V3
- Traderjoe V2
- Velocore V2
- Ston.fi, Ston.fi V2
- Surge Protocol
- Dedust
- Ekubo
- Jediswap
- And more…
Example Configuration
Here’s a complete example.env file:
Validation
On startup, check the logs for:- ✅ RPC connection successful
- ✅ Factory address valid
- ✅ Router address valid
- ⚠️ Any configuration warnings
Production Recommendations
Use Premium RPC
Premium RPC providers offer higher rate limits and better reliability
Set Appropriate Fees
Ensure PROTOCOL_FEE_RATE matches your actual protocol fees
Monitor Performance
Use health check endpoint to monitor API status
Secure Your Endpoints
Consider adding authentication for production deployments
