Historical prices of an Investing.com instrument for a date range: one bar per day, week or month with date, open, high, low, close, volume and change percent, newest first. Default range: the last 90 days (daily), year (weekly) or 5 years (monthly) up to to.
Every response includes credits_used: the credits this call cost.
Parameters
name
type
description
id
string
Investing.com instrument id (from /investing/v1/search), e.g. 6408 (Apple), 166 (S&P 500), 1 (EUR/USD), 8830 (Gold futures), 1057391 (Bitcoin/USD). Give id or symbol. Example: 6408
symbol
string
Ticker or symbol, e.g. AAPL, TSLA, EUR/USD, BTC/USD; the best-matching instrument is used (narrow it with exchange or country).
exchange
string
With symbol: exchange short name, e.g. NASDAQ, NYSE, LSE, Xetra.
country
string
With symbol: country name, e.g. United States, Germany.
interval
daily | weekly | monthly
Bar size. Example: daily
from
string
First date, YYYY-MM-DD. Example: 2026-01-01
to
string
Last date, YYYY-MM-DD (default today). Example: 2026-03-31
import os, requests
res = requests.get(
"https://api.api.sh/investing/v1/historical",
params={"id": "6408"},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json()
const url = new URL("https://api.api.sh/investing/v1/historical");
url.searchParams.set("id", "6408");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json();
Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.