{"uid":"cap_1Kb2tFIB22_YTWKH0wUzD","slug":"layer-profit-calculator-kalshi-polymarket-af5bcd1c","name":"Layer Profit Calculator — Kalshi & Polymarket","description":"One API for prediction markets. Find markets, stream normalized data, place orders, and track positions across Kalshi and Polymarket.","url":"https://uselayer.sh/v0/profit?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"kalshi":{"type":"object","required":["price"],"properties":{"price":{"type":"number"},"market_id":{"type":"string"}}},"contracts":{"type":"integer"},"polymarket":{"type":"object","properties":{"price":{"type":"number"},"category":{"type":"string"},"fee_rate":{"type":"number"}}},"polymarket_us":{"type":"object","properties":{"price":{"type":"number"}}}}},"responseSchema":{"type":"json","example":{"cost":97,"fees":1.77,"payout":100,"net_profit":1.23,"profitable":true,"return_pct":1.25}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jo1WKGU-YCpAXVqV7wQs0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates expected profit, fees, payout, and return percentage for a prediction market trade across Kalshi, Polymarket, or Polymarket US given a price and number of contracts.","exampleAgentPrompt":"If I buy 50 contracts on Kalshi at a price of 0.97, what would my net profit, fees, payout, and return percentage be for that trade?","exampleUseCases":[{"title":"Pre-trade Kalshi profit check","prompt":"Before I place this order, can you tell me my expected profit and return if I buy 100 contracts on Kalshi at a price of 0.94? I want to know the fees, payout, and whether it's actually worth doing."},{"title":"Polymarket fee impact analysis","prompt":"I'm looking at a Polymarket trade — the price is 0.85, the fee rate is 0.02, and I want to buy 200 contracts. What's my net profit and return percentage after fees?"},{"title":"Cross-venue profit comparison","prompt":"I want to compare profitability across venues — tell me the net profit and return for buying 75 contracts at 0.90 on Kalshi versus at 0.88 with a 0.01 fee rate on Polymarket, so I know which is the better deal."}],"resultDescription":"Returns a JSON object with the total cost of the trade, fees charged, expected payout on a win, net profit after fees, a boolean indicating whether the trade is profitable, and the return percentage (e.g. {cost: 97, fees: 1.77, payout: 100, net_profit: 1.23, profitable: true, return_pct: 1.25}).","failureModes":["Missing required price field for the specified venue returns a validation error","Invalid or negative contract count may produce unexpected results","Omitting both kalshi and polymarket objects may result in an error or empty response","Price values outside 0–1 range (prediction market probability) may cause calculation errors","Network or payment authorization failure returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need to evaluate the financial merit of a specific prediction market trade before placing an order — particularly when you want to account for venue-specific fee structures on Kalshi, Polymarket, or Polymarket US. Prefer this over manually estimating returns, especially when comparing venues or when fee rates materially impact profitability.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T23:35:56.547Z","isFirstParty":false,"canonicalSlug":"layer-profit-calculator-kalshi-polymarket-af5bcd1c"}