Skip to content
Start Trading

Get Snapshots

MarketDataGetSnapshotsResponse v1().instrumentData().marketData().getSnapshots(MarketDataGetSnapshotsParamsparams = MarketDataGetSnapshotsParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/v1/market-data/snapshot

Get market data snapshots for one or more securities.

ParametersExpand Collapse
MarketDataGetSnapshotsParams params
Optional<List<String>> instrumentIds

Comma-separated instrument identifiers.

ReturnsExpand Collapse
class MarketDataGetSnapshotsResponse:
String instrumentId

Unique instrument identifier.

String symbol

Display symbol for the security.

Optional<Long> cumulativeVolume

Cumulative traded volume reported on the most recent trade, in shares for equities or contracts for options. Absent when no trade is available. When a null/undefined value is observed, it indicates that there is no available data.

formatint64
minimum0
Optional<SnapshotGreeks> greeks

Theoretical price and Greeks for option instruments. None for equities, and for options whose Greeks have not yet been observed When a null/undefined value is observed, it indicates that there is no available data.

String delta

Delta: ∂V/∂S, range [-1, 1].

String gamma

Gamma: ∂²V/∂S².

String iv

Implied volatility, annualized (0.20 == 20%).

String rho

Rho per 1.0 rate point.

String theoPrice

Theoretical option price in USD per share.

String theta

Theta per trading day.

LocalDateTime timestamp

Timestamp when the Greeks were calculated.

formatdate-time
String vega

Vega per 1.0 vol point.

Optional<SnapshotQuote> lastQuote

Most recent quote if available. When a null/undefined value is observed, it indicates that there is no available data.

Optional<String> ask

Current best ask. Absent when no ask is available (one-sided quote). When a null/undefined value is observed, it indicates that there is no available data.

Optional<Long> askSize

Size at the best ask, in shares. When a null/undefined value is observed, it indicates that there is no available data.

formatint32
minimum0
Optional<String> bid

Current best bid. Absent when no bid is available (one-sided quote). When a null/undefined value is observed, it indicates that there is no available data.

Optional<Long> bidSize

Size at the best bid, in shares. When a null/undefined value is observed, it indicates that there is no available data.

formatint32
minimum0
Optional<String> midpoint

Midpoint of bid and ask. Absent when either side is missing. When a null/undefined value is observed, it indicates that there is no available data.

Optional<SnapshotLastTrade> lastTrade

Most recent last-sale trade if available. When a null/undefined value is observed, it indicates that there is no available data.

String price

Most recent last-sale eligible trade price.

long size

Share quantity of the most recent last-sale eligible trade.

formatint32
minimum0
Optional<String> name

Security name if available. When a null/undefined value is observed, it indicates that there is no available data.

Optional<SnapshotSession> session

Session metrics computed from previous close and last trade, if available. When a null/undefined value is observed, it indicates that there is no available data.

String change

Absolute change from previous close to last trade.

String changePercent

Percent change from previous close to last trade.

String previousClose

Previous session close price.

Get Snapshots

package com.clearstreet.api.example;

import com.clearstreet.api.client.ClearStreetClient;
import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
import com.clearstreet.api.models.v1.instrumentdata.marketdata.MarketDataGetSnapshotsParams;
import com.clearstreet.api.models.v1.instrumentdata.marketdata.MarketDataGetSnapshotsResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        ClearStreetClient client = ClearStreetOkHttpClient.builder()
            .fromEnv()
            .apiKey("My API Key")
            .build();

        MarketDataGetSnapshotsResponse response = client.v1().instrumentData().marketData().getSnapshots();
    }
}
{
  "data": [
    {
      "cumulative_volume": 12345678,
      "instrument_id": "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8",
      "last_quote": {
        "ask": "210.14",
        "ask_size": 120,
        "bid": "210.10",
        "bid_size": 100,
        "midpoint": "210.12"
      },
      "last_trade": {
        "price": "210.12",
        "size": 150
      },
      "name": "Apple Inc.",
      "session": {
        "change": "1.82",
        "change_percent": "0.8737",
        "previous_close": "208.30"
      },
      "symbol": "AAPL"
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "2d0c9159-8f5d-49ca-a861-0d8346fd11da"
  }
}
{
  "error": {
    "code": 400,
    "message": "At least one instrument_id is required"
  },
  "metadata": {
    "request_id": "3af8662e-2dd9-4c59-8d32-7c167377fb8f"
  }
}
{
  "error": {
    "code": 404,
    "message": "Instrument not found for id `a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8`"
  },
  "metadata": {
    "request_id": "95683d84-2863-43f0-8f0a-63537c3cef85"
  }
}
Returns Examples
{
  "data": [
    {
      "cumulative_volume": 12345678,
      "instrument_id": "a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8",
      "last_quote": {
        "ask": "210.14",
        "ask_size": 120,
        "bid": "210.10",
        "bid_size": 100,
        "midpoint": "210.12"
      },
      "last_trade": {
        "price": "210.12",
        "size": 150
      },
      "name": "Apple Inc.",
      "session": {
        "change": "1.82",
        "change_percent": "0.8737",
        "previous_close": "208.30"
      },
      "symbol": "AAPL"
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "2d0c9159-8f5d-49ca-a861-0d8346fd11da"
  }
}
{
  "error": {
    "code": 400,
    "message": "At least one instrument_id is required"
  },
  "metadata": {
    "request_id": "3af8662e-2dd9-4c59-8d32-7c167377fb8f"
  }
}
{
  "error": {
    "code": 404,
    "message": "Instrument not found for id `a1a2a3a4-b1b2-c1c2-d1d2-d3d4d5d6d7d8`"
  },
  "metadata": {
    "request_id": "95683d84-2863-43f0-8f0a-63537c3cef85"
  }
}