API reference · CoinGecko

coingecko/coins-markets

Integrate this model through SandBase's unified API, with production-ready schemas and examples.

APISynchronousOpen model
Production endpoint

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

POSThttps://api.sandbase.ai/v1/api/coingecko/coins-markets
Model IDcoingecko/coins-markets
01

Input Schema

14 parameters · 1 required · 13 optional

ParameterTypeRequiredDescription
vs_currencystringRequiredTarget currency of coins and market data. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies) · Default: "usd"
idsstringOptionalCoins' IDs, comma-separated if querying more than 1 coin. *refers to [`/coins/list`](/reference/coins-list) · Default: "bitcoin"
pageintegerOptionalPage through results. Default: 1
namesstringOptionalCoins' names, comma-separated if querying more than 1 coin. · Default: "Bitcoin"
orderstringOptionalSort result by field. Default: market_cap_desc · Options: market_cap_asc, market_cap_desc, volume_asc, volume_desc, id_asc, id_desc
market_cap_ascmarket_cap_descvolume_ascvolume_descid_ascid_desc
localestringOptionalLanguage background. Default: en · Options: ar, bg, cs, da, de, el, en, es, fi, fr, he, hi, hr, hu, id, it, ja, ko, lt, nl, no, pl, pt, ro, ru, sk, sl, sv, th, tr, uk, vi, zh, zh-tw
arbgcsdadeelenesfifrhehihrhuiditjakoltnlnoplptroruskslsvthtrukvizhzh-tw
symbolsstringOptionalCoins' symbols, comma-separated if querying more than 1 coin. · Default: "btc"
categorystringOptionalFilter based on coins' category. *refers to [`/coins/categories/list`](/reference/coins-categories-list)
per_pageintegerOptionalTotal results per page. Default: 100 Valid values: 1...250
precisionstringOptionalDecimal places for currency price value · Options: full, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
full0123456789101112131415161718
sparklinebooleanOptionalInclude sparkline 7-day data. Default: false
include_tokensstringOptionalFor `symbols` lookups, specify `all` to include all matching tokens. Default `top` returns top-ranked tokens by market cap or volume. · Options: top, all
topall
include_rehypothecatedbooleanOptionalInclude rehypothecated tokens in results. When true, returns `market_cap_rank_with_rehypothecated` field. Default: false
price_change_percentagestringOptionalInclude price change percentage timeframe, comma-separated if querying more than 1 timeframe. Valid values: `1h`, `24h`, `7d`, `14d`, `30d`, `200d`, `1y`
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description
03

Code Examples

Ready-to-run snippets

const apiKey = process.env.SANDBASE_API_KEY;
const response = await fetch("https://api.sandbase.ai/v1/api/coingecko/coins-markets", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "ids": "bitcoin",
    "names": "Bitcoin",
    "symbols": "btc",
    "vs_currency": "usd"
  }),
});

if (!response.ok) throw new Error(await response.text());
console.log(await response.json());