ThetaData Snapshot API

The Snapshot API from ThetaData — 17 operation(s) for snapshot.

OpenAPI Specification

thetadata-snapshot-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Theta Data v3 At-Time Snapshot API
  description: Real-time and historic stock, options, and index data!
  version: 3.0.0
  x-java-package: net.thetadata.generated
servers:
- url: http://127.0.0.1:25503/v3
  description: dev
security: []
tags:
- name: Snapshot
paths:
  /stock/snapshot/ohlc:
    x-skip-concurrent-limit: true
    x-min-subscription: value
    x-symbol-wildcard: true
    get:
      summary: Open High Low Close
      operationId: stock_snapshot_ohlc
      x-codeSamples:
      - lang: Python
        label: pandas
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''pandas'')

          df = client.stock_snapshot_ohlc(symbol=[''AAPL''])

          '
      - lang: Python
        label: polars
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''polars'')

          df = client.stock_snapshot_ohlc(symbol=[''AAPL''])

          '
      tags:
      - Snapshot
      description: '

        Provides a real-time Open, High, Low, Close for the current day.

        * Returns a real-time session OHLC from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).

        * Returns a 15-minute delayed session OHLC from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs) if the account has the stocks value subscription.

        * Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.

        '
      x-sample-urls:
      - url: http://127.0.0.1:25503/v3/stock/snapshot/ohlc?symbol=*
        description: Returns OHLC for stocks for all symbols
      - url: http://127.0.0.1:25503/v3/stock/snapshot/ohlc?symbol=AAPL&venue=nqb
        description: Returns OHLC for a given stock trade from the Nasdaq Basic feed
      - url: http://127.0.0.1:25503/v3/stock/snapshot/ohlc?symbol=AAPL&venue=nqb&format=html
        description: Click to open in browser (HTML)
      parameters:
      - $ref: '#/components/parameters/multi_symbol'
      - $ref: '#/components/parameters/venue'
      - $ref: '#/components/parameters/min_time'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          description: Returns OHLC for stocks for all symbols
          content:
            text/csv:
              schema:
                type: array
                items: &id001
                  type: object
                  properties:
                    timestamp:
                      type: string
                      format: date-time
                      description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format.
                    symbol:
                      type: string
                      description: The symbol of the contract, or stock / underlying asset / option / index.
                    open:
                      type: number
                      description: The opening trade price.
                    high:
                      type: number
                      description: The highest traded price.
                    low:
                      type: number
                      description: The lowest traded price.
                    close:
                      type: number
                      description: The closing traded price.
                    volume:
                      type: integer
                      description: The amount of contracts / shares traded.
                    count:
                      type: integer
                      description: The amount of trades.
              example: "timestamp,symbol,open,high,low,close,volume,count\r\n2025-08-20T16:10:04.43,CVCO,492.0000,492.0000,480.5477,485.1100,119656,7684\r\n2025-08-20T16:11:13.962,IFRX,0.8900,0.9199,0.8529,0.8929,57048,138\r\n2025-08-20T16:04:10.564,KLXY,0.0000,0.0000,0.0000,0.0000,9,6\r\n2025-08-20T16:04:07.554,HCOW,23.5600,23.6976,23.5600,23.6616,3648,44\r\n2025-08-20T16:22:32.726,SCS,16.2000,16.3200,16.1550,16.1800,992620,7690\r\n"
            application/json:
              schema: &id002
                type: array
                items: *id001
              example: "{\n  \"response\": [\n    {\"volume\":119656,\"symbol\":\"CVCO\",\"high\":492.0000,\"low\":480.5477,\"count\":7684,\"close\":485.1100,\"open\":492.0000,\"timestamp\":\"2025-08-20T16:10:04.43\"},\n    {\"volume\":57048,\"symbol\":\"IFRX\",\"high\":0.9199,\"low\":0.8529,\"count\":138,\"close\":0.8929,\"open\":0.8900,\"timestamp\":\"2025-08-20T16:11:13.962\"},\n    {\"volume\":9,\"symbol\":\"KLXY\",\"high\":0.0000,\"low\":0.0000,\"count\":6,\"close\":0.0000,\"open\":0.0000,\"timestamp\":\"2025-08-20T16:04:10.564\"},\n    {\"volume\":3648,\"symbol\":\"HCOW\",\"high\":23.6976,\"low\":23.5600,\"count\":44,\"close\":23.6616,\"open\":23.5600,\"timestamp\":\"2025-08-20T16:04:07.554\"},\n    {\"volume\":992620,\"symbol\":\"SCS\",\"high\":16.3200,\"low\":16.1550,\"count\":7690,\"close\":16.1800,\"open\":16.2000,\"timestamp\":\"2025-08-20T16:22:32.726\"}\n  ]\n}\n"
            application/x-ndjson:
              schema: *id002
              example: '{"volume":119656,"symbol":"CVCO","high":492.0000,"low":480.5477,"count":7684,"close":485.1100,"open":492.0000,"timestamp":"2025-08-20T16:10:04.43"}

                {"volume":57048,"symbol":"IFRX","high":0.9199,"low":0.8529,"count":138,"close":0.8929,"open":0.8900,"timestamp":"2025-08-20T16:11:13.962"}

                {"volume":9,"symbol":"KLXY","high":0.0000,"low":0.0000,"count":6,"close":0.0000,"open":0.0000,"timestamp":"2025-08-20T16:04:10.564"}

                {"volume":3648,"symbol":"HCOW","high":23.6976,"low":23.5600,"count":44,"close":23.6616,"open":23.5600,"timestamp":"2025-08-20T16:04:07.554"}

                {"volume":992620,"symbol":"SCS","high":16.3200,"low":16.1550,"count":7690,"close":16.1800,"open":16.2000,"timestamp":"2025-08-20T16:22:32.726"}'
            python/pandas:
              schema: *id002
              example: 'timestamp symbol    open    high     low     close    volume   count

                0 2026-04-27 12:13:13.669000-04:00   AAPL  266.09  268.36  265.07  266.9199  10436064  212955

                '
            python/polars:
              schema: *id002
              example: 'shape: (1, 8)

                ┌────────────────────────────────┬────────┬────────┬────────┬────────┬──────────┬──────────┬────────┐

                │ timestamp                      ┆ symbol ┆ open   ┆ high   ┆ low    ┆ close    ┆ volume   ┆ count  │

                │ ---                            ┆ ---    ┆ ---    ┆ ---    ┆ ---    ┆ ---      ┆ ---      ┆ ---    │

                │ datetime[ms, America/New_York] ┆ str    ┆ f64    ┆ f64    ┆ f64    ┆ f64      ┆ i64      ┆ i64    │

                ╞════════════════════════════════╪════════╪════════╪════════╪════════╪══════════╪══════════╪════════╡

                │ 2026-04-27 12:13:13.669 EDT    ┆ AAPL   ┆ 266.09 ┆ 268.36 ┆ 265.07 ┆ 266.9199 ┆ 10436064 ┆ 212955 │

                └────────────────────────────────┴────────┴────────┴────────┴────────┴──────────┴──────────┴────────┘

                '
  /stock/snapshot/trade:
    x-skip-concurrent-limit: true
    x-min-subscription: standard
    get:
      summary: Trade
      operationId: stock_snapshot_trade
      x-codeSamples:
      - lang: Python
        label: pandas
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''pandas'')

          df = client.stock_snapshot_trade(symbol=[''AAPL''])

          '
      - lang: Python
        label: polars
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''polars'')

          df = client.stock_snapshot_trade(symbol=[''AAPL''])

          '
      tags:
      - Snapshot
      description: '

        Returns a real-time last trade from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).


        - Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.

        '
      x-sample-urls:
      - url: http://127.0.0.1:25503/v3/stock/snapshot/trade?symbol=AAPL
        description: Returns last trade for stocks for a given symbol
      - url: http://127.0.0.1:25503/v3/stock/snapshot/trade?symbol=AAPL&format=html
        description: Click to open in browser (HTML)
      parameters:
      - $ref: '#/components/parameters/multi_symbol'
      - $ref: '#/components/parameters/venue'
      - $ref: '#/components/parameters/min_time'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          description: Returns last trade for stocks for a given symbol
          content:
            text/csv:
              schema:
                type: array
                items: &id003
                  type: object
                  properties:
                    timestamp:
                      type: string
                      format: date-time
                      description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format.
                    symbol:
                      type: string
                      description: The symbol of the contract, or stock / underlying asset / option / index.
                    sequence:
                      type: integer
                      description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences).
                    size:
                      type: integer
                      description: The amount of contracts / shares traded.
                    condition:
                      type: integer
                      description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html).
                    price:
                      type: number
                      description: The trade price.
              example: "timestamp,symbol,sequence,size,condition,price\r\n2025-08-20T16:36:05.549,AAPL,63539137,23,1,225.7500\r\n"
            application/json:
              schema: &id004
                type: array
                items: *id003
              example: "{\n  \"response\": [\n    {\"symbol\":\"AAPL\",\"sequence\":63539137,\"condition\":1,\"size\":23,\"price\":225.7500,\"timestamp\":\"2025-08-20T16:36:05.549\"}\n  ]\n}\n"
            application/x-ndjson:
              schema: *id004
              example: '{"symbol":"AAPL","sequence":63539137,"condition":1,"size":23,"price":225.7500,"timestamp":"2025-08-20T16:36:05.549"}'
            python/pandas:
              schema: *id004
              example: 'timestamp symbol  sequence  size  condition     price

                0 2026-04-27 12:13:13.669000-04:00   AAPL  35639213    21         96  266.9263

                '
            python/polars:
              schema: *id004
              example: 'shape: (1, 6)

                ┌────────────────────────────────┬────────┬──────────┬──────┬───────────┬──────────┐

                │ timestamp                      ┆ symbol ┆ sequence ┆ size ┆ condition ┆ price    │

                │ ---                            ┆ ---    ┆ ---      ┆ ---  ┆ ---       ┆ ---      │

                │ datetime[ms, America/New_York] ┆ str    ┆ i64      ┆ i64  ┆ i64       ┆ f64      │

                ╞════════════════════════════════╪════════╪══════════╪══════╪═══════════╪══════════╡

                │ 2026-04-27 12:13:13.669 EDT    ┆ AAPL   ┆ 35639213 ┆ 21   ┆ 96        ┆ 266.9263 │

                └────────────────────────────────┴────────┴──────────┴──────┴───────────┴──────────┘

                '
  /stock/snapshot/quote:
    x-skip-concurrent-limit: true
    x-min-subscription: value
    x-symbol-wildcard: true
    get:
      summary: Quote
      operationId: stock_snapshot_quote
      x-codeSamples:
      - lang: Python
        label: pandas
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''pandas'')

          df = client.stock_snapshot_quote(symbol=[''AAPL''])

          '
      - lang: Python
        label: polars
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''polars'')

          df = client.stock_snapshot_quote(symbol=[''AAPL''])

          '
      tags:
      - Snapshot
      description: '* Returns a real-time last BBO quote from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).

        * Returns a 15-minute delayed NBBO quote from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs) account has the [stocks value subscription](https://www.thetadata.net/subscribe.html#stocks) subscription.

        - Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.

        '
      x-sample-urls:
      - url: http://127.0.0.1:25503/v3/stock/snapshot/quote?symbol=*
        description: Returns last quote for stocks for all symbols
      - url: http://127.0.0.1:25503/v3/stock/snapshot/quote?symbol=AAPL&venue=nqb
        description: Returns OHLC for a given stock trade from the Nasdaq Basic feed
      - url: http://127.0.0.1:25503/v3/stock/snapshot/quote?symbol=AAPL&format=html
        description: Click to open in browser (HTML)
      parameters:
      - $ref: '#/components/parameters/multi_symbol'
      - $ref: '#/components/parameters/venue'
      - $ref: '#/components/parameters/min_time'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          description: Returns last quote for stocks for all symbols
          content:
            text/csv:
              schema:
                type: array
                items: &id005
                  type: object
                  properties:
                    timestamp:
                      type: string
                      format: date-time
                      description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format.
                    symbol:
                      type: string
                      description: The symbol of the contract, or stock / underlying asset / option / index.
                    bid_size:
                      type: integer
                      description: The last NBBO bid size.
                    bid_exchange:
                      type: integer
                      description: The last NBBO bid [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html).
                    bid:
                      type: number
                      description: The last NBBO bid price.
                    bid_condition:
                      type: integer
                      description: The last NBBO bid [condition](/Articles/Errors-Exchanges-Conditions/Quote-Conditions.html).
                    ask_size:
                      type: integer
                      description: The last NBBO ask size.
                    ask_exchange:
                      type: integer
                      description: The last NBBO ask [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html).
                    ask:
                      type: number
                      description: The last NBBO ask price.
                    ask_condition:
                      type: integer
                      description: The last NBBO ask [condition](/Articles/Errors-Exchanges-Conditions/Quote-Conditions.html).
              example: "timestamp,symbol,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\n2025-08-20T16:03:05.142,CVCO,1,29,475.75,0,3,29,494.33,0\r\n2025-08-20T16:10:05.032,KLXY,200,29,12.40,0,200,29,37.18,0\r\n2025-08-20T16:21:05.781,IFRX,100,29,0.7510,0,45,29,0.9500,0\r\n2025-08-20T16:19:55.101,SCS,100,29,14.64,0,100,29,17.60,0\r\n2025-08-20T16:33:50.877,BBC,100,29,13.29,0,2800,29,24.06,0\r\n"
            application/json:
              schema: &id006
                type: array
                items: *id005
              example: "{\n  \"response\": [\n    {\"symbol\":\"CVCO\",\"ask_size\":3,\"bid_size\":1,\"ask_exchange\":29,\"ask_condition\":0,\"bid_exchange\":29,\"ask\":494.33,\"bid\":475.75,\"bid_condition\":0,\"timestamp\":\"2025-08-20T16:03:05.142\"},\n    {\"symbol\":\"KLXY\",\"ask_size\":200,\"bid_size\":200,\"ask_exchange\":29,\"ask_condition\":0,\"bid_exchange\":29,\"ask\":37.18,\"bid\":12.40,\"bid_condition\":0,\"timestamp\":\"2025-08-20T16:10:05.032\"},\n    {\"symbol\":\"IFRX\",\"ask_size\":45,\"bid_size\":100,\"ask_exchange\":29,\"ask_condition\":0,\"bid_exchange\":29,\"ask\":0.9500,\"bid\":0.7510,\"bid_condition\":0,\"timestamp\":\"2025-08-20T16:21:05.781\"},\n    {\"symbol\":\"SCS\",\"ask_size\":100,\"bid_size\":100,\"ask_exchange\":29,\"ask_condition\":0,\"bid_exchange\":29,\"ask\":17.60,\"bid\":14.64,\"bid_condition\":0,\"timestamp\":\"2025-08-20T16:19:55.101\"},\n    {\"symbol\":\"BBC\",\"ask_size\":2800,\"bid_size\":100,\"ask_exchange\":29,\"ask_condition\":0,\"bid_exchange\":29,\"ask\":24.06,\"bid\":13.29,\"bid_condition\":0,\"timestamp\":\"2025-08-20T16:33:50.877\"}\n  ]\n}\n"
            application/x-ndjson:
              schema: *id006
              example: '{"symbol":"CVCO","ask_size":3,"bid_size":1,"ask_exchange":29,"ask_condition":0,"bid_exchange":29,"ask":494.33,"bid":475.75,"bid_condition":0,"timestamp":"2025-08-20T16:03:05.142"}

                {"symbol":"KLXY","ask_size":200,"bid_size":200,"ask_exchange":29,"ask_condition":0,"bid_exchange":29,"ask":37.18,"bid":12.40,"bid_condition":0,"timestamp":"2025-08-20T16:10:05.032"}

                {"symbol":"IFRX","ask_size":45,"bid_size":100,"ask_exchange":29,"ask_condition":0,"bid_exchange":29,"ask":0.9500,"bid":0.7510,"bid_condition":0,"timestamp":"2025-08-20T16:21:05.781"}

                {"symbol":"SCS","ask_size":100,"bid_size":100,"ask_exchange":29,"ask_condition":0,"bid_exchange":29,"ask":17.60,"bid":14.64,"bid_condition":0,"timestamp":"2025-08-20T16:19:55.101"}

                {"symbol":"BBC","ask_size":2800,"bid_size":100,"ask_exchange":29,"ask_condition":0,"bid_exchange":29,"ask":24.06,"bid":13.29,"bid_condition":0,"timestamp":"2025-08-20T16:33:50.877"}'
            python/pandas:
              schema: *id006
              example: 'timestamp symbol  bid_size  bid_exchange    bid  bid_condition  ask_size  ask_exchange     ask  ask_condition

                0 2026-04-27 12:13:13.953000-04:00   AAPL       158            29  266.9              0        22            29  266.92              0

                '
            python/polars:
              schema: *id006
              example: 'shape: (1, 10)

                ┌────────────────────────────────┬────────┬──────────┬──────────────┬───────┬───────────────┬──────────┬──────────────┬────────┬───────────────┐

                │ timestamp                      ┆ symbol ┆ bid_size ┆ bid_exchange ┆ bid   ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask    ┆ ask_condition │

                │ ---                            ┆ ---    ┆ ---      ┆ ---          ┆ ---   ┆ ---           ┆ ---      ┆ ---          ┆ ---    ┆ ---           │

                │ datetime[ms, America/New_York] ┆ str    ┆ i64      ┆ i64          ┆ f64   ┆ i64           ┆ i64      ┆ i64          ┆ f64    ┆ i64           │

                ╞════════════════════════════════╪════════╪══════════╪══════════════╪═══════╪═══════════════╪══════════╪══════════════╪════════╪═══════════════╡

                │ 2026-04-27 12:13:13.953 EDT    ┆ AAPL   ┆ 158      ┆ 29           ┆ 266.9 ┆ 0             ┆ 22       ┆ 29           ┆ 266.92 ┆ 0             │

                └────────────────────────────────┴────────┴──────────┴──────────────┴───────┴───────────────┴──────────┴──────────────┴────────┴───────────────┘

                '
  /stock/snapshot/market_value:
    x-skip-concurrent-limit: true
    x-min-subscription: standard
    x-symbol-wildcard: true
    get:
      summary: Market Value
      operationId: stock_snapshot_market_value
      x-codeSamples:
      - lang: Python
        label: pandas
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''pandas'')

          df = client.stock_snapshot_market_value(symbol=[''AAPL''])

          '
      - lang: Python
        label: polars
        source: 'from thetadata import ThetaClient


          client = ThetaClient(dataframe_type=''polars'')

          df = client.stock_snapshot_market_value(symbol=[''AAPL''])

          '
      tags:
      - Snapshot
      description: '* Returns a real-time market value derived from the last BBO quote from the [Nasdaq Basic feed](/Articles/Data-And-Requests/The-SIPs) if the account has a [stocks standard or pro subscription](https://www.thetadata.net/subscribe.html#stocks).

        * Returns a 15-minute delayed market value derived from an NBBO quote from the [UTP & CTA feeds](/Articles/Data-And-Requests/The-SIPs) if the account has the [stocks value subscription](https://www.thetadata.net/subscribe.html#stocks) subscription.

        - Theta Data resets its snapshot cache at midnight ET every day. This endpoint may not work on a weekend where there were no eligible messages sent over exchange feeds. We recommend using historic requests during the weekend.

        '
      x-sample-urls:
      - url: http://127.0.0.1:25503/v3/stock/snapshot/market_value?symbol=*
        description: Returns last market value for stocks for all symbols
      - url: http://127.0.0.1:25503/v3/stock/snapshot/market_value?symbol=AAPL&venue=nqb
        description: Returns market value for a given stock trade from the Nasdaq Basic feed
      - url: http://127.0.0.1:25503/v3/stock/snapshot/market_value?symbol=*&format=html
        description: Click to open in browser (HTML)
      parameters:
      - $ref: '#/components/parameters/multi_symbol'
      - $ref: '#/components/parameters/venue'
      - $ref: '#/components/parameters/min_time'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          description: Returns last market value for stocks for all symbols
          content:
            text/csv:
              schema:
                type: array
                items: &id007
                  type: object
                  properties:
                    timestamp:
                      type: string
                      format: date-time
                      description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format.
                    symbol:
                      type: string
                      description: The symbol of the contract, or stock / underlying asset / option / index.
                    market_bid:
                      type: number
                      description: The last market bid
                    market_ask:
                      type: number
                      description: The last market ask
                    market_price:
                      type: number
                      description: The last market value price
              example: "timestamp,symbol,market_bid,market_ask,market_price\r\n2025-12-16T11:47:50.854,CVCO,590.60,595.55,593.07\r\n2025-12-16T11:02:05.409,KLXY,26.77,27.69,27.23\r\n2025-12-16T11:47:52.923,FXR,80.23,80.27,80.25\r\n2025-12-16T11:47:53.496,AAPL,273.22,273.23,273.22"
            application/json:
              schema: &id008
                type: array
                items: *id007
              example: "{\n  \"response\": [\n    {\"symbol\":\"CVCO\",\"market_bid\":590.60,\"market_ask\":595.55,\"market_price\":593.07,\"timestamp\":\"2025-12-16T11:47:50.854\"},\n    {\"symbol\":\"KLXY\",\"market_bid\":26.77,\"market_ask\":27.69,\"market_price\":27.23,\"timestamp\":\"2025-12-16T11:02:05.409\"},\n    {\"symbol\":\"FXR\",\"market_bid\":80.23,\"market_ask\":80.27,\"market_price\":80.25,\"timestamp\":\"2025-12-16T11:47:52.923\"},\n    {\"symbol\":\"AAPL\",\"market_bid\":273.22,\"market_ask\":273.23,\"market_price\":273.22,\"timestamp\":\"2025-12-16T11:47:53.496\"}\n  ]\n}\n"
            application/x-ndjson:
              schema: *id008
              example: '{"symbol":"CVCO","market_bid":590.60,"market_ask":595.55,"market_price":593.07,"timestamp":"2025-12-16T11:47:50.854"}

                {"symbol":"KLXY","market_bid":26.77,"market_ask":27.69,"market_price":27.23,"timestamp":"2025-12-16T11:02:05.409"}

                {"symbol":"FXR","market_bid":80.23,"market_ask":80.27,"market_price":80.25,"timestamp":"2025-12-16T11:47:52.923"}

                {"symbol":"AAPL","market_bid":273.22,"market_ask":273.23,"market_price":273.22,"timestamp":"2025-12-16T11:47:53.496"}'
            python/pandas:
              schema: *id008
              example: 'timestamp symbol  market_bid  market_ask  market_price

                0 2026-04-27 12:13:13.953000-04:00   AAPL       266.9      266.91         266.9

                '
            python/polars:
              schema: *id008
              example: 'shape: (1, 5)

                ┌────────────────────────────────┬────────┬────────────┬────────────┬──────────────┐

                │ timestamp                      ┆ symbol ┆ market_bid ┆ market_ask ┆ market_price │

                │ ---                            ┆ ---    ┆ ---        ┆ ---        ┆ ---          │

                │ datetime[ms, America/New_York] ┆ str    ┆ f64        ┆ f64        ┆ f64          │

                ╞════════════════════════════════╪════════╪════════════╪════════════╪══════════════╡

                │ 2026-04-27 12:13:13.953 EDT    ┆ AAPL   ┆ 266.9      ┆ 266.91     ┆ 266.9        │

                └────────────────────────────────┴────────┴────────────┴────────────┴──────────────┘

                '
  /option/snapshot/ohlc:
    x-skip-concurrent-limit: true
    x-min-subscription: value
    get:
      summary: Open High Low Close
      operationId: option_snapshot_ohlc
      x-codeSamples:
      - lang: Python
        label: pandas
        source: 'from thetadata import ThetaClient

          from datetime import date


          client = ThetaClient(dataframe_type=''pandas'')

          df = client.option_snapshot_ohlc(symbol=''AAPL'', expiration=date(2027, 1, 15))

          '
      - lang: Python
        label: polars
        source: 'from thetadata import ThetaClient

          from datetime import date


          client = ThetaClient(dataframe_type=''polars'')

          df = client.option_snapshot_ohlc(symbol=''AAPL'', expiration=date(2027, 1, 15))

          '
      tags:
      - Snapshot
      description: '- Retrieve a real-time last ohlc of an option contract for the trading day.

        - You might need to change the default expiration date to a different date if it is past the current date.

        '
      x-sample-urls:
      - url: http://127.0.0.1:25503/v3/option/snapshot/ohlc?symbol=AAPL&expiration=20270115&right=call&strike=270.000
        description: Returns OHLC for a given option contract
      - url: http://127.0.0.1:25503/v3/option/snapshot/ohlc?symbol=AAPL&expiration=*
        description: Returns OHLC for all option contracts
      - url: http://127.0.0.1:25503/v3/option/snapshot/ohlc?symbol=AAPL&expiration=*&format=html
        description: Click to open in browser (HTML)
      parameters:
      - $ref: '#/components/parameters/single_symbol'
      - $ref: '#/components/parameters/expiration'
      - $ref: '#/components/parameters/strike'
      - $ref: '#/components/parameters/right'
      - $ref: '#/components/parameters/max_dte'
      - $ref: '#/components/parameters/strike_range'
      - $ref: '#/components/parameters/min_time'
      - $ref: '#/components/parameters/format'
      responses:
        '200':
          description: Returns OHLC for a given option contract
          content:
            text/csv:
              schema:
                type: array
                items: &id009
                  type: object
                  properties:
                    timestamp:
                      type: string
                      format: date-time
                      description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format.
                    symbol:
                      type: string
                      description: The symbol of the contract, or stock / underlying asset / option / index.
                    expiration:
                      type: string
                      format: date
                      description: Expiration date of the contract in YYYY-MM-DD format.
                    strike:
                      type: number
                      description: Strike price of the contract in dollars 180.00
                    right:
                      type: string
                      description: Indicates whether the contract is a call or put option.
                    open:
                      type: number
                      description: The opening trade price.
                    high:
                      type: number
                      description: The highest traded price.
                    low:
                      type: number
                      description: The lowest traded price.
                    close:
                      type: number
                      description: The closing traded price.
                    volume:
                      type: integer
                      description: The amount of contracts / shares traded.
                    count:
                      type: integer
                      description

# --- truncated at 32 KB (136 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/thetadata/refs/heads/main/openapi/thetadata-snapshot-api-openapi.yml