Cryptocurrency pricing API gateway with CoinGecko Pro integration and intelligent caching.
- CoinGecko Pro API integration
- 1-hour cache TTL to minimize API calls
- CoinGecko-compatible
/simple/priceendpoint - CORS support
- Docker-ready deployment
| Endpoint | Description |
|---|---|
GET /health |
Health check |
GET /price/{token_id}?currency=usd |
Single token price |
GET /prices?ids=bitcoin,ethereum¤cy=usd |
Multiple token prices |
GET /simple/price?ids=bitcoin&vs_currencies=usd |
CoinGecko-compatible format |
# Single token
curl https://fx.lux.network/price/bitcoin
# Multiple tokens
curl "https://fx.lux.network/prices?ids=bitcoin,ethereum,solana¤cy=usd"
# CoinGecko compatible
curl "https://fx.lux.network/simple/price?ids=bitcoin&vs_currencies=usd,eur"{
"id": "bitcoin",
"symbol": "btc",
"name": "Bitcoin",
"price": 97234.56,
"currency": "usd",
"change_24h": 2.34,
"market_cap": 1923456789012,
"volume_24h": 45678901234,
"updated_at": "2025-01-24T12:00:00Z",
"cached": true
}# Run locally
export COINGECKO_API_KEY=your-api-key
go run main.go
# Docker
docker compose up -dAutomatically deploys to fx.lux.network on push to main branch.
| Variable | Default | Description |
|---|---|---|
COINGECKO_API_KEY |
- | CoinGecko Pro API key |
PORT |
8080 | Server port |
MIT © Lux Partners Limited