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 Telegram12
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.
Pre-Trade Check
workflowIs this position safe to open? Full safety classification in one call.
Returns
verdict · liq distance · breakeven · funding cost
Risk / Reward
workflowIs this trade worth taking? R:R ratio, position size, and a take-it-or-skip verdict.
Returns
R:R ratio · position size · P&L · verdict
Carry Trade Setup
workflowWill this carry position generate profit? Delta-neutral yield and breakeven days.
Returns
annualized yield · ROI · breakeven days · verdict
DCA Entry
workflowWhat is my real entry after scaling in? Average price and per-level contribution.
Returns
avg entry · breakeven · per-level P&L
Scale-Out Planner
workflowHow should I exit this position? P&L per partial close and weighted average exit.
Returns
per-exit P&L · cumulative · weighted avg exit
Funding Breakeven
workflowHow far does price need to move to cover funding and fees over my hold?
Returns
price move needed · days to break even
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 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.
Position Size Calculator
Calculate position size from max acceptable loss. Never risk more than planned.
Liquidation Price Calculator
Know exactly where your position gets liquidated before you open.
Funding Rate & Cost Calculator
Real funding costs since you opened — uses actual historical rates, not estimates.
Average Price Calculator
True weighted average entry price across multiple fills or DCA buys.
Futures PnL Calculator
Net profit/loss for any leveraged position, accounting for all fees.
Break-Even Calculator
The exact exit price where your trade covers all fees.
Target Exit Calculator
Work backwards from your profit target to find the required exit price.
Scenario Analysis
PnL across a full price range in one table. Plan TP and SL at a glance.
Max Safe Leverage
Find the maximum leverage you can safely use based on volatility and drawdown tolerance.
Funding Rate Arb
Annualized yield and net profit from long/short basis trades across two exchanges.
Hedge Ratio
Calculate the exact short perp size and margin needed to hedge a spot position.
Compound Funding
Project capital growth from reinvesting perpetual futures funding income.
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
PrimaryFor 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.
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.