How to Use EODHD historical prices in Codex
Get historical open, high, low, close, adjusted close, and volume for one instrument. Use it to compare performance, calculate drawdowns, or study trading activity, with split- and dividend-adjusted closes for return calculations.
Prompts to try with EODHD historical prices in Codex
Copy an example into Codex, or ask in your own words.
Use EODHD historical prices for AAPL.US from January 1 through December 31, 2024. Add a chart to this project showing raw close and adjusted close as separate labeled series.
Use EODHD historical prices for MSFT.US and VTI.US from January 1, 2020, through December 31, 2024. Add a report comparing cumulative returns calculated from adjusted closes.
Use EODHD historical prices for TSLA.US during 2024. Add a function that calculates maximum drawdown from adjusted closes and returns the peak and trough dates.
Use EODHD historical prices for AMZN.US during 2024. Build a table in this project of sessions with volume above twice the preceding 20-session average.
Use EODHD historical prices for EURUSD.FOREX during 2024. Add a monthly summary of opening, highest, lowest, and closing values to the project's research report.
How to set up EODHD historical prices in Codex
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the hosted server
codex mcp add spiral --url https://api.spiral.ai/mcp
- Sign in
Codex opens the browser: sign in to Spiral and click Authorize. No API key. codex mcp list then shows Spiral.
codex mcp login spiral
Use the Spiral skill
- Send Codex 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 EODHD historical 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": "eodhd/prices/eod", "input": { "ticker": "<ticker>" } }'
Then paste one of the prompts above: Codex finds EODHD historical prices on Spiral, shows the price and runs it.
EODHD historical prices providers and prices
Spiral runs EODHD historical prices through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask Codex for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Order | a or d | a oldest first, d newest first. Default a. | |
| Period | d, w, or m | Bar size: d daily, w weekly, m monthly. Default d. |
Every API field of EODHD · End-of-day prices is on its tool page: open its card above.
What can you do with EODHD historical prices in Codex?
Build a historical performance report from EODHD price bars in your project. Your coding agent can calculate returns, drawdowns, and volume comparisons from the retrieved series.
Compare investment performance
Compare Apple, Microsoft, and a broad-market ETF over the same dates using adjusted closes. Calculate cumulative returns from the retrieved series.
Measure historical drawdowns
Calculate the largest decline from a previous peak for a stock or ETF. Report the peak, trough, and any subsequent recovery using adjusted closes.
Build a research backtest
Use daily adjusted closes to evaluate a moving-average rule on a named public stock. Compare the calculated result with holding that stock over the same dates.
Study unusual trading volume
Compare each day's reported volume with its recent average. Identify unusually active sessions and show their daily price ranges.
Review stock split effects
Place raw closes beside adjusted closes around a stock split. Show how the choice of series changes the apparent price movement.
Summarize a reporting period
Turn a stock's historical daily bars into a monthly research summary with its opening price, highest and lowest prices, closing price, and total volume.
Analyze currency and crypto history
Calculate historical changes and drawdowns for EUR/USD or Bitcoin against the US dollar. Keep each instrument's results separate for comparison.
More on EODHD historical prices and Codex
Overview
EODHD historical prices in other agents
Questions about EODHD historical prices in Codex
Can Codex use EODHD historical prices?
Yes. Add Spiral to Codex as an MCP server, and Codex can find and run EODHD historical prices like any built-in tool.
How much does EODHD historical prices cost in Codex?
Up to $0.17459 per run. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.
Do I need an Alexandria account to use EODHD historical prices in Codex?
No. Spiral runs EODHD historical 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 EODHD historical prices in Codex?
About two minutes: add the hosted server, then sign in.
Does Codex wait while EODHD historical prices runs?
EODHD historical prices runs in the background. Codex starts the run, checks on it and gives you the json when it's ready.
Which markets and assets does EODHD cover?
EODHD advertises historical coverage across more than 60 exchanges. The endpoint supports stocks, ETFs, funds, indices, forex pairs, and digital currencies.
When are end-of-day prices updated?
Most exchanges update 2 to 3 hours after closing; NYSE and NASDAQ update within 15 minutes. US mutual funds, PINK, OTCBB, and some indices update the next morning, usually finishing at 5 to 6 a.m. Eastern.
Are historical prices adjusted for splits and dividends?
Adjusted close accounts for both splits and dividends. Open, high, low, and close remain unadjusted, while volume is adjusted for splits.
Can I republish EODHD prices?
EODHD's personal-use terms allow private, noncommercial analysis but prohibit redistribution and display. Business use requires commercial licensing; personal-use permission does not cover a public price dashboard.
Start using EODHD historical prices in Codex
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Codex:
set up https://spiral.ai/SKILL.md


