{"uid":"cap_6VguscJiqFj4nwbImsqOg","slug":"delx-commerce-profit-factor-calculator-a884afa0","name":"Delx Commerce Profit Factor 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/profit-factor?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"pnls":{"type":"array","description":"Input field: pnls."}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-profit-factor/v1","infinite":false,"gross_win":20,"gross_loss":7,"profit_factor":2.857142857142857}},"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_uYUrw8508qX8Z4VDEBHWX","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 the profit factor from a list of PnL values, returning gross wins, gross losses, and the win/loss ratio","exampleAgentPrompt":"Calculate the profit factor for these trade PnLs: [15, -3, 5, -4, 10, 8, -2, -1, 12, -3] — I want to see gross wins, gross losses, and the overall ratio.","exampleUseCases":[{"title":"Evaluating algorithmic strategy performance","prompt":"I ran a backtest and got these PnLs: [200, -80, 150, -30, 90, -20, 300, -100]. Can you calculate the profit factor so I know if the strategy is worth trading live?"},{"title":"Daily trading journal review","prompt":"Here are today's trade results in dollars: [50, -20, 30, -10, 75, -15, 40]. What's my profit factor for today, and what were my total gross wins and losses?"},{"title":"Comparing two trading systems","prompt":"System A had PnLs of [100, -50, 80, -20, 60] and System B had [200, -150, 50, -10, 30]. Calculate the profit factor for both so I can see which one is more efficient."}],"resultDescription":"Returns a JSON object with the schema identifier, a boolean indicating whether the profit factor is infinite (no losses), gross win total, gross loss total, and the computed profit factor as a decimal number (e.g. 2.857 meaning $2.86 won per $1 lost).","failureModes":["Empty or missing pnls array returns an error or undefined result","All-negative PnL array yields zero profit factor","All-positive PnL array yields infinite profit factor (handled via infinite:true flag)","Malformed input types (non-numeric values in array) may cause computation errors","Payment failure via x402 protocol blocks the request before computation"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap, deterministic profit factor computation from raw PnL data without setting up any account or subscription. Ideal for AI trading agents that need on-demand performance metric calculation at $0.001 per call with USDC micropayment via x402. Prefer over building your own logic when you need verifiable delivery guarantees and no infrastructure overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:59.431Z","isFirstParty":false,"canonicalSlug":"delx-commerce-profit-factor-calculator-a884afa0"}