MCP · Streamable HTTP · 23 tools
Deterministic futures risk & funding
for AI agents
TradingCalc is the computation layer your agent calls for exact futures math — not AI, not estimates. Same inputs always produce the same outputs. Every formula is traceable to exchange documentation and regression-tested.
https://tradingcalc.io/api/mcp
23 MCP tools·5 workflow suites·7 exchanges normalized·self-verification available
Why deterministic matters
LLM asked directly
Gives a plausible number. May be wrong. Cannot be audited. Changes between calls.
TradingCalc MCP call
Exact number from a verified formula. Same inputs, same output. Fully traceable.
We are not AI. We are the computation layer that AI calls.
23 MCP tools across 5 suites
Trade Planning
workflow.run_pnl_planningNet PnL, ROE, fees and gross P&L for a futures tradeworkflow.run_breakeven_planningBreak-even price accounting for entry and exit feesworkflow.run_exit_targetExit price required to hit a target PnL or ROEworkflow.run_position_sizingPosition size from account balance and max risk %primitive.average_entryAverage entry price after DCA into a positionworkflow.run_scenario_planningMulti-scenario P&L table across price targetsworkflow.run_dca_entryWeighted average entry, breakeven, and per-level contribution from multiple fillsworkflow.run_scale_outP&L, ROI, and cumulative P&L for each partial exit levelRisk & Margin
workflow.run_liquidation_safetyLiquidation price for long/short with cross or isolated marginworkflow.run_max_leverageMaximum safe leverage given account size and volatilityprimitive.hedge_ratioShort perp size to fully hedge a spot position, including funding costworkflow.run_risk_rewardFull R:R analysis: position size, liquidation, breakeven, P&L at stop and target. Returns verdict.Funding & Carry
workflow.run_funding_costCumulative funding cost over a holding periodworkflow.run_funding_arbitrageAnnualized funding arbitrage yield between two exchangesworkflow.run_compound_fundingCompound funding cost with position size decayworkflow.run_carry_tradeDelta-neutral carry: net yield, gross/net profit, breakeven days. Returns verdict.workflow.run_funding_breakevenPrice move needed to cover funding cost + fees over a holding periodIntegrated Decision
workflow.run_pre_trade_checkFull pre-trade risk analysis: position size, liquidation price, breakeven, funding cost, and safety classification in one callMarket Structure
workflow.run_open_analysisMarket Profile open analysis — open location, open type (OD/OTD/ORR/OAIR), VAH/VAL/VPOC/IB, and scenario framingworkflow.run_session_structureDay-type classifier — trend / balance / neutral_trend / normal / normal_varworkflow.run_value_migrationValue-area migration across sessions — directional conviction vs balanceworkflow.run_breakout_acceptanceBreakout acceptance vs rejection beyond the value area (with optional delta)Built for
AI agents & assistants
Call exact futures math instead of improvising calculations in natural language.
Trading bots
Verify risk, sizing, and target structure with deterministic calls before every order.
Risk management systems
Embed into internal risk rails where same inputs must always produce the same outputs.
Multi-agent pipelines
Use as the deterministic layer inside analyst → risk → execution workflows.
Dashboards & analytics
Surface exact outputs inside operator dashboards and decision-support interfaces.
Algo trading strategies
Reusable computation substrate across planning, carry, hedge, and decision safety.
Example agent workflows
Pre-trade risk check
- 1.Call `workflow.run_risk_reward` → R:R ratio, position size, liquidation, P&L at stop and target, verdict
- 2.Call `workflow.run_funding_cost` → cumulative funding cost over hold period
- 3.Call `workflow.run_pre_trade_check` → full decision: sizing + liquidation + breakeven + funding in one call
DCA and scale-out
- 1.Call `workflow.run_dca_entry` with fill levels → avg entry, breakeven, per-level contribution
- 2.Call `workflow.run_liquidation_safety` → liquidation distance from averaged entry
- 3.Call `workflow.run_scale_out` with exit levels → P&L per exit, weighted avg exit, overall ROI
Funding carry analysis
- 1.Call `workflow.run_carry_trade` → net yield, gross/net profit, breakeven days, verdict
- 2.Call `workflow.run_funding_breakeven` → price move needed to cover funding + fees
- 3.Call `workflow.run_funding_arbitrage` → annualized arb yield between two exchanges
Scenario planning
- 1.Call `workflow.run_scenario_planning` with price targets → full P&L table
- 2.Call `workflow.run_exit_target` → exact price to hit target ROE
- 3.Call `primitive.hedge_ratio` → perp short size to hedge the position
Examples — request & response
PnL on a BTC long
workflow.run_pnl_planningRequest
curl -X POST https://tradingcalc.io/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0", "id": 1,
"method": "tools/call",
"params": {
"name": "workflow.run_pnl_planning",
"arguments": {
"side": "long",
"entryPrice": 83000,
"exitPrice": 85000,
"size": 0.1,
"feeOpenPct": 0.0002,
"feeClosePct": 0.0005
}
}
}'Response (result)
{
"pnl": 194.09,
"pnlPct": 0.02339,
"fees": 5.91,
"gross": 200.00
}Position size from risk %
workflow.run_position_sizingRequest
curl -X POST https://tradingcalc.io/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0", "id": 1,
"method": "tools/call",
"params": {
"name": "workflow.run_position_sizing",
"arguments": {
"side": "long",
"entryPrice": 83000,
"stopLoss": 81000,
"riskUsdt": 100,
"leverage": 5
}
}
}'Response (result)
{
"sizeBase": 0.04861,
"sizeQuote": 4034.56,
"margin": 806.91,
"stopDistPct": 2.41
}Full pre-trade risk check
workflow.run_pre_trade_checkRequest
curl -X POST https://tradingcalc.io/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0", "id": 1,
"method": "tools/call",
"params": {
"name": "workflow.run_pre_trade_check",
"arguments": {
"side": "long",
"entry_price": 83000,
"stop_loss": 81000,
"account_balance": 5000,
"risk_pct": 2,
"leverage": 5,
"funding_rate": 0.0001,
"hold_hours": 24
}
}
}'Response (result)
{
"safety": "ok",
"recommended_size": 0.04861,
"notional": 4034.56,
"margin_required": 806.91,
"liquidation_price": 66895.00,
"liquidation_distance_pct": 19.40,
"breakeven_price": 83023.51,
"funding_cost_24h": 1.21,
"summary_a": "Notional 4034.56 USDT · margin 806.91 USDT",
"summary_b": "Liquidation 19.4% away, stop 2.4%",
"summary_c": "Over 24h breakeven rises: 83023.51 → 83123.51 USDT"
}Self-verification
Agents can call system.verify before using results. Returns pass/fail for all 22 canonical test vectors. Every formula is traceable to exchange documentation — this is not a claim, it is a verifiable proof.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "system.verify", "arguments": {} }
}
// Response
{
"status": "pass",
"passed": 22,
"failed": 0,
"total": 22,
"timestamp": "2026-03-30T..."
}Access methods
MCP (Claude Desktop / Cursor / VS Code)
// Claude Desktop — ~/.claude/claude_desktop_config.json
{
"mcpServers": {
"tradingcalc": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://tradingcalc.io/api/mcp"]
}
}
}
// Cursor / VS Code
{
"tradingcalc": {
"url": "https://tradingcalc.io/api/mcp"
}
}REST API (direct JSON-RPC)
curl -X POST https://tradingcalc.io/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "liquidation",
"arguments": {
"side": "long",
"entryPrice": 95000,
"leverage": 10,
"marginType": "isolated"
}
}
}'Authenticating with an API key
curl -X POST https://tradingcalc.io/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", ... }'
// MCP config with key
{
"mcpServers": {
"tradingcalc": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://tradingcalc.io/api/mcp",
"--header", "Authorization: Bearer YOUR_API_KEY"]
}
}
}Free tier available — no signup required for anonymous use.
Frequently asked questions
Is TradingCalc an AI?
No. It’s a deterministic computation layer. Same inputs always produce the same outputs.
What does “deterministic” mean?
No randomness. No estimation. Same inputs, same outputs, every time.
Does it work in Claude Desktop / Cursor / VS Code?
Yes. Quickstarts for all three are above.
Can I use it without an API key?
Yes. 20 calls/day anonymously, no signup required.
How do I verify results are correct?
Call system.verify via MCP, or visit /verify for the live proof page.
Which exchanges are supported?
Binance, Bybit, OKX, Hyperliquid, Aster, KuCoin, MEXC.
Can I use it in an automated trading bot?
Yes. That’s a primary use case. MCP and GPT Actions both work.
What is an integrated decision tool?
A single call that orchestrates multiple primitives. pre_trade_check runs position sizing, liquidation, breakeven, and funding cost together and returns a structured safety classification.
Is it free?
Yes. 20 calls/day anonymously; a free API key raises it to 200/day. No paid plan.
Start in 30 seconds
No signup required. Add to Claude Desktop or Cursor using the config above, or call the endpoint directly.