# 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/workflows/twelve-data
- Handle: `@twelve-data`
- Category: [Finance](https://fous.com/workflows/category/finance)
- Source website: https://twelvedata.com
- Last verified: Sep 29, 2026
- Fous is not affiliated with Twelve Data.

## Methods

### Get quote

Operation `get_quote`, version 1. 1 credit per call.

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

Call the API with a Fous API key (`FOUS_API_KEY`). To create one, turn on Developer mode in Fous Studio, then open Keys & connections → API keys (https://app.fous.com/keys).

```bash
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
: "${FOUS_API_KEY:?Set FOUS_API_KEY before running this example}"

curl 'https://api.fous.com/v1/query' \
  --fail-with-body --silent --show-error --max-time 120 \
  -H "Authorization: Bearer $FOUS_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.
# First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
import json
import os
import urllib.error
import urllib.request

api_key = os.environ.get("FOUS_API_KEY")
if not api_key:
    raise RuntimeError("Set FOUS_API_KEY before running this example")

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=120) 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.
// First set your key: export FOUS_API_KEY='YOUR_FOUS_API_KEY'
const apiKey = process.env.FOUS_API_KEY;
if (!apiKey) throw new Error("Set FOUS_API_KEY before running this example");

const response = await fetch("https://api.fous.com/v1/query", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  signal: AbortSignal.timeout(120_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);
```

Or describe the data in plain language: send `{"api":"@twelve-data","prompt":"Describe the data you need, with every detail"}` to the same URL. Fous fills in the input, runs the method that fits and returns only the fields you asked for; `data.route.calls[].request` is the exact call it made. Routing is free; the run costs the same.

## 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

### Is Fous affiliated with Twelve Data?

No. Fous is not affiliated with Twelve Data. This workflow reads the public twelvedata.com website and returns its data.

### How much does it cost?

Each run costs 1 credit. With pay-as-you-go, a credit costs 1¢; monthly plans cost less per credit.

### Do I need a Twelve Data account?

No. You only need a Fous account.

### How current is the data?

Fous gets the data from twelvedata.com when you run it; repeating the same request within a day may return the saved result. Fous checks this workflow automatically; it last passed a check 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/workflows/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/workflows/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/workflows/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/workflows/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/workflows/kraken.md): Live cryptocurrency market prices and trading statistics from Kraken.
- [Macrotrends API](https://fous.com/workflows/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/workflows/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/workflows/kitco.md): Precious metals spot prices and market coverage.
- [All Finance workflows](https://fous.com/workflows/category/finance)
