---
title: "AllRatesToday × DeepSeek — Currency Tools for DeepSeek Agents"
description: "Give DeepSeek chat and agents real-time access to currency exchange rates and historical data via function calling. Python package, one-line install."
canonical: https://allratestoday.com/deepseek/
source: AllRatesToday (https://allratestoday.com/) — Markdown mirror of the page above; index of all pages at https://allratestoday.com/llms.txt
generated: 2026-11-25T06:04:33.362Z
---

# AllRatesToday × DeepSeek — Currency Tools for DeepSeek Agents

Give DeepSeek chat and agents real-time access to currency exchange rates and historical data via function calling. Python package, one-line install.

By [Madhushan](https://allratestoday.com/authors/madhushan/), Founder & Lead Developer

**allratestoday-deepseek** is a Python package that plugs real-time currency exchange rates into [DeepSeek](https://api-docs.deepseek.com/) chat and agents via function calling. DeepSeek's Chat Completions API is OpenAI-compatible, so the same tool-calling mechanism works — this package ships ready-to-use tool schemas, an agent wrapper, and a CLI.

Once installed, you can ask DeepSeek things like:

- *"What's USD to EUR right now?"*
- *"Convert 2500 GBP to JPY."*
- *"How has USD/INR moved over the last 30 days?"*
- *"What's happening in FX markets today?"*

  Package: [`allratestoday-deepseek`](https://github.com/AllRates-Today/allratestoday-deepseek) on GitHub. Works with `deepseek-chat` and `deepseek-reasoner`. Python 3.9+.

## Install

```
pip install allratestoday-deepseek
```

## Quick start — one-shot

```
export DEEPSEEK_API_KEY=sk-xxxxx    # from platform.deepseek.com/api_keys
allratestoday-deepseek --ask "What is 2500 USD in EUR right now?"
```

## Quick start — interactive

```
allratestoday-deepseek
# you: Convert 1000 GBP to JPY
# assistant: 1000 GBP ≈ 192,730 JPY at today's mid-market rate of 192.73.
```

## Library usage

```
from allratestoday_deepseek import DeepSeekCurrencyAgent

with DeepSeekCurrencyAgent() as agent:
    print(agent.ask("How many Swiss Francs is 500 Japanese Yen?"))
```

## Low-level — drive the tool loop yourself

If you already have a DeepSeek conversation loop and just want the tools, import the schemas directly:

```
from openai import OpenAI
from allratestoday_deepseek import AllRatesTodayClient, TOOLS, dispatch_tool

llm = OpenAI(api_key=os.environ["DEEPSEEK_API_KEY"], base_url="https://api.deepseek.com")
rates = AllRatesTodayClient()

resp = llm.chat.completions.create(
    model="deepseek-chat",
    messages=[{"role": "user", "content": "Convert 100 USD to NGN"}],
    tools=TOOLS,
    tool_choice="auto",
)

for tc in resp.choices[0].message.tool_calls or []:
    print(dispatch_tool(rates, tc.function.name, tc.function.arguments))
```

## Tools exposed

| Tool | API key | What it does |
| --- | --- | --- |
| `get_exchange_rate` | no | Current mid-market rate between two currencies. |
| `convert_currency` | no | Convert an amount between two currencies at the live rate. |
| `get_historical_rates` | yes | Data over `1d` / `7d` / `30d` / `1y`. |
| `list_currencies` | no | All supported currencies with codes, names, symbols. |

## Environment variables

| Variable | Required? | Purpose |
| --- | --- | --- |
| `DEEPSEEK_API_KEY` | Yes | Your DeepSeek API key (platform.deepseek.com). |
| `ALLRATES_API_KEY` | No | AllRatesToday key for higher limits. Get one at [allratestoday.com/register](https://allratestoday.com/register). |
| `ALLRATES_BASE_URL` | No | Override the API base URL. |

## FAQ

### Does this work with DeepSeek-R1?

Yes. Any DeepSeek model that supports function calling works — the package targets both `deepseek-chat` and `deepseek-reasoner`.

### Do I need an AllRatesToday API key?

Not for the public tools (`get_exchange_rate`, `convert_currency`, and `list_currencies`). `get_historical_rates` and multi-target lookups require an AllRatesToday key.

### Why not just ask DeepSeek directly?

Without tool access, LLMs hallucinate rates — they don't know today's USD/EUR, only rough historical averages. This package ensures every rate comes from live data, not the model's guess.

### Can I use it in a LangChain / LangGraph flow?

Yes — import `TOOLS` and `dispatch_tool` and wire them into whatever orchestration framework you're using. The schemas are plain OpenAI-format JSON.

## Install in 10 seconds

pip install, export keys, ask DeepSeek about real currency rates.

 [View on GitHub](https://github.com/AllRates-Today/allratestoday-deepseek) [Get free AllRatesToday key](https://allratestoday.com/register)

## Related

  [MCP serverFor Claude Code, Cursor, Claude Desktop, ChatGPT Desktop](https://allratestoday.com/mcp/) [Developer docsREST API reference](https://allratestoday.com/developers) [Forex APILive FX rates, history, endpoints](https://allratestoday.com/forex-api/)
