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 | null
    Latest valid trade price. May be present even when data_status is partial.
  • last_pricenumber | null
    Latest trade price of the current session; same meaning as price.
  • price_change_24hnumber | null
    Absolute price change over the trailing 24 hours. Crypto only — for stocks use session_change_amount / session_change_pct.
  • price_change_24h_absolutenumber | null
    Absolute price change over the trailing 24 hours. Crypto only.
  • price_change_24h_percentnumber | null
    Percent price change over the trailing 24 hours. Crypto only — for stocks use session_change_pct.
  • volume_24hnumber | null
    Cumulative traded quantity over the trailing 24 hours. Crypto only — for stocks use volume / turnover.
  • volume_24h_unitstring | null
    Unit of volume_24h, for example quote-currency notional. Crypto only.
  • amplitudenumber | null
    Intraday amplitude percent = (day high − day low) / previous close × 100. Null when day high/low or previous close is unavailable.
  • open_pricenumber | null
    First valid trade price of the current session.
  • high_pricenumber | null
    Highest trade price of the current session.
  • low_pricenumber | null
    Lowest trade price of the current session.
  • prev_close_pricenumber | null
    Previous trading day close, used as the baseline for change calculations.
  • volumenumber | null
    Cumulative traded quantity in the statistics window, in shares or coins. This is quantity, not value — see turnover for value.
  • turnovernumber | null
    Cumulative traded value in the statistics window, approximately quantity × trade price.
  • avg_pricenumber | null
    Average trade price = turnover ÷ volume. Null when either input is unavailable.
  • volume_rationumber | null
    Current trading volume relative to its historical average. Null with volume_ratio_unavailable_live when no volume-ratio source is available.
  • day_opennumber | null
    Session-day open price, counted per trading day rather than a rolling 24 hours.
  • day_highnumber | null
    Session-day high price, counted per trading day.
  • day_lownumber | null
    Session-day low price, counted per trading day.
  • day_volumenumber | null
    Cumulative traded quantity for the trading day. For stocks prefer this over volume_24h, which is a rolling window.
  • day_turnovernumber | null
    Cumulative traded value for the trading day.
  • session_change_pctnumber | null
    Percent change of the current session versus the previous close. Different from price_change_24h, which is a rolling 24-hour window.
  • session_change_amountnumber | null
    Absolute change amount of the current session versus the previous close.
  • bid_pricenumber | null
    Best bid price at the top of the book. Stock quotes may return a null size with order_book_size_unavailable.
  • ask_pricenumber | null
    Best ask price at the top of the book. Stock quotes may return a null size with order_book_size_unavailable.
  • best_bidnumber | null
    Best bid price; same meaning as bid_price.
  • best_asknumber | null
    Best ask price; same meaning as ask_price.
  • bid_volumenumber | null
    Quantity available at the best bid. Usually null for stock quotes.
  • ask_volumenumber | null
    Quantity available at the best ask. Usually null for stock quotes.
  • mid_pricenumber | null
    Mid of bid/ask when both sides present: (bid + ask) / 2.
  • spread_bpsnumber | null
    Bid-ask spread in basis points relative to mid_price.
  • listing_idstring | null
    Listing id resolved by the server. Omitted when the listing cannot be identified; treat it as unavailable rather than deriving one.
  • venue_idstring | null
    Trading venue id resolved by the server. Treat as unavailable when absent rather than deriving one.
  • tickerstring
    Display ticker or symbol, for example AAPL or BTC.
  • marketstring
    Market code supported by this endpoint (crypto | us_equity | hk_equity).
  • market_sessionstring
    Current trading session phase of the market.
    Enum values
    • pre_marketPre-market session
    • regularRegular trading hours
    • post_marketAfter-hours / post-market
    • closedMarket closed
    • unknownSession unknown
  • snapshot_typestring
    Aggregation scope of this snapshot. Omitted for a single-listing crypto snapshot.
    Enum values
    • multi_venueAggregated across multiple trading venues; venue_quotes has 2 or more rows
    • single_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_idstring
    Listing id of this quote row, resolved by the server
  • venue_quotes[].venue_idstring
    Trading venue id of this quote row, resolved by the server
  • venue_quotes[].pricenumber
    Latest trade price on this venue
  • venue_quotes[].volumenumber | null
    Traded quantity on this venue
  • venue_quotes[].volume_24hnumber | null
    Trailing 24-hour traded quantity on this venue, when available
  • venue_quotes[].updated_atiso8601
    Quote time for this venue (UTC ISO-8601)
  • field_sourcesobject
    Maps each field to the kind of source it came from, for example live:session, live:orderbook, or live:day.
  • updated_atiso8601 | null
    Time this quote or response was last updated (UTC ISO-8601).
  • as_of_utciso8601 | null
    Time the quote occurred at the source (UTC ISO-8601). Used to compute source_delay_seconds.
  • source_delay_secondsnumber | null
    How 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 | null
    Order-book snapshot time, returned separately when it differs from the last trade time.
  • data_statusstring
    Availability of the business data. Check it before using any numeric field.
    Enum values
    • readyData is complete and usable
    • partialSome fields are missing; price and top-of-book may still be usable
    • staleSource delay above the threshold; see source_delay_seconds
    • no_dataRequest succeeded with no result; unknown ticker returns empty_reason=object_not_found
    • not_readyThis data domain is not open yet
  • metadata.data_statusstring
    Availability of the business data. Same values as the top-level data_status.
    Enum values
    • readyData is complete and usable
    • partialSome fields are missing; price and top-of-book may still be usable
    • staleSource delay above the threshold
    • no_dataRequest succeeded with no result; unknown ticker returns empty_reason=object_not_found
    • not_readyThis data domain is not open yet
  • metadata.partialboolean
    True when the response is expected to be incomplete, matching data_status=partial.
  • metadata.limitationsstring[] | null
    Known 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 | null
    Time this response was assembled (UTC ISO-8601). May differ slightly from updated_at in the body.
  • empty_reasonstring
    Reason code when there is no data, for example object_not_found or snapshot_expired.
  • reasonstring
    Human-readable explanation for why there is no data.
  • next_actionstring
    Suggested next step when there is no data.
  • try_paramsobject
    Echo of the query parameters used for this request, for example query and market.
  • metadata.object_refs[]object[]
    Unified object references
  • object_refs[].typestring
    Object reference type
  • object_refs[].idstring
    Canonical object identifier
  • object_refs[].entity_idstring
    Canonical entity identifier
  • object_refs[].asset_idstring
    Canonical asset identifier
  • object_refs[].listing_idstring
    Canonical listing identifier
  • object_refs[].instrument_idstring
    Canonical financial instrument identifier
  • object_refs[].venue_idstring
    Canonical trading venue identifier
  • object_refs[].event_refstring
    Related event identifier
  • object_refs[].market_idstring
    Canonical market object identifier
  • object_refs[].venuestring
    Related platform code
  • object_refs[].resolved_fromstring
    Input used to resolve the object
  • object_refs[].resolution_confidencestring
    Object resolution confidence
  • metadata.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