{"slug":"api-edifiedlab-com-v1-market-pnl-stats-85ff06","title":"Compute trade P&L statistics from caller-supplied realized P&L values","host":"api.edifiedlab.com","method":"POST","resource":"https://api.edifiedlab.com/v1/market/pnl-stats","category":"market","description":"Compute trade P&L statistics from caller-supplied realized P&L values: win rate, profit factor, max drawdown, and rolling-window statistics. No market data or account access -- purely a function of the numbers supplied.","price_listed":0.011,"price_asked":0.011,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":735,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"pnls":[120.5,-45,300.25],"rolling_window":20},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"properties":{"pnls":{"items":{"maximum":1e+150,"minimum":-1e+150,"type":"number"},"maxItems":5000,"minItems":1,"type":"array"},"rolling_window":{"default":20,"maximum":5000,"minimum":1,"type":"integer"}},"required":["pnls"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":false,"properties":{"action":{"const":"calculate","type":"string"},"avg_loss":{"type":"number"},"avg_win":{"type":"number"},"expectancy":{"type":"number"},"expectancy_pvalue":{"type":"number"},"expectancy_pvalue_method":{"const":"student_t_two_sided","type":"string"},"expectancy_pvalue_sample_size":{"minimum":1,"type":"integer"},"kelly":{"type":"number"},"longest_loss_streak":{"type":"integer"},"max_drawdown":{"type":"number"},"n":{"type":"integer"},"payload":{"const":"pnl_stats","type":"string"},"profit_factor":{"type":["number","null"]},"rolling_expectancy":{"type":"number"},"rolling_kelly":{"type":"number"},"rolling_n":{"type":"integer"},"rolling_win_rate":{"type":"number"},"trailing_loss_streak":{"type":"integer"},"win_rate":{"type":"number"}},"required":["payload","action","n","win_rate","avg_win","avg_loss","expectancy","profit_factor","max_drawdown","longest_loss_streak","trailing_loss_streak","kelly","rolling_n","rolling_expectancy","rolling_win_rate","rolling_kelly","expectancy_pvalue","expectancy_pvalue_sample_size","expectancy_pvalue_method"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.011,"price_match":true,"latency_ms":735,"error":null}],"description_full":"Compute trade P&L statistics from caller-supplied realized P&L values: win rate, profit factor, max drawdown, and rolling-window statistics. No market data or account access -- purely a function of the numbers supplied.","last_updated":"2026-09-19T15:31:46.277Z","schemes":["exact"]}