The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Quantoracle listing page.
The quantitative computation API for autonomous financial agents
63 deterministic, citation-verified calculators + 10 composite workflows. 1,000 free calls/day. Pay-per-call on Base or Solana.
Calculators | CLI | MCP Server | x402 Payments | Free Tier | All Endpoints | Integrations
12 free interactive calculators backed by the same API are live at quantoracle.dev — no signup, no API key:
Every financial agent needs math. QuantOracle is that math.
/v1/live/volatility) and perp funding rates (/v1/live/funding-rates). We fetch the live market data and run the math, so your agent doesn't have to. 20 free calls/IP/day to evaluate, then pay-per-call via x402.QuantOracle is designed to be called repeatedly. An agent running a backtest might call 10+ endpoints per iteration. That's the model -- be the calculator agents reach for every time they need quant math.
| QuantOracle | LLM in-context math | |
|---|---|---|
| Accuracy | Exact (analytical formulas) | 70-85% on complex math |
| Determinism | Same input = same output, always | Different every run |
| Speed | <1ms per calculation | 2-10s per generation |
| Cost | $0.002-0.015 per call | $0.01-0.10 per generation |
| Auditability | Cacheable, reproducible, testable | Non-reproducible |
| 10-Greek BS pricing | 1 API call, $0.005 | ~500 tokens, frequently wrong on gamma/vanna |
Build a 25-line LangChain agent that answers concrete quant questions — "I'm long $100k of NVDA at $185, how should I hedge?" — with deterministic, reproducible math:
integrations/langchain/cookbook/quantoracle_risk_analyst.ipynb

Runs in 30 seconds, ~$0.001 in OpenAI tokens, free for QuantOracle's individual calculators. The hedging-recommend composite shown above is $0.04 in USDC via x402.
Drop this into your agent's system prompt:
| Format | URL |
|---|---|
| OpenAPI spec | https://api.quantoracle.dev/openapi.json |
| Tool listing | https://api.quantoracle.dev/tools |
| MCP endpoint | npx quantoracle-mcp |
| AI Plugin | https://api.quantoracle.dev/.well-known/ai-plugin.json |
| Server card | https://mcp.quantoracle.dev/.well-known/mcp/server-card.json |
| Swagger docs | https://api.quantoracle.dev/docs |
All 63 calculators + 10 composites in your terminal. Zero dependencies.
Or run without installing:
1,000 free calls per IP per day. No signup. No API key. Just call the API.
| Free | Paid (x402) | |
|---|---|---|
| Calls | 1,000/day | Unlimited |
| Auth | None | x402 micropayment header |
| Calculators | All 63 | All 63 |
| Composite workflows | None (paid-only) | All 10 |
| Live data tier | 20 calls/day | Pay-per-call |
| Watch monitoring | Free 48h trial (1 per IP / 30d) | $5 per position / 30 days |
| Rate headers | Yes | Yes |
Every response includes rate limit headers so agents can self-manage:
Check usage anytime:
After 1,000 calls, the API returns 402 Payment Required with an x402 payment header. Any x402-compatible agent automatically pays and continues:
| Tier | Price | Endpoints |
|---|---|---|
| Simple | $0.002 | Z-score, APY/APR, Fibonacci, Bollinger, ATR, Taylor rule, inflation, real yield, PV, FV, NPV, CAGR, normal distribution, Sharpe ratio, liquidation price, put-call parity |
| Medium | $0.005 | Black-Scholes, implied vol, Kelly, position sizing, drawdown, regime, crossover, bond amortization, carry trade, IRP, PPP, funding rate, slippage, vesting, rebalance, IRR, realized vol, PSR, transaction cost |
| Complex | $0.008 | Portfolio risk, binomial tree, barrier/Asian/lookback options, credit spread, VaR, stress test, regression, cointegration, Hurst, distribution fit, risk parity |
| Heavy | $0.015 | Monte Carlo, GARCH, portfolio optimization, option chain analysis, vol surface, yield curve, correlation matrix |
| Composite | $0.015-0.10 | Backtest strategy, spread scan, rebalance plan, options strategy optimizer, hedging recommend, full risk analysis, trade evaluate, portfolio health, pairs signal, regime classify (paid-only, no free tier) |
Run up to 100 computations in a single HTTP request. One round trip instead of 100.
Returns all results in one response with the total price:
| Free | Paid | |
|---|---|---|
| Batch calls | 1 trial (ever) | Unlimited |
| Max per batch | 100 | 100 |
| Price | Free | Sum of individual endpoint prices |
Batch pricing is the sum of the individual endpoint prices — no markup. You pay for the computations, the speed is free.
Every endpoint above is pure math on inputs you supply — the 73 calculators have zero data dependencies, which is what makes them deterministic and cacheable. QuantOracle Live is the one tier that brings the data: you pass a ticker, the API fetches fresh market data and runs the math, so your agent never has to source or maintain a data feed.
| Endpoint | Description | Price |
|---|---|---|
POST /v1/live/volatility | Realized volatility (7d/30d/90d) + regime for a crypto asset, from fresh daily candles | $0.01 |
POST /v1/live/funding-rates | Current perpetual funding rate + annualized carry for a crypto asset | $0.005 |
Pricing: the Live tier is paid from the first call — it is not part of the 1,000/day calculator free tier (the value is the fresh data + pipeline, which you can't replicate with a local library). You get 20 free calls per IP per day to evaluate, then it settles per-call via x402 (USDC on Base or Solana). You pay for freshness, not arithmetic.
Results are cached server-side (volatility ~5 min, funding ~1 min); if an upstream feed is briefly unavailable, the API serves the last good value flagged stale: true, with as_of_age_seconds telling you how fresh the answer is.
Most monitoring agents rebuild the same loop: poll crypto/liquidation-price + risk/var-parametric on a timer, all day. Watch replaces the loop — register a crypto perp position once and an isolated watcher re-evaluates it every ~60 seconds: funding-adjusted liquidation distance (warn/critical bands with hysteresis), funding-rate sign flips, hourly vol-regime changes, and expiry warnings. Alerts fire as HMAC-signed webhooks (X-QO-Signature, key = your monitor token) and are recorded server-side, so the trial needs zero infrastructure — just poll.
| Endpoint | Description | Price |
|---|---|---|
POST /v1/watch/trial | Free 48-hour monitor — one per IP per 30 days | Free |
POST /v1/watch/position | Register a position for 30 days of monitoring | $5.00 |
POST /v1/watch/extend | +30 days (also upgrades a trial; body: {monitor_id, token}) | $5.00 |
PATCH /v1/watch/{id} | Update position params after you add margin / resize / move it | Free |
GET /v1/watch/{id} | Live status + alert history (token auth) | Free |
DELETE /v1/watch/{id} | Cancel | Free |
No exchange keys, no custody, no execution — Watch reads public market data and sends webhooks, so the worst failure mode is a missed alert (the watcher heartbeat is published in /health as watcher_heartbeat_age_s). Webhook targets are SSRF-guarded and deliveries retried. The economics: a DIY loop polling the same math once a minute past the free tier costs ~$7.20/day in per-call fees vs $5 per 30 days. Full walkthrough: quantoracle.dev/writing/crypto-liquidation-alerts-for-agents.
QuantOracle uses the x402 protocol for pay-per-call micropayments. When an agent exhausts its free tier (or calls a paid-only composite), the API returns a standard 402 response with payment instructions advertising both Base and Solana. x402-compatible agents (Coinbase AgentKit, AgentCash, OpenClaw, etc.) handle the rest automatically:
402 with PAYMENT-REQUIRED header listing accepted networksPAYMENT-SIGNATURE headerNo API keys. No subscriptions. No accounts. Just math and micropayments.
| Network | Asset | Gas | Best for |
|---|---|---|---|
Base mainnet (eip155:8453) | USDC (0x8335...) | ~$0.005/tx | EVM agents, Coinbase tooling, LangChain, Base ecosystem |
Solana mainnet (solana:5eykt4...) | USDC (EPjFWdd5...) | ~$0.0002/tx (CDP fee-payer) | Solana Agent Kit, Eliza, high-frequency bots |
api.cdp.coinbase.com/platform/v2/x402)0xC94f5F33ae446a50Ce31157db81253BfddFE2af69biztrXscReJ3Wi8EfkD2gL3WXzYUmzTEohD26Bxp39uhttps://api.quantoracle.dev/.well-known/x402 (returns both chains for every endpoint)QuantOracle is available as a native MCP server with 80 tools (63 calculators + 11 composites + 2 live market-data endpoints + 3 QuantOracle Watch monitoring tools + batch). Works with Claude Desktop, Cursor, Windsurf, Smithery, and any MCP-compatible client.
Add as a connector in Settings, or add to claude_desktop_config.json:
Or run locally via npx:
Connect directly to the hosted server — no install required:
QuantOracle is available across multiple agent ecosystems:
| Platform | How to connect |
|---|---|
| Claude Desktop / Claude Code | Connector URL: https://mcp.quantoracle.dev/mcp |
| Cursor / Windsurf | MCP config: npx quantoracle-mcp |
| Smithery | npx @smithery/cli mcp add QuantOracle/quantoracle |
| OpenClaw / ClawHub | clawhub install quantoracle |
| CLI | npm install -g quantoracle-cli or npx quantoracle-cli |
| Glama | glama.ai/mcp/servers/QuantOracledev/quantoracle |
| npm (MCP) | npx quantoracle-mcp |
| x402 ecosystem | x402.org/ecosystem |
| ChatGPT GPT | QuantOracle GPT |
| LangChain | pip install langchain-quantoracle |
| AgentCash | npx agentcash fetch https://api.quantoracle.dev/v1/... |
| x402scan | Server page — Base + Solana |
| REST API | https://api.quantoracle.dev/v1/... |
| OpenAPI spec | https://api.quantoracle.dev/openapi.json |
| Swagger UI | https://api.quantoracle.dev/docs |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/options/price | Black-Scholes pricing with 10 Greeks (delta through color) | $0.005 |
POST /v1/options/implied-vol | Newton-Raphson implied volatility solver | $0.005 |
POST /v1/options/strategy | Multi-leg options strategy P&L, breakevens, max profit/loss | $0.008 |
POST /v1/options/payoff-diagram | Multi-leg options payoff diagram data generation | $0.005 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/derivatives/binomial-tree | CRR binomial tree pricing for American and European options | $0.008 |
POST /v1/derivatives/barrier-option | Barrier option pricing using analytical formulas | $0.008 |
POST /v1/derivatives/asian-option | Asian option pricing: geometric closed-form or arithmetic approximation | $0.008 |
POST /v1/derivatives/lookback-option | Lookback option pricing (floating/fixed strike, Goldman-Sosin-Gatto) | $0.008 |
POST /v1/derivatives/option-chain-analysis | Option chain analytics: skew, max pain, put-call ratios | $0.015 |
POST /v1/derivatives/put-call-parity | Put-call parity check and arbitrage detection | $0.002 |
POST /v1/derivatives/volatility-surface | Build implied volatility surface from market data | $0.015 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/risk/portfolio | 22 risk metrics: Sharpe, Sortino, Calmar, Omega, VaR, CVaR, drawdown | $0.008 |
POST /v1/risk/kelly | Kelly Criterion: discrete (win/loss) or continuous (returns series) | $0.005 |
POST /v1/risk/position-size | Fixed fractional position sizing with risk/reward targets | $0.005 |
POST /v1/risk/drawdown | Drawdown decomposition with underwater curve | $0.005 |
POST /v1/risk/correlation | N x N correlation and covariance matrices from return series | $0.008 |
POST /v1/risk/var-parametric | Parametric Value-at-Risk and Conditional VaR | $0.008 |
POST /v1/risk/stress-test | Portfolio stress test across multiple scenarios | $0.008 |
POST /v1/risk/transaction-cost | Transaction cost model: commission + spread + Almgren market impact | $0.005 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/indicators/technical | 13 technical indicators (SMA, EMA, RSI, MACD, etc.) + composite signals | $0.005 |
POST /v1/indicators/regime | Trend + volatility regime + composite risk classification | $0.005 |
POST /v1/indicators/crossover | Golden/death cross detection with signal history | $0.005 |
POST /v1/indicators/bollinger-bands | Bollinger Bands with %B, bandwidth, and squeeze detection | $0.002 |
POST /v1/indicators/fibonacci-retracement | Fibonacci retracement and extension levels | $0.002 |
POST /v1/indicators/atr | Average True Range with normalized ATR and volatility regime | $0.002 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/stats/linear-regression | OLS linear regression with R-squared, t-stats, standard errors | $0.008 |
POST /v1/stats/polynomial-regression | Polynomial regression of degree n with goodness-of-fit metrics | $0.008 |
POST /v1/stats/cointegration | Engle-Granger cointegration test with hedge ratio and half-life | $0.008 |
POST /v1/stats/hurst-exponent | Hurst exponent via rescaled range (R/S) analysis | $0.008 |
POST /v1/stats/garch-forecast | GARCH(1,1) volatility forecast using maximum likelihood estimation | $0.015 |
POST /v1/stats/zscore | Rolling and static z-scores with extreme value detection | $0.002 |
POST /v1/stats/distribution-fit | Fit data to common distributions and rank by goodness of fit | $0.008 |
POST /v1/stats/correlation-matrix | Correlation and covariance matrices with eigenvalue decomposition | $0.015 |
POST /v1/stats/realized-volatility | Realized vol: close-to-close, Parkinson, Garman-Klass, Yang-Zhang | $0.005 |
POST /v1/stats/normal-distribution | Normal distribution: CDF, PDF, quantile, confidence intervals | $0.002 |
POST /v1/stats/sharpe-ratio | Standalone Sharpe ratio with Lo (2002) standard error and 95% CI | $0.002 |
POST /v1/stats/probabilistic-sharpe | Probabilistic Sharpe Ratio (Bailey & Lopez de Prado 2012) | $0.005 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/portfolio/optimize | Portfolio optimization: max Sharpe, min vol, or risk parity | $0.015 |
POST /v1/portfolio/risk-parity-weights | Equal risk contribution portfolio weights (Spinu 2013) | $0.008 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/fixed-income/bond | Bond price, Macaulay/modified duration, convexity, DV01 | $0.008 |
POST /v1/fixed-income/amortization | Full amortization schedule with extra payment savings analysis | $0.005 |
POST /v1/fi/yield-curve-interpolate | Yield curve interpolation: linear, cubic spline, Nelson-Siegel | $0.015 |
POST /v1/fi/credit-spread | Credit spread and Z-spread from bond price vs risk-free curve | $0.008 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/crypto/impermanent-loss | Impermanent loss calculator for Uniswap v2/v3 AMM positions | $0.005 |
POST /v1/crypto/apy-apr-convert | Convert between APY and APR with configurable compounding | $0.002 |
POST /v1/crypto/liquidation-price | Liquidation price calculator for leveraged positions | $0.002 |
POST /v1/crypto/funding-rate | Funding rate analysis with annualization and regime detection | $0.005 |
POST /v1/crypto/dex-slippage | DEX slippage estimator for constant-product AMM (x*y=k) | $0.005 |
POST /v1/crypto/vesting-schedule | Token vesting schedule with cliff, linear/graded unlock, TGE | $0.005 |
POST /v1/crypto/rebalance-threshold | Portfolio rebalance analyzer: drift detection and trade sizing | $0.005 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/live/volatility | Live realized volatility (7d/30d/90d) + regime for a crypto asset | $0.01 |
POST /v1/live/funding-rates | Live perpetual funding rate + annualized carry for a crypto asset | $0.005 |
Paid from the first call (not part of the free tier); 20 free calls/IP/day. See QuantOracle Live.
| Endpoint | Description | Price |
|---|---|---|
POST /v1/watch/trial | Free 48-hour trial monitor (one per IP per 30 days) | Free |
POST /v1/watch/position | 24/7 monitoring of a perp position for 30 days | $5.00 |
POST /v1/watch/extend | Extend or upgrade a monitor by 30 days | $5.00 |
PATCH /v1/watch/{id} | Update position params (direction/entry/size/collateral/mmr/webhook/thresholds) | Free |
GET /v1/watch/{id} | Live status + alert history (token auth) | Free |
DELETE /v1/watch/{id} | Cancel a monitor | Free |
Priced per monitor, not per call. See QuantOracle Watch.
| Endpoint | Description | Price |
|---|---|---|
POST /v1/fx/interest-rate-parity | Interest rate parity calculator with arbitrage detection | $0.005 |
POST /v1/fx/purchasing-power-parity | Purchasing power parity fair value estimation | $0.005 |
POST /v1/fx/forward-rate | Bootstrap forward rates from a spot yield curve | $0.005 |
POST /v1/fx/carry-trade | Currency carry trade P&L decomposition | $0.005 |
POST /v1/macro/inflation-adjusted | Nominal to real returns using Fisher equation | $0.002 |
POST /v1/macro/taylor-rule | Taylor Rule interest rate prescription | $0.002 |
POST /v1/macro/real-yield | Real yield and breakeven inflation from nominal yields | $0.002 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/tvm/present-value | Present value of a future lump sum and/or annuity stream | $0.002 |
POST /v1/tvm/future-value | Future value of a present lump sum and/or annuity stream | $0.002 |
POST /v1/tvm/irr | Internal rate of return via Newton-Raphson | $0.005 |
POST /v1/tvm/npv | Net present value with profitability index and payback period | $0.002 |
POST /v1/tvm/cagr | Compound annual growth rate with forward projections | $0.002 |
| Endpoint | Description | Price |
|---|---|---|
POST /v1/simulate/montecarlo | GBM Monte Carlo with contributions/withdrawals, up to 5000 paths | $0.015 |
Higher-level endpoints that combine multiple calculations into a single call. Same math as the individual endpoints -- just packaged for common agent workflows. No free tier.
| Endpoint | Description | Replaces | Price |
|---|---|---|---|
POST /v1/backtest/strategy | Run SMA crossover, RSI mean reversion, momentum, or Bollinger breakout backtest | 10+ indicator + risk calls | $0.10 |
POST /v1/options/spread-scan | Scan and rank vertical spreads by risk/reward | 8-16 options/price calls | $0.05 |
POST /v1/portfolio/rebalance-plan | Generate trade list to hit target weights with cost estimate | portfolio/optimize + transaction-cost | $0.05 |
POST /v1/options/strategy-optimizer | Rank top options strategies given outlook + volatility view | options/strategy + payoff-diagram | $0.08 |
POST /v1/hedging/recommend | Rank cheapest effective hedges (protective put, collar, futures, partial) | options/price + Greeks | $0.04 |
POST /v1/risk/full-analysis | Complete risk tearsheet: Sharpe, Sortino, VaR, Kelly, drawdown, Hurst, CAGR | 7 individual calls | $0.04 |
POST /v1/portfolio/health | Portfolio health check: risk, correlation, rebalance, stress test | 6 individual calls | $0.04 |
POST /v1/trade/evaluate | Trade evaluation: sizing, risk/reward, Kelly, costs, regime, signals, verdict | 5 individual calls | $0.025 |
POST /v1/pairs/signal | Pairs trading signal: cointegration, Hurst, z-score, half-life, hedge ratio | 4 individual calls | $0.025 |
POST /v1/indicators/regime-classify | Trend, vol regime, RSI, direction, strategy suggestion | technical + regime + realized-vol | $0.015 |
A typical agent backtest chains multiple QuantOracle calls per iteration:
Each call is a pure calculator -- no state, no side effects, no API keys.
examples/strategy_optimizer.py is a full walk-forward parameter optimizer that demonstrates heavy API usage:
| Phase | What it does | API calls |
|---|---|---|
| Parameter Sweep | Test 180 lookback/rebalance/RSI combinations across 8 assets | ~1,080 |
| Deep Analysis | 22 risk metrics + VaR + Kelly + Monte Carlo on top 3 configs | ~60-80 |
| Options Overlay | Price covered calls across 6 assets x 4 expiries x 5 strikes | ~100-150 |
| Pairs Analysis | Cointegration scan + Hurst exponent on 45 asset pairs | ~50-70 |
A single run makes ~1,200-1,500 API calls. At paid rates that's ~$6-8 USDC. The same calculations done by an LLM in-context would cost $12-60 in tokens (Sonnet to Opus), take 4x longer, and get 15-30% of the complex math wrong.
Every endpoint is tested against published analytical solutions:
Run the verification suite yourself:
Stack: FastAPI + Pydantic | Cloudflare Workers + KV | MCP (Streamable HTTP) | x402 + CDP Facilitator | USDC on Base and Solana
MIT -- use QuantOracle however you want.