{"uid":"cap_5zYdUd6HpY5qPvurAl3hz","slug":"max-loss-at-stop-f17e5ebe","name":"Max Loss at Stop","description":"Max loss dollars for size and stop distance. Call when pre-trade loss caps and kill-switch thresholds. Returns max loss dollars 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/max-loss","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"size":{"type":"integer","description":"Input field: size."},"stop":{"type":"integer","description":"Input field: stop."},"entry":{"type":"integer","description":"Input field: entry."}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-max-loss/v1","max_loss":20}},"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_HHUjDpWIM8jEkNwa5Tfce","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":"Calculates maximum potential loss in dollars given a position size, entry price, and stop distance using deterministic local math.","exampleAgentPrompt":"What's the maximum dollar loss if I enter 100 shares at 150 with a stop at 140?","exampleUseCases":[{"title":"Pre-trade loss cap check","prompt":"Before I enter this trade, what's my max loss if I buy 200 contracts at entry price 50 with a stop set at 45?"},{"title":"Kill-switch threshold setting","prompt":"I want to set a kill-switch that fires if I lose more than $500 — can you calculate my max loss for a position of 50 units entered at 120 with a stop at 110 so I know if it's within limits?"},{"title":"Position sizing risk validation","prompt":"I'm thinking about taking 300 shares at an entry of 80 with a stop at 75 — how many dollars am I risking if the stop gets triggered?"}],"resultDescription":"Returns a deterministic JSON object containing the maximum loss in dollars computed from the provided size, entry price, and stop price, with no reliance on live market data or external feeds.","failureModes":["Missing required fields (size, stop, or entry) returns validation error","Non-integer inputs may cause schema rejection","Payment failure or insufficient USDC balance blocks the call","Stop price above entry for a long position may produce unexpected or negative loss values if not validated by caller"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, offline calculation of maximum dollar loss for a trade given known size, entry, and stop values — particularly for pre-trade risk gating, kill-switch calibration, or position size validation. It requires no API keys, live market data, or external dependencies, making it reliable and auditable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:56:47.493Z","isFirstParty":false}