Deterministic · Verified · 7 Exchanges

Deterministic risk calculations
for AI trading agents

Prevent hallucinated PnL, liquidation, sizing, and funding numbers in your crypto futures workflows. Exact, regression-tested results via MCP and REST.

Open in Telegram
Live prices
BinanceBybitOKXHyperliquidAsterKuCoinMEXC
BTC / USDT
ETH / USDT
SOL / USDT
PnL PreviewLong · 10×
Entry85,000
Size$1,000
Exit (live)
ExchangeBinance
— USDT
Calculate your trade

12

Calculators

6

Workflows

7

Exchanges

MCP + REST

Developer Access

Formulas normalized across

LLMs can reason about trades.
They should not invent your risk numbers.

Crypto futures workflows break not because the agent misread the market — but because it approximated where exact math was required.

Hallucinated calculations

LLMs generate plausible-looking but incorrect numbers for liquidation prices, funding costs, and position sizing. Close enough is not close enough when money is at stake.

Exchange inconsistencies

Binance, Bybit, OKX, and Hyperliquid all define margin, fees, and funding differently. A generic formula gives wrong answers on every exchange except one.

Workflow fragility

One wrong liquidation estimate or sizing error can corrupt the entire execution flow. Deterministic infrastructure is the difference between a prototype and production.

Answer specific trading questions

Workflows orchestrate multiple primitives in one call and return a verdict, not just a number.

REST API · MCP · SDK

Connect in under a minute

19 tools available as a deterministic JSON API — 12 calculator primitives and 7 workflow endpoints. Supports MCP for AI agents (Claude, Cursor, VS Code) and direct REST for trading bots. Verified formulas, structured output, no scraping.

curl example
curl https://tradingcalc.io/v1/workflows/pre-trade-check \
  -H "Authorization: Bearer tc_..." \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "BTCUSDT",
    "exchange": "bybit",
    "side": "long",
    "entry": 84000,
    "leverage": 10,
    "margin": 500
  }'

12 deterministic calculator primitives

Position size, liquidation price, funding cost, average entry, PnL and more — exact numbers, every time.

Why you can trust the numbers

Every formula is verifiable. Not a black box.

Regression-tested formulas

66 Vitest tests run on every deployment — 22 exact-value canonical vectors plus property tests covering sign invariants, round-trips, and monotonicity.

View live verification report →

Exchange-normalized

Formulas sourced directly from exchange documentation — fee structures, margin modes, and funding mechanics handled per-exchange. Results match what the exchange shows to the cent.

Scope guarantee

TradingCalc provides deterministic calculations only — not trade advice, execution, or market predictions. Your agent builds the strategy. We give it exact numbers.

Choose how you want to use TradingCalc

One calculation engine, three access modes.

MCP / REST API

Primary

For AI agents and trading bots. Plug into Claude, Cursor, VS Code or call directly over HTTP. Structured JSON output, no parsing required.

View docs →

Web app

For manual exploration and sanity-checking. Interactive calculators and workflows in the browser. No signup required for basic use.

Open Playground →

Telegram Mini App

For mobile-first traders. All 12 calculators available inside Telegram — no browser, no install.

Open in Telegram →

FAQ

Quick answers before you start

Why not let the LLM calculate this directly?

LLMs approximate. For liquidation prices, funding costs, and position sizing the difference between "close enough" and exact can mean a blown position. TradingCalc gives your agent the same numbers the exchange would compute — no estimation.

Are the calculations deterministic?

Yes. Same inputs always produce the same outputs — no randomness, no estimation. Every formula is regression-tested against 22 canonical vectors and verified on every deployment.

Which exchanges are supported?

Binance, Bybit, OKX, Hyperliquid, Aster, KuCoin and MEXC. Fee structures and funding mechanics are normalized per exchange — not a generic approximation.

Is TradingCalc a trading bot or execution service?

No. TradingCalc provides deterministic calculations, not trade advice, execution, or market predictions. You build the strategy; we give you the exact numbers.

Can I use this in a trading bot?

Yes — that is the primary use case. The REST API and MCP server return structured JSON your bot can parse directly. No scraping, no parsing free-form text.

What is a workflow?

A workflow answers a specific trading question — "Is this trade worth taking?" or "What is my carry yield?" It orchestrates multiple calculators in one call and returns a verdict plus plain-English explanation, not just raw numbers.

How do I get an API key?

Request access at tradingcalc.io/request-access — you will receive a key within 24 hours. A free sandbox tier is also available without signup.

Will you add more exchanges?

Yes. New exchanges are integrated regularly. Contact hi@tradingcalc.io if your exchange is not on the list.

🎁 Subscriber-only perks

Get exclusive deals for traders

TradingCalc negotiates special offers with exchanges, tools and services — and shares them only with subscribers. Fee discounts, trial periods, early access.

+ market insights and calculator updates. No spam, unsubscribe anytime.

Make your trading agents deterministic
where it matters most

Give your agents exact, regression-tested futures calculations for risk, sizing, PnL, and funding.