[Integrations](https://spiral.ai/integrations) › [OpenClaw](https://spiral.ai/integrations/openclaw) › [Twelve Data historical prices](https://spiral.ai/integrations/openclaw/twelve-data-historical-prices)

# How to Use Twelve Data historical prices in OpenClaw

Returns instrument metadata and historical open, high, low, and close bars, with volume where available. Use it to chart prices, calculate returns, or study movements across multiple periods.

|  |  |
| --- | --- |
| Model | Twelve Data historical prices |
| Available through | Alexandria |
| Category | Finance |
| Price | Up to $0.17459 per run. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Twelve Data historical prices in OpenClaw

- Every day at 9 AM UTC, use Twelve Data historical prices for BTC/USD and report the percentage change between the two most recent completed bars returned.
- Each Tuesday through Saturday at 6 AM Eastern, use Twelve Data historical prices for AAPL and summarize the most recent completed daily bars available.
- Every Monday at 9am: use Twelve Data historical prices to look this up and give me the result as a table.
- Pull the latest numbers from Twelve Data historical prices and tell me what changed since last week.
- Check Twelve Data historical prices and summarize what you find in three bullet points.

## How to set up Twelve Data historical prices in OpenClaw

Pick the way that suits you. Each takes about two minutes.

### Use the Spiral skill

1. **Send OpenClaw this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use Spiral's MCP server

1. **Add the server**: On the machine that runs OpenClaw's Gateway:

```bash
openclaw mcp add spiral \
  --url https://api.spiral.ai/mcp \
  --transport streamable-http \
  --auth oauth
```

2. **Sign in**: In Settings › MCP, select Sign in on the Spiral server, sign in to Spiral and click Authorize. No API key.

```bash
openclaw mcp login spiral
```

3. **Reload and check**: A running Gateway may keep its old tool list: restart it, or Save & Publish in the Control UI.

```bash
openclaw mcp reload
openclaw mcp doctor spiral --probe
```

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Twelve Data historical prices**: One request; the result comes back by polling or a webhook.

```bash
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>"
    }
  }'
```

Then paste one of the prompts above: OpenClaw finds Twelve Data historical prices on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/openclaw

## Twelve Data historical prices tools and prices

- [Twelve Data · Time series](https://spiral.ai/tools/alexandria/twelvedata/prices/series) (Alexandria): Up to $0.17459 per run.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| dp | -1 to 11 | — | Decimal places from 0 to 11. -1 lets Twelve Data choose. Default -1. |
| date |  | — | One session: YYYY-MM-DD, YYYY-MM-DDTHH:MM:SS, today, or yesterday. |
| figi |  | — | FIGI for one instrument. Twelve Data limits this parameter to Ultra and Enterprise plans. |
| isin |  | — | ISIN for one instrument. Returning ISIN values in the body needs the ISIN add-on. |
| type | 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 |  | — | CUSIP for one instrument. Returning CUSIP values in the body needs the CUSIP add-on. |

## What can you do with Twelve Data historical prices in OpenClaw?

Produce a recurring internal market check for a stock, currency pair, or cryptocurrency using Twelve Data. A scheduled agent can compare successive price observations, summarize session statistics, or calculate changes from historical closes.

### Check an internal stock watchlist

Compare AAPL and MSFT using their latest prices, session snapshots, or recent historical closes. Calculate which moved more over the period represented by the retrieved data.

### Monitor currency exposure

Use EUR/USD prices to estimate the dollar value of a euro-denominated business balance. Choose a latest reading, a session snapshot, or historical closes for a retrospective valuation.

### Flag cryptocurrency price thresholds

Check whether BTC/USD crosses a chosen threshold using the latest price, a quote snapshot, or completed historical bars. Report which observation triggered the flag.

### Value a hypothetical portfolio

Calculate the value of hypothetical AAPL, MSFT, and SPY positions using current prices or historical closes. Show each position's contribution and the observation period used.

### Explain a stock's trading range

Use a quote's session and 52-week metrics to place AAPL's price in context, or calculate ranges from historical bars for a chosen period.

### Build a historical price chart

Plot MSFT's returned OHLC bars and calculate close-to-close returns. Keep calculations tied to the available observations rather than assuming a complete history.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All OpenClaw guides](https://spiral.ai/integrations/openclaw)

## Twelve Data historical prices in other agents

- [Amp](https://spiral.ai/integrations/amp/twelve-data-historical-prices)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/twelve-data-historical-prices)
- [Claude](https://spiral.ai/integrations/claude-desktop/twelve-data-historical-prices)
- [Claude Code](https://spiral.ai/integrations/claude-code/twelve-data-historical-prices)
- [Cline](https://spiral.ai/integrations/cline/twelve-data-historical-prices)
- [Codex](https://spiral.ai/integrations/codex/twelve-data-historical-prices)
- [Cursor](https://spiral.ai/integrations/cursor/twelve-data-historical-prices)
- [Devin](https://spiral.ai/integrations/devin/twelve-data-historical-prices)
- [dots](https://spiral.ai/integrations/dots/twelve-data-historical-prices)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/twelve-data-historical-prices)
- [Gemini](https://spiral.ai/integrations/gemini/twelve-data-historical-prices)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/twelve-data-historical-prices)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/twelve-data-historical-prices)
- [goose](https://spiral.ai/integrations/goose/twelve-data-historical-prices)
- [Grok](https://spiral.ai/integrations/grok/twelve-data-historical-prices)
- [Grok Build](https://spiral.ai/integrations/grok-build/twelve-data-historical-prices)
- [Hermes](https://spiral.ai/integrations/hermes/twelve-data-historical-prices)
- [Instinct](https://spiral.ai/integrations/instinct/twelve-data-historical-prices)
- [Manus](https://spiral.ai/integrations/manus/twelve-data-historical-prices)
- [Muse](https://spiral.ai/integrations/muse/twelve-data-historical-prices)
- [Muse Code](https://spiral.ai/integrations/muse-code/twelve-data-historical-prices)
- [n8n](https://spiral.ai/integrations/n8n/twelve-data-historical-prices)
- [Notion](https://spiral.ai/integrations/notion/twelve-data-historical-prices)
- [opencode](https://spiral.ai/integrations/opencode/twelve-data-historical-prices)
- [Perplexity](https://spiral.ai/integrations/perplexity/twelve-data-historical-prices)
- [Raycast](https://spiral.ai/integrations/raycast/twelve-data-historical-prices)
- [VS Code](https://spiral.ai/integrations/vscode/twelve-data-historical-prices)
- [Windsurf](https://spiral.ai/integrations/windsurf/twelve-data-historical-prices)
- [Zapier](https://spiral.ai/integrations/zapier/twelve-data-historical-prices)

## More OpenClaw guides

- [Treasury reporting exchange rates](https://spiral.ai/integrations/openclaw/treasury-reporting-exchange-rates)
- [Twelve Data latest price](https://spiral.ai/integrations/openclaw/twelve-data-latest-price)
- [Treasury monthly budget summary](https://spiral.ai/integrations/openclaw/treasury-monthly-budget-summary)
- [Twelve Data market quote](https://spiral.ai/integrations/openclaw/twelve-data-market-quote)
- [Treasury buyback security details](https://spiral.ai/integrations/openclaw/treasury-buyback-security-details)
- [Twelve Data symbol search](https://spiral.ai/integrations/openclaw/twelve-data-symbol-search)

## Questions about Twelve Data historical prices in OpenClaw

**Can OpenClaw use Twelve Data historical prices?**

Yes. Add Spiral to OpenClaw as an MCP server, and OpenClaw can find and run Twelve Data historical prices like any built-in tool.

**How much does Twelve Data historical prices cost in OpenClaw?**

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 OpenClaw plan is separate.

**Do I need an Alexandria account to use Twelve Data historical prices in OpenClaw?**

No. Spiral runs Twelve Data 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 Twelve Data historical prices in OpenClaw?**

About two minutes: add the server, then sign in, then reload and check.

**Does OpenClaw wait while Twelve Data historical prices runs?**

Twelve Data historical prices runs in the background. OpenClaw starts the run, checks on it and gives you the json when it's ready.

**Does Twelve Data's US stock feed represent the whole market?**

Its default real-time feed covers listed US equities, but the contributing venues represent approximately 5% of total US trading volume. OTC securities require separate licensing.

**When is US end-of-day data available?**

Twelve Data says US historical and end-of-day data becomes available after midnight Eastern Time on the next trading day following market close.

**How much historical data does Twelve Data provide?**

Daily equity history can extend to the first trading date, while intraday history typically spans months to years depending on the instrument. Historical requests return at most 5,000 data points each.

**Why can Twelve Data prices differ from another chart?**

Twelve Data derives intraday bars from tick-level data and says aggregation differences can produce different values across sources and brokers. Its default US real-time feed also represents approximately 5% of trading volume.

**Can I redistribute Twelve Data prices to customers?**

Twelve Data's terms require express authorization through redistribution rights or a separate written agreement for external display or redistribution. Receiving prices does not itself grant publication rights.

