{"uid":"cap_b3y_T5GhN_iuhnJvq59CM","slug":"api-quantoracle-dev-5f8f912e","name":"QuantOracle Risk/Drawdown Calculator","description":"QuantOracle: risk/drawdown","url":"https://api.quantoracle.dev/v1/risk/drawdown","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"equity_curve":{"type":"array","items":{"type":"number"},"title":"Equity Curve","minItems":3,"description":"Array of portfolio equity values over time"}}},"responseSchema":null,"example":{"request":{"input":{"body":{"equity_curve":[10000,10500,10200,9800,9500,9900,10300,10800]},"type":"http","method":"POST","bodyType":"json"}},"response":{"ms":10.74,"_meta":{"url":"https://quantoracle.dev","docs":"https://api.quantoracle.dev/docs","calculator":"https://quantoracle.dev/drawdown-calculator","powered_by":"QuantOracle"},"max_dd":-0.0952,"current_dd":0,"max_dd_pct":-9.52,"underwater_pct":62.5}},"exampleRequest":{"equity_curve":[10000,10500,10200,9800,9500,9900,10300,10800]},"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KR7lBva3KqwKhld0dTrNU","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes maximum drawdown, current drawdown, and underwater percentage from an equity curve","exampleAgentPrompt":"Calculate the max drawdown and underwater percentage for this equity curve: [10000, 10500, 10200, 9800, 9500, 9900, 10300, 10800] — I want to know the worst peak-to-trough loss and how much of the time it was below its high-water mark.","exampleUseCases":null,"resultDescription":"Returns maximum drawdown as a decimal (e.g. -0.0952) and as a percentage (e.g. -9.52%), current drawdown from the last peak, the percentage of time the portfolio was underwater (e.g. 62.5%), and computation time in milliseconds.","failureModes":["Empty or single-element equity curve returns error — needs at least two data points","Non-numeric values in equity curve array cause validation failure","Negative equity values may produce unexpected results","Very large arrays may increase latency beyond typical ~15ms","Malformed JSON body returns 400-level error"],"whenToPreferThis":"Use this endpoint when you need fast, precise drawdown metrics for a portfolio or strategy equity curve — particularly when you need both the maximum historical drawdown and the current drawdown simultaneously. Prefer over manual computation when you also need the underwater percentage (fraction of time spent below high-water mark). Ideal for backtesting pipelines, risk dashboards, or real-time strategy monitoring.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:51:51.821Z","isFirstParty":false}