{"uid":"cap_GAh9ylDSxKha-qkvti-X2","slug":"delx-commerce-pnl-percentage-calculator-8bcc3158","name":"Delx Commerce PnL Percentage 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-pct?utm_source=zero.xyz","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_HK4g87i4Z2mqRPWLzbSNP","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 the profit and loss percentage given an entry price and an exit price","exampleAgentPrompt":"What's my PnL percentage if I entered a trade at 100 and exited at 110?","exampleUseCases":[{"title":"Crypto trade return verification","prompt":"I bought ETH at 1800 and sold at 2160 — what's my percentage gain on that trade?"},{"title":"Stock position profit calculation","prompt":"Calculate the PnL percent for a position where I entered at 450 and exited at 423 — did I lose money and by how much percent?"},{"title":"Automated trading bot reporting","prompt":"My bot closed a trade with entry at 500 and exit at 575, can you compute the PnL percentage so I can log it in the daily report?"}],"resultDescription":"Returns a JSON object containing the input entry and exit prices echoed back, the computed PnL percentage as a numeric value, and a schema identifier string (delx/util-pnl-pct/v1) confirming the calculation version.","failureModes":["Missing entry or exit field returns a 400 or validation error","Non-integer values for entry or exit may cause rejection or unexpected behavior","Division-by-zero scenario if entry is 0","Payment failure via x402 if USDC balance is insufficient, resulting in a 402 response"],"whenToPreferThis":"Choose this endpoint when you need a fast, verifiable, pay-per-use PnL percentage computation with no signup overhead — especially in agentic workflows where you want on-chain payment proof via x402 on Base or Solana and a guaranteed exact price of $0.001 USDC per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:53.950Z","isFirstParty":false,"canonicalSlug":"delx-commerce-pnl-percentage-calculator-8bcc3158"}