Home Documentation Pricing API Status Blog About FAQ Support

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.

allratestoday-deepseek is a Python package that plugs real-time currency exchange rates into DeepSeek 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:

Package: 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

ToolAPI keyWhat it does
get_exchange_ratenoCurrent mid-market rate between two currencies.
convert_currencynoConvert an amount between two currencies at the live rate.
get_historical_ratesyesData over 1d / 7d / 30d / 1y.
list_currenciesnoAll supported currencies with codes, names, symbols.

Environment variables

VariableRequired?Purpose
DEEPSEEK_API_KEYYesYour DeepSeek API key (platform.deepseek.com).
ALLRATES_API_KEYNoAllRatesToday key for higher limits. Get one at allratestoday.com/register.
ALLRATES_BASE_URLNoOverride 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 Get free AllRatesToday key

Related