WritersLogic Verifiable AI Agent Hub Arbitrage Lawyer API

The Arbitrage Lawyer API from WritersLogic Verifiable AI Agent Hub — 1 operation(s) for arbitrage lawyer.

GitHub OpenAPI

Operations 1

POST /api/v1/arbitrage-lawyer Cross-Platform Arbitrage & Resolution Rules Lawyer #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/writerslogic-com:writerslogic-com-arbitrage-lawyer-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

writerslogic-com-arbitrage-lawyer-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WritersLogic Verifiable AI Agent Hub Arbitrage Lawyer API
  version: 2.0.0
  description: Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.
  contact:
    name: WritersLogic
    url: https://writerslogic.com/agents
    email: agents@writerslogic.com
servers:
- url: https://agents.writerslogic.com
tags:
- name: Arbitrage Lawyer
paths:
  /api/v1/arbitrage-lawyer:
    post:
      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.


        Price: 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
      tags:
      - Arbitrage Lawyer
components:
  securitySchemes:
    x402:
      type: apiKey
      in: header
      name: PAYMENT-SIGNATURE
      description: x402 v2 payment payload (base64) sent after a 402 challenge
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY