How to Use Tiingo historical stock prices in opencode
Get end-of-day open, high, low, close, and volume, with raw and adjusted values plus dividends and splits. Use it to study historical performance, calculate indicators, or inspect price changes around corporate actions.
Prompts to try with Tiingo historical stock prices in opencode
Copy an example into opencode, or ask in your own words.
Use Tiingo historical stock prices to retrieve SPY's daily adjusted closes for 2024 and add a 20-day moving average calculation to this project's analysis module.
Use Tiingo historical stock prices for AAPL from August 1 through September 15, 2020. Add a notebook comparing raw closes, adjusted closes, and split records around the price discontinuity.
Use Tiingo historical stock prices to retrieve QQQ's adjusted closing history from 2020 through 2024. Add a function that calculates maximum drawdown and reports the peak and trough dates.
Use Tiingo historical stock prices for KO during 2024. Update our cache refresh logic so a returned cash dividend or split triggers a full historical refresh.
Use Tiingo historical stock prices for NVDA during 2024. Add an internal report showing each day's volume relative to the preceding 20 trading days.
How to set up Tiingo historical stock prices in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Tiingo historical stock prices
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "alexandria", "model": "tiingo/prices/eod", "input": { "ticker": "<ticker>" } }'
Then paste one of the prompts above: opencode finds Tiingo historical stock prices on Spiral, shows the price and runs it.
Tiingo historical stock prices providers and prices
Spiral runs Tiingo historical stock prices through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Resample freq | daily, weekly, monthly, or annually | daily (the default, holiday calendar), weekly (weeks end Friday), monthly, or annually. A start or end inside a period is widened to the whole period. |
Every API field of Tiingo · End-of-day prices is on its tool page: open its card above.
What can you do with Tiingo historical stock prices in opencode?
Build an internal historical price analysis using Tiingo's raw and adjusted series. A coding agent can add moving averages, drawdown calculations, and corporate action refresh logic to your project's existing analysis code.
Compare historical stock performance
Retrieve AAPL and MSFT over the same dates and calculate percentage changes from adjusted closes for an internal research comparison.
Inspect a stock split
Compare raw and adjusted prices with split records around AAPL's August 2020 split to investigate the apparent price discontinuity.
Calculate moving averages
Use SPY's adjusted closing history to calculate 20-day and 50-day moving averages and identify historical crossings.
Measure historical drawdowns
Calculate QQQ's largest decline from an earlier peak over a chosen period using adjusted closing prices.
Review unusual trading volume
Compare NVDA's daily volume with its preceding 20 trading days, showing the corresponding daily price range for context.
Refresh research after corporate actions
Check KO's returned dividend and split records, then refresh its historical adjusted series when an event changes the adjustment basis.
More on Tiingo historical stock prices and opencode
Overview
Tiingo historical stock prices in other agents
Questions about Tiingo historical stock prices in opencode
Can opencode use Tiingo historical stock prices?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Tiingo historical stock prices like any built-in tool.
How much does Tiingo historical stock prices cost in opencode?
Up to $0.034918 per run. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need an Alexandria account to use Tiingo historical stock prices in opencode?
No. Spiral runs Tiingo historical stock prices on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up Tiingo historical stock prices in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while Tiingo historical stock prices runs?
Tiingo historical stock prices runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
Which markets does Tiingo's end-of-day data cover?
Tiingo's product summary lists more than 80,000 tickers across US equities, ETFs, mutual funds, and Chinese A-shares. That is a stated coverage boundary, rather than a claim of worldwide stock coverage.
When are US stock prices available?
Most US equity prices are available at 5:30 PM EST. Exchanges can send corrections until 8 PM EST, so an earlier retrieval may precede a correction.
Can previously retrieved adjusted prices change?
Yes. Tiingo recommends downloading the entire price history again after a split or cash dividend so the stored series contains the latest adjusted prices.
Where does Tiingo get its US market data?
Tiingo says it cross-checks three to seven independent feeds for US assets. Its published methodology compares upstream values instead of relying on one provider.
Can I publish the prices returned by Tiingo?
Tiingo's API terms specify internal consumption. Redistributing the data requires separate permission, so retrieving a series does not itself grant publication rights.
Start using Tiingo historical stock prices in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


