Twelve Data
Market data for AI agents from Twelve Data: real-time quotes and prices, historical time series, exchange rates and currency conversion, symbol search, stock, forex and crypto lists, exchanges and market hours, and RSI, MACD, SMA, EMA and Bollinger Bands. 19 read-only tools, API key.
7 天免费 · 无需信用卡 · EU 托管
问 Twelve 任何事
通过 AnythingMCP 对 Twelve Data 试一个真实提示 — Claude 调用工具并返回答案。在你的消息上按 Enter 即可在 Cloud 安装。
在 Cloud 上安装 TwelveClaude 是 AI,可能会出错。请核对回答。
2 分钟设置
- 1在 cloud.anythingmcp.com 开始免费试用。
- 2在连接器商店点击 Twelve Data。提示时粘贴凭据。
- 3生成 MCP API 密钥,将 AI 客户端指向生成的 MCP URL。
配置 Twelve Data
直接来自连接器定义:在哪里获取凭据、需要哪些权限,以及该适配器调用的是哪个 API。 由连接器作者以英文提供。
This connector uses the Twelve Data REST API (https://api.twelvedata.com) for market data on stocks, ETFs, forex and cryptocurrencies. All tools only read.
Setup:
- Create a free account at https://twelvedata.com and open the dashboard's API Keys page.
- Copy the key into
TWELVE_DATA_API_KEY. It is sent in theAuthorization: apikey <key>header, as Twelve Data recommends, so it never appears in a URL or a log.
Plans and limits: the free Basic plan allows 8 API credits per minute and 800 per day. Most tools cost 1 credit per symbol and call; reference lists (stocks, forex pairs, exchanges, symbol search, market state, earliest timestamp, API usage) cost 1 credit per call. Going over returns HTTP 429; wait for the next minute. Free plans cover US equities, forex and crypto; many non-US exchanges, fundamentals and some data need a paid plan and answer 403 otherwise. twelve_data_get_api_usage shows the usage of the last minute and of the day against the plan limits.
Where to start: resolve a name into a symbol with twelve_data_search_symbols (for example Siemens -> SIE on XETR). Then twelve_data_get_price for a number, twelve_data_get_quote for change, volume and 52-week range, or twelve_data_get_time_series for history. For currencies use twelve_data_get_exchange_rate or twelve_data_convert_currency with a pair such as EUR/USD.
Symbols: stocks use the ticker (AAPL); when a ticker is listed on several exchanges pass exchange (name or MIC). Forex and crypto pairs use a slash: EUR/USD, BTC/USD, ETH/BTC.
Time series and indicators: interval is one of 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 8h, 1day, 1week, 1month. outputsize is 1 to 5000 data points (the tools default to 30). With start_date and end_date the API returns all points in that range. Values come newest first unless order is asc. Datetimes are in the exchange's timezone unless timezone is set (UTC for forex and crypto). Prices are strings in the JSON; convert before computing. Indicators here default to the close price.
Errors: errors come back as {"code": 400, "message": "...", "status": "error"} with the same HTTP status: 400 bad parameter (the message lists valid values), 401 bad key, 403 plan does not include the data, 404 no data for the parameters or a symbol outside the plan ("This symbol is available starting with the Grow plan"), 429 credits exhausted.
Indices and CFDs: index symbols such as NDX (Nasdaq-100) or SPX need a paid plan, and broker CFD names such as NAS100, US100 or US30 are not Twelve Data symbols at all. On the Basic plan use an ETF that tracks the index instead (QQQ for the Nasdaq-100, SPY for the S&P 500, DIA for the Dow Jones) and say so in the answer. When unsure, call twelve_data_search_symbols with show_plan true, which tells for each match which plan it needs.
Demo key: Twelve Data documents the key demo for trying a few symbols (for example AAPL, EUR/USD, BTC/USD); it is not meant for real use.