Skip to main content

Crypto

Base URL: https://drain.lat/api/v1/crypto
Get current price and market data for one or more coins.
GET /api/v1/crypto/price
ids
string
required
Comma-separated coin IDs (e.g. bitcoin,ethereum,solana).
currencies
string
required
Comma-separated currency codes (e.g. usd,eur,gbp).
curl "https://drain.lat/api/v1/crypto/price?ids=bitcoin,ethereum&currencies=usd,eur" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "data": {
    "bitcoin": {
      "usd": 62400,
      "usd_market_cap": 1230000000000,
      "usd_24h_vol": 28000000000,
      "usd_24h_change": 2.4,
      "last_updated_at": 1714900000
    }
  },
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Get top coins ranked by market cap with full market data.
GET /api/v1/crypto/markets
currency
string
Target currency. Default usd.
page
number
Page number. Default 1.
per_page
number
Results per page. Max 250. Default 50.
category
string
Filter by category (e.g. defi, layer-1).
curl "https://drain.lat/api/v1/crypto/markets?currency=usd&per_page=10" \
  -H "x-api-key: YOUR_API_KEY"
Response
[
  {
    "id": "bitcoin",
    "symbol": "btc",
    "name": "Bitcoin",
    "currentPrice": 62400,
    "marketCap": 1230000000000,
    "marketCapRank": 1,
    "priceChangePct24h": 2.4,
    "priceChangePct7d": 5.1,
    "circulatingSupply": 19700000,
    "ath": 73750,
    "lastUpdated": "2026-05-05T12:00:00.000Z"
  }
]
Get full details for a specific coin including description, links, and social stats.
GET /api/v1/crypto/coin/:id
id
string
required
CoinGecko coin ID (e.g. bitcoin, ethereum, solana).
curl "https://drain.lat/api/v1/crypto/coin/bitcoin" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "id": "bitcoin",
  "symbol": "btc",
  "name": "Bitcoin",
  "description": "Bitcoin is the first successful internet money...",
  "links": {
    "homepage": ["https://bitcoin.org"],
    "twitter": "bitcoin",
    "reddit": "https://www.reddit.com/r/Bitcoin/"
  },
  "currentPrice": { "usd": 62400 },
  "ath": { "usd": 73750 },
  "circulatingSupply": 19700000,
  "maxSupply": 21000000,
  "communityData": {
    "twitterFollowers": 6800000,
    "redditSubscribers": 5900000
  },
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Get historical price, market cap, and volume data for a coin.
GET /api/v1/crypto/coin/:id/chart
id
string
required
CoinGecko coin ID.
days
string
Time range. Options: 1, 7, 14, 30, 90, 180, 365, max. Default 7.
currency
string
Target currency. Default usd.
curl "https://drain.lat/api/v1/crypto/coin/bitcoin/chart?days=7&currency=usd" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "prices": [[1714600000000, 61200], [1714686400000, 62400]],
  "marketCaps": [[1714600000000, 1205000000000], [1714686400000, 1230000000000]],
  "totalVolumes": [[1714600000000, 26000000000], [1714686400000, 28000000000]]
}
Get global crypto market stats.
GET /api/v1/crypto/global
curl "https://drain.lat/api/v1/crypto/global" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "activeCryptocurrencies": 13200,
  "markets": 1042,
  "totalMarketCap": 2340000000000,
  "totalVolume24h": 98000000000,
  "btcDominance": 52.4,
  "ethDominance": 17.1,
  "marketCapChangePct24h": 1.8,
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Get BTC exchange rates against 30+ currencies.
GET /api/v1/crypto/exchange-rates
curl "https://drain.lat/api/v1/crypto/exchange-rates" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "rates": {
    "usd": { "name": "US Dollar", "unit": "USD", "value": 62400, "type": "fiat" },
    "eur": { "name": "Euro", "unit": "EUR", "value": 57800, "type": "fiat" },
    "eth": { "name": "Ether", "unit": "ETH", "value": 20.0, "type": "crypto" }
  },
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Get the top 10 gainers and top 10 losers in the last 24 hours.
GET /api/v1/crypto/movers
currency
string
Target currency. Default usd.
curl "https://drain.lat/api/v1/crypto/movers?currency=usd" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "gainers": [
    {
      "id": "pepe",
      "name": "Pepe",
      "symbol": "PEPE",
      "currentPrice": 0.0000142,
      "priceChangePct24h": 42.8,
      "marketCap": 5980000000
    }
  ],
  "losers": [
    {
      "id": "some-token",
      "name": "Some Token",
      "symbol": "SMT",
      "currentPrice": 0.0021,
      "priceChangePct24h": -18.4,
      "marketCap": 120000000
    }
  ],
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}
Get the top 30 coin categories ranked by market cap.
GET /api/v1/crypto/categories
curl "https://drain.lat/api/v1/crypto/categories" \
  -H "x-api-key: YOUR_API_KEY"
Response
[
  {
    "id": "layer-1",
    "name": "Layer 1 (L1)",
    "marketCap": 1840000000000,
    "marketCapChange24h": 2.1,
    "volume24h": 48000000000,
    "topCoins": ["bitcoin", "ethereum", "solana", "bnb", "avalanche-2"]
  }
]