{"uid":"cap_COI-6au3JgctGBRuA3M9M","slug":"percent-pnl-calculator-556c4e30","name":"Percent PnL Calculator","description":"Percent profit/loss from entry and exit prices. Call when ranking trades or alerts by return instead of absolute dollars. Returns pnl percent from entry→exit 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-pct","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"exit":{"type":"integer","description":"Input field: exit."},"entry":{"type":"integer","description":"Input field: entry."}}},"responseSchema":{"type":"json","example":{"exit":110,"entry":100,"schema":"delx/util-pnl-pct/v1","pnl_pct":10}},"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_jkGNMw6SR7913fTNRcKya","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 percent profit/loss from entry and exit prices as deterministic local math, returning a JSON result for $0.001 USDC.","exampleAgentPrompt":"What's the percent profit/loss on a trade where I entered at 850 and exited at 920?","exampleUseCases":[{"title":"Rank alerts by percent return","prompt":"I have a list of trade alerts — can you compute the percent PnL for each one so I can rank them by return instead of raw dollar gain? Entry was 200, exit was 215."},{"title":"Evaluate closed position performance","prompt":"I closed a position I entered at 4500 and exited at 4250 — what's my percent loss on that trade?"},{"title":"Screen trades by threshold return","prompt":"I want to filter out trades that didn't hit at least 5% gain. Can you calculate the percent PnL for a trade with entry 1000 and exit 1048 so I can check if it qualifies?"}],"resultDescription":"Returns a deterministic JSON object containing the percent profit or loss calculated from the entry and exit price inputs, with no external data sources or state involved.","failureModes":["Missing entry or exit field returns a validation error","Non-numeric or non-integer values may cause a 400 bad request","Entry price of zero causes a division-by-zero error","Payment not attached or insufficient USDC results in a 402 Payment Required response"],"whenToPreferThis":"Use this endpoint when you need a fast, cheap, deterministic percent PnL calculation with no API keys, no market data feed, and no external dependencies — especially when ranking or filtering trades by return rather than absolute dollar value. Prefer this over building custom math in an agent when you want a reliable JSON result via x402 micropayment on Base.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:18:45.758Z","isFirstParty":false}