{"id":"arbitrage-lawyer","title":"Cross-Platform Arbitrage & Resolution Rules Lawyer","description":"Finds fine-print divergences between two prediction markets (e.g. Polymarket vs Kalshi), prices basis risk after fees, and returns verdict.action ARBITRAGE_SAFE / LOW_ANNUALIZED_YIELD / BASIS_RISK_TRAP / NO_EDGE / INSUFFICIENT_EVIDENCE with edge in bps, the probability both legs lose, days to resolution, annualized return and Kelly hedge size capped by top-of-book depth. Each market can be given as a Polymarket slug or URL or a Kalshi ticker (rules, best asks and per-leg fees are read live) or as pasted rules and prices (USD per share, 0-1). Every cited clause is checked verbatim against the rules you supplied. If the rules analysis fails after live prices were read, you still get the signed price math as a partial result. Not financial advice.","roi":"One avoided basis-risk trap (both legs resolving against you) saves the full position; a clean spread comes back sized, depth-capped and annualized so you can compare it with idle-cash yield.","audience":"crypto","channels":["x402","mcp","rapidapi"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/arbitrage-lawyer","path":"/api/v1/arbitrage-lawyer","contentType":"application/json"},"price":{"amount":"0.75","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["marketA","marketB"],"properties":{"marketA":{"type":"object","additionalProperties":false,"properties":{"market":{"type":"string","minLength":3,"maxLength":500,"description":"Polymarket slug, market URL or conditionId, or a Kalshi ticker or URL. Fills platform, title, resolution rules, best-ask prices, per-leg fees and end date from the live market; any field you also pass overrides it. Without market, platform, title, resolutionRules, yesPrice and noPrice are required."},"platform":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. Polymarket, Kalshi"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000},"resolutionRules":{"type":"string","minLength":1,"maxLength":20000,"description":"Exact resolution rules and fine print."},"yesPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one Yes share in USD (0-1)."},"noPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one No share in USD (0-1)."},"feeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Trading fee on this leg in bps of notional."},"endDate":{"type":"string","minLength":10,"maxLength":40,"description":"ISO date this market resolves; sets days to resolution and the annualized return."},"yesFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying Yes here; overrides feeBps for that leg."},"noFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying No here; overrides feeBps for that leg."}}},"marketB":{"type":"object","additionalProperties":false,"properties":{"market":{"type":"string","minLength":3,"maxLength":500,"description":"Polymarket slug, market URL or conditionId, or a Kalshi ticker or URL. Fills platform, title, resolution rules, best-ask prices, per-leg fees and end date from the live market; any field you also pass overrides it. Without market, platform, title, resolutionRules, yesPrice and noPrice are required."},"platform":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. Polymarket, Kalshi"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000},"resolutionRules":{"type":"string","minLength":1,"maxLength":20000,"description":"Exact resolution rules and fine print."},"yesPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one Yes share in USD (0-1)."},"noPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one No share in USD (0-1)."},"feeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Trading fee on this leg in bps of notional."},"endDate":{"type":"string","minLength":10,"maxLength":40,"description":"ISO date this market resolves; sets days to resolution and the annualized return."},"yesFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying Yes here; overrides feeBps for that leg."},"noFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying No here; overrides feeBps for that leg."}}},"minEdgeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Default 100 (1%)."},"bankrollUsd":{"type":"number","minimum":0,"maximum":1000000000000,"description":"Used to convert the Kelly fraction to USD."},"minAnnualizedReturnPct":{"type":"number","minimum":0,"maximum":10000,"description":"Minimum annualized risk-adjusted return, in percent, for verdict.action ARBITRAGE_SAFE (default 5). Below it the action is LOW_ANNUALIZED_YIELD. Applied only when both end dates are known."}}},"resultSchema":{"type":"object","additionalProperties":false,"required":["same_underlying_event","equivalence_score","resolution_source_a","resolution_source_b","deadline_a","deadline_b","divergences","loophole_clauses","summary","verdict","disclaimer","timing","partial","missing","warnings","resolved_markets","analysis_mode","unverified_divergences","recommendation","best_direction","directions","unavailable_directions","hedge_sizing"],"properties":{"same_underlying_event":{"type":"boolean"},"equivalence_score":{"type":"integer","description":"0-100: how closely the resolution criteria coincide."},"resolution_source_a":{"type":"string"},"resolution_source_b":{"type":"string"},"deadline_a":{"type":"string","description":"Resolution deadline and timezone as written, or \"unspecified\"."},"deadline_b":{"type":"string"},"divergences":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["scenario","market_a_resolves","market_b_resolves","probability_pct","clause_a","clause_b","clauses_verified"],"properties":{"scenario":{"type":"string"},"market_a_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"],"description":"YES, NO, VOID (cancelled or refunded; priced as a refund of the purchase price) or SPLIT (50-50 settlement; each share pays $0.50)."},"market_b_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"]},"probability_pct":{"type":"number","description":"Probability (0-100) this scenario occurs."},"clause_a":{"type":"string","description":"Verbatim clause from market A that drives its outcome."},"clause_b":{"type":"string","description":"Verbatim clause from market B that drives its outcome."},"clauses_verified":{"type":"boolean","description":"Both quoted clauses were found in the supplied rules; an unverified scenario is priced only when it lowers the payout."}}}},"loophole_clauses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["market","clause","risk"],"properties":{"market":{"type":"string","enum":["A","B"]},"clause":{"type":"string"},"risk":{"type":"string"}}}},"summary":{"type":"string"},"verdict":{"type":"object","description":"Machine-readable call, computed in code. Leads the answer; detail follows in the other fields.","properties":{"action":{"type":"string","enum":["ARBITRAGE_SAFE","LOW_ANNUALIZED_YIELD","BASIS_RISK_TRAP","NO_EDGE","INSUFFICIENT_EVIDENCE"]},"reason_code":{"type":"string","description":"Stable code for why this action was returned."},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"0-1; null when no judgment was made."},"confidence_label":{"type":"string","enum":["low","medium","high"]},"edge_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Expected edge in bps of cost; null when not priced."},"edge_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Expected edge in USD (cover-claim: cover-asset units); null when not priced."},"size_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Suggested stake in USD; null when not sized."},"headline":{"type":"string"},"drivers":{"type":"array","items":{"type":"string"}},"next_step":{"type":"string"},"partial":{"type":"boolean","description":"True when part of the analysis could not run; see missing."},"missing":{"type":"array","items":{"type":"string"}}}},"disclaimer":{"type":"string","description":"Not financial advice."},"timing":{"type":"object","description":"days_to_resolution and annualized_return_pct (null unless both end dates are known)."},"partial":{"type":"boolean","description":"True when the rules analysis failed and only price math is reported."},"missing":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"resolved_markets":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"What was read from each market reference: venue, id, fee model, ask sizes, warnings."},"analysis_mode":{"type":"string","enum":["model","price_only"],"description":"price_only: no positive spread at the quoted prices, so NO_EDGE was decided without the rules analysis."},"unverified_divergences":{"type":"integer"},"recommendation":{"type":"string","enum":["ARBITRAGE_SAFE","BASIS_RISK_TRAP","NO_EDGE","INSUFFICIENT_EVIDENCE"]},"best_direction":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}},"directions":{"type":"array","items":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}}},"unavailable_directions":{"type":"array","items":{"type":"string"},"description":"Directions skipped because a leg has no ask (price 0)."},"hedge_sizing":{"type":"object"}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["same_underlying_event","equivalence_score","resolution_source_a","resolution_source_b","deadline_a","deadline_b","divergences","loophole_clauses","summary","verdict","disclaimer","timing","partial","missing","warnings","resolved_markets","analysis_mode","unverified_divergences","recommendation","best_direction","directions","unavailable_directions","hedge_sizing"],"properties":{"same_underlying_event":{"type":"boolean"},"equivalence_score":{"type":"integer","description":"0-100: how closely the resolution criteria coincide."},"resolution_source_a":{"type":"string"},"resolution_source_b":{"type":"string"},"deadline_a":{"type":"string","description":"Resolution deadline and timezone as written, or \"unspecified\"."},"deadline_b":{"type":"string"},"divergences":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["scenario","market_a_resolves","market_b_resolves","probability_pct","clause_a","clause_b","clauses_verified"],"properties":{"scenario":{"type":"string"},"market_a_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"],"description":"YES, NO, VOID (cancelled or refunded; priced as a refund of the purchase price) or SPLIT (50-50 settlement; each share pays $0.50)."},"market_b_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"]},"probability_pct":{"type":"number","description":"Probability (0-100) this scenario occurs."},"clause_a":{"type":"string","description":"Verbatim clause from market A that drives its outcome."},"clause_b":{"type":"string","description":"Verbatim clause from market B that drives its outcome."},"clauses_verified":{"type":"boolean","description":"Both quoted clauses were found in the supplied rules; an unverified scenario is priced only when it lowers the payout."}}}},"loophole_clauses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["market","clause","risk"],"properties":{"market":{"type":"string","enum":["A","B"]},"clause":{"type":"string"},"risk":{"type":"string"}}}},"summary":{"type":"string"},"verdict":{"type":"object","description":"Machine-readable call, computed in code. Leads the answer; detail follows in the other fields.","properties":{"action":{"type":"string","enum":["ARBITRAGE_SAFE","LOW_ANNUALIZED_YIELD","BASIS_RISK_TRAP","NO_EDGE","INSUFFICIENT_EVIDENCE"]},"reason_code":{"type":"string","description":"Stable code for why this action was returned."},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"0-1; null when no judgment was made."},"confidence_label":{"type":"string","enum":["low","medium","high"]},"edge_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Expected edge in bps of cost; null when not priced."},"edge_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Expected edge in USD (cover-claim: cover-asset units); null when not priced."},"size_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Suggested stake in USD; null when not sized."},"headline":{"type":"string"},"drivers":{"type":"array","items":{"type":"string"}},"next_step":{"type":"string"},"partial":{"type":"boolean","description":"True when part of the analysis could not run; see missing."},"missing":{"type":"array","items":{"type":"string"}}}},"disclaimer":{"type":"string","description":"Not financial advice."},"timing":{"type":"object","description":"days_to_resolution and annualized_return_pct (null unless both end dates are known)."},"partial":{"type":"boolean","description":"True when the rules analysis failed and only price math is reported."},"missing":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"resolved_markets":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"What was read from each market reference: venue, id, fee model, ask sizes, warnings."},"analysis_mode":{"type":"string","enum":["model","price_only"],"description":"price_only: no positive spread at the quoted prices, so NO_EDGE was decided without the rules analysis."},"unverified_divergences":{"type":"integer"},"recommendation":{"type":"string","enum":["ARBITRAGE_SAFE","BASIS_RISK_TRAP","NO_EDGE","INSUFFICIENT_EVIDENCE"]},"best_direction":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}},"directions":{"type":"array","items":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}}},"unavailable_directions":{"type":"array","items":{"type":"string"},"description":"Directions skipped because a leg has no ask (price 0)."},"hedge_sizing":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"marketA":{"platform":"Polymarket","title":"Will Bitcoin reach $150,000 by December 31, 2027?","resolutionRules":"This market will resolve to Yes if any Binance 1 minute candle for BTC/USDT between Jan 1, 2027 00:00 and Dec 31, 2027 23:59 ET has a final High price of $150,000 or higher. Otherwise it resolves to No. The resolution source is Binance BTC/USDT with the 1m candle selected.","yesPrice":0.31,"noPrice":0.7,"feeBps":0,"endDate":"2027-12-31T23:59:00-05:00"},"marketB":{"platform":"Kalshi","title":"Bitcoin price at the end of 2027: above $150,000?","resolutionRules":"If the CF Benchmarks BRTI price at 5:00 PM EST on December 31, 2027 is above $150,000, then the market resolves to Yes. Otherwise it resolves to No. The Source Agency is CF Benchmarks; the value is the average BRTI over the 60 seconds before the expiration time.","yesPrice":0.22,"noPrice":0.79,"yesFeeBps":546,"noFeeBps":147,"endDate":"2027-12-31T17:00:00-05:00"},"minEdgeBps":100,"bankrollUsd":10000},"openapiOperation":{"operationId":"arbitrage_lawyer","summary":"Cross-Platform Arbitrage & Resolution Rules Lawyer","description":"Finds fine-print divergences between two prediction markets (e.g. Polymarket vs Kalshi), prices basis risk after fees, and returns verdict.action ARBITRAGE_SAFE / LOW_ANNUALIZED_YIELD / BASIS_RISK_TRAP / NO_EDGE / INSUFFICIENT_EVIDENCE with edge in bps, the probability both legs lose, days to resolution, annualized return and Kelly hedge size capped by top-of-book depth. Each market can be given as a Polymarket slug or URL or a Kalshi ticker (rules, best asks and per-leg fees are read live) or as pasted rules and prices (USD per share, 0-1). Every cited clause is checked verbatim against the rules you supplied. If the rules analysis fails after live prices were read, you still get the signed price math as a partial result. Not financial advice.\n\nPrice: 0.75 USDC on Base (x402).","x-x402-price-usdc":"0.75","x-x402-amount":"750000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.75"}},"x-audience":"crypto","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/arbitrage-lawyer","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["marketA","marketB"],"properties":{"marketA":{"type":"object","additionalProperties":false,"properties":{"market":{"type":"string","minLength":3,"maxLength":500,"description":"Polymarket slug, market URL or conditionId, or a Kalshi ticker or URL. Fills platform, title, resolution rules, best-ask prices, per-leg fees and end date from the live market; any field you also pass overrides it. Without market, platform, title, resolutionRules, yesPrice and noPrice are required."},"platform":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. Polymarket, Kalshi"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000},"resolutionRules":{"type":"string","minLength":1,"maxLength":20000,"description":"Exact resolution rules and fine print."},"yesPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one Yes share in USD (0-1)."},"noPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one No share in USD (0-1)."},"feeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Trading fee on this leg in bps of notional."},"endDate":{"type":"string","minLength":10,"maxLength":40,"description":"ISO date this market resolves; sets days to resolution and the annualized return."},"yesFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying Yes here; overrides feeBps for that leg."},"noFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying No here; overrides feeBps for that leg."}}},"marketB":{"type":"object","additionalProperties":false,"properties":{"market":{"type":"string","minLength":3,"maxLength":500,"description":"Polymarket slug, market URL or conditionId, or a Kalshi ticker or URL. Fills platform, title, resolution rules, best-ask prices, per-leg fees and end date from the live market; any field you also pass overrides it. Without market, platform, title, resolutionRules, yesPrice and noPrice are required."},"platform":{"type":"string","minLength":1,"maxLength":100,"description":"e.g. Polymarket, Kalshi"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":5000},"resolutionRules":{"type":"string","minLength":1,"maxLength":20000,"description":"Exact resolution rules and fine print."},"yesPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one Yes share in USD (0-1)."},"noPrice":{"type":"number","minimum":0,"maximum":1,"description":"Best ask for one No share in USD (0-1)."},"feeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Trading fee on this leg in bps of notional."},"endDate":{"type":"string","minLength":10,"maxLength":40,"description":"ISO date this market resolves; sets days to resolution and the annualized return."},"yesFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying Yes here; overrides feeBps for that leg."},"noFeeBps":{"type":"number","minimum":0,"maximum":2000,"description":"Fee in bps of notional for buying No here; overrides feeBps for that leg."}}},"minEdgeBps":{"type":"number","minimum":0,"maximum":10000,"description":"Default 100 (1%)."},"bankrollUsd":{"type":"number","minimum":0,"maximum":1000000000000,"description":"Used to convert the Kelly fraction to USD."},"minAnnualizedReturnPct":{"type":"number","minimum":0,"maximum":10000,"description":"Minimum annualized risk-adjusted return, in percent, for verdict.action ARBITRAGE_SAFE (default 5). Below it the action is LOW_ANNUALIZED_YIELD. Applied only when both end dates are known."}}},"example":{"marketA":{"platform":"Polymarket","title":"Will Bitcoin reach $150,000 by December 31, 2027?","resolutionRules":"This market will resolve to Yes if any Binance 1 minute candle for BTC/USDT between Jan 1, 2027 00:00 and Dec 31, 2027 23:59 ET has a final High price of $150,000 or higher. Otherwise it resolves to No. The resolution source is Binance BTC/USDT with the 1m candle selected.","yesPrice":0.31,"noPrice":0.7,"feeBps":0,"endDate":"2027-12-31T23:59:00-05:00"},"marketB":{"platform":"Kalshi","title":"Bitcoin price at the end of 2027: above $150,000?","resolutionRules":"If the CF Benchmarks BRTI price at 5:00 PM EST on December 31, 2027 is above $150,000, then the market resolves to Yes. Otherwise it resolves to No. The Source Agency is CF Benchmarks; the value is the average BRTI over the 60 seconds before the expiration time.","yesPrice":0.22,"noPrice":0.79,"yesFeeBps":546,"noFeeBps":147,"endDate":"2027-12-31T17:00:00-05:00"},"minEdgeBps":100,"bankrollUsd":10000}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","additionalProperties":false,"required":["same_underlying_event","equivalence_score","resolution_source_a","resolution_source_b","deadline_a","deadline_b","divergences","loophole_clauses","summary","verdict","disclaimer","timing","partial","missing","warnings","resolved_markets","analysis_mode","unverified_divergences","recommendation","best_direction","directions","unavailable_directions","hedge_sizing"],"properties":{"same_underlying_event":{"type":"boolean"},"equivalence_score":{"type":"integer","description":"0-100: how closely the resolution criteria coincide."},"resolution_source_a":{"type":"string"},"resolution_source_b":{"type":"string"},"deadline_a":{"type":"string","description":"Resolution deadline and timezone as written, or \"unspecified\"."},"deadline_b":{"type":"string"},"divergences":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["scenario","market_a_resolves","market_b_resolves","probability_pct","clause_a","clause_b","clauses_verified"],"properties":{"scenario":{"type":"string"},"market_a_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"],"description":"YES, NO, VOID (cancelled or refunded; priced as a refund of the purchase price) or SPLIT (50-50 settlement; each share pays $0.50)."},"market_b_resolves":{"type":"string","enum":["YES","NO","VOID","SPLIT"]},"probability_pct":{"type":"number","description":"Probability (0-100) this scenario occurs."},"clause_a":{"type":"string","description":"Verbatim clause from market A that drives its outcome."},"clause_b":{"type":"string","description":"Verbatim clause from market B that drives its outcome."},"clauses_verified":{"type":"boolean","description":"Both quoted clauses were found in the supplied rules; an unverified scenario is priced only when it lowers the payout."}}}},"loophole_clauses":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["market","clause","risk"],"properties":{"market":{"type":"string","enum":["A","B"]},"clause":{"type":"string"},"risk":{"type":"string"}}}},"summary":{"type":"string"},"verdict":{"type":"object","description":"Machine-readable call, computed in code. Leads the answer; detail follows in the other fields.","properties":{"action":{"type":"string","enum":["ARBITRAGE_SAFE","LOW_ANNUALIZED_YIELD","BASIS_RISK_TRAP","NO_EDGE","INSUFFICIENT_EVIDENCE"]},"reason_code":{"type":"string","description":"Stable code for why this action was returned."},"confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"0-1; null when no judgment was made."},"confidence_label":{"type":"string","enum":["low","medium","high"]},"edge_bps":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Expected edge in bps of cost; null when not priced."},"edge_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Expected edge in USD (cover-claim: cover-asset units); null when not priced."},"size_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Suggested stake in USD; null when not sized."},"headline":{"type":"string"},"drivers":{"type":"array","items":{"type":"string"}},"next_step":{"type":"string"},"partial":{"type":"boolean","description":"True when part of the analysis could not run; see missing."},"missing":{"type":"array","items":{"type":"string"}}}},"disclaimer":{"type":"string","description":"Not financial advice."},"timing":{"type":"object","description":"days_to_resolution and annualized_return_pct (null unless both end dates are known)."},"partial":{"type":"boolean","description":"True when the rules analysis failed and only price math is reported."},"missing":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"resolved_markets":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"What was read from each market reference: venue, id, fee model, ask sizes, warnings."},"analysis_mode":{"type":"string","enum":["model","price_only"],"description":"price_only: no positive spread at the quoted prices, so NO_EDGE was decided without the rules analysis."},"unverified_divergences":{"type":"integer"},"recommendation":{"type":"string","enum":["ARBITRAGE_SAFE","BASIS_RISK_TRAP","NO_EDGE","INSUFFICIENT_EVIDENCE"]},"best_direction":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}},"directions":{"type":"array","items":{"type":"object","properties":{"cost_per_pair":{"type":"number"},"fees_per_pair":{"type":"number"},"gross_spread_bps":{"type":"number"},"p_double_win":{"type":"number"},"p_double_loss":{"type":"number"},"p_shortfall":{"type":"number"},"expected_payout":{"type":"number"},"risk_adjusted_spread_bps":{"type":"number"},"worst_case_loss_per_pair":{"type":"number"},"kelly_fraction":{"type":"number"}}}},"unavailable_directions":{"type":"array","items":{"type":"string"},"description":"Directions skipped because a leg has no ask (price 0)."},"hedge_sizing":{"type":"object"}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/arbitrage-lawyer/","docsJson":"https://agents.writerslogic.com/docs/arbitrage-lawyer.json","sample":"https://agents.writerslogic.com/api/v1/samples/arbitrage-lawyer","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}