Twelve data API

Give your agents access to Twelve data API. Bring your own Twelve data key, or skip the signup and pay per call from your Composio balance with Composio Instant.

Twelve data logoTwelve data
Instant

Twelve Data is a financial data API providing real-time and historical market data for stocks, forex, crypto, ETFs, and indices. It helps you access accurate, up-to-date financial information for analysis and automation.

100 Tools
COMPOSIO INSTANT

What is Composio Instant?

Composio Instant lets your agent use paid APIs like Twelve data without a separate account or API key for each one. New accounts start with $2 of free credit.

No Twelve data account or key

Your agent calls Twelve data through Composio, so there is nothing to sign up for, store, or rotate.

Pay per call, at cost

$0.001 per 100 requests, charged per symbol requested, paid from your Composio balance with zero markup.

Works in any agent

Claude, ChatGPT, Cursor, and other MCP clients, or your own code with the Composio SDK.

Works with your apps

Use Twelve data with Gmail, Slack, Google Sheets, and 1,700+ other apps you connect.

AI ASSISTANTS

Connect the Twelve data API to your AI assistant

Use Twelve data from the AI assistant you already work in. Connect Composio once, then paste the prompt.

  1. 1

    Open the Connectors menu

    Use the button to open Claude's Add connector dialog with Composio filled in. Or click + in the message box, then Connectors, Add connector and Add custom connector.
    Add Composio to Claude
  2. 2

    Add the Composio MCP server

    Name it Composio, paste the MCP server URL and click Add.
    https://connect.composio.dev/mcp
  3. 3

    Authorize in your browser

    A browser window opens. Sign in to Composio to approve the connection.
  4. 4

    Paste the prompt

    Start a new chat and paste the prompt. Claude runs the call on Composio Instant.
  1. 1

    Install the Composio plugin

    Open Composio's plugin page in ChatGPT and click Install. Sign in to ChatGPT first if it asks.
    Install in ChatGPT
  2. 2

    Authorize in your browser

    Connect the plugin, then sign in to Composio to approve the connection.
  3. 3

    Turn on Composio in your chat

    In a new chat, click +, then More, and select Composio.
  4. 4

    Paste the prompt

    Paste the prompt into that chat. ChatGPT runs the call on Composio Instant.
  1. 1

    Install the Composio plugin

    Open Composio in the Cursor marketplace, click Install Composio Plugin for Cursor and approve the connection in your browser.
    Install in Cursor
  2. 2

    Paste the prompt

    Open the Agent chat and paste the prompt. Cursor runs the call on Composio Instant.
  1. 1

    Add the Composio plugin

    Open Composio's listing on x.ai and click Add to Grok Bot. When Grok Bot opens the plugin, click Add.
    Add to Grok Bot
  2. 2

    Authenticate

    Go to Installed, open Composio and click Authenticate. Sign in to Composio and click Authorize.
  3. 3

    Paste the prompt

    Paste the prompt into your bot's chat. Grok Bot runs the call on Composio Instant.
  1. 1

    Paste the setup prompt

    Copy this into your Hermes chat. Hermes adds the Composio MCP server for you.
    Set up Composio from composio.dev/hermes
  2. 2

    Authorize in your browser

    A browser window opens. Sign in to Composio to approve the connection.
  3. 3

    Paste the prompt

    Start a new chat and paste the prompt. Hermes runs the call on Composio Instant.
ClaudeNew chat

Paste this prompt

Use Twelve Data through Composio Instant to get the latest quote for AAPL. Return its OHLC values, volume, change, market-open status, and 52-week range.

What success looks like

TWELVE_DATA_GET_QUOTE

Your assistant runs Twelve Data and replies with AAPL's latest quote, including OHLC values, volume, change, market-open status, and 52-week range.

Runs on Composio Instant
SDK

Use the Twelve data API in your code

Call Twelve data from your own agent with the Composio SDK. Four steps and one tool call.

  1. 1

    Set up Composio

    Turn on Instant Toolkits in your project settings and check your prepaid balance in Billing. Then set your API key.
    export COMPOSIO_API_KEY="your_composio_api_key"
  2. 2

    Install the SDK

    The Python SDK needs Python 3.11 through 3.15.
    pip install composio
  3. 3

    Run the call

    Create a session that keeps Instant to this toolkit and reports the charge, then run the tool on the Instant account.
    TWELVE_DATA_GET_QUOTE
  4. 4

    Read the response

    When the call runs on Instant, the response includes its charge: the amount as an exact USD decimal string, the currency and charged_by.
agent.py
from composio import Composio

composio = Composio()

session = composio.sessions.create(
    user_id="user_123",
    toolkits=["twelve_data"],
    instant={
        "toolkits": {"enable": ["twelve_data"]},
        "return_instant_charge": True,
    },
)

result = session.execute(
    "TWELVE_DATA_GET_QUOTE",
    arguments={
        "symbol": "AAPL",
    },
    account="instant_account",
)
print(result)
print("Instant charge:", result.instant_charge)
TOOLS

Available Twelve data API tools

71 Twelve data tools run on Instant, priced per call with no Twelve data key. Tools marked Your key need your own Twelve data account.

ActionTool slugWhat it doesAvailability
Get QuoteTWELVE_DATA_GET_QUOTERetrieve the latest quote, including price, volume, change, and market status.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Price HistoryTWELVE_DATA_GET_TIME_SERIESRetrieve a bounded OHLCV history for a symbol and interval.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Find SymbolsTWELVE_DATA_SEARCH_SYMBOLSFind tradable symbols and exchange IDs by ticker or name.
Instant$0.001 per 100 requests79% off
Get Batch QuotesTWELVE_DATA_BATCH_GET_QUOTESFetch quotes for 1 to 8 symbols in one request.
Instant$0.001 per 100 requested symbols79% off
Convert CurrencyTWELVE_DATA_CONVERT_CURRENCYConvert an amount from the base to the quote currency using a current or historical forex or cryptocurrency rate.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Correlation CoefficientTWELVE_DATA_CORRELTool to fetch Pearson correlation coefficient between two series over a period.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Cross ListingsTWELVE_DATA_CROSS_LISTINGSTool to retrieve cross-listed symbols for a security across multiple exchanges.
Instant$0.001 per 100 API credits79% off
Currency ConversionTWELVE_DATA_CURRENCY_CONVERSION
Instant$0.001 per 100 requests79% off
DividendsTWELVE_DATA_DIVIDENDSRetrieve dividend history for a specified symbol, optionally over a selected date range.
Instant$0.001 per 100 API credits79% off
EarningsTWELVE_DATA_EARNINGSTool to retrieve earnings data including EPS estimates and actuals.
Instant$0.001 per 100 API credits79% off
ETFS DirectoryTWELVE_DATA_ETFS_DIRECTORYTool to fetch a daily updated list of exchange-traded funds sorted by total assets.
Instant$0.001 per 100 requests79% off
ETFS FamilyTWELVE_DATA_ETFS_FAMILYRetrieve ETF family names grouped by country, optionally filtered by family name.
Instant$0.001 per 100 requests79% off
Get AD IndicatorTWELVE_DATA_GET_ADTool to retrieve Accumulation/Distribution (AD) indicator data for a financial instrument.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get APO (Absolute Price Oscillator)TWELVE_DATA_GET_APOTool to calculate the Absolute Price Oscillator (APO) for a financial instrument.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Aroon IndicatorTWELVE_DATA_GET_AROONTool to retrieve Aroon Indicator data for identifying market trends.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Bollinger BandsTWELVE_DATA_GET_BBANDSRetrieve Bollinger Bands for a financial instrument, including upper, middle, and lower bands, to assess market volatility and potential price reversals.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get CCITWELVE_DATA_GET_CCITool to retrieve Commodity Channel Index (CCI) values for a specified security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Ceiling (CEIL)TWELVE_DATA_GET_CEILTool to retrieve the Ceiling (CEIL) transformation for a time series.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Chande Momentum OscillatorTWELVE_DATA_GET_CMOTool to retrieve Chande Momentum Oscillator (CMO) data for a security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Detrended Price OscillatorTWELVE_DATA_GET_DPOTool to calculate the Detrended Price Oscillator (DPO) for a specified financial instrument.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Earliest TimestampTWELVE_DATA_GET_EARLIEST_TIMESTAMPTool to return the first available timestamp for a symbol and interval.
Instant$0.001 per 100 requests79% off
Get End of Day PriceTWELVE_DATA_GET_EODRetrieve an end-of-day closing price and metadata for a financial instrument, for a specified date or the most recent available date.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get ETF TypesTWELVE_DATA_ETFS_TYPETool to retrieve ETF categories by market, including types like 'Equity Precious Metals'.
Instant$0.001 per 100 requests79% off
Get Exchange RateTWELVE_DATA_GET_EXCHANGE_RATEReturn the current or historical exchange rate for one forex or cryptocurrency pair.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get FundsTWELVE_DATA_GET_FUNDSTool to fetch a daily updated list of available investment funds.
Instant$0.001 per 100 requests79% off
Get Heikin Ashi CandlesTWELVE_DATA_GET_HEIKINASHI_CANDLESTool to retrieve Heikin Ashi candlestick data that smooths price action by averaging values.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Hilbert Transform Sine WaveTWELVE_DATA_GET_HT_SINEFetch Hilbert Transform Sine Wave (HT_SINE) data for an instrument and interval, including sine and lead-sine components, for analyzing market cycles and potential turning points.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Ichimoku Cloud IndicatorTWELVE_DATA_GET_ICHIMOKUTool to retrieve Ichimoku Kinko Hyo indicator data for analyzing trend direction, support/resistance levels, and trading opportunities.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Keltner ChannelTWELVE_DATA_GET_KELTNERRetrieve Keltner Channel indicator data for volatility-based technical analysis.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Last ChangeTWELVE_DATA_GET_LAST_CHANGETool to retrieve the latest update timestamps for a fundamentals dataset.
Instant$0.001 per 100 requests79% off
Get Latest PriceTWELVE_DATA_GET_LATEST_PRICEReturn only the latest available price for one market symbol; use Get Quote when OHLC, volume, change, or market status is needed.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Linear Regression AngleTWELVE_DATA_GET_LINEARREGANGLETool to calculate the linear regression angle for a given time series of stock prices.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Linear Regression InterceptTWELVE_DATA_GET_LINEAR_REG_INTERCEPTRetrieve linear regression intercept indicator values for a financial instrument over a specified period.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Linear Regression SlopeTWELVE_DATA_GET_LINEAR_REGSLOPERetrieve linear regression slope indicator values for a financial instrument over a specified period.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get LogoTWELVE_DATA_GET_LOGOTool to retrieve official logo URLs for a symbol.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get MACDTWELVE_DATA_GET_MACDTool to calculate the Moving Average Convergence Divergence (MACD) for a specified financial instrument.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get MAMATWELVE_DATA_GET_MAMATool to fetch MESA Adaptive Moving Average (MAMA) indicator data.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Market StateTWELVE_DATA_GET_MARKET_STATETool to report current open/closed status for exchanges.
Instant$0.001 per 100 requests79% off
Get Maximum ValueTWELVE_DATA_GET_MAXRetrieve the maximum-value technical indicator for a financial instrument's selected price or volume series over a given period.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get McGinley Dynamic IndicatorTWELVE_DATA_GET_MC_GINLEY_DYNAMICTool to calculate the McGinley Dynamic indicator, which provides a refined moving average that adapts to market volatility.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Median PriceTWELVE_DATA_GET_MEDPRICETool to calculate and retrieve the Median Price (MEDPRICE) technical indicator for a security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Minus Directional IndicatorTWELVE_DATA_GET_MINUS_DITool to calculate and return the Minus Directional Indicator (MINUS_DI) for a security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Plus Directional IndicatorTWELVE_DATA_GET_PLUS_DITool to fetch the Plus Directional Indicator (PLUS_DI) time series data for a security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get PriceTWELVE_DATA_GET_PRICE
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get ProfileTWELVE_DATA_GET_PROFILETool to retrieve company profile.
Instant$0.001 per 100 API credits79% off
Get Rate of Change (ROC)TWELVE_DATA_GET_ROCTool to retrieve Rate of Change (ROC) indicator data for a security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Relative VolumeTWELVE_DATA_GET_RVOLTool to fetch relative volume (RVOL) data for a security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get ROCP (Rate of Change Percentage)TWELVE_DATA_GET_ROCPTool to calculate and return the Rate of Change Percentage (ROCP) for a financial security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Simple Moving AverageTWELVE_DATA_GET_SIMPLE_MOVING_AVERAGEReturn a bounded simple moving average series for one symbol, interval, price field, and averaging period.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Stochastic RSITWELVE_DATA_GET_STOCHRSITool to calculate the Stochastic Relative Strength Index (Stochastic RSI) for a specified financial instrument.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Summation (SUM)TWELVE_DATA_GET_SUMTool to calculate the cumulative total (Summation) of a specified data series over a defined time period.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Technical Indicators ListTWELVE_DATA_GET_TECHNICAL_INDICATORS_LISTTool to retrieve a comprehensive list of available technical indicators.
Instant$0.001 per 100 requests79% off
Get TEMA (Triple Exponential Moving Average)TWELVE_DATA_GET_TEMATool to calculate the Triple Exponential Moving Average (TEMA) for a financial instrument.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Variance (VAR)TWELVE_DATA_GET_VARTool to calculate the statistical variance of a financial data series.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Weighted Close PriceTWELVE_DATA_GET_WCLPRICETool to calculate and retrieve the Weighted Close Price (WCLPRICE) for a security.
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Weighted Moving Average (WMA)TWELVE_DATA_GET_WMATool to calculate and retrieve the Weighted Moving Average (WMA) for a security over a specified period.
Instant$0.001 per 100 requests, charged per symbol requested79% off
List CommoditiesTWELVE_DATA_COMMODITIES_LISTRetrieve the complete list of supported commodities.
Instant$0.001 per 100 requests79% off
List CountriesTWELVE_DATA_COUNTRIES_LISTRetrieve country metadata including ISO codes, names, capitals, and currencies.
Instant$0.001 per 100 requests79% off
List CryptocurrenciesTWELVE_DATA_CRYPTOCURRENCIESList supported cryptocurrencies.
Instant$0.001 per 100 requests79% off
List Cryptocurrency ExchangesTWELVE_DATA_CRYPTOCURRENCY_EXCHANGES_LIST_GETTool to list supported cryptocurrency exchanges.
Instant$0.001 per 100 requests79% off
List StocksTWELVE_DATA_LIST_STOCKSList and filter stocks in Twelve Data's reference directory, one explicit page at a time.
Instant$0.001 per 100 requests79% off
List StocksTWELVE_DATA_STOCKS_LIST
Instant$0.001 per 100 requests79% off
List supported exchangesTWELVE_DATA_EXCHANGESTool to retrieve a list of supported exchanges.
Instant$0.001 per 100 requests79% off
List supported forex pairsTWELVE_DATA_FOREX_PAIRSTool to retrieve a list of all supported forex currency pairs.
Instant$0.001 per 100 requests79% off
Mutual Funds FamilyTWELVE_DATA_MUTUAL_FUNDS_FAMILYList the mutual fund families available from investment companies.
Instant$0.001 per 100 requests79% off
Mutual Funds ListTWELVE_DATA_MUTUAL_FUNDS_LISTTool to retrieve a daily updated list of mutual funds sorted by total assets.
Instant$0.001 per 100 requests79% off
QuoteTWELVE_DATA_QUOTE
Instant$0.001 per 100 requests, charged per symbol requested79% off
Splits CalendarTWELVE_DATA_GET_SPLITS_CALENDARTool to retrieve a calendar of stock split events.
Instant$0.001 per 100 API credits79% off
Stock SplitsTWELVE_DATA_GET_SPLITSTool to retrieve historical stock split events.
Instant$0.001 per 100 API credits79% off
Symbol SearchTWELVE_DATA_SYMBOL_SEARCH
Instant$0.001 per 100 requests79% off
Time SeriesTWELVE_DATA_TIME_SERIES
Instant$0.001 per 100 requests, charged per symbol requested79% off
Get Income StatementTWELVE_DATA_GET_INCOME_STATEMENTRetrieve a company's annual or quarterly income statement.Your key
Get Cash FlowTWELVE_DATA_CASH_FLOWRetrieve a company's cash flow statement.Your key
Get Options ChainTWELVE_DATA_OPTIONS_CHAIN_ACTIONRetrieve the options chain for a symbol and expiration date.Your key

Instant prices are Twelve data's list prices with 0% markup, paid from your Composio balance and updated every hour. Instant calls also count toward your plan's tool calls. See all plans on the pricing page.

USE CASES

Twelve data API use cases and example prompts

Copy a prompt into your agent. Each one uses Twelve data with apps you connect through Composio.

  • Share a market snapshot

    Use Twelve Data to get quotes for the symbols in my Watchlist sheet in Google Sheets, up to eight at a time. Update each row with the latest price, volume, change, and market status, then post a summary in Slack's #market-research channel.

    Apps used: Twelve data, Google Sheets, Slack

  • Write a price history brief

    Use Twelve Data to retrieve daily OHLCV history for the ticker on my Market Watch page in Notion. Write a brief on the price and volume trend in my Market Review doc in Google Docs.

    Apps used: Twelve data, Notion, Google Docs

  • Add symbols to account records

    Use Twelve Data to find tradable symbols and exchange IDs for the company names in my target account records in HubSpot. Add the results to my Account Coverage sheet in Google Sheets, and flag entries with multiple possible matches for review.

    Apps used: Twelve data, HubSpot, Google Sheets

  • Track target price changes

    Use Twelve Data to get quotes for the symbols in my Price Watch sheet in Google Sheets, up to eight at a time. Update the latest price and change, then draft a Gmail summary for any symbol whose quote has crossed its target price.

    Apps used: Twelve data, Google Sheets, Gmail

TROUBLESHOOTING

Twelve data API troubleshooting

Still stuck? The Instant tools docs cover limits, charges and session settings.

Start with Twelve data.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Twelve data tool your agent needs.Free to start.

Start building