Skip to content

EOD ​

FreeValueStandardPro

Fetch end-of-day stock data for a date range. Returns OHLCV + bid/ask per trading day.

Since the equity SIPs 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 at the time of report generation. You can read more about EOD & OHLC data here. Theta Data plans to avail SIP EOD reports in the near future.

AAPL · 20250303 · 20250306
Client
Auth
Style
from thetadatadx import Client

client = Client.from_env()

rows = client.market_data.stock_history_eod(
    "AAPL", "20250303", "20250306",
)
for t in rows:
    print(t.date, t.open, t.close, t.volume)
Sample response · JSON
[
  {
    "ask": 18.536,
    "ask_condition": 0,
    "ask_exchange": 1,
    "ask_size": 2,
    "bid": 18.534,
    "bid_condition": 0,
    "bid_exchange": 7,
    "bid_size": 2,
    "close": 185.64,
    "count": 1003582,
    "created": "2024-01-02T17:17:53.606",
    "high": 188.44,
    "last_trade": "2024-01-02T17:17:51.877",
    "low": 183.885,
    "open": 187.03,
    "volume": 80680243
  },
  {
    "ask": 18.41,
    "ask_condition": 0,
    "ask_exchange": 1,
    "ask_size": 2,
    "bid": 18.405,
    "bid_condition": 0,
    "bid_exchange": 7,
    "bid_size": 5,
    "close": 184.25,
    "count": 654127,
    "created": "2024-01-03T17:16:29.883",
    "high": 185.88,
    "last_trade": "2024-01-03T17:16:28.586",
    "low": 183.43,
    "open": 184.2,
    "volume": 58308345
  },
  {
    "ask": 1.8179,
    "ask_condition": 0,
    "ask_exchange": 7,
    "ask_size": 2,
    "bid": 1.8176,
    "bid_condition": 0,
    "bid_exchange": 60,
    "bid_size": 8,
    "close": 181.91,
    "count": 709246,
    "created": "2024-01-04T17:17:06.02",
    "high": 183.0872,
    "last_trade": "2024-01-04T17:17:02.445",
    "low": 180.88,
    "open": 182,
    "volume": 71197269
  }
]

Parameters ​

NameTypeRequiredDefaultDescription
symbolstringyes-Ticker symbol (e.g. AAPL)
start_datedateyes-Start date YYYYMMDD
end_datedateyes-End date YYYYMMDD
timeout_msintno-Per-request deadline in milliseconds. 0 means no deadline.

Response ​

Rows of EodTick:

FieldTypeDescription
created_ms_of_dayi32EOD report creation time (NOT a trade time), milliseconds since midnight ET.
last_trade_ms_of_dayi32Time of the day's last trade, milliseconds since midnight ET. 0 when no trades printed that day.
openf64Opening trade price. 0.0 when no trades printed that day.
highf64Highest traded price. 0.0 when no trades printed that day.
lowf64Lowest traded price. 0.0 when no trades printed that day.
closef64Closing traded price. 0.0 when no trades printed that day.
volumei64Number of contracts or shares traded.
counti64Number of trades.
bid_sizei32Last NBBO bid size.
bid_exchangei32Exchange code of the NBBO bid. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
bidf64Last NBBO bid price.
bid_conditioni32Quote condition code on the bid side. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
ask_sizei32Last NBBO ask size.
ask_exchangei32Exchange code of the NBBO ask. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
askf64Last NBBO ask price.
ask_conditioni32Quote condition code on the ask side. Zero is a code the vendor assigns a meaning, so read columns() to tell a reported zero from a response that carried no such column.
datei32Trading date as a YYYYMMDD integer.

Released under the Apache-2.0 License.