{"uid":"cap_l9o2OvRyb6f80UFagjSIN","slug":"delx-commerce-pnl-absolute-calculator-ca9e0c79","name":"Delx Commerce PnL Absolute Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/pnl-abs?utm_source=zero.xyz","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__tBC1vr77F-9UVzQfnj5E","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 and loss (PnL) value for a trade given entry price, exit price, and position size","exampleAgentPrompt":"Calculate the absolute PnL for a trade where I entered at 100, exited at 110, and had a position size of 2.","exampleUseCases":[{"title":"Realized profit check on closed trade","prompt":"I just closed a position — I entered at 250, exited at 310, and my size was 5 units. What's my absolute profit?"},{"title":"Loss calculation for risk review","prompt":"Can you tell me the absolute PnL on a trade where entry was 500, exit was 470, and size was 3? I want to know the exact dollar loss."},{"title":"Backtesting trade outcome verification","prompt":"For a backtest result with entry price 1200, exit price 1350, and position size of 10, what is the absolute PnL?"}],"resultDescription":"Returns a JSON object containing the calculated absolute PnL value along with the echoed entry price, exit price, and position size, tagged with a schema identifier (delx/util-pnl-abs/v1). Example: {\"pnl\": 20, \"exit\": 110, \"size\": 2, \"entry\": 100, \"schema\": \"delx/util-pnl-abs/v1\"}.","failureModes":["Missing required fields (entry, exit, or size) returns a validation error","Non-integer values for entry, exit, or size may cause a type error","Payment failure or insufficient USDC balance results in a 402 Payment Required response","Network timeout on Base or Solana payment rails may prevent settlement"],"whenToPreferThis":"Choose this endpoint when you need a fast, trustless, pay-per-result computation of absolute PnL without any signup or API key overhead. It is ideal for AI agents that handle trade outcome calculations on-the-fly and require verifiable, auditable delivery via x402 micropayments on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:51.462Z","isFirstParty":false,"canonicalSlug":"delx-commerce-pnl-absolute-calculator-ca9e0c79"}