Quickstart
1. Clone & Build
git clone https://github.com/alt0x17/crypton.git
cd crypton
cargo build --release
2. Run
cargo run --release
# -> Crypton starting on 0.0.0.0:3177
No API keys, no config files. Crypton starts polling 23+ exchanges immediately.
3. Make Your First Request
# BTC funding snapshot across exchanges
curl http://localhost:3177/v1/funding-rates?symbol=BTC
# ETH open interest
curl http://localhost:3177/v1/open-interest?symbol=ETH
# Recent BTC liquidations
curl http://localhost:3177/v1/liquidations?symbol=BTC
{
"status" : "ok" ,
"timestamp" : 1711670400000 ,
"data" : {
"symbol" : "BTC" ,
"average" : 0.000105 ,
"exchanges" : {
"binance" : {
"rate" : 0.000124 ,
"next_funding" : "2025-03-29T20:00:00Z" ,
"updated_at" : 1711670100000
},
"okx" : {
"rate" : 0.000089 ,
"next_funding" : "2025-03-29T20:00:00Z" ,
"updated_at" : 1711670100000
},
"bybit" : {
"rate" : 0.000102 ,
"next_funding" : "2025-03-29T20:00:00Z" ,
"updated_at" : 1711670100000
}
}
}
}
{
"status" : "ok" ,
"timestamp" : 1711670400000 ,
"data" : {
"symbol" : "ETH" ,
"total_oi_usd" : 5570000000 ,
"exchanges" : {
"binance" : {
"oi_usd" : 2890000000 ,
"oi_contracts" : 842100 ,
"updated_at" : 1711670100000
},
"bybit" : {
"oi_usd" : 1450000000 ,
"updated_at" : 1711670100000
},
"okx" : {
"oi_usd" : 1230000000 ,
"updated_at" : 1711670100000
}
}
}
}
{
"status" : "ok" ,
"timestamp" : 1711670400000 ,
"data" : {
"symbol" : "BTC" ,
"recent" : [
{
"exchange" : "binance" ,
"symbol" : "BTC" ,
"side" : "long" ,
"size_usd" : 1240000 ,
"price" : 70850 ,
"timestamp" : 1711670340000
},
{
"exchange" : "okx" ,
"symbol" : "BTC" ,
"side" : "short" ,
"size_usd" : 540000 ,
"price" : 70920 ,
"timestamp" : 1711670280000
}
],
"total_24h_usd" : 14500000 ,
"long_liquidated_24h" : 9200000 ,
"short_liquidated_24h" : 5300000
}
}
4. Explore More Endpoints
# All 105+ exchanges in the registry
curl http://localhost:3177/v2/exchanges
# BTC ETF flows (SoSoValue - no auth needed)
curl http://localhost:3177/v2/etf/btc
# Exchange reserves via DefiLlama
curl http://localhost:3177/v2/exchange-reserves
# Liquidation heatmap (computed from leverage tiers)
curl http://localhost:3177/v2/liquidation-heatmap/BTC
5. Try the Studio
The dashboard is a Next.js app in studio/:
cd studio
pnpm install
pnpm dev
# -> http://localhost:3000
Full OHLCV charts, indicator drawer, funding rate bars, and real-time WebSocket streaming.
All responses are gzip-compressed and wrapped in a standard envelope:
{
"status" : "ok" ,
"timestamp" : 1711670400000 ,
"data" : { ... }
}
Error responses:
{
"status" : "error" ,
"message" : "Invalid symbol parameter" ,
"timestamp" : 1711670400000
}
Key Endpoints
v1 - Cache-backed (polled every 15s)
Endpoint Description /v1/funding-ratesFunding rates from 11 CEXs + 2 DEXs /v1/open-interestUSD-normalized OI across exchanges /v1/long-short-ratioLong/short ratios (Binance, OKX, Bybit, HTX) /v1/liquidationsRecent liquidation events /v1/pricesLatest prices from all exchanges /v1/overviewAggregated market overview /v1/indicators/fear-greedFear & Greed Index /v1/spot/coins-marketsSpot market overview
v2 - Registry-backed (direct exchange calls)
Endpoint Description /v2/funding-ratesPer-exchange funding with mark/index prices /v2/open-interestOI with base units + contract counts /v2/tickersFull ticker data from registry exchanges /v2/exchanges105+ exchanges with capability flags /v2/etf/{type}BTC/ETH ETF metrics (SoSoValue) /v2/etf/{type}/history300 days of ETF flow history /v2/exchange-reservesCEX reserves via DefiLlama (14 exchanges) /v2/liquidation-heatmap/{symbol}Computed liquidation price levels
WebSocket - Real-time streams
Connect to ws://localhost:3177/ws and subscribe:
{ "type" : "subscribe" , "topics" : [ "tickers:binance" , "funding:binance" , "liquidations" ]}
Available channels: tickers:*, funding:*, klines:*, orderbook:*, bidsasks:*, liquidations
Docker
docker build -t crypton .
docker run -p 3177:3177 crypton
Or with the test suite:
docker compose -f docker-compose.test.yml up
Crypton requires no API keys for exchange data - all endpoints use public exchange APIs.
Only CoinGecko (CG_API_KEY) and CryptoPanic (CRYPTOPANIC_TOKEN) need optional keys for enrichment.
Next Steps
API Reference Full endpoint documentation
Funding Rates Cross-exchange funding rate data
Exchange Analytics Per-exchange deep analytics (Binance, OKX, Bybit, HTX)
ETF Flows BTC & ETH spot ETF daily flows and AUM
WebSocket Real-time streaming - tickers, funding, klines, orderbooks
105+ Exchanges Full exchange registry with capability flags