
Twelvedata
Wire Twelve Data Pro quotes, OHLCV history, and reference lookups into an AI agent extension for stocks and forex research.
Overview
Twelve Data is an agent skill for the Build phase that registers Pro API tools for stock and forex quotes, historical series, and reference data inside an agent extension.
Install
npx skills add https://github.com/starchild-ai-agent/official-skills --skill twelvedataWhat is this skill?
- Registers time series, spot price, and end-of-day tools for OHLCV history
- Exposes real-time and batch quote tools with pre/post-market support
- Provides reference tools for stocks, forex pairs, exchanges, and symbol search
- Extension entry point register(api) bundles all Twelve Data tools for the host agent runtime
- Requires TWELVEDATA_API_KEY environment variable for Pro API access
Adoption & trust: 6.4k installs on skills.sh; 13 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are building a finance-aware agent but lack a maintained bundle of quote, history, and symbol tools for Twelve Data.
Who is it for?
Indie builders creating market-research agents, dashboards, or CLI workflows that need live and historical stocks/forex data.
Skip if: Production trade execution, brokerage compliance stacks, or teams without a Twelve Data Pro key and budget.
When should I use this skill?
User needs stocks/forex quotes, historical OHLCV, EOD, symbol search, or exchange reference data via Twelve Data in an agent extension.
What do I get? / Deliverables
Your agent runtime exposes registered Twelve Data tools for quotes, OHLCV, EOD, search, and reference endpoints using your API key.
- Registered quote, batch, time series, and reference tools
- Configurable symbol search and exchange listings
- OHLCV and EOD historical fetch tools
Recommended Skills
Journey fit
Market data tools are integrated while building the product’s agent tooling and backend-connected features. Registers batch quote, time series, EOD, search, and exchange tools against an external API—classic integrations subphase work.
How it compares
Agent extension integration for Twelve Data REST tools, not a standalone charting app or MCP-only market feed.
Common Questions / FAQ
Who is twelvedata for?
Developers wiring Starchild-compatible or similar Python agent extensions who need stocks and forex data tools with batch and historical coverage.
When should I use twelvedata?
During build integrations when you add market quote, time series, or symbol search capabilities to an agent or internal finance assistant.
Is twelvedata safe to install?
The skill calls external APIs with your API key—treat TWELVEDATA_API_KEY as a secret and review the Security Audits panel on this Prism page before install.
SKILL.md
READMESKILL.md - Twelvedata
""" Twelve Data Extension - Stocks and Forex Market Data Provides stocks and forex market data including: - Real-time quotes (with pre/post-market support) - Historical time series (OHLCV) - Reference data (stocks, forex pairs, exchanges) - Search Environment Variables Required: - TWELVEDATA_API_KEY: Twelve Data Pro API key """ import os import sys import logging from typing import List logger = logging.getLogger(__name__) # Add local tools directory to path for imports TOOLS_DIR = os.path.join(os.path.dirname(__file__), 'tools') if TOOLS_DIR not in sys.path: sys.path.insert(0, TOOLS_DIR) def register(api) -> List[str]: """Extension entry point - register all Twelve Data tools.""" registered = [] try: from .tools.time_series import ( TwelveDataTimeSeriesTools, TwelveDataPriceTool, TwelveDataEODTool, ) from .tools.quote import ( TwelveDataQuoteTool, TwelveDataQuoteBatchTool, TwelveDataPriceBatchTool, ) from .tools.reference_data import ( TwelveDataSearchTool, TwelveDataStocksTool, TwelveDataForexPairsTool, TwelveDataExchangesTool, ) tools = [ TwelveDataTimeSeriesTools(), TwelveDataPriceTool(), TwelveDataEODTool(), TwelveDataQuoteTool(), TwelveDataQuoteBatchTool(), TwelveDataPriceBatchTool(), TwelveDataSearchTool(), TwelveDataStocksTool(), TwelveDataForexPairsTool(), TwelveDataExchangesTool(), ] for tool in tools: api.register_tool(tool) registered.append(tool.name) logger.info(f"Registered {len(registered)} Twelve Data tools (Pro tier)") except Exception as e: logger.warning(f"Failed to load Twelve Data tools: {e}") return registered EXTENSION_INFO = { "name": "twelvedata", "version": "1.1.0", "description": "Twelve Data stocks and forex market data tools (with pre/post-market support)", } """ TwelveData skill exports — script-mode skill. Usage from a bash block: python3 - <<'EOF' import sys sys.path.insert(0, "/data/workspace/skills/twelvedata") from exports import twelvedata_price, twelvedata_time_series print(twelvedata_price(symbol="AAPL")) EOF Imports from sidecar.proxy_client (NOT core.http_client) so this skill stays runnable without the agent platform's core/* modules on PYTHONPATH. """ import os # Make sidecar/ importable when the script is invoked directly via # `python3 -c` from the agent's bash tool. /app is already on PYTHONPATH # inside the container (set by entrypoint.sh), so `from sidecar...` works # in production. The fallback covers local-dev runs from outside /app. try: from sidecar.proxy_client import proxied_get except ImportError: # Local dev / running outside the deployed image: fall back to # core.http_client which is identical. Skill still works either way. from core.http_client import proxied_get API_KEY = os.environ.get("TWELVEDATA_API_KEY", "") BASE = "https://api.twelvedata.com" def _explain_error(code, body): """Map a TwelveData error code to a short, actionable message. Never echoes the raw JSON body back to the agent (issue #243).""" code = str(code) msg = "" if isinstance(body, dict): msg = str(body.get("message", "")).strip() if code == "404": return ( "Symbol not found in TwelveData. Check the spelling, or use " "twelvedata_search to find the correct ticker." ) if code == "401": return "TwelveData API key is invalid or missing (TWELVEDATA_API_KEY)." if code == "429": return "TwelveData rate limit hit. Wait before retrying." # Generic: include the upstream message text only (not the full JSON). return f"TwelveData API error {code}" + (f": {msg}" if ms