openapi: 3.1.0 info: title: Theta Data v3 At-Time History 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: History paths: /stock/history/eod: x-concurrent-limit-ttl-ms: '580' x-min-subscription: free x-history-access: true get: summary: End of Day operationId: stock_history_eod x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.stock_history_eod(\n symbol='AAPL',\n start_date=date(2024, 1, 1),\n end_date=date(2024, 1, 31),\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.stock_history_eod(\n symbol='AAPL',\n start_date=date(2024, 1, 1),\n end_date=date(2024, 1, 31),\n)\n" tags: - History description: ' Since [the equity SIPs](/Articles/Data-And-Requests/The-SIPs.html) only generate a partial EOD report, Theta Data generates a national EOD report at 17:15 ET each day. ``created`` represents the datetime the report was generated and ``last_trade`` represents the datetime of the last trade. The quote in the response represents the last NBBO reported by [CTA or UTP](/Articles/Data-And-Requests/The-SIPs.html) at the time of report generation. You can read more about EOD & OHLC data [here](/Articles/Data-And-Requests/OHLC-EOD.html). Theta Data plans to avail SIP EOD reports in the near future. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/stock/history/eod?symbol=AAPL&start_date=20240101&end_date=20240131 description: Returns EOD report for a given symbol between specified dates (inclusive) - url: http://127.0.0.1:25503/v3/stock/history/eod?symbol=AAPL&start_date=20240101&end_date=20240131&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/start_date' - $ref: '#/components/parameters/end_date' - $ref: '#/components/parameters/format' responses: '200': description: Returns EOD report for a given symbol between specified dates (inclusive) content: text/csv: schema: type: array items: &id001 type: object properties: created: type: string format: date-time description: The date formated as YYYY-MM-DDTHH:mm:ss.SSS format. last_trade: type: string format: date-time description: The last trade date formated as YYYY-MM-DDTHH:mm:ss.SSS format. 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. 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: "created,last_trade,open,high,low,close,volume,count,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\n2024-01-02T17:17:53.606,2024-01-02T17:17:51.877,187.030,188.440,183.885,185.640,80680243,1003582,2,7,18.534,0,2,1,18.536,0\r\n2024-01-03T17:16:29.883,2024-01-03T17:16:28.586,184.200,185.880,183.430,184.250,58308345,654127,5,7,18.405,0,2,1,18.410,0\r\n2024-01-04T17:17:06.02,2024-01-04T17:17:02.445,182.0000,183.0872,180.8800,181.9100,71197269,709246,8,60,1.8176,0,2,7,1.8179,0\r\n2024-01-05T17:16:57.032,2024-01-05T17:16:49.821,181.900,182.760,180.170,181.180,61949135,679405,3,1,18.103,0,3,7,18.105,0\r\n2024-01-08T17:17:01.83,2024-01-08T17:17:01.484,182.000,185.600,181.500,185.560,59029146,665626,4,1,18.528,0,1,65,18.537,0\r\n" application/json: schema: &id002 type: array items: *id001 example: "{\n \"response\": [\n {\"ask_size\":2,\"last_trade\":\"2024-01-02T17:17:51.877\",\"created\":\"2024-01-02T17:17:53.606\",\"ask_condition\":0,\"count\":1003582,\"volume\":80680243,\"high\":188.440,\"low\":183.885,\"bid_size\":2,\"ask_exchange\":1,\"bid_exchange\":7,\"ask\":18.536,\"bid\":18.534,\"bid_condition\":0,\"close\":185.640,\"open\":187.030},\n {\"ask_size\":2,\"last_trade\":\"2024-01-03T17:16:28.586\",\"created\":\"2024-01-03T17:16:29.883\",\"ask_condition\":0,\"count\":654127,\"volume\":58308345,\"high\":185.880,\"low\":183.430,\"bid_size\":5,\"ask_exchange\":1,\"bid_exchange\":7,\"ask\":18.410,\"bid\":18.405,\"bid_condition\":0,\"close\":184.250,\"open\":184.200},\n {\"ask_size\":2,\"last_trade\":\"2024-01-04T17:17:02.445\",\"created\":\"2024-01-04T17:17:06.02\",\"ask_condition\":0,\"count\":709246,\"volume\":71197269,\"high\":183.0872,\"low\":180.8800,\"bid_size\":8,\"ask_exchange\":7,\"bid_exchange\":60,\"ask\":1.8179,\"bid\":1.8176,\"bid_condition\":0,\"close\":181.9100,\"open\":182.0000},\n {\"ask_size\":3,\"last_trade\":\"2024-01-05T17:16:49.821\",\"created\":\"2024-01-05T17:16:57.032\",\"ask_condition\":0,\"count\":679405,\"volume\":61949135,\"high\":182.760,\"low\":180.170,\"bid_size\":3,\"ask_exchange\":7,\"bid_exchange\":1,\"ask\":18.105,\"bid\":18.103,\"bid_condition\":0,\"close\":181.180,\"open\":181.900},\n {\"ask_size\":1,\"last_trade\":\"2024-01-08T17:17:01.484\",\"created\":\"2024-01-08T17:17:01.83\",\"ask_condition\":0,\"count\":665626,\"volume\":59029146,\"high\":185.600,\"low\":181.500,\"bid_size\":4,\"ask_exchange\":65,\"bid_exchange\":1,\"ask\":18.537,\"bid\":18.528,\"bid_condition\":0,\"close\":185.560,\"open\":182.000}\n ]\n}\n" application/x-ndjson: schema: *id002 example: '{"ask_size":2,"last_trade":"2024-01-02T17:17:51.877","created":"2024-01-02T17:17:53.606","ask_condition":0,"count":1003582,"volume":80680243,"high":188.440,"low":183.885,"bid_size":2,"ask_exchange":1,"bid_exchange":7,"ask":18.536,"bid":18.534,"bid_condition":0,"close":185.640,"open":187.030} {"ask_size":2,"last_trade":"2024-01-03T17:16:28.586","created":"2024-01-03T17:16:29.883","ask_condition":0,"count":654127,"volume":58308345,"high":185.880,"low":183.430,"bid_size":5,"ask_exchange":1,"bid_exchange":7,"ask":18.410,"bid":18.405,"bid_condition":0,"close":184.250,"open":184.200} {"ask_size":2,"last_trade":"2024-01-04T17:17:02.445","created":"2024-01-04T17:17:06.02","ask_condition":0,"count":709246,"volume":71197269,"high":183.0872,"low":180.8800,"bid_size":8,"ask_exchange":7,"bid_exchange":60,"ask":1.8179,"bid":1.8176,"bid_condition":0,"close":181.9100,"open":182.0000} {"ask_size":3,"last_trade":"2024-01-05T17:16:49.821","created":"2024-01-05T17:16:57.032","ask_condition":0,"count":679405,"volume":61949135,"high":182.760,"low":180.170,"bid_size":3,"ask_exchange":7,"bid_exchange":1,"ask":18.105,"bid":18.103,"bid_condition":0,"close":181.180,"open":181.900} {"ask_size":1,"last_trade":"2024-01-08T17:17:01.484","created":"2024-01-08T17:17:01.83","ask_condition":0,"count":665626,"volume":59029146,"high":185.600,"low":181.500,"bid_size":4,"ask_exchange":65,"bid_exchange":1,"ask":18.537,"bid":18.528,"bid_condition":0,"close":185.560,"open":182.000}' python/pandas: schema: *id002 example: 'created last_trade open high low close volume count bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition 0 2025-10-02 17:15:40.365000-04:00 2025-10-02 17:15:30.829000-04:00 256.60 258.18 254.15 257.13 42543552 483678 1 60 257.40 0 19 7 257.50 0 1 2025-10-03 17:15:50.597000-04:00 2025-10-03 17:15:27.845000-04:00 254.64 259.24 253.95 258.02 49090168 704668 2 7 257.81 0 3 1 257.98 0 ' python/polars: schema: *id002 example: 'shape: (2, 16) ┌────────────────────────────────┬────────────────────────────────┬────────┬────────┬────────┬────────┬──────────┬────────┬──────────┬──────────────┬────────┬───────────────┬──────────┬──────────────┬────────┬───────────────┐ │ created ┆ last_trade ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ count ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 │ ╞════════════════════════════════╪════════════════════════════════╪════════╪════════╪════════╪════════╪══════════╪════════╪══════════╪══════════════╪════════╪═══════════════╪══════════╪══════════════╪════════╪═══════════════╡ │ 2025-10-02 17:15:40.365 EDT ┆ 2025-10-02 17:15:30.829 EDT ┆ 256.6 ┆ 258.18 ┆ 254.15 ┆ 257.13 ┆ 42543552 ┆ 483678 ┆ 1 ┆ 60 ┆ 257.4 ┆ 0 ┆ 19 ┆ 7 ┆ 257.5 ┆ 0 │ │ 2025-10-03 17:15:50.597 EDT ┆ 2025-10-03 17:15:27.845 EDT ┆ 254.64 ┆ 259.24 ┆ 253.95 ┆ 258.02 ┆ 49090168 ┆ 704668 ┆ 2 ┆ 7 ┆ 257.81 ┆ 0 ┆ 3 ┆ 1 ┆ 257.98 ┆ 0 │ └────────────────────────────────┴────────────────────────────────┴────────┴────────┴────────┴────────┴──────────┴────────┴──────────┴──────────────┴────────┴───────────────┴──────────┴──────────────┴────────┴───────────────┘ ' /stock/history/ohlc: x-concurrent-limit-ttl-ms: '695' x-min-subscription: value x-history-access: true get: summary: Open High Low Close operationId: stock_history_ohlc x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''pandas'') df = client.stock_history_ohlc(symbol=''AAPL'', interval=''1m'') ' - lang: Python label: polars source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''polars'') df = client.stock_history_ohlc(symbol=''AAPL'', interval=''1m'') ' tags: - History description: "- Aggregated OHLC bars that use [SIP rules](/Articles/Data-And-Requests/OHLC-EOD.html) for each bar. Time timestamp of the bar represents the opening time of the bar. For a trade to be part of the bar: ``bar time`` <= ``trade time`` < ``bar timestamp + ivl``, where ivl is the specified interval size in milliseconds. \n- Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data 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).\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/stock/history/ohlc?symbol=AAPL&date=20240102&interval=1m description: Returns OHLC for a given symbol on the specified date with a one minute interval - url: http://127.0.0.1:25503/v3/stock/history/ohlc?symbol=AAPL&date=20240102&interval=1m&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/stock/history/ohlc?symbol=AAPL&start_date=20240102&end_date=20240109&interval=1m description: Returns OHLC for a given symbol between specified dates (inclusive) with a one minute interval - url: http://127.0.0.1:25503/v3/stock/history/ohlc?symbol=AAPL&start_date=20240102&end_date=20240109&interval=1m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/venue' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns OHLC for a given symbol between specified dates (inclusive) with a one minute interval 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. 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. vwap: type: number description: The volume weighted average price of the trading session. example: "timestamp,open,high,low,close,volume,count,vwap\r\n2024-01-02T09:30:00,187.1500,188.050,186.350,187.830,3256708,37886,187.25\r\n2024-01-02T09:31:00,187.830,188.120,187.630,187.765,809707,7481,187.38\r\n2024-01-02T09:32:00,187.770,188.440,187.730,188.2984,687086,7103,187.48\r\n2024-01-02T09:33:00,188.3050,188.310,187.810,188.160,485275,6245,187.53\r\n2024-01-02T09:34:00,188.150,188.150,187.670,187.730,415948,5942,187.55\r\n" application/json: schema: &id004 type: array items: *id003 example: "{\n \"response\": [\n {\"volume\":3256708,\"high\":188.050,\"low\":186.350,\"vwap\":187.25,\"count\":37886,\"close\":187.830,\"open\":187.1500,\"timestamp\":\"2024-01-02T09:30:00\"},\n {\"volume\":809707,\"high\":188.120,\"low\":187.630,\"vwap\":187.38,\"count\":7481,\"close\":187.765,\"open\":187.830,\"timestamp\":\"2024-01-02T09:31:00\"},\n {\"volume\":687086,\"high\":188.440,\"low\":187.730,\"vwap\":187.48,\"count\":7103,\"close\":188.2984,\"open\":187.770,\"timestamp\":\"2024-01-02T09:32:00\"},\n {\"volume\":485275,\"high\":188.310,\"low\":187.810,\"vwap\":187.53,\"count\":6245,\"close\":188.160,\"open\":188.3050,\"timestamp\":\"2024-01-02T09:33:00\"},\n {\"volume\":415948,\"high\":188.150,\"low\":187.670,\"vwap\":187.55,\"count\":5942,\"close\":187.730,\"open\":188.150,\"timestamp\":\"2024-01-02T09:34:00\"}\n ]\n}\n" application/x-ndjson: schema: *id004 example: '{"volume":3256708,"high":188.050,"low":186.350,"vwap":187.25,"count":37886,"close":187.830,"open":187.1500,"timestamp":"2024-01-02T09:30:00"} {"volume":809707,"high":188.120,"low":187.630,"vwap":187.38,"count":7481,"close":187.765,"open":187.830,"timestamp":"2024-01-02T09:31:00"} {"volume":687086,"high":188.440,"low":187.730,"vwap":187.48,"count":7103,"close":188.2984,"open":187.770,"timestamp":"2024-01-02T09:32:00"} {"volume":485275,"high":188.310,"low":187.810,"vwap":187.53,"count":6245,"close":188.160,"open":188.3050,"timestamp":"2024-01-02T09:33:00"} {"volume":415948,"high":188.150,"low":187.670,"vwap":187.55,"count":5942,"close":187.730,"open":188.150,"timestamp":"2024-01-02T09:34:00"}' python/pandas: schema: *id004 example: 'timestamp open high low close volume count vwap 0 2025-10-02 09:30:00-04:00 256.5750 256.8300 256.2100 256.4600 929518 13659 256.57 1 2025-10-02 09:31:00-04:00 256.4700 256.8500 256.3500 256.3700 183344 2498 256.58 2 2025-10-02 09:32:00-04:00 256.3500 257.3000 256.2600 257.1600 388614 4928 256.64 3 2025-10-02 09:33:00-04:00 257.1400 257.2450 256.6300 256.7500 233456 3195 256.68 4 2025-10-02 09:34:00-04:00 256.7375 257.0500 255.8000 255.8900 224588 3292 256.65 5 2025-10-02 09:35:00-04:00 255.8900 256.1400 255.3100 255.4000 324623 4018 256.51 6 2025-10-02 09:36:00-04:00 255.3900 255.6200 255.1000 255.2150 176060 2968 256.44 7 2025-10-02 09:37:00-04:00 255.2000 255.3700 255.0900 255.1450 217195 3137 256.34 8 2025-10-02 09:38:00-04:00 255.1650 255.3050 254.8301 254.8700 285347 4128 256.22 9 2025-10-02 09:39:00-04:00 254.8650 254.9400 254.5000 254.5550 192953 2880 256.13 10 2025-10-02 09:40:00-04:00 254.5300 254.5600 254.1500 254.2100 262004 3643 256.00 11 2025-10-02 09:41:00-04:00 254.2400 254.5500 254.2100 254.3600 186084 2943 255.92 12 2025-10-02 09:42:00-04:00 254.3700 254.5744 254.2600 254.4000 200902 2464 255.84 13 2025-10-02 09:43:00-04:00 254.4200 254.8400 254.4200 254.8100 130322 2104 255.80 14 2025-10-02 09:44:00-04:00 254.7900 254.9600 254.7053 254.7550 185496 2400 255.76 15 2025-10-02 09:45:00-04:00 254.7600 255.1300 254.5250 255.1106 165523 2497 255.72 16 2025-10-02 09:46:00-04:00 255.0900 255.4199 255.0600 255.1600 137451 2204 255.71 17 2025-10-02 09:47:00-04:00 255.1500 255.2200 254.8020 254.9650 129188 2162 255.69 18 2025-10-02 09:48:00-04:00 254.9600 255.1850 254.9200 255.1150 136240 2052 255.67 19 2025-10-02 09:49:00-04:00 255.1150 255.3100 255.0700 255.1400 129102 1876 255.66 20 2025-10-02 09:50:00-04:00 255.1300 255.2200 254.9300 255.1500 118183 1781 255.64 21 2025-10-02 09:51:00-04:00 255.1400 255.5200 255.0700 255.3900 194992 2073 255.63 22 2025-10-02 09:52:00-04:00 255.3700 255.7400 255.3101 255.3600 125463 1782 255.63 23 2025-10-02 09:53:00-04:00 255.4000 255.7750 255.3650 255.7350 151982 1741 255.62 24 2025-10-02 09:54:00-04:00 255.7350 255.9750 255.6600 255.6750 141129 1799 255.63 25 2025-10-02 09:55:00-04:00 255.6600 255.9300 255.6600 255.7900 107766 1357 255.63 26 2025-10-02 09:56:00-04:00 255.8100 255.8444 255.6900 255.7400 66568 1103 255.64 27 2025-10-02 09:57:00-04:00 255.7650 255.7650 255.5300 255.5750 85323 1332 255.64 28 2025-10-02 09:58:00-04:00 255.5700 255.9700 255.5500 255.9700 132838 1663 255.64 29 2025-10-02 09:59:00-04:00 255.9650 256.0800 255.8700 256.0350 204495 1973 255.65 30 2025-10-02 10:00:00-04:00 NaN NaN NaN NaN 0 0 255.65 ' python/polars: schema: *id004 example: 'shape: (31, 8) ┌────────────────────────────────┬──────────┬──────────┬────────┬─────────┬────────┬───────┬────────┐ │ timestamp ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ count ┆ vwap │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ i64 ┆ i64 ┆ f64 │ ╞════════════════════════════════╪══════════╪══════════╪════════╪═════════╪════════╪═══════╪════════╡ │ 2025-10-02 09:30:00 EDT ┆ 256.575 ┆ 256.83 ┆ 256.21 ┆ 256.46 ┆ 929518 ┆ 13659 ┆ 256.57 │ │ 2025-10-02 09:31:00 EDT ┆ 256.47 ┆ 256.85 ┆ 256.35 ┆ 256.37 ┆ 183344 ┆ 2498 ┆ 256.58 │ │ 2025-10-02 09:32:00 EDT ┆ 256.35 ┆ 257.3 ┆ 256.26 ┆ 257.16 ┆ 388614 ┆ 4928 ┆ 256.64 │ │ 2025-10-02 09:33:00 EDT ┆ 257.14 ┆ 257.245 ┆ 256.63 ┆ 256.75 ┆ 233456 ┆ 3195 ┆ 256.68 │ │ 2025-10-02 09:34:00 EDT ┆ 256.7375 ┆ 257.05 ┆ 255.8 ┆ 255.89 ┆ 224588 ┆ 3292 ┆ 256.65 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2025-10-02 09:56:00 EDT ┆ 255.81 ┆ 255.8444 ┆ 255.69 ┆ 255.74 ┆ 66568 ┆ 1103 ┆ 255.64 │ │ 2025-10-02 09:57:00 EDT ┆ 255.765 ┆ 255.765 ┆ 255.53 ┆ 255.575 ┆ 85323 ┆ 1332 ┆ 255.64 │ │ 2025-10-02 09:58:00 EDT ┆ 255.57 ┆ 255.97 ┆ 255.55 ┆ 255.97 ┆ 132838 ┆ 1663 ┆ 255.64 │ │ 2025-10-02 09:59:00 EDT ┆ 255.965 ┆ 256.08 ┆ 255.87 ┆ 256.035 ┆ 204495 ┆ 1973 ┆ 255.65 │ │ 2025-10-02 10:00:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 255.65 │ └────────────────────────────────┴──────────┴──────────┴────────┴─────────┴────────┴───────┴────────┘ ' /stock/history/trade: x-concurrent-limit-ttl-ms: '365' x-min-subscription: standard x-history-access: true get: summary: Trade operationId: stock_history_trade x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''pandas'') df = client.stock_history_trade(symbol=''AAPL'') ' - lang: Python label: polars source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''polars'') df = client.stock_history_trade(symbol=''AAPL'') ' tags: - History description: 'Returns every trade reported by [UTP & CTA](/Articles/Data-And-Requests/The-SIPs). Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data 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). - Multi-day requests are limited to 1 month of data. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/stock/history/trade?symbol=AAPL&date=20240102 description: Returns every trade for a given symbol on specified date - url: http://127.0.0.1:25503/v3/stock/history/trade?symbol=AAPL&date=20240102&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/stock/history/trade?symbol=AAPL&start_date=20240102&end_date=20240105 description: Returns every trade for a given symbol between specified dates (inclusive) - url: http://127.0.0.1:25503/v3/stock/history/trade?symbol=AAPL&start_date=20240102&end_date=20240105&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/venue' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns every trade for a given symbol between specified dates (inclusive) with a one minute interval 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. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. example: "timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price\r\n2024-01-02T09:30:00.011,14920,32,95,1,115,1,2,7,187.1800\r\n2024-01-02T09:30:00.014,8931,32,255,1,115,1,1,1,187.1800\r\n2024-01-02T09:30:00.014,8932,32,255,1,115,1,5,1,187.1800\r\n2024-01-02T09:30:00.014,8933,32,255,1,115,1,3,1,187.1900\r\n2024-01-02T09:30:00.014,8934,32,255,1,115,1,91,1,187.1900\r\n" application/json: schema: &id006 type: array items: *id005 example: "{\n \"response\": [\n {\"sequence\":14920,\"condition\":1,\"size\":2,\"price\":187.1800,\"ext_condition2\":95,\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":7,\"ext_condition3\":1,\"timestamp\":\"2024-01-02T09:30:00.011\"},\n {\"sequence\":8931,\"condition\":1,\"size\":1,\"price\":187.1800,\"ext_condition2\":255,\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":1,\"ext_condition3\":1,\"timestamp\":\"2024-01-02T09:30:00.014\"},\n {\"sequence\":8932,\"condition\":1,\"size\":5,\"price\":187.1800,\"ext_condition2\":255,\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":1,\"ext_condition3\":1,\"timestamp\":\"2024-01-02T09:30:00.014\"},\n {\"sequence\":8933,\"condition\":1,\"size\":3,\"price\":187.1900,\"ext_condition2\":255,\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":1,\"ext_condition3\":1,\"timestamp\":\"2024-01-02T09:30:00.014\"},\n {\"sequence\":8934,\"condition\":1,\"size\":91,\"price\":187.1900,\"ext_condition2\":255,\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":1,\"ext_condition3\":1,\"timestamp\":\"2024-01-02T09:30:00.014\"}\n ]\n}\n" application/x-ndjson: schema: *id006 example: '{"sequence":14920,"condition":1,"size":2,"price":187.1800,"ext_condition2":95,"ext_condition1":32,"ext_condition4":115,"exchange":7,"ext_condition3":1,"timestamp":"2024-01-02T09:30:00.011"} {"sequence":8931,"condition":1,"size":1,"price":187.1800,"ext_condition2":255,"ext_condition1":32,"ext_condition4":115,"exchange":1,"ext_condition3":1,"timestamp":"2024-01-02T09:30:00.014"} {"sequence":8932,"condition":1,"size":5,"price":187.1800,"ext_condition2":255,"ext_condition1":32,"ext_condition4":115,"exchange":1,"ext_condition3":1,"timestamp":"2024-01-02T09:30:00.014"} {"sequence":8933,"condition":1,"size":3,"price":187.1900,"ext_condition2":255,"ext_condition1":32,"ext_condition4":115,"exchange":1,"ext_condition3":1,"timestamp":"2024-01-02T09:30:00.014"} {"sequence":8934,"condition":1,"size":91,"price":187.1900,"ext_condition2":255,"ext_condition1":32,"ext_condition4":115,"exchange":1,"ext_condition3":1,"timestamp":"2024-01-02T09:30:00.014"}' python/pandas: schema: *id006 example: 'timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price 0 2025-10-02 09:30:00.011000-04:00 3900079 32 255 1 115 1 1 1 256.5700 1 2025-10-02 09:30:00.011000-04:00 3900080 32 255 1 115 1 8 1 256.6000 2 2025-10-02 09:30:00.011000-04:00 3900081 32 255 1 115 1 73 1 256.6000 3 2025-10-02 09:30:00.012000-04:00 3900115 32 255 1 115 1 1 1 256.6000 4 2025-10-02 09:30:00.023000-04:00 3900926 32 95 255 115 115 1 65 256.6000 ... ... ... ... ... ... ... ... ... ... ... 13656 2025-10-02 09:30:59.805000-04:00 4592411 32 255 255 115 115 3 57 256.4300 13657 2025-10-02 09:30:59.818000-04:00 4592453 32 96 255 115 96 1 57 256.4300 13658 2025-10-02 09:30:59.944000-04:00 4592956 32 255 255 115 115 16 57 256.4500 13659 2025-10-02 09:30:59.953000-04:00 4592982 32 255 255 115 115 44 57 256.4001 13660 2025-10-02 09:30:59.974000-04:00 4593045 32 255 255 115 115 1 59 256.5000 [13661 rows x 10 columns] ' python/polars: schema: *id006 example: 'shape: (13_661, 10) ┌────────────────────────────────┬──────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬──────────┐ │ timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 │ ╞════════════════════════════════╪══════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪══════════╡ │ 2025-10-02 09:30:00.011 EDT ┆ 3900079 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 1 ┆ 1 ┆ 256.57 │ │ 2025-10-02 09:30:00.011 EDT ┆ 3900080 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 8 ┆ 1 ┆ 256.6 │ │ 2025-10-02 09:30:00.011 EDT ┆ 3900081 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 73 ┆ 1 ┆ 256.6 │ │ 2025-10-02 09:30:00.012 EDT ┆ 3900115 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 1 ┆ 1 ┆ 256.6 │ │ 2025-10-02 09:30:00.023 EDT ┆ 3900926 ┆ 32 ┆ 95 ┆ 255 ┆ 115 ┆ 115 ┆ 1 ┆ 65 ┆ 256.6 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2025-10-02 09:30:59.805 EDT ┆ 4592411 ┆ 32 ┆ 255 ┆ 255 ┆ 115 ┆ 115 ┆ 3 ┆ 57 ┆ 256.43 │ │ 2025-10-02 09:30:59.818 EDT ┆ 4592453 ┆ 32 ┆ 96 ┆ 255 ┆ 115 ┆ 96 ┆ 1 ┆ 57 ┆ 256.43 │ │ 2025-10-02 09:30:59.944 EDT ┆ 4592956 ┆ 32 ┆ 255 ┆ 255 ┆ 115 ┆ 115 ┆ 16 ┆ 57 ┆ 256.45 │ │ 2025-10-02 09:30:59.953 EDT ┆ 4592982 ┆ 32 ┆ 255 ┆ 255 ┆ 115 ┆ 115 ┆ 44 ┆ 57 ┆ 256.4001 │ │ 2025-10-02 09:30:59.974 EDT ┆ 4593045 ┆ 32 ┆ 255 ┆ 255 ┆ 115 ┆ 115 ┆ 1 ┆ 59 ┆ 256.5 │ └────────────────────────────────┴──────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴──────────┘ ' /stock/history/quote: x-concurrent-limit-ttl-ms: '570' x-min-subscription: value x-history-access: true get: summary: Quote operationId: stock_history_quote x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''pandas'') df = client.stock_history_quote(symbol=''AAPL'', interval=''1m'') ' - lang: Python label: polars source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''polars'') df = client.stock_history_quote(symbol=''AAPL'', interval=''1m'') ' tags: - History description: "- Returns every NBBO quote reported by [UTP and CTA](/Articles/Data-And-Requests/The-SIPs). \n- If the ``interval`` parameter is specified, the quote for each interval represents the last quote prior to the interval's timestamp. \n- Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data 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).\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/stock/history/quote?symbol=AAPL&date=20240102&interval=1m description: Returns every quote for a given symbol on the specified date with a one minute interval - url: http://127.0.0.1:25503/v3/stock/history/quote?symbol=AAPL&date=20240102&interval=1m&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/stock/history/quote?symbol=AAPL&start_date=20240102&end_date=20240109&interval=1m description: Returns every quote for a given symbol between specified dates (inclusive) with a one minute interval - url: http://127.0.0.1:25503/v3/stock/history/quote?symbol=AAPL&start_date=20240102&end_date=20240109&interval=1m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/venue' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns every quote for a given symbol between specified dates (inclusive) with a one minute interval 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. 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,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\n2024-01-02T09:30:00,30,7,187.10,0,1,1,187.20,0\r\n2024-01-02T09:31:00,2,1,187.83,0,4,1,187.86,0\r\n2024-01-02T09:32:00,2,60,187.74,0,1,73,187.77,0\r\n2024-01-02T09:33:00,2,60,188.29,0,2,73,188.32,0\r\n2024-01-02T09:34:00,5,1,188.14,0,2,7,188.16,0\r\n" application/json: schema: &id008 type: array items: *id007 example: "{\n \"response\": [\n {\"ask_size\":1,\"bid_size\":30,\"ask_exchange\":1,\"ask_condition\":0,\"bid_exchange\":7,\"ask\":187.20,\"bid\":187.10,\"bid_condition\":0,\"timestamp\":\"2024-01-02T09:30:00\"},\n {\"ask_size\":4,\"bid_size\":2,\"ask_exchange\":1,\"ask_condition\":0,\"bid_exchange\":1,\"ask\":187.86,\"bid\":187.83,\"bid_condition\":0,\"timestamp\":\"2024-01-02T09:31:00\"},\n {\"ask_size\":1,\"bid_size\":2,\"ask_exchange\":73,\"ask_condition\":0,\"bid_exchange\":60,\"ask\":187.77,\"bid\":187.74,\"bid_condition\":0,\"timestamp\":\"2024-01-02T09:32:00\"},\n {\"ask_size\":2,\"bid_size\":2,\"ask_exchange\":73,\"ask_condition\":0,\"bid_exchange\":60,\"ask\":188.32,\"bid\":188.29,\"bid_condition\":0,\"timestamp\":\"2024-01-02T09:33:00\"},\n {\"ask_size\":2,\"bid_size\":5,\"ask_exchange\":7,\"ask_condition\":0,\"bid_exchange\":1,\"ask\":188.16,\"bid\":188.14,\"bid_condition\":0,\"timestamp\":\"2024-01-02T09:34:00\"}\n ]\n}\n" application/x-ndjson: schema: *id008 example: '{"ask_size":1,"bid_size":30,"ask_exchange":1,"ask_condition":0,"bid_exchange":7,"ask":187.20,"bid":187.10,"bid_condition":0,"timestamp":"2024-01-02T09:30:00"} {"ask_size":4,"bid_size":2,"ask_exchange":1,"ask_condition":0,"bid_exchange":1,"ask":187.86,"bid":187.83,"bid_condition":0,"timestamp":"2024-01-02T09:31:00"} {"ask_size":1,"bid_size":2,"ask_exchange":73,"ask_condition":0,"bid_exchange":60,"ask":187.77,"bid":187.74,"bid_condition":0,"timestamp":"2024-01-02T09:32:00"} {"ask_size":2,"bid_size":2,"ask_exchange":73,"ask_condition":0,"bid_exchange":60,"ask":188.32,"bid":188.29,"bid_condition":0,"timestamp":"2024-01-02T09:33:00"} {"ask_size":2,"bid_size":5,"ask_exchange":7,"ask_condition":0,"bid_exchange":1,"ask":188.16,"bid":188.14,"bid_condition":0,"timestamp":"2024-01-02T09:34:00"}' python/pandas: schema: *id008 example: 'timestamp bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition 0 2025-10-02 09:30:00-04:00 3 1 256.55 0 238 7 256.60 0 1 2025-10-02 09:31:00-04:00 7 1 256.40 0 1 73 256.50 0 2 2025-10-02 09:32:00-04:00 2 68 256.33 0 2 1 256.42 0 3 2025-10-02 09:33:00-04:00 5 1 257.14 0 2 1 257.18 0 4 2025-10-02 09:34:00-04:00 2 1 256.74 0 2 1 256.79 0 5 2025-10-02 09:35:00-04:00 1 1 255.88 0 2 7 255.91 0 6 2025-10-02 09:36:00-04:00 2 1 255.39 0 1 7 255.43 0 7 2025-10-02 09:37:00-04:00 1 1 255.20 0 1 60 255.23 0 8 2025-10-02 09:38:00-04:00 2 7 255.13 0 3 7 255.18 0 9 2025-10-02 09:39:00-04:00 2 1 254.84 0 2 1 254.89 0 10 2025-10-02 09:40:00-04:00 6 1 254.53 0 2 1 254.57 0 11 2025-10-02 09:41:00-04:00 2 1 254.20 0 3 1 254.23 0 12 2025-10-02 09:42:00-04:00 1 1 254.36 0 1 60 254.38 0 13 2025-10-02 09:43:00-04:00 2 68 254.39 0 1 1 254.42 0 14 2025-10-02 09:44:00-04:00 2 1 254.78 0 1 60 254.83 0 15 2025-10-02 09:45:00-04:00 1 60 254.74 0 2 1 254.78 0 16 2025-10-02 09:46:00-04:00 3 73 255.09 0 2 68 255.13 0 17 2025-10-02 09:47:00-04:00 4 60 255.15 0 1 1 255.17 0 18 2025-10-02 09:48:00-04:00 3 68 254.94 0 2 68 254.99 0 19 2025-10-02 09:49:00-04:00 1 60 255.10 0 2 60 255.13 0 20 2025-10-02 09:50:00-04:00 1 1 255.10 0 1 1 255.13 0 21 2025-10-02 09:51:00-04:00 2 68 255.14 0 4 60 255.17 0 22 2025-10-02 09:52:00-04:00 2 60 255.37 0 1 1 255.40 0 23 2025-10-02 09:53:00-04:00 1 1 255.35 0 3 68 255.40 0 24 2025-10-02 09:54:00-04:00 1 7 255.73 0 6 1 255.74 0 25 2025-10-02 09:55:00-04:00 2 7 255.66 0 2 64 255.69 0 26 2025-10-02 09:56:00-04:00 6 1 255.77 0 3 1 255.81 0 27 2025-10-02 09:57:00-04:00 2 7 255.74 0 1 7 255.78 0 28 2025-10-02 09:58:00-04:00 1 1 255.56 0 8 60 255.59 0 29 2025-10-02 09:59:00-04:00 3 1 255.95 0 20 1 255.98 0 30 2025-10-02 10:00:00-04:00 2 1 255.99 0 4 65 256.09 0 ' python/polars: schema: *id008 example: 'shape: (31, 9) ┌────────────────────────────────┬──────────┬──────────────┬────────┬───────────────┬──────────┬──────────────┬────────┬───────────────┐ │ timestamp ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 │ ╞════════════════════════════════╪══════════╪══════════════╪════════╪═══════════════╪══════════╪══════════════╪════════╪═══════════════╡ │ 2025-10-02 09:30:00 EDT ┆ 3 ┆ 1 ┆ 256.55 ┆ 0 ┆ 238 ┆ 7 ┆ 256.6 ┆ 0 │ │ 2025-10-02 09:31:00 EDT ┆ 7 ┆ 1 ┆ 256.4 ┆ 0 ┆ 1 ┆ 73 ┆ 256.5 ┆ 0 │ │ 2025-10-02 09:32:00 EDT ┆ 2 ┆ 68 ┆ 256.33 ┆ 0 ┆ 2 ┆ 1 ┆ 256.42 ┆ 0 │ │ 2025-10-02 09:33:00 EDT ┆ 5 ┆ 1 ┆ 257.14 ┆ 0 ┆ 2 ┆ 1 ┆ 257.18 ┆ 0 │ │ 2025-10-02 09:34:00 EDT ┆ 2 ┆ 1 ┆ 256.74 ┆ 0 ┆ 2 ┆ 1 ┆ 256.79 ┆ 0 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2025-10-02 09:56:00 EDT ┆ 6 ┆ 1 ┆ 255.77 ┆ 0 ┆ 3 ┆ 1 ┆ 255.81 ┆ 0 │ │ 2025-10-02 09:57:00 EDT ┆ 2 ┆ 7 ┆ 255.74 ┆ 0 ┆ 1 ┆ 7 ┆ 255.78 ┆ 0 │ │ 2025-10-02 09:58:00 EDT ┆ 1 ┆ 1 ┆ 255.56 ┆ 0 ┆ 8 ┆ 60 ┆ 255.59 ┆ 0 │ │ 2025-10-02 09:59:00 EDT ┆ 3 ┆ 1 ┆ 255.95 ┆ 0 ┆ 20 ┆ 1 ┆ 255.98 ┆ 0 │ │ 2025-10-02 10:00:00 EDT ┆ 2 ┆ 1 ┆ 255.99 ┆ 0 ┆ 4 ┆ 65 ┆ 256.09 ┆ 0 │ └────────────────────────────────┴──────────┴──────────────┴────────┴───────────────┴──────────┴──────────────┴────────┴───────────────┘ ' /stock/history/trade_quote: x-concurrent-limit-ttl-ms: '1858' x-min-subscription: standard x-history-access: true get: summary: Trade Quote operationId: stock_history_trade_quote x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''pandas'') df = client.stock_history_trade_quote(symbol=''AAPL'') ' - lang: Python label: polars source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''polars'') df = client.stock_history_trade_quote(symbol=''AAPL'') ' tags: - History description: 'Returns every trade reported by [UTP & CTA](/Articles/Data-And-Requests/The-SIPs) paired with the last BBO quote reported by [UTP or CTA](/Articles/Data-And-Requests/The-SIPs) at the time of trade. A quote is matched with a trade if its timestamp ``<=`` the trade timestamp. If you prefer to match quotes with timestamps that are ``<`` the trade timestamp, specify the ``exclusive`` parameter to ``true``. Set the ``venue`` parameter to ``nqb`` to access current-day real-time historic data 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). - Multi-day requests are limited to 1 month of data. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/stock/history/trade_quote?symbol=AAPL&date=20240102 description: Returns every trade quote for a given symbol on specified date - url: http://127.0.0.1:25503/v3/stock/history/trade_quote?symbol=AAPL&date=20240102&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/stock/history/trade_quote?symbol=AAPL&start_date=20240102&end_date=20240105 description: Returns every trade quote for a given symbol between specified dates (inclusive) - url: http://127.0.0.1:25503/v3/stock/history/trade_quote?symbol=AAPL&start_date=20240102&end_date=20240105&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/exclusive' - $ref: '#/components/parameters/venue' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns every trade quote for a given symbol between specified dates (inclusive) content: text/csv: schema: type: array items: &id009 type: object properties: trade_timestamp: type: string format: date-time description: The trade date formated as YYYY-MM-DDTHH:mm:ss.SSS format. quote_timestamp: type: string format: date-time description: The quote date formated as YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. 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: "trade_timestamp,quote_timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\n2023-01-03T09:30:00.002,2023-01-03T09:30:00.001,562,32,255,255,115,115,1,60,130.3300,4,7,130.2600,0,1,7,130.4000,0\r\n2023-01-03T09:30:00.003,2023-01-03T09:30:00.002,563,32,255,255,115,115,24,60,130.3300,4,7,130.2600,0,1,7,130.4000,0\r\n2023-01-03T09:30:00.003,2023-01-03T09:30:00.002,564,32,255,255,115,115,40,60,130.3300,4,7,130.2600,0,1,7,130.4000,0\r\n2023-01-03T09:30:00.036,2023-01-03T09:30:00.017,6081,32,95,1,115,1,19,1,130.2500,4,7,130.2600,0,1,1,130.3900,0\r\n2023-01-03T09:30:00.057,2023-01-03T09:30:00.017,6082,32,255,1,115,1,30,1,130.2500,4,7,130.2600,0,1,1,130.3900,0\r\n" application/json: schema: &id010 type: array items: *id009 example: "{\n \"response\": [\n {\"ask_size\":1,\"trade_timestamp\":\"2023-01-03T09:30:00.002\",\"ask_condition\":0,\"sequence\":562,\"condition\":115,\"size\":1,\"bid_size\":4,\"ask_exchange\":7,\"price\":130.3300,\"ext_condition2\":255,\"bid_exchange\":7,\"ask\":130.4000,\"quote_timestamp\":\"2023-01-03T09:30:00.001\",\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":60,\"ext_condition3\":255,\"bid\":130.2600,\"bid_condition\":0},\n {\"ask_size\":1,\"trade_timestamp\":\"2023-01-03T09:30:00.003\",\"ask_condition\":0,\"sequence\":563,\"condition\":115,\"size\":24,\"bid_size\":4,\"ask_exchange\":7,\"price\":130.3300,\"ext_condition2\":255,\"bid_exchange\":7,\"ask\":130.4000,\"quote_timestamp\":\"2023-01-03T09:30:00.002\",\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":60,\"ext_condition3\":255,\"bid\":130.2600,\"bid_condition\":0},\n {\"ask_size\":1,\"trade_timestamp\":\"2023-01-03T09:30:00.003\",\"ask_condition\":0,\"sequence\":564,\"condition\":115,\"size\":40,\"bid_size\":4,\"ask_exchange\":7,\"price\":130.3300,\"ext_condition2\":255,\"bid_exchange\":7,\"ask\":130.4000,\"quote_timestamp\":\"2023-01-03T09:30:00.002\",\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":60,\"ext_condition3\":255,\"bid\":130.2600,\"bid_condition\":0},\n {\"ask_size\":1,\"trade_timestamp\":\"2023-01-03T09:30:00.036\",\"ask_condition\":0,\"sequence\":6081,\"condition\":1,\"size\":19,\"bid_size\":4,\"ask_exchange\":1,\"price\":130.2500,\"ext_condition2\":95,\"bid_exchange\":7,\"ask\":130.3900,\"quote_timestamp\":\"2023-01-03T09:30:00.017\",\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":1,\"ext_condition3\":1,\"bid\":130.2600,\"bid_condition\":0},\n {\"ask_size\":1,\"trade_timestamp\":\"2023-01-03T09:30:00.057\",\"ask_condition\":0,\"sequence\":6082,\"condition\":1,\"size\":30,\"bid_size\":4,\"ask_exchange\":1,\"price\":130.2500,\"ext_condition2\":255,\"bid_exchange\":7,\"ask\":130.3900,\"quote_timestamp\":\"2023-01-03T09:30:00.017\",\"ext_condition1\":32,\"ext_condition4\":115,\"exchange\":1,\"ext_condition3\":1,\"bid\":130.2600,\"bid_condition\":0}\n ]\n}\n" application/x-ndjson: schema: *id010 example: '{"ask_size":1,"trade_timestamp":"2023-01-03T09:30:00.002","ask_condition":0,"sequence":562,"condition":115,"size":1,"bid_size":4,"ask_exchange":7,"price":130.3300,"ext_condition2":255,"bid_exchange":7,"ask":130.4000,"quote_timestamp":"2023-01-03T09:30:00.001","ext_condition1":32,"ext_condition4":115,"exchange":60,"ext_condition3":255,"bid":130.2600,"bid_condition":0} {"ask_size":1,"trade_timestamp":"2023-01-03T09:30:00.003","ask_condition":0,"sequence":563,"condition":115,"size":24,"bid_size":4,"ask_exchange":7,"price":130.3300,"ext_condition2":255,"bid_exchange":7,"ask":130.4000,"quote_timestamp":"2023-01-03T09:30:00.002","ext_condition1":32,"ext_condition4":115,"exchange":60,"ext_condition3":255,"bid":130.2600,"bid_condition":0} {"ask_size":1,"trade_timestamp":"2023-01-03T09:30:00.003","ask_condition":0,"sequence":564,"condition":115,"size":40,"bid_size":4,"ask_exchange":7,"price":130.3300,"ext_condition2":255,"bid_exchange":7,"ask":130.4000,"quote_timestamp":"2023-01-03T09:30:00.002","ext_condition1":32,"ext_condition4":115,"exchange":60,"ext_condition3":255,"bid":130.2600,"bid_condition":0} {"ask_size":1,"trade_timestamp":"2023-01-03T09:30:00.036","ask_condition":0,"sequence":6081,"condition":1,"size":19,"bid_size":4,"ask_exchange":1,"price":130.2500,"ext_condition2":95,"bid_exchange":7,"ask":130.3900,"quote_timestamp":"2023-01-03T09:30:00.017","ext_condition1":32,"ext_condition4":115,"exchange":1,"ext_condition3":1,"bid":130.2600,"bid_condition":0} {"ask_size":1,"trade_timestamp":"2023-01-03T09:30:00.057","ask_condition":0,"sequence":6082,"condition":1,"size":30,"bid_size":4,"ask_exchange":1,"price":130.2500,"ext_condition2":255,"bid_exchange":7,"ask":130.3900,"quote_timestamp":"2023-01-03T09:30:00.017","ext_condition1":32,"ext_condition4":115,"exchange":1,"ext_condition3":1,"bid":130.2600,"bid_condition":0}' python/pandas: schema: *id010 example: 'trade_timestamp quote_timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition 0 2025-10-02 09:30:00.011000-04:00 2025-10-02 09:30:00.007000-04:00 3900079 32 255 1 115 1 1 1 256.57 3 1 256.55 0 238 7 256.60 0 1 2025-10-02 09:30:00.011000-04:00 2025-10-02 09:30:00.007000-04:00 3900080 32 255 1 115 1 8 1 256.60 3 1 256.55 0 238 7 256.60 0 2 2025-10-02 09:30:00.011000-04:00 2025-10-02 09:30:00.007000-04:00 3900081 32 255 1 115 1 73 1 256.60 3 1 256.55 0 238 7 256.60 0 3 2025-10-02 09:30:00.012000-04:00 2025-10-02 09:30:00.012000-04:00 3900115 32 255 1 115 1 1 1 256.60 3 1 256.55 0 238 7 256.60 0 4 2025-10-02 09:30:00.023000-04:00 2025-10-02 09:30:00.023000-04:00 3900926 32 95 255 115 115 1 65 256.60 5 1 256.55 0 238 7 256.60 0 ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 465835 2025-10-02 15:59:59.999000-04:00 2025-10-02 15:59:59.999000-04:00 60929507 32 255 255 255 0 100 1 257.14 168 1 257.13 0 3 1 257.20 0 465836 2025-10-02 15:59:59.999000-04:00 2025-10-02 15:59:59.999000-04:00 60929513 32 255 255 255 0 100 1 257.14 168 1 257.13 0 3 1 257.20 0 465837 2025-10-02 15:59:59.999000-04:00 2025-10-02 15:59:59.999000-04:00 60929526 32 95 255 255 95 100 1 257.14 168 1 257.13 0 3 1 257.20 0 465838 2025-10-02 15:59:59.999000-04:00 2025-10-02 15:59:59.999000-04:00 60929531 32 95 255 255 95 100 1 257.14 168 1 257.13 0 3 1 257.20 0 465839 2025-10-02 16:00:00-04:00 2025-10-02 16:00:00-04:00 60929549 32 255 255 115 115 2 63 257.14 168 1 257.13 0 1 1 257.14 0 [465840 rows x 19 columns] ' python/polars: schema: *id010 example: 'shape: (465_840, 19) ┌────────────────────────────────┬────────────────────────────────┬──────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬────────┬──────────┬──────────────┬────────┬───────────────┬──────────┬──────────────┬────────┬───────────────┐ │ trade_timestamp ┆ quote_timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 │ ╞════════════════════════════════╪════════════════════════════════╪══════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪════════╪══════════╪══════════════╪════════╪═══════════════╪══════════╪══════════════╪════════╪═══════════════╡ │ 2025-10-02 09:30:00.011 EDT ┆ 2025-10-02 09:30:00.007 EDT ┆ 3900079 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 1 ┆ 1 ┆ 256.57 ┆ 3 ┆ 1 ┆ 256.55 ┆ 0 ┆ 238 ┆ 7 ┆ 256.6 ┆ 0 │ │ 2025-10-02 09:30:00.011 EDT ┆ 2025-10-02 09:30:00.007 EDT ┆ 3900080 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 8 ┆ 1 ┆ 256.6 ┆ 3 ┆ 1 ┆ 256.55 ┆ 0 ┆ 238 ┆ 7 ┆ 256.6 ┆ 0 │ │ 2025-10-02 09:30:00.011 EDT ┆ 2025-10-02 09:30:00.007 EDT ┆ 3900081 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 73 ┆ 1 ┆ 256.6 ┆ 3 ┆ 1 ┆ 256.55 ┆ 0 ┆ 238 ┆ 7 ┆ 256.6 ┆ 0 │ │ 2025-10-02 09:30:00.012 EDT ┆ 2025-10-02 09:30:00.012 EDT ┆ 3900115 ┆ 32 ┆ 255 ┆ 1 ┆ 115 ┆ 1 ┆ 1 ┆ 1 ┆ 256.6 ┆ 3 ┆ 1 ┆ 256.55 ┆ 0 ┆ 238 ┆ 7 ┆ 256.6 ┆ 0 │ │ 2025-10-02 09:30:00.023 EDT ┆ 2025-10-02 09:30:00.023 EDT ┆ 3900926 ┆ 32 ┆ 95 ┆ 255 ┆ 115 ┆ 115 ┆ 1 ┆ 65 ┆ 256.6 ┆ 5 ┆ 1 ┆ 256.55 ┆ 0 ┆ 238 ┆ 7 ┆ 256.6 ┆ 0 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2025-10-02 15:59:59.999 EDT ┆ 2025-10-02 15:59:59.999 EDT ┆ 60929507 ┆ 32 ┆ 255 ┆ 255 ┆ 255 ┆ 0 ┆ 100 ┆ 1 ┆ 257.14 ┆ 168 ┆ 1 ┆ 257.13 ┆ 0 ┆ 3 ┆ 1 ┆ 257.2 ┆ 0 │ │ 2025-10-02 15:59:59.999 EDT ┆ 2025-10-02 15:59:59.999 EDT ┆ 60929513 ┆ 32 ┆ 255 ┆ 255 ┆ 255 ┆ 0 ┆ 100 ┆ 1 ┆ 257.14 ┆ 168 ┆ 1 ┆ 257.13 ┆ 0 ┆ 3 ┆ 1 ┆ 257.2 ┆ 0 │ │ 2025-10-02 15:59:59.999 EDT ┆ 2025-10-02 15:59:59.999 EDT ┆ 60929526 ┆ 32 ┆ 95 ┆ 255 ┆ 255 ┆ 95 ┆ 100 ┆ 1 ┆ 257.14 ┆ 168 ┆ 1 ┆ 257.13 ┆ 0 ┆ 3 ┆ 1 ┆ 257.2 ┆ 0 │ │ 2025-10-02 15:59:59.999 EDT ┆ 2025-10-02 15:59:59.999 EDT ┆ 60929531 ┆ 32 ┆ 95 ┆ 255 ┆ 255 ┆ 95 ┆ 100 ┆ 1 ┆ 257.14 ┆ 168 ┆ 1 ┆ 257.13 ┆ 0 ┆ 3 ┆ 1 ┆ 257.2 ┆ 0 │ │ 2025-10-02 16:00:00 EDT ┆ 2025-10-02 16:00:00 EDT ┆ 60929549 ┆ 32 ┆ 255 ┆ 255 ┆ 115 ┆ 115 ┆ 2 ┆ 63 ┆ 257.14 ┆ 168 ┆ 1 ┆ 257.13 ┆ 0 ┆ 1 ┆ 1 ┆ 257.14 ┆ 0 │ └────────────────────────────────┴────────────────────────────────┴──────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴────────┴──────────┴──────────────┴────────┴───────────────┴──────────┴──────────────┴────────┴───────────────┘ ' /option/history/eod: x-concurrent-limit-ttl-ms: '2091' x-min-subscription: free x-history-access: true get: summary: End of Day operationId: option_history_eod x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_eod(\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 4),\n symbol='AAPL',\n expiration=date(2024, 11, 15),\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_eod(\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 4),\n symbol='AAPL',\n expiration=date(2024, 11, 15),\n)\n" tags: - History description: "- Since [OPRA](/Articles/Data-And-Requests/The-SIPs.html) does not provide a national EOD report for options, Theta Data generates a national EOD report at 17:15 ET each day.\n- ``created`` represents the datetime the report was generated and ``last_trade`` represents the datetime of the last trade. \n- The quote in the response represents the last NBBO reported by OPRA at the time of report generation. \n- You can read more about EOD & OHLC data [here](/Articles/Data-And-Requests/OHLC-EOD.html).\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/eod?symbol=AAPL&expiration=20241115&strike=170.000&right=call&start_date=20241104&end_date=20241104 description: Returns EOD report for an option contract - url: http://127.0.0.1:25503/v3/option/history/eod?symbol=AAPL&expiration=*&start_date=20241104&end_date=20241104 description: Returns EOD report for all option contracts - url: http://127.0.0.1:25503/v3/option/history/eod?symbol=AAPL&expiration=*&start_date=20241104&end_date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/start_date' - $ref: '#/components/parameters/end_date' - $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/format' responses: '200': description: Returns EOD report for an option contract content: text/csv: schema: type: array items: &id011 type: object properties: 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. created: type: string format: date-time description: The date formated as YYYY-MM-DDTHH:mm:ss.SSS format. last_trade: type: string format: date-time description: The last trade date formated as YYYY-MM-DDTHH:mm:ss.SSS format. 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. 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: "symbol,expiration,strike,right,created,last_trade,open,high,low,close,volume,count,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\nAAPL,2024-11-15,170.000,CALL,2024-11-04T17:16:56.205,2024-11-04T15:48:12.005,52.54,52.75,52.40,52.40,10,3,70,60,52.05,50,15,47,52.45,50\r\n" application/json: schema: &id012 type: array items: *id011 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":170.000,\"right\":\"CALL\",\"expiration\":\"2024-11-15\"},\n \"data\": [\n {\"ask_size\":15,\"last_trade\":\"2024-11-04T15:48:12.005\",\"created\":\"2024-11-04T17:16:56.205\",\"ask_condition\":50,\"count\":3,\"volume\":10,\"high\":52.75,\"low\":52.40,\"bid_size\":70,\"ask_exchange\":47,\"bid_exchange\":60,\"ask\":52.45,\"bid\":52.05,\"bid_condition\":50,\"close\":52.40,\"open\":52.54} \n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id012 example: '{"symbol":"AAPL","ask_size":15,"last_trade":"2024-11-04T15:48:12.005","created":"2024-11-04T17:16:56.205","ask_condition":50,"strike":170.000,"count":3,"right":"CALL","volume":10,"high":52.75,"low":52.40,"bid_size":70,"ask_exchange":47,"bid_exchange":60,"ask":52.45,"expiration":"2024-11-15","bid":52.05,"bid_condition":50,"close":52.40,"open":52.54}' python/pandas: schema: *id012 example: 'symbol expiration strike right created last_trade open high low close volume count bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition 0 SPY 2025-10-17 420.0 CALL 2025-10-02 17:17:36.964000-04:00 2025-10-02 00:00:00-04:00 0.0 0.0 0.0 0.0 0 0 8 7 248.73 50 60 4 251.53 50 1 SPY 2025-10-17 420.0 CALL 2025-10-03 17:15:49.173000-04:00 2025-10-03 00:00:00-04:00 0.0 0.0 0.0 0.0 0 0 16 42 248.23 50 10 9 251.05 50 ' python/polars: schema: *id012 example: 'shape: (2, 20) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────────────────────────────┬──────┬──────┬─────┬───────┬────────┬───────┬──────────┬──────────────┬────────┬───────────────┬──────────┬──────────────┬────────┬───────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ created ┆ last_trade ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ count ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════════════════════════════╪══════╪══════╪═════╪═══════╪════════╪═══════╪══════════╪══════════════╪════════╪═══════════════╪══════════╪══════════════╪════════╪═══════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-10-02 17:17:36.964 EDT ┆ 2025-10-02 00:00:00 EDT ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0 ┆ 0 ┆ 8 ┆ 7 ┆ 248.73 ┆ 50 ┆ 60 ┆ 4 ┆ 251.53 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-10-03 17:15:49.173 EDT ┆ 2025-10-03 00:00:00 EDT ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0 ┆ 0 ┆ 16 ┆ 42 ┆ 248.23 ┆ 50 ┆ 10 ┆ 9 ┆ 251.05 ┆ 50 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────────────────────────────┴──────┴──────┴─────┴───────┴────────┴───────┴──────────┴──────────────┴────────┴───────────────┴──────────┴──────────────┴────────┴───────────────┘ ' /option/history/ohlc: x-concurrent-limit-ttl-ms: '1045' x-min-subscription: value x-history-access: true get: summary: Open High Low Close operationId: option_history_ohlc x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_ohlc(\n symbol='AAPL',\n expiration=date(2023, 11, 3),\n interval='1m',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_ohlc(\n symbol='AAPL',\n expiration=date(2023, 11, 3),\n interval='1m',\n)\n" tags: - History description: "- Aggregated OHLC bars that use [SIP rules](/Articles/Data-And-Requests/OHLC-EOD.html) for each bar. \n- Time timestamp of the bar represents the opening time of the bar. For a trade to be part of the bar: ``bar timestamp`` <= ``trade time`` < ``bar timestamp + interval``.\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/ohlc?symbol=AAPL&expiration=20231103&strike=170.000&right=call&date=20231103&interval=1m description: Returns OHLC for an option contract - url: http://127.0.0.1:25503/v3/option/history/ohlc?symbol=AAPL&expiration=20231103&strike=170.000&right=call&date=20231103&interval=1m&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/option/history/ohlc?symbol=AAPL&expiration=20231103&strike=170.000&right=call&start_date=20231103&end_date=20231110&interval=1m description: Returns OHLC for an option contract - url: http://127.0.0.1:25503/v3/option/history/ohlc?symbol=AAPL&expiration=20231103&strike=170.000&right=call&start_date=20231103&end_date=20231110&interval=1m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration_no_star' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns OHLC for an option contract content: text/csv: schema: type: array items: &id013 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. 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. vwap: type: number description: The volume weighted average price of the trading session. example: "symbol,expiration,strike,right,timestamp,open,high,low,close,volume,count,vwap\r\nAAPL,2023-11-03,170.000,CALL,2023-11-03T09:30:00,4.48,7.05,3.60,4.00,147,24,4.39\r\nAAPL,2023-11-03,170.000,CALL,2023-11-03T09:31:00,3.85,4.65,3.65,4.65,39,19,4.31\r\nAAPL,2023-11-03,170.000,CALL,2023-11-03T09:32:00,4.75,5.20,4.65,5.00,45,14,4.45\r\nAAPL,2023-11-03,170.000,CALL,2023-11-03T09:33:00,4.95,5.05,4.48,4.49,142,23,4.53\r\nAAPL,2023-11-03,170.000,CALL,2023-11-03T09:34:00,4.50,5.05,4.50,4.73,29,11,4.56\r\n" application/json: schema: &id014 type: array items: *id013 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":170.000,\"right\":\"CALL\",\"expiration\":\"2023-11-03\"},\n \"data\": [\n {\"volume\":147,\"high\":7.05,\"low\":3.60,\"vwap\":4.39,\"count\":24,\"close\":4.00,\"open\":4.48,\"timestamp\":\"2023-11-03T09:30:00\"},\n {\"volume\":39,\"high\":4.65,\"low\":3.65,\"vwap\":4.31,\"count\":19,\"close\":4.65,\"open\":3.85,\"timestamp\":\"2023-11-03T09:31:00\"},\n {\"volume\":45,\"high\":5.20,\"low\":4.65,\"vwap\":4.45,\"count\":14,\"close\":5.00,\"open\":4.75,\"timestamp\":\"2023-11-03T09:32:00\"},\n {\"volume\":142,\"high\":5.05,\"low\":4.48,\"vwap\":4.53,\"count\":23,\"close\":4.49,\"open\":4.95,\"timestamp\":\"2023-11-03T09:33:00\"}, \n {\"volume\":29,\"high\":5.05,\"low\":4.50,\"vwap\":4.56,\"count\":11,\"close\":4.73,\"open\":4.50,\"timestamp\":\"2023-11-03T09:34:00\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id014 example: '{"volume":147,"symbol":"AAPL","high":7.05,"low":3.60,"strike":170.000,"vwap":4.39,"count":24,"expiration":"2023-11-03","right":"CALL","close":4.00,"open":4.48,"timestamp":"2023-11-03T09:30:00"} {"volume":39,"symbol":"AAPL","high":4.65,"low":3.65,"strike":170.000,"vwap":4.31,"count":19,"expiration":"2023-11-03","right":"CALL","close":4.65,"open":3.85,"timestamp":"2023-11-03T09:31:00"} {"volume":45,"symbol":"AAPL","high":5.20,"low":4.65,"strike":170.000,"vwap":4.45,"count":14,"expiration":"2023-11-03","right":"CALL","close":5.00,"open":4.75,"timestamp":"2023-11-03T09:32:00"} {"volume":142,"symbol":"AAPL","high":5.05,"low":4.48,"strike":170.000,"vwap":4.53,"count":23,"expiration":"2023-11-03","right":"CALL","close":4.49,"open":4.95,"timestamp":"2023-11-03T09:33:00"} {"volume":29,"symbol":"AAPL","high":5.05,"low":4.50,"strike":170.000,"vwap":4.56,"count":11,"expiration":"2023-11-03","right":"CALL","close":4.73,"open":4.50,"timestamp":"2023-11-03T09:34:00"}' python/pandas: schema: *id014 example: 'symbol expiration strike right timestamp open high low close volume count vwap 0 SPY 2025-10-17 420.0 CALL 2025-09-19 09:30:00-04:00 NaN NaN NaN NaN 0 0 0.00 1 SPY 2025-10-17 420.0 CALL 2025-09-19 09:31:00-04:00 243.33 243.33 243.33 243.33 2 2 243.33 2 SPY 2025-10-17 420.0 CALL 2025-09-19 09:32:00-04:00 NaN NaN NaN NaN 0 0 243.33 3 SPY 2025-10-17 420.0 CALL 2025-09-19 09:33:00-04:00 NaN NaN NaN NaN 0 0 243.33 4 SPY 2025-10-17 420.0 CALL 2025-09-19 09:34:00-04:00 NaN NaN NaN NaN 0 0 243.33 5 SPY 2025-10-17 420.0 CALL 2025-09-19 09:35:00-04:00 NaN NaN NaN NaN 0 0 243.33 6 SPY 2025-10-17 420.0 CALL 2025-09-19 09:36:00-04:00 243.18 243.18 243.18 243.18 1 1 243.28 7 SPY 2025-10-17 420.0 CALL 2025-09-19 09:37:00-04:00 NaN NaN NaN NaN 0 0 243.28 8 SPY 2025-10-17 420.0 CALL 2025-09-19 09:38:00-04:00 NaN NaN NaN NaN 0 0 243.28 9 SPY 2025-10-17 420.0 CALL 2025-09-19 09:39:00-04:00 NaN NaN NaN NaN 0 0 243.28 10 SPY 2025-10-17 420.0 CALL 2025-09-19 09:40:00-04:00 NaN NaN NaN NaN 0 0 243.28 11 SPY 2025-10-17 420.0 CALL 2025-09-19 09:41:00-04:00 NaN NaN NaN NaN 0 0 243.28 12 SPY 2025-10-17 420.0 CALL 2025-09-19 09:42:00-04:00 NaN NaN NaN NaN 0 0 243.28 13 SPY 2025-10-17 420.0 CALL 2025-09-19 09:43:00-04:00 NaN NaN NaN NaN 0 0 243.28 14 SPY 2025-10-17 420.0 CALL 2025-09-19 09:44:00-04:00 NaN NaN NaN NaN 0 0 243.28 15 SPY 2025-10-17 420.0 CALL 2025-09-19 09:45:00-04:00 NaN NaN NaN NaN 0 0 243.28 16 SPY 2025-10-17 420.0 CALL 2025-09-19 09:46:00-04:00 NaN NaN NaN NaN 0 0 243.28 17 SPY 2025-10-17 420.0 CALL 2025-09-19 09:47:00-04:00 NaN NaN NaN NaN 0 0 243.28 18 SPY 2025-10-17 420.0 CALL 2025-09-19 09:48:00-04:00 NaN NaN NaN NaN 0 0 243.28 19 SPY 2025-10-17 420.0 CALL 2025-09-19 09:49:00-04:00 NaN NaN NaN NaN 0 0 243.28 20 SPY 2025-10-17 420.0 CALL 2025-09-19 09:50:00-04:00 NaN NaN NaN NaN 0 0 243.28 21 SPY 2025-10-17 420.0 CALL 2025-09-19 09:51:00-04:00 NaN NaN NaN NaN 0 0 243.28 22 SPY 2025-10-17 420.0 CALL 2025-09-19 09:52:00-04:00 NaN NaN NaN NaN 0 0 243.28 23 SPY 2025-10-17 420.0 CALL 2025-09-19 09:53:00-04:00 NaN NaN NaN NaN 0 0 243.28 24 SPY 2025-10-17 420.0 CALL 2025-09-19 09:54:00-04:00 NaN NaN NaN NaN 0 0 243.28 25 SPY 2025-10-17 420.0 CALL 2025-09-19 09:55:00-04:00 NaN NaN NaN NaN 0 0 243.28 26 SPY 2025-10-17 420.0 CALL 2025-09-19 09:56:00-04:00 NaN NaN NaN NaN 0 0 243.28 27 SPY 2025-10-17 420.0 CALL 2025-09-19 09:57:00-04:00 NaN NaN NaN NaN 0 0 243.28 28 SPY 2025-10-17 420.0 CALL 2025-09-19 09:58:00-04:00 NaN NaN NaN NaN 0 0 243.28 29 SPY 2025-10-17 420.0 CALL 2025-09-19 09:59:00-04:00 NaN NaN NaN NaN 0 0 243.28 30 SPY 2025-10-17 420.0 CALL 2025-09-19 10:00:00-04:00 NaN NaN NaN NaN 0 0 243.28 ' python/polars: schema: *id014 example: 'shape: (31, 12) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────┬────────┬────────┬────────┬────────┬───────┬────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ count ┆ vwap │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ i64 ┆ i64 ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════╪════════╪════════╪════════╪════════╪═══════╪════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:30:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 0.0 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:31:00 EDT ┆ 243.33 ┆ 243.33 ┆ 243.33 ┆ 243.33 ┆ 2 ┆ 2 ┆ 243.33 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:32:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.33 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:33:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.33 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:34:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.33 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:56:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.28 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:57:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.28 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:58:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.28 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:59:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.28 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 10:00:00 EDT ┆ NaN ┆ NaN ┆ NaN ┆ NaN ┆ 0 ┆ 0 ┆ 243.28 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────┴────────┴────────┴────────┴────────┴───────┴────────┘ ' /option/history/trade: x-concurrent-limit-ttl-ms: '822' x-min-subscription: standard x-history-access: true get: summary: Trade operationId: option_history_trade x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_trade(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_trade(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' tags: - History description: "- Returns every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html). \n- Trade condition mappings can be found [here](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html).\n- Extended trade conditions are not reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) for options, so they can be ignored.\n- Multi-day requests are limited to 1 month of data, and must specify an expiration.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/trade?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104 description: Returns every trade for an option contract - url: http://127.0.0.1:25503/v3/option/history/trade?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241110 description: Returns every trade for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/trade?symbol=AAPL&expiration=*&date=20241104 description: Returns every trade for all option contracts - url: http://127.0.0.1:25503/v3/option/history/trade?symbol=AAPL&expiration=*&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns every trade for an option contract content: text/csv: schema: type: array items: &id015 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. example: "symbol,expiration,strike,right,timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:00.471,18902138,255,255,255,255,130,2,22,3.90\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:01.626,19368856,255,255,255,255,130,1,6,4.25\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:01.698,19403970,255,255,255,255,130,1,6,4.22\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:02.064,19598457,255,255,255,255,18,1,5,4.15\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:02.064,19598464,255,255,255,255,18,1,5,4.15\r\n" application/json: schema: &id016 type: array items: *id015 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":220.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"sequence\":18902138,\"condition\":130,\"size\":2,\"price\":3.90,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":22,\"ext_condition3\":255,\"timestamp\":\"2024-11-04T09:30:00.471\"},\n {\"sequence\":19368856,\"condition\":130,\"size\":1,\"price\":4.25,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"timestamp\":\"2024-11-04T09:30:01.626\"},\n {\"sequence\":19403970,\"condition\":130,\"size\":1,\"price\":4.22,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"timestamp\":\"2024-11-04T09:30:01.698\"},\n {\"sequence\":19598457,\"condition\":18,\"size\":1,\"price\":4.15,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"timestamp\":\"2024-11-04T09:30:02.064\"},\n {\"sequence\":19598464,\"condition\":18,\"size\":1,\"price\":4.15,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"timestamp\":\"2024-11-04T09:30:02.064\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id016 example: '{"symbol":"AAPL","strike":220.000,"right":"CALL","sequence":18902138,"condition":130,"size":2,"price":3.90,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":22,"ext_condition3":255,"timestamp":"2024-11-04T09:30:00.471"} {"symbol":"AAPL","strike":220.000,"right":"CALL","sequence":19368856,"condition":130,"size":1,"price":4.25,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"timestamp":"2024-11-04T09:30:01.626"} {"symbol":"AAPL","strike":220.000,"right":"CALL","sequence":19403970,"condition":130,"size":1,"price":4.22,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"timestamp":"2024-11-04T09:30:01.698"} {"symbol":"AAPL","strike":220.000,"right":"CALL","sequence":19598457,"condition":18,"size":1,"price":4.15,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"timestamp":"2024-11-04T09:30:02.064"} {"symbol":"AAPL","strike":220.000,"right":"CALL","sequence":19598464,"condition":18,"size":1,"price":4.15,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"timestamp":"2024-11-04T09:30:02.064"}' python/pandas: schema: *id016 example: 'symbol expiration strike right timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price 0 AAPL 2025-11-07 220.0 CALL 2025-11-04 10:15:30.932000-05:00 2007064912 255 255 255 255 18 11 7 48.30 1 AAPL 2025-11-07 220.0 CALL 2025-11-04 10:50:31.982000-05:00 -2145289500 255 255 255 255 18 7 7 48.30 2 AAPL 2025-11-07 220.0 CALL 2025-11-04 15:45:43.083000-05:00 -1190941781 255 255 255 255 131 2 65 50.31 ' python/polars: schema: *id016 example: 'shape: (3, 14) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬─────────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬───────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪═════════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪═══════╡ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 10:15:30.932 EST ┆ 2007064912 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 11 ┆ 7 ┆ 48.3 │ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 10:50:31.982 EST ┆ -2145289500 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 7 ┆ 7 ┆ 48.3 │ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 15:45:43.083 EST ┆ -1190941781 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 131 ┆ 2 ┆ 65 ┆ 50.31 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴─────────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴───────┘ ' /option/history/quote: x-concurrent-limit-ttl-ms: '1435' x-min-subscription: value x-history-access: true get: summary: Quote operationId: option_history_quote x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_quote(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='1m',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_quote(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='1m',\n)\n" tags: - History description: "- Returns every NBBO quote reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html). \n- If the ``interval`` parameter is specified, the quote for each interval represents the last quote at the interval's timestamp.\n- Multi-day requests are limited to 1 month of data, and must specify an expiration.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/quote?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104&interval=1m description: Returns every quote for an option contract - url: http://127.0.0.1:25503/v3/option/history/quote?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241111&interval=1m description: Returns every quote for an option contract in the specified date range - url: http://127.0.0.1:25503/v3/option/history/quote?symbol=AAPL&expiration=*&date=20241104&interval=1m description: Returns every quote for all option contracts - url: http://127.0.0.1:25503/v3/option/history/quote?symbol=AAPL&expiration=*&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns every quote for an option contract content: text/csv: schema: type: array items: &id017 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. 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: "symbol,expiration,strike,right,timestamp,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:00,0,42,0.00,50,0,42,0.00,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:31:00,598,5,4.55,50,424,9,4.70,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:32:00,58,46,4.30,50,221,11,4.40,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:33:00,394,43,3.90,50,45,47,4.00,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:34:00,194,11,4.15,50,121,11,4.30,50\r\n" application/json: schema: &id018 type: array items: *id017 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":220.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"ask_size\":0,\"ask_condition\":50,\"bid_size\":0,\"ask_exchange\":42,\"bid_exchange\":42,\"ask\":0.00,\"bid\":0.00,\"bid_condition\":50,\"timestamp\":\"2024-11-04T09:30:00\"},\n {\"ask_size\":424,\"ask_condition\":50,\"bid_size\":598,\"ask_exchange\":9,\"bid_exchange\":5,\"ask\":4.70,\"bid\":4.55,\"bid_condition\":50,\"timestamp\":\"2024-11-04T09:31:00\"},\n {\"ask_size\":221,\"ask_condition\":50,\"bid_size\":58,\"ask_exchange\":11,\"bid_exchange\":46,\"ask\":4.40,\"bid\":4.30,\"bid_condition\":50,\"timestamp\":\"2024-11-04T09:32:00\"},\n {\"ask_size\":45,\"ask_condition\":50,\"bid_size\":394,\"ask_exchange\":47,\"bid_exchange\":43,\"ask\":4.00,\"bid\":3.90,\"bid_condition\":50,\"timestamp\":\"2024-11-04T09:33:00\"},\n {\"ask_size\":121,\"ask_condition\":50,\"bid_size\":194,\"ask_exchange\":11,\"bid_exchange\":11,\"ask\":4.30,\"bid\":4.15,\"bid_condition\":50,\"timestamp\":\"2024-11-04T09:34:00\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id018 example: '{"symbol":"AAPL","ask_size":0,"ask_condition":50,"strike":220.000,"right":"CALL","bid_size":0,"ask_exchange":42,"bid_exchange":42,"ask":0.00,"expiration":"2024-11-08","bid":0.00,"bid_condition":50,"timestamp":"2024-11-04T09:30:00"} {"symbol":"AAPL","ask_size":424,"ask_condition":50,"strike":220.000,"right":"CALL","bid_size":598,"ask_exchange":9,"bid_exchange":5,"ask":4.70,"expiration":"2024-11-08","bid":4.55,"bid_condition":50,"timestamp":"2024-11-04T09:31:00"} {"symbol":"AAPL","ask_size":221,"ask_condition":50,"strike":220.000,"right":"CALL","bid_size":58,"ask_exchange":11,"bid_exchange":46,"ask":4.40,"expiration":"2024-11-08","bid":4.30,"bid_condition":50,"timestamp":"2024-11-04T09:32:00"} {"symbol":"AAPL","ask_size":45,"ask_condition":50,"strike":220.000,"right":"CALL","bid_size":394,"ask_exchange":47,"bid_exchange":43,"ask":4.00,"expiration":"2024-11-08","bid":3.90,"bid_condition":50,"timestamp":"2024-11-04T09:33:00"} {"symbol":"AAPL","ask_size":121,"ask_condition":50,"strike":220.000,"right":"CALL","bid_size":194,"ask_exchange":11,"bid_exchange":11,"ask":4.30,"expiration":"2024-11-08","bid":4.15,"bid_condition":50,"timestamp":"2024-11-04T09:34:00"}' python/pandas: schema: *id018 example: 'symbol expiration strike right timestamp bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition 0 SPY 2025-10-17 420.0 CALL 2025-09-19 09:30:00-04:00 0 5 0.00 50 0 5 0.00 50 1 SPY 2025-10-17 420.0 CALL 2025-09-19 09:31:00-04:00 1 5 241.85 50 11 4 245.21 50 2 SPY 2025-10-17 420.0 CALL 2025-09-19 09:32:00-04:00 1 5 241.85 50 1 69 245.24 50 3 SPY 2025-10-17 420.0 CALL 2025-09-19 09:33:00-04:00 1 5 241.85 50 30 65 245.05 50 4 SPY 2025-10-17 420.0 CALL 2025-09-19 09:34:00-04:00 30 42 241.71 50 10 46 244.84 50 5 SPY 2025-10-17 420.0 CALL 2025-09-19 09:35:00-04:00 30 5 241.71 50 30 65 244.85 50 6 SPY 2025-10-17 420.0 CALL 2025-09-19 09:36:00-04:00 30 5 241.71 50 30 5 244.66 50 7 SPY 2025-10-17 420.0 CALL 2025-09-19 09:37:00-04:00 30 5 241.71 50 10 46 244.71 50 8 SPY 2025-10-17 420.0 CALL 2025-09-19 09:38:00-04:00 30 5 241.71 50 1 69 244.88 50 9 SPY 2025-10-17 420.0 CALL 2025-09-19 09:39:00-04:00 30 5 241.71 50 10 46 244.67 50 10 SPY 2025-10-17 420.0 CALL 2025-09-19 09:40:00-04:00 30 65 241.71 50 30 65 244.80 50 11 SPY 2025-10-17 420.0 CALL 2025-09-19 09:41:00-04:00 30 5 241.71 50 100 31 244.94 50 12 SPY 2025-10-17 420.0 CALL 2025-09-19 09:42:00-04:00 30 65 241.71 50 100 31 244.94 50 13 SPY 2025-10-17 420.0 CALL 2025-09-19 09:43:00-04:00 8 60 241.93 50 100 31 244.94 50 14 SPY 2025-10-17 420.0 CALL 2025-09-19 09:44:00-04:00 30 5 241.80 50 10 46 244.89 50 15 SPY 2025-10-17 420.0 CALL 2025-09-19 09:45:00-04:00 30 65 241.71 50 100 31 244.94 50 16 SPY 2025-10-17 420.0 CALL 2025-09-19 09:46:00-04:00 30 42 241.71 50 10 46 244.83 50 17 SPY 2025-10-17 420.0 CALL 2025-09-19 09:47:00-04:00 30 5 241.80 50 9 60 244.60 50 18 SPY 2025-10-17 420.0 CALL 2025-09-19 09:48:00-04:00 30 65 241.71 50 30 65 244.77 50 19 SPY 2025-10-17 420.0 CALL 2025-09-19 09:49:00-04:00 30 65 241.74 50 100 31 244.94 50 20 SPY 2025-10-17 420.0 CALL 2025-09-19 09:50:00-04:00 1 5 242.13 50 1 76 245.74 50 21 SPY 2025-10-17 420.0 CALL 2025-09-19 09:51:00-04:00 1 5 242.13 50 1 60 245.37 50 22 SPY 2025-10-17 420.0 CALL 2025-09-19 09:52:00-04:00 10 46 242.31 50 10 46 245.83 50 23 SPY 2025-10-17 420.0 CALL 2025-09-19 09:53:00-04:00 10 6 242.75 50 10 6 245.56 50 24 SPY 2025-10-17 420.0 CALL 2025-09-19 09:54:00-04:00 10 46 242.38 50 10 46 245.89 50 25 SPY 2025-10-17 420.0 CALL 2025-09-19 09:55:00-04:00 10 46 242.26 50 10 46 245.77 50 26 SPY 2025-10-17 420.0 CALL 2025-09-19 09:56:00-04:00 10 46 242.26 50 10 46 245.77 50 27 SPY 2025-10-17 420.0 CALL 2025-09-19 09:57:00-04:00 50 4 242.44 50 10 46 245.60 50 28 SPY 2025-10-17 420.0 CALL 2025-09-19 09:58:00-04:00 100 9 242.15 50 10 46 245.63 50 29 SPY 2025-10-17 420.0 CALL 2025-09-19 09:59:00-04:00 100 9 242.15 50 10 46 245.37 50 30 SPY 2025-10-17 420.0 CALL 2025-09-19 10:00:00-04:00 100 9 242.15 50 2 76 245.52 50 ' python/polars: schema: *id018 example: 'shape: (31, 13) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬──────────┬──────────────┬────────┬───────────────┬──────────┬──────────────┬────────┬───────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪══════════╪══════════════╪════════╪═══════════════╪══════════╪══════════════╪════════╪═══════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:30:00 EDT ┆ 0 ┆ 5 ┆ 0.0 ┆ 50 ┆ 0 ┆ 5 ┆ 0.0 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:31:00 EDT ┆ 1 ┆ 5 ┆ 241.85 ┆ 50 ┆ 11 ┆ 4 ┆ 245.21 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:32:00 EDT ┆ 1 ┆ 5 ┆ 241.85 ┆ 50 ┆ 1 ┆ 69 ┆ 245.24 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:33:00 EDT ┆ 1 ┆ 5 ┆ 241.85 ┆ 50 ┆ 30 ┆ 65 ┆ 245.05 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:34:00 EDT ┆ 30 ┆ 42 ┆ 241.71 ┆ 50 ┆ 10 ┆ 46 ┆ 244.84 ┆ 50 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:56:00 EDT ┆ 10 ┆ 46 ┆ 242.26 ┆ 50 ┆ 10 ┆ 46 ┆ 245.77 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:57:00 EDT ┆ 50 ┆ 4 ┆ 242.44 ┆ 50 ┆ 10 ┆ 46 ┆ 245.6 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:58:00 EDT ┆ 100 ┆ 9 ┆ 242.15 ┆ 50 ┆ 10 ┆ 46 ┆ 245.63 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:59:00 EDT ┆ 100 ┆ 9 ┆ 242.15 ┆ 50 ┆ 10 ┆ 46 ┆ 245.37 ┆ 50 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 10:00:00 EDT ┆ 100 ┆ 9 ┆ 242.15 ┆ 50 ┆ 2 ┆ 76 ┆ 245.52 ┆ 50 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴──────────┴──────────────┴────────┴───────────────┴──────────┴──────────────┴────────┴───────────────┘ ' /option/history/trade_quote: x-concurrent-limit-ttl-ms: '1110' x-min-subscription: standard x-history-access: true get: summary: Trade Quote operationId: option_history_trade_quote x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_trade_quote(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_trade_quote(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' tags: - History description: "- Returns every [trade](/operations/option_history_trade.html) reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) paired with the last NBBO quote reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) at the time of trade.\n- A quote is matched with a trade if its timestamp ``<=`` the trade timestamp. \n- To match trades with quotes timestamps that are ``<`` the trade timestamp, specify the ``exclusive``parameter to ``true``. After thorough testing, we have determined that using ``exclusive=true`` might yield better results for various applications.\n- Multi-day requests are limited to 1 month of data, and must specify an expiration.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/trade_quote?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104 description: Returns every trade quote for an option contract - url: http://127.0.0.1:25503/v3/option/history/trade_quote?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241110 description: Returns every trade quote for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/trade_quote?symbol=AAPL&expiration=*&date=20241104 description: Returns every trade quote for all option contracts - url: http://127.0.0.1:25503/v3/option/history/trade_quote?symbol=AAPL&expiration=*&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/exclusive' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns every trade quote for an option contract content: text/csv: schema: type: array items: &id019 type: object properties: 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. trade_timestamp: type: string format: date-time description: The trade date formated as YYYY-MM-DDTHH:mm:ss.SSS format. quote_timestamp: type: string format: date-time description: The quote date formated as YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. 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: "symbol,expiration,strike,right,trade_timestamp,quote_timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:00.471,2024-11-04T09:30:00.396,18902138,255,255,255,255,130,2,22,3.90,14,47,3.90,50,14,47,4.05,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:01.626,2024-11-04T09:30:01.594,19368856,255,255,255,255,130,1,6,4.25,93,76,4.15,50,35,73,4.30,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:01.698,2024-11-04T09:30:01.643,19403970,255,255,255,255,130,1,6,4.22,59,69,4.15,50,59,69,4.30,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:02.064,2024-11-04T09:30:02.039,19598457,255,255,255,255,18,1,5,4.15,31,69,4.15,50,81,11,4.30,50\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:02.064,2024-11-04T09:30:02.039,19598464,255,255,255,255,18,1,5,4.15,31,69,4.15,50,81,11,4.30,50\r\n" application/json: schema: &id020 type: array items: *id019 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":220.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"ask_size\":14,\"trade_timestamp\":\"2024-11-04T09:30:00.471\",\"ask_condition\":50,\"sequence\":18902138,\"condition\":130,\"size\":2,\"bid_size\":14,\"ask_exchange\":47,\"price\":3.90,\"ext_condition2\":255,\"bid_exchange\":47,\"ask\":4.05,\"quote_timestamp\":\"2024-11-04T09:30:00.396\",\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":22,\"ext_condition3\":255,\"bid\":3.90,\"bid_condition\":50},\n {\"ask_size\":35,\"trade_timestamp\":\"2024-11-04T09:30:01.626\",\"ask_condition\":50,\"sequence\":19368856,\"condition\":130,\"size\":1,\"bid_size\":93,\"ask_exchange\":73,\"price\":4.25,\"ext_condition2\":255,\"bid_exchange\":76,\"ask\":4.30,\"quote_timestamp\":\"2024-11-04T09:30:01.594\",\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"bid\":4.15,\"bid_condition\":50},\n {\"ask_size\":59,\"trade_timestamp\":\"2024-11-04T09:30:01.698\",\"ask_condition\":50,\"sequence\":19403970,\"condition\":130,\"size\":1,\"bid_size\":59,\"ask_exchange\":69,\"price\":4.22,\"ext_condition2\":255,\"bid_exchange\":69,\"ask\":4.30,\"quote_timestamp\":\"2024-11-04T09:30:01.643\",\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"bid\":4.15,\"bid_condition\":50},\n {\"ask_size\":81,\"trade_timestamp\":\"2024-11-04T09:30:02.064\",\"ask_condition\":50,\"sequence\":19598457,\"condition\":18,\"size\":1,\"bid_size\":31,\"ask_exchange\":11,\"price\":4.15,\"ext_condition2\":255,\"bid_exchange\":69,\"ask\":4.30,\"quote_timestamp\":\"2024-11-04T09:30:02.039\",\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"bid\":4.15,\"bid_condition\":50},\n {\"ask_size\":81,\"trade_timestamp\":\"2024-11-04T09:30:02.064\",\"ask_condition\":50,\"sequence\":19598464,\"condition\":18,\"size\":1,\"bid_size\":31,\"ask_exchange\":11,\"price\":4.15,\"ext_condition2\":255,\"bid_exchange\":69,\"ask\":4.30,\"quote_timestamp\":\"2024-11-04T09:30:02.039\",\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"bid\":4.15,\"bid_condition\":50} \n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id020 example: '{"symbol":"AAPL","ask_size":14,"trade_timestamp":"2024-11-04T09:30:00.471","ask_condition":50,"strike":220.000,"right":"CALL","sequence":18902138,"condition":130,"size":2,"bid_size":14,"ask_exchange":47,"price":3.90,"ext_condition2":255,"bid_exchange":47,"ask":4.05,"quote_timestamp":"2024-11-04T09:30:00.396","ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":22,"ext_condition3":255,"bid":3.90,"bid_condition":50} {"symbol":"AAPL","ask_size":35,"trade_timestamp":"2024-11-04T09:30:01.626","ask_condition":50,"strike":220.000,"right":"CALL","sequence":19368856,"condition":130,"size":1,"bid_size":93,"ask_exchange":73,"price":4.25,"ext_condition2":255,"bid_exchange":76,"ask":4.30,"quote_timestamp":"2024-11-04T09:30:01.594","ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"bid":4.15,"bid_condition":50} {"symbol":"AAPL","ask_size":59,"trade_timestamp":"2024-11-04T09:30:01.698","ask_condition":50,"strike":220.000,"right":"CALL","sequence":19403970,"condition":130,"size":1,"bid_size":59,"ask_exchange":69,"price":4.22,"ext_condition2":255,"bid_exchange":69,"ask":4.30,"quote_timestamp":"2024-11-04T09:30:01.643","ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"bid":4.15,"bid_condition":50} {"symbol":"AAPL","ask_size":81,"trade_timestamp":"2024-11-04T09:30:02.064","ask_condition":50,"strike":220.000,"right":"CALL","sequence":19598457,"condition":18,"size":1,"bid_size":31,"ask_exchange":11,"price":4.15,"ext_condition2":255,"bid_exchange":69,"ask":4.30,"quote_timestamp":"2024-11-04T09:30:02.039","ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"bid":4.15,"bid_condition":50} {"symbol":"AAPL","ask_size":81,"trade_timestamp":"2024-11-04T09:30:02.064","ask_condition":50,"strike":220.000,"right":"CALL","sequence":19598464,"condition":18,"size":1,"bid_size":31,"ask_exchange":11,"price":4.15,"ext_condition2":255,"bid_exchange":69,"ask":4.30,"quote_timestamp":"2024-11-04T09:30:02.039","ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"bid":4.15,"bid_condition":50}' python/pandas: schema: *id020 example: 'symbol expiration strike right trade_timestamp quote_timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition 0 AAPL 2025-11-07 220.0 CALL 2025-11-04 10:15:30.932000-05:00 2025-11-04 10:15:30.932000-05:00 2007064912 255 255 255 255 18 11 7 48.30 10 5 48.30 50 172 4 49.10 50 1 AAPL 2025-11-07 220.0 CALL 2025-11-04 10:50:31.982000-05:00 2025-11-04 10:50:31.982000-05:00 -2145289500 255 255 255 255 18 7 7 48.30 2 76 47.95 50 323 4 49.05 50 2 AAPL 2025-11-07 220.0 CALL 2025-11-04 15:45:43.083000-05:00 2025-11-04 15:45:33.488000-05:00 -1190941781 255 255 255 255 131 2 65 50.31 348 4 49.95 50 179 4 50.80 50 ' python/polars: schema: *id020 example: 'shape: (3, 23) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────────────────────────────┬─────────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬───────┬──────────┬──────────────┬───────┬───────────────┬──────────┬──────────────┬───────┬───────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ trade_timestamp ┆ quote_timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════════════════════════════╪═════════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪═══════╪══════════╪══════════════╪═══════╪═══════════════╪══════════╪══════════════╪═══════╪═══════════════╡ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 10:15:30.932 EST ┆ 2025-11-04 10:15:30.932 EST ┆ 2007064912 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 11 ┆ 7 ┆ 48.3 ┆ 10 ┆ 5 ┆ 48.3 ┆ 50 ┆ 172 ┆ 4 ┆ 49.1 ┆ 50 │ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 10:50:31.982 EST ┆ 2025-11-04 10:50:31.982 EST ┆ -2145289500 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 7 ┆ 7 ┆ 48.3 ┆ 2 ┆ 76 ┆ 47.95 ┆ 50 ┆ 323 ┆ 4 ┆ 49.05 ┆ 50 │ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 15:45:43.083 EST ┆ 2025-11-04 15:45:33.488 EST ┆ -1190941781 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 131 ┆ 2 ┆ 65 ┆ 50.31 ┆ 348 ┆ 4 ┆ 49.95 ┆ 50 ┆ 179 ┆ 4 ┆ 50.8 ┆ 50 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────────────────────────────┴─────────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴───────┴──────────┴──────────────┴───────┴───────────────┴──────────┴──────────────┴───────┴───────────────┘ ' /option/history/open_interest: x-concurrent-limit-ttl-ms: '1191' x-min-subscription: value x-history-access: true get: summary: Open Interest operationId: option_history_open_interest x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_open_interest(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_open_interest(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' tags: - History description: '- Open Interest is normally reported once per day by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) at approximately 06:30 ET. - A new open interest message might not be sent by [OPRA](/Articles/Data-And-Requests/The-SIPs.html) if there is no open interest for the option contract. - The reported open interest represents the open interest at the end of the previous trading day. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/open_interest?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104 description: Returns open interest for an option contract - url: http://127.0.0.1:25503/v3/option/history/open_interest?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241107 description: Returns open interest for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/open_interest?symbol=AAPL&expiration=*&date=20241104 description: Returns open interest for all option contracts - url: http://127.0.0.1:25503/v3/option/history/open_interest?symbol=AAPL&expiration=*&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $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/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns open interest for an option contract content: text/csv: schema: type: array items: &id021 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. open_interest: type: integer description: The total amount of outstanding contracts. example: "symbol,expiration,strike,right,timestamp,open_interest\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T06:30:04,2732\r\n" application/json: schema: &id022 type: array items: *id021 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":220.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"open_interest\":2732,\"timestamp\":\"2024-11-04T06:30:04\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id022 example: '{"symbol":"AAPL","strike":220.000,"open_interest":2732,"expiration":"2024-11-08","right":"CALL","timestamp":"2024-11-04T06:30:04"}' python/pandas: schema: *id022 example: 'symbol expiration strike right timestamp open_interest 0 SPY 2025-10-17 420.0 CALL 2025-09-19 06:30:00.997000-04:00 3 ' python/polars: schema: *id022 example: 'shape: (1, 6) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬───────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ open_interest │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪═══════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 06:30:00.997 EDT ┆ 3 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴───────────────┘ ' /option/history/greeks/eod: x-concurrent-limit-ttl-ms: '820' x-min-subscription: standard x-history-access: true get: summary: End of Day Greeks operationId: option_history_greeks_eod x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_greeks_eod(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 4),\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_greeks_eod(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 4),\n)\n" tags: - History description: "- Returns the data for all contracts that share the same provided symbol and expiration. \n- Uses Theta Data's EOD reports that get generated at 17:15 ET each day. The closing option price and closing underlying price are used for the greeks calculation.\n- **Set `expiration` to ``*`` if you want to retrieve data for every option that shares the same ``symbol``. (note: Any ``expiration=*`` must be requested day by day)**\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/greeks/eod?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241104 description: Returns EOD report for an option contract - url: http://127.0.0.1:25503/v3/option/history/greeks/eod?symbol=AAPL&expiration=*&start_date=20241104&end_date=20241104 description: Returns EOD report for all option contracts - url: http://127.0.0.1:25503/v3/option/history/greeks/eod?symbol=AAPL&expiration=*&start_date=20241104&end_date=20241104&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/start_date' - $ref: '#/components/parameters/end_date' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/underlyer_use_nbbo' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' responses: '200': description: Returns EOD report for an option contract content: text/csv: schema: type: array items: &id023 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. 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. 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). delta: type: number description: The delta. theta: type: string description: The Theta. vega: type: number description: The vega. rho: type: number description: The rho. epsilon: type: string description: The epsilon. lambda: type: number description: The lambda. gamma: type: number description: The gamma. vanna: type: string description: The vanna. charm: type: number description: The charm. vomma: type: number description: The vomma. veta: type: number description: The veta. vera: type: number description: The vera. speed: type: number description: The speed. zomma: type: number description: The zomma. color: type: string description: The color. ultima: type: string description: The ultima. d1: type: number description: The d1. d2: type: number description: The d2. dual_delta: type: string description: The dual delta. dual_gamma: type: number description: The dual gamma. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,open,high,low,close,volume,count,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition,delta,theta,vega,rho,epsilon,lambda,gamma,vanna,charm,vomma,veta,vera,speed,zomma,color,ultima,d1,d2,dual_delta,dual_gamma,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T15:59:59.828,3.90,4.85,3.35,4.15,7425,1511,9,11,4.10,50,12,5,4.25,50,0.6083,-0.3892,8.9221,1.4334,-1.4791,32.3623,0.0495,-0.2765,3.6779,1.7667,0.0149,0.0000,0.0000,0.0000,-0.0163,-15.6407,0.2750,0.2401,-0.5945,0.0000,0.3334,0.0001,2024-11-04T17:15:28.71,221.870\r\n" application/json: schema: &id024 type: array items: *id023 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":220.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"ask_size\":12,\"dual_delta\":-0.5945,\"color\":-0.0163,\"zomma\":0.0000,\"delta\":0.6083,\"implied_vol\":0.3334,\"theta\":-0.3892,\"d1\":0.2750,\"speed\":0.0000,\"d2\":0.2401,\"epsilon\":-1.4791,\"high\":4.85,\"lambda\":32.3623,\"low\":3.35,\"ask_exchange\":5,\"bid_exchange\":11,\"vomma\":1.7667,\"bid_condition\":50,\"underlying_timestamp\":\"2024-11-04T17:15:28.71\",\"close\":4.15,\"timestamp\":\"2024-11-04T15:59:59.828\",\"underlying_price\":221.870,\"ask_condition\":50,\"count\":1511,\"vera\":0.0000,\"veta\":0.0149,\"iv_error\":0.0001,\"ultima\":-15.6407,\"volume\":7425,\"charm\":3.6779,\"bid_size\":9,\"ask\":4.25,\"rho\":1.4334,\"vanna\":-0.2765,\"dual_gamma\":0.0000,\"bid\":4.10,\"open\":3.90,\"vega\":8.9221,\"gamma\":0.0495}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id024 example: '{"symbol":"AAPL","ask_size":12,"dual_delta":-0.5945,"color":-0.0163,"zomma":0.0000,"delta":0.6083,"implied_vol":0.3334,"theta":-0.3892,"d1":0.2750,"speed":0.0000,"d2":0.2401,"epsilon":-1.4791,"high":4.85,"lambda":32.3623,"low":3.35,"ask_exchange":5,"bid_exchange":11,"vomma":1.7667,"bid_condition":50,"underlying_timestamp":"2024-11-04T17:15:28.71","close":4.15,"timestamp":"2024-11-04T15:59:59.828","underlying_price":221.870,"ask_condition":50,"strike":220.000,"count":1511,"vera":0.0000,"right":"CALL","veta":0.0149,"iv_error":0.0001,"ultima":-15.6407,"volume":7425,"charm":3.6779,"bid_size":9,"ask":4.25,"rho":1.4334,"expiration":"2024-11-08","vanna":-0.2765,"dual_gamma":0.0000,"bid":4.10,"open":3.90,"vega":8.9221,"gamma":0.0495}' python/pandas: schema: *id024 example: 'symbol expiration strike right timestamp open high low close volume count bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition delta theta vega rho epsilon lambda gamma vanna charm vomma veta vera speed zomma color ultima d1 d2 dual_delta dual_gamma implied_vol iv_error underlying_timestamp underlying_price 0 SPY 2025-10-17 420.0 CALL 2025-10-02 00:00:00-04:00 0.0 0.0 0.0 0.0 0 0 8 7 248.73 50 60 4 251.53 50 0.9954 -0.1025 1.7913 17.0986 -27.3779 2.6634 0.0001 -0.0349 0.3866 12.3821 158.7341 -1.035 0.0 0.0006 0.0068 44.9632 2.6108 2.4251 -0.9906 0.0002 0.916 0.0000 2025-10-02 17:15:37.150000-04:00 669.22 1 SPY 2025-10-17 420.0 CALL 2025-10-03 00:00:00-04:00 0.0 0.0 0.0 0.0 0 0 16 42 248.23 50 10 9 251.05 50 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.000 0.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.000 0.0009 2025-10-03 17:15:42.078000-04:00 669.21 ' python/polars: schema: *id024 example: 'shape: (2, 43) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬──────┬──────┬─────┬───────┬────────┬───────┬──────────┬──────────────┬────────┬───────────────┬──────────┬──────────────┬────────┬───────────────┬────────┬─────────┬────────┬─────────┬──────────┬────────┬────────┬─────────┬────────┬─────────┬──────────┬────────┬───────┬────────┬────────┬─────────┬────────┬────────┬────────────┬────────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ count ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition ┆ delta ┆ theta ┆ vega ┆ rho ┆ epsilon ┆ lambda ┆ gamma ┆ vanna ┆ charm ┆ vomma ┆ veta ┆ vera ┆ speed ┆ zomma ┆ color ┆ ultima ┆ d1 ┆ d2 ┆ dual_delta ┆ dual_gamma ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪══════╪══════╪═════╪═══════╪════════╪═══════╪══════════╪══════════════╪════════╪═══════════════╪══════════╪══════════════╪════════╪═══════════════╪════════╪═════════╪════════╪═════════╪══════════╪════════╪════════╪═════════╪════════╪═════════╪══════════╪════════╪═══════╪════════╪════════╪═════════╪════════╪════════╪════════════╪════════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-10-02 00:00:00 EDT ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0 ┆ 0 ┆ 8 ┆ 7 ┆ 248.73 ┆ 50 ┆ 60 ┆ 4 ┆ 251.53 ┆ 50 ┆ 0.9954 ┆ -0.1025 ┆ 1.7913 ┆ 17.0986 ┆ -27.3779 ┆ 2.6634 ┆ 0.0001 ┆ -0.0349 ┆ 0.3866 ┆ 12.3821 ┆ 158.7341 ┆ -1.035 ┆ 0.0 ┆ 0.0006 ┆ 0.0068 ┆ 44.9632 ┆ 2.6108 ┆ 2.4251 ┆ -0.9906 ┆ 0.0002 ┆ 0.916 ┆ 0.0 ┆ 2025-10-02 17:15:37.150 EDT ┆ 669.22 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-10-03 00:00:00 EDT ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0 ┆ 0 ┆ 16 ┆ 42 ┆ 248.23 ┆ 50 ┆ 10 ┆ 9 ┆ 251.05 ┆ 50 ┆ 1.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0009 ┆ 2025-10-03 17:15:42.078 EDT ┆ 669.21 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴──────┴──────┴─────┴───────┴────────┴───────┴──────────┴──────────────┴────────┴───────────────┴──────────┴──────────────┴────────┴───────────────┴────────┴─────────┴────────┴─────────┴──────────┴────────┴────────┴─────────┴────────┴─────────┴──────────┴────────┴───────┴────────┴────────┴─────────┴────────┴────────┴────────────┴────────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/greeks/all: x-concurrent-limit-ttl-ms: '5944' x-min-subscription: professional x-history-access: true get: summary: All Greeks operationId: option_history_greeks_all x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_greeks_all(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='10m',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_greeks_all(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='10m',\n)\n" tags: - History description: "- Returns the data for all contracts that share the same provided symbol and expiration. \n- Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint. \n- The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/greeks/all?symbol=AAPL&expiration=20241108&date=20241104&interval=10m description: Returns all greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/greeks/all?symbol=AAPL&expiration=20241108&date=20241104&interval=10m&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/option/history/greeks/all?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241111&interval=10m description: Returns all greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/greeks/all?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241111&interval=10m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration_no_star' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns all greeks for an option contract content: text/csv: schema: type: array items: &id025 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. bid: type: number description: The last NBBO bid price. ask: type: number description: The last NBBO ask price. delta: type: number description: The delta. theta: type: number description: The Theta. vega: type: number description: The vega. rho: type: number description: The rho. epsilon: type: number description: The epsilon. lambda: type: number description: The lambda. gamma: type: number description: The gamma. vanna: type: number description: The vanna. charm: type: number description: The charm. vomma: type: number description: The vomma. veta: type: number description: The veta. vera: type: number description: The vera. speed: type: number description: The speed. zomma: type: number description: The zomma. color: type: number description: The color. ultima: type: number description: The ultima. d1: type: string description: The d1. d2: type: string description: The d2. dual_delta: type: number description: The dual delta. dual_gamma: type: number description: The dual gamma. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,bid,ask,delta,theta,vega,rho,epsilon,lambda,gamma,vanna,charm,vomma,veta,vera,speed,zomma,color,ultima,d1,d2,dual_delta,dual_gamma,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:30:00,0.00,0.00,0.0000,0.0000,0.0000,0.0000,0.0000,261.9304,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0001,-6.5422,-6.5683,0.0000,0.0000,0.2500,100.0000,2024-11-04T09:30:00,221.00\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:40:00,0.00,0.02,0.0026,-0.0138,0.1873,0.0062,-0.0063,55.3974,0.0005,0.0393,-1.0623,2.5389,0.0136,0.0000,0.0000,0.0000,-0.0005,21.4427,-2.7911,-2.8526,-0.0021,0.0000,0.5874,0.0455,2024-11-04T09:40:00,220.56\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:50:00,0.00,0.02,0.0025,-0.0130,0.1807,0.0059,-0.0060,56.7822,0.0005,0.0388,-1.0265,2.5262,0.0133,0.0000,0.0000,0.0000,-0.0005,22.1272,-2.8050,-2.8652,-0.0020,0.0000,0.5749,-0.0199,2024-11-04T09:50:00,221.20\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T10:00:00,0.00,0.02,0.0025,-0.0129,0.1825,0.0060,-0.0061,57.9900,0.0006,0.0399,-1.0319,2.6034,0.0136,0.0000,0.0000,0.0000,-0.0005,23.2345,-2.8027,-2.8616,-0.0021,0.0000,0.5625,-0.0299,2024-11-04T10:00:00,222.06\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T10:10:00,0.00,0.01,0.0000,0.0000,0.0000,0.0000,0.0000,254.5285,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0004,-6.3404,-6.3666,0.0000,0.0000,0.2500,100.0000,2024-11-04T10:10:00,222.17\r\n" application/json: schema: &id026 type: array items: *id025 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":262.500,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"dual_delta\":0.0000,\"color\":0.0000,\"zomma\":0.0000,\"delta\":0.0000,\"implied_vol\":0.2500,\"theta\":0.0000,\"d1\":-6.5422,\"speed\":0.0000,\"d2\":-6.5683,\"epsilon\":0.0000,\"lambda\":261.9304,\"vomma\":0.0000,\"underlying_timestamp\":\"2024-11-04T09:30:00\",\"timestamp\":\"2024-11-04T09:30:00\",\"underlying_price\":221.00,\"vera\":0.0000,\"veta\":0.0000,\"iv_error\":100.0000,\"ultima\":0.0001,\"charm\":0.0000,\"ask\":0.00,\"rho\":0.0000,\"vanna\":0.0000,\"dual_gamma\":0.0000,\"bid\":0.00,\"vega\":0.0000,\"gamma\":0.0000},\n {\"dual_delta\":-0.0021,\"color\":-0.0005,\"zomma\":0.0000,\"delta\":0.0026,\"implied_vol\":0.5874,\"theta\":-0.0138,\"d1\":-2.7911,\"speed\":0.0000,\"d2\":-2.8526,\"epsilon\":-0.0063,\"lambda\":55.3974,\"vomma\":2.5389,\"underlying_timestamp\":\"2024-11-04T09:40:00\",\"timestamp\":\"2024-11-04T09:40:00\",\"underlying_price\":220.56,\"vera\":0.0000,\"veta\":0.0136,\"iv_error\":0.0455,\"ultima\":21.4427,\"charm\":-1.0623,\"ask\":0.02,\"rho\":0.0062,\"vanna\":0.0393,\"dual_gamma\":0.0000,\"bid\":0.00,\"vega\":0.1873,\"gamma\":0.0005},\n {\"dual_delta\":-0.0020,\"color\":-0.0005,\"zomma\":0.0000,\"delta\":0.0025,\"implied_vol\":0.5749,\"theta\":-0.0130,\"d1\":-2.8050,\"speed\":0.0000,\"d2\":-2.8652,\"epsilon\":-0.0060,\"lambda\":56.7822,\"vomma\":2.5262,\"underlying_timestamp\":\"2024-11-04T09:50:00\",\"timestamp\":\"2024-11-04T09:50:00\",\"underlying_price\":221.20,\"vera\":0.0000,\"veta\":0.0133,\"iv_error\":-0.0199,\"ultima\":22.1272,\"charm\":-1.0265,\"ask\":0.02,\"rho\":0.0059,\"vanna\":0.0388,\"dual_gamma\":0.0000,\"bid\":0.00,\"vega\":0.1807,\"gamma\":0.0005},\n {\"dual_delta\":-0.0021,\"color\":-0.0005,\"zomma\":0.0000,\"delta\":0.0025,\"implied_vol\":0.5625,\"theta\":-0.0129,\"d1\":-2.8027,\"speed\":0.0000,\"d2\":-2.8616,\"epsilon\":-0.0061,\"lambda\":57.9900,\"vomma\":2.6034,\"underlying_timestamp\":\"2024-11-04T10:00:00\",\"timestamp\":\"2024-11-04T10:00:00\",\"underlying_price\":222.06,\"vera\":0.0000,\"veta\":0.0136,\"iv_error\":-0.0299,\"ultima\":23.2345,\"charm\":-1.0319,\"ask\":0.02,\"rho\":0.0060,\"vanna\":0.0399,\"dual_gamma\":0.0000,\"bid\":0.00,\"vega\":0.1825,\"gamma\":0.0006},\n {\"dual_delta\":0.0000,\"color\":0.0000,\"zomma\":0.0000,\"delta\":0.0000,\"implied_vol\":0.2500,\"theta\":0.0000,\"d1\":-6.3404,\"speed\":0.0000,\"d2\":-6.3666,\"epsilon\":0.0000,\"lambda\":254.5285,\"vomma\":0.0000,\"underlying_timestamp\":\"2024-11-04T10:10:00\",\"timestamp\":\"2024-11-04T10:10:00\",\"underlying_price\":222.17,\"vera\":0.0000,\"veta\":0.0000,\"iv_error\":100.0000,\"ultima\":0.0004,\"charm\":0.0000,\"ask\":0.01,\"rho\":0.0000,\"vanna\":0.0000,\"dual_gamma\":0.0000,\"bid\":0.00,\"vega\":0.0000,\"gamma\":0.0000}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id026 example: '{"symbol":"AAPL","dual_delta":0.0000,"color":0.0000,"zomma":0.0000,"delta":0.0000,"implied_vol":0.2500,"theta":0.0000,"d1":-6.5422,"speed":0.0000,"d2":-6.5683,"epsilon":0.0000,"lambda":261.9304,"vomma":0.0000,"underlying_timestamp":"2024-11-04T09:30:00","timestamp":"2024-11-04T09:30:00","underlying_price":221.00,"strike":262.500,"vera":0.0000,"right":"CALL","veta":0.0000,"iv_error":100.0000,"ultima":0.0001,"charm":0.0000,"ask":0.00,"rho":0.0000,"expiration":"2024-11-08","vanna":0.0000,"dual_gamma":0.0000,"bid":0.00,"vega":0.0000,"gamma":0.0000} {"symbol":"AAPL","dual_delta":-0.0021,"color":-0.0005,"zomma":0.0000,"delta":0.0026,"implied_vol":0.5874,"theta":-0.0138,"d1":-2.7911,"speed":0.0000,"d2":-2.8526,"epsilon":-0.0063,"lambda":55.3974,"vomma":2.5389,"underlying_timestamp":"2024-11-04T09:40:00","timestamp":"2024-11-04T09:40:00","underlying_price":220.56,"strike":262.500,"vera":0.0000,"right":"CALL","veta":0.0136,"iv_error":0.0455,"ultima":21.4427,"charm":-1.0623,"ask":0.02,"rho":0.0062,"expiration":"2024-11-08","vanna":0.0393,"dual_gamma":0.0000,"bid":0.00,"vega":0.1873,"gamma":0.0005} {"symbol":"AAPL","dual_delta":-0.0020,"color":-0.0005,"zomma":0.0000,"delta":0.0025,"implied_vol":0.5749,"theta":-0.0130,"d1":-2.8050,"speed":0.0000,"d2":-2.8652,"epsilon":-0.0060,"lambda":56.7822,"vomma":2.5262,"underlying_timestamp":"2024-11-04T09:50:00","timestamp":"2024-11-04T09:50:00","underlying_price":221.20,"strike":262.500,"vera":0.0000,"right":"CALL","veta":0.0133,"iv_error":-0.0199,"ultima":22.1272,"charm":-1.0265,"ask":0.02,"rho":0.0059,"expiration":"2024-11-08","vanna":0.0388,"dual_gamma":0.0000,"bid":0.00,"vega":0.1807,"gamma":0.0005} {"symbol":"AAPL","dual_delta":-0.0021,"color":-0.0005,"zomma":0.0000,"delta":0.0025,"implied_vol":0.5625,"theta":-0.0129,"d1":-2.8027,"speed":0.0000,"d2":-2.8616,"epsilon":-0.0061,"lambda":57.9900,"vomma":2.6034,"underlying_timestamp":"2024-11-04T10:00:00","timestamp":"2024-11-04T10:00:00","underlying_price":222.06,"strike":262.500,"vera":0.0000,"right":"CALL","veta":0.0136,"iv_error":-0.0299,"ultima":23.2345,"charm":-1.0319,"ask":0.02,"rho":0.0060,"expiration":"2024-11-08","vanna":0.0399,"dual_gamma":0.0000,"bid":0.00,"vega":0.1825,"gamma":0.0006} {"symbol":"AAPL","dual_delta":0.0000,"color":0.0000,"zomma":0.0000,"delta":0.0000,"implied_vol":0.2500,"theta":0.0000,"d1":-6.3404,"speed":0.0000,"d2":-6.3666,"epsilon":0.0000,"lambda":254.5285,"vomma":0.0000,"underlying_timestamp":"2024-11-04T10:10:00","timestamp":"2024-11-04T10:10:00","underlying_price":222.17,"strike":262.500,"vera":0.0000,"right":"CALL","veta":0.0000,"iv_error":100.0000,"ultima":0.0004,"charm":0.0000,"ask":0.01,"rho":0.0000,"expiration":"2024-11-08","vanna":0.0000,"dual_gamma":0.0000,"bid":0.00,"vega":0.0000,"gamma":0.0000}' python/pandas: schema: *id026 example: 'symbol expiration strike right timestamp bid ask delta theta vega rho epsilon lambda gamma vanna charm vomma veta vera speed zomma color ultima d1 d2 dual_delta dual_gamma implied_vol iv_error underlying_timestamp underlying_price 0 SPY 2025-10-17 420.0 CALL 2025-09-19 09:30:00-04:00 0.00 0.00 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 100.0 2025-09-19 09:30:00-04:00 662.31 1 SPY 2025-10-17 420.0 CALL 2025-09-19 09:31:00-04:00 241.85 245.21 0.9922 -0.0968 3.9248 31.6941 -50.3758 2.6965 0.0001 -0.0667 0.3054 29.5861 161.0257 -3.6891 0.0 0.0010 0.0045 98.1837 2.4186 2.2212 -0.9837 0.0004 0.7126 0.0 2025-09-19 09:31:00-04:00 661.84 2 SPY 2025-10-17 420.0 CALL 2025-09-19 09:32:00-04:00 241.85 245.24 0.9930 -0.0911 3.5425 31.7413 -50.4238 2.6989 0.0001 -0.0626 0.2813 28.2454 150.0252 -3.4510 0.0 0.0009 0.0044 103.8173 2.4606 2.2669 -0.9851 0.0003 0.6996 0.0 2025-09-19 09:32:00-04:00 661.90 3 SPY 2025-10-17 420.0 CALL 2025-09-19 09:33:00-04:00 241.85 245.05 0.9934 -0.0888 3.3830 31.7607 -50.4363 2.7006 0.0001 -0.0608 0.2711 27.6521 145.2796 -3.3486 0.0 0.0009 0.0043 106.1833 2.4792 2.2871 -0.9857 0.0003 0.6937 0.0 2025-09-19 09:33:00-04:00 661.83 4 SPY 2025-10-17 420.0 CALL 2025-09-19 09:34:00-04:00 241.71 244.84 0.9923 -0.0957 3.8551 31.7028 -50.3645 2.6988 0.0001 -0.0660 0.3012 29.3738 159.0453 -3.6494 0.0 0.0010 0.0045 99.3614 2.4258 2.2293 -0.9839 0.0004 0.7097 0.0 2025-09-19 09:34:00-04:00 661.59 5 SPY 2025-10-17 420.0 CALL 2025-09-19 09:35:00-04:00 241.71 244.85 0.9905 -0.1078 4.6515 31.6018 -50.2644 2.6933 0.0001 -0.0739 0.3495 31.8146 180.6250 -4.1110 0.0 0.0010 0.0048 87.4841 2.3471 2.1434 -0.9808 0.0004 0.7355 0.0 2025-09-19 09:35:00-04:00 661.49 6 SPY 2025-10-17 420.0 CALL 2025-09-19 09:36:00-04:00 241.71 244.66 0.9925 -0.0945 3.7746 31.7127 -50.3676 2.6999 0.0001 -0.0652 0.2962 29.1057 156.7512 -3.6008 0.0 0.0010 0.0045 100.6047 2.4345 2.2387 -0.9842 0.0003 0.7068 0.0 2025-09-19 09:36:00-04:00 661.51 7 SPY 2025-10-17 420.0 CALL 2025-09-19 09:37:00-04:00 241.71 244.71 0.9908 -0.1055 4.5070 31.6204 -50.2775 2.6948 0.0001 -0.0726 0.3410 31.4143 176.8465 -4.0317 0.0 0.0010 0.0048 89.6676 2.3605 2.1580 -0.9814 0.0004 0.7308 0.0 2025-09-19 09:37:00-04:00 661.44 8 SPY 2025-10-17 420.0 CALL 2025-09-19 09:38:00-04:00 241.71 244.88 0.9910 -0.1046 4.4454 31.6283 -50.2917 2.6946 0.0001 -0.0720 0.3373 31.2290 175.2241 -3.9961 0.0 0.0010 0.0047 90.5455 2.3663 2.1644 -0.9816 0.0004 0.7291 0.0 2025-09-19 09:38:00-04:00 661.53 9 SPY 2025-10-17 420.0 CALL 2025-09-19 09:39:00-04:00 241.71 244.67 0.9898 -0.1120 4.9253 31.5662 -50.2219 2.6920 0.0001 -0.0765 0.3655 32.5539 187.6142 -4.2599 0.0 0.0010 0.0049 83.4768 2.3225 2.1165 -0.9797 0.0004 0.7437 0.0 2025-09-19 09:39:00-04:00 661.36 10 SPY 2025-10-17 420.0 CALL 2025-09-19 09:40:00-04:00 241.71 244.80 0.9941 -0.0841 3.0549 31.8000 -50.4604 2.7041 0.0001 -0.0570 0.2496 26.3452 135.2032 -3.1299 0.0 0.0009 0.0041 110.9452 2.5200 2.3313 -0.9869 0.0003 0.6812 0.0 2025-09-19 09:40:00-04:00 661.67 11 SPY 2025-10-17 420.0 CALL 2025-09-19 09:41:00-04:00 241.71 244.94 0.9953 -0.0765 2.4993 31.8649 -50.5305 2.7071 0.0001 -0.0499 0.2116 23.7953 117.0834 -2.7280 0.0 0.0009 0.0038 118.0956 2.5985 2.4158 -0.9890 0.0002 0.6593 0.0 2025-09-19 09:41:00-04:00 661.80 12 SPY 2025-10-17 420.0 CALL 2025-09-19 09:42:00-04:00 241.71 244.94 0.9951 -0.0778 2.5936 31.8541 -50.5197 2.7065 0.0001 -0.0512 0.2182 24.2576 120.2646 -2.7988 0.0 0.0009 0.0038 116.9578 2.5842 2.4005 -0.9886 0.0002 0.6632 0.0 2025-09-19 09:42:00-04:00 661.79 13 SPY 2025-10-17 420.0 CALL 2025-09-19 09:43:00-04:00 241.93 244.94 0.9947 -0.0804 2.7818 31.8322 -50.5063 2.7046 0.0001 -0.0536 0.2311 25.1332 126.4828 -2.9357 0.0 0.0009 0.0040 114.5016 2.5570 2.3711 -0.9879 0.0003 0.6710 0.0 2025-09-19 09:43:00-04:00 661.88 14 SPY 2025-10-17 420.0 CALL 2025-09-19 09:44:00-04:00 241.80 244.89 0.9911 -0.1034 4.3682 31.6382 -50.3053 2.6948 0.0001 -0.0712 0.3326 30.9975 173.1709 -3.9517 0.0 0.0010 0.0047 91.6728 2.3738 2.1725 -0.9819 0.0004 0.7267 0.0 2025-09-19 09:44:00-04:00 661.59 15 SPY 2025-10-17 420.0 CALL 2025-09-19 09:45:00-04:00 241.71 244.94 0.9921 -0.0969 3.9389 31.6923 -50.3580 2.6978 0.0001 -0.0669 0.3064 29.6507 161.4115 -3.6998 0.0 0.0010 0.0045 98.0874 2.4170 2.2196 -0.9836 0.0004 0.7126 0.0 2025-09-19 09:45:00-04:00 661.63 16 SPY 2025-10-17 420.0 CALL 2025-09-19 09:46:00-04:00 241.71 244.83 0.9907 -0.1066 4.5772 31.6114 -50.2731 2.6939 0.0001 -0.0732 0.3451 31.6083 178.6905 -4.0701 0.0 0.0010 0.0048 88.5935 2.3539 2.1509 -0.9811 0.0004 0.7332 0.0 2025-09-19 09:46:00-04:00 661.49 17 SPY 2025-10-17 420.0 CALL 2025-09-19 09:47:00-04:00 241.80 244.60 0.9939 -0.0853 3.1413 31.7897 -50.4462 2.7039 0.0001 -0.0580 0.2554 26.7091 137.8938 -3.1895 0.0 0.0009 0.0042 109.7741 2.5088 2.3193 -0.9866 0.0003 0.6843 0.0 2025-09-19 09:47:00-04:00 661.61 18 SPY 2025-10-17 420.0 CALL 2025-09-19 09:48:00-04:00 241.71 244.77 0.9979 -0.0600 1.2003 32.0064 -50.6660 2.7152 0.0000 -0.0298 0.1136 15.6634 67.5747 -1.6053 0.0 0.0006 0.0026 125.1561 2.8669 2.7024 -0.9933 0.0001 0.5937 0.0 2025-09-19 09:48:00-04:00 661.84 19 SPY 2025-10-17 420.0 CALL 2025-09-19 09:49:00-04:00 241.74 244.94 0.9979 -0.0600 1.1973 32.0067 -50.6740 2.7145 0.0000 -0.0297 0.1134 15.6349 67.4468 -1.6018 0.0 0.0006 0.0025 125.0630 2.8678 2.7033 -0.9934 0.0001 0.5937 0.0 2025-09-19 09:49:00-04:00 661.94 20 SPY 2025-10-17 420.0 CALL 2025-09-19 09:50:00-04:00 242.13 245.74 0.9953 -0.0766 2.5060 31.8641 -50.5766 2.7028 0.0001 -0.0499 0.2118 23.7857 117.3279 -2.7281 0.0 0.0008 0.0038 117.6049 2.5978 2.4147 -0.9889 0.0002 0.6609 0.0 2025-09-19 09:50:00-04:00 662.41 21 SPY 2025-10-17 420.0 CALL 2025-09-19 09:51:00-04:00 242.13 245.37 0.9982 -0.0582 1.0449 32.0222 -50.7208 2.7125 0.0000 -0.0268 0.1007 14.3523 60.6982 -1.4437 0.0 0.0006 0.0023 123.3656 2.9151 2.7532 -0.9938 0.0001 0.5843 0.0 2025-09-19 09:51:00-04:00 662.36 22 SPY 2025-10-17 420.0 CALL 2025-09-19 09:52:00-04:00 242.31 245.83 0.9951 -0.0778 2.5931 31.8541 -50.5773 2.7013 0.0001 -0.0510 0.2179 24.2017 120.2697 -2.7922 0.0 0.0009 0.0038 116.4647 2.5847 2.4005 -0.9886 0.0002 0.6648 0.0 2025-09-19 09:52:00-04:00 662.54 23 SPY 2025-10-17 420.0 CALL 2025-09-19 09:53:00-04:00 242.75 245.56 0.9951 -0.0778 2.5891 31.8546 -50.5839 2.7007 0.0001 -0.0509 0.2176 24.1763 120.1353 -2.7886 0.0 0.0009 0.0038 116.4618 2.5853 2.4012 -0.9886 0.0002 0.6648 0.0 2025-09-19 09:53:00-04:00 662.62 24 SPY 2025-10-17 420.0 CALL 2025-09-19 09:54:00-04:00 242.38 245.89 0.9943 -0.0828 2.9538 31.8120 -50.5398 2.6986 0.0001 -0.0555 0.2425 25.8456 132.0392 -3.0517 0.0 0.0009 0.0040 111.7739 2.5338 2.3457 -0.9873 0.0003 0.6792 0.0 2025-09-19 09:54:00-04:00 662.56 25 SPY 2025-10-17 420.0 CALL 2025-09-19 09:55:00-04:00 242.26 245.77 0.9951 -0.0779 2.5962 31.8538 -50.5723 2.7017 0.0001 -0.0510 0.2181 24.2207 120.3705 -2.7950 0.0 0.0009 0.0038 116.4668 2.5842 2.4000 -0.9886 0.0002 0.6648 0.0 2025-09-19 09:55:00-04:00 662.48 26 SPY 2025-10-17 420.0 CALL 2025-09-19 09:56:00-04:00 242.26 245.77 0.9949 -0.0792 2.6922 31.8426 -50.5613 2.7011 0.0001 -0.0523 0.2248 24.6765 123.5617 -2.8657 0.0 0.0009 0.0039 115.2726 2.5701 2.3849 -0.9883 0.0002 0.6687 0.0 2025-09-19 09:56:00-04:00 662.47 27 SPY 2025-10-17 420.0 CALL 2025-09-19 09:57:00-04:00 242.44 245.60 0.9915 -0.1014 4.2287 31.6559 -50.3753 2.6910 0.0001 -0.0696 0.3239 30.5157 169.4446 -3.8639 0.0 0.0010 0.0046 93.4068 2.3878 2.1874 -0.9825 0.0004 0.7238 0.0 2025-09-19 09:57:00-04:00 662.29 28 SPY 2025-10-17 420.0 CALL 2025-09-19 09:58:00-04:00 242.15 245.63 0.9930 -0.0912 3.5426 31.7413 -50.4506 2.6965 0.0001 -0.0625 0.2812 28.2172 150.0430 -3.4475 0.0 0.0009 0.0044 103.6132 2.4608 2.2668 -0.9851 0.0003 0.7003 0.0 2025-09-19 09:58:00-04:00 662.25 29 SPY 2025-10-17 420.0 CALL 2025-09-19 09:59:00-04:00 242.15 245.37 0.9922 -0.0968 3.9268 31.6938 -50.3932 2.6949 0.0001 -0.0666 0.3055 29.5729 161.0912 -3.6878 0.0 0.0010 0.0045 98.0299 2.4185 2.2210 -0.9836 0.0004 0.7132 0.0 2025-09-19 09:59:00-04:00 662.07 30 SPY 2025-10-17 420.0 CALL 2025-09-19 10:00:00-04:00 242.15 245.52 0.9922 -0.0968 3.9221 31.6944 -50.3991 2.6944 0.0001 -0.0666 0.3051 29.5515 160.9628 -3.6843 0.0 0.0010 0.0045 98.0618 2.4191 2.2215 -0.9837 0.0004 0.7132 0.0 2025-09-19 10:00:00-04:00 662.14 ' python/polars: schema: *id026 example: 'shape: (31, 31) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────┬────────┬────────┬─────────┬────────┬─────────┬──────────┬────────┬────────┬─────────┬────────┬─────────┬──────────┬─────────┬───────┬────────┬────────┬──────────┬────────┬────────┬────────────┬────────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ bid ┆ ask ┆ delta ┆ theta ┆ vega ┆ rho ┆ epsilon ┆ lambda ┆ gamma ┆ vanna ┆ charm ┆ vomma ┆ veta ┆ vera ┆ speed ┆ zomma ┆ color ┆ ultima ┆ d1 ┆ d2 ┆ dual_delta ┆ dual_gamma ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════╪════════╪════════╪═════════╪════════╪═════════╪══════════╪════════╪════════╪═════════╪════════╪═════════╪══════════╪═════════╪═══════╪════════╪════════╪══════════╪════════╪════════╪════════════╪════════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:30:00 EDT ┆ 0.0 ┆ 0.0 ┆ 1.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 100.0 ┆ 2025-09-19 09:30:00 EDT ┆ 662.31 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:31:00 EDT ┆ 241.85 ┆ 245.21 ┆ 0.9922 ┆ -0.0968 ┆ 3.9248 ┆ 31.6941 ┆ -50.3758 ┆ 2.6965 ┆ 0.0001 ┆ -0.0667 ┆ 0.3054 ┆ 29.5861 ┆ 161.0257 ┆ -3.6891 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 98.1837 ┆ 2.4186 ┆ 2.2212 ┆ -0.9837 ┆ 0.0004 ┆ 0.7126 ┆ 0.0 ┆ 2025-09-19 09:31:00 EDT ┆ 661.84 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:32:00 EDT ┆ 241.85 ┆ 245.24 ┆ 0.993 ┆ -0.0911 ┆ 3.5425 ┆ 31.7413 ┆ -50.4238 ┆ 2.6989 ┆ 0.0001 ┆ -0.0626 ┆ 0.2813 ┆ 28.2454 ┆ 150.0252 ┆ -3.451 ┆ 0.0 ┆ 0.0009 ┆ 0.0044 ┆ 103.8173 ┆ 2.4606 ┆ 2.2669 ┆ -0.9851 ┆ 0.0003 ┆ 0.6996 ┆ 0.0 ┆ 2025-09-19 09:32:00 EDT ┆ 661.9 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:33:00 EDT ┆ 241.85 ┆ 245.05 ┆ 0.9934 ┆ -0.0888 ┆ 3.383 ┆ 31.7607 ┆ -50.4363 ┆ 2.7006 ┆ 0.0001 ┆ -0.0608 ┆ 0.2711 ┆ 27.6521 ┆ 145.2796 ┆ -3.3486 ┆ 0.0 ┆ 0.0009 ┆ 0.0043 ┆ 106.1833 ┆ 2.4792 ┆ 2.2871 ┆ -0.9857 ┆ 0.0003 ┆ 0.6937 ┆ 0.0 ┆ 2025-09-19 09:33:00 EDT ┆ 661.83 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:34:00 EDT ┆ 241.71 ┆ 244.84 ┆ 0.9923 ┆ -0.0957 ┆ 3.8551 ┆ 31.7028 ┆ -50.3645 ┆ 2.6988 ┆ 0.0001 ┆ -0.066 ┆ 0.3012 ┆ 29.3738 ┆ 159.0453 ┆ -3.6494 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 99.3614 ┆ 2.4258 ┆ 2.2293 ┆ -0.9839 ┆ 0.0004 ┆ 0.7097 ┆ 0.0 ┆ 2025-09-19 09:34:00 EDT ┆ 661.59 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:56:00 EDT ┆ 242.26 ┆ 245.77 ┆ 0.9949 ┆ -0.0792 ┆ 2.6922 ┆ 31.8426 ┆ -50.5613 ┆ 2.7011 ┆ 0.0001 ┆ -0.0523 ┆ 0.2248 ┆ 24.6765 ┆ 123.5617 ┆ -2.8657 ┆ 0.0 ┆ 0.0009 ┆ 0.0039 ┆ 115.2726 ┆ 2.5701 ┆ 2.3849 ┆ -0.9883 ┆ 0.0002 ┆ 0.6687 ┆ 0.0 ┆ 2025-09-19 09:56:00 EDT ┆ 662.47 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:57:00 EDT ┆ 242.44 ┆ 245.6 ┆ 0.9915 ┆ -0.1014 ┆ 4.2287 ┆ 31.6559 ┆ -50.3753 ┆ 2.691 ┆ 0.0001 ┆ -0.0696 ┆ 0.3239 ┆ 30.5157 ┆ 169.4446 ┆ -3.8639 ┆ 0.0 ┆ 0.001 ┆ 0.0046 ┆ 93.4068 ┆ 2.3878 ┆ 2.1874 ┆ -0.9825 ┆ 0.0004 ┆ 0.7238 ┆ 0.0 ┆ 2025-09-19 09:57:00 EDT ┆ 662.29 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:58:00 EDT ┆ 242.15 ┆ 245.63 ┆ 0.993 ┆ -0.0912 ┆ 3.5426 ┆ 31.7413 ┆ -50.4506 ┆ 2.6965 ┆ 0.0001 ┆ -0.0625 ┆ 0.2812 ┆ 28.2172 ┆ 150.043 ┆ -3.4475 ┆ 0.0 ┆ 0.0009 ┆ 0.0044 ┆ 103.6132 ┆ 2.4608 ┆ 2.2668 ┆ -0.9851 ┆ 0.0003 ┆ 0.7003 ┆ 0.0 ┆ 2025-09-19 09:58:00 EDT ┆ 662.25 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:59:00 EDT ┆ 242.15 ┆ 245.37 ┆ 0.9922 ┆ -0.0968 ┆ 3.9268 ┆ 31.6938 ┆ -50.3932 ┆ 2.6949 ┆ 0.0001 ┆ -0.0666 ┆ 0.3055 ┆ 29.5729 ┆ 161.0912 ┆ -3.6878 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 98.0299 ┆ 2.4185 ┆ 2.221 ┆ -0.9836 ┆ 0.0004 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 09:59:00 EDT ┆ 662.07 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 10:00:00 EDT ┆ 242.15 ┆ 245.52 ┆ 0.9922 ┆ -0.0968 ┆ 3.9221 ┆ 31.6944 ┆ -50.3991 ┆ 2.6944 ┆ 0.0001 ┆ -0.0666 ┆ 0.3051 ┆ 29.5515 ┆ 160.9628 ┆ -3.6843 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 98.0618 ┆ 2.4191 ┆ 2.2215 ┆ -0.9837 ┆ 0.0004 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 10:00:00 EDT ┆ 662.14 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────┴────────┴────────┴─────────┴────────┴─────────┴──────────┴────────┴────────┴─────────┴────────┴─────────┴──────────┴─────────┴───────┴────────┴────────┴──────────┴────────┴────────┴────────────┴────────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/trade_greeks/all: x-concurrent-limit-ttl-ms: '3388' x-min-subscription: professional x-history-access: true get: summary: All Trade Greeks operationId: option_history_trade_greeks_all x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_trade_greeks_all(symbol=''AAPL'', expiration=date(2023, 11, 17)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_trade_greeks_all(symbol=''AAPL'', expiration=date(2023, 11, 17)) ' tags: - History description: "- Returns the data for all contracts that share the same provided symbol and expiration. \n- Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html).\n- The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).\n- Multi-day requests are limited to 1 month of data, and must specify an expiration.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/all?symbol=AAPL&expiration=20231117&date=20231110 description: Returns all trade greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/all?symbol=AAPL&expiration=20231117&start_date=20231110&end_date=20231116 description: Returns all trade greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/all?symbol=AAPL&expiration=*&date=20231110 description: Returns all trade greeks for an full chain of option contracts - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/all?symbol=AAPL&expiration=*&date=20231110&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns all trade greeks for an option contract content: text/csv: schema: type: array items: &id027 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: string description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. delta: type: number description: The delta. theta: type: string description: The Theta. vega: type: number description: The vega. rho: type: number description: The rho. epsilon: type: string description: The epsilon. lambda: type: number description: The lambda. gamma: type: number description: The gamma. vanna: type: number description: The vanna. charm: type: string description: The charm. vomma: type: number description: The vomma. veta: type: number description: The veta. vera: type: number description: The vera. speed: type: number description: The speed. zomma: type: number description: The zomma. color: type: string description: The color. ultima: type: string description: The ultima. d1: type: string description: The d1. d2: type: string description: The d2. dual_delta: type: string description: The dual delta. dual_gamma: type: number description: The dual gamma. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: string description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price,delta,theta,vega,rho,epsilon,lambda,gamma,vanna,charm,vomma,veta,vera,speed,zomma,color,ultima,d1,d2,dual_delta,dual_gamma,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2023-11-17,187.500,CALL,2023-11-10T09:30:00.004,-1391330475,255,255,255,255,18,1,9,0.59,0.2289,-0.1031,7.7122,0.7960,-0.8073,71.4109,0.0674,1.3174,-6.7146,24.9086,0.3553,0.0000,0.0000,0.0000,-0.0129,-100.0000,-0.7424,-0.7668,-0.2213,0.0000,0.1762,-0.0008,2023-11-10T09:30:00,183.89\r\nAAPL,2023-11-17,187.500,CALL,2023-11-10T09:30:00.154,-1391317465,255,255,255,255,18,1,47,0.59,0.2289,-0.1031,7.7122,0.7960,-0.8073,71.4109,0.0674,1.3174,-6.7146,24.9086,0.3553,0.0000,0.0000,0.0000,-0.0129,-100.0000,-0.7424,-0.7668,-0.2213,0.0000,0.1762,-0.0008,2023-11-10T09:30:00,183.89\r\nAAPL,2023-11-17,187.500,CALL,2023-11-10T09:30:00.22,-1391313694,255,255,255,255,18,8,6,0.52,0.2162,-0.0947,7.4656,0.7526,-0.7625,76.6064,0.0689,1.4186,-6.8508,28.3594,0.3755,0.0000,0.0000,0.0000,-0.0118,-100.0000,-0.7849,-0.8081,-0.2093,0.0000,0.1669,-0.0018,2023-11-10T09:30:00,183.89\r\nAAPL,2023-11-17,187.500,CALL,2023-11-10T09:30:00.221,-1391313652,255,255,255,255,130,1,6,0.57,0.2256,-0.1009,7.6504,0.7849,-0.7958,72.7109,0.0678,1.3432,-6.7516,25.7650,0.3605,0.0000,0.0000,0.0000,-0.0126,-100.0000,-0.7531,-0.7772,-0.2182,0.0000,0.1738,0.0012,2023-11-10T09:30:00,183.89\r\nAAPL,2023-11-17,187.500,CALL,2023-11-10T09:30:00.452,-1391297309,255,255,255,255,18,6,31,0.60,0.2308,-0.1044,7.7484,0.8025,-0.8140,70.6522,0.0672,1.3022,-6.6920,24.4114,0.3523,0.0000,0.0000,0.0000,-0.0130,-100.0000,-0.7360,-0.7607,-0.2231,0.0000,0.1777,0.0013,2023-11-10T09:30:00,183.89\r\n" application/json: schema: &id028 type: array items: *id027 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":187.500,\"right\":\"CALL\",\"expiration\":\"2023-11-17\"},\n \"data\": [\n {\"dual_delta\":-0.2213,\"color\":-0.0129,\"zomma\":0.0000,\"delta\":0.2289,\"implied_vol\":0.1762,\"theta\":-0.1031,\"d1\":-0.7424,\"speed\":0.0000,\"d2\":-0.7668,\"epsilon\":-0.8073,\"lambda\":71.4109,\"price\":0.59,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"vomma\":24.9086,\"ext_condition3\":255,\"underlying_timestamp\":\"2023-11-10T09:30:00\",\"timestamp\":\"2023-11-10T09:30:00.004\",\"underlying_price\":183.89,\"vera\":0.0000,\"veta\":0.3553,\"iv_error\":-0.0008,\"ultima\":-100.0000,\"sequence\":-1391330475,\"condition\":18,\"size\":1,\"charm\":-6.7146,\"rho\":0.7960,\"exchange\":9,\"vanna\":1.3174,\"dual_gamma\":0.0000,\"vega\":7.7122,\"gamma\":0.0674},\n {\"dual_delta\":-0.2213,\"color\":-0.0129,\"zomma\":0.0000,\"delta\":0.2289,\"implied_vol\":0.1762,\"theta\":-0.1031,\"d1\":-0.7424,\"speed\":0.0000,\"d2\":-0.7668,\"epsilon\":-0.8073,\"lambda\":71.4109,\"price\":0.59,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"vomma\":24.9086,\"ext_condition3\":255,\"underlying_timestamp\":\"2023-11-10T09:30:00\",\"timestamp\":\"2023-11-10T09:30:00.154\",\"underlying_price\":183.89,\"vera\":0.0000,\"veta\":0.3553,\"iv_error\":-0.0008,\"ultima\":-100.0000,\"sequence\":-1391317465,\"condition\":18,\"size\":1,\"charm\":-6.7146,\"rho\":0.7960,\"exchange\":47,\"vanna\":1.3174,\"dual_gamma\":0.0000,\"vega\":7.7122,\"gamma\":0.0674},\n {\"dual_delta\":-0.2093,\"color\":-0.0118,\"zomma\":0.0000,\"delta\":0.2162,\"implied_vol\":0.1669,\"theta\":-0.0947,\"d1\":-0.7849,\"speed\":0.0000,\"d2\":-0.8081,\"epsilon\":-0.7625,\"lambda\":76.6064,\"price\":0.52,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"vomma\":28.3594,\"ext_condition3\":255,\"underlying_timestamp\":\"2023-11-10T09:30:00\",\"timestamp\":\"2023-11-10T09:30:00.22\",\"underlying_price\":183.89,\"vera\":0.0000,\"veta\":0.3755,\"iv_error\":-0.0018,\"ultima\":-100.0000,\"sequence\":-1391313694,\"condition\":18,\"size\":8,\"charm\":-6.8508,\"rho\":0.7526,\"exchange\":6,\"vanna\":1.4186,\"dual_gamma\":0.0000,\"vega\":7.4656,\"gamma\":0.0689},\n {\"dual_delta\":-0.2182,\"color\":-0.0126,\"zomma\":0.0000,\"delta\":0.2256,\"implied_vol\":0.1738,\"theta\":-0.1009,\"d1\":-0.7531,\"speed\":0.0000,\"d2\":-0.7772,\"epsilon\":-0.7958,\"lambda\":72.7109,\"price\":0.57,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"vomma\":25.7650,\"ext_condition3\":255,\"underlying_timestamp\":\"2023-11-10T09:30:00\",\"timestamp\":\"2023-11-10T09:30:00.221\",\"underlying_price\":183.89,\"vera\":0.0000,\"veta\":0.3605,\"iv_error\":0.0012,\"ultima\":-100.0000,\"sequence\":-1391313652,\"condition\":130,\"size\":1,\"charm\":-6.7516,\"rho\":0.7849,\"exchange\":6,\"vanna\":1.3432,\"dual_gamma\":0.0000,\"vega\":7.6504,\"gamma\":0.0678},\n {\"dual_delta\":-0.2231,\"color\":-0.0130,\"zomma\":0.0000,\"delta\":0.2308,\"implied_vol\":0.1777,\"theta\":-0.1044,\"d1\":-0.7360,\"speed\":0.0000,\"d2\":-0.7607,\"epsilon\":-0.8140,\"lambda\":70.6522,\"price\":0.60,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"vomma\":24.4114,\"ext_condition3\":255,\"underlying_timestamp\":\"2023-11-10T09:30:00\",\"timestamp\":\"2023-11-10T09:30:00.452\",\"underlying_price\":183.89,\"vera\":0.0000,\"veta\":0.3523,\"iv_error\":0.0013,\"ultima\":-100.0000,\"sequence\":-1391297309,\"condition\":18,\"size\":6,\"charm\":-6.6920,\"rho\":0.8025,\"exchange\":31,\"vanna\":1.3022,\"dual_gamma\":0.0000,\"vega\":7.7484,\"gamma\":0.0672}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id028 example: '{"symbol":"AAPL","dual_delta":-0.2213,"color":-0.0129,"zomma":0.0000,"delta":0.2289,"implied_vol":0.1762,"theta":-0.1031,"d1":-0.7424,"speed":0.0000,"d2":-0.7668,"epsilon":-0.8073,"lambda":71.4109,"price":0.59,"ext_condition2":255,"ext_condition1":255,"ext_condition4":255,"vomma":24.9086,"ext_condition3":255,"underlying_timestamp":"2023-11-10T09:30:00","timestamp":"2023-11-10T09:30:00.004","underlying_price":183.89,"strike":187.500,"vera":0.0000,"right":"CALL","veta":0.3553,"iv_error":-0.0008,"ultima":-100.0000,"sequence":-1391330475,"condition":18,"size":1,"charm":-6.7146,"rho":0.7960,"expiration":"2023-11-17","exchange":9,"vanna":1.3174,"dual_gamma":0.0000,"vega":7.7122,"gamma":0.0674} {"symbol":"AAPL","dual_delta":-0.2213,"color":-0.0129,"zomma":0.0000,"delta":0.2289,"implied_vol":0.1762,"theta":-0.1031,"d1":-0.7424,"speed":0.0000,"d2":-0.7668,"epsilon":-0.8073,"lambda":71.4109,"price":0.59,"ext_condition2":255,"ext_condition1":255,"ext_condition4":255,"vomma":24.9086,"ext_condition3":255,"underlying_timestamp":"2023-11-10T09:30:00","timestamp":"2023-11-10T09:30:00.154","underlying_price":183.89,"strike":187.500,"vera":0.0000,"right":"CALL","veta":0.3553,"iv_error":-0.0008,"ultima":-100.0000,"sequence":-1391317465,"condition":18,"size":1,"charm":-6.7146,"rho":0.7960,"expiration":"2023-11-17","exchange":47,"vanna":1.3174,"dual_gamma":0.0000,"vega":7.7122,"gamma":0.0674} {"symbol":"AAPL","dual_delta":-0.2093,"color":-0.0118,"zomma":0.0000,"delta":0.2162,"implied_vol":0.1669,"theta":-0.0947,"d1":-0.7849,"speed":0.0000,"d2":-0.8081,"epsilon":-0.7625,"lambda":76.6064,"price":0.52,"ext_condition2":255,"ext_condition1":255,"ext_condition4":255,"vomma":28.3594,"ext_condition3":255,"underlying_timestamp":"2023-11-10T09:30:00","timestamp":"2023-11-10T09:30:00.22","underlying_price":183.89,"strike":187.500,"vera":0.0000,"right":"CALL","veta":0.3755,"iv_error":-0.0018,"ultima":-100.0000,"sequence":-1391313694,"condition":18,"size":8,"charm":-6.8508,"rho":0.7526,"expiration":"2023-11-17","exchange":6,"vanna":1.4186,"dual_gamma":0.0000,"vega":7.4656,"gamma":0.0689} {"symbol":"AAPL","dual_delta":-0.2182,"color":-0.0126,"zomma":0.0000,"delta":0.2256,"implied_vol":0.1738,"theta":-0.1009,"d1":-0.7531,"speed":0.0000,"d2":-0.7772,"epsilon":-0.7958,"lambda":72.7109,"price":0.57,"ext_condition2":255,"ext_condition1":255,"ext_condition4":255,"vomma":25.7650,"ext_condition3":255,"underlying_timestamp":"2023-11-10T09:30:00","timestamp":"2023-11-10T09:30:00.221","underlying_price":183.89,"strike":187.500,"vera":0.0000,"right":"CALL","veta":0.3605,"iv_error":0.0012,"ultima":-100.0000,"sequence":-1391313652,"condition":130,"size":1,"charm":-6.7516,"rho":0.7849,"expiration":"2023-11-17","exchange":6,"vanna":1.3432,"dual_gamma":0.0000,"vega":7.6504,"gamma":0.0678} {"symbol":"AAPL","dual_delta":-0.2231,"color":-0.0130,"zomma":0.0000,"delta":0.2308,"implied_vol":0.1777,"theta":-0.1044,"d1":-0.7360,"speed":0.0000,"d2":-0.7607,"epsilon":-0.8140,"lambda":70.6522,"price":0.60,"ext_condition2":255,"ext_condition1":255,"ext_condition4":255,"vomma":24.4114,"ext_condition3":255,"underlying_timestamp":"2023-11-10T09:30:00","timestamp":"2023-11-10T09:30:00.452","underlying_price":183.89,"strike":187.500,"vera":0.0000,"right":"CALL","veta":0.3523,"iv_error":0.0013,"ultima":-100.0000,"sequence":-1391297309,"condition":18,"size":6,"charm":-6.6920,"rho":0.8025,"expiration":"2023-11-17","exchange":31,"vanna":1.3022,"dual_gamma":0.0000,"vega":7.7484,"gamma":0.0672}' python/pandas: schema: *id028 example: 'symbol expiration strike right timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price delta theta vega rho epsilon lambda gamma vanna charm vomma veta vera speed zomma color ultima d1 d2 dual_delta dual_gamma implied_vol iv_error underlying_timestamp underlying_price 0 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:01.503000-05:00 58765096 255 255 255 255 18 1 6 0.04 0.0127 -0.0347 0.9585 0.0397 -0.0401 87.5339 0.0036 0.2434 -3.2295 15.8242 250.8588 0.7551 0.0009 0.0489 0.6506 106.4223 -2.2334 -2.2666 -0.0117 0.0031 0.3066 -0.0196 2025-11-10 09:30:01-05:00 269.02 1 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.123000-05:00 59131360 255 255 255 255 18 3 9 0.04 0.0132 -0.0358 0.9880 0.0411 -0.0415 87.1943 0.0038 0.2493 -3.3081 16.1180 256.0347 0.7737 0.0009 0.0496 0.6602 105.2274 -2.2200 -2.2531 -0.0121 0.0032 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 2 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.126000-05:00 59133877 255 255 255 255 18 1 9 0.04 0.0132 -0.0358 0.9880 0.0411 -0.0415 87.1943 0.0038 0.2493 -3.3081 16.1180 256.0347 0.7737 0.0009 0.0496 0.6602 105.2274 -2.2200 -2.2531 -0.0121 0.0032 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 3 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:03.929000-05:00 60102776 255 255 255 255 95 1 1 0.03 0.0105 -0.0278 0.8125 0.0328 -0.0331 94.7817 0.0033 0.2254 -2.8197 15.1647 224.4088 0.7014 0.0008 0.0502 0.6305 125.6337 -2.3071 -2.3383 -0.0096 0.0028 0.2890 -0.0023 2025-11-10 09:30:03-05:00 269.56 4 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:31.912000-05:00 66164357 255 255 255 255 18 1 69 0.04 0.0135 -0.0350 1.0163 0.0424 -0.0429 91.5404 0.0040 0.2676 -3.3727 17.2871 261.2468 0.8345 0.0010 0.0554 0.7011 115.8098 -2.2091 -2.2406 -0.0125 0.0035 0.2910 0.0025 2025-11-10 09:30:31-05:00 270.26 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 588 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:11.904000-05:00 62754770 255 255 255 255 130 1 42 6.22 0.7305 -0.3366 9.6372 2.2328 -2.3055 31.6826 0.0404 -0.6890 7.8150 12.3536 551.9376 -2.2874 -0.0031 -0.0925 -1.1398 -116.6237 0.6144 0.5841 -0.7201 0.0418 0.2800 0.0000 2025-11-10 09:30:11-05:00 269.73 589 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:35.448000-05:00 66662366 255 255 255 255 18 3 7 6.35 0.7569 -0.3048 9.1457 2.3176 -2.3918 32.1952 0.0404 -0.7898 8.5013 16.0696 563.8117 -2.6030 -0.0037 -0.0818 -0.9646 -154.0341 0.6963 0.6677 -0.7475 0.0420 0.2646 0.0000 2025-11-10 09:30:35-05:00 270.10 590 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:56.546000-05:00 69301579 255 255 255 255 130 2 6 6.45 0.7427 -0.3302 9.4218 2.2710 -2.3465 31.0967 0.0394 -0.7153 8.1488 13.6211 557.8317 -2.3702 -0.0032 -0.0836 -1.0351 -126.2168 0.6518 0.6215 -0.7325 0.0409 0.2802 0.0000 2025-11-10 09:30:56-05:00 270.04 591 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:01.510000-05:00 58769718 255 255 255 255 18 1 6 0.02 0.0057 -0.0203 0.4737 0.0177 -0.0179 80.4149 0.0015 0.1151 -1.8034 8.4732 152.9860 0.3568 0.0003 0.0233 0.3656 81.5593 -2.5293 -2.5686 -0.0051 0.0012 0.3632 -0.0442 2025-11-10 09:30:01-05:00 269.02 592 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:03.095000-05:00 59706894 255 255 255 255 125 1 6 0.02 0.0061 -0.0213 0.5038 0.0190 -0.0192 80.7578 0.0016 0.1223 -1.8965 8.9394 160.0960 0.3800 0.0003 0.0246 0.3830 83.9693 -2.5056 -2.5445 -0.0054 0.0013 0.3593 0.0198 2025-11-10 09:30:03-05:00 269.56 [593 rows x 38 columns] ' python/polars: schema: *id028 example: 'shape: (593, 38) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬──────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬───────┬────────┬─────────┬────────┬────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┬─────────┬─────────┬───────────┬─────────┬─────────┬────────────┬────────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price ┆ delta ┆ theta ┆ vega ┆ rho ┆ epsilon ┆ lambda ┆ gamma ┆ vanna ┆ charm ┆ vomma ┆ veta ┆ vera ┆ speed ┆ zomma ┆ color ┆ ultima ┆ d1 ┆ d2 ┆ dual_delta ┆ dual_gamma ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪══════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪═══════╪════════╪═════════╪════════╪════════╪═════════╪═════════╪════════╪═════════╪═════════╪═════════╪══════════╪═════════╪═════════╪═════════╪═════════╪═══════════╪═════════╪═════════╪════════════╪════════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:01.503 EST ┆ 58765096 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.04 ┆ 0.0127 ┆ -0.0347 ┆ 0.9585 ┆ 0.0397 ┆ -0.0401 ┆ 87.5339 ┆ 0.0036 ┆ 0.2434 ┆ -3.2295 ┆ 15.8242 ┆ 250.8588 ┆ 0.7551 ┆ 0.0009 ┆ 0.0489 ┆ 0.6506 ┆ 106.4223 ┆ -2.2334 ┆ -2.2666 ┆ -0.0117 ┆ 0.0031 ┆ 0.3066 ┆ -0.0196 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.123 EST ┆ 59131360 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 9 ┆ 0.04 ┆ 0.0132 ┆ -0.0358 ┆ 0.988 ┆ 0.0411 ┆ -0.0415 ┆ 87.1943 ┆ 0.0038 ┆ 0.2493 ┆ -3.3081 ┆ 16.118 ┆ 256.0347 ┆ 0.7737 ┆ 0.0009 ┆ 0.0496 ┆ 0.6602 ┆ 105.2274 ┆ -2.22 ┆ -2.2531 ┆ -0.0121 ┆ 0.0032 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.126 EST ┆ 59133877 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 9 ┆ 0.04 ┆ 0.0132 ┆ -0.0358 ┆ 0.988 ┆ 0.0411 ┆ -0.0415 ┆ 87.1943 ┆ 0.0038 ┆ 0.2493 ┆ -3.3081 ┆ 16.118 ┆ 256.0347 ┆ 0.7737 ┆ 0.0009 ┆ 0.0496 ┆ 0.6602 ┆ 105.2274 ┆ -2.22 ┆ -2.2531 ┆ -0.0121 ┆ 0.0032 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:03.929 EST ┆ 60102776 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 95 ┆ 1 ┆ 1 ┆ 0.03 ┆ 0.0105 ┆ -0.0278 ┆ 0.8125 ┆ 0.0328 ┆ -0.0331 ┆ 94.7817 ┆ 0.0033 ┆ 0.2254 ┆ -2.8197 ┆ 15.1647 ┆ 224.4088 ┆ 0.7014 ┆ 0.0008 ┆ 0.0502 ┆ 0.6305 ┆ 125.6337 ┆ -2.3071 ┆ -2.3383 ┆ -0.0096 ┆ 0.0028 ┆ 0.289 ┆ -0.0023 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:31.912 EST ┆ 66164357 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 69 ┆ 0.04 ┆ 0.0135 ┆ -0.035 ┆ 1.0163 ┆ 0.0424 ┆ -0.0429 ┆ 91.5404 ┆ 0.004 ┆ 0.2676 ┆ -3.3727 ┆ 17.2871 ┆ 261.2468 ┆ 0.8345 ┆ 0.001 ┆ 0.0554 ┆ 0.7011 ┆ 115.8098 ┆ -2.2091 ┆ -2.2406 ┆ -0.0125 ┆ 0.0035 ┆ 0.291 ┆ 0.0025 ┆ 2025-11-10 09:30:31 EST ┆ 270.26 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:11.904 EST ┆ 62754770 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 1 ┆ 42 ┆ 6.22 ┆ 0.7305 ┆ -0.3366 ┆ 9.6372 ┆ 2.2328 ┆ -2.3055 ┆ 31.6826 ┆ 0.0404 ┆ -0.689 ┆ 7.815 ┆ 12.3536 ┆ 551.9376 ┆ -2.2874 ┆ -0.0031 ┆ -0.0925 ┆ -1.1398 ┆ -116.6237 ┆ 0.6144 ┆ 0.5841 ┆ -0.7201 ┆ 0.0418 ┆ 0.28 ┆ 0.0 ┆ 2025-11-10 09:30:11 EST ┆ 269.73 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:35.448 EST ┆ 66662366 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 7 ┆ 6.35 ┆ 0.7569 ┆ -0.3048 ┆ 9.1457 ┆ 2.3176 ┆ -2.3918 ┆ 32.1952 ┆ 0.0404 ┆ -0.7898 ┆ 8.5013 ┆ 16.0696 ┆ 563.8117 ┆ -2.603 ┆ -0.0037 ┆ -0.0818 ┆ -0.9646 ┆ -154.0341 ┆ 0.6963 ┆ 0.6677 ┆ -0.7475 ┆ 0.042 ┆ 0.2646 ┆ 0.0 ┆ 2025-11-10 09:30:35 EST ┆ 270.1 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:56.546 EST ┆ 69301579 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 2 ┆ 6 ┆ 6.45 ┆ 0.7427 ┆ -0.3302 ┆ 9.4218 ┆ 2.271 ┆ -2.3465 ┆ 31.0967 ┆ 0.0394 ┆ -0.7153 ┆ 8.1488 ┆ 13.6211 ┆ 557.8317 ┆ -2.3702 ┆ -0.0032 ┆ -0.0836 ┆ -1.0351 ┆ -126.2168 ┆ 0.6518 ┆ 0.6215 ┆ -0.7325 ┆ 0.0409 ┆ 0.2802 ┆ 0.0 ┆ 2025-11-10 09:30:56 EST ┆ 270.04 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:01.510 EST ┆ 58769718 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0057 ┆ -0.0203 ┆ 0.4737 ┆ 0.0177 ┆ -0.0179 ┆ 80.4149 ┆ 0.0015 ┆ 0.1151 ┆ -1.8034 ┆ 8.4732 ┆ 152.986 ┆ 0.3568 ┆ 0.0003 ┆ 0.0233 ┆ 0.3656 ┆ 81.5593 ┆ -2.5293 ┆ -2.5686 ┆ -0.0051 ┆ 0.0012 ┆ 0.3632 ┆ -0.0442 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:03.095 EST ┆ 59706894 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 125 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0061 ┆ -0.0213 ┆ 0.5038 ┆ 0.019 ┆ -0.0192 ┆ 80.7578 ┆ 0.0016 ┆ 0.1223 ┆ -1.8965 ┆ 8.9394 ┆ 160.096 ┆ 0.38 ┆ 0.0003 ┆ 0.0246 ┆ 0.383 ┆ 83.9693 ┆ -2.5056 ┆ -2.5445 ┆ -0.0054 ┆ 0.0013 ┆ 0.3593 ┆ 0.0198 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴──────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴───────┴────────┴─────────┴────────┴────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┴─────────┴─────────┴───────────┴─────────┴─────────┴────────────┴────────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/greeks/first_order: x-concurrent-limit-ttl-ms: '2955' x-min-subscription: standard x-history-access: true get: summary: First Order Greeks operationId: option_history_greeks_first_order x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_greeks_first_order(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='5m',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_greeks_first_order(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='5m',\n)\n" tags: - History description: "- Returns the data for all contracts that share the same provided symbol and expiration. \n- Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint. \n- The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/greeks/first_order?symbol=AAPL&expiration=20241108&date=20241104&interval=5m description: Returns first order greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/greeks/first_order?symbol=AAPL&expiration=20241108&date=20241104&interval=5m&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/option/history/greeks/first_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241107&interval=5m description: Returns first order greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/greeks/first_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241107&interval=5m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration_no_star' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns first order greeks for an option contract content: text/csv: schema: type: array items: &id029 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. bid: type: number description: The last NBBO bid price. ask: type: number description: The last NBBO ask price. delta: type: number description: The delta. theta: type: number description: The Theta. vega: type: number description: The vega. rho: type: number description: The rho. epsilon: type: number description: The epsilon. lambda: type: number description: The lambda. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,bid,ask,delta,theta,vega,rho,epsilon,lambda,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:30:00,0.00,0.00,0.0000,0.0000,0.0000,0.0000,0.0000,261.9304,0.2500,100.0000,2024-11-04T09:30:00,221.00\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:35:00,0.00,0.02,0.0026,-0.0141,0.1913,0.0063,-0.0064,55.2930,0.5874,0.0721,2024-11-04T09:35:00,220.66\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:40:00,0.00,0.02,0.0026,-0.0138,0.1873,0.0062,-0.0063,55.3974,0.5874,0.0455,2024-11-04T09:40:00,220.56\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:45:00,0.00,0.02,0.0025,-0.0133,0.1832,0.0060,-0.0061,56.1024,0.5812,0.0075,2024-11-04T09:45:00,220.86\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:50:00,0.00,0.02,0.0025,-0.0130,0.1807,0.0059,-0.0060,56.7822,0.5749,-0.0199,2024-11-04T09:50:00,221.20\r\n" application/json: schema: &id030 type: array items: *id029 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":262.500,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.00,\"delta\":0.0000,\"implied_vol\":0.2500,\"theta\":0.0000,\"iv_error\":100.0000,\"epsilon\":0.0000,\"lambda\":261.9304,\"ask\":0.00,\"rho\":0.0000,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:30:00\",\"vega\":0.0000,\"timestamp\":\"2024-11-04T09:30:00\"},\n {\"underlying_price\":220.66,\"delta\":0.0026,\"implied_vol\":0.5874,\"theta\":-0.0141,\"iv_error\":0.0721,\"epsilon\":-0.0064,\"lambda\":55.2930,\"ask\":0.02,\"rho\":0.0063,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:35:00\",\"vega\":0.1913,\"timestamp\":\"2024-11-04T09:35:00\"},\n {\"underlying_price\":220.56,\"delta\":0.0026,\"implied_vol\":0.5874,\"theta\":-0.0138,\"iv_error\":0.0455,\"epsilon\":-0.0063,\"lambda\":55.3974,\"ask\":0.02,\"rho\":0.0062,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:40:00\",\"vega\":0.1873,\"timestamp\":\"2024-11-04T09:40:00\"},\n {\"underlying_price\":220.86,\"delta\":0.0025,\"implied_vol\":0.5812,\"theta\":-0.0133,\"iv_error\":0.0075,\"epsilon\":-0.0061,\"lambda\":56.1024,\"ask\":0.02,\"rho\":0.0060,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:45:00\",\"vega\":0.1832,\"timestamp\":\"2024-11-04T09:45:00\"},\n {\"underlying_price\":221.20,\"delta\":0.0025,\"implied_vol\":0.5749,\"theta\":-0.0130,\"iv_error\":-0.0199,\"epsilon\":-0.0060,\"lambda\":56.7822,\"ask\":0.02,\"rho\":0.0059,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:50:00\",\"vega\":0.1807,\"timestamp\":\"2024-11-04T09:50:00\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id030 example: '{"symbol":"AAPL","underlying_price":221.00,"strike":262.500,"delta":0.0000,"right":"CALL","implied_vol":0.2500,"theta":0.0000,"iv_error":100.0000,"epsilon":0.0000,"lambda":261.9304,"ask":0.00,"rho":0.0000,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T09:30:00","vega":0.0000,"timestamp":"2024-11-04T09:30:00"} {"symbol":"AAPL","underlying_price":220.66,"strike":262.500,"delta":0.0026,"right":"CALL","implied_vol":0.5874,"theta":-0.0141,"iv_error":0.0721,"epsilon":-0.0064,"lambda":55.2930,"ask":0.02,"rho":0.0063,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T09:35:00","vega":0.1913,"timestamp":"2024-11-04T09:35:00"} {"symbol":"AAPL","underlying_price":220.56,"strike":262.500,"delta":0.0026,"right":"CALL","implied_vol":0.5874,"theta":-0.0138,"iv_error":0.0455,"epsilon":-0.0063,"lambda":55.3974,"ask":0.02,"rho":0.0062,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T09:40:00","vega":0.1873,"timestamp":"2024-11-04T09:40:00"} {"symbol":"AAPL","underlying_price":220.86,"strike":262.500,"delta":0.0025,"right":"CALL","implied_vol":0.5812,"theta":-0.0133,"iv_error":0.0075,"epsilon":-0.0061,"lambda":56.1024,"ask":0.02,"rho":0.0060,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T09:45:00","vega":0.1832,"timestamp":"2024-11-04T09:45:00"} {"symbol":"AAPL","underlying_price":221.20,"strike":262.500,"delta":0.0025,"right":"CALL","implied_vol":0.5749,"theta":-0.0130,"iv_error":-0.0199,"epsilon":-0.0060,"lambda":56.7822,"ask":0.02,"rho":0.0059,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T09:50:00","vega":0.1807,"timestamp":"2024-11-04T09:50:00"}' python/pandas: schema: *id030 example: 'symbol expiration strike right timestamp bid ask delta theta vega rho epsilon lambda implied_vol iv_error underlying_timestamp underlying_price 0 SPY 2025-10-17 420.0 CALL 2025-09-19 09:30:00-04:00 0.00 0.00 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 100.0 2025-09-19 09:30:00-04:00 662.31 1 SPY 2025-10-17 420.0 CALL 2025-09-19 09:31:00-04:00 241.85 245.21 0.9922 -0.0968 3.9248 31.6941 -50.3758 2.6965 0.7126 0.0 2025-09-19 09:31:00-04:00 661.84 2 SPY 2025-10-17 420.0 CALL 2025-09-19 09:32:00-04:00 241.85 245.24 0.9930 -0.0911 3.5425 31.7413 -50.4238 2.6989 0.6996 0.0 2025-09-19 09:32:00-04:00 661.90 3 SPY 2025-10-17 420.0 CALL 2025-09-19 09:33:00-04:00 241.85 245.05 0.9934 -0.0888 3.3830 31.7607 -50.4363 2.7006 0.6937 0.0 2025-09-19 09:33:00-04:00 661.83 4 SPY 2025-10-17 420.0 CALL 2025-09-19 09:34:00-04:00 241.71 244.84 0.9923 -0.0957 3.8551 31.7028 -50.3645 2.6988 0.7097 0.0 2025-09-19 09:34:00-04:00 661.59 5 SPY 2025-10-17 420.0 CALL 2025-09-19 09:35:00-04:00 241.71 244.85 0.9905 -0.1078 4.6515 31.6018 -50.2644 2.6933 0.7355 0.0 2025-09-19 09:35:00-04:00 661.49 6 SPY 2025-10-17 420.0 CALL 2025-09-19 09:36:00-04:00 241.71 244.66 0.9925 -0.0945 3.7746 31.7127 -50.3676 2.6999 0.7068 0.0 2025-09-19 09:36:00-04:00 661.51 7 SPY 2025-10-17 420.0 CALL 2025-09-19 09:37:00-04:00 241.71 244.71 0.9908 -0.1055 4.5070 31.6204 -50.2775 2.6948 0.7308 0.0 2025-09-19 09:37:00-04:00 661.44 8 SPY 2025-10-17 420.0 CALL 2025-09-19 09:38:00-04:00 241.71 244.88 0.9910 -0.1046 4.4454 31.6283 -50.2917 2.6946 0.7291 0.0 2025-09-19 09:38:00-04:00 661.53 9 SPY 2025-10-17 420.0 CALL 2025-09-19 09:39:00-04:00 241.71 244.67 0.9898 -0.1120 4.9253 31.5662 -50.2219 2.6920 0.7437 0.0 2025-09-19 09:39:00-04:00 661.36 10 SPY 2025-10-17 420.0 CALL 2025-09-19 09:40:00-04:00 241.71 244.80 0.9941 -0.0841 3.0549 31.8000 -50.4604 2.7041 0.6812 0.0 2025-09-19 09:40:00-04:00 661.67 11 SPY 2025-10-17 420.0 CALL 2025-09-19 09:41:00-04:00 241.71 244.94 0.9953 -0.0765 2.4993 31.8649 -50.5305 2.7071 0.6593 0.0 2025-09-19 09:41:00-04:00 661.80 12 SPY 2025-10-17 420.0 CALL 2025-09-19 09:42:00-04:00 241.71 244.94 0.9951 -0.0778 2.5936 31.8541 -50.5197 2.7065 0.6632 0.0 2025-09-19 09:42:00-04:00 661.79 13 SPY 2025-10-17 420.0 CALL 2025-09-19 09:43:00-04:00 241.93 244.94 0.9947 -0.0804 2.7818 31.8322 -50.5063 2.7046 0.6710 0.0 2025-09-19 09:43:00-04:00 661.88 14 SPY 2025-10-17 420.0 CALL 2025-09-19 09:44:00-04:00 241.80 244.89 0.9911 -0.1034 4.3682 31.6382 -50.3053 2.6948 0.7267 0.0 2025-09-19 09:44:00-04:00 661.59 15 SPY 2025-10-17 420.0 CALL 2025-09-19 09:45:00-04:00 241.71 244.94 0.9921 -0.0969 3.9389 31.6923 -50.3580 2.6978 0.7126 0.0 2025-09-19 09:45:00-04:00 661.63 16 SPY 2025-10-17 420.0 CALL 2025-09-19 09:46:00-04:00 241.71 244.83 0.9907 -0.1066 4.5772 31.6114 -50.2731 2.6939 0.7332 0.0 2025-09-19 09:46:00-04:00 661.49 17 SPY 2025-10-17 420.0 CALL 2025-09-19 09:47:00-04:00 241.80 244.60 0.9939 -0.0853 3.1413 31.7897 -50.4462 2.7039 0.6843 0.0 2025-09-19 09:47:00-04:00 661.61 18 SPY 2025-10-17 420.0 CALL 2025-09-19 09:48:00-04:00 241.71 244.77 0.9979 -0.0600 1.2003 32.0064 -50.6660 2.7152 0.5937 0.0 2025-09-19 09:48:00-04:00 661.84 19 SPY 2025-10-17 420.0 CALL 2025-09-19 09:49:00-04:00 241.74 244.94 0.9979 -0.0600 1.1973 32.0067 -50.6740 2.7145 0.5937 0.0 2025-09-19 09:49:00-04:00 661.94 20 SPY 2025-10-17 420.0 CALL 2025-09-19 09:50:00-04:00 242.13 245.74 0.9953 -0.0766 2.5060 31.8641 -50.5766 2.7028 0.6609 0.0 2025-09-19 09:50:00-04:00 662.41 21 SPY 2025-10-17 420.0 CALL 2025-09-19 09:51:00-04:00 242.13 245.37 0.9982 -0.0582 1.0449 32.0222 -50.7208 2.7125 0.5843 0.0 2025-09-19 09:51:00-04:00 662.36 22 SPY 2025-10-17 420.0 CALL 2025-09-19 09:52:00-04:00 242.31 245.83 0.9951 -0.0778 2.5931 31.8541 -50.5773 2.7013 0.6648 0.0 2025-09-19 09:52:00-04:00 662.54 23 SPY 2025-10-17 420.0 CALL 2025-09-19 09:53:00-04:00 242.75 245.56 0.9951 -0.0778 2.5891 31.8546 -50.5839 2.7007 0.6648 0.0 2025-09-19 09:53:00-04:00 662.62 24 SPY 2025-10-17 420.0 CALL 2025-09-19 09:54:00-04:00 242.38 245.89 0.9943 -0.0828 2.9538 31.8120 -50.5398 2.6986 0.6792 0.0 2025-09-19 09:54:00-04:00 662.56 25 SPY 2025-10-17 420.0 CALL 2025-09-19 09:55:00-04:00 242.26 245.77 0.9951 -0.0779 2.5962 31.8538 -50.5723 2.7017 0.6648 0.0 2025-09-19 09:55:00-04:00 662.48 26 SPY 2025-10-17 420.0 CALL 2025-09-19 09:56:00-04:00 242.26 245.77 0.9949 -0.0792 2.6922 31.8426 -50.5613 2.7011 0.6687 0.0 2025-09-19 09:56:00-04:00 662.47 27 SPY 2025-10-17 420.0 CALL 2025-09-19 09:57:00-04:00 242.44 245.60 0.9915 -0.1014 4.2287 31.6559 -50.3753 2.6910 0.7238 0.0 2025-09-19 09:57:00-04:00 662.29 28 SPY 2025-10-17 420.0 CALL 2025-09-19 09:58:00-04:00 242.15 245.63 0.9930 -0.0912 3.5426 31.7413 -50.4506 2.6965 0.7003 0.0 2025-09-19 09:58:00-04:00 662.25 29 SPY 2025-10-17 420.0 CALL 2025-09-19 09:59:00-04:00 242.15 245.37 0.9922 -0.0968 3.9268 31.6938 -50.3932 2.6949 0.7132 0.0 2025-09-19 09:59:00-04:00 662.07 30 SPY 2025-10-17 420.0 CALL 2025-09-19 10:00:00-04:00 242.15 245.52 0.9922 -0.0968 3.9221 31.6944 -50.3991 2.6944 0.7132 0.0 2025-09-19 10:00:00-04:00 662.14 ' python/polars: schema: *id030 example: 'shape: (31, 17) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────┬────────┬────────┬─────────┬────────┬─────────┬──────────┬────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ bid ┆ ask ┆ delta ┆ theta ┆ vega ┆ rho ┆ epsilon ┆ lambda ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════╪════════╪════════╪═════════╪════════╪═════════╪══════════╪════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:30:00 EDT ┆ 0.0 ┆ 0.0 ┆ 1.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 100.0 ┆ 2025-09-19 09:30:00 EDT ┆ 662.31 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:31:00 EDT ┆ 241.85 ┆ 245.21 ┆ 0.9922 ┆ -0.0968 ┆ 3.9248 ┆ 31.6941 ┆ -50.3758 ┆ 2.6965 ┆ 0.7126 ┆ 0.0 ┆ 2025-09-19 09:31:00 EDT ┆ 661.84 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:32:00 EDT ┆ 241.85 ┆ 245.24 ┆ 0.993 ┆ -0.0911 ┆ 3.5425 ┆ 31.7413 ┆ -50.4238 ┆ 2.6989 ┆ 0.6996 ┆ 0.0 ┆ 2025-09-19 09:32:00 EDT ┆ 661.9 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:33:00 EDT ┆ 241.85 ┆ 245.05 ┆ 0.9934 ┆ -0.0888 ┆ 3.383 ┆ 31.7607 ┆ -50.4363 ┆ 2.7006 ┆ 0.6937 ┆ 0.0 ┆ 2025-09-19 09:33:00 EDT ┆ 661.83 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:34:00 EDT ┆ 241.71 ┆ 244.84 ┆ 0.9923 ┆ -0.0957 ┆ 3.8551 ┆ 31.7028 ┆ -50.3645 ┆ 2.6988 ┆ 0.7097 ┆ 0.0 ┆ 2025-09-19 09:34:00 EDT ┆ 661.59 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:56:00 EDT ┆ 242.26 ┆ 245.77 ┆ 0.9949 ┆ -0.0792 ┆ 2.6922 ┆ 31.8426 ┆ -50.5613 ┆ 2.7011 ┆ 0.6687 ┆ 0.0 ┆ 2025-09-19 09:56:00 EDT ┆ 662.47 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:57:00 EDT ┆ 242.44 ┆ 245.6 ┆ 0.9915 ┆ -0.1014 ┆ 4.2287 ┆ 31.6559 ┆ -50.3753 ┆ 2.691 ┆ 0.7238 ┆ 0.0 ┆ 2025-09-19 09:57:00 EDT ┆ 662.29 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:58:00 EDT ┆ 242.15 ┆ 245.63 ┆ 0.993 ┆ -0.0912 ┆ 3.5426 ┆ 31.7413 ┆ -50.4506 ┆ 2.6965 ┆ 0.7003 ┆ 0.0 ┆ 2025-09-19 09:58:00 EDT ┆ 662.25 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:59:00 EDT ┆ 242.15 ┆ 245.37 ┆ 0.9922 ┆ -0.0968 ┆ 3.9268 ┆ 31.6938 ┆ -50.3932 ┆ 2.6949 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 09:59:00 EDT ┆ 662.07 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 10:00:00 EDT ┆ 242.15 ┆ 245.52 ┆ 0.9922 ┆ -0.0968 ┆ 3.9221 ┆ 31.6944 ┆ -50.3991 ┆ 2.6944 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 10:00:00 EDT ┆ 662.14 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────┴────────┴────────┴─────────┴────────┴─────────┴──────────┴────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/trade_greeks/first_order: x-concurrent-limit-ttl-ms: '1810' x-min-subscription: professional x-history-access: true get: summary: First Order Trade Greeks operationId: option_history_trade_greeks_first_order x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_trade_greeks_first_order(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_trade_greeks_first_order(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' tags: - History description: '- Returns the data for all contracts that share the same provided symbol and expiration. - Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html). - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html). - Multi-day requests are limited to 1 month of data, and must specify an expiration. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/first_order?symbol=AAPL&expiration=20241108&date=20241104 description: Returns first order trade greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/first_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241110 description: Returns first order trade greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/first_order?symbol=AAPL&expiration=*&date=20241104 description: Returns first order trade greeks for an full chain of option contracts - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/first_order?symbol=AAPL&expiration=*&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns first order trade greeks for an option contract content: text/csv: schema: type: array items: &id031 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. delta: type: number description: The delta. theta: type: string description: The Theta. vega: type: number description: The vega. rho: type: number description: The rho. epsilon: type: string description: The epsilon. lambda: type: number description: The lambda. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price,delta,theta,vega,rho,epsilon,lambda,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:53:54.069,156249981,255,255,255,255,125,1,9,0.01,0.0025,-0.0134,0.1858,0.0061,-0.0062,56.6408,0.5749,0.0132,2024-11-04T09:53:54,221.33\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:47:14.764,546105677,255,255,255,255,131,2,5,81.32,0.9976,-0.0520,0.1690,1.5274,-2.4186,2.7139,1.5937,0.0000,2024-11-04T11:47:14,221.22\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:47:56.669,548097371,255,255,255,255,130,3,7,81.16,1.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0011,2024-11-04T11:47:56,221.18\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:48:03.852,548397162,255,255,255,255,130,3,6,81.26,0.9976,-0.0522,0.1697,1.5274,-2.4179,2.7152,1.5937,0.0000,2024-11-04T11:48:03,221.16\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:48:51.11,550463381,255,255,255,255,131,1,5,81.27,0.9993,-0.0279,0.0544,1.5317,-2.4223,2.7198,1.3968,0.0000,2024-11-04T11:48:51,221.19\r\n" application/json: schema: &id032 type: array items: *id031 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":262.500,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.33,\"delta\":0.0025,\"implied_vol\":0.5749,\"theta\":-0.0134,\"iv_error\":0.0132,\"epsilon\":-0.0062,\"sequence\":156249981,\"condition\":125,\"lambda\":56.6408,\"size\":1,\"price\":0.01,\"ext_condition2\":255,\"rho\":0.0061,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":9,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:53:54\",\"vega\":0.1858,\"timestamp\":\"2024-11-04T09:53:54.069\"}\n ]\n },\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":140.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.22,\"delta\":0.9976,\"implied_vol\":1.5937,\"theta\":-0.0520,\"iv_error\":0.0000,\"epsilon\":-2.4186,\"sequence\":546105677,\"condition\":131,\"lambda\":2.7139,\"size\":2,\"price\":81.32,\"ext_condition2\":255,\"rho\":1.5274,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:47:14\",\"vega\":0.1690,\"timestamp\":\"2024-11-04T11:47:14.764\"},\n {\"underlying_price\":221.18,\"delta\":1.0000,\"implied_vol\":0.0000,\"theta\":0.0000,\"iv_error\":0.0011,\"epsilon\":0.0000,\"sequence\":548097371,\"condition\":130,\"lambda\":0.0000,\"size\":3,\"price\":81.16,\"ext_condition2\":255,\"rho\":0.0000,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":7,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:47:56\",\"vega\":0.0000,\"timestamp\":\"2024-11-04T11:47:56.669\"},\n {\"underlying_price\":221.16,\"delta\":0.9976,\"implied_vol\":1.5937,\"theta\":-0.0522,\"iv_error\":0.0000,\"epsilon\":-2.4179,\"sequence\":548397162,\"condition\":130,\"lambda\":2.7152,\"size\":3,\"price\":81.26,\"ext_condition2\":255,\"rho\":1.5274,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:48:03\",\"vega\":0.1697,\"timestamp\":\"2024-11-04T11:48:03.852\"},\n {\"underlying_price\":221.19,\"delta\":0.9993,\"implied_vol\":1.3968,\"theta\":-0.0279,\"iv_error\":0.0000,\"epsilon\":-2.4223,\"sequence\":550463381,\"condition\":131,\"lambda\":2.7198,\"size\":1,\"price\":81.27,\"ext_condition2\":255,\"rho\":1.5317,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:48:51\",\"vega\":0.0544,\"timestamp\":\"2024-11-04T11:48:51.11\"}\n ]\n } \n ]\n}\n" application/x-ndjson: schema: *id032 example: '{"symbol":"AAPL","underlying_price":221.33,"strike":262.500,"delta":0.0025,"right":"CALL","implied_vol":0.5749,"theta":-0.0134,"iv_error":0.0132,"epsilon":-0.0062,"sequence":156249981,"condition":125,"lambda":56.6408,"size":1,"price":0.01,"ext_condition2":255,"rho":0.0061,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":9,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:53:54","vega":0.1858,"timestamp":"2024-11-04T09:53:54.069"} {"symbol":"AAPL","underlying_price":221.22,"strike":140.000,"delta":0.9976,"right":"CALL","implied_vol":1.5937,"theta":-0.0520,"iv_error":0.0000,"epsilon":-2.4186,"sequence":546105677,"condition":131,"lambda":2.7139,"size":2,"price":81.32,"ext_condition2":255,"rho":1.5274,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:47:14","vega":0.1690,"timestamp":"2024-11-04T11:47:14.764"} {"symbol":"AAPL","underlying_price":221.18,"strike":140.000,"delta":1.0000,"right":"CALL","implied_vol":0.0000,"theta":0.0000,"iv_error":0.0011,"epsilon":0.0000,"sequence":548097371,"condition":130,"lambda":0.0000,"size":3,"price":81.16,"ext_condition2":255,"rho":0.0000,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":7,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:47:56","vega":0.0000,"timestamp":"2024-11-04T11:47:56.669"} {"symbol":"AAPL","underlying_price":221.16,"strike":140.000,"delta":0.9976,"right":"CALL","implied_vol":1.5937,"theta":-0.0522,"iv_error":0.0000,"epsilon":-2.4179,"sequence":548397162,"condition":130,"lambda":2.7152,"size":3,"price":81.26,"ext_condition2":255,"rho":1.5274,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:48:03","vega":0.1697,"timestamp":"2024-11-04T11:48:03.852"} {"symbol":"AAPL","underlying_price":221.19,"strike":140.000,"delta":0.9993,"right":"CALL","implied_vol":1.3968,"theta":-0.0279,"iv_error":0.0000,"epsilon":-2.4223,"sequence":550463381,"condition":131,"lambda":2.7198,"size":1,"price":81.27,"ext_condition2":255,"rho":1.5317,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:48:51","vega":0.0544,"timestamp":"2024-11-04T11:48:51.11"}' python/pandas: schema: *id032 example: 'symbol expiration strike right timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price delta theta vega rho epsilon lambda implied_vol iv_error underlying_timestamp underlying_price 0 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:01.503000-05:00 58765096 255 255 255 255 18 1 6 0.04 0.0127 -0.0347 0.9585 0.0397 -0.0401 87.5339 0.3066 -0.0196 2025-11-10 09:30:01-05:00 269.02 1 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.123000-05:00 59131360 255 255 255 255 18 3 9 0.04 0.0132 -0.0358 0.9880 0.0411 -0.0415 87.1943 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 2 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.126000-05:00 59133877 255 255 255 255 18 1 9 0.04 0.0132 -0.0358 0.9880 0.0411 -0.0415 87.1943 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 3 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:03.929000-05:00 60102776 255 255 255 255 95 1 1 0.03 0.0105 -0.0278 0.8125 0.0328 -0.0331 94.7817 0.2890 -0.0023 2025-11-10 09:30:03-05:00 269.56 4 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:31.912000-05:00 66164357 255 255 255 255 18 1 69 0.04 0.0135 -0.0350 1.0163 0.0424 -0.0429 91.5404 0.2910 0.0025 2025-11-10 09:30:31-05:00 270.26 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 588 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:11.904000-05:00 62754770 255 255 255 255 130 1 42 6.22 0.7305 -0.3366 9.6372 2.2328 -2.3055 31.6826 0.2800 0.0000 2025-11-10 09:30:11-05:00 269.73 589 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:35.448000-05:00 66662366 255 255 255 255 18 3 7 6.35 0.7569 -0.3048 9.1457 2.3176 -2.3918 32.1952 0.2646 0.0000 2025-11-10 09:30:35-05:00 270.10 590 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:56.546000-05:00 69301579 255 255 255 255 130 2 6 6.45 0.7427 -0.3302 9.4218 2.2710 -2.3465 31.0967 0.2802 0.0000 2025-11-10 09:30:56-05:00 270.04 591 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:01.510000-05:00 58769718 255 255 255 255 18 1 6 0.02 0.0057 -0.0203 0.4737 0.0177 -0.0179 80.4149 0.3632 -0.0442 2025-11-10 09:30:01-05:00 269.02 592 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:03.095000-05:00 59706894 255 255 255 255 125 1 6 0.02 0.0061 -0.0213 0.5038 0.0190 -0.0192 80.7578 0.3593 0.0198 2025-11-10 09:30:03-05:00 269.56 [593 rows x 24 columns] ' python/polars: schema: *id032 example: 'shape: (593, 24) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬──────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬───────┬────────┬─────────┬────────┬────────┬─────────┬─────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price ┆ delta ┆ theta ┆ vega ┆ rho ┆ epsilon ┆ lambda ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪══════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪═══════╪════════╪═════════╪════════╪════════╪═════════╪═════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:01.503 EST ┆ 58765096 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.04 ┆ 0.0127 ┆ -0.0347 ┆ 0.9585 ┆ 0.0397 ┆ -0.0401 ┆ 87.5339 ┆ 0.3066 ┆ -0.0196 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.123 EST ┆ 59131360 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 9 ┆ 0.04 ┆ 0.0132 ┆ -0.0358 ┆ 0.988 ┆ 0.0411 ┆ -0.0415 ┆ 87.1943 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.126 EST ┆ 59133877 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 9 ┆ 0.04 ┆ 0.0132 ┆ -0.0358 ┆ 0.988 ┆ 0.0411 ┆ -0.0415 ┆ 87.1943 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:03.929 EST ┆ 60102776 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 95 ┆ 1 ┆ 1 ┆ 0.03 ┆ 0.0105 ┆ -0.0278 ┆ 0.8125 ┆ 0.0328 ┆ -0.0331 ┆ 94.7817 ┆ 0.289 ┆ -0.0023 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:31.912 EST ┆ 66164357 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 69 ┆ 0.04 ┆ 0.0135 ┆ -0.035 ┆ 1.0163 ┆ 0.0424 ┆ -0.0429 ┆ 91.5404 ┆ 0.291 ┆ 0.0025 ┆ 2025-11-10 09:30:31 EST ┆ 270.26 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:11.904 EST ┆ 62754770 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 1 ┆ 42 ┆ 6.22 ┆ 0.7305 ┆ -0.3366 ┆ 9.6372 ┆ 2.2328 ┆ -2.3055 ┆ 31.6826 ┆ 0.28 ┆ 0.0 ┆ 2025-11-10 09:30:11 EST ┆ 269.73 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:35.448 EST ┆ 66662366 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 7 ┆ 6.35 ┆ 0.7569 ┆ -0.3048 ┆ 9.1457 ┆ 2.3176 ┆ -2.3918 ┆ 32.1952 ┆ 0.2646 ┆ 0.0 ┆ 2025-11-10 09:30:35 EST ┆ 270.1 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:56.546 EST ┆ 69301579 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 2 ┆ 6 ┆ 6.45 ┆ 0.7427 ┆ -0.3302 ┆ 9.4218 ┆ 2.271 ┆ -2.3465 ┆ 31.0967 ┆ 0.2802 ┆ 0.0 ┆ 2025-11-10 09:30:56 EST ┆ 270.04 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:01.510 EST ┆ 58769718 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0057 ┆ -0.0203 ┆ 0.4737 ┆ 0.0177 ┆ -0.0179 ┆ 80.4149 ┆ 0.3632 ┆ -0.0442 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:03.095 EST ┆ 59706894 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 125 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0061 ┆ -0.0213 ┆ 0.5038 ┆ 0.019 ┆ -0.0192 ┆ 80.7578 ┆ 0.3593 ┆ 0.0198 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴──────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴───────┴────────┴─────────┴────────┴────────┴─────────┴─────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/greeks/second_order: x-concurrent-limit-ttl-ms: '3004' x-min-subscription: professional x-history-access: true get: summary: Second Order Greeks operationId: option_history_greeks_second_order x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_greeks_second_order(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='1h',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_greeks_second_order(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='1h',\n)\n" tags: - History description: "- Returns the data for all contracts that share the same provided symbol and expiration. \n- Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint. \n- The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/greeks/second_order?symbol=AAPL&expiration=20241108&date=20241104&interval=1h description: Returns second order greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/greeks/second_order?symbol=AAPL&expiration=20241108&date=20241104&interval=1h&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/option/history/greeks/second_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241107&interval=1h description: Returns second order greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/greeks/second_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241107&interval=1h&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration_no_star' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns second order greeks for an option contract content: text/csv: schema: type: array items: &id033 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. bid: type: number description: The last NBBO bid price. ask: type: number description: The last NBBO ask price. gamma: type: number description: The gamma. vanna: type: number description: The vanna. charm: type: number description: The charm. vomma: type: number description: The vomma. veta: type: number description: The veta. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,bid,ask,gamma,vanna,charm,vomma,veta,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:30:00,0.00,0.00,0.0000,0.0000,0.0000,0.0000,0.0000,0.2500,100.0000,2024-11-04T09:30:00,221.00\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T10:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0000,0.0000,0.2500,100.0000,2024-11-04T10:30:00,221.73\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T11:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0000,0.0000,0.2500,100.0000,2024-11-04T11:30:00,221.49\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T12:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0000,0.0000,0.2500,100.0000,2024-11-04T12:30:00,221.11\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T13:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0000,0.0000,0.2500,100.0000,2024-11-04T13:30:00,222.03\r\n" application/json: schema: &id034 type: array items: *id033 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":262.500,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.00,\"veta\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"charm\":0.0000,\"ask\":0.00,\"vanna\":0.0000,\"vomma\":0.0000,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:30:00\",\"gamma\":0.0000,\"timestamp\":\"2024-11-04T09:30:00\"},\n {\"underlying_price\":221.73,\"veta\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"charm\":0.0000,\"ask\":0.01,\"vanna\":0.0000,\"vomma\":0.0000,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T10:30:00\",\"gamma\":0.0000,\"timestamp\":\"2024-11-04T10:30:00\"},\n {\"underlying_price\":221.49,\"veta\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"charm\":0.0000,\"ask\":0.01,\"vanna\":0.0000,\"vomma\":0.0000,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T11:30:00\",\"gamma\":0.0000,\"timestamp\":\"2024-11-04T11:30:00\"},\n {\"underlying_price\":221.11,\"veta\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"charm\":0.0000,\"ask\":0.01,\"vanna\":0.0000,\"vomma\":0.0000,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T12:30:00\",\"gamma\":0.0000,\"timestamp\":\"2024-11-04T12:30:00\"},\n {\"underlying_price\":222.03,\"veta\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"charm\":0.0000,\"ask\":0.01,\"vanna\":0.0000,\"vomma\":0.0000,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T13:30:00\",\"gamma\":0.0000,\"timestamp\":\"2024-11-04T13:30:00\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id034 example: '{"symbol":"AAPL","underlying_price":221.00,"strike":262.500,"right":"CALL","veta":0.0000,"implied_vol":0.2500,"iv_error":100.0000,"charm":0.0000,"ask":0.00,"expiration":"2024-11-08","vanna":0.0000,"vomma":0.0000,"bid":0.00,"underlying_timestamp":"2024-11-04T09:30:00","gamma":0.0000,"timestamp":"2024-11-04T09:30:00"} {"symbol":"AAPL","underlying_price":221.73,"strike":262.500,"right":"CALL","veta":0.0000,"implied_vol":0.2500,"iv_error":100.0000,"charm":0.0000,"ask":0.01,"expiration":"2024-11-08","vanna":0.0000,"vomma":0.0000,"bid":0.00,"underlying_timestamp":"2024-11-04T10:30:00","gamma":0.0000,"timestamp":"2024-11-04T10:30:00"} {"symbol":"AAPL","underlying_price":221.49,"strike":262.500,"right":"CALL","veta":0.0000,"implied_vol":0.2500,"iv_error":100.0000,"charm":0.0000,"ask":0.01,"expiration":"2024-11-08","vanna":0.0000,"vomma":0.0000,"bid":0.00,"underlying_timestamp":"2024-11-04T11:30:00","gamma":0.0000,"timestamp":"2024-11-04T11:30:00"} {"symbol":"AAPL","underlying_price":221.11,"strike":262.500,"right":"CALL","veta":0.0000,"implied_vol":0.2500,"iv_error":100.0000,"charm":0.0000,"ask":0.01,"expiration":"2024-11-08","vanna":0.0000,"vomma":0.0000,"bid":0.00,"underlying_timestamp":"2024-11-04T12:30:00","gamma":0.0000,"timestamp":"2024-11-04T12:30:00"} {"symbol":"AAPL","underlying_price":222.03,"strike":262.500,"right":"CALL","veta":0.0000,"implied_vol":0.2500,"iv_error":100.0000,"charm":0.0000,"ask":0.01,"expiration":"2024-11-08","vanna":0.0000,"vomma":0.0000,"bid":0.00,"underlying_timestamp":"2024-11-04T13:30:00","gamma":0.0000,"timestamp":"2024-11-04T13:30:00"}' python/pandas: schema: *id034 example: 'symbol expiration strike right timestamp bid ask gamma vanna charm vomma veta implied_vol iv_error underlying_timestamp underlying_price 0 SPY 2025-10-17 420.0 CALL 2025-09-19 09:30:00-04:00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 100.0 2025-09-19 09:30:00-04:00 662.31 1 SPY 2025-10-17 420.0 CALL 2025-09-19 09:31:00-04:00 241.85 245.21 0.0001 -0.0667 0.3054 29.5861 161.0257 0.7126 0.0 2025-09-19 09:31:00-04:00 661.84 2 SPY 2025-10-17 420.0 CALL 2025-09-19 09:32:00-04:00 241.85 245.24 0.0001 -0.0626 0.2813 28.2454 150.0252 0.6996 0.0 2025-09-19 09:32:00-04:00 661.90 3 SPY 2025-10-17 420.0 CALL 2025-09-19 09:33:00-04:00 241.85 245.05 0.0001 -0.0608 0.2711 27.6521 145.2796 0.6937 0.0 2025-09-19 09:33:00-04:00 661.83 4 SPY 2025-10-17 420.0 CALL 2025-09-19 09:34:00-04:00 241.71 244.84 0.0001 -0.0660 0.3012 29.3738 159.0453 0.7097 0.0 2025-09-19 09:34:00-04:00 661.59 5 SPY 2025-10-17 420.0 CALL 2025-09-19 09:35:00-04:00 241.71 244.85 0.0001 -0.0739 0.3495 31.8146 180.6250 0.7355 0.0 2025-09-19 09:35:00-04:00 661.49 6 SPY 2025-10-17 420.0 CALL 2025-09-19 09:36:00-04:00 241.71 244.66 0.0001 -0.0652 0.2962 29.1057 156.7512 0.7068 0.0 2025-09-19 09:36:00-04:00 661.51 7 SPY 2025-10-17 420.0 CALL 2025-09-19 09:37:00-04:00 241.71 244.71 0.0001 -0.0726 0.3410 31.4143 176.8465 0.7308 0.0 2025-09-19 09:37:00-04:00 661.44 8 SPY 2025-10-17 420.0 CALL 2025-09-19 09:38:00-04:00 241.71 244.88 0.0001 -0.0720 0.3373 31.2290 175.2241 0.7291 0.0 2025-09-19 09:38:00-04:00 661.53 9 SPY 2025-10-17 420.0 CALL 2025-09-19 09:39:00-04:00 241.71 244.67 0.0001 -0.0765 0.3655 32.5539 187.6142 0.7437 0.0 2025-09-19 09:39:00-04:00 661.36 10 SPY 2025-10-17 420.0 CALL 2025-09-19 09:40:00-04:00 241.71 244.80 0.0001 -0.0570 0.2496 26.3452 135.2032 0.6812 0.0 2025-09-19 09:40:00-04:00 661.67 11 SPY 2025-10-17 420.0 CALL 2025-09-19 09:41:00-04:00 241.71 244.94 0.0001 -0.0499 0.2116 23.7953 117.0834 0.6593 0.0 2025-09-19 09:41:00-04:00 661.80 12 SPY 2025-10-17 420.0 CALL 2025-09-19 09:42:00-04:00 241.71 244.94 0.0001 -0.0512 0.2182 24.2576 120.2646 0.6632 0.0 2025-09-19 09:42:00-04:00 661.79 13 SPY 2025-10-17 420.0 CALL 2025-09-19 09:43:00-04:00 241.93 244.94 0.0001 -0.0536 0.2311 25.1332 126.4828 0.6710 0.0 2025-09-19 09:43:00-04:00 661.88 14 SPY 2025-10-17 420.0 CALL 2025-09-19 09:44:00-04:00 241.80 244.89 0.0001 -0.0712 0.3326 30.9975 173.1709 0.7267 0.0 2025-09-19 09:44:00-04:00 661.59 15 SPY 2025-10-17 420.0 CALL 2025-09-19 09:45:00-04:00 241.71 244.94 0.0001 -0.0669 0.3064 29.6507 161.4115 0.7126 0.0 2025-09-19 09:45:00-04:00 661.63 16 SPY 2025-10-17 420.0 CALL 2025-09-19 09:46:00-04:00 241.71 244.83 0.0001 -0.0732 0.3451 31.6083 178.6905 0.7332 0.0 2025-09-19 09:46:00-04:00 661.49 17 SPY 2025-10-17 420.0 CALL 2025-09-19 09:47:00-04:00 241.80 244.60 0.0001 -0.0580 0.2554 26.7091 137.8938 0.6843 0.0 2025-09-19 09:47:00-04:00 661.61 18 SPY 2025-10-17 420.0 CALL 2025-09-19 09:48:00-04:00 241.71 244.77 0.0000 -0.0298 0.1136 15.6634 67.5747 0.5937 0.0 2025-09-19 09:48:00-04:00 661.84 19 SPY 2025-10-17 420.0 CALL 2025-09-19 09:49:00-04:00 241.74 244.94 0.0000 -0.0297 0.1134 15.6349 67.4468 0.5937 0.0 2025-09-19 09:49:00-04:00 661.94 20 SPY 2025-10-17 420.0 CALL 2025-09-19 09:50:00-04:00 242.13 245.74 0.0001 -0.0499 0.2118 23.7857 117.3279 0.6609 0.0 2025-09-19 09:50:00-04:00 662.41 21 SPY 2025-10-17 420.0 CALL 2025-09-19 09:51:00-04:00 242.13 245.37 0.0000 -0.0268 0.1007 14.3523 60.6982 0.5843 0.0 2025-09-19 09:51:00-04:00 662.36 22 SPY 2025-10-17 420.0 CALL 2025-09-19 09:52:00-04:00 242.31 245.83 0.0001 -0.0510 0.2179 24.2017 120.2697 0.6648 0.0 2025-09-19 09:52:00-04:00 662.54 23 SPY 2025-10-17 420.0 CALL 2025-09-19 09:53:00-04:00 242.75 245.56 0.0001 -0.0509 0.2176 24.1763 120.1353 0.6648 0.0 2025-09-19 09:53:00-04:00 662.62 24 SPY 2025-10-17 420.0 CALL 2025-09-19 09:54:00-04:00 242.38 245.89 0.0001 -0.0555 0.2425 25.8456 132.0392 0.6792 0.0 2025-09-19 09:54:00-04:00 662.56 25 SPY 2025-10-17 420.0 CALL 2025-09-19 09:55:00-04:00 242.26 245.77 0.0001 -0.0510 0.2181 24.2207 120.3705 0.6648 0.0 2025-09-19 09:55:00-04:00 662.48 26 SPY 2025-10-17 420.0 CALL 2025-09-19 09:56:00-04:00 242.26 245.77 0.0001 -0.0523 0.2248 24.6765 123.5617 0.6687 0.0 2025-09-19 09:56:00-04:00 662.47 27 SPY 2025-10-17 420.0 CALL 2025-09-19 09:57:00-04:00 242.44 245.60 0.0001 -0.0696 0.3239 30.5157 169.4446 0.7238 0.0 2025-09-19 09:57:00-04:00 662.29 28 SPY 2025-10-17 420.0 CALL 2025-09-19 09:58:00-04:00 242.15 245.63 0.0001 -0.0625 0.2812 28.2172 150.0430 0.7003 0.0 2025-09-19 09:58:00-04:00 662.25 29 SPY 2025-10-17 420.0 CALL 2025-09-19 09:59:00-04:00 242.15 245.37 0.0001 -0.0666 0.3055 29.5729 161.0912 0.7132 0.0 2025-09-19 09:59:00-04:00 662.07 30 SPY 2025-10-17 420.0 CALL 2025-09-19 10:00:00-04:00 242.15 245.52 0.0001 -0.0666 0.3051 29.5515 160.9628 0.7132 0.0 2025-09-19 10:00:00-04:00 662.14 ' python/polars: schema: *id034 example: 'shape: (31, 16) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────┬────────┬────────┬─────────┬────────┬─────────┬──────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ bid ┆ ask ┆ gamma ┆ vanna ┆ charm ┆ vomma ┆ veta ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════╪════════╪════════╪═════════╪════════╪═════════╪══════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:30:00 EDT ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 100.0 ┆ 2025-09-19 09:30:00 EDT ┆ 662.31 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:31:00 EDT ┆ 241.85 ┆ 245.21 ┆ 0.0001 ┆ -0.0667 ┆ 0.3054 ┆ 29.5861 ┆ 161.0257 ┆ 0.7126 ┆ 0.0 ┆ 2025-09-19 09:31:00 EDT ┆ 661.84 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:32:00 EDT ┆ 241.85 ┆ 245.24 ┆ 0.0001 ┆ -0.0626 ┆ 0.2813 ┆ 28.2454 ┆ 150.0252 ┆ 0.6996 ┆ 0.0 ┆ 2025-09-19 09:32:00 EDT ┆ 661.9 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:33:00 EDT ┆ 241.85 ┆ 245.05 ┆ 0.0001 ┆ -0.0608 ┆ 0.2711 ┆ 27.6521 ┆ 145.2796 ┆ 0.6937 ┆ 0.0 ┆ 2025-09-19 09:33:00 EDT ┆ 661.83 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:34:00 EDT ┆ 241.71 ┆ 244.84 ┆ 0.0001 ┆ -0.066 ┆ 0.3012 ┆ 29.3738 ┆ 159.0453 ┆ 0.7097 ┆ 0.0 ┆ 2025-09-19 09:34:00 EDT ┆ 661.59 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:56:00 EDT ┆ 242.26 ┆ 245.77 ┆ 0.0001 ┆ -0.0523 ┆ 0.2248 ┆ 24.6765 ┆ 123.5617 ┆ 0.6687 ┆ 0.0 ┆ 2025-09-19 09:56:00 EDT ┆ 662.47 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:57:00 EDT ┆ 242.44 ┆ 245.6 ┆ 0.0001 ┆ -0.0696 ┆ 0.3239 ┆ 30.5157 ┆ 169.4446 ┆ 0.7238 ┆ 0.0 ┆ 2025-09-19 09:57:00 EDT ┆ 662.29 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:58:00 EDT ┆ 242.15 ┆ 245.63 ┆ 0.0001 ┆ -0.0625 ┆ 0.2812 ┆ 28.2172 ┆ 150.043 ┆ 0.7003 ┆ 0.0 ┆ 2025-09-19 09:58:00 EDT ┆ 662.25 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:59:00 EDT ┆ 242.15 ┆ 245.37 ┆ 0.0001 ┆ -0.0666 ┆ 0.3055 ┆ 29.5729 ┆ 161.0912 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 09:59:00 EDT ┆ 662.07 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 10:00:00 EDT ┆ 242.15 ┆ 245.52 ┆ 0.0001 ┆ -0.0666 ┆ 0.3051 ┆ 29.5515 ┆ 160.9628 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 10:00:00 EDT ┆ 662.14 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────┴────────┴────────┴─────────┴────────┴─────────┴──────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/trade_greeks/second_order: x-concurrent-limit-ttl-ms: '4829' x-min-subscription: professional x-history-access: true get: summary: Second Order Trade Greeks operationId: option_history_trade_greeks_second_order x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_trade_greeks_second_order(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_trade_greeks_second_order(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' tags: - History description: '- Returns the data for all contracts that share the same provided symbol and expiration. - Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html). - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html). - Multi-day requests are limited to 1 month of data, and must specify an expiration. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/second_order?symbol=AAPL&expiration=20241108&date=20241104 description: Returns second order trade greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/second_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241110 description: Returns second order trade greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/second_order?symbol=AAPL&expiration=*&date=20241104 description: Returns second order trade greeks for an full chain of option contracts - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/second_order?symbol=AAPL&expiration=*&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns second order trade greeks for an option contract content: text/csv: schema: type: array items: &id035 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. gamma: type: number description: The gamma. vanna: type: number description: The vanna. charm: type: string description: The charm. vomma: type: number description: The vomma. veta: type: number description: The veta. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price,gamma,vanna,charm,vomma,veta,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:53:54.069,156249981,255,255,255,255,125,1,9,0.01,0.0006,0.0398,-1.0514,2.5798,0.0137,0.5749,0.0132,2024-11-04T09:53:54,221.33\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:47:14.764,546105677,255,255,255,255,131,2,5,81.32,0.0001,-0.0121,0.8843,0.7986,0.0063,1.5937,0.0000,2024-11-04T11:47:14,221.22\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:47:56.669,548097371,255,255,255,255,130,3,7,81.16,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0011,2024-11-04T11:47:56,221.18\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:48:03.852,548397162,255,255,255,255,130,3,6,81.26,0.0001,-0.0122,0.8879,0.8011,0.0064,1.5937,0.0000,2024-11-04T11:48:03,221.16\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:48:51.11,550463381,255,255,255,255,131,1,5,81.27,0.0000,-0.0051,0.3271,0.3817,0.0025,1.3968,0.0000,2024-11-04T11:48:51,221.19\r\n" application/json: schema: &id036 type: array items: *id035 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":262.500,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.33,\"veta\":0.0137,\"implied_vol\":0.5749,\"iv_error\":0.0132,\"sequence\":156249981,\"condition\":125,\"size\":1,\"charm\":-1.0514,\"price\":0.01,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":9,\"vanna\":0.0398,\"vomma\":2.5798,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:53:54\",\"gamma\":0.0006,\"timestamp\":\"2024-11-04T09:53:54.069\"}\n ]\n },\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":140.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.22,\"veta\":0.0063,\"implied_vol\":1.5937,\"iv_error\":0.0000,\"sequence\":546105677,\"condition\":131,\"size\":2,\"charm\":0.8843,\"price\":81.32,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"vanna\":-0.0121,\"vomma\":0.7986,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:47:14\",\"gamma\":0.0001,\"timestamp\":\"2024-11-04T11:47:14.764\"},\n {\"underlying_price\":221.18,\"veta\":0.0000,\"implied_vol\":0.0000,\"iv_error\":0.0011,\"sequence\":548097371,\"condition\":130,\"size\":3,\"charm\":0.0000,\"price\":81.16,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":7,\"vanna\":0.0000,\"vomma\":0.0000,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:47:56\",\"gamma\":0.0000,\"timestamp\":\"2024-11-04T11:47:56.669\"},\n {\"underlying_price\":221.16,\"veta\":0.0064,\"implied_vol\":1.5937,\"iv_error\":0.0000,\"sequence\":548397162,\"condition\":130,\"size\":3,\"charm\":0.8879,\"price\":81.26,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"vanna\":-0.0122,\"vomma\":0.8011,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:48:03\",\"gamma\":0.0001,\"timestamp\":\"2024-11-04T11:48:03.852\"},\n {\"underlying_price\":221.19,\"veta\":0.0025,\"implied_vol\":1.3968,\"iv_error\":0.0000,\"sequence\":550463381,\"condition\":131,\"size\":1,\"charm\":0.3271,\"price\":81.27,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"vanna\":-0.0051,\"vomma\":0.3817,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:48:51\",\"gamma\":0.0000,\"timestamp\":\"2024-11-04T11:48:51.11\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id036 example: '{"symbol":"AAPL","underlying_price":221.33,"strike":262.500,"right":"CALL","veta":0.0137,"implied_vol":0.5749,"iv_error":0.0132,"sequence":156249981,"condition":125,"size":1,"charm":-1.0514,"price":0.01,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":9,"vanna":0.0398,"vomma":2.5798,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:53:54","gamma":0.0006,"timestamp":"2024-11-04T09:53:54.069"} {"symbol":"AAPL","underlying_price":221.22,"strike":140.000,"right":"CALL","veta":0.0063,"implied_vol":1.5937,"iv_error":0.0000,"sequence":546105677,"condition":131,"size":2,"charm":0.8843,"price":81.32,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"vanna":-0.0121,"vomma":0.7986,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:47:14","gamma":0.0001,"timestamp":"2024-11-04T11:47:14.764"} {"symbol":"AAPL","underlying_price":221.18,"strike":140.000,"right":"CALL","veta":0.0000,"implied_vol":0.0000,"iv_error":0.0011,"sequence":548097371,"condition":130,"size":3,"charm":0.0000,"price":81.16,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":7,"vanna":0.0000,"vomma":0.0000,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:47:56","gamma":0.0000,"timestamp":"2024-11-04T11:47:56.669"} {"symbol":"AAPL","underlying_price":221.16,"strike":140.000,"right":"CALL","veta":0.0064,"implied_vol":1.5937,"iv_error":0.0000,"sequence":548397162,"condition":130,"size":3,"charm":0.8879,"price":81.26,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"vanna":-0.0122,"vomma":0.8011,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:48:03","gamma":0.0001,"timestamp":"2024-11-04T11:48:03.852"} {"symbol":"AAPL","underlying_price":221.19,"strike":140.000,"right":"CALL","veta":0.0025,"implied_vol":1.3968,"iv_error":0.0000,"sequence":550463381,"condition":131,"size":1,"charm":0.3271,"price":81.27,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"vanna":-0.0051,"vomma":0.3817,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:48:51","gamma":0.0000,"timestamp":"2024-11-04T11:48:51.11"}' python/pandas: schema: *id036 example: 'symbol expiration strike right timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price gamma vanna charm vomma veta implied_vol iv_error underlying_timestamp underlying_price 0 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:01.503000-05:00 58765096 255 255 255 255 18 1 6 0.04 0.0036 0.2434 -3.2295 15.8242 250.8588 0.3066 -0.0196 2025-11-10 09:30:01-05:00 269.02 1 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.123000-05:00 59131360 255 255 255 255 18 3 9 0.04 0.0038 0.2493 -3.3081 16.1180 256.0347 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 2 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.126000-05:00 59133877 255 255 255 255 18 1 9 0.04 0.0038 0.2493 -3.3081 16.1180 256.0347 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 3 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:03.929000-05:00 60102776 255 255 255 255 95 1 1 0.03 0.0033 0.2254 -2.8197 15.1647 224.4088 0.2890 -0.0023 2025-11-10 09:30:03-05:00 269.56 4 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:31.912000-05:00 66164357 255 255 255 255 18 1 69 0.04 0.0040 0.2676 -3.3727 17.2871 261.2468 0.2910 0.0025 2025-11-10 09:30:31-05:00 270.26 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 588 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:11.904000-05:00 62754770 255 255 255 255 130 1 42 6.22 0.0404 -0.6890 7.8150 12.3536 551.9376 0.2800 0.0000 2025-11-10 09:30:11-05:00 269.73 589 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:35.448000-05:00 66662366 255 255 255 255 18 3 7 6.35 0.0404 -0.7898 8.5013 16.0696 563.8117 0.2646 0.0000 2025-11-10 09:30:35-05:00 270.10 590 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:56.546000-05:00 69301579 255 255 255 255 130 2 6 6.45 0.0394 -0.7153 8.1488 13.6211 557.8317 0.2802 0.0000 2025-11-10 09:30:56-05:00 270.04 591 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:01.510000-05:00 58769718 255 255 255 255 18 1 6 0.02 0.0015 0.1151 -1.8034 8.4732 152.9860 0.3632 -0.0442 2025-11-10 09:30:01-05:00 269.02 592 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:03.095000-05:00 59706894 255 255 255 255 125 1 6 0.02 0.0016 0.1223 -1.8965 8.9394 160.0960 0.3593 0.0198 2025-11-10 09:30:03-05:00 269.56 [593 rows x 23 columns] ' python/polars: schema: *id036 example: 'shape: (593, 23) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬──────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬───────┬────────┬─────────┬─────────┬─────────┬──────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price ┆ gamma ┆ vanna ┆ charm ┆ vomma ┆ veta ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪══════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪═══════╪════════╪═════════╪═════════╪═════════╪══════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:01.503 EST ┆ 58765096 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.04 ┆ 0.0036 ┆ 0.2434 ┆ -3.2295 ┆ 15.8242 ┆ 250.8588 ┆ 0.3066 ┆ -0.0196 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.123 EST ┆ 59131360 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 9 ┆ 0.04 ┆ 0.0038 ┆ 0.2493 ┆ -3.3081 ┆ 16.118 ┆ 256.0347 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.126 EST ┆ 59133877 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 9 ┆ 0.04 ┆ 0.0038 ┆ 0.2493 ┆ -3.3081 ┆ 16.118 ┆ 256.0347 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:03.929 EST ┆ 60102776 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 95 ┆ 1 ┆ 1 ┆ 0.03 ┆ 0.0033 ┆ 0.2254 ┆ -2.8197 ┆ 15.1647 ┆ 224.4088 ┆ 0.289 ┆ -0.0023 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:31.912 EST ┆ 66164357 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 69 ┆ 0.04 ┆ 0.004 ┆ 0.2676 ┆ -3.3727 ┆ 17.2871 ┆ 261.2468 ┆ 0.291 ┆ 0.0025 ┆ 2025-11-10 09:30:31 EST ┆ 270.26 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:11.904 EST ┆ 62754770 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 1 ┆ 42 ┆ 6.22 ┆ 0.0404 ┆ -0.689 ┆ 7.815 ┆ 12.3536 ┆ 551.9376 ┆ 0.28 ┆ 0.0 ┆ 2025-11-10 09:30:11 EST ┆ 269.73 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:35.448 EST ┆ 66662366 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 7 ┆ 6.35 ┆ 0.0404 ┆ -0.7898 ┆ 8.5013 ┆ 16.0696 ┆ 563.8117 ┆ 0.2646 ┆ 0.0 ┆ 2025-11-10 09:30:35 EST ┆ 270.1 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:56.546 EST ┆ 69301579 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 2 ┆ 6 ┆ 6.45 ┆ 0.0394 ┆ -0.7153 ┆ 8.1488 ┆ 13.6211 ┆ 557.8317 ┆ 0.2802 ┆ 0.0 ┆ 2025-11-10 09:30:56 EST ┆ 270.04 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:01.510 EST ┆ 58769718 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0015 ┆ 0.1151 ┆ -1.8034 ┆ 8.4732 ┆ 152.986 ┆ 0.3632 ┆ -0.0442 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:03.095 EST ┆ 59706894 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 125 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0016 ┆ 0.1223 ┆ -1.8965 ┆ 8.9394 ┆ 160.096 ┆ 0.3593 ┆ 0.0198 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴──────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴───────┴────────┴─────────┴─────────┴─────────┴──────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/greeks/third_order: x-concurrent-limit-ttl-ms: '2572' x-min-subscription: professional x-history-access: true get: summary: Third Order Greeks operationId: option_history_greeks_third_order x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_greeks_third_order(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='1h',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_greeks_third_order(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='1h',\n)\n" tags: - History description: "- Returns the data for all contracts that share the same provided symbol and expiration. \n- Calculated using the option and underlying midpoint price. If an interval size is specified (*highly recommended*), the option quote used in the calculation follows the same rules as the [quote](/operations/option_history_quote.html) endpoint. \n- The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/greeks/third_order?symbol=AAPL&expiration=20241108&date=20241104&interval=1h description: Returns third order greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/greeks/third_order?symbol=AAPL&expiration=20241108&date=20241104&interval=1h&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/option/history/greeks/third_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241107&interval=1h description: Returns third order greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/greeks/third_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241107&interval=1h&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration_no_star' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns third order greeks for an option contract content: text/csv: schema: type: array items: &id037 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. bid: type: number description: The last NBBO bid price. ask: type: number description: The last NBBO ask price. speed: type: number description: The speed. zomma: type: number description: The zomma. color: type: number description: The color. ultima: type: number description: The ultima. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,bid,ask,speed,zomma,color,ultima,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:30:00,0.00,0.00,0.0000,0.0000,0.0000,0.0001,0.2500,100.0000,2024-11-04T09:30:00,221.00\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T10:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0002,0.2500,100.0000,2024-11-04T10:30:00,221.73\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T11:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0002,0.2500,100.0000,2024-11-04T11:30:00,221.49\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T12:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0001,0.2500,100.0000,2024-11-04T12:30:00,221.11\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T13:30:00,0.00,0.01,0.0000,0.0000,0.0000,0.0003,0.2500,100.0000,2024-11-04T13:30:00,222.03\r\n" application/json: schema: &id038 type: array items: *id037 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":262.500,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.00,\"color\":0.0000,\"zomma\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"speed\":0.0000,\"ultima\":0.0001,\"ask\":0.00,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:30:00\",\"timestamp\":\"2024-11-04T09:30:00\"},\n {\"underlying_price\":221.73,\"color\":0.0000,\"zomma\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"speed\":0.0000,\"ultima\":0.0002,\"ask\":0.01,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T10:30:00\",\"timestamp\":\"2024-11-04T10:30:00\"},\n {\"underlying_price\":221.49,\"color\":0.0000,\"zomma\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"speed\":0.0000,\"ultima\":0.0002,\"ask\":0.01,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T11:30:00\",\"timestamp\":\"2024-11-04T11:30:00\"},\n {\"underlying_price\":221.11,\"color\":0.0000,\"zomma\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"speed\":0.0000,\"ultima\":0.0001,\"ask\":0.01,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T12:30:00\",\"timestamp\":\"2024-11-04T12:30:00\"},\n {\"underlying_price\":222.03,\"color\":0.0000,\"zomma\":0.0000,\"implied_vol\":0.2500,\"iv_error\":100.0000,\"speed\":0.0000,\"ultima\":0.0003,\"ask\":0.01,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T13:30:00\",\"timestamp\":\"2024-11-04T13:30:00\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id038 example: '{"symbol":"AAPL","underlying_price":221.00,"color":0.0000,"strike":262.500,"zomma":0.0000,"right":"CALL","implied_vol":0.2500,"iv_error":100.0000,"speed":0.0000,"ultima":0.0001,"ask":0.00,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T09:30:00","timestamp":"2024-11-04T09:30:00"} {"symbol":"AAPL","underlying_price":221.73,"color":0.0000,"strike":262.500,"zomma":0.0000,"right":"CALL","implied_vol":0.2500,"iv_error":100.0000,"speed":0.0000,"ultima":0.0002,"ask":0.01,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T10:30:00","timestamp":"2024-11-04T10:30:00"} {"symbol":"AAPL","underlying_price":221.49,"color":0.0000,"strike":262.500,"zomma":0.0000,"right":"CALL","implied_vol":0.2500,"iv_error":100.0000,"speed":0.0000,"ultima":0.0002,"ask":0.01,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T11:30:00","timestamp":"2024-11-04T11:30:00"} {"symbol":"AAPL","underlying_price":221.11,"color":0.0000,"strike":262.500,"zomma":0.0000,"right":"CALL","implied_vol":0.2500,"iv_error":100.0000,"speed":0.0000,"ultima":0.0001,"ask":0.01,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T12:30:00","timestamp":"2024-11-04T12:30:00"} {"symbol":"AAPL","underlying_price":222.03,"color":0.0000,"strike":262.500,"zomma":0.0000,"right":"CALL","implied_vol":0.2500,"iv_error":100.0000,"speed":0.0000,"ultima":0.0003,"ask":0.01,"expiration":"2024-11-08","bid":0.00,"underlying_timestamp":"2024-11-04T13:30:00","timestamp":"2024-11-04T13:30:00"}' python/pandas: schema: *id038 example: 'symbol expiration strike right timestamp bid ask speed zomma color ultima implied_vol iv_error underlying_timestamp underlying_price 0 SPY 2025-10-17 420.0 CALL 2025-09-19 09:30:00-04:00 0.00 0.00 0.0 0.0000 0.0000 0.0000 0.0000 100.0 2025-09-19 09:30:00-04:00 662.31 1 SPY 2025-10-17 420.0 CALL 2025-09-19 09:31:00-04:00 241.85 245.21 0.0 0.0010 0.0045 98.1837 0.7126 0.0 2025-09-19 09:31:00-04:00 661.84 2 SPY 2025-10-17 420.0 CALL 2025-09-19 09:32:00-04:00 241.85 245.24 0.0 0.0009 0.0044 103.8173 0.6996 0.0 2025-09-19 09:32:00-04:00 661.90 3 SPY 2025-10-17 420.0 CALL 2025-09-19 09:33:00-04:00 241.85 245.05 0.0 0.0009 0.0043 106.1833 0.6937 0.0 2025-09-19 09:33:00-04:00 661.83 4 SPY 2025-10-17 420.0 CALL 2025-09-19 09:34:00-04:00 241.71 244.84 0.0 0.0010 0.0045 99.3614 0.7097 0.0 2025-09-19 09:34:00-04:00 661.59 5 SPY 2025-10-17 420.0 CALL 2025-09-19 09:35:00-04:00 241.71 244.85 0.0 0.0010 0.0048 87.4841 0.7355 0.0 2025-09-19 09:35:00-04:00 661.49 6 SPY 2025-10-17 420.0 CALL 2025-09-19 09:36:00-04:00 241.71 244.66 0.0 0.0010 0.0045 100.6047 0.7068 0.0 2025-09-19 09:36:00-04:00 661.51 7 SPY 2025-10-17 420.0 CALL 2025-09-19 09:37:00-04:00 241.71 244.71 0.0 0.0010 0.0048 89.6676 0.7308 0.0 2025-09-19 09:37:00-04:00 661.44 8 SPY 2025-10-17 420.0 CALL 2025-09-19 09:38:00-04:00 241.71 244.88 0.0 0.0010 0.0047 90.5455 0.7291 0.0 2025-09-19 09:38:00-04:00 661.53 9 SPY 2025-10-17 420.0 CALL 2025-09-19 09:39:00-04:00 241.71 244.67 0.0 0.0010 0.0049 83.4768 0.7437 0.0 2025-09-19 09:39:00-04:00 661.36 10 SPY 2025-10-17 420.0 CALL 2025-09-19 09:40:00-04:00 241.71 244.80 0.0 0.0009 0.0041 110.9452 0.6812 0.0 2025-09-19 09:40:00-04:00 661.67 11 SPY 2025-10-17 420.0 CALL 2025-09-19 09:41:00-04:00 241.71 244.94 0.0 0.0009 0.0038 118.0956 0.6593 0.0 2025-09-19 09:41:00-04:00 661.80 12 SPY 2025-10-17 420.0 CALL 2025-09-19 09:42:00-04:00 241.71 244.94 0.0 0.0009 0.0038 116.9578 0.6632 0.0 2025-09-19 09:42:00-04:00 661.79 13 SPY 2025-10-17 420.0 CALL 2025-09-19 09:43:00-04:00 241.93 244.94 0.0 0.0009 0.0040 114.5016 0.6710 0.0 2025-09-19 09:43:00-04:00 661.88 14 SPY 2025-10-17 420.0 CALL 2025-09-19 09:44:00-04:00 241.80 244.89 0.0 0.0010 0.0047 91.6728 0.7267 0.0 2025-09-19 09:44:00-04:00 661.59 15 SPY 2025-10-17 420.0 CALL 2025-09-19 09:45:00-04:00 241.71 244.94 0.0 0.0010 0.0045 98.0874 0.7126 0.0 2025-09-19 09:45:00-04:00 661.63 16 SPY 2025-10-17 420.0 CALL 2025-09-19 09:46:00-04:00 241.71 244.83 0.0 0.0010 0.0048 88.5935 0.7332 0.0 2025-09-19 09:46:00-04:00 661.49 17 SPY 2025-10-17 420.0 CALL 2025-09-19 09:47:00-04:00 241.80 244.60 0.0 0.0009 0.0042 109.7741 0.6843 0.0 2025-09-19 09:47:00-04:00 661.61 18 SPY 2025-10-17 420.0 CALL 2025-09-19 09:48:00-04:00 241.71 244.77 0.0 0.0006 0.0026 125.1561 0.5937 0.0 2025-09-19 09:48:00-04:00 661.84 19 SPY 2025-10-17 420.0 CALL 2025-09-19 09:49:00-04:00 241.74 244.94 0.0 0.0006 0.0025 125.0630 0.5937 0.0 2025-09-19 09:49:00-04:00 661.94 20 SPY 2025-10-17 420.0 CALL 2025-09-19 09:50:00-04:00 242.13 245.74 0.0 0.0008 0.0038 117.6049 0.6609 0.0 2025-09-19 09:50:00-04:00 662.41 21 SPY 2025-10-17 420.0 CALL 2025-09-19 09:51:00-04:00 242.13 245.37 0.0 0.0006 0.0023 123.3656 0.5843 0.0 2025-09-19 09:51:00-04:00 662.36 22 SPY 2025-10-17 420.0 CALL 2025-09-19 09:52:00-04:00 242.31 245.83 0.0 0.0009 0.0038 116.4647 0.6648 0.0 2025-09-19 09:52:00-04:00 662.54 23 SPY 2025-10-17 420.0 CALL 2025-09-19 09:53:00-04:00 242.75 245.56 0.0 0.0009 0.0038 116.4618 0.6648 0.0 2025-09-19 09:53:00-04:00 662.62 24 SPY 2025-10-17 420.0 CALL 2025-09-19 09:54:00-04:00 242.38 245.89 0.0 0.0009 0.0040 111.7739 0.6792 0.0 2025-09-19 09:54:00-04:00 662.56 25 SPY 2025-10-17 420.0 CALL 2025-09-19 09:55:00-04:00 242.26 245.77 0.0 0.0009 0.0038 116.4668 0.6648 0.0 2025-09-19 09:55:00-04:00 662.48 26 SPY 2025-10-17 420.0 CALL 2025-09-19 09:56:00-04:00 242.26 245.77 0.0 0.0009 0.0039 115.2726 0.6687 0.0 2025-09-19 09:56:00-04:00 662.47 27 SPY 2025-10-17 420.0 CALL 2025-09-19 09:57:00-04:00 242.44 245.60 0.0 0.0010 0.0046 93.4068 0.7238 0.0 2025-09-19 09:57:00-04:00 662.29 28 SPY 2025-10-17 420.0 CALL 2025-09-19 09:58:00-04:00 242.15 245.63 0.0 0.0009 0.0044 103.6132 0.7003 0.0 2025-09-19 09:58:00-04:00 662.25 29 SPY 2025-10-17 420.0 CALL 2025-09-19 09:59:00-04:00 242.15 245.37 0.0 0.0010 0.0045 98.0299 0.7132 0.0 2025-09-19 09:59:00-04:00 662.07 30 SPY 2025-10-17 420.0 CALL 2025-09-19 10:00:00-04:00 242.15 245.52 0.0 0.0010 0.0045 98.0618 0.7132 0.0 2025-09-19 10:00:00-04:00 662.14 ' python/polars: schema: *id038 example: 'shape: (31, 15) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────┬────────┬───────┬────────┬────────┬──────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ bid ┆ ask ┆ speed ┆ zomma ┆ color ┆ ultima ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════╪════════╪═══════╪════════╪════════╪══════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:30:00 EDT ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 100.0 ┆ 2025-09-19 09:30:00 EDT ┆ 662.31 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:31:00 EDT ┆ 241.85 ┆ 245.21 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 98.1837 ┆ 0.7126 ┆ 0.0 ┆ 2025-09-19 09:31:00 EDT ┆ 661.84 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:32:00 EDT ┆ 241.85 ┆ 245.24 ┆ 0.0 ┆ 0.0009 ┆ 0.0044 ┆ 103.8173 ┆ 0.6996 ┆ 0.0 ┆ 2025-09-19 09:32:00 EDT ┆ 661.9 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:33:00 EDT ┆ 241.85 ┆ 245.05 ┆ 0.0 ┆ 0.0009 ┆ 0.0043 ┆ 106.1833 ┆ 0.6937 ┆ 0.0 ┆ 2025-09-19 09:33:00 EDT ┆ 661.83 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:34:00 EDT ┆ 241.71 ┆ 244.84 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 99.3614 ┆ 0.7097 ┆ 0.0 ┆ 2025-09-19 09:34:00 EDT ┆ 661.59 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:56:00 EDT ┆ 242.26 ┆ 245.77 ┆ 0.0 ┆ 0.0009 ┆ 0.0039 ┆ 115.2726 ┆ 0.6687 ┆ 0.0 ┆ 2025-09-19 09:56:00 EDT ┆ 662.47 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:57:00 EDT ┆ 242.44 ┆ 245.6 ┆ 0.0 ┆ 0.001 ┆ 0.0046 ┆ 93.4068 ┆ 0.7238 ┆ 0.0 ┆ 2025-09-19 09:57:00 EDT ┆ 662.29 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:58:00 EDT ┆ 242.15 ┆ 245.63 ┆ 0.0 ┆ 0.0009 ┆ 0.0044 ┆ 103.6132 ┆ 0.7003 ┆ 0.0 ┆ 2025-09-19 09:58:00 EDT ┆ 662.25 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:59:00 EDT ┆ 242.15 ┆ 245.37 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 98.0299 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 09:59:00 EDT ┆ 662.07 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 10:00:00 EDT ┆ 242.15 ┆ 245.52 ┆ 0.0 ┆ 0.001 ┆ 0.0045 ┆ 98.0618 ┆ 0.7132 ┆ 0.0 ┆ 2025-09-19 10:00:00 EDT ┆ 662.14 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────┴────────┴───────┴────────┴────────┴──────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/trade_greeks/third_order: x-concurrent-limit-ttl-ms: '8166' x-min-subscription: professional x-history-access: true get: summary: Third Order Trade Greeks operationId: option_history_trade_greeks_third_order x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_trade_greeks_third_order(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_trade_greeks_third_order(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' tags: - History description: '- Returns the data for all contracts that share the same provided symbol and expiration. - Calculates greeks for every trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html). - The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html). - Multi-day requests are limited to 1 month of data, and must specify an expiration. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/third_order?symbol=AAPL&expiration=20241108&date=20241104 description: Returns third order trade greeks for an option contract - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/third_order?symbol=AAPL&expiration=20241108&start_date=20241104&end_date=20241110 description: Returns third order trade greeks for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/third_order?symbol=AAPL&expiration=*&date=20241104 description: Returns third order trade greeks for an full chain of option contracts - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/third_order?symbol=AAPL&expiration=*&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns third order trade greeks for an option contract content: text/csv: schema: type: array items: &id039 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. speed: type: number description: The speed. zomma: type: number description: The zomma. color: type: string description: The color. ultima: type: number description: The ultima. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price,speed,zomma,color,ultima,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,262.500,CALL,2024-11-04T09:53:54.069,156249981,255,255,255,255,125,1,9,0.01,0.0000,0.0000,-0.0005,22.3494,0.5749,0.0132,2024-11-04T09:53:54,221.33\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:47:14.764,546105677,255,255,255,255,131,2,5,81.32,0.0000,0.0000,-0.0013,2.2683,1.5937,0.0000,2024-11-04T11:47:14,221.22\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:47:56.669,548097371,255,255,255,255,130,3,7,81.16,0.0000,0.0000,0.0000,0.0000,0.0000,0.0011,2024-11-04T11:47:56,221.18\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:48:03.852,548397162,255,255,255,255,130,3,6,81.26,0.0000,0.0000,-0.0013,2.2709,1.5937,0.0000,2024-11-04T11:48:03,221.16\r\nAAPL,2024-11-08,140.000,CALL,2024-11-04T11:48:51.11,550463381,255,255,255,255,131,1,5,81.27,0.0000,0.0000,-0.0003,1.8578,1.3968,0.0000,2024-11-04T11:48:51,221.19\r\n" application/json: schema: &id040 type: array items: *id039 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":262.500,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.33,\"color\":-0.0005,\"zomma\":0.0000,\"implied_vol\":0.5749,\"iv_error\":0.0132,\"speed\":0.0000,\"ultima\":22.3494,\"sequence\":156249981,\"condition\":125,\"size\":1,\"price\":0.01,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":9,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:53:54\",\"timestamp\":\"2024-11-04T09:53:54.069\"}\n ]\n },\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":140.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.22,\"color\":-0.0013,\"zomma\":0.0000,\"implied_vol\":1.5937,\"iv_error\":0.0000,\"speed\":0.0000,\"ultima\":2.2683,\"sequence\":546105677,\"condition\":131,\"size\":2,\"price\":81.32,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:47:14\",\"timestamp\":\"2024-11-04T11:47:14.764\"},\n {\"underlying_price\":221.18,\"color\":0.0000,\"zomma\":0.0000,\"implied_vol\":0.0000,\"iv_error\":0.0011,\"speed\":0.0000,\"ultima\":0.0000,\"sequence\":548097371,\"condition\":130,\"size\":3,\"price\":81.16,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":7,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:47:56\",\"timestamp\":\"2024-11-04T11:47:56.669\"},\n {\"underlying_price\":221.16,\"color\":-0.0013,\"zomma\":0.0000,\"implied_vol\":1.5937,\"iv_error\":0.0000,\"speed\":0.0000,\"ultima\":2.2709,\"sequence\":548397162,\"condition\":130,\"size\":3,\"price\":81.26,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:48:03\",\"timestamp\":\"2024-11-04T11:48:03.852\"},\n {\"underlying_price\":221.19,\"color\":-0.0003,\"zomma\":0.0000,\"implied_vol\":1.3968,\"iv_error\":0.0000,\"speed\":0.0000,\"ultima\":1.8578,\"sequence\":550463381,\"condition\":131,\"size\":1,\"price\":81.27,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T11:48:51\",\"timestamp\":\"2024-11-04T11:48:51.11\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id040 example: '{"symbol":"AAPL","underlying_price":221.33,"color":-0.0005,"strike":262.500,"zomma":0.0000,"right":"CALL","implied_vol":0.5749,"iv_error":0.0132,"speed":0.0000,"ultima":22.3494,"sequence":156249981,"condition":125,"size":1,"price":0.01,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":9,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:53:54","timestamp":"2024-11-04T09:53:54.069"} {"symbol":"AAPL","underlying_price":221.22,"color":-0.0013,"strike":140.000,"zomma":0.0000,"right":"CALL","implied_vol":1.5937,"iv_error":0.0000,"speed":0.0000,"ultima":2.2683,"sequence":546105677,"condition":131,"size":2,"price":81.32,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:47:14","timestamp":"2024-11-04T11:47:14.764"} {"symbol":"AAPL","underlying_price":221.18,"color":0.0000,"strike":140.000,"zomma":0.0000,"right":"CALL","implied_vol":0.0000,"iv_error":0.0011,"speed":0.0000,"ultima":0.0000,"sequence":548097371,"condition":130,"size":3,"price":81.16,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":7,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:47:56","timestamp":"2024-11-04T11:47:56.669"} {"symbol":"AAPL","underlying_price":221.16,"color":-0.0013,"strike":140.000,"zomma":0.0000,"right":"CALL","implied_vol":1.5937,"iv_error":0.0000,"speed":0.0000,"ultima":2.2709,"sequence":548397162,"condition":130,"size":3,"price":81.26,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:48:03","timestamp":"2024-11-04T11:48:03.852"} {"symbol":"AAPL","underlying_price":221.19,"color":-0.0003,"strike":140.000,"zomma":0.0000,"right":"CALL","implied_vol":1.3968,"iv_error":0.0000,"speed":0.0000,"ultima":1.8578,"sequence":550463381,"condition":131,"size":1,"price":81.27,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"underlying_timestamp":"2024-11-04T11:48:51","timestamp":"2024-11-04T11:48:51.11"}' python/pandas: schema: *id040 example: 'symbol expiration strike right timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price speed zomma color ultima implied_vol iv_error underlying_timestamp underlying_price 0 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:01.503000-05:00 58765096 255 255 255 255 18 1 6 0.04 0.0009 0.0489 0.6506 106.4223 0.3066 -0.0196 2025-11-10 09:30:01-05:00 269.02 1 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.123000-05:00 59131360 255 255 255 255 18 3 9 0.04 0.0009 0.0496 0.6602 105.2274 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 2 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:02.126000-05:00 59133877 255 255 255 255 18 1 9 0.04 0.0009 0.0496 0.6602 105.2274 0.3066 0.0192 2025-11-10 09:30:02-05:00 269.14 3 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:03.929000-05:00 60102776 255 255 255 255 95 1 1 0.03 0.0008 0.0502 0.6305 125.6337 0.2890 -0.0023 2025-11-10 09:30:03-05:00 269.56 4 AAPL 2025-11-14 290.0 CALL 2025-11-10 09:30:31.912000-05:00 66164357 255 255 255 255 18 1 69 0.04 0.0010 0.0554 0.7011 115.8098 0.2910 0.0025 2025-11-10 09:30:31-05:00 270.26 .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... 588 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:11.904000-05:00 62754770 255 255 255 255 130 1 42 6.22 -0.0031 -0.0925 -1.1398 -116.6237 0.2800 0.0000 2025-11-10 09:30:11-05:00 269.73 589 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:35.448000-05:00 66662366 255 255 255 255 18 3 7 6.35 -0.0037 -0.0818 -0.9646 -154.0341 0.2646 0.0000 2025-11-10 09:30:35-05:00 270.10 590 AAPL 2025-11-14 265.0 CALL 2025-11-10 09:30:56.546000-05:00 69301579 255 255 255 255 130 2 6 6.45 -0.0032 -0.0836 -1.0351 -126.2168 0.2802 0.0000 2025-11-10 09:30:56-05:00 270.04 591 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:01.510000-05:00 58769718 255 255 255 255 18 1 6 0.02 0.0003 0.0233 0.3656 81.5593 0.3632 -0.0442 2025-11-10 09:30:01-05:00 269.02 592 AAPL 2025-11-14 297.5 CALL 2025-11-10 09:30:03.095000-05:00 59706894 255 255 255 255 125 1 6 0.02 0.0003 0.0246 0.3830 83.9693 0.3593 0.0198 2025-11-10 09:30:03-05:00 269.56 [593 rows x 22 columns] ' python/polars: schema: *id040 example: 'shape: (593, 22) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬──────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬───────┬─────────┬─────────┬─────────┬───────────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price ┆ speed ┆ zomma ┆ color ┆ ultima ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪══════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪═══════╪═════════╪═════════╪═════════╪═══════════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:01.503 EST ┆ 58765096 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.04 ┆ 0.0009 ┆ 0.0489 ┆ 0.6506 ┆ 106.4223 ┆ 0.3066 ┆ -0.0196 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.123 EST ┆ 59131360 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 9 ┆ 0.04 ┆ 0.0009 ┆ 0.0496 ┆ 0.6602 ┆ 105.2274 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:02.126 EST ┆ 59133877 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 9 ┆ 0.04 ┆ 0.0009 ┆ 0.0496 ┆ 0.6602 ┆ 105.2274 ┆ 0.3066 ┆ 0.0192 ┆ 2025-11-10 09:30:02 EST ┆ 269.14 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:03.929 EST ┆ 60102776 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 95 ┆ 1 ┆ 1 ┆ 0.03 ┆ 0.0008 ┆ 0.0502 ┆ 0.6305 ┆ 125.6337 ┆ 0.289 ┆ -0.0023 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ │ AAPL ┆ 2025-11-14 ┆ 290.0 ┆ CALL ┆ 2025-11-10 09:30:31.912 EST ┆ 66164357 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 69 ┆ 0.04 ┆ 0.001 ┆ 0.0554 ┆ 0.7011 ┆ 115.8098 ┆ 0.291 ┆ 0.0025 ┆ 2025-11-10 09:30:31 EST ┆ 270.26 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:11.904 EST ┆ 62754770 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 1 ┆ 42 ┆ 6.22 ┆ -0.0031 ┆ -0.0925 ┆ -1.1398 ┆ -116.6237 ┆ 0.28 ┆ 0.0 ┆ 2025-11-10 09:30:11 EST ┆ 269.73 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:35.448 EST ┆ 66662366 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 3 ┆ 7 ┆ 6.35 ┆ -0.0037 ┆ -0.0818 ┆ -0.9646 ┆ -154.0341 ┆ 0.2646 ┆ 0.0 ┆ 2025-11-10 09:30:35 EST ┆ 270.1 │ │ AAPL ┆ 2025-11-14 ┆ 265.0 ┆ CALL ┆ 2025-11-10 09:30:56.546 EST ┆ 69301579 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 130 ┆ 2 ┆ 6 ┆ 6.45 ┆ -0.0032 ┆ -0.0836 ┆ -1.0351 ┆ -126.2168 ┆ 0.2802 ┆ 0.0 ┆ 2025-11-10 09:30:56 EST ┆ 270.04 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:01.510 EST ┆ 58769718 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0003 ┆ 0.0233 ┆ 0.3656 ┆ 81.5593 ┆ 0.3632 ┆ -0.0442 ┆ 2025-11-10 09:30:01 EST ┆ 269.02 │ │ AAPL ┆ 2025-11-14 ┆ 297.5 ┆ CALL ┆ 2025-11-10 09:30:03.095 EST ┆ 59706894 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 125 ┆ 1 ┆ 6 ┆ 0.02 ┆ 0.0003 ┆ 0.0246 ┆ 0.383 ┆ 83.9693 ┆ 0.3593 ┆ 0.0198 ┆ 2025-11-10 09:30:03 EST ┆ 269.56 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴──────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴───────┴─────────┴─────────┴─────────┴───────────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/greeks/implied_volatility: x-concurrent-limit-ttl-ms: '3834' x-min-subscription: standard x-history-access: true get: summary: Implied Volatility operationId: option_history_greeks_implied_volatility x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.option_history_greeks_implied_volatility(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='5m',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.option_history_greeks_implied_volatility(\n symbol='AAPL',\n expiration=date(2024, 11, 8),\n interval='5m',\n)\n" tags: - History description: "- Returns implied volatilies calculated using the national best bid, mid, and ask price of the option respectively. \n- The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).\n- Multi-day requests are limited to 1 month of data.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/greeks/implied_volatility?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104&interval=5m description: Returns 5m interval implied volatility for an option contract - url: http://127.0.0.1:25503/v3/option/history/greeks/implied_volatility?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104&interval=5m&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/option/history/greeks/implied_volatility?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241107&interval=5m description: Returns 5m interval implied volatility for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/greeks/implied_volatility?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241107&interval=5m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration_no_star' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns 5m interval implied volatility for an option contract content: text/csv: schema: type: array items: &id041 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. bid: type: number description: The last NBBO bid price. bid_implied_vol: type: number description: The implied volatiltiy calculated using the bid price. midpoint: type: number description: The midpoint calculated by averaging the bid & ask prices. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. ask: type: number description: The last NBBO ask price. ask_implied_vol: type: number description: The implied volatiltiy calculated using the ask price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,bid,bid_implied_vol,midpoint,implied_vol,ask,ask_implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:00,0.00,0.0000,0.00,0.0000,0.00,0.0000,100.0000,2024-11-04T09:30:00,221.00\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:35:00,3.75,0.3640,3.80,0.3693,3.85,0.3747,0.0000,2024-11-04T09:35:00,220.66\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:40:00,3.70,0.3643,3.75,0.3698,3.80,0.3752,0.0000,2024-11-04T09:40:00,220.56\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:45:00,3.75,0.3518,3.80,0.3574,3.85,0.3627,0.0000,2024-11-04T09:45:00,220.86\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:50:00,3.85,0.3417,3.90,0.3474,3.95,0.3527,0.0000,2024-11-04T09:50:00,221.20\r\n" application/json: schema: &id042 type: array items: *id041 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":220.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.00,\"implied_vol\":0.0000,\"iv_error\":100.0000,\"bid_implied_vol\":0.0000,\"ask\":0.00,\"midpoint\":0.00,\"ask_implied_vol\":0.0000,\"bid\":0.00,\"underlying_timestamp\":\"2024-11-04T09:30:00\",\"timestamp\":\"2024-11-04T09:30:00\"},\n {\"underlying_price\":220.66,\"implied_vol\":0.3693,\"iv_error\":0.0000,\"bid_implied_vol\":0.3640,\"ask\":3.85,\"midpoint\":3.80,\"ask_implied_vol\":0.3747,\"bid\":3.75,\"underlying_timestamp\":\"2024-11-04T09:35:00\",\"timestamp\":\"2024-11-04T09:35:00\"},\n {\"underlying_price\":220.56,\"implied_vol\":0.3698,\"iv_error\":0.0000,\"bid_implied_vol\":0.3643,\"ask\":3.80,\"midpoint\":3.75,\"ask_implied_vol\":0.3752,\"bid\":3.70,\"underlying_timestamp\":\"2024-11-04T09:40:00\",\"timestamp\":\"2024-11-04T09:40:00\"},\n {\"underlying_price\":220.86,\"implied_vol\":0.3574,\"iv_error\":0.0000,\"bid_implied_vol\":0.3518,\"ask\":3.85,\"midpoint\":3.80,\"ask_implied_vol\":0.3627,\"bid\":3.75,\"underlying_timestamp\":\"2024-11-04T09:45:00\",\"timestamp\":\"2024-11-04T09:45:00\"},\n {\"underlying_price\":221.20,\"implied_vol\":0.3474,\"iv_error\":0.0000,\"bid_implied_vol\":0.3417,\"ask\":3.95,\"midpoint\":3.90,\"ask_implied_vol\":0.3527,\"bid\":3.85,\"underlying_timestamp\":\"2024-11-04T09:50:00\",\"timestamp\":\"2024-11-04T09:50:00\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id042 example: '{"symbol":"AAPL","underlying_price":221.00,"strike":220.000,"right":"CALL","implied_vol":0.0000,"iv_error":100.0000,"bid_implied_vol":0.0000,"ask":0.00,"midpoint":0.00,"expiration":"2024-11-08","ask_implied_vol":0.0000,"bid":0.00,"underlying_timestamp":"2024-11-04T09:30:00","timestamp":"2024-11-04T09:30:00"} {"symbol":"AAPL","underlying_price":220.66,"strike":220.000,"right":"CALL","implied_vol":0.3693,"iv_error":0.0000,"bid_implied_vol":0.3640,"ask":3.85,"midpoint":3.80,"expiration":"2024-11-08","ask_implied_vol":0.3747,"bid":3.75,"underlying_timestamp":"2024-11-04T09:35:00","timestamp":"2024-11-04T09:35:00"} {"symbol":"AAPL","underlying_price":220.56,"strike":220.000,"right":"CALL","implied_vol":0.3698,"iv_error":0.0000,"bid_implied_vol":0.3643,"ask":3.80,"midpoint":3.75,"expiration":"2024-11-08","ask_implied_vol":0.3752,"bid":3.70,"underlying_timestamp":"2024-11-04T09:40:00","timestamp":"2024-11-04T09:40:00"} {"symbol":"AAPL","underlying_price":220.86,"strike":220.000,"right":"CALL","implied_vol":0.3574,"iv_error":0.0000,"bid_implied_vol":0.3518,"ask":3.85,"midpoint":3.80,"expiration":"2024-11-08","ask_implied_vol":0.3627,"bid":3.75,"underlying_timestamp":"2024-11-04T09:45:00","timestamp":"2024-11-04T09:45:00"} {"symbol":"AAPL","underlying_price":221.20,"strike":220.000,"right":"CALL","implied_vol":0.3474,"iv_error":0.0000,"bid_implied_vol":0.3417,"ask":3.95,"midpoint":3.90,"expiration":"2024-11-08","ask_implied_vol":0.3527,"bid":3.85,"underlying_timestamp":"2024-11-04T09:50:00","timestamp":"2024-11-04T09:50:00"}' python/pandas: schema: *id042 example: 'symbol expiration strike right timestamp bid bid_implied_vol midpoint implied_vol ask ask_implied_vol iv_error underlying_timestamp underlying_price 0 SPY 2025-10-17 420.0 CALL 2025-09-19 09:30:00-04:00 0.00 0.0 0.00 0.0000 0.00 0.0000 100.0000 2025-09-19 09:30:00-04:00 662.31 1 SPY 2025-10-17 420.0 CALL 2025-09-19 09:35:00-04:00 241.71 0.0 243.28 0.7355 244.85 0.9287 0.0015 2025-09-19 09:35:00-04:00 661.49 2 SPY 2025-10-17 420.0 CALL 2025-09-19 09:40:00-04:00 241.71 0.0 243.25 0.6812 244.80 0.9091 0.0017 2025-09-19 09:40:00-04:00 661.67 3 SPY 2025-10-17 420.0 CALL 2025-09-19 09:45:00-04:00 241.71 0.0 243.32 0.7126 244.94 0.9248 0.0017 2025-09-19 09:45:00-04:00 661.63 4 SPY 2025-10-17 420.0 CALL 2025-09-19 09:50:00-04:00 242.13 0.0 243.93 0.6609 245.74 0.9283 0.0022 2025-09-19 09:50:00-04:00 662.41 5 SPY 2025-10-17 420.0 CALL 2025-09-19 09:55:00-04:00 242.26 0.0 244.01 0.6648 245.77 0.9250 0.0021 2025-09-19 09:55:00-04:00 662.48 6 SPY 2025-10-17 420.0 CALL 2025-09-19 10:00:00-04:00 242.15 0.0 243.83 0.7132 245.52 0.9319 0.0018 2025-09-19 10:00:00-04:00 662.14 ' python/polars: schema: *id042 example: 'shape: (7, 14) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬────────┬─────────────────┬──────────┬─────────────┬────────┬─────────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ bid ┆ bid_implied_vol ┆ midpoint ┆ implied_vol ┆ ask ┆ ask_implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪════════╪═════════════════╪══════════╪═════════════╪════════╪═════════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:30:00 EDT ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 0.0 ┆ 100.0 ┆ 2025-09-19 09:30:00 EDT ┆ 662.31 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:35:00 EDT ┆ 241.71 ┆ 0.0 ┆ 243.28 ┆ 0.7355 ┆ 244.85 ┆ 0.9287 ┆ 0.0015 ┆ 2025-09-19 09:35:00 EDT ┆ 661.49 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:40:00 EDT ┆ 241.71 ┆ 0.0 ┆ 243.25 ┆ 0.6812 ┆ 244.8 ┆ 0.9091 ┆ 0.0017 ┆ 2025-09-19 09:40:00 EDT ┆ 661.67 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:45:00 EDT ┆ 241.71 ┆ 0.0 ┆ 243.32 ┆ 0.7126 ┆ 244.94 ┆ 0.9248 ┆ 0.0017 ┆ 2025-09-19 09:45:00 EDT ┆ 661.63 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:50:00 EDT ┆ 242.13 ┆ 0.0 ┆ 243.93 ┆ 0.6609 ┆ 245.74 ┆ 0.9283 ┆ 0.0022 ┆ 2025-09-19 09:50:00 EDT ┆ 662.41 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 09:55:00 EDT ┆ 242.26 ┆ 0.0 ┆ 244.01 ┆ 0.6648 ┆ 245.77 ┆ 0.925 ┆ 0.0021 ┆ 2025-09-19 09:55:00 EDT ┆ 662.48 │ │ SPY ┆ 2025-10-17 ┆ 420.0 ┆ CALL ┆ 2025-09-19 10:00:00 EDT ┆ 242.15 ┆ 0.0 ┆ 243.83 ┆ 0.7132 ┆ 245.52 ┆ 0.9319 ┆ 0.0018 ┆ 2025-09-19 10:00:00 EDT ┆ 662.14 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴────────┴─────────────────┴──────────┴─────────────┴────────┴─────────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /option/history/trade_greeks/implied_volatility: x-concurrent-limit-ttl-ms: '13800' x-min-subscription: professional x-history-access: true get: summary: Trade Implied Volatility operationId: option_history_trade_greeks_implied_volatility x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''pandas'') df = client.option_history_trade_greeks_implied_volatility(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' - lang: Python label: polars source: 'from thetadata import ThetaClient from datetime import date client = ThetaClient(dataframe_type=''polars'') df = client.option_history_trade_greeks_implied_volatility(symbol=''AAPL'', expiration=date(2024, 11, 8)) ' tags: - History description: "- Returns implied volatilies calculated using the trade reported by [OPRA](/Articles/Data-And-Requests/The-SIPs.html). \n- The underlying price represents whatever the last underlying price was at the ``timestamp`` field. You can read more about how Theta Data calculates greeks [here](/Articles/Data-And-Requests/Option-Greeks.html).\n- Multi-day requests are limited to 1 month of data, and must specify an expiration.\n" x-sample-urls: - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/implied_volatility?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104 description: Returns implied volatility for an option contract - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/implied_volatility?symbol=AAPL&expiration=20241108&strike=220.000&right=call&start_date=20241104&end_date=20241108 description: Returns implied volatility for an option contract between the specified dates (inclusive) - url: http://127.0.0.1:25503/v3/option/history/trade_greeks/implied_volatility?symbol=AAPL&expiration=20241108&strike=220.000&right=call&date=20241104&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/expiration' - $ref: '#/components/parameters/strike' - $ref: '#/components/parameters/right' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/annual_dividend' - $ref: '#/components/parameters/rate_type' - $ref: '#/components/parameters/rate_value' - $ref: '#/components/parameters/greeks_version' - $ref: '#/components/parameters/max_dte' - $ref: '#/components/parameters/strike_range' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns implied volatility for an option contract content: text/csv: schema: type: array items: &id043 type: object properties: 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. timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. sequence: type: integer description: The exchange [sequence](/Articles/Data-And-Requests/Making-Requests.html#trade-sequences). ext_condition1: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition2: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition3: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. ext_condition4: type: integer description: Additional trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html)(s). These can be ignored for options. condition: type: integer description: The trade [condition](/Articles/Errors-Exchanges-Conditions/Trade-Conditions.html). size: type: integer description: The amount of contracts / shares traded. exchange: type: integer description: The [exchange](/Articles/Errors-Exchanges-Conditions/Exchanges.html) the trade was executed. price: type: number description: The trade price. implied_vol: type: number description: The implied volatiltiy calculated using the trade price. iv_error: type: number description: 'IV Error: the value of the option calculated using the implied volatiltiy divided by the actual value reported in the quote. This value will increase as the strike price recedes from the underlying price.' underlying_timestamp: type: string format: date-time description: The underlying date formated as YYYY-MM-DDTHH:mm:ss.SSS format. underlying_price: type: number description: The midpoint of the underlying at the time of the option trade. example: "symbol,expiration,strike,right,timestamp,sequence,ext_condition1,ext_condition2,ext_condition3,ext_condition4,condition,size,exchange,price,implied_vol,iv_error,underlying_timestamp,underlying_price\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:00.471,18902138,255,255,255,255,130,2,22,3.90,0.3598,0.0002,2024-11-04T09:30:00,221.00\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:01.626,19368856,255,255,255,255,130,1,6,4.25,0.3876,0.0000,2024-11-04T09:30:01,221.17\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:01.698,19403970,255,255,255,255,130,1,6,4.22,0.3842,-0.0002,2024-11-04T09:30:01,221.17\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:02.064,19598457,255,255,255,255,18,1,5,4.15,0.3640,-0.0001,2024-11-04T09:30:02,221.37\r\nAAPL,2024-11-08,220.000,CALL,2024-11-04T09:30:02.064,19598464,255,255,255,255,18,1,5,4.15,0.3640,-0.0001,2024-11-04T09:30:02,221.37\r\n" application/json: schema: &id044 type: array items: *id043 example: "{\n \"response\": [\n {\n \"contract\": {\"symbol\":\"AAPL\",\"strike\":220.000,\"right\":\"CALL\",\"expiration\":\"2024-11-08\"},\n \"data\": [\n {\"underlying_price\":221.00,\"implied_vol\":0.3598,\"iv_error\":0.0002,\"sequence\":18902138,\"condition\":130,\"size\":2,\"price\":3.90,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":22,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:30:00\",\"timestamp\":\"2024-11-04T09:30:00.471\"},\n {\"underlying_price\":221.17,\"implied_vol\":0.3876,\"iv_error\":0.0000,\"sequence\":19368856,\"condition\":130,\"size\":1,\"price\":4.25,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:30:01\",\"timestamp\":\"2024-11-04T09:30:01.626\"},\n {\"underlying_price\":221.17,\"implied_vol\":0.3842,\"iv_error\":-0.0002,\"sequence\":19403970,\"condition\":130,\"size\":1,\"price\":4.22,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":6,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:30:01\",\"timestamp\":\"2024-11-04T09:30:01.698\"},\n {\"underlying_price\":221.37,\"implied_vol\":0.3640,\"iv_error\":-0.0001,\"sequence\":19598457,\"condition\":18,\"size\":1,\"price\":4.15,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:30:02\",\"timestamp\":\"2024-11-04T09:30:02.064\"},\n {\"underlying_price\":221.37,\"implied_vol\":0.3640,\"iv_error\":-0.0001,\"sequence\":19598464,\"condition\":18,\"size\":1,\"price\":4.15,\"ext_condition2\":255,\"ext_condition1\":255,\"ext_condition4\":255,\"exchange\":5,\"ext_condition3\":255,\"underlying_timestamp\":\"2024-11-04T09:30:02\",\"timestamp\":\"2024-11-04T09:30:02.064\"}\n ]\n }\n ]\n}\n" application/x-ndjson: schema: *id044 example: '{"symbol":"AAPL","underlying_price":221.00,"strike":220.000,"right":"CALL","implied_vol":0.3598,"iv_error":0.0002,"sequence":18902138,"condition":130,"size":2,"price":3.90,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":22,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:30:00","timestamp":"2024-11-04T09:30:00.471"} {"symbol":"AAPL","underlying_price":221.17,"strike":220.000,"right":"CALL","implied_vol":0.3876,"iv_error":0.0000,"sequence":19368856,"condition":130,"size":1,"price":4.25,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:30:01","timestamp":"2024-11-04T09:30:01.626"} {"symbol":"AAPL","underlying_price":221.17,"strike":220.000,"right":"CALL","implied_vol":0.3842,"iv_error":-0.0002,"sequence":19403970,"condition":130,"size":1,"price":4.22,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":6,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:30:01","timestamp":"2024-11-04T09:30:01.698"} {"symbol":"AAPL","underlying_price":221.37,"strike":220.000,"right":"CALL","implied_vol":0.3640,"iv_error":-0.0001,"sequence":19598457,"condition":18,"size":1,"price":4.15,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:30:02","timestamp":"2024-11-04T09:30:02.064"} {"symbol":"AAPL","underlying_price":221.37,"strike":220.000,"right":"CALL","implied_vol":0.3640,"iv_error":-0.0001,"sequence":19598464,"condition":18,"size":1,"price":4.15,"ext_condition2":255,"ext_condition1":255,"expiration":"2024-11-08","ext_condition4":255,"exchange":5,"ext_condition3":255,"underlying_timestamp":"2024-11-04T09:30:02","timestamp":"2024-11-04T09:30:02.064"}' python/pandas: schema: *id044 example: 'symbol expiration strike right timestamp sequence ext_condition1 ext_condition2 ext_condition3 ext_condition4 condition size exchange price implied_vol iv_error underlying_timestamp underlying_price 0 AAPL 2025-11-07 220.0 CALL 2025-11-04 10:15:30.932000-05:00 2007064912 255 255 255 255 18 11 7 48.30 0.0 0.0001 2025-11-04 10:15:30-05:00 268.23 1 AAPL 2025-11-07 220.0 CALL 2025-11-04 10:50:31.982000-05:00 -2145289500 255 255 255 255 18 7 7 48.30 0.8 0.0000 2025-11-04 10:50:31-05:00 268.20 2 AAPL 2025-11-07 220.0 CALL 2025-11-04 15:45:43.083000-05:00 -1190941781 255 255 255 255 131 2 65 50.31 0.0 0.0006 2025-11-04 15:45:43-05:00 270.27 ' python/polars: schema: *id044 example: 'shape: (3, 18) ┌────────┬────────────┬────────┬───────┬────────────────────────────────┬─────────────┬────────────────┬────────────────┬────────────────┬────────────────┬───────────┬──────┬──────────┬───────┬─────────────┬──────────┬────────────────────────────────┬──────────────────┐ │ symbol ┆ expiration ┆ strike ┆ right ┆ timestamp ┆ sequence ┆ ext_condition1 ┆ ext_condition2 ┆ ext_condition3 ┆ ext_condition4 ┆ condition ┆ size ┆ exchange ┆ price ┆ implied_vol ┆ iv_error ┆ underlying_timestamp ┆ underlying_price │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ str ┆ str ┆ f64 ┆ str ┆ datetime[ms, America/New_York] ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ f64 ┆ f64 ┆ datetime[ms, America/New_York] ┆ f64 │ ╞════════╪════════════╪════════╪═══════╪════════════════════════════════╪═════════════╪════════════════╪════════════════╪════════════════╪════════════════╪═══════════╪══════╪══════════╪═══════╪═════════════╪══════════╪════════════════════════════════╪══════════════════╡ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 10:15:30.932 EST ┆ 2007064912 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 11 ┆ 7 ┆ 48.3 ┆ 0.0 ┆ 0.0001 ┆ 2025-11-04 10:15:30 EST ┆ 268.23 │ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 10:50:31.982 EST ┆ -2145289500 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 18 ┆ 7 ┆ 7 ┆ 48.3 ┆ 0.8 ┆ 0.0 ┆ 2025-11-04 10:50:31 EST ┆ 268.2 │ │ AAPL ┆ 2025-11-07 ┆ 220.0 ┆ CALL ┆ 2025-11-04 15:45:43.083 EST ┆ -1190941781 ┆ 255 ┆ 255 ┆ 255 ┆ 255 ┆ 131 ┆ 2 ┆ 65 ┆ 50.31 ┆ 0.0 ┆ 0.0006 ┆ 2025-11-04 15:45:43 EST ┆ 270.27 │ └────────┴────────────┴────────┴───────┴────────────────────────────────┴─────────────┴────────────────┴────────────────┴────────────────┴────────────────┴───────────┴──────┴──────────┴───────┴─────────────┴──────────┴────────────────────────────────┴──────────────────┘ ' /index/history/eod: x-concurrent-limit-ttl-ms: '164' x-min-subscription: free x-history-access: true get: summary: End of Day operationId: index_history_eod x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.index_history_eod(\n symbol='SPX',\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 8),\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.index_history_eod(\n symbol='SPX',\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 8),\n)\n" tags: - History description: '- Since [the indices feeds](/Articles/Data-And-Requests/The-SIPs.html) do not provide a national EOD report, Theta Data generates a national EOD report at 17:15 each day. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/index/history/eod?symbol=SPX&start_date=20241104&end_date=20241108 description: Returns EOD report for a given symbol between specified dates (inclusive) - url: http://127.0.0.1:25503/v3/index/history/eod?symbol=SPX&start_date=20241104&end_date=20241108&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/start_date' - $ref: '#/components/parameters/end_date' - $ref: '#/components/parameters/format' responses: '200': description: Returns EOD report for a given symbol between specified dates (inclusive) content: text/csv: schema: type: array items: &id045 type: object properties: created: type: string format: date-time description: The date formated as YYYY-MM-DDTHH:mm:ss.SSS format. last_trade: type: string format: date-time description: The last trade date formated as YYYY-MM-DDTHH:mm:ss.SSS format. 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. 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: "created,last_trade,open,high,low,close,volume,count,bid_size,bid_exchange,bid,bid_condition,ask_size,ask_exchange,ask,ask_condition\r\n2024-11-04T17:19:50.198,2024-11-04T16:03:03,5725.15,5741.43,5696.51,5712.69,0,0,0,0,0.00,0,0,0,0.00,0\r\n2024-11-05T17:15:03.061,2024-11-05T16:02:30,5722.43,5783.44,5722.10,5782.76,0,0,0,0,0.00,0,0,0,0.00,0\r\n2024-11-06T17:16:28.297,2024-11-06T16:01:37,5864.89,5936.14,5864.89,5929.04,0,0,0,0,0.00,0,0,0,0.00,0\r\n2024-11-07T17:17:17.218,2024-11-07T16:02:49,5947.21,5983.84,5947.21,5973.10,0,0,0,0,0.00,0,0,0,0.00,0\r\n2024-11-08T17:21:08.187,2024-11-08T16:01:15,5976.76,6012.45,5976.76,5995.54,0,0,0,0,0.00,0,0,0,0.00,0\r\n" application/json: schema: &id046 type: array items: *id045 example: "{\n \"response\": [\n {\"ask_size\":0,\"last_trade\":\"2024-11-04T16:03:03\",\"created\":\"2024-11-04T17:19:50.198\",\"ask_condition\":0,\"count\":0,\"volume\":0,\"high\":5741.43,\"low\":5696.51,\"bid_size\":0,\"ask_exchange\":0,\"bid_exchange\":0,\"ask\":0.00,\"bid\":0.00,\"bid_condition\":0,\"close\":5712.69,\"open\":5725.15},\n {\"ask_size\":0,\"last_trade\":\"2024-11-05T16:02:30\",\"created\":\"2024-11-05T17:15:03.061\",\"ask_condition\":0,\"count\":0,\"volume\":0,\"high\":5783.44,\"low\":5722.10,\"bid_size\":0,\"ask_exchange\":0,\"bid_exchange\":0,\"ask\":0.00,\"bid\":0.00,\"bid_condition\":0,\"close\":5782.76,\"open\":5722.43},\n {\"ask_size\":0,\"last_trade\":\"2024-11-06T16:01:37\",\"created\":\"2024-11-06T17:16:28.297\",\"ask_condition\":0,\"count\":0,\"volume\":0,\"high\":5936.14,\"low\":5864.89,\"bid_size\":0,\"ask_exchange\":0,\"bid_exchange\":0,\"ask\":0.00,\"bid\":0.00,\"bid_condition\":0,\"close\":5929.04,\"open\":5864.89},\n {\"ask_size\":0,\"last_trade\":\"2024-11-07T16:02:49\",\"created\":\"2024-11-07T17:17:17.218\",\"ask_condition\":0,\"count\":0,\"volume\":0,\"high\":5983.84,\"low\":5947.21,\"bid_size\":0,\"ask_exchange\":0,\"bid_exchange\":0,\"ask\":0.00,\"bid\":0.00,\"bid_condition\":0,\"close\":5973.10,\"open\":5947.21},\n {\"ask_size\":0,\"last_trade\":\"2024-11-08T16:01:15\",\"created\":\"2024-11-08T17:21:08.187\",\"ask_condition\":0,\"count\":0,\"volume\":0,\"high\":6012.45,\"low\":5976.76,\"bid_size\":0,\"ask_exchange\":0,\"bid_exchange\":0,\"ask\":0.00,\"bid\":0.00,\"bid_condition\":0,\"close\":5995.54,\"open\":5976.76}\n ]\n}\n" application/x-ndjson: schema: *id046 example: '{"ask_size":0,"last_trade":"2024-11-04T16:03:03","created":"2024-11-04T17:19:50.198","ask_condition":0,"count":0,"volume":0,"high":5741.43,"low":5696.51,"bid_size":0,"ask_exchange":0,"bid_exchange":0,"ask":0.00,"bid":0.00,"bid_condition":0,"close":5712.69,"open":5725.15} {"ask_size":0,"last_trade":"2024-11-05T16:02:30","created":"2024-11-05T17:15:03.061","ask_condition":0,"count":0,"volume":0,"high":5783.44,"low":5722.10,"bid_size":0,"ask_exchange":0,"bid_exchange":0,"ask":0.00,"bid":0.00,"bid_condition":0,"close":5782.76,"open":5722.43} {"ask_size":0,"last_trade":"2024-11-06T16:01:37","created":"2024-11-06T17:16:28.297","ask_condition":0,"count":0,"volume":0,"high":5936.14,"low":5864.89,"bid_size":0,"ask_exchange":0,"bid_exchange":0,"ask":0.00,"bid":0.00,"bid_condition":0,"close":5929.04,"open":5864.89} {"ask_size":0,"last_trade":"2024-11-07T16:02:49","created":"2024-11-07T17:17:17.218","ask_condition":0,"count":0,"volume":0,"high":5983.84,"low":5947.21,"bid_size":0,"ask_exchange":0,"bid_exchange":0,"ask":0.00,"bid":0.00,"bid_condition":0,"close":5973.10,"open":5947.21} {"ask_size":0,"last_trade":"2024-11-08T16:01:15","created":"2024-11-08T17:21:08.187","ask_condition":0,"count":0,"volume":0,"high":6012.45,"low":5976.76,"bid_size":0,"ask_exchange":0,"bid_exchange":0,"ask":0.00,"bid":0.00,"bid_condition":0,"close":5995.54,"open":5976.76}' python/pandas: schema: *id046 example: 'created last_trade open high low close volume count bid_size bid_exchange bid bid_condition ask_size ask_exchange ask ask_condition 0 2025-10-02 17:21:02.740000-04:00 2025-10-02 16:02:30-04:00 6731.31 6731.94 6693.23 6715.35 0 0 0 0 0.0 0 0 0 0.0 0 1 2025-10-03 17:21:11.325000-04:00 2025-10-03 16:00:37-04:00 6722.14 6750.87 6705.67 6715.79 0 0 0 0 0.0 0 0 0 0.0 0 ' python/polars: schema: *id046 example: 'shape: (2, 16) ┌────────────────────────────────┬────────────────────────────────┬─────────┬─────────┬─────────┬─────────┬────────┬───────┬──────────┬──────────────┬─────┬───────────────┬──────────┬──────────────┬─────┬───────────────┐ │ created ┆ last_trade ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ count ┆ bid_size ┆ bid_exchange ┆ bid ┆ bid_condition ┆ ask_size ┆ ask_exchange ┆ ask ┆ ask_condition │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 ┆ i64 ┆ i64 ┆ f64 ┆ i64 │ ╞════════════════════════════════╪════════════════════════════════╪═════════╪═════════╪═════════╪═════════╪════════╪═══════╪══════════╪══════════════╪═════╪═══════════════╪══════════╪══════════════╪═════╪═══════════════╡ │ 2025-10-02 17:21:02.740 EDT ┆ 2025-10-02 16:02:30 EDT ┆ 6731.31 ┆ 6731.94 ┆ 6693.23 ┆ 6715.35 ┆ 0 ┆ 0 ┆ 0 ┆ 0 ┆ 0.0 ┆ 0 ┆ 0 ┆ 0 ┆ 0.0 ┆ 0 │ │ 2025-10-03 17:21:11.325 EDT ┆ 2025-10-03 16:00:37 EDT ┆ 6722.14 ┆ 6750.87 ┆ 6705.67 ┆ 6715.79 ┆ 0 ┆ 0 ┆ 0 ┆ 0 ┆ 0.0 ┆ 0 ┆ 0 ┆ 0 ┆ 0.0 ┆ 0 │ └────────────────────────────────┴────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴────────┴───────┴──────────┴──────────────┴─────┴───────────────┴──────────┴──────────────┴─────┴───────────────┘ ' /index/history/ohlc: x-concurrent-limit-ttl-ms: '41' x-min-subscription: standard x-history-access: true get: summary: Open High Low Close operationId: index_history_ohlc x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.index_history_ohlc(\n symbol='SPX',\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 4),\n interval='1m',\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.index_history_ohlc(\n symbol='SPX',\n start_date=date(2024, 11, 4),\n end_date=date(2024, 11, 4),\n interval='1m',\n)\n" tags: - History description: '- Aggregated OHLC bars that use [SIP rules](/Articles/Data-And-Requests/OHLC-EOD.html) for each bar. - Time timestamp of the bar represents the opening time of the bar. For a trade to be part of the bar: ``bar timestamp`` <= ``trade time`` < ``bar timestamp + interval``. - [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/index/history/ohlc?symbol=SPX&start_date=20241104&end_date=20241104&interval=1m description: Returns OHLC for a given symbol between specified dates (inclusive) with a one minute interval - url: http://127.0.0.1:25503/v3/index/history/ohlc?symbol=SPX&start_date=20241104&end_date=20241104&interval=1m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/start_date' - $ref: '#/components/parameters/end_date' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/format' responses: '200': description: Returns OHLC for a given symbol between specified dates (inclusive) with a one minute interval content: text/csv: schema: type: array items: &id047 type: object properties: timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. 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. vwap: type: number description: The volume weighted average price of the trading session. example: "timestamp,open,high,low,close,volume,count,vwap\r\n2024-11-04T09:30:00,5725.15,5731.27,5725.15,5728.56,0,0,0.00\r\n2024-11-04T09:31:00,5728.90,5730.40,5724.53,5725.42,0,0,0.00\r\n2024-11-04T09:32:00,5725.48,5729.20,5723.55,5726.54,0,0,0.00\r\n2024-11-04T09:33:00,5726.57,5726.71,5723.13,5723.13,0,0,0.00\r\n2024-11-04T09:34:00,5722.88,5723.33,5717.35,5717.64,0,0,0.00\r\n" application/json: schema: &id048 type: array items: *id047 example: "{\n \"response\": [\n {\"volume\":0,\"high\":5731.27,\"low\":5725.15,\"vwap\":0.00,\"count\":0,\"close\":5728.56,\"open\":5725.15,\"timestamp\":\"2024-11-04T09:30:00\"},\n {\"volume\":0,\"high\":5730.40,\"low\":5724.53,\"vwap\":0.00,\"count\":0,\"close\":5725.42,\"open\":5728.90,\"timestamp\":\"2024-11-04T09:31:00\"},\n {\"volume\":0,\"high\":5729.20,\"low\":5723.55,\"vwap\":0.00,\"count\":0,\"close\":5726.54,\"open\":5725.48,\"timestamp\":\"2024-11-04T09:32:00\"},\n {\"volume\":0,\"high\":5726.71,\"low\":5723.13,\"vwap\":0.00,\"count\":0,\"close\":5723.13,\"open\":5726.57,\"timestamp\":\"2024-11-04T09:33:00\"},\n {\"volume\":0,\"high\":5723.33,\"low\":5717.35,\"vwap\":0.00,\"count\":0,\"close\":5717.64,\"open\":5722.88,\"timestamp\":\"2024-11-04T09:34:00\"}\n ]\n}\n" application/x-ndjson: schema: *id048 example: '{"volume":0,"high":5731.27,"low":5725.15,"vwap":0.00,"count":0,"close":5728.56,"open":5725.15,"timestamp":"2024-11-04T09:30:00"} {"volume":0,"high":5730.40,"low":5724.53,"vwap":0.00,"count":0,"close":5725.42,"open":5728.90,"timestamp":"2024-11-04T09:31:00"} {"volume":0,"high":5729.20,"low":5723.55,"vwap":0.00,"count":0,"close":5726.54,"open":5725.48,"timestamp":"2024-11-04T09:32:00"} {"volume":0,"high":5726.71,"low":5723.13,"vwap":0.00,"count":0,"close":5723.13,"open":5726.57,"timestamp":"2024-11-04T09:33:00"} {"volume":0,"high":5723.33,"low":5717.35,"vwap":0.00,"count":0,"close":5717.64,"open":5722.88,"timestamp":"2024-11-04T09:34:00"}' python/pandas: schema: *id048 example: 'timestamp open high low close volume count vwap 0 2025-10-02 09:30:00-04:00 6731.31 6731.31 6724.25 6724.98 0 0 0.0 1 2025-10-02 09:31:00-04:00 6725.07 6729.44 6724.40 6729.02 0 0 0.0 2 2025-10-02 09:32:00-04:00 6729.15 6730.34 6727.73 6729.68 0 0 0.0 3 2025-10-02 09:33:00-04:00 6729.70 6730.88 6729.14 6729.91 0 0 0.0 4 2025-10-02 09:34:00-04:00 6729.95 6731.94 6727.89 6728.53 0 0 0.0 5 2025-10-02 09:35:00-04:00 6728.31 6729.69 6727.65 6729.69 0 0 0.0 6 2025-10-02 09:36:00-04:00 6729.60 6729.93 6727.47 6729.34 0 0 0.0 7 2025-10-02 09:37:00-04:00 6729.31 6730.00 6726.11 6726.53 0 0 0.0 8 2025-10-02 09:38:00-04:00 6726.72 6727.97 6723.10 6723.73 0 0 0.0 9 2025-10-02 09:39:00-04:00 6723.78 6725.39 6722.24 6722.80 0 0 0.0 10 2025-10-02 09:40:00-04:00 6722.74 6722.77 6719.13 6719.21 0 0 0.0 11 2025-10-02 09:41:00-04:00 6718.81 6720.38 6716.55 6718.10 0 0 0.0 12 2025-10-02 09:42:00-04:00 6717.80 6719.52 6715.55 6717.03 0 0 0.0 13 2025-10-02 09:43:00-04:00 6717.22 6717.68 6713.66 6715.63 0 0 0.0 14 2025-10-02 09:44:00-04:00 6715.65 6715.86 6714.19 6715.08 0 0 0.0 15 2025-10-02 09:45:00-04:00 6714.90 6720.06 6713.86 6719.56 0 0 0.0 16 2025-10-02 09:46:00-04:00 6719.42 6720.81 6718.26 6720.81 0 0 0.0 17 2025-10-02 09:47:00-04:00 6720.91 6720.91 6718.95 6720.07 0 0 0.0 18 2025-10-02 09:48:00-04:00 6720.02 6720.53 6718.64 6718.81 0 0 0.0 19 2025-10-02 09:49:00-04:00 6719.46 6720.31 6714.86 6715.22 0 0 0.0 20 2025-10-02 09:50:00-04:00 6715.43 6716.25 6713.75 6714.74 0 0 0.0 21 2025-10-02 09:51:00-04:00 6714.95 6717.37 6713.79 6714.23 0 0 0.0 22 2025-10-02 09:52:00-04:00 6714.13 6716.43 6711.76 6715.56 0 0 0.0 23 2025-10-02 09:53:00-04:00 6715.52 6719.86 6715.52 6718.80 0 0 0.0 24 2025-10-02 09:54:00-04:00 6718.97 6721.16 6718.70 6719.83 0 0 0.0 25 2025-10-02 09:55:00-04:00 6719.73 6720.27 6716.11 6716.58 0 0 0.0 26 2025-10-02 09:56:00-04:00 6716.55 6716.96 6714.53 6715.21 0 0 0.0 27 2025-10-02 09:57:00-04:00 6715.13 6715.43 6713.47 6715.35 0 0 0.0 28 2025-10-02 09:58:00-04:00 6715.34 6718.35 6714.90 6718.35 0 0 0.0 29 2025-10-02 09:59:00-04:00 6718.37 6720.10 6718.35 6719.42 0 0 0.0 30 2025-10-02 10:00:00-04:00 6720.48 6720.48 6715.61 6717.61 0 0 0.0 ' python/polars: schema: *id048 example: 'shape: (31, 8) ┌────────────────────────────────┬─────────┬─────────┬─────────┬─────────┬────────┬───────┬──────┐ │ timestamp ┆ open ┆ high ┆ low ┆ close ┆ volume ┆ count ┆ vwap │ │ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ f64 ┆ f64 ┆ f64 ┆ f64 ┆ i64 ┆ i64 ┆ f64 │ ╞════════════════════════════════╪═════════╪═════════╪═════════╪═════════╪════════╪═══════╪══════╡ │ 2025-10-02 09:30:00 EDT ┆ 6731.31 ┆ 6731.31 ┆ 6724.25 ┆ 6724.98 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 09:31:00 EDT ┆ 6725.07 ┆ 6729.44 ┆ 6724.4 ┆ 6729.02 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 09:32:00 EDT ┆ 6729.15 ┆ 6730.34 ┆ 6727.73 ┆ 6729.68 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 09:33:00 EDT ┆ 6729.7 ┆ 6730.88 ┆ 6729.14 ┆ 6729.91 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 09:34:00 EDT ┆ 6729.95 ┆ 6731.94 ┆ 6727.89 ┆ 6728.53 ┆ 0 ┆ 0 ┆ 0.0 │ │ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … ┆ … │ │ 2025-10-02 09:56:00 EDT ┆ 6716.55 ┆ 6716.96 ┆ 6714.53 ┆ 6715.21 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 09:57:00 EDT ┆ 6715.13 ┆ 6715.43 ┆ 6713.47 ┆ 6715.35 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 09:58:00 EDT ┆ 6715.34 ┆ 6718.35 ┆ 6714.9 ┆ 6718.35 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 09:59:00 EDT ┆ 6718.37 ┆ 6720.1 ┆ 6718.35 ┆ 6719.42 ┆ 0 ┆ 0 ┆ 0.0 │ │ 2025-10-02 10:00:00 EDT ┆ 6720.48 ┆ 6720.48 ┆ 6715.61 ┆ 6717.61 ┆ 0 ┆ 0 ┆ 0.0 │ └────────────────────────────────┴─────────┴─────────┴─────────┴─────────┴────────┴───────┴──────┘ ' /index/history/price: x-concurrent-limit-ttl-ms: '59' x-min-subscription: value x-history-access: true get: summary: Price operationId: index_history_price x-codeSamples: - lang: Python label: pandas source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''pandas'') df = client.index_history_price(symbol=''SPX'', interval=''1m'') ' - lang: Python label: polars source: 'from thetadata import ThetaClient client = ThetaClient(dataframe_type=''polars'') df = client.index_history_price(symbol=''SPX'', interval=''1m'') ' tags: - History description: '- Retrieves historical indices price reports. [Exchanges](/Articles/Data-And-Requests/The-SIPs.html) typically generate a price report every second for popular indices like SPX. - When the ``interval`` parameter is specified, the returned data represents the price at the exact time of each timestamp. If the timestamp in the response is 10:30:00, the price field represents the price at that exact time of the day. - A price update from the exchange is omitted if the price remained the same from the previous update. - Multi-day requests are limited to 1 month of data. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/index/history/price?symbol=SPX&date=20241104&interval=1m description: Returns historical index price reports - url: http://127.0.0.1:25503/v3/index/history/price?symbol=SPX&date=20241104&interval=1m&format=html description: Click to open in browser (HTML) - url: http://127.0.0.1:25503/v3/index/history/price?symbol=SPX&start_date=20241104&end_date=20241107&interval=1m description: Returns historical index price reports - url: http://127.0.0.1:25503/v3/index/history/price?symbol=SPX&start_date=20241104&end_date=20241107&interval=1m&format=html description: Click to open in browser (HTML) parameters: - $ref: '#/components/parameters/opt_date' - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/start_time' - $ref: '#/components/parameters/end_time' - $ref: '#/components/parameters/interval' - $ref: '#/components/parameters/format' - $ref: '#/components/parameters/opt_start_date' - $ref: '#/components/parameters/opt_end_date' responses: '200': description: Returns historical index price reports content: text/csv: schema: type: array items: &id049 type: object properties: timestamp: type: string format: date-time description: The timestamp in YYYY-MM-DDTHH:mm:ss.SSS format. price: type: number description: The trade price. example: "timestamp,price\r\n2024-11-04T09:30:00,0.0\r\n2024-11-04T09:31:00,5728.56\r\n2024-11-04T09:32:00,5725.48\r\n2024-11-04T09:33:00,5726.57\r\n2024-11-04T09:34:00,5722.88\r\n" application/json: schema: &id050 type: array items: *id049 example: "{\n \"response\": [\n {\"price\":0.0,\"timestamp\":\"2024-11-04T09:30:00\"},\n {\"price\":5728.56,\"timestamp\":\"2024-11-04T09:31:00\"},\n {\"price\":5725.48,\"timestamp\":\"2024-11-04T09:32:00\"},\n {\"price\":5726.57,\"timestamp\":\"2024-11-04T09:33:00\"},\n {\"price\":5722.88,\"timestamp\":\"2024-11-04T09:34:00\"}\n ]\n}\n" application/x-ndjson: schema: *id050 example: '{"price":0.0,"timestamp":"2024-11-04T09:30:00"} {"price":5728.56,"timestamp":"2024-11-04T09:31:00"} {"price":5725.48,"timestamp":"2024-11-04T09:32:00"} {"price":5726.57,"timestamp":"2024-11-04T09:33:00"} {"price":5722.88,"timestamp":"2024-11-04T09:34:00"}' python/pandas: schema: *id050 example: 'timestamp price 0 2025-10-02 09:30:00-04:00 NaN 1 2025-10-02 09:31:00-04:00 6725.07 2 2025-10-02 09:32:00-04:00 6729.15 3 2025-10-02 09:33:00-04:00 6729.70 4 2025-10-02 09:34:00-04:00 6729.95 5 2025-10-02 09:35:00-04:00 6728.31 6 2025-10-02 09:36:00-04:00 6729.60 7 2025-10-02 09:37:00-04:00 6729.31 8 2025-10-02 09:38:00-04:00 6726.72 9 2025-10-02 09:39:00-04:00 6723.78 10 2025-10-02 09:40:00-04:00 6722.74 11 2025-10-02 09:41:00-04:00 6718.81 12 2025-10-02 09:42:00-04:00 6717.80 13 2025-10-02 09:43:00-04:00 6717.22 14 2025-10-02 09:44:00-04:00 6715.65 15 2025-10-02 09:45:00-04:00 6714.90 16 2025-10-02 09:46:00-04:00 6719.42 17 2025-10-02 09:47:00-04:00 6720.91 18 2025-10-02 09:48:00-04:00 6720.02 19 2025-10-02 09:49:00-04:00 6719.46 20 2025-10-02 09:50:00-04:00 6715.43 21 2025-10-02 09:51:00-04:00 6714.95 22 2025-10-02 09:52:00-04:00 6714.13 23 2025-10-02 09:53:00-04:00 6715.52 24 2025-10-02 09:54:00-04:00 6718.97 25 2025-10-02 09:55:00-04:00 6719.73 26 2025-10-02 09:56:00-04:00 6716.55 27 2025-10-02 09:57:00-04:00 6715.13 28 2025-10-02 09:58:00-04:00 6715.34 29 2025-10-02 09:59:00-04:00 6718.37 30 2025-10-02 10:00:00-04:00 6720.48 ' python/polars: schema: *id050 example: 'shape: (31, 2) ┌────────────────────────────────┬─────────┐ │ timestamp ┆ price │ │ --- ┆ --- │ │ datetime[ms, America/New_York] ┆ f64 │ ╞════════════════════════════════╪═════════╡ │ 2025-10-02 09:30:00 EDT ┆ NaN │ │ 2025-10-02 09:31:00 EDT ┆ 6725.07 │ │ 2025-10-02 09:32:00 EDT ┆ 6729.15 │ │ 2025-10-02 09:33:00 EDT ┆ 6729.7 │ │ 2025-10-02 09:34:00 EDT ┆ 6729.95 │ │ … ┆ … │ │ 2025-10-02 09:56:00 EDT ┆ 6716.55 │ │ 2025-10-02 09:57:00 EDT ┆ 6715.13 │ │ 2025-10-02 09:58:00 EDT ┆ 6715.34 │ │ 2025-10-02 09:59:00 EDT ┆ 6718.37 │ │ 2025-10-02 10:00:00 EDT ┆ 6720.48 │ └────────────────────────────────┴─────────┘ ' /interest_rate/history/eod: x-concurrent-limit-ttl-ms: '15' x-min-subscription: free get: summary: End of Day operationId: interest_rate_history_eod x-codeSamples: - lang: Python label: pandas source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='pandas')\ndf = client.interest_rate_history_eod(\n symbol='SOFR',\n start_date=date(2025, 11, 4),\n end_date=date(2025, 11, 8),\n)\n" - lang: Python label: polars source: "from thetadata import ThetaClient\nfrom datetime import date\n\nclient = ThetaClient(dataframe_type='polars')\ndf = client.interest_rate_history_eod(\n symbol='SOFR',\n start_date=date(2025, 11, 4),\n end_date=date(2025, 11, 8),\n)\n" tags: - History description: '- Returns the interest rate reported. Depending on the rate, reports can occur in the morning or the afternoon. ' x-sample-urls: - url: http://127.0.0.1:25503/v3/interest_rate/history/eod?symbol=SOFR&start_date=20251104&end_date=20251108 description: Returns the rate for a given symbol between specified dates (inclusive) parameters: - $ref: '#/components/parameters/single_symbol' - $ref: '#/components/parameters/start_date' - $ref: '#/components/parameters/end_date' - $ref: '#/components/parameters/format' responses: '200': description: Returns the interest rate for a given symbol between specified dates (inclusive) content: text/csv: schema: type: array items: &id051 type: object properties: created: type: string format: date description: The date formated as YYYY-MM-DD format. rate: type: number description: The interest rate express as a percent (i.e 1.25% is 1.25). example: "created,rate\r\n 2025-11-04,4.0000\r\n 2025-11-05,3.9100\r\n 2025-11-06,3.9200\r\n 2025-11-07,3.9300\r\n 20251108,3.9400\r\n" application/json: schema: &id052 type: array items: *id051 example: "{\n \"response\": [\n {\"rate\":4.0000,\"created\":\"2025-11-04\"}\n {\"rate\":3.9100,\"created\":\"2025-11-05\"}\n {\"rate\":3.9200,\"created\":\"2025-11-06\"}\n {\"rate\":3.9300,\"created\":\"2025-11-07\"}\n {\"rate\":3.9400,\"created\":\"2025-11-08\"}\n ]\n}\n" application/x-ndjson: schema: *id052 example: '{"rate":4.0000,"created":"2025-11-04"} {"rate":3.9100,"created":"2025-11-05"} {"rate":3.9200,"created":"2025-11-06"} {"rate":3.9300,"created":"2025-11-07"} {"rate":3.9400,"created":"2025-11-08"}' python/pandas: schema: *id052 example: 'created rate 0 2026-11-04 3.66 1 2026-11-05 3.66 2 2026-11-06 3.66 3 2026-11-07 3.66 4 2026-11-08 3.66 5 2026-11-09 3.66 ' python/polars: schema: *id052 example: 'shape: (6, 2) ┌────────────┬──────┐ │ created ┆ rate │ │ --- ┆ --- │ │ str ┆ f64 │ ╞════════════╪══════╡ │ 2026-11-04 ┆ 3.66 │ │ 2026-11-05 ┆ 3.66 │ │ 2026-11-06 ┆ 3.66 │ │ 2026-11-07 ┆ 3.66 │ │ 2026-11-08 ┆ 3.66 │ │ 2026-11-09 ┆ 3.66 │ └────────────┴──────┘ ' components: parameters: end_time: name: end_time in: query description: The end time (inclusive) in the specified day (format 24-hour HH:MM:SS.SSS). required: false schema: type: string format: time default: '16:00:00' start_time: name: start_time in: query description: The start time (inclusive) in the specified day (format 24-hour HH:MM:SS.SSS). required: false schema: type: string format: time default: 09:30:00 single_symbol: name: symbol in: query description: The stock or index symbol, or underlying symbol for options. required: true schema: type: string rate_value: name: rate_value in: query description: The interest rate, as a percent, to be used in a Greeks calculation. required: false schema: type: number format: float example: 5.0 greeks_version: name: version in: query description: Used to adjust Greeks calculation methodology. "1" uses a fixed .15 DTE for 0DTE; "latest" uses real TTE (down to a minimum of 1 hour) required: false schema: type: string enum: - latest - '1' default: latest max_dte: name: max_dte in: query description: If specified, only contracts with a full calendar day 'Days to Expiration' (DTE) less than or equal to this number will be returned. required: false schema: minimum: 0 type: integer format: int32 rate_type: name: rate_type in: query description: The interest rate type to be used in a Greeks calculation. required: false schema: type: string enum: - sofr - treasury_m1 - treasury_m3 - treasury_m6 - treasury_y1 - treasury_y2 - treasury_y3 - treasury_y5 - treasury_y7 - treasury_y10 - treasury_y20 - treasury_y30 default: sofr opt_end_date: name: end_date in: query description: The end date (inclusive). required: false schema: type: string format: date venue: name: venue in: query description: Used to specify the venue of the real time or historic request. ``nqb`` = Nasdaq Basic; ``utp_cta`` = merged UTP & CTA. required: false schema: type: string enum: - nqb - utp_cta default: nqb end_date: name: end_date in: query description: The end date (inclusive). required: true schema: type: string format: date interval: name: interval in: query description: The size of the time interval must be one of the available options listed below. Intervals less than 1m are available only for single-day requests. required: true schema: type: string enum: - tick - 10ms - 100ms - 500ms - 1s - 5s - 10s - 15s - 30s - 1m - 5m - 10m - 15m - 30m - 1h default: 1s underlyer_use_nbbo: name: underlyer_use_nbbo in: query description: Used to select underlyer pricing for Greeks calculation. "true" uses the midpoint of the NBBO; "false" uses the last trade price. required: false schema: type: boolean default: false start_date: name: start_date in: query description: The start date (inclusive). required: true schema: type: string format: date opt_date: name: date in: query description: The date to fetch data for. If present, this overrides start_date and end_date. required: false schema: type: string format: date expiration: name: expiration in: query x-date-wildcard: true description: The expiration of the contract in `YYYY-MM-DD` or `YYYYMMDD` format, or `*` for all expirations. required: true schema: type: string format: date expiration_no_star: name: expiration in: query description: The expiration of the contract in `YYYY-MM-DD` or `YYYYMMDD` format. required: true schema: type: string format: date right: name: right in: query description: The right (call or put) of the contract. required: false schema: type: string enum: - call - put - both default: both strike_range: name: strike_range in: query description: Limits the number of contracts returned relative to the underlying's spot price. For a specified value 'n', this returns 'n' strikes above and 'n' strikes below the spot price, plus one at-the-money (ATM) strike (where spot price = strike price), if available. This results in a maximum of `2n + 1` strikes. required: false schema: minimum: 1 type: integer format: int32 strike: name: strike in: query description: The strike price of the contract in dollars (ie `100.00` for `$100.00`), or `*` for all strikes. required: false schema: type: string default: '*' opt_start_date: name: start_date in: query description: The start date (inclusive). required: false schema: type: string format: date format: name: format in: query description: The format of the data when returned to the user. required: false schema: type: string enum: - csv - json - ndjson - html default: csv exclusive: name: exclusive in: query description: If you prefer to match quotes with timestamps that are < the trade timestamp. required: false schema: type: boolean default: true annual_dividend: name: annual_dividend in: query description: The annualized expected dividend amount to be used in Greeks calculations. required: false schema: type: number format: float