1. Overview
Request intraday OHLCV history: one day per request for second bars, or one month for minute and hour bars. Use /series for daily and higher timeframes.
Use the Insight Tool to download a date range as CSV or JSON:
insight download_history --symbol "NASDAQ:AAPL" --bar_type minute --bar_interval 5 \
--from 2024-01 --to 2024-06 --output_dir ./history --concurrency 32. Endpoints
SIP Trade History
GET https://api.insightsentry.com/v3/symbols/SIP:AAPL/trades?date=2026-09-08SIP: codes use the standard trades endpoint. date: YYYY-MM-DD, a U.S. trade date, today or one of the previous six dates. A trade date starts at 20:55 New York time the evening before, its overnight trading from 21:00. Today's date returns the session in progress or, when none is running, the latest one. Returns code, last_update in Unix milliseconds, bar_type: "1T", and all available trades in the series array, ordered by time. Each point includes numeric time in Unix seconds and integer us in Unix microseconds, plus close, volume, and trade_id, with trade_exchange, tape, and trade_conditions when available. An invalid date returns 400; data still being prepared returns 202 with data_pending, to retry after Retry-After; temporarily unavailable data returns 500.
Optional window: 3h, 6h, 9h, 12h, 15h, 18h, 21h, or 24h for today, counted back from the latest session's close when none is running. Omit it for the whole session (default). Historical dates ignore window. Rolling responses include as_of and window_start in Unix milliseconds.
SIP bar history uses /v3/symbols/{symbol}/history with a SIP: code, such as SIP:AAPL. Dates and months use New York time (America/New_York), including daylight saving time. Earliest date: 2016-01-01. A period entirely before available history returns 200 with data_unavailableand available_start_date in America/New_York, when known. Data still being prepared returns 202 with data_pending, to retry after Retry-After.
Empty SIP history and trade results return 200 with series: [], error: "data_unavailable", and a message explaining the reason, such as a weekend or market closure.
US-listed stocks and ETFs requested with their exchange code, such as NASDAQ:AAPL, also return SIP data; see US Equities.
Standard Tick Trades
GET https://api.insightsentry.com/v3/symbols/CME_MINI:ES1!/trades?date=YYYY-MM-DDTrades are available for stocks, funds, currencies, and futures; other symbol types return 400 unsupported_symbol_type. Use a UTC date for today, tomorrow, or one of the previous six dates. Today and tomorrow return a rolling window. Optional window: 3h, 6h, 9h, 12h, 15h, 18h, 21h, or 24h (default). Historical dates ignore window. Rolling responses include as_of and window_start in Unix milliseconds. Optional from and to, UTC times in ISO 8601 such as 2026-09-30T14:00:00Z, return the trades at or after from and before to within the requested date, or today's window; use them to fetch a day in parts. U.S.-listed stocks and funds use U.S. trade dates instead, which start at 20:55 New York time the evening before, their overnight trading from 21:00; without window, today and tomorrow return the session in progress or, when none is running, the latest one. For continuous futures symbols, 1! selects today's front contract and 2! selects today's next contract, including when you request an older date. The response code identifies the selected dated contract.
Endpoint
GET https://api.insightsentry.com/v3/symbols/{code}/historyOption contracts return 400 unsupported_symbol_type; use /v3/symbols/{code}/series for their bars.
Query Parameters
| Parameter | Required | Description |
|---|---|---|
| start_date | Yes | The start period for historical data. Use YYYY-MM-DD format for second bars, or YYYY-MM format for minute and hour bars (returns data for the entire month). Cannot be in the future. For second-level intervals, if the date falls on a non-trading day the response will contain a message indicating no data is available. start_ym is accepted as an alias. |
| bar_type | Yes | One of: second, minute, hour |
| bar_interval | No | Interval within the bar type. Defaults to 1. For second: 1. For minute: 1–1440. For hour: 1–24. |
| extended | No | Include extended/pre-post market trading hours data. Defaults to true. Only applies to non-futures (futures always use extended session). |
| split | No | Split-adjusted prices for equities and ETFs. Defaults to true. Set to false to receive unadjusted data. Only applies to equities and ETFs. |
| dadj | No | Dividend-adjusted prices for equities and ETFs. Defaults to false. When enabled, data is both split- and dividend-adjusted. If split=false, this parameter is ignored. Only applies to equities and ETFs. |
| badj | No | Back-adjusted prices for continuous futures contracts (codes ending in 1! or 2!). Defaults to true. Has no effect on non-continuous futures or equities. |
| settlement | No | Use settlement price as the daily close for futures contracts. Defaults to false. Ignored for non-futures. |
Price Adjustment Parameters
For equities and ETFs, use split and dadj; for futures, use badj and settlement. See Common Parameters for defaults and combinations.
3. Supported Bar Types
second
start_date as YYYY-MM-DD
minute
start_date as YYYY-MM
hour
start_date as YYYY-MM
Higher Timeframes
Use /series for day, week, and month bars.
Tick Data
The tick bar type is not currently supported on history endpoints.
4. Errors
Retry temporary failures with bounded exponential backoff.
| Status | Meaning |
|---|---|
| 200 | Success. For second bars on a non-trading day, the response may contain a message instead of data. A Data may be incomplete message marks a partial result; retry later for the complete data. |
| 202 | Accepted — the data is still being prepared (data_pending) and is not returned yet. Retry after the number of seconds in the Retry-After header. |
| 429 | Too Many Requests — your concurrent history request limit has been reached. Wait for existing requests to finish. |
| 500 | Internal Server Error — the data is temporarily unavailable. Retry after the number of seconds in the Retry-After header when present; otherwise retry with bounded exponential backoff. |
5. When to Use
Use History Endpoints When
- You need second, minute, or hour data from a specific past date or month
- You are building a dataset that spans multiple months of intraday data
- The standard
/seriesendpoint does not return enough data points for your needs
Use Series Endpoints Instead When
- You need recent or real-time data
- You are working with day, week, or month bar types — all available data points are returned by
/series - You need low-latency responses without queuing
6. Examples
Minute Data for a Specific Month
curl --get 'https://api.insightsentry.com/v3/symbols/NASDAQ%3AAAPL/history' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--data-urlencode 'bar_type=minute' \
--data-urlencode 'bar_interval=1' \
--data-urlencode 'start_date=2024-06'Second Data for a Specific Day
curl --get 'https://api.insightsentry.com/v3/symbols/NASDAQ%3AAAPL/history' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--data-urlencode 'bar_type=second' \
--data-urlencode 'bar_interval=1' \
--data-urlencode 'start_date=2024-06-14'Hourly Data for a Specific Month
curl --get 'https://api.insightsentry.com/v3/symbols/CME_MINI%3ANQ1%21/history' \
-H 'Authorization: Bearer YOUR_API_KEY' \
--data-urlencode 'bar_type=hour' \
--data-urlencode 'bar_interval=1' \
--data-urlencode 'start_date=2024-03'For contract backfills, see Futures History.
Multi-Month Fetching
import time
from urllib.parse import quote
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.insightsentry.com"
SYMBOL = "NASDAQ:AAPL"
MONTHS = [
"2024-01",
"2024-02",
"2024-03",
"2024-04",
"2024-05",
"2024-06",
"2024-07",
"2024-08",
]
REQUEST_TIMEOUT_SECONDS = 120
MAX_RETRIES = 5
def build_session():
session = requests.Session()
session.headers.update({
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
})
return session
def fetch_history_month(session, symbol, month):
encoded_symbol = quote(symbol, safe="")
url = f"{BASE_URL}/v3/symbols/{encoded_symbol}/history"
params = {
"bar_type": "minute",
"bar_interval": "1",
"start_date": month,
}
for attempt in range(1, MAX_RETRIES + 1):
response = session.get(url, params=params, timeout=REQUEST_TIMEOUT_SECONDS)
if response.status_code == 202:
# Still being prepared: retry after the wait it names.
time.sleep(int(response.headers.get("Retry-After", "60")))
continue
if response.status_code == 429 or response.status_code >= 500:
time.sleep(attempt * 0.5)
continue
response.raise_for_status()
data = response.json()
message = data.get("message") or data.get("error")
if message:
print(f"{month}: {message}")
return None
return data
raise RuntimeError(f"{month}: exhausted retries")
session = build_session()
for month in MONTHS:
data = fetch_history_month(session, SYMBOL, month)
if data is None:
continue
print(f"{month}: {len(data.get('series', []))} bars")