# Twelve Data API

> Twelve Data returns stock, ETF, forex, and crypto quotes as a workflow and API.

Twelve Data returns the latest quote for a stock, ETF, forex pair, or cryptocurrency through Get quote; provide a ticker or currency pair. Get quote returns price and change details, and may include reported volume, quote currency, and exchange.

- Page: https://fous.com/tools/twelve-data
- Handle: `@twelve-data`
- Category: [Finance](https://fous.com/tools/category/finance)
- Source website: https://twelvedata.com
- Last verified: Sep 29, 2026

## Methods

### Get quote

Operation `get_quote`, version 1. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.

Get the latest stock, ETF, forex or crypto quote for a symbol. Some instruments do not report currency or volume; the demo key covers only a few symbols.

Needs your own Twelve Data API key. Until it is added in Fous Studio, a call returns 409 `access_required`.

**Input**

| Field | Type | Required | Example | Description |
|---|---|---|---|---|
| `symbol` | string | yes |  | Ticker or currency pair to quote, for example AAPL or EUR/USD. |

**Input schema**

```json
{
  "type": "object",
  "required": [
    "symbol"
  ],
  "properties": {
    "symbol": {
      "type": "string",
      "description": "Ticker or currency pair to quote, for example AAPL or EUR/USD."
    }
  },
  "additionalProperties": false
}
```

**Output**

| Field | Type | Example | Description |
|---|---|---|---|
| `low` | number or null |  |  |
| `date` | string or null |  | Date of the quoted market period. |
| `high` | number or null |  |  |
| `name` | string or null |  | Instrument name. |
| `open` | number or null |  |  |
| `close` | number or null |  |  |
| `change` | number or null |  |  |
| `symbol` | string |  | Quoted ticker or pair. |
| `volume` | number or null |  | Volume when reported. |
| `currency` | string or null |  | Quote currency when reported. |
| `exchange` | string or null |  | Trading exchange or market. |
| `page_link` | string or null |  | Public Twelve Data market page when available. |
| `percent_change` | number or null |  | Change in percent. |
| `previous_close` | number or null |  |  |

## Quick start

Replace `YOUR_API_KEY` with a Fous API key. To create one, open Developers at the bottom of Fous Studio, turn on Developer mode, then go to API keys (https://app.fous.com/keys). Change the values in `input` to run the same tool on new data.

```bash
curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 180 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "api": "@twelve-data",
  "visibility": "public",
  "operation": "get_quote",
  "version": 1,
  "input": {
    "symbol": ""
  },
  "response": {
    "format": "json"
  }
}'
```

```python
# Save as fous.py and run with python3 fous.py. No packages needed.
import json
import urllib.error
import urllib.request

api_key = "YOUR_API_KEY"

body = json.loads("{\n  \"api\": \"@twelve-data\",\n  \"visibility\": \"public\",\n  \"operation\": \"get_quote\",\n  \"version\": 1,\n  \"input\": {\n    \"symbol\": \"\"\n  },\n  \"response\": {\n    \"format\": \"json\"\n  }\n}")
request = urllib.request.Request(
    "https://api.fous.com/v1/query",
    data=json.dumps(body).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urllib.request.urlopen(request, timeout=180) as response:
        result = json.load(response)
except urllib.error.HTTPError as error:
    raise RuntimeError(f"HTTP {error.code}: {error.read().decode('utf-8', errors='replace')}") from error
if result.get("success") is False:
    raise RuntimeError(result.get("error", {}).get("message", "Request failed"))
print(json.dumps(result["data"]["output"], indent=2))
```

```typescript
// Save as fous.mts and run with npx tsx fous.mts.
const apiKey = "YOUR_API_KEY";

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(180_000),
  body: JSON.stringify({
  "api": "@twelve-data",
  "visibility": "public",
  "operation": "get_quote",
  "version": 1,
  "input": {
    "symbol": ""
  },
  "response": {
    "format": "json"
  }
}),
});
type ApiResult = { success: boolean; data?: { output: unknown }; error?: { message: string } };
const result: ApiResult = await response.json();
if (!response.ok || result.success === false) {
  throw new Error(result.error?.message ?? `HTTP ${response.status}`);
}
if (!result.data) throw new Error("Missing API response data");
console.log(result.data.output);
```

## Use from an AI assistant

Connect this tool to Claude Code, Claude Desktop, Cursor, VS Code, Codex and any MCP client as its own MCP server. Each method is a typed tool whose arguments are the method’s input.

- Server URL: `https://api.fous.com/mcp/tools/twelve-data`
- Authorization: `Authorization: Bearer <Fous API key>`

**Tools**

- `get_quote`: Get quote. 1 credit per completed call. Failed calls without a completed billing receipt are free; completed work can remain charged if delivery is interrupted.
- `fous_get_run`: the result of a run that was still going, by its `request_id`. Free.

Claude Code:

```bash
claude mcp add --scope user --transport http fous-twelve-data https://api.fous.com/mcp/tools/twelve-data --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"
```

To give the assistant every tool, connect `https://api.fous.com/mcp`: it finds one with `fous_search_tools` and runs it with `fous_run_tool`. Setup for other clients: https://fous.com/llms-full.txt.

## Use cases

- Compare the latest prices of selected stocks
- Track price changes across ETFs
- Review forex pair quotes
- Monitor cryptocurrency quotes
- Check reported trading volume and quote currency

## FAQ

### Can I run it with my own inputs?

Yes. Change the inputs in Studio and press Run, or send new inputs from your code, or ask a connected AI assistant.

### Can I call this Twelve Data tool as an API?

Yes. Send a POST request to /v1/query with your Fous API key and the inputs, and get JSON back.

### How much does it cost?

Each completed run costs 1 credit. Failed runs without a completed receipt are free; completed work can remain charged if delivery is interrupted. With pay as you go, a credit costs 1¢. Monthly plans cost less per credit.

### Do I need a Twelve Data account?

Some actions do. They run with your own account or key, never anyone else’s. Add it once in Studio.

### How current is the data?

Fous gets the data from twelvedata.com when you run it. Some results are reused for up to 24 hours, and results that use your account or key are never reused. It was last verified on Sep 29, 2026.

### What is the latest quote for a symbol?

Use Get quote with a ticker or currency pair to retrieve its latest quote.

### What are the high and low prices?

Get quote returns the high and low for the quoted market period.

### How much has a symbol changed?

Get quote returns the change and percent change, along with the previous close.

## Related

- [Yahoo Finance API](https://fous.com/tools/yahoo-finance.md): Yahoo Finance provides quotes, movers, company financials, analyst ratings, earnings, news, and up to 5,000 price rows with adjusted returns; prices may be delayed.
- [MSN Money API](https://fous.com/tools/msn-money.md): MSN Money provides stock quotes, key facts, financial news, and market data, including current market movers; quotes and prices may be delayed.
- [Stock Analysis API](https://fous.com/tools/stock-analysis.md): Stock Analysis returns free-period company statements, statistics current as of its displayed date, typically top-25 ETF holdings, and US IPOs since 2019 with potentially missing prices or returns.
- [Google Finance API](https://fous.com/tools/google-finance.md): Google Finance returns possibly delayed prices and figures, indexes, up to four movers timed by oldest quote, currency conversions, and up to five financial periods.
- [Kraken API](https://fous.com/tools/kraken.md): Live cryptocurrency market prices and trading statistics from Kraken.
- [Macrotrends API](https://fous.com/tools/macrotrends.md): Macrotrends provides long-term financial and economic charts, company metric histories, and yearly commodity and index prices; current-year prices may be incomplete.
- [Investing.com API](https://fous.com/tools/investing-com.md): Investing.com provides financial markets data and news, economic releases up to 31 days, and current commodity prices and government bond yields, which may be delayed or indicative.
- [Kitco API](https://fous.com/tools/kitco.md): Precious metals spot prices and market coverage.
- [All Finance tools](https://fous.com/tools/category/finance)
