{"uid":"cap_xJ6FRa7Ee_LSKxUytg-1b","slug":"delx-commerce-pnl-with-fees-calculator-4c07bf30","name":"Delx Commerce PnL with Fees 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-with-fees?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."},"fee_rate":{"type":"number","description":"Input field: fee rate."}}},"responseSchema":{"type":"json","example":{"fees":0.21,"schema":"delx/util-pnl-with-fees/v1","net_pnl":9.79,"gross_pnl":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_5a7OtG5MoOpVP5ggaO4bK","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 gross PnL, trading fees, and net PnL for a trade given entry price, exit price, position size, and fee rate","exampleAgentPrompt":"Calculate my net PnL for a trade where I entered at 42000, exited at 42500, with a position size of 2, and a fee rate of 0.001 — break out the gross profit, fees paid, and what I actually take home.","exampleUseCases":[{"title":"Crypto futures trade review","prompt":"I just closed a BTC futures position — I entered at 30000, exited at 31000, size was 1, and the fee rate is 0.001. What's my gross profit, how much did I pay in fees, and what's my net PnL?"},{"title":"Options strategy profit check","prompt":"Can you work out my net profit after fees for a trade I entered at 500 and exited at 510, with a size of 5 contracts and a 0.002 fee rate? I want to see both gross and net."},{"title":"Automated trade journal entry","prompt":"For my trade log: entry was 1800, exit 1850, position size 10, fee rate 0.0015 — give me the gross PnL, fees deducted, and final net PnL so I can record it."}],"resultDescription":"Returns a JSON object containing gross_pnl (profit before fees), fees (total fees charged based on size and fee rate), and net_pnl (gross_pnl minus fees), along with a schema identifier string for the response format.","failureModes":["Missing required fields (entry, exit, size, fee_rate) result in a validation error","Non-integer entry/exit/size values may cause type errors","Negative or zero size values may yield unexpected results","Payment failure via x402 will prevent result delivery","Extremely high fee rates may produce negative net PnL edge cases"],"whenToPreferThis":"Choose this endpoint when an agent needs a fast, verifiable, pay-per-use PnL computation that breaks down gross profit, fees, and net profit in a single call — particularly useful for trading bots, portfolio trackers, or automated trade journals that process many positions without needing a persistent subscription or account. Prefer over manual calculation when auditability and exact fee accounting are required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:46.559Z","isFirstParty":false,"canonicalSlug":"delx-commerce-pnl-with-fees-calculator-4c07bf30"}