Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Real-time and historical stock and forex market data via Twelve Data API: quotes, OHLCV time series, and symbol search.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
__init__.py
1"""2Twelve Data Extension - Stocks and Forex Market Data34Provides stocks and forex market data including:5- Real-time quotes (with pre/post-market support)6- Historical time series (OHLCV)7- Reference data (stocks, forex pairs, exchanges)8- Search910Environment Variables Required:11- TWELVEDATA_API_KEY: Twelve Data Pro API key12"""13import os14import sys15import logging16from typing import List1718logger = logging.getLogger(__name__)1920# Add local tools directory to path for imports21TOOLS_DIR = os.path.join(os.path.dirname(__file__), 'tools')22if TOOLS_DIR not in sys.path:23sys.path.insert(0, TOOLS_DIR)242526def register(api) -> List[str]:27"""Extension entry point - register all Twelve Data tools."""28registered = []2930try:31from .tools.time_series import (32TwelveDataTimeSeriesTools,33TwelveDataPriceTool,34TwelveDataEODTool,35)36from .tools.quote import (37TwelveDataQuoteTool,38TwelveDataQuoteBatchTool,39TwelveDataPriceBatchTool,40)41from .tools.reference_data import (42TwelveDataSearchTool,43TwelveDataStocksTool,44TwelveDataForexPairsTool,45TwelveDataExchangesTool,46)4748tools = [49TwelveDataTimeSeriesTools(),50TwelveDataPriceTool(),51TwelveDataEODTool(),52TwelveDataQuoteTool(),53TwelveDataQuoteBatchTool(),54TwelveDataPriceBatchTool(),55TwelveDataSearchTool(),56TwelveDataStocksTool(),57TwelveDataForexPairsTool(),58TwelveDataExchangesTool(),59]6061for tool in tools:62api.register_tool(tool)63registered.append(tool.name)6465logger.info(f"Registered {len(registered)} Twelve Data tools (Pro tier)")66except Exception as e:67logger.warning(f"Failed to load Twelve Data tools: {e}")6869return registered707172EXTENSION_INFO = {73"name": "twelvedata",74"version": "1.1.0",75"description": "Twelve Data stocks and forex market data tools (with pre/post-market support)",76}77