Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.drain.lat/llms.txt

Use this file to discover all available pages before exploring further.

Crypto

Base URL: https://drain.lat/api/v1/crypto All endpoints require the x-api-key header.

GET /price

Get current price and market data for one or more coins. Endpoint
GET /api/v1/crypto/price?ids=bitcoin,ethereum&currencies=usd
Query Parameters
ParameterTypeRequiredDescription
idsstringYesComma-separated coin IDs (e.g. bitcoin,ethereum,solana)
currenciesstringYesComma-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,
      "eur": 57800,
      "eur_market_cap": 1140000000000,
      "eur_24h_vol": 25900000000,
      "eur_24h_change": 2.1,
      "last_updated_at": 1714900000
    },
    "ethereum": {
      "usd": 3120,
      "usd_market_cap": 374000000000,
      "usd_24h_vol": 14000000000,
      "usd_24h_change": 1.8,
      "last_updated_at": 1714900000
    }
  },
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}

GET /markets

Get top coins ranked by market cap with full market data. Endpoint
GET /api/v1/crypto/markets
Query Parameters
ParameterTypeDefaultDescription
currencystringusdTarget currency
pagenumber1Page number
per_pagenumber50Results per page (max 250)
categorystring-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",
    "image": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
    "currentPrice": 62400,
    "marketCap": 1230000000000,
    "marketCapRank": 1,
    "fullyDilutedValuation": 1310000000000,
    "totalVolume": 28000000000,
    "high24h": 63100,
    "low24h": 61200,
    "priceChange24h": 1480,
    "priceChangePct24h": 2.4,
    "priceChangePct1h": 0.3,
    "priceChangePct7d": 5.1,
    "marketCapChange24h": 28000000000,
    "marketCapChangePct24h": 2.3,
    "circulatingSupply": 19700000,
    "totalSupply": 21000000,
    "maxSupply": 21000000,
    "ath": 73750,
    "athChangePct": -15.4,
    "athDate": "2024-03-14T07:10:36.635Z",
    "atl": 67.81,
    "atlChangePct": 91900,
    "atlDate": "2013-07-06T00:00:00.000Z",
    "lastUpdated": "2026-05-05T12:00:00.000Z"
  }
]

GET /coin/:id

Get full details for a specific coin including description, links, and social stats. Endpoint
GET /api/v1/crypto/coin/:id
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/",
    "github": ["https://github.com/bitcoin/bitcoin"]
  },
  "image": {
    "thumb": "https://assets.coingecko.com/coins/images/1/thumb/bitcoin.png",
    "large": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png"
  },
  "currentPrice": { "usd": 62400 },
  "ath": { "usd": 73750 },
  "athDate": { "usd": "2024-03-14T07:10:36.635Z" },
  "atl": { "usd": 67.81 },
  "atlDate": { "usd": "2013-07-06T00:00:00.000Z" },
  "circulatingSupply": 19700000,
  "totalSupply": 21000000,
  "maxSupply": 21000000,
  "communityData": {
    "twitterFollowers": 6800000,
    "redditSubscribers": 5900000
  },
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}

GET /coin/:id/chart

Get historical price, market cap, and volume data for a coin. Endpoint
GET /api/v1/crypto/coin/:id/chart
Query Parameters
ParameterTypeDefaultDescription
daysstring71, 7, 14, 30, 90, 180, 365, or max
currencystringusdTarget currency
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, 62100],
    [1714772800000, 62400]
  ],
  "marketCaps": [
    [1714600000000, 1205000000000],
    [1714686400000, 1222000000000],
    [1714772800000, 1230000000000]
  ],
  "totalVolumes": [
    [1714600000000, 26000000000],
    [1714686400000, 27000000000],
    [1714772800000, 28000000000]
  ]
}

GET /trending

Get the top trending coins and NFTs in the last 24 hours. Endpoint
GET /api/v1/crypto/trending
curl "https://drain.lat/api/v1/crypto/trending" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "coins": [
    {
      "id": "pepe",
      "name": "Pepe",
      "symbol": "PEPE",
      "marketCapRank": 28,
      "thumb": "https://assets.coingecko.com/coins/images/29850/thumb/pepe-token.jpeg",
      "priceChangePct24h": 14.2
    }
  ],
  "nfts": [
    {
      "id": "pudgy-penguins",
      "name": "Pudgy Penguins",
      "symbol": "PPG",
      "thumb": "https://assets.coingecko.com/nfts/images/...",
      "nativeCurrencyPriceChange24h": 8.4
    }
  ],
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}

GET /global

Get global crypto market stats. Endpoint
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 /exchange-rates

Get BTC exchange rates against 30+ currencies. Endpoint
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 /search

Search for coins and exchanges by name or symbol. Endpoint
GET /api/v1/crypto/search?q=query
Query Parameters
ParameterTypeRequiredDescription
qstringYesSearch term (name or symbol)
curl "https://drain.lat/api/v1/crypto/search?q=solana" \
  -H "x-api-key: YOUR_API_KEY"
Response
{
  "coins": [
    {
      "id": "solana",
      "name": "Solana",
      "symbol": "SOL",
      "marketCapRank": 5,
      "thumb": "https://assets.coingecko.com/coins/images/4128/thumb/solana.png"
    }
  ],
  "exchanges": [
    {
      "id": "solana-dex",
      "name": "Solana DEX",
      "thumb": "https://assets.coingecko.com/markets/images/..."
    }
  ],
  "scrapedAt": "2026-05-05T12:00:00.000Z"
}

GET /movers

Get the top 10 gainers and top 10 losers in the last 24 hours. Endpoint
GET /api/v1/crypto/movers
Query Parameters
ParameterTypeDefaultDescription
currencystringusdTarget currency
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 /categories

Get the top 30 coin categories ranked by market cap. Endpoint
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"]
  },
  {
    "id": "decentralized-finance-defi",
    "name": "Decentralized Finance (DeFi)",
    "marketCap": 98000000000,
    "marketCapChange24h": 3.4,
    "volume24h": 8200000000,
    "topCoins": ["uniswap", "aave", "maker", "compound-governance-token", "curve-dao-token"]
  }
]