twelve-data

Use Twelve Data REST/WebSocket APIs for market quotes, latest prices, historical time series, symbol discovery, and technical indicators. Trigger when users need live or historical multi-asset market data.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "twelve-data" with this command: npx skills add softtrymee/twelve-data

Twelve Data

This skill provides practical request patterns for Twelve Data based on official docs.

Official docs:

Base URLs

  • REST API: https://api.twelvedata.com
  • WebSocket: wss://ws.twelvedata.com

Authentication

Twelve Data supports two auth methods:

  1. Query parameter
curl "https://api.twelvedata.com/price?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"
  1. HTTP header (recommended by docs)
curl -H "Authorization: apikey ${TWELVEDATA_API_KEY}" \
  "https://api.twelvedata.com/price?symbol=AAPL"

Notes:

  • apikey=demo can be used for limited trial/demo requests.
  • Premium endpoints require higher-tier plans.

Quick Setup

Configure in OpenClaw:

{
  skills: {
    entries: {
      "twelve-data": {
        enabled: true,
        apiKey: "your-twelvedata-api-key",
        env: {
          TWELVEDATA_API_KEY: "your-twelvedata-api-key"
        }
      }
    }
  }
}

Or in ~/.openclaw/.env:

TWELVEDATA_API_KEY=your-api-key-here

Core Endpoints (Practical)

1) Latest price (/price, 1 credit/symbol)

curl "https://api.twelvedata.com/price?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"

2) Real-time quote (/quote, 1 credit/symbol)

curl "https://api.twelvedata.com/quote?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"

3) Historical OHLCV (/time_series, 1 credit/symbol)

curl "https://api.twelvedata.com/time_series?symbol=AAPL&interval=1day&outputsize=100&apikey=${TWELVEDATA_API_KEY}"

Common interval values: 1min, 5min, 15min, 30min, 1h, 2h, 4h, 1day, 1week, 1month

Useful params:

  • outputsize=1..5000
  • start_date=YYYY-MM-DD or datetime
  • end_date=YYYY-MM-DD or datetime
  • timezone=Exchange|UTC|IANA_TZ
  • format=JSON|CSV

4) Symbol discovery (/symbol_search, 1 credit/request)

curl "https://api.twelvedata.com/symbol_search?symbol=apple&apikey=${TWELVEDATA_API_KEY}"

5) Technical indicators (typically 1 credit/symbol)

RSI:

curl "https://api.twelvedata.com/rsi?symbol=AAPL&interval=1day&time_period=14&series_type=close&apikey=${TWELVEDATA_API_KEY}"

MACD:

curl "https://api.twelvedata.com/macd?symbol=AAPL&interval=1day&series_type=close&apikey=${TWELVEDATA_API_KEY}"

6) Fundamentals (plan-gated, higher credits)

Earnings (/earnings, Grow+):

curl "https://api.twelvedata.com/earnings?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"

Statistics (/statistics, Pro+):

curl "https://api.twelvedata.com/statistics?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"

Income statement (/income_statement, Pro+):

curl "https://api.twelvedata.com/income_statement?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"

Balance sheet (/balance_sheet, Pro+):

curl "https://api.twelvedata.com/balance_sheet?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"

Cash flow (/cash_flow, Pro+):

curl "https://api.twelvedata.com/cash_flow?symbol=AAPL&apikey=${TWELVEDATA_API_KEY}"

Dividends:

curl "https://api.twelvedata.com/dividends?symbol=AAPL&start_date=1970-01-01&apikey=${TWELVEDATA_API_KEY}"

Batch and Multi-Asset Examples

Batch symbols on supported endpoints:

curl "https://api.twelvedata.com/time_series?symbol=AAPL,EUR/USD,ETH/BTC:Huobi&interval=1min&apikey=${TWELVEDATA_API_KEY}"

Asset symbol patterns:

  • Stocks: AAPL
  • Forex: EUR/USD
  • Crypto: BTC/USD or exchange-scoped pair like ETH/BTC:Huobi

WebSocket (Streaming)

Connect:

wss://ws.twelvedata.com/v1/quotes/price?apikey=YOUR_API_KEY

Subscribe message:

{
  "action": "subscribe",
  "params": {
    "symbols": "AAPL,MSFT"
  }
}

Reliability Guidance

  • Always handle null values in responses.
  • Implement retry/backoff for transient failures and 429 rate limits.
  • Cache frequent reads to reduce credit usage.
  • Check your current credit/rate limits in Twelve Data dashboard (plan-dependent).

Skill Usage Workflow

When user asks for market data analysis:

  1. Resolve symbol with /symbol_search if ambiguous.
  2. Pull latest context with /price or /quote.
  3. Pull history with /time_series for selected interval/date range.
  4. Add indicators (/rsi, /macd, etc.) if technical analysis is requested.
  5. Add fundamentals endpoints only when user asks for financial statements or valuation context.
  6. Report endpoint, parameters, and plan limits clearly in output.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Cclaw

Open-source comedy AI + video editing + poster generation. Create standup/sketch/manzai/scripts, edit videos via FFmpeg, and generate comedy posters via canv...

Registry SourceRecently Updated
General

Dlazy Seedance 1.5 Pro

Convert images into dynamic dance videos using Doubao Seedance 1.5 Pro.

Registry SourceRecently Updated
General

Pod Template Pack

Use when user needs ready-to-use POD (Print on Demand) design keywords, title templates, and listing copy. Use when creating POD product listings for TikTok,...

Registry SourceRecently Updated
General

Dlazy Mj.Imagine

Generate artistic images using Midjourney (MJ) model. Supports text-to-image.

Registry SourceRecently Updated