A Go-based market data fetcher agent with caching and an Nginx proxy for efficient data delivery.
This project consists of two main components:
- Market Fetcher: A Go service that fetches and caches market data from CoinGecko, price updates from Binance, and provides blockchain platform-specific token lists.
- Nginx Proxy: A reverse proxy that provides caching, ETag optimization, and compression for efficient delivery of market data.
- Docker and Docker Compose
- Create a
config.yaml
file in themarket-fetcher
directory:
coingecko_fetcher:
update_interval_ms: 600000 # milliseconds (10 minutes)
tokens_file: "coingecko_api_tokens.json"
limit: 5000 # number of tokens to fetch
request_delay_ms: 0 # delay between requests
tokens_fetcher:
update_interval_ms: 1800000 # milliseconds (30 minutes)
supported_platforms:
- ethereum
- optimistic-ethereum # Optimism
- arbitrum-one # Arbitrum
- base
- status
- linea
- blast
- zksync
- mantle
- abstract
- unichain
- binance-smart-chain # BSC
- polygon-pos # Polygon
- (Optional) Create
coingecko_api_tokens.json
in thesecrets
directory for Pro API access:
{
"api_tokens": ["your-api-key-here"],
"demo_api_tokens": ["demo-key"]
}
If you don't provide this file, the service will use the public API without authentication.
Run the following command to start all services:
./start-local.sh
This will:
- Create necessary configuration files if they don't exist
- Build and start the following services:
- market-fetcher: Fetches market data (port 8081)
- market-proxy: Nginx proxy with caching (port 8080)
- market-frontend: Test frontend application (port 3000)
- Set up a Docker network for communication between services
- API Proxy: http://localhost:8080
- Frontend: http://localhost:3000
- Market data fetching from CoinGecko with rate limit handling
- Real-time price updates via Binance WebSocket
- Blockchain platform-specific token filtering
- REST API for accessing token lists, prices
Go application that caches token lists from CoinGecko and price updates from Binance, providing a REST API for accessing token and price data. Also provides filtered token lists based on blockchain platforms.
A proxy that performs caching, ETag optimization, and compression for displaying market data from market-fetcher.