{"uid":"cap_sqrUZnYKBcRSAPfIbpNcr","slug":"delx-commerce-unrealized-pnl-calculator-5816543e","name":"Delx Commerce — Unrealized PnL 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/unrealized-pnl?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mark":{"type":"integer","description":"Input field: mark."},"size":{"type":"integer","description":"Input field: size."},"entry":{"type":"integer","description":"Input field: entry."}}},"responseSchema":{"type":"json","example":{"mark":95,"size":3,"entry":100,"schema":"delx/util-unrealized-pnl/v1","unrealized_pnl":-15}},"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_AfZ3IYHy0bgaLP1xuk0Na","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 unrealized profit and loss for a trading position given mark price, position size, and entry price.","exampleAgentPrompt":"What's my unrealized PnL on a position where I entered at 100, the current mark price is 95, and my size is 3 contracts?","exampleUseCases":[{"title":"Check open futures position loss","prompt":"I entered a futures position at 100, current mark price is 88, and my size is 5 — what's my unrealized PnL right now?"},{"title":"Verify profitable long trade","prompt":"I'm long 10 contracts with an entry price of 200 and the mark is now at 215. How much am I up on this position?"},{"title":"Real-time PnL in trading bot","prompt":"My trading bot has an open position with entry at 50, size of 2, and the current mark is 47 — calculate the unrealized PnL so I can decide whether to cut the position."}],"resultDescription":"Returns a JSON object containing the input values (mark, size, entry) along with the computed unrealized_pnl value (e.g. -15 for a losing position), and a schema identifier string.","failureModes":["Missing required fields (mark, size, or entry) result in a validation error","Non-integer values for mark, size, or entry may cause a 400 error","Payment failure via x402 protocol prevents API access","Network or service downtime returns a 5xx error"],"whenToPreferThis":"Choose this endpoint when you need a fast, verifiable, pay-per-call computation of unrealized PnL for a single open position without setting up any accounts. Ideal for AI agents and trading bots that need on-demand PnL checks with micropayment billing via USDC on Base or Solana.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:54:01.004Z","isFirstParty":false,"canonicalSlug":"delx-commerce-unrealized-pnl-calculator-5816543e"}