{"uid":"cap_OKSr24XzWRQVTt6bJcRrI","slug":"vextorium-pnl-calculator-94cdec77","name":"Vextorium PnL Calculator","description":"232 pay-per-call data APIs for AI agents: official statistics and economy (ECB, Fed, Eurostat, World Bank, SEC, BOE, INE), crypto prices and sentiment, Spanish public data, compliance (sanctions, VAT, IBAN, LEI), science, weather, web and developer tools and local AI text tools. Pay in USDC via x402.","url":"https://api.vextorium.com/v1/pnl-calculator?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"days":{"type":"number"},"side":{"enum":["long","short"],"type":"string"},"input":{"type":"number"},"amount":{"type":"number"},"output":{"type":"number"},"fee_pct":{"type":"number"},"leverage":{"type":"number"},"funding_pct_day":{"type":"number"}}},"responseSchema":{"type":"json","example":{"fees":6.15,"side":"long","margin":1200,"net_pnl":293.85,"gross_pnl":300,"paid_funding":0,"input_notional":6000,"price_change_pct":5,"return_on_margin_pct":24.488,"breakeven_price_approx":60060}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ZNNNjZX4tLDsjtJpbE41T","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates gross PnL, net PnL, fees, funding costs, margin, and return on margin for long or short leveraged trading positions given entry/exit prices and position size.","exampleAgentPrompt":"Calculate my PnL for a long position where I entered at 60000 and exited at 63000 with a notional size of 6000 USDC, using 5x leverage, a 0.1% fee each way, and held for 3 days with 0.01% daily funding.","exampleUseCases":[{"title":"Crypto futures trade PnL review","prompt":"I just closed a long BTC futures trade — I entered at $60,000 and exited at $63,000, my position notional was $6,000 with 5x leverage, fees were 0.1% each side, and I held for 3 days with 0.01% daily funding. What was my net PnL and return on margin?"},{"title":"Short position loss assessment","prompt":"Can you calculate my PnL on a short trade where I entered at $2,500 ETH and it moved up to $2,700? I had a $5,000 notional size with 3x leverage and 0.05% trading fees — I want to see gross loss, net loss after fees, and what my breakeven would have been."},{"title":"Pre-trade profitability estimation","prompt":"Before I open this trade, can you estimate what my net PnL and ROI would be if I go long with $10,000 notional at the current price and my target exit is 8% higher, using 10x leverage and assuming 0.1% fees and 5 days of 0.02% daily funding?"}],"resultDescription":"Returns a JSON object with: gross_pnl (pre-fee profit/loss), net_pnl (after fees and funding), fees (total fee cost), paid_funding (total funding paid over holding period), margin (capital at risk), input_notional (full position size), price_change_pct (percentage move from entry to exit), return_on_margin_pct (net PnL as % of margin), side (long/short), and breakeven_price_approx (approximate price needed to break even after costs).","failureModes":["Missing required fields (input, output, amount) returns validation error","Invalid side enum value (not 'long' or 'short') causes rejection","Negative or zero amount/input/output values may produce nonsensical results","Leverage of zero or negative causes division errors","Days value of zero with non-zero funding rate produces zero funding cost silently"],"whenToPreferThis":"Use this endpoint when you need a structured, multi-factor PnL breakdown for leveraged trading positions including funding costs, fees, and return on margin — especially for DeFi perpetuals or crypto derivatives. Prefer over manual calculation when all variables (leverage, funding rate, fees, holding period) need to be combined accurately. Best suited for post-trade analysis, pre-trade scenario planning, or building trading dashboards.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:44:40.921Z","isFirstParty":false,"canonicalSlug":"vextorium-pnl-calculator-94cdec77"}