← Back to home

API documentation

Below, example URLs use this origin: https://coke-api.onrender.com — it updates automatically on this page. Configure NEXT_PUBLIC_API_URL (and API_INTERNAL_URL for Vercel rewrites) so the dashboard and API stay in sync.

First request in 30 seconds

Shortest path from zero to a working call against the base URL shown on this page.

  1. Sign up (dashboard).
  2. Create an API key in your account.
  3. Copy the full secret string.
  4. Run (replace YOUR_API_KEY):
    curl -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/crypto/price?symbol=BTC"

Which auth do I use?

Pick the row that matches your integration — the headers are not interchangeable.

Use caseAuth methodExample path
Dashboard login, profile, creating or revoking API keysAuthorization: Bearer <token>/api/auth/me
Public product API (crypto, gas, FX, v1, …)x-api-key: <your_key>/api/crypto/price
Homepage marketing preview (no key)none/api/public/demo/crypto-price

Quick start

Three ideas: where to send requests, which header carries your product API key, and how that differs from the Bearer token you get when you log into the dashboard.

  • 1. Base URL

    From this documentation page we use your current origin (https://coke-api.onrender.com). If the site is on Vercel, calls like https://coke-api.onrender.com/api/... are rewritten to your real API — same paths work in curl, scripts, and Postman. For a backend running in another datacenter, call the API hostname directly (the same value you set as NEXT_PUBLIC_API_URL on Vercel / Render).

  • 2. Product API key (x-api-key)

    Create a key in the dashboard after sign-in. Send the full secret string in the x-api-key header on every request to /api/crypto/*, /api/v1/*, /api/radar/*, and the other rows in the tables below. Do not put the key in the query string or in client-side code that ships to browsers unless you accept the leak risk.

  • 3. Bearer token (dashboard only)

    Registration, login, /api/auth/me, creating or revoking API keys, and ingestion routes use Authorization: Bearer <token> from /api/auth/login or /api/auth/register. That token is not your x-api-key.

  • Public demo routes (no API key)

    Legacy widget: GET /api/public/preview/crypto-price?symbol=BTC. Interactive demo (compact JSON): GET /api/public/demo/crypto-price?symbol=BTC — rate-limited and cached. Production calls should use /api/crypto/price with x-api-key.

    GET/api/public/preview/crypto-price?symbol=BTCGET/api/public/demo/crypto-price?symbol=BTC

  • Windows PowerShell

    curl.exe -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/crypto/price?symbol=BTC" # Or native PowerShell: Invoke-RestMethod -Uri "https://coke-api.onrender.com/api/crypto/price?symbol=BTC" -Headers @{ "x-api-key" = "YOUR_API_KEY" }

    PowerShell aliases curl to Invoke-WebRequest — use curl.exe or Invoke-RestMethod as above.

Authorization

Most /api/… routes for the dashboard and authenticated ingestion require Authorization: Bearer <token>. Tokens are issued on registration and login.

Registration & profile

  • POST/api/auth/registerPOST /api/auth/register — body: { "email", "password", "username" } (username: unique nickname, 3–32 chars, [a-z0-9_]). Creates a user and returns a token.
  • POST/api/auth/loginPOST /api/auth/login — same body; response includes token, userId, role, etc.
  • GET/api/auth/meGET /api/auth/me — profile with Bearer.
  • GET/api/auth/api-keysGET /api/auth/api-keys — list your API keys (Bearer).
  • POST/api/auth/api-keysPOST /api/auth/api-keys — create a Free key (optional body: { "label" }).
  • DEL/api/auth/api-keys/:idDELETE /api/auth/api-keys/:id — revoke your key.
  • GET/api/auth/api-keys/:id/revealGET /api/auth/api-keys/:id/reveal — full key for copy/show (Bearer); requires API_KEY_ENCRYPTION_SECRET on the server.
  • REST/api/auth/api-key-webhooksGET/POST/PATCH/DELETE /api/auth/api-key-webhooks — product webhooks for your keys (Bearer). GET …/:id/deliveries — delivery attempts & status. Register receivers with POST /api/webhooks using x-api-key.

API key management

Create keys from the dashboard or POST /api/auth/api-keys. Each row shows a masked preview by default. Use Show to load the full key (encrypted at rest when API_KEY_ENCRYPTION_SECRET is set), Hide to mask again, and Copy anytime. Revoked keys stop working immediately for x-api-key requests.

Data categories & history

GET /api/v1/market/latest returns enriched rows (24h high/low, market cap when supply exists) plus meta (source, latency_ms, cache_age_seconds, optional collected_at). GET /api/v1/market/summary — top gainers, losers, volume leaders, trending. GET /api/v1/market/ohlc?interval= — optional single-interval candle. GET /api/v1/chain/latest — flat metrics plus per-chain rollups, gas_gwei summary, rough TPS from block tx count. GET /api/v1/crypto/* — analytics module (candles, overview, asset metrics, gas multi, on-chain, token profile, DeFi/arbitrage/insights stubs). GET /api/v1/history?category=&series_key= — time series: crypto_price, gas, gas_aggregate, fx, uptime_latency, uptime_status. Friendly history: GET /api/crypto/history?symbol=BTC&range=24h, /api/gas/history?chain=ethereum&range=24h, /api/currency/history?base=USD&quote=GEL&range=7d, /api/uptime/history?domain=…, /api/latency/history?domain=…, /api/chain/history?network=ethereum&metric=gas_standard_gwei — range ∈ {1h,24h,7d,30d}, timestamps ISO-8601 UTC. Modular routes: /api/crypto/price (flat + enrichment + meta), /api/gas/fees (+ chains_enriched), /api/currency/rates (+ base_currency), /api/currency/pair?base=&quote=, /api/domain/check, /api/uptime/status. GET /api/v1/token/metadata — short scaffold; full profile at /api/v1/crypto/token/profile.

Internal / Collector API

The ingestion section below is for trusted collectors, ingestion services, and internal integrations. It is not required for normal read-only API consumers — do not confuse these Bearer-protected POST routes with the public product API that uses x-api-key.

Authenticated data ingestion

Trusted clients send userId in the body; it must match the user in the Bearer token. Used by collectors and integrations — not required for read-only public API access.

  • POST /api/client/connect, heartbeat, disconnectPOST /api/client/connect, heartbeat, disconnect — session status.
  • POST /api/market-data and /api/market-data/batchPOST /api/market-data and /api/market-data/batch — market rows.
  • POST /api/chain-metrics/batchPOST /api/chain-metrics/batch — on-chain snapshots.

Full request field lists are in the project README / OpenAPI if published.

GETSUCCESS

Public API v1 (API key)

Header: x-api-key: <your_key>. Keys are created in the dashboard after sign-in (POST /api/auth/api-keys). Example paths relative to https://coke-api.onrender.com:

MethodPathQueryWhat it returns
GET/api/v1/market/latest
optlimit
Paginated latest market rows with enrichment and meta.
GET/api/v1/market/ohlc
reqsymbolreqquoteoptinterval1m | 5m | 15m | 1h | 4h | 1d
OHLC snapshot: m1/m5/m15/h1/h4/d1 when the hosted collector filled Binance klines (m15/h4); optional interval= selects one candle and interval_resolved_from (falls back to 5m/1h if new columns empty).
GET/api/v1/market/summary
Leaders: gainers, losers, volume, trending buckets.
GET/api/v1/chain/latest
Latest on-chain metrics rollup (gas, TPS hints, per-chain blocks).
GET/api/v1/history
reqcategoryreqseries_keyoptlimit
Raw time-series catalog: category + series_key (e.g. crypto_price, gas_aggregate) + optional limit.
GET/api/v1/token/metadata
reqsymbol
docs.rowV1TokenMeta

Examples: GET /api/v1/history?category=crypto_price&series_key=Binance:BTC:USDT&limit=120 · GET /api/v1/history?category=gas_aggregate&series_key=ethereum&limit=120

Responses are JSON with the latest rows in the database (quotes, OHLC snapshot, on-chain metrics).

GETSUCCESS

Crypto analytics module (/api/v1/crypto/*)

Modular endpoints for history-style candles, market overview, multi-chain gas, on-chain snapshots, token risk scaffolding, DeFi/arbitrage/insights placeholders, and a one-call token profile. All require x-api-key. Responses include meta (latency_ms, source). Fields marked stub in JSON are reserved for external indexers.

MethodPathQueryWhat it returns
GET/api/v1/crypto/chains
Supported chain slugs (Ethereum, BSC, Arbitrum, Base, Polygon, Solana, Tron, Optimism) and rollout status.
GET/api/v1/crypto/market/overview
optnetworkoptcategory
Market overview: top gainers/losers, volatile names, volume leaders; optional network/category echo (filters activate when tagged data exists).
GET/api/v1/crypto/asset/metrics
optsymboldefault BTCoptquoteUSDT
Spot metrics: price, 24h change from tape, 7d/30d change from time-series when available, volume 24h, market cap; ATH/ATL null until archive wired.
GET/api/v1/crypto/candles
optsymboloptquotedefinterval1m | 5m | 15m | 1h | 4h | 1ddefrange7d · 1h | 24h | 7d | 30d
Synthetic OHLC buckets from crypto_price history plus latest snapshot OHLC for interval. interval 1m–1d; range 1h|24h|7d|30d.
GET/api/v1/crypto/gas/multi
Gas analytics per network from latest chain metrics (same engine as /api/gas/fees).
GET/api/v1/crypto/on-chain/network
defnetworkethereum
Per-network snapshot: metrics map, block hints, tx count, median gwei when present.
GET/api/v1/crypto/on-chain/whales
defnetworkoptmin_usd
Large-transfer feed schema (empty until indexer); min_usd filter.
GET/api/v1/crypto/on-chain/liquidity
defnetworkopttoken
Pool TVL/reserves/volume placeholder for DEX subgraph integration.
GET/api/v1/crypto/token/analyze
reqaddressdefnetworkethereum
Contract analysis scaffold: taxes, honeypot, ownership, mint/blacklist flags, risk score — nulls until simulation provider.
GET/api/v1/crypto/token/profile
reqaddressdefnetworkoptsymbolspot overlay
Single response merging optional spot overlay (symbol=), analysis stub, whales/liquidity stubs, socials/pair null.
GET/api/v1/crypto/defi/overview
Staking/farming/lending rate lists — stub for protocol aggregators.
GET/api/v1/crypto/arbitrage/hints
Cross-venue spreads and routes — stub for normalized CEX/DEX books.
GET/api/v1/crypto/insights/summary
Stub lists for advanced signals; includes from_collector (fear/greed from chain metrics + screener slices) when the worker fills data. Cached ~120s.

Whales, pool liquidity, token honeypot/tax checks, DeFi APY, arbitrage, and insight feeds return stable JSON shapes with stub: true until third-party or internal pipelines are connected — clients can integrate once without breaking changes.

Modular SaaS API

New routes (same x-api-key): /api/crypto/price, /api/crypto/history, /api/gas/fees, /api/gas/history, /api/currency/rates, /api/currency/pair, /api/currency/history, /api/domain/check?host=, /api/uptime/status?host=, /api/uptime/history?domain=, /api/latency/history?domain=, /api/chain/history, /api/supply/total?symbol=. Cached ~30–60s when Redis is configured.

In the module table, query parameters are tagged: req = required, opt = optional, def = default if omitted.

Module routes (all require x-api-key)

MethodPathQueryWhat it returns
GET/api/crypto/price
optsymboldefault BTC
Latest spot-style quote: price, 24h change, volume when available, exchange hint, nested meta (latency_ms, cache_age_seconds, confidence_score).
GET/api/crypto/history
optsymboldefault BTCoptquotedefrange24h · 1h | 24h | 7d | 30doptfromISO UTCopttoISO UTCoptlimitdefault 240 · max 500
Time series of prices for symbol (optional quote). range is optional (default 24h); allowed: 1h, 24h, 7d, 30d (UTC). Or pass from and to as ISO-8601 UTC instants instead of range (max window 90 days). Optional limit caps points (default 240, max 500).
GET/api/gas/fees
Snapshot of gas levels across chains (raw rows plus analytics / chains_enriched).
GET/api/gas/history
defchainethereumdefrange24h · 1h | 24h | 7d | 30doptfromISO UTCopttoISO UTCoptlimitdefault 240 · max 500
Historical gas aggregate for a chain; range optional (default 24h; 1h | 24h | 7d | 30d) or custom from/to (ISO UTC, max 90d). chain defaults to ethereum.
GET/api/currency/rates
Anchor currency and implied FX table (rates, samples, fiats) with meta.
GET/api/currency/pair
defbaseUSDdefquoteGEL
Single cross rate between base and quote (e.g. USD→GEL) derived from the same snapshot.
GET/api/currency/history
defbaseUSDdefquoteGELdefrange24h · 1h | 24h | 7d | 30doptfromISO UTCopttoISO UTCoptlimitdefault 240 · max 500
FX time series for a pair; range optional (default 24h) or custom from/to (ISO UTC, max 90d). base/quote default USD/GEL.
GET/api/domain/check
opthostoptdomaineither host or domain
DNS / SSL / redirect / expiry style checks for a host (host or domain query).
GET/api/domain/history
reqhosteither host or domaindefmetricuptime | latencydefrange24h · 1h | 24h | 7d | 30doptfromISO UTCopttoISO UTCoptlimitdefault 240 · max 500
Domain uptime or latency history in one route: metric=uptime|latency, host or domain (same aliases as /api/domain/check). range or from/to like other history endpoints.
GET/api/uptime/status
reqhost
Last uptime probe for host (up/down, latency, HTTP status).
GET/api/uptime/history
reqdomainor hostdefrange24h · 1h | 24h | 7d | 30doptfromISO UTCopttoISO UTCoptlimitdefault 240 · max 500
Uptime status over time; domain (or host) required; range optional (default 24h) or from/to (ISO UTC, max 90d).
GET/api/latency/history
reqdomainor hostdefrange24h · 1h | 24h | 7d | 30doptfromISO UTCopttoISO UTCoptlimitdefault 240 · max 500
Response-time history; domain (or host) required; range optional (default 24h) or from/to (ISO UTC, max 90d). Values in ms.
GET/api/chain/history
defnetworkethereum · or chaindefmetricgas_standard_gwei · or metricKeydefrange24h · 1h | 24h | 7d | 30doptfromISO UTCopttoISO UTCoptlimitdefault 240 · max 500
Chain metric history: network/chain (default ethereum), metric/metricKey (default gas_standard_gwei), range optional (default 24h) or from/to (ISO UTC, max 90d); optional limit.
GET/api/finance/macro
Macro & markets stub (inflation, rates, gold, indexes) — JSON scaffold with meta; fields fill as pipelines connect.
GET/api/supply/total
optsymboldefault BTC
Circulating / total supply style snapshot for a symbol when present in data.
GET/api/radar/token
opttokensymbol or addressoptchainethereum · defaultoptvolume_change_pctoptliquidity_change_pctoptholders_change_pctoptwhale_activitytrue|falseoptprice_momentum_pctopttoken_age_hoursoptrisk_score0–100opttransaction_speed_tpsopthigh_volatilitytrue|false
Early Warning System (EWS): analyzes token momentum and risk heuristics. Returns score (0–100), signal (POTENTIAL_PUMP | HIGH_RISK | SUSPICIOUS | STABLE), risk_level, confidence, warnings[], full metrics, rule contributions[], meta.ruleset_version. Optional query: token, chain (default ethereum), liquidity_change_pct, volume_change_pct, holders_change_pct, whale_activity, price_momentum_pct, token_age_hours, risk_score, transaction_speed_tps, high_volatility — omit any for deterministic synthetic demo values derived from token+chain.

Where you see range: omit it to use the server default (24h), or pass exactly one of 1h, 24h, 7d, 30d. Alternatively pass both from and to as ISO-8601 UTC (max span 90 days) instead of range. Timestamps in responses are ISO-8601 UTC. Other optional fields use documented defaults when omitted.

GETERROR
curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/crypto/price?symbol=BTC"

On Windows PowerShell, use curl.exe (not curl) so the real cURL runs, or use Invoke-RestMethod as in Quick start.

Required header: x-api-key

Query parameters

  • symbolBase asset symbol (e.g. BTC).

Example JSON

{
  "symbol": "BTC",
  "price": 71468.7,
  "quoteCurrency": "USDT",
  "current_price": 71468.7,
  "change_24h": 1.83,
  "volume_24h": 8590870823.1,
  "source": "market_data:Bybit",
  "exchange": "Bybit",
  "updated_at": "2026-04-08T22:10:26.229Z",
  "meta": {
    "latency_ms": 54,
    "cache_age_seconds": 30,
    "confidence_score": 0.85,
    "source": "market_data:Bybit"
  }
}

Typical status codes

  • 200OK
  • 400Bad request / validation
  • 401Missing or invalid API key
  • 403Forbidden — revoked/expired key, inactive plan, or blocked account.
  • 404Symbol or resource not found
  • 429Rate limit exceeded

Most errors return JSON: { "error": true, "message": "…" }.

History endpoints (examples)

Each route below returns a time series for charts. All require the x-api-key header. Query values are illustrative; substitute your own symbol, domain, or network.

Header on every request: x-api-key: YOUR_API_KEY

GET

GET /api/crypto/history

range — optional (default 24h). Allowed: 1h, 24h, 7d, 30d (UTC window). Or from + to (ISO UTC, max 90 days) instead of range. symbol — optional (default BTC). quote — optional (e.g. USDT). limit — optional (server default 240, max 500 points).

Example request

curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/crypto/history?symbol=BTC&quote=USDT&range=24h&limit=3"

Example JSON response

Each point.timestamp is ISO-8601 in UTC (…Z).

{
  "symbol": "BTC",
  "quote": "USDT",
  "series_key": "Binance:BTC:USDT",
  "range": "24h",
  "points": [
    {
      "timestamp": "2026-04-08T20:00:00.000Z",
      "value": 71234.56,
      "source": "market_data:Bybit"
    },
    {
      "timestamp": "2026-04-08T21:00:00.000Z",
      "value": 71380.12,
      "source": "market_data:Bybit"
    }
  ],
  "meta": {
    "source": "data_time_series",
    "updated_at": "2026-04-08T22:10:26.229Z",
    "latency_ms": 14,
    "cache_age_seconds": null,
    "confidence_score": 0.8
  }
}
GET

GET /api/gas/history

range — optional (default 24h). Allowed: 1h, 24h, 7d, 30d; or from + to (ISO UTC, max 90d). chain — optional (default ethereum). limit — optional (default 240, max 500).

Example request

curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/gas/history?chain=ethereum&range=24h&limit=3"

Example JSON response

Each point.timestamp is ISO-8601 in UTC (…Z).

{
  "chain": "ethereum",
  "series_key": "ethereum",
  "range": "24h",
  "points": [
    {
      "timestamp": "2026-04-08T21:00:00.000Z",
      "value": 28.4,
      "source": "chain_metrics_batch"
    }
  ],
  "meta": {
    "source": "data_time_series",
    "updated_at": "2026-04-08T22:10:26.229Z",
    "latency_ms": 9,
    "cache_age_seconds": null,
    "confidence_score": 0.75
  }
}
GET

GET /api/currency/history

range — optional (default 24h). Allowed: 1h, 24h, 7d, 30d; or from + to (ISO UTC, max 90d). base — optional (default USD). quote — optional (default GEL). limit — optional (default 240, max 500).

Example request

curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/currency/history?base=USD&quote=GEL&range=7d&limit=3"

Example JSON response

Each point.timestamp is ISO-8601 in UTC (…Z).

{
  "base_currency": "USD",
  "quote_currency": "GEL",
  "series_key": "USD:GEL",
  "range": "7d",
  "points": [
    {
      "timestamp": "2026-04-07T00:00:00.000Z",
      "value": 2.705,
      "source": "fx_snapshot"
    },
    {
      "timestamp": "2026-04-08T00:00:00.000Z",
      "value": 2.712,
      "source": "fx_snapshot"
    }
  ],
  "meta": {
    "source": "data_time_series",
    "updated_at": "2026-04-08T22:10:26.229Z",
    "latency_ms": 11,
    "cache_age_seconds": null,
    "confidence_score": 0.7
  }
}
GET

GET /api/uptime/history

domain — required (or use host as an alias in the query string). range — optional (default 24h). Allowed: 1h, 24h, 7d, 30d; or from + to (ISO UTC, max 90d). limit — optional (default 240, max 500).

Example request

curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/uptime/history?domain=example.com&range=24h&limit=3"

Example JSON response

Each point.timestamp is ISO-8601 in UTC (…Z).

{
  "domain": "example.com",
  "range": "24h",
  "points": [
    {
      "timestamp": "2026-04-08T21:45:00.000Z",
      "value": 1,
      "source": "uptime_probe"
    }
  ],
  "meta": {
    "source": "data_time_series",
    "updated_at": "2026-04-08T22:10:26.229Z",
    "latency_ms": 6,
    "cache_age_seconds": null,
    "confidence_score": null
  }
}
GET

GET /api/latency/history

domain — required (or host alias). range — optional (default 24h). Allowed: 1h, 24h, 7d, 30d; or from + to (ISO UTC, max 90d). limit — optional (default 240, max 500). Response includes unit: "ms" for point values.

Example request

curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/latency/history?domain=example.com&range=24h&limit=3"

Example JSON response

Each point.timestamp is ISO-8601 in UTC (…Z).

{
  "domain": "example.com",
  "range": "24h",
  "unit": "ms",
  "points": [
    {
      "timestamp": "2026-04-08T21:50:00.000Z",
      "value": 142,
      "source": "latency_probe"
    }
  ],
  "meta": {
    "source": "data_time_series",
    "updated_at": "2026-04-08T22:10:26.229Z",
    "latency_ms": 5,
    "cache_age_seconds": null,
    "confidence_score": null
  }
}
GET

GET /api/chain/history

range — optional (default 24h). Allowed: 1h, 24h, 7d, 30d; or from + to (ISO UTC, max 90d). network — optional (default ethereum); chain is accepted as an alias. metric — optional (default gas_standard_gwei); metricKey is accepted as an alias. limit — optional (default 240, max 500).

Example request

curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/chain/history?network=ethereum&metric=gas_standard_gwei&range=24h&limit=3"

Example JSON response

Each point.timestamp is ISO-8601 in UTC (…Z).

{
  "chain": "ethereum",
  "metric_key": "gas_standard_gwei",
  "range": "24h",
  "points": [
    {
      "timestamp": "2026-04-08T21:55:00.000Z",
      "value": 31.2,
      "source": "chain_metric_row"
    }
  ],
  "meta": {
    "source": "chain_metric_history",
    "updated_at": "2026-04-08T22:10:26.229Z",
    "latency_ms": 10,
    "cache_age_seconds": null,
    "confidence_score": 0.85
  }
}
GET

GET /api/domain/history

host — required (domain is an alias). metric — optional (default uptime): uptime | latency. range — optional (default 24h) or use from/to (ISO UTC, max 90d) like other history routes. limit — optional.

Example request

curl -sS -H "x-api-key: YOUR_API_KEY" "https://coke-api.onrender.com/api/domain/history?host=example.com&metric=uptime&range=24h&limit=3"

Example JSON response

Each point.timestamp is ISO-8601 in UTC (…Z).

{
  "host": "example.com",
  "metric": "uptime",
  "range": "24h",
  "from": "2026-04-07T22:10:26.229Z",
  "to": "2026-04-08T22:10:26.229Z",
  "series_key": "uptime:example.com",
  "points": [
    {
      "timestamp": "2026-04-08T21:45:00.000Z",
      "value": 1,
      "source": "uptime_probe",
      "meta": null
    }
  ],
  "meta": {
    "source": "data_time_series",
    "updated_at": "2026-04-08T22:10:26.229Z",
    "latency_ms": 8,
    "cache_age_seconds": null,
    "confidence_score": 0.65
  }
}

Common mistakes

  • Using Authorization: Bearer where the product API expects x-api-key (or the reverse). Dashboard session token ≠ API key.
  • Putting the API key in the query string (?api_key=…) — use the x-api-key header only.
  • Reusing an old key after revoke or rotation; revoked keys stop working immediately.
  • On Windows PowerShell, typing curl runs Invoke-WebRequest — use curl.exe or Invoke-RestMethod (see Quick start).
  • Invalid range when not using a custom window — allowed tokens are 1h, 24h, 7d, 30d, or pass both from and to as ISO-8601 UTC (max 90 days) instead of range.
  • Omitting domain (or host) on /api/uptime/history or /api/latency/history — both require a non-empty domain/host.
  • Treating POST /api/market-data or /api/client/* as public read API — those are internal/collector routes with Bearer, not x-api-key.

Limits & security

Each key inherits your SaaS plan: per-minute (RPM) and daily caps reset at UTC midnight. Typical defaults: Free — 1,000 requests/day, 60 RPM; Pro — 100,000/day, 120 RPM; Business — no fixed daily ceiling, 300 RPM. Exact numbers follow the ApiPlan row linked to your key. Over limit returns 429. Store keys in environment variables.

  • Daily and calendar limits reset at the UTC day boundary (midnight UTC), not your local timezone.
  • Plan limits (RPM, daily cap, optional monthly cap) apply per API key, not per account.
  • Revoked or inactive keys are rejected immediately with 403 — there is no grace period.

The hosted collector worker (server-side collectorWorker — COLLECTOR_ENABLED=1 and/or the separate worker process, e.g. npm run start:worker) POSTs market and chain batches to /api/market-data/batch and /api/chain-metrics/batch; the server appends time-series points for history routes and dashboard sparklines. Run it 24/7 if you want full charts.

Example error bodies (JSON)

401 — missing header or unknown key:

{
  "error": true,
  "message": "x-api-key required"
}
{
  "error": true,
  "message": "Invalid API key"
}

403 — inactive / expired key, inactive plan, or blocked account (message varies):

{
  "error": true,
  "message": "API key inactive"
}

Other 403 messages include: "API key expired", "Account blocked".

429 — per-minute, daily, or monthly quota exceeded:

{
  "error": true,
  "message": "Rate limit exceeded"
}

410 Gone may appear when revealing an API key that was issued before encrypted storage — create a new key. Store x-api-key only in secrets / env vars on servers you control.

Alerts, webhooks, usage, screener, radar (EWS)

User alerts (Bearer), webhooks for alert.triggered, usage analytics, and /api/screener/crypto, /api/radar/token. Alert types price, gas, uptime, latency are evaluated today; volume_spike, liquidity_drop, whale_notional, new_pair, risk_score_change are accepted and reserved for upcoming data feeds.

/api/alerts (Bearer): create/list/delete user alerts.

/api/account/webhooks (Bearer): register/list/delete webhook URLs for alert notifications.

/api/account/usage (Bearer): requests today/month, avg latency, error rate.

/api/screener/crypto (x-api-key): top gainers, losers, most volatile, highest volume.

/api/radar/token (x-api-key): EWS — score 0–100, signal & risk_level & confidence & warnings; optional query metrics or synthetic demo from token+chain.

Alert worker runs every 30 seconds and sends alert.triggered webhook events with retries.

Dashboard

Sign up or log in — create or revoke API keys in your account.