Built into AlgoGP (data) Pro

How to get a Twelve Data API key

Twelve Data creates an API key when you register on the free Basic plan. It lives on the API Keys page of your account.

About 5 minutes 4 steps Checked October 2026

Before you start

  • An email address (no card for the free plan)

Create your Twelve Data API key

  1. 1

    Register

    Sign up at twelvedata.com/register and confirm your email.

  2. 2

    Open API Keys

    In the dashboard open API Keys (twelvedata.com/account/api-keys).

  3. 3

    Reveal and copy

    Reveal the key and copy it. Save it as TWELVE_DATA_API_KEY.

  4. 4

    Regenerate if needed

    Use Regenerate on the same page if the key is exposed; update every place it is stored.

Test the key

Before wiring the key into a strategy, make one request by hand. It separates “the key is wrong” from “my code is wrong”.

curl -s "https://api.twelvedata.com/time_series?symbol=AAPL&interval=1day&outputsize=5&apikey=$TWELVE_DATA_API_KEY"
"status":"ok" with five values means the key works; code: 401 means it does not.

Add the key to your AlgoGP project

  1. 1

    Open your project’s APIs & keys tab

    Open the strategy project, select APIs & keys, and under Platforms choose Twelve Data (Pro).

  2. 2

    Paste each value

    Paste the values into TWELVE_DATA_API_KEY and click Save. Values are encrypted at rest, never shown again and never written into code or exports.

  3. 3

    Run locally with the same names

    Exported projects read the same names from .env (copy .env.example). Keep .env out of version control.

TWELVE_DATA_API_KEY=paste-your-value-here
.env for local runs

Troubleshooting

code: 429
Over 8 requests per minute or 800 per day on the free plan.
code: 404 symbol not found
Check spelling (EUR/USD, not EURUSD) or add exchange=.
code: 403
The symbol or endpoint requires a higher plan.

Frequently asked questions

Can I send the Twelve Data key in a header?

Yes: Authorization: apikey YOUR_KEY keeps it out of URLs and logs.

Turn Twelve Data data into a tested strategy

Backtest an idea in the browser, then export Python whose live loop reads candles straight from Twelve Data with your own key.

  • Generated Twelve Data candle fetcher, closed bars only
  • An AI copilot that writes and revises the rules
  • Pair it with Alpaca, Binance, OANDA or another broker

Free plan, no card required. Twelve Data is included with Pro.

How the Twelve Data API works

AlgoGP is not affiliated with Twelve Data. Menus get renamed from time to time; if a label differs, the official documentation has the current path.