Twelve Data · Time series
twelvedata/prices/seriesGet market and financial data with Twelve Data · Time series from Alexandria through one Spiral API key. Read OHLCV history for one symbol at an interval from 1min to 1month. Use prices/quote for the latest bar and the 52-week range. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
Up to $0.17459 per run.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
interval required | one of 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 8h, 1day, 1week, 1month | — | Bar size. Required. |
dp | number -1 to 11 | — | Decimal places from 0 to 11. -1 lets Twelve Data choose. Default -1. |
date | text | — | One session: YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS, today, or yesterday. |
figi | text | — | FIGI for one instrument. Twelve Data limits this parameter to Ultra and Enterprise plans. |
isin | text | — | ISIN for one instrument. Returning ISIN values in the body needs the ISIN add-on. |
type | one of American Depositary Receipt, Bond, Bond Fund, Closed-end Fund, Common Stock, Depositary Receipt, Digital Currency, ETF, Exchange-Traded Note, Global Depositary Receipt, Limited Partnership, Mutual Fund, Physical Currency, Preferred Stock, REIT, Right, Structured Product, Trust, Unit, Warrant | — | Asset class, used to disambiguate a ticker. |
cusip | text | — | CUSIP for one instrument. Returning CUSIP values in the body needs the CUSIP add-on. |
order | one of asc, desc | — | Sort. Default desc, newest first. |
adjust | one of all, splits, dividends, none | — | Price adjustment. Default splits. |
symbol | text | — | Ticker. One instrument, such as AAPL, EUR/USD, or BTC/USD. A comma-separated list is not accepted. |
country | text | — | Country name or ISO code, such as United States or US. |
prepost | true or false | — | Include US equity pre-market and post-market data. Twelve Data limits this to Pro and Venture plans and above, at 1min, 5min, 15min, and 30min. Default false. |
end_date | text | — | Range end, YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS. |
exchange | text | — | Exchange name, such as NASDAQ. |
mic_code | text | — | ISO 10383 MIC, such as XNAS. |
timezone | text | — | Exchange, UTC, or an IANA name. Applies to intraday bars and to start_date and end_date. Default Exchange. |
outputsize | number 1 to 5000 | — | Bars to return, from 1 to 5000. When omitted and no date is set, Twelve Data returns 30. A date range without outputsize returns up to the maximum. The credit is still one per symbol. |
start_date | text | — | Range start, YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS. Can be sent alone or with end_date. |
previous_close | true or false | — | Add the previous bar close on each point. Default false. |
Same request in code
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": "twelvedata/prices/series",
"input": {
"interval": "1min",
"symbol": "<symbol>"
}
}'Frequently asked questions
How much does Twelve Data · Time series cost?
Up to $0.17459 per run. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use Twelve Data · Time series through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "twelvedata/prices/series"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use Twelve Data · Time series?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use Twelve Data · Time series?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.