- Python 3.10 or higher installed on your system
- A Composio account with an API key
- An OpenAI API key
- Basic familiarity with Python and async programming
- UseBuildFeaturesTRIGGERSStart background agents from events across your connected appsFIREWALLNEWBlocks instructions hidden in tool results before your agent reads themINSTANTNEWAudio, video, search, browser and data tools, with no keys to manageOPTIMIZATIONLower cost per completed task with optimised tools and skillsBYOCNEWComposio deployed in your own cloud, with releases you approve
- DOCS
- PRICING
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.SIGN UP
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.LOG IN
How to connect Twelve data to LangChain in 2 mins: No API key needed
You can check prices for your watchlist, see how a stock moved over 3 months and run a quick technical check on a stock from LangChain. Composio runs each call on its own Twelve data account, so you don't need a Twelve data API key, and your first $2 is free.
LangChain runs Twelve data through Composio, and the cost comes out of your free $2.
- A live price quote$0.00001
- Daily price history for a symbol$0.00001
- A technical indicator like MACD$0.00001
$2 ≈ 200000 quotes or 200000 lookups
What you can do with your free $2
| When you ask LangChain for | LangChain uses this tool | Cost | What $2 gets you |
|---|---|---|---|
| A live price quote | Get Quote | $0.00001 per quote | About 200,000 quotes |
| Daily price history for a symbol | Get Time Series | $0.00001 per lookup | About 200,000 lookups |
| A technical indicator like MACD | Get MACD | $0.00001 per lookup | About 200,000 lookups |
| A currency conversion | Convert Currency | $0.00001 per conversion | About 200,000 conversions |
| A ticker for a company name | Search Symbols | $0.00001 per search | About 200,000 searches |
You pay Twelve data's price for each call with 0% markup, plus the regular Composio tool call charge. There's no Twelve data subscription, and you only pay for what you use.
71 of 106 Twelve data tools work without a key. For Cash Flow, Consolidated Cash Flow, EPS Revisions, EPS Trend, ETF World, ETF World Composition and 29 more, connect your own Twelve data key. Read how Instant works.
How to connect Twelve data to LangChain
Composio adds Twelve data to LangChain as an Instant toolkit. You connect Composio to LangChain once, and then LangChain can use Twelve data right away. There are two ways to do this:
Bring your own key
You bring your own Twelve data API key, set it up, and use it.
Use the Composio wallet
InstantComposio runs each call on its own Twelve data account, so you don't have to set anything up at Twelve data, and your first $2 is free.
You do the setup one time and it takes about a minute. If you build Twelve data into your own product, turn on Instant toolkits in your project settings so your agent can call Twelve data for each of your users without a Twelve data API key, and read Instant tools in the Composio docs for the setup steps and code examples.
Start to use Twelve data in LangChain in 3 steps
Turn on Instant
Open your Composio wallet and turn on Instant. Your free $2 shows up there.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.
Open my walletAdd Composio to LangChain
Follow the setup below. You only do this once.
Ask LangChain for something
Try a Twelve data prompt. The cost comes out of your $2.
Step-by-step Guide
Prerequisites
Getting API Keys for OpenAI and Composio
- Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
- Keep the API key safe.
- Log in to the Composio dashboard.
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.
Install dependencies
npm install @composio/langchain @langchain/core @langchain/openai @langchain/mcp-adapters dotenvInstall the required packages for LangChain with MCP support.
What's happening:
@composio/langchainprovides Composio integration for LangChain@langchain/mcp-adaptersenables MCP client connections@langchain/coreis the core agent frameworkdotenv/configloads environment variables
Set up environment variables
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_composio_user_id_here
OPENAI_API_KEY=your_openai_api_key_hereCreate a .env file in your project root.
What's happening:
COMPOSIO_API_KEYauthenticates your requests to Composio's APICOMPOSIO_USER_IDidentifies the user for session managementOPENAI_API_KEYenables access to OpenAI's language models
Import dependencies
import { Composio } from '@composio/core';
import { LangchainProvider } from '@composio/langchain';
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
import { createAgent } from "langchain";
import * as readline from 'readline';
import 'dotenv/config';
dotenv.config();- We're importing LangChain's MCP adapter and Composio SDK
- The
dotenv/configimport loads environment variables from your.envfile - This setup prepares the foundation for connecting LangChain with Twelve data functionality through MCP
Initialize Composio client
const composioApiKey = process.env.COMPOSIO_API_KEY;
const userId = process.env.COMPOSIO_USER_ID;
if (!composioApiKey) throw new Error('COMPOSIO_API_KEY is not set');
if (!userId) throw new Error('COMPOSIO_USER_ID is not set');
async function main() {
const composio = new Composio({
apiKey: composioApiKey as string,
provider: new LangchainProvider()
});- We're loading the
COMPOSIO_API_KEYfrom environment variables and validating it exists - Creating a Composio instance that will manage our connection to Twelve data tools
- Validating that
COMPOSIO_USER_IDis also set before proceeding
Create a Tool Router session
const session = await composio.create(
userId as string,
{
toolkits: ['twelve_data']
}
);
const url = session.mcp.url;- We're creating a Tool Router session that gives your agent access to Twelve data tools
- The
createmethod takes the user ID and specifies which toolkits should be available - The returned
session.mcp.urlis the MCP server URL that your agent will use - This approach allows the agent to dynamically load and use Twelve data tools as needed
Configure the agent with the MCP URL
const client = new MultiServerMCPClient({
"twelve_data-agent": {
transport: "http",
url: url,
headers: {
"x-api-key": process.env.COMPOSIO_API_KEY
}
}
});
const tools = await client.getTools();
const agent = createAgent({ model: "gpt-5", tools });- We're creating a
MultiServerMCPClientthat connects to our Twelve data MCP server via HTTP - The client is configured with a name and the URL from our Tool Router session
getTools()retrieves all available Twelve data tools that the agent can use- We're creating a LangChain agent using the GPT-5 model
Set up interactive chat interface
let conversationHistory: any[] = [];
console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log("Ask any Twelve data related question or task to the agent.\n");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
prompt: 'You: '
});
rl.prompt();
rl.on('line', async (userInput: string) => {
const trimmedInput = userInput.trim();
if (['exit', 'quit', 'bye'].includes(trimmedInput.toLowerCase())) {
console.log("\nGoodbye!");
rl.close();
process.exit(0);
}
if (!trimmedInput) {
rl.prompt();
return;
}
conversationHistory.push({ role: "user", content: trimmedInput });
console.log("\nAgent is thinking...\n");
const response = await agent.invoke({ messages: conversationHistory });
conversationHistory = response.messages;
const finalResponse = response.messages[response.messages.length - 1]?.content;
console.log(`Agent: ${finalResponse}\n`);
rl.prompt();
});
rl.on('close', () => {
console.log('\n👋 Session ended.');
process.exit(0);
});- We initialize an empty
conversationHistorylist to maintain context across interactions - A
readlineinterface is used to continuously accept user input from the command line - When a user types a message, it's added to the conversation history and sent to the agent
- The agent processes the request using the
invoke()method with the full conversation history - Users can type 'exit', 'quit', or 'bye' to end the chat session gracefully
Run the application
main().catch((err) => {
console.error('Fatal error:', err);
process.exit(1);
});- We call the
main()function to start the application
Complete Code
Here's the complete code to get you started with Twelve data and LangChain:
import { Composio } from '@composio/core';
import { LangchainProvider } from '@composio/langchain';
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
import { createAgent } from "langchain";
import * as readline from 'readline';
import 'dotenv/config';
const composioApiKey = process.env.COMPOSIO_API_KEY;
const userId = process.env.COMPOSIO_USER_ID;
if (!composioApiKey) throw new Error('COMPOSIO_API_KEY is not set');
if (!userId) throw new Error('COMPOSIO_USER_ID is not set');
async function main() {
const composio = new Composio({
apiKey: composioApiKey as string,
provider: new LangchainProvider()
});
const session = await composio.create(
userId as string,
{
toolkits: ['twelve_data']
}
);
const url = session.mcp.url;
const client = new MultiServerMCPClient({
"twelve_data-agent": {
transport: "http",
url: url,
headers: {
"x-api-key": process.env.COMPOSIO_API_KEY
}
}
});
const tools = await client.getTools();
const agent = createAgent({ model: "gpt-5", tools });
let conversationHistory: any[] = [];
console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log("Ask any Twelve data related question or task to the agent.\n");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
prompt: 'You: '
});
rl.prompt();
rl.on('line', async (userInput: string) => {
const trimmedInput = userInput.trim();
if (['exit', 'quit', 'bye'].includes(trimmedInput.toLowerCase())) {
console.log("\nGoodbye!");
rl.close();
process.exit(0);
}
if (!trimmedInput) {
rl.prompt();
return;
}
conversationHistory.push({ role: "user", content: trimmedInput });
console.log("\nAgent is thinking...\n");
const response = await agent.invoke({ messages: conversationHistory });
conversationHistory = response.messages;
const finalResponse = response.messages[response.messages.length - 1]?.content;
console.log(`Agent: ${finalResponse}\n`);
rl.prompt();
});
rl.on('close', () => {
console.log('\nSession ended.');
process.exit(0);
});
}
main().catch((err) => {
console.error('Fatal error:', err);
process.exit(1);
});Ask LangChain for something with Twelve data
Start a new chat and try this prompt:
Get the latest price, today's % change and the 52-week high and low for these symbols, sorted by today's change: [up to 8 tickers or pairs, like EUR/USD or BTC/USD].
LangChain runs it on Instant and shows you the result. It doesn't ask you for a Twelve data key, and the cost comes out of your $2. You can see each call in your wallet.
Optional: connect your own Twelve data key
If you want Cash Flow, Consolidated Cash Flow, EPS Revisions, EPS Trend, ETF World, ETF World Composition and 29 more, you need your own key. Ask LangChain to connect your Twelve data account, and it gives you a Composio link:
Connect my Twelve data account using Composio.
Open the link, paste your Twelve data API key and click Connect Account. You can get a key from Twelve Data API keys page. After that, Composio uses your key first and doesn't charge Instant for those calls.
Use your first $2: copy a prompt into LangChain
Each prompt runs on Instant, and the cost next to it is about what it takes from your $2.
Check prices for your watchlist
Less than $0.01Gets the latest price, daily change and 52-week range for up to 8 stocks, currencies or coins in one go.
Get the latest price, today's % change and the 52-week high and low for these symbols, sorted by today's change: [up to 8 tickers or pairs, like EUR/USD or BTC/USD].
See how a stock moved over 3 months
Less than $0.01Pulls daily prices for a stock or crypto pair and sums up the trend, the range and the biggest moves.
Pull daily prices for [ticker or crypto pair] for the last 3 months. Tell me the overall % change, the highest and lowest close, and the 3 biggest one-day moves with their dates.
Run a quick technical check on a stock
Less than $0.01Checks moving averages, MACD and Bollinger Bands on the daily chart and explains them in plain words.
Is [ticker] trending up or down on the daily chart? Check the 50-day and 200-day moving averages, MACD and Bollinger Bands, and explain what they show in plain words.
Convert money at a past exchange rate
Less than $0.01Converts an amount between two currencies at the rate on a past date, and at today's rate for comparison.
Convert [amount] [EUR] to [USD] at the rate on [date] for an invoice I'm booking, and also show what it's worth at today's rate.
Review a stock's dividend history
Less than $0.01Lists a stock's dividends over the last 5 years and shows whether the payout has grown.
Show me [ticker]'s dividends over the last 5 years with the ex-dates and amounts, and tell me if the yearly total has gone up each year.
Check how often a company beats earnings estimates
Less than $0.01Compares a company's reported earnings per share with analyst estimates for recent quarters.
Show [ticker]'s quarterly EPS estimates and actual results for the last 8 quarters, the surprise % for each, and how many times it beat.
Find where a stock is also listed
Less than $0.01See a security’s symbols on other exchanges.
I own [symbol]. Find its cross-listings and show each exchange and symbol returned, so I can identify the matching instrument abroad.
Check whether your exchange is open
Less than $0.01See the current trading status for a chosen exchange.
I want you to check whether [exchange] is open right now. Give me the reported market state and the exchange code.
Review a stock split history
Less than $0.01See past split dates and ratios for a ticker.
I want you to get the stock split history for [symbol]. List the dates and split ratios in chronological order. Say if no splits are returned.
What LangChain can do with Twelve data
Works without a key
- A live price quote
- Daily price history for a symbol
- A technical indicator like MACD
- A currency conversion
- A ticker for a company name
Needs your own Twelve data key
- Cash Flow
- Consolidated Cash Flow
- EPS Revisions
- EPS Trend
- ETF World
- ETF World Composition
- ETF World Risk
- Balance Sheet
- and 27 more
Supported tools (106)
| Tool | What it does | Works without a key | Cost on Instant |
|---|---|---|---|
| Batch Get Quotes | Fetch quotes for 1-8 symbols in one batch, returning success or error for every symbol; partial child failures do not fail successful quotes. | Yes | $0.001 per 100 requested symbols |
| List Commodities | Retrieve the complete list of supported commodities. | Yes | $0.001 per 100 requests |
| Convert Currency | Convert an amount from the base to the quote currency using a current or historical forex or cryptocurrency rate. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Correlation Coefficient | Tool to fetch Pearson correlation coefficient between two series over a period. | Yes | $0.001 per 100 requests, charged per symbol requested |
| List Countries | Retrieve country metadata including ISO codes, names, capitals, and currencies. | Yes | $0.001 per 100 requests |
| Cross Listings | Tool to retrieve cross-listed symbols for a security across multiple exchanges. | Yes | $0.001 per 100 API credits |
| List Cryptocurrencies | List supported cryptocurrencies. | Yes | $0.001 per 100 requests |
| List Cryptocurrency Exchanges | Tool to list supported cryptocurrency exchanges. | Yes | $0.001 per 100 requests |
| Dividends | Retrieve dividend history for a specified symbol, optionally over a selected date range. | Yes | $0.001 per 100 API credits |
| Earnings | Tool to retrieve earnings data including EPS estimates and actuals. | Yes | $0.001 per 100 API credits |
| ETFS Directory | Tool to fetch a daily updated list of exchange-traded funds sorted by total assets. | Yes | $0.001 per 100 requests |
| ETFS Family | Retrieve ETF family names grouped by country, optionally filtered by family name. | Yes | $0.001 per 100 requests |
| Get ETF Types | Tool to retrieve ETF categories by market, including types like 'Equity Precious Metals'. | Yes | $0.001 per 100 requests |
| List supported exchanges | Tool to retrieve a list of supported exchanges. | Yes | $0.001 per 100 requests |
| List supported forex pairs | Tool to retrieve a list of all supported forex currency pairs. | Yes | $0.001 per 100 requests |
| Get AD Indicator | Tool to retrieve Accumulation/Distribution (AD) indicator data for a financial instrument. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get APO (Absolute Price Oscillator) | Tool to calculate the Absolute Price Oscillator (APO) for a financial instrument. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Aroon Indicator | Tool to retrieve Aroon Indicator data for identifying market trends. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Bollinger Bands | Retrieve Bollinger Bands for a financial instrument, including upper, middle, and lower bands, to assess market volatility and potential price reversals. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get CCI | Tool to retrieve Commodity Channel Index (CCI) values for a specified security. | Yes | $0.001 per 100 requests, charged per symbol requested |
Show all 106 toolsShow fewer tools
| Tool | What it does | Works without a key | Cost on Instant |
|---|---|---|---|
| Get Ceiling (CEIL) | Tool to retrieve the Ceiling (CEIL) transformation for a time series. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Chande Momentum Oscillator | Tool to retrieve Chande Momentum Oscillator (CMO) data for a security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Detrended Price Oscillator | Tool to calculate the Detrended Price Oscillator (DPO) for a specified financial instrument. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Earliest Timestamp | Tool to return the first available timestamp for a symbol and interval. | Yes | $0.001 per 100 requests |
| Get End of Day Price | Retrieve an end-of-day closing price and metadata for a financial instrument, for a specified date or the most recent available date. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Exchange Rate | Return the current or historical exchange rate for one forex or cryptocurrency pair. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Funds | Tool to fetch a daily updated list of available investment funds. | Yes | $0.001 per 100 requests |
| Get Heikin Ashi Candles | Tool to retrieve Heikin Ashi candlestick data that smooths price action by averaging values. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Hilbert Transform Sine Wave | Fetch 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. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Ichimoku Cloud Indicator | Tool to retrieve Ichimoku Kinko Hyo indicator data for analyzing trend direction, support/resistance levels, and trading opportunities. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Keltner Channel | Retrieve Keltner Channel indicator data for volatility-based technical analysis. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Last Change | Tool to retrieve the latest update timestamps for a fundamentals dataset. | Yes | $0.001 per 100 requests |
| Get Latest Price | Return only the latest available price for one market symbol; use Get Quote when OHLC, volume, change, or market status is needed. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Linear Regression Angle | Tool to calculate the linear regression angle for a given time series of stock prices. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Linear Regression Intercept | Retrieve linear regression intercept indicator values for a financial instrument over a specified period. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Linear Regression Slope | Retrieve linear regression slope indicator values for a financial instrument over a specified period. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Logo | Tool to retrieve official logo URLs for a symbol. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get MACD | Tool to calculate the Moving Average Convergence Divergence (MACD) for a specified financial instrument. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get MAMA | Tool to fetch MESA Adaptive Moving Average (MAMA) indicator data. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Market State | Tool to report current open/closed status for exchanges. | Yes | $0.001 per 100 requests |
| Get Maximum Value | Retrieve the maximum-value technical indicator for a financial instrument's selected price or volume series over a given period. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get McGinley Dynamic Indicator | Tool to calculate the McGinley Dynamic indicator, which provides a refined moving average that adapts to market volatility. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Median Price | Tool to calculate and retrieve the Median Price (MEDPRICE) technical indicator for a security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Minus Directional Indicator | Tool to calculate and return the Minus Directional Indicator (MINUS_DI) for a security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Plus Directional Indicator | Tool to fetch the Plus Directional Indicator (PLUS_DI) time series data for a security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Profile | Tool to retrieve company profile. | Yes | $0.001 per 100 API credits |
| Get Quote | Return the latest quote for one symbol, including OHLC, volume when available, change, market-open status, and 52-week range. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Rate of Change (ROC) | Tool to retrieve Rate of Change (ROC) indicator data for a security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get ROCP (Rate of Change Percentage) | Tool to calculate and return the Rate of Change Percentage (ROCP) for a financial security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Relative Volume | Tool to fetch relative volume (RVOL) data for a security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Simple Moving Average | Return a bounded simple moving average series for one symbol, interval, price field, and averaging period. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Stock Splits | Tool to retrieve historical stock split events. | Yes | $0.001 per 100 API credits |
| Splits Calendar | Tool to retrieve a calendar of stock split events. | Yes | $0.001 per 100 API credits |
| Get Stochastic RSI | Tool to calculate the Stochastic Relative Strength Index (Stochastic RSI) for a specified financial instrument. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Summation (SUM) | Tool to calculate the cumulative total (Summation) of a specified data series over a defined time period. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Technical Indicators List | Tool to retrieve a comprehensive list of available technical indicators. | Yes | $0.001 per 100 requests |
| Get TEMA (Triple Exponential Moving Average) | Tool to calculate the Triple Exponential Moving Average (TEMA) for a financial instrument. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Time Series | Return a bounded OHLCV history window for one symbol and interval; this does not paginate or fetch an unbounded history. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Variance (VAR) | Tool to calculate the statistical variance of a financial data series. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Weighted Close Price | Tool to calculate and retrieve the Weighted Close Price (WCLPRICE) for a security. | Yes | $0.001 per 100 requests, charged per symbol requested |
| Get Weighted Moving Average (WMA) | Tool to calculate and retrieve the Weighted Moving Average (WMA) for a security over a specified period. | Yes | $0.001 per 100 requests, charged per symbol requested |
| List Stocks | List and filter stocks in Twelve Data's reference directory, one explicit page at a time. | Yes | $0.001 per 100 requests |
| Mutual Funds Family | List the mutual fund families available from investment companies. | Yes | $0.001 per 100 requests |
| Mutual Funds List | Tool to retrieve a daily updated list of mutual funds sorted by total assets. | Yes | $0.001 per 100 requests |
| Search Symbols | Find tradable instrument symbols and exchange identifiers by ticker or name; returns a bounded match list with no pagination. | Yes | $0.001 per 100 requests |
| Currency Conversion | Yes | $0.001 per 100 requests | |
| Get Price | Yes | $0.001 per 100 requests, charged per symbol requested | |
| Quote | Yes | $0.001 per 100 requests, charged per symbol requested | |
| List Stocks | Yes | $0.001 per 100 requests | |
| Symbol Search | Yes | $0.001 per 100 requests | |
| Time Series | Yes | $0.001 per 100 requests, charged per symbol requested | |
| Cash Flow | Tool to get company cash flow statement. | Needs your own key | Billed to your own Twelve data key |
| Consolidated Cash Flow | Retrieve consolidated cash flow statements for a company, including modeled operating, investing, and financing cash flow details. | Needs your own key | Billed to your own Twelve data key |
| EPS Revisions | Tool to provide analysts’ revisions of a company’s future EPS over the last week and month. | Needs your own key | Billed to your own Twelve data key |
| EPS Trend | Tool to retrieve EPS trend estimates for a specified company. | Needs your own key | Billed to your own Twelve data key |
| ETF World | Tool to fetch comprehensive ETF analytics (summary, performance, risk, composition). | Needs your own key | Billed to your own Twelve data key |
| ETF World Composition | Tool to fetch global ETF composition details including sector, country, asset allocations, top holdings, and bond metrics. | Needs your own key | Billed to your own Twelve data key |
| ETF World Risk | Retrieve global ETF risk metrics, including volatility and valuation ratios. | Needs your own key | Billed to your own Twelve data key |
| Balance Sheet | Tool to retrieve a company's balance sheet (assets, liabilities, equity). | Needs your own key | Billed to your own Twelve data key |
| Balance Sheet Consolidated | Tool to get raw consolidated balance sheet data (assets, liabilities, equity) for a company. | Needs your own key | Billed to your own Twelve data key |
| Get Bonds | Retrieve a list of available bonds with optional symbol, exchange, or country filters. | Needs your own key | Billed to your own Twelve data key |
| Global ETF Performance | Retrieve global ETF performance metrics, including trailing and annual returns. | Needs your own key | Billed to your own Twelve data key |
| Get exchange schedule | Retrieve trading sessions and hours for exchanges by date, including pre-market, main, and post-market sessions. | Needs your own key | Billed to your own Twelve data key |
| Get Fund Holders | Tool to retrieve mutual fund holders for a company. | Needs your own key | Billed to your own Twelve data key |
| Get HLC3 Average | Tool to calculate the High, Low, Close Average (HLC3) for a security over a specified period. | Needs your own key | Billed to your own Twelve data key |
| Income Statement | Tool to retrieve a company's income statement data (annual or quarterly). | Needs your own key | Billed to your own Twelve data key |
| Insider Transactions | REQUIRES PRO, ULTRA, OR ENTERPRISE PLAN. | Needs your own key | Billed to your own Twelve data key |
| Get Available Intervals | Tool to retrieve a list of available time intervals supported by the API. | Needs your own key | Billed to your own Twelve data key |
| Key Executives | REQUIRES ULTRA OR ENTERPRISE PLAN. | Needs your own key | Billed to your own Twelve data key |
| Get Base-10 Logarithm (LOG10) | Retrieve base-10 logarithm (LOG10) indicator values for a financial instrument's selected price or volume series. | Needs your own key | Billed to your own Twelve data key |
| Market Movers | Retrieve a snapshot of top gainers or losers for a specified market. | Needs your own key | Billed to your own Twelve data key |
| Global Mutual Fund Performance | Get global mutual fund performance metrics, including trailing, annual, quarterly, and load-adjusted returns. | Needs your own key | Billed to your own Twelve data key |
| Mutual Funds World Risk | Fetch global mutual fund risk metrics, including standard deviation, beta, and Sharpe ratio. | Needs your own key | Billed to your own Twelve data key |
| Global Mutual Fund Summary | Retrieve a global mutual fund summary snapshot with key identifiers and attributes. | Needs your own key | Billed to your own Twelve data key |
| Global Mutual Fund Sustainability | Get global mutual fund sustainability and ESG metrics, including scores and pillar breakdowns. | Needs your own key | Billed to your own Twelve data key |
| Price Target | Tool to fetch analysts' price target dataset for equities. | Needs your own key | Billed to your own Twelve data key |
| Recommendations | Retrieve aggregated analyst recommendations for a stock. | Needs your own key | Billed to your own Twelve data key |
| Get ROCR100 | Tool to calculate the Rate of Change Ratio 100 (ROCR100) for a security. | Needs your own key | Billed to your own Twelve data key |
| Get Statistics | Tool to retrieve key company statistics including valuation and financial overview. | Needs your own key | Billed to your own Twelve data key |
| Get Usage Limits | Retrieve the connected key's current minute usage, limit, and timestamp, along with daily usage, daily limit, and plan category when available. | Needs your own key | Billed to your own Twelve data key |
| List market indices | Tool to retrieve a list of market indices. | Needs your own key | Billed to your own Twelve data key |
| Institutional Holders | Tool to retrieve institutional holders positions for a company. | Needs your own key | Billed to your own Twelve data key |
| Mutual Funds World Composition | Fetch global mutual fund portfolio composition, including sectors, asset allocation, top holdings, and bond metrics. | Needs your own key | Billed to your own Twelve data key |
| Options Chain | Tool to retrieve the options chain for a given symbol and optional expiration date. | Needs your own key | Billed to your own Twelve data key |
| Options Expiration | Tool to retrieve available option expiration dates. | Needs your own key | Billed to your own Twelve data key |
| Technical Indicators | Tool to fetch time-series data for a specific technical indicator. | Needs your own key | Billed to your own Twelve data key |
How you pay for Twelve data
- Your first $2 is freeIt's added to your Composio wallet when you turn on Instant.
- You pay for each callYou pay Twelve data's price with 0% markup, plus the regular Composio tool call charge.
- Your own key comes firstIf you connect your own Twelve data key, Composio uses it and doesn't charge Instant for those calls.
- You control the costYou can ask your agent to check with you before each paid call, and you can turn Instant off at any time.
- You can see each callYour wallet shows each call and what it cost.
- When your balance runs outYou can add funds to your wallet on a Pro plan or connect your own key.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Open my Composio wallet
Troubleshooting
1. LangChain asks me for a Twelve data API key
You may have asked for something that needs your own key, like Cash Flow, Consolidated Cash Flow, EPS Revisions, EPS Trend, ETF World, ETF World Composition and 29 more. Those tools don't run on Instant. For everything else, check that Instant is turned on in your Composio wallet, then ask again.
2. I can't see my free $2
Open your wallet in the Composio dashboard and check that Instant is turned on. If the $2 still isn't there, email support@composio.dev from the address you signed up with.
3. A Twelve data call failed with a balance error
Your balance is empty. Add funds to your wallet on a Pro plan, or connect your own Twelve data key, then try again.
How to build Twelve data MCP Agent with another framework
Claude Code
Use Twelve data MCP with Claude Code
Claude Cowork
Use Twelve data MCP with Claude Cowork
OpenAI Agents SDK
Use Twelve data MCP with OpenAI Agents SDK
Claude Agent SDK
Use Twelve data MCP with Claude Agent SDK
Codex
Use Twelve data MCP with Codex

OpenClaw
Use Twelve data MCP with OpenClaw

Hermes
Use Twelve data MCP with Hermes
Atomic Agent
Use Twelve data MCP with Atomic Agent
Google ADK
Use Twelve data MCP with Google ADK
Vercel AI SDK
Use Twelve data MCP with Vercel AI SDK
Mastra AI
Use Twelve data MCP with Mastra AI
LlamaIndex
Use Twelve data MCP with LlamaIndex
CrewAI
Use Twelve data MCP with CrewAI
Pydantic AI
Use Twelve data MCP with Pydantic AI
AutoGen
Use Twelve data MCP with AutoGen
Explore Other Toolkits
Stripe
Stripe is a global online payments platform offering APIs for managing payments, customers, and subscriptions. Trusted by businesses for secure, efficient, and scalable payment processing worldwide.
44API
44API is an API service for validating VAT and tax identifiers and returning company details. Use it to verify business tax data and manage account IP whitelists quickly.
8090
8090 is an organization usage and spend management service. It helps teams monitor usage and control member and default spending limits.
Airwallex
Airwallex is a global financial platform providing business accounts, payments, payouts, FX, and cards. Built to simplify cross-border payments and streamline financial operations for businesses.
Frequently asked questions
Not for the 71 tools that run on Instant. Composio runs those calls on its own Twelve data account, and you only add Composio to your agent. The other 35 tools need your own Twelve data key.
Yes. Every Composio account gets $2 of Instant credit once you turn on Instant, and you can use it on Twelve data or on any other Instant toolkit.
You can get about 200,000 quotes, about 200,000 lookups or about 200,000 lookups. The price list on this page shows the cost of each tool.
Instant calls stop. You can add funds to your wallet on a Pro plan, or connect your own Twelve data key.
You pay Twelve data's price for each call with 0% markup, plus the regular Composio tool call charge.
Yes. Connect your key from the Twelve data toolkit in your Composio dashboard. Composio always uses your own connection first, and it doesn't charge Instant for those calls.
You can use 71 of the 106 tools without a key, including Batch Get Quotes, List Commodities, Convert Currency, Correlation Coefficient, List Countries, Cross Listings and 65 more. The other 35 tools need your own Twelve data key.
Composio is SOC 2 Type II compliant.
Start with Twelve data.It takes 30 seconds.
New accounts get a one-time $2 starter credit for Instant calls.Run Twelve data from your agent with no Twelve data key.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Get $2 starter credit
