{"uid":"cap_RbDfgTUh6vyW6Mjm2gHAs","slug":"drawdown-percent-calculator-56807c42","name":"Drawdown Percent Calculator","description":"Drawdown percent from peak to trough for risk reports. Call when measuring path risk on an equity or price series peak/trough pair. Returns drawdown percent as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/drawdown-pct","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"peak":{"type":"integer","description":"Input field: peak."},"trough":{"type":"integer","description":"Input field: trough."}}},"responseSchema":{"type":"json","example":{"peak":120,"schema":"delx/util-drawdown-pct/v1","trough":90,"drawdown_pct":25}},"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_UB_INQmFD7GuxHqCMCOsU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the drawdown percentage from a peak price to a trough price for use in risk reports and path risk analysis.","exampleAgentPrompt":"Calculate the drawdown percent for a position where the peak price was 150 and the trough price was 112 — I need it for my risk report.","exampleUseCases":[{"title":"Equity risk report drawdown","prompt":"My stock peaked at 320 and bottomed at 245 during last quarter — what's the drawdown percentage so I can include it in the risk report?"},{"title":"Crypto portfolio loss analysis","prompt":"I need to know the drawdown percent on a crypto holding that had a peak of 58000 and fell to a trough of 31000."},{"title":"Automated strategy backtesting","prompt":"For my backtest results, calculate the drawdown from a peak of 10000 to a trough of 8750 so I can evaluate path risk on the strategy."}],"resultDescription":"A deterministic JSON object containing the computed drawdown percentage from the supplied peak to trough values, suitable for embedding in risk reports or quantitative pipelines.","failureModes":["Missing peak or trough field returns a validation error","Trough greater than peak may return an error or a positive/unexpected value — caller should ensure trough <= peak","Non-integer inputs rejected per schema","Network or payment authorization failure returns HTTP 402 or 4xx"],"whenToPreferThis":"Use this endpoint when you need a quick, deterministic, local-math drawdown percentage calculation from a known peak and trough pair — especially for risk reports, backtesting pipelines, or any workflow where you already have the two price points and just need the percentage computed reliably without any live market feed or external data dependencies.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T07:11:43.148Z","isFirstParty":false}