Skip to main content

Spot Market Endpoints

Three endpoints for spot market movers. Data is cached for 30 seconds with stampede protection (only one request refreshes the cache at a time).

GET /v1/spot/gainers

Top gaining assets by 24h price change.

GET /v1/spot/losers

Top losing assets by 24h price change.

GET /v1/spot/volume

Top assets by 24h trading volume.

Query Parameters (all three endpoints)

limit
integer
default:"20"
Number of results to return. Uses O(N) partial sort (select_nth_unstable) for efficient top-K selection.
exchange
string
Filter by exchange (e.g., binance, okx). Omit for cross-exchange results.

Example

curl "https://api.crypton.dev/v1/spot/gainers?limit=5"
{
  "status": "ok",
  "timestamp": 1709640000000,
  "data": [
    {
      "symbol": "WIF",
      "exchange": "bybit",
      "price": 2.85,
      "change_pct_24h": 42.50,
      "volume_24h": 890000000.00
    },
    {
      "symbol": "PEPE",
      "exchange": "binance",
      "price": 0.00001234,
      "change_pct_24h": 28.75,
      "volume_24h": 1200000000.00
    }
  ]
}

Response Fields

data
array
The cache holds ~11,500 ticker entries from 23 exchanges. Vector capacity is pre-allocated, and top-K selection uses Rust’s select_nth_unstable_by for O(N) performance instead of O(N log N) full sort.

Field Reference

FieldTypeDescriptionGranularityExample
symbolstringTrading symbol as reported by the exchange (may include pair suffix)"WIF"
exchangestringSource exchange ID"bybit"
pricenumberLast traded price in USD. Full precision for sub-penny tokens~30s cached2.85
change_pct_24hnumber24h price change (%). Entries with no change data are excluded~30s cached42.50
volume_24hnumber24h trading volume in USD~30s cached890000000.00

Data Sources

Spot data from all 23 exchanges in the v2 registry. Tickers cached for 30s with stampede protection (single-flight cache refresh). Cross-exchange results are deduplicated by symbol, keeping the highest-volume entry per symbol.

Live Testing

# Top 5 gainers
curl -s "https://api.crypton.dev/v1/spot/gainers?limit=5" | jq .

# Top 5 losers
curl -s "https://api.crypton.dev/v1/spot/losers?limit=5" | jq .

# Top 5 by volume
curl -s "https://api.crypton.dev/v1/spot/volume?limit=5" | jq .

# Binance-only gainers
curl -s "https://api.crypton.dev/v1/spot/gainers?limit=10&exchange=binance" | jq .