{"uid":"cap_RTcYnVVwGjrxC62lf_wka","slug":"xrpl-data-desk-risk-math-d822fef4","name":"XRPL Data Desk – Risk Math","description":"Live XRP Ledger market data for AI agents, paid per call in XRP. Settled on the XRP Ledger itself; every endpoint independently audited. Information, not advice.","url":"https://data.azeronyx.com/v1/risk-math?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"stop":{"type":"string","description":"stop price, for position sizing"},"entry":{"type":"string","description":"entry price, for position sizing"},"equity":{"type":"string","description":"account size, for position sizing"},"prices":{"type":"string","description":"comma-separated prices (instead of returns)"},"returns":{"type":"string","description":"comma-separated returns (0.01 = +1%); or prices instead"},"risk_pct":{"type":"string","description":"percent of equity risked at the stop (default 1)"},"risk_free":{"type":"string","description":"annual risk-free rate (default 0)"},"confidence":{"type":"string","description":"for value-at-risk (default 0.95)"},"periods_per_year":{"type":"string","description":"periods in a year (default 365; 8760 hourly)"}}},"responseSchema":{"type":"object","description":"See https://data.azeronyx.com/v1/sample?path=/v1/risk-math for a recent example","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pYDehrJ5npD-RqpES-qSi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"XRP","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes quantitative risk metrics (VaR, Sharpe, position sizing, etc.) from a price or returns series, with optional stop/entry/equity inputs for trade-level risk management.","exampleAgentPrompt":"Calculate my position size and key risk metrics for an XRP trade where my entry is $0.52, stop is $0.48, and account equity is $5000 — use 1.5% equity risk and a 95% VaR confidence level on this returns series: 0.01, -0.02, 0.03, -0.01, 0.005.","exampleUseCases":[{"title":"Position sizing for crypto trade","prompt":"I'm entering XRP at $0.55 with a stop at $0.50 and I have $10,000 in my account — risk 1% of equity. Can you calculate how many units I should buy and give me the full risk math breakdown?"},{"title":"VaR and Sharpe from daily returns","prompt":"Here are my daily returns for the last month: 0.01, -0.015, 0.02, 0.005, -0.01, 0.03, -0.025. Calculate the 95% Value-at-Risk, Sharpe ratio using a 4% annual risk-free rate, and annualized volatility assuming 365 periods per year."},{"title":"Risk metrics from historical price series","prompt":"I have this comma-separated list of hourly XRP prices and I want to see volatility, max drawdown, and VaR at 99% confidence — assume 8760 periods per year: 0.52, 0.53, 0.515, 0.54, 0.525, 0.51, 0.535."}],"resultDescription":"Returns a JSON object containing computed risk metrics such as Value-at-Risk (VaR), Sharpe ratio, annualized volatility, maximum drawdown, recommended position size (units to trade), and dollar risk — derived from the supplied price or return series and optional position-sizing parameters.","failureModes":["Missing both 'prices' and 'returns' fields — computation cannot proceed without a data series","Invalid numeric strings cause parsing errors","Stop price equal to or above entry price results in undefined position sizing","Too few data points for meaningful statistical calculation","Payment not settled on XRPL — 402 response with payment instructions","Confidence value outside (0,1) range causes VaR failure"],"whenToPreferThis":"Choose this endpoint when you need server-side quantitative risk computation — especially position sizing from entry/stop/equity — without running local math. It is well-suited for AI agents that need audited, structured risk metrics on XRP or other crypto price/return series, paid per-call on the XRP Ledger. Prefer it over generic statistics libraries when you want a single audited API call that bundles VaR, Sharpe, volatility, drawdown, and position sizing together.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:39:42.154Z","isFirstParty":false,"canonicalSlug":"xrpl-data-desk-risk-math-d822fef4"}