API reference · CoinGecko
coingecko/coins-markets
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/api/coingecko/coins-marketsModel ID
coingecko/coins-markets01
Input Schema
14 parameters · 1 required · 13 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
vs_currency | string | Required | Target currency of coins and market data. *refers to [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies) · Default: "usd" |
ids | string | Optional | Coins' IDs, comma-separated if querying more than 1 coin. *refers to [`/coins/list`](/reference/coins-list) · Default: "bitcoin" |
page | integer | Optional | Page through results. Default: 1 |
names | string | Optional | Coins' names, comma-separated if querying more than 1 coin. · Default: "Bitcoin" |
order | string | Optional | Sort 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 |
locale | string | Optional | Language 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 |
symbols | string | Optional | Coins' symbols, comma-separated if querying more than 1 coin. · Default: "btc" |
category | string | Optional | Filter based on coins' category. *refers to [`/coins/categories/list`](/reference/coins-categories-list) |
per_page | integer | Optional | Total results per page. Default: 100 Valid values: 1...250 |
precision | string | Optional | Decimal 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 |
sparkline | boolean | Optional | Include sparkline 7-day data. Default: false |
include_tokens | string | Optional | For `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_rehypothecated | boolean | Optional | Include rehypothecated tokens in results. When true, returns `market_cap_rank_with_rehypothecated` field. Default: false |
price_change_percentage | string | Optional | Include price change percentage timeframe, comma-separated if querying more than 1 timeframe. Valid values: `1h`, `24h`, `7d`, `14d`, `30d`, `200d`, `1y` |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-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());