Skip to content

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

mermaid
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/market

Authentication

All endpoints except /health require your API key. Pass it as a header on REST calls:

bash
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

MethodPathAuthDescription
GET/v1/market/healthNoService health
GET/v1/market/coinsYesPaginated list of all coins (full market data)
GET/v1/market/coins/:symbolYesFull detail for one coin
GET/v1/market/prices?symbols=btc,ethYesLightweight price lookup for up to 100 coins
GET/v1/market/prices/:symbolYesPrice for a single coin
WSS/v1/market/ws?key=…Via queryReal-time streaming

Coin Data Fields

Every coin object returned by /coins contains:

FieldTypeDescription
idstringCoin identifier (e.g. "bitcoin")
symbolstringTrading symbol lowercase (e.g. "btc")
namestringFull name (e.g. "Bitcoin")
imagestringLogo URL
current_pricenumberCurrent USD price
market_capnumberTotal market capitalisation (USD)
market_cap_rankintegerRank by market cap
total_volumenumber24-hour trading volume (USD)
high_24hnumber24-hour high price
low_24hnumber24-hour low price
price_change_24hnumberAbsolute price change in last 24h
price_change_percentage_24hnumber% change in last 24h
price_change_percentage_1h_in_currencynumber|null% change in last 1h
price_change_percentage_7d_in_currencynumber|null% change in last 7d
circulating_supplynumberCoins currently in circulation
total_supplynumber|nullTotal minted supply
max_supplynumber|nullHard cap (null if unlimited)
athnumberAll-time high price
ath_change_percentagenumber% below ATH
ath_datestringISO 8601 date of ATH
atlnumberAll-time low price
atl_change_percentagenumber% above ATL
atl_datestringISO 8601 date of ATL
last_updatedstringISO 8601 timestamp of last price update

Tick Fields (WebSocket only)

Price change events sent after each poll contain lighter-weight changes objects:

FieldTypeDescription
symbolstringLowercase trading symbol
pricenumberUpdated USD price
pct_24hnumberCurrent 24h % change
directionstring"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 /health endpoint 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

ResourceLimit
REST endpoints120 requests / minute per API key
WebSocket connectionsUnlimited concurrent connections per key
/v1/market/prices symbolsMax 100 per request
/v1/market/coins limitMax 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.


Next Steps

Rach Payments API