> ## Documentation Index
> Fetch the complete documentation index at: https://polyquantlab.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Arb Live

> Real-time arbitrage opportunities between Polymarket binary
markets and Binance spot.

See backtest/arb_engine.py for the math:
  - Polymarket YES mid → market's implied probability
  - Binance spot + 5s-bar realised σ → log-normal model probability
  - Mismatch + EV after fees + spread filter → tradeable rows

Returns rows sorted by expected net PnL per share (highest first).
Empty list when no edges clear the filters — that's normal during
quiet markets or when bots are actively repricing.



## OpenAPI

````yaml get /v1/arb/live
openapi: 3.1.0
info:
  title: PolyQuantLab API
  version: 0.1.0
  description: >-
    Sub-second Polymarket orderbook data, walk-the-book backtests, paper
    trading, and the live arb audit. Same endpoints the PolyQuantLab dashboard
    uses internally — Bearer-token auth, JSON-over-HTTPS, predictable
    pagination.
  contact:
    email: contact@polyquantlab.com
    url: https://polyquantlab.com/contact
  license:
    name: Proprietary
servers:
  - url: https://api.polyquantlab.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /v1/arb/live:
    get:
      summary: Get Arb Live
      description: |-
        Real-time arbitrage opportunities between Polymarket binary
        markets and Binance spot.

        See backtest/arb_engine.py for the math:
          - Polymarket YES mid → market's implied probability
          - Binance spot + 5s-bar realised σ → log-normal model probability
          - Mismatch + EV after fees + spread filter → tradeable rows

        Returns rows sorted by expected net PnL per share (highest first).
        Empty list when no edges clear the filters — that's normal during
        quiet markets or when bots are actively repricing.
      operationId: get_arb_live_v1_arb_live_get
      parameters:
        - name: min_edge_pp
          in: query
          required: false
          schema:
            type: number
            maximum: 0.5
            minimum: 0
            description: >-
              Minimum |market_yes − model_yes| in probability points. Below
              this, the mismatch is dominated by fees and noise. 0.04 = 4pp is
              the practical floor.
            default: 0.04
            title: Min Edge Pp
          description: >-
            Minimum |market_yes − model_yes| in probability points. Below this,
            the mismatch is dominated by fees and noise. 0.04 = 4pp is the
            practical floor.
        - name: vol_window_sec
          in: query
          required: false
          schema:
            type: integer
            maximum: 3600
            minimum: 60
            description: >-
              Realised-vol estimation window in seconds. Shorter = more
              responsive to current regime; longer = less noisy.
            default: 600
            title: Vol Window Sec
          description: >-
            Realised-vol estimation window in seconds. Shorter = more responsive
            to current regime; longer = less noisy.
        - name: tickers
          in: query
          required: false
          schema:
            type: string
            description: Comma-separated tickers to scan.
            default: BTC,ETH,SOL
            title: Tickers
          description: Comma-separated tickers to scan.
        - name: event_types
          in: query
          required: false
          schema:
            type: string
            description: Comma-separated Polymarket event types to scan.
            default: 5m,15m,1h,4h,daily_up_down
            title: Event Types
          description: Comma-separated Polymarket event types to scan.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetArbLiveVArbLiveGetResponse'
              example:
                as_of: '2026-06-06T03:54:11.842913+00:00'
                count: 1
                tickers:
                  - BTC
                  - ETH
                  - SOL
                event_types:
                  - 5m
                  - 15m
                  - 1h
                  - 4h
                  - daily_up_down
                min_edge_pp: 0.04
                opportunities:
                  - market_id: 0x4a8f31...c2
                    ticker: BTC
                    event_type: 5m
                    question: Will Bitcoin price be above $109,500 at 04:00 UTC?
                    polymarket_slug: bitcoin-up-or-down-june-6-4am-et
                    resolution_at: '2026-06-06T04:00:00+00:00'
                    seconds_to_resolution: 47
                    underlying_now: 109842.5
                    strike_price: 109500
                    log_diff: 0.00312
                    sigma_annual: 0.482
                    sigma_tau: 0.00046
                    market_yes_mid: 0.815
                    model_yes_prob: 0.999
                    mismatch_mid: 0.184
                    yes_bid: 0.81
                    yes_ask: 0.82
                    no_bid: 0.18
                    no_ask: 0.19
                    fill_price: 0.82
                    fill_spread: 0.01
                    direction: BUY_YES
                    edge_per_share: 0.18
                    est_fee_per_share: 0.013
                    expected_pnl_per_share: 0.167
                    tier: endgame
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    GetArbLiveVArbLiveGetResponse:
      type: object
      properties:
        as_of:
          type: string
          format: date-time
          description: Server timestamp when the response was generated.
        count:
          type: integer
          format: int64
        tickers:
          type: array
          items:
            type: string
        event_types:
          type: array
          items:
            type: string
        min_edge_pp:
          type: number
          format: double
        opportunities:
          type: array
          items:
            type: object
            properties:
              market_id:
                type: string
                description: Polymarket market identifier (hex 0x…).
              ticker:
                type: string
                enum:
                  - BTC
                  - ETH
                  - SOL
              event_type:
                type: string
                enum:
                  - 5m
                  - 15m
                  - 1h
                  - 4h
                  - daily_up_down
              question:
                type: string
              polymarket_slug:
                type: string
                description: URL slug → polymarket.com/event/{slug}
              resolution_at:
                type: string
                format: date-time
                description: When the market settles on Polymarket.
              seconds_to_resolution:
                type: integer
                format: int64
                description: Countdown — use this with τ ≤ 120 to gate for endgame.
              underlying_now:
                type: number
                format: double
              strike_price:
                type: number
                format: double
                description: Polymarket UP/DOWN threshold.
              log_diff:
                type: number
                format: double
                description: ln(underlying_now / strike_price) — log-distance to strike.
              sigma_annual:
                type: number
                format: double
                description: Annualised realised volatility from Binance 5s bars.
              sigma_tau:
                type: number
                format: double
                description: Volatility scaled to the time-to-resolution τ.
              market_yes_mid:
                type: number
                format: double
                description: Polymarket implied YES probability (mid of bid/ask).
              model_yes_prob:
                type: number
                format: double
                description: Our log-normal-derived YES probability.
              mismatch_mid:
                type: number
                format: double
              yes_bid:
                type: number
                format: double
              yes_ask:
                type: number
                format: double
              no_bid:
                type: number
                format: double
              no_ask:
                type: number
                format: double
              fill_price:
                type: number
                format: double
                description: What you'd actually pay walking the book at current spread.
              fill_spread:
                type: number
                format: double
              direction:
                type: string
                enum:
                  - BUY_YES
                  - BUY_NO
                  - BUY_BOTH
                description: >-
                  Which side to buy. `BUY_BOTH` only used for `tier=logical`
                  (buy both legs for guaranteed payoff).
              edge_per_share:
                type: number
                format: double
                description: Raw probability-vs-price edge, dollar denominated.
              est_fee_per_share:
                type: number
                format: double
              expected_pnl_per_share:
                type: number
                format: double
                description: Edge minus est_fee_per_share — actionable EV.
              tier:
                type: string
                enum:
                  - logical
                  - endgame
                  - stable
                  - stale
                description: >-
                  Signal classification. `logical` = math-guaranteed
                  (yes+no<$1), `endgame` = >2σ past strike with <120s left,
                  `stable` = persistent maker-zone mispricing, `stale` = below
                  execution-feasibility threshold.
            required:
              - market_id
              - ticker
              - event_type
              - question
              - polymarket_slug
              - resolution_at
              - seconds_to_resolution
              - underlying_now
              - strike_price
              - log_diff
              - sigma_annual
              - sigma_tau
              - market_yes_mid
              - model_yes_prob
              - mismatch_mid
              - yes_bid
              - yes_ask
              - no_bid
              - no_ask
              - fill_price
              - fill_spread
              - direction
              - edge_per_share
              - est_fee_per_share
              - expected_pnl_per_share
              - tier
      required:
        - as_of
        - count
        - tickers
        - event_types
        - min_edge_pp
        - opportunities
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````