# Currencyapi

```json
{
  "name": "Currencyapi",
  "slug": "currencyapi",
  "url": "https://composio.dev/toolkits/currencyapi",
  "markdown_url": "https://composio.dev/toolkits/currencyapi.md",
  "logo_url": "https://logos.composio.dev/api/currencyapi",
  "categories": [
    "finance & accounting"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-11-19T05:32:31.002Z"
}
```

![Currencyapi logo](https://logos.composio.dev/api/currencyapi)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Currencyapi MCP or direct API to fetch live rates, convert currencies, look up historical rates, and retrieve currency metadata through natural language.

## Summary

Currencyapi is an exchange-rate service for current, historical, and official currency data.
It also provides currency and country metadata for accurate financial workflows.

## Categories

- finance & accounting

## Toolkit Details

- Tools: 15

## Images

- Logo: https://logos.composio.dev/api/currencyapi

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Currencyapi.
  - Setup:
    - Configure Api Key credentials for Currencyapi.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Get today's USD to EUR exchange rate
- Convert 1,000 USD into Japanese yen
- Compare historical GBP to USD rates

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `CURRENCYAPI_COMPARE_OFFICIAL_RATES` | Compare Official Rates | Compare one currency pair across selected or all available central-bank sources for a requested date, or across their newest publications. |
| `CURRENCYAPI_CONVERT_AMOUNTS` | Convert Amounts | Convert one amount or up to 100 amounts from a base currency into selected currencies, optionally using historical rates, retail rounding, and locale formatting. The endpoint requires a paid Small+ plan. datetime has an additional update-tier requirement: Small provides hourly, Pro quarter-hourly, and Medium-or-higher minute intraday rates. |
| `CURRENCYAPI_GET_ACCOUNT_STATUS` | Get Account Status | Return the connected account identifier, monthly quota, and plan details when present, without consuming quota. |
| `CURRENCYAPI_GET_AVERAGE_RATES` | Get Average Rates | Return average, minimum, and maximum exchange rates grouped by month, quarter, year, or the total requested date span. |
| `CURRENCYAPI_GET_EXCHANGE_RATES` | Get Exchange Rates | Return latest rates when no date is supplied, or end-of-day rates for one historical date or up to 31 historical dates. date and dates are mutually exclusive. |
| `CURRENCYAPI_GET_OFFICIAL_RATE_RANGE` | Get Official Rate Range | Return a central bank's official publications across a date range as structured JSON. Requires a Currencyapi Pro+ plan. |
| `CURRENCYAPI_GET_OFFICIAL_RATES` | Get Official Rates | Return a central bank's latest or dated official publication, optionally compared with market rates. |
| `CURRENCYAPI_GET_OHLC_RATES` | Get OHLC Rates | Return hourly or daily open, high, low, and close candles for one to 10 currencies. This endpoint requires the Pro+ range feature. Hour candles require quarter-hourly updates or finer; day candles require hourly updates or finer. Returns JSON only. |
| `CURRENCYAPI_GET_PAIR_RATE` | Get Pair Rate | Return one currency pair's latest rate at the account plan's update interval, a past daily close, or an intraday historical rate, together with its inverse. |
| `CURRENCYAPI_GET_RATE_FLUCTUATION` | Get Rate Fluctuation | Return start, end, change, percentage change, high, low, and average rates between two UTC dates. |
| `CURRENCYAPI_GET_RATE_MATRIX` | Get Rate Matrix | Return latest or daily historical cross-rates among 2 to 25 currencies. |
| `CURRENCYAPI_GET_RATE_RANGE` | Get Rate Range | Return market exchange rates over a bounded datetime range. Requires a Pro+ plan with the range feature; the requested resolution must match the plan's update tier: Pro supports quarter-hour and coarser data, while minute accuracy requires Medium+ with one-minute updates. |
| `CURRENCYAPI_LIST_COUNTRIES` | List Countries | List countries with currency, language, timezone, calling-code, and ISO metadata. |
| `CURRENCYAPI_LIST_CURRENCIES` | List Currencies | List supported fiat currencies, metals, and cryptocurrencies with symbols, precision, and country metadata. |
| `CURRENCYAPI_LIST_OFFICIAL_SOURCES` | List Official Sources | List central banks and publication metadata, optionally filtered by currency or region. This call does not consume currencyapi quota. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to Currencyapi
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["currencyapi"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["currencyapi"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run Currencyapi tools with your agent

Send a request, execute the Currencyapi tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Get the current USD to EUR exchange rate."}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Get the current USD to EUR exchange rate." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to Currencyapi and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["currencyapi"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["currencyapi"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a Currencyapi request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to Currencyapi tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Get the current USD to EUR exchange rate.")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Get the current USD to EUR exchange rate.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native Currencyapi Integration

- Supports both Currencyapi MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable exchange-rate and currency-data tool execution
- Rich coverage for reading current, historical, and official Currencyapi data

### 2. Managed Auth

- Connect your own Currencyapi API key without hard-coding it into agent prompts or application code
- Central place to securely store, scope, and revoke Currencyapi access
- Per user and per environment credentials for safer development and production deployments

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Clear schemas help agents request exchange rates, currency conversions, and metadata correctly
- Comprehensive execution logs show what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC helps control which agents and users can access Currencyapi
- Scoped, least privilege access to Currencyapi resources
- Full audit trail of agent actions to support review and compliance

## Use Currencyapi with any AI Agent Framework

Choose a framework you want to connect Currencyapi with:

- [ChatGPT](https://composio.dev/toolkits/currencyapi/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/currencyapi/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/currencyapi/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/currencyapi/framework/atomic-agent)

## Related Toolkits

- [Stripe](https://composio.dev/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](https://composio.dev/toolkits/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.
- [Airwallex](https://composio.dev/toolkits/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.
- [Aiwyn Tax MCP](https://composio.dev/toolkits/aiwyn_tax_mcp) - Aiwyn Tax MCP is a tax estimation service powered by Aiwyn's federal and state tax engine. It helps teams estimate tax outcomes without building tax calculation logic from scratch.
- [Alpaca](https://composio.dev/toolkits/alpaca) - Alpaca is a stock and crypto trading platform for commission-free trading, real-time market data, and algorithmic strategies. Use it to build brokerage apps, trading bots, and portfolio workflows with market connectivity.
- [Alpha vantage](https://composio.dev/toolkits/alpha_vantage) - Alpha Vantage is a financial data platform offering real-time and historical stock market APIs. Get instant, reliable access to equities, forex, and technical analysis data for smarter trading decisions.
- [Altoviz](https://composio.dev/toolkits/altoviz) - Altoviz is a cloud-based billing and invoicing platform for businesses. It streamlines online payments, expense tracking, and customizable invoice management.
- [Anrok](https://composio.dev/toolkits/anrok) - Anrok is a sales tax platform for software businesses that automates calculations, compliance, filings, and exemption management. It helps finance teams stay accurate and reduce the manual work of tax operations.
- [Benzinga](https://composio.dev/toolkits/benzinga) - Benzinga provides real-time financial news and data APIs for market coverage. It helps you track breaking news and actionable market insights instantly.
- [bexio](https://composio.dev/toolkits/bexio) - bexio is a Swiss business management platform for accounting, invoicing, contacts, projects, banking, expenses, and payroll. It brings core business operations into one connected workspace.
- [Bigdata.com MCP](https://composio.dev/toolkits/bigdata_com_mcp) - Bigdata.com MCP provides grounded access to financial news, transcripts, filings, and entity intelligence. Ideal for building research workflows and generating timely market insights.
- [Billsby](https://composio.dev/toolkits/billsby) - Billsby is a subscription billing platform for managing customers, subscriptions, invoices, products, plans, usage counters, add-ons, and allowances. It helps SaaS and subscription teams automate billing operations without building complex billing logic from scratch.
- [Brex](https://composio.dev/toolkits/brex) - Brex provides corporate credit cards and spend management tailored for startups and tech businesses. It helps optimize company cash flow, streamline accounting, and accelerate business growth.
- [Carta](https://composio.dev/toolkits/carta) - Carta is an equity management platform for cap tables, compensation, portfolios, and fund administration. It helps companies and investors manage ownership data and financial operations in one place.
- [Cashfree](https://composio.dev/toolkits/cashfree_payments_mcp) - Cashfree is a merchant payments platform that handles collection, payouts, subscriptions, settlements, refunds, and identity verification. Simplifies merchant money lifecycle management with unified, API-driven workflows.
- [Chaser](https://composio.dev/toolkits/chaser) - Chaser is accounts receivable automation software that sends invoice reminders and helps businesses get paid faster. It streamlines the collections process to save time and improve cash flow.
- [Clarity AI MCP](https://composio.dev/toolkits/clarity_ai_mcp) - Clarity AI MCP is an MCP toolkit for simulating SFDR 2.0 fund classifications from a fund name, ISIN, or CUSIP. Use it to tap Clarity AI disclosure data and modeling without building custom sustainability-data workflows.
- [Clientary](https://composio.dev/toolkits/clientary) - Clientary is a platform for managing clients, invoices, projects, proposals, and more. It streamlines client work and saves you serious admin time.
- [Coinbase](https://composio.dev/toolkits/coinbase) - Coinbase is a platform for buying, selling, and storing cryptocurrency. It makes exchanging and managing crypto simple and secure for everyone.
- [Coinbase Agents MCP](https://composio.dev/toolkits/coinbase_agents_mcp) - Coinbase Agents MCP is Coinbase's managed toolkit exposing accounts, portfolios, orders, fills, and market data. Use it to let authorized agents inspect holdings, execute trades, perform transfers, and handle payments.

## Frequently Asked Questions

### Do I need my own developer credentials to use Currencyapi with Composio?

Yes, Currencyapi requires you to configure your own API key. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
