{"uid":"cap_dc1I-O7pt-GepYLanH3GK","slug":"absolute-pnl-calculator-9b097889","name":"Absolute PnL Calculator","description":"Absolute profit/loss from entry, exit, and position size. Call when marking closed trades or paper fills without a broker API. Returns absolute pnl in quote units 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/pnl-abs","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"exit":{"type":"integer","description":"Input field: exit."},"size":{"type":"integer","description":"Input field: size."},"entry":{"type":"integer","description":"Input field: entry."}}},"responseSchema":{"type":"json","example":{"pnl":20,"exit":110,"size":2,"entry":100,"schema":"delx/util-pnl-abs/v1"}},"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_zAFA_5xqmQo9LZfETR5Nc","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 absolute profit or loss in quote currency units from a closed trade given entry price, exit price, and position size.","exampleAgentPrompt":"Calculate the absolute PnL for a trade I entered at 42000, exited at 45500, with a position size of 10 units.","exampleUseCases":[{"title":"Marking closed crypto trades","prompt":"I closed a BTC position — I entered at 60000, exited at 63500, and my size was 2 units. What's my absolute profit in quote currency?"},{"title":"Paper trading fill reconciliation","prompt":"I'm paper trading and want to log my results: I entered at 150, exited at 138, and held 100 shares. Calculate my absolute loss."},{"title":"Algorithmic strategy backtesting","prompt":"For my backtest, I need the absolute PnL on a trade with entry 3200, exit 3750, and position size 5. Can you compute that for me?"}],"resultDescription":"Returns a deterministic JSON object containing the absolute PnL value expressed in quote currency units, computed locally from entry price, exit price, and position size — no live market data or external dependencies involved.","failureModes":["Missing required fields (entry, exit, or size) result in a validation error","Non-integer or malformed numeric inputs may cause a 400 bad request","Payment failure via x402 protocol prevents the call from being processed","Division or overflow edge cases with extreme numeric values may return an error"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, server-side computation of absolute trade PnL without connecting to a broker API, live market feed, or maintaining local math logic. Ideal for paper trading systems, backtesting pipelines, trade journaling agents, and fill reconciliation where you already have entry, exit, and size values and just need the quote-unit result.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:01:03.478Z","isFirstParty":false}