Crypto Market Data API
Real-time cryptocurrency prices and live streaming for 100+ digital assets, served from Rach's infrastructure.
Overview
The Market Data API gives your application access to current prices, full market stats, and a WebSocket stream that pushes price changes the moment they are detected — no polling required.
Key features:
- 100+ coins — Bitcoin, Ethereum, and the top altcoins by market cap
- Full market data — price, market cap, volume, 24h high/low, ATH/ATL, circulating supply
- 1h / 7d percentage changes — for charts and trend views
- WebSocket streaming — subscribe to any subset of coins and receive live delta ticks
- Instant snapshot — WebSocket delivers a full price snapshot on subscribe, so your UI is never blank
- Regular refresh — prices updated on a short interval; changes broadcast immediately to all connected clients
How It Works
sequenceDiagram
participant App as Your App
participant API as api.rach.finance
participant Redis as Redis Cache
Note over API,Redis: Background — regular interval
API->>Redis: Store snapshot + publish tick
App->>API: GET /v1/market/coins
API->>Redis: Read snapshot
Redis-->>API: Cached data
API-->>App: Paginated coin list
App->>API: WSS /v1/market/ws?key=…
API-->>App: 101 Switching Protocols
App->>API: {"op":"subscribe","symbols":["btc","eth"]}
API-->>App: {"op":"snapshot","coins":[…]}
Note over API,App: On next poll if prices change
API-->>App: {"op":"tick","changes":[…]}Base URL
https://api.rach.finance/v1/marketAuthentication
All endpoints except /health require your API key. Pass it as a header on REST calls:
X-API-Key: live_sk_…
# or
Authorization: Bearer live_sk_…For WebSocket connections pass it as a query parameter:
wss://api.rach.finance/v1/market/ws?key=live_sk_…Getting an API key
API keys are created in the Rach dashboard. Keys starting with live_sk_ operate on live data. Keys starting with test_sk_ are for sandbox use.
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /v1/market/health | No | Service health |
| GET | /v1/market/coins | Yes | Paginated list of all coins (full market data) |
| GET | /v1/market/coins/:symbol | Yes | Full detail for one coin |
| GET | /v1/market/prices?symbols=btc,eth | Yes | Lightweight price lookup for up to 100 coins |
| GET | /v1/market/prices/:symbol | Yes | Price for a single coin |
| WSS | /v1/market/ws?key=… | Via query | Real-time streaming |
Coin Data Fields
Every coin object returned by /coins contains:
| Field | Type | Description |
|---|---|---|
id | string | Coin identifier (e.g. "bitcoin") |
symbol | string | Trading symbol lowercase (e.g. "btc") |
name | string | Full name (e.g. "Bitcoin") |
image | string | Logo URL |
current_price | number | Current USD price |
market_cap | number | Total market capitalisation (USD) |
market_cap_rank | integer | Rank by market cap |
total_volume | number | 24-hour trading volume (USD) |
high_24h | number | 24-hour high price |
low_24h | number | 24-hour low price |
price_change_24h | number | Absolute price change in last 24h |
price_change_percentage_24h | number | % change in last 24h |
price_change_percentage_1h_in_currency | number|null | % change in last 1h |
price_change_percentage_7d_in_currency | number|null | % change in last 7d |
circulating_supply | number | Coins currently in circulation |
total_supply | number|null | Total minted supply |
max_supply | number|null | Hard cap (null if unlimited) |
ath | number | All-time high price |
ath_change_percentage | number | % below ATH |
ath_date | string | ISO 8601 date of ATH |
atl | number | All-time low price |
atl_change_percentage | number | % above ATL |
atl_date | string | ISO 8601 date of ATL |
last_updated | string | ISO 8601 timestamp of last price update |
Tick Fields (WebSocket only)
Price change events sent after each poll contain lighter-weight changes objects:
| Field | Type | Description |
|---|---|---|
symbol | string | Lowercase trading symbol |
price | number | Updated USD price |
pct_24h | number | Current 24h % change |
direction | string | "raise" — price went up; "fall" — price went down |
Supported Cryptocurrencies
The top 100 coins by market cap are tracked. Examples:
Layer 1s: Bitcoin (BTC), Ethereum (ETH), Solana (SOL), Avalanche (AVAX), Cardano (ADA)
Layer 2s / Scaling: Polygon (POL), Arbitrum (ARB), Optimism (OP)
Exchange Tokens: Binance Coin (BNB), OKB
Stablecoins: Tether (USDT), USD Coin (USDC), DAI
DeFi: Uniswap (UNI), Chainlink (LINK), Aave (AAVE)
Data Freshness
- Prices are refreshed on a regular interval
- The
/healthendpoint tells you whether the cached data is fresh or stale - WebSocket clients receive a tick within seconds of a price change being detected
- If no coin changed price in a refresh cycle, no tick is broadcast
Rate Limits
| Resource | Limit |
|---|---|
| REST endpoints | 120 requests / minute per API key |
| WebSocket connections | Unlimited concurrent connections per key |
/v1/market/prices symbols | Max 100 per request |
/v1/market/coins limit | Max 250 per page |
Use WebSocket for live data
For any use case that needs prices refreshed more often than once a minute, use the WebSocket stream. It has no rate limit and pushes changes instantly.
