Simple Template · Latest Crypto Price Snapshot
Use case 2: Latest Crypto Price Snapshot
One request for live price, 24h change, and volume on BTC / ETH / SOL — MarketOK schema shared with Docs.
Use this template when
- Show a live coin price in a page or bot
- Add a price field to a dashboard or alert
- First call to verify an API Key
Audience: Developers, quant teams, market products
Output previewStatic sample · not live
BTC / USD-394.26 (24h)
$62,580.20
Vol 24h · $494.7M · ready
gatebinanceokx
Sign in to load a live response. Static sample is shown until then.
API / MCP
The same template supports REST, Python, and MCP Prompt. Pick the entry you know.
import requests
url = "https://api.gatedata.ai/api/v1/markets/snapshot?query=BTC&market=crypto"
r = requests.get(url, headers={"Authorization": "Bearer gd_live_…"}, timeout=10)
r.raise_for_status()
data = r.json()
print(data.get("price"), data.get("price_change_24h"))Inputs
Changing parameters updates the code samples and request URL. Defaults are one-click runnable for live templates.
GET/api/v1/markets/snapshot?query=BTC&market=crypto
Output & interpretation
Static sample responseStatic sample · not live
{
"data_status": "ready",
"listing_id": "listing_gate_BTC_USDT_spot",
"metadata": {
"object_refs": [
{
"type": "asset",
"id": "asset_btc",
"asset_id": "asset_btc",
"resolved_from": "asset_entity",
"resolution_confidence": "resolved"
},
{
"type": "instrument",
"id": "instrument_btc_usdt_spot",
"asset_id": "asset_btc",
"instrument_id": "instrument_btc_usdt_spot",
"resolved_from": "asset_entity",
"resolution_confidence": "resolved"
},
{
"type": "listing",
"id": "listing_gate_BTC_USDT_spot",
"asset_id": "asset_btc",
"instrument_id": "instrument_btc_usdt_spot",
"listing_id": "listing_gate_BTC_USDT_spot",
"venue_id": "venue_gate",
"resolved_from": "asset_entity",
"resolution_confidence": "resolved"
}
],
"updated_at": "2026-08-17T17:07:11Z",
"data_status": "ready",
"limitations": []
},
"price": 64079.8,
"price_change_24h": 813.8134600000001,
"price_change_24h_absolute": 813.8134600000001,
"price_change_24h_percent": 1.27,
"updated_at": "2026-08-17T17:07:11.560722597Z",
"venue_id": "venue_gate",
"volume_24h": 263668502.3634611,
"volume_24h_unit": "quote"
}Field notes
pricenumber | nullLatest valid trade price. May be present even when data_status is partial.last_pricenumber | nullLatest trade price of the current session; same meaning as price.price_change_24hnumber | nullAbsolute price change over the trailing 24 hours. Crypto only — for stocks use session_change_amount / session_change_pct.price_change_24h_absolutenumber | nullAbsolute price change over the trailing 24 hours. Crypto only.price_change_24h_percentnumber | nullPercent price change over the trailing 24 hours. Crypto only — for stocks use session_change_pct.volume_24hnumber | nullCumulative traded quantity over the trailing 24 hours. Crypto only — for stocks use volume / turnover.volume_24h_unitstring | nullUnit of volume_24h, for example quote-currency notional. Crypto only.amplitudenumber | nullIntraday amplitude percent = (day high − day low) / previous close × 100. Null when day high/low or previous close is unavailable.open_pricenumber | nullFirst valid trade price of the current session.high_pricenumber | nullHighest trade price of the current session.low_pricenumber | nullLowest trade price of the current session.prev_close_pricenumber | nullPrevious trading day close, used as the baseline for change calculations.volumenumber | nullCumulative traded quantity in the statistics window, in shares or coins. This is quantity, not value — see turnover for value.turnovernumber | nullCumulative traded value in the statistics window, approximately quantity × trade price.avg_pricenumber | nullAverage trade price = turnover ÷ volume. Null when either input is unavailable.volume_rationumber | nullCurrent trading volume relative to its historical average. Null with volume_ratio_unavailable_live when no volume-ratio source is available.day_opennumber | nullSession-day open price, counted per trading day rather than a rolling 24 hours.day_highnumber | nullSession-day high price, counted per trading day.day_lownumber | nullSession-day low price, counted per trading day.day_volumenumber | nullCumulative traded quantity for the trading day. For stocks prefer this over volume_24h, which is a rolling window.day_turnovernumber | nullCumulative traded value for the trading day.session_change_pctnumber | nullPercent change of the current session versus the previous close. Different from price_change_24h, which is a rolling 24-hour window.session_change_amountnumber | nullAbsolute change amount of the current session versus the previous close.bid_pricenumber | nullBest bid price at the top of the book. Stock quotes may return a null size with order_book_size_unavailable.ask_pricenumber | nullBest ask price at the top of the book. Stock quotes may return a null size with order_book_size_unavailable.best_bidnumber | nullBest bid price; same meaning as bid_price.best_asknumber | nullBest ask price; same meaning as ask_price.bid_volumenumber | nullQuantity available at the best bid. Usually null for stock quotes.ask_volumenumber | nullQuantity available at the best ask. Usually null for stock quotes.mid_pricenumber | nullMid of bid/ask when both sides present: (bid + ask) / 2.spread_bpsnumber | nullBid-ask spread in basis points relative to mid_price.listing_idstring | nullListing id resolved by the server. Omitted when the listing cannot be identified; treat it as unavailable rather than deriving one.venue_idstring | nullTrading venue id resolved by the server. Treat as unavailable when absent rather than deriving one.tickerstringDisplay ticker or symbol, for example AAPL or BTC.marketstringMarket code supported by this endpoint (crypto | us_equity | hk_equity).market_sessionstringCurrent trading session phase of the market.Enum valuespre_marketPre-market sessionregularRegular trading hourspost_marketAfter-hours / post-marketclosedMarket closedunknownSession unknown
snapshot_typestringAggregation scope of this snapshot. Omitted for a single-listing crypto snapshot.Enum valuesmulti_venueAggregated across multiple trading venues; venue_quotes has 2 or more rowssingle_venueScoped to a single listing; venue_quotes has at most one row
venue_quotes[]object[]Per-venue quote rows. Omitted for a single-listing crypto snapshot; for stocks it appears only when the listing or venue can be identified.venue_quotes[].listing_idstringListing id of this quote row, resolved by the servervenue_quotes[].venue_idstringTrading venue id of this quote row, resolved by the servervenue_quotes[].pricenumberLatest trade price on this venuevenue_quotes[].volumenumber | nullTraded quantity on this venuevenue_quotes[].volume_24hnumber | nullTrailing 24-hour traded quantity on this venue, when availablevenue_quotes[].updated_atiso8601Quote time for this venue (UTC ISO-8601)field_sourcesobjectMaps each field to the kind of source it came from, for example live:session, live:orderbook, or live:day.updated_atiso8601 | nullTime this quote or response was last updated (UTC ISO-8601).as_of_utciso8601 | nullTime the quote occurred at the source (UTC ISO-8601). Used to compute source_delay_seconds.source_delay_secondsnumber | nullHow stale the quote is, in seconds (now − as_of_utc/updated_at). Within regular trading hours, a delay above the threshold sets data_status to stale and adds quote_source_latency_high to limitations.snapshot_timeiso8601 | nullOrder-book snapshot time, returned separately when it differs from the last trade time.data_statusstringAvailability of the business data. Check it before using any numeric field.Enum valuesreadyData is complete and usablepartialSome fields are missing; price and top-of-book may still be usablestaleSource delay above the threshold; see source_delay_secondsno_dataRequest succeeded with no result; unknown ticker returns empty_reason=object_not_foundnot_readyThis data domain is not open yet
metadata.data_statusstringAvailability of the business data. Same values as the top-level data_status.Enum valuesreadyData is complete and usablepartialSome fields are missing; price and top-of-book may still be usablestaleSource delay above the thresholdno_dataRequest succeeded with no result; unknown ticker returns empty_reason=object_not_foundnot_readyThis data domain is not open yet
metadata.partialbooleanTrue when the response is expected to be incomplete, matching data_status=partial.metadata.limitationsstring[] | nullKnown data limitations for this response, for example order_book_size_unavailable, volume_ratio_unavailable_live, quote_source_latency_high, or snapshot_stale.metadata.missing_fieldsstring[]Names of fields known to be missing, for example price_change_24h, volume_24h, bid_size.metadata.updated_atiso8601 | nullTime this response was assembled (UTC ISO-8601). May differ slightly from updated_at in the body.empty_reasonstringReason code when there is no data, for example object_not_found or snapshot_expired.reasonstringHuman-readable explanation for why there is no data.next_actionstringSuggested next step when there is no data.try_paramsobjectEcho of the query parameters used for this request, for example query and market.metadata.object_refs[]object[]Unified object referencesobject_refs[].typestringObject reference typeobject_refs[].idstringCanonical object identifierobject_refs[].entity_idstringCanonical entity identifierobject_refs[].asset_idstringCanonical asset identifierobject_refs[].listing_idstringCanonical listing identifierobject_refs[].instrument_idstringCanonical financial instrument identifierobject_refs[].venue_idstringCanonical trading venue identifierobject_refs[].event_refstringRelated event identifierobject_refs[].market_idstringCanonical market object identifierobject_refs[].venuestringRelated platform codeobject_refs[].resolved_fromstringInput used to resolve the objectobject_refs[].resolution_confidencestringObject resolution confidencemetadata.limitations includes listing_id_unavailable_source_code_onlystring (limitation token)The listing could not be identified, so object_refs may be empty while a price is still returned.
How to read results
- Check metadata.data_status before reading price
- Use updated_at when comparing quotes
- Compare venue_quotes for cross-exchange spread
Boundaries & next steps
Do NOT use for
- Does not return order-book depth
- Does not provide trading advice
Common boundaries & status
- metadata.data_status may be ready / partial / stale / no_data
- Guide / API Reference / Playground share MARKETS_SNAPSHOT_* contract