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

# Every cross-venue link with a live edge, best first

> The edges market_matcher's link edge worker (`internal/linkworker`) computes for each approved link from its union books, across every executable venue on the link: `cross_venue_arb` (a fee-inclusive bid on one venue above the ask on another, same side), `yes_no_under_one` (the cheapest Yes ask plus the cheapest No ask under $1), `cheaper_venue` (the cheapest ask below the next venue's) and `spread` (best ask minus best bid; never ranks a link). Only links with a positive non-spread edge are listed, ranked by it, with at most 500 links. An edge computed more than 10 s ago is not served. Prices and edges are dollars per $1 contract, fees included.

Cached with `Cache-Control: public, max-age=3, s-maxage=3`.




## OpenAPI

````yaml /openapi/data-api.yaml get /market-links/edges
openapi: 3.1.0
info:
  title: Kairos Data API
  version: 1.0.0
  summary: >-
    The full Kairos data plane — markets, candles, trades, search, discover,
    sports, trader analytics, and PnL.
  description: |
    The Kairos Data API at `data.kairos.trade` is the platform's primary data
    plane: market metadata and prices, OHLCV candles, live venue trade proxies,
    normalized trade history, full-text search, discovery feeds, the sports
    catalog, public trader analytics, and account PnL.

    ## Authentication

    Most read endpoints are `public`: you can call them with no credentials,
    on a smaller anonymous rate tier keyed by your IP. Send a Kairos **API
    key** (`X-Client-Id` + `X-Api-Key` + `X-Api-Secret`, all three) to get
    your own budget. If you send API-key headers, they must be complete and
    valid, or the request fails with `401`. An API key must also carry any
    **scope** an operation lists (`trade:read`, `position:read`). Endpoints
    marked `api-key` or `session` require credentials.

    For high-volume market-data consumption (candles/trades/metadata at
    scale), prefer the dedicated **Market Data API** at `md.kairos.trade` —
    it has higher budgets, ETag caching, and a binary candle format.

    ## Rate limits

    Rate limits use a sliding window keyed on the session user, the API key,
    or, for anonymous callers, the client IP. Anonymous callers get a smaller
    budget than the documented one: half of it by default, or a fixed
    anonymous budget where an operation states one. Routes belong to
    a named **bucket** (`x-kairos-bucket`) whose per-minute budget is shared
    by every route in it; routes with no bucket run under the service default
    of 100/minute. `x-kairos-rate-limit` states the bucket's compile-time
    default — operators can raise or lower a bucket at runtime, so treat the
    documented number as the baseline, not a contract. 429 responses carry
    `Retry-After` and `X-RateLimit-*`.

    ## Conventions

    - Prices are on the **0–100 cents scale** unless a field says otherwise
      (trader-analytics position/trade prices use the 0–1 scale; each field's
      description states its scale).
    - Errors: `{"detail": "<message>"}` for handler errors; FastAPI's
      standard validation envelope for 422s. Errors surfaced from a venue
      adapter instead use `{"error", "provider", "operation", "message"}` —
      see `DataProviderError`. Unhandled failures always return the generic
      500 body; internal details are logged, never returned.
    - Every request body is capped at 8 MiB service-wide (413).
  contact:
    name: Kairos
    url: https://docs.kairos.trade/api-reference
  termsOfService: https://kairos.trade/terms
servers:
  - url: https://data.kairos.trade
    description: Production
  - url: https://staging-data.kairos.trade
    description: Staging
security:
  - apiKeyClientId: []
    apiKeyKey: []
    apiKeySecret: []
paths:
  /market-links/edges:
    get:
      tags:
        - Markets
      summary: Every cross-venue link with a live edge, best first
      description: >
        The edges market_matcher's link edge worker (`internal/linkworker`)
        computes for each approved link from its union books, across every
        executable venue on the link: `cross_venue_arb` (a fee-inclusive bid on
        one venue above the ask on another, same side), `yes_no_under_one` (the
        cheapest Yes ask plus the cheapest No ask under $1), `cheaper_venue`
        (the cheapest ask below the next venue's) and `spread` (best ask minus
        best bid; never ranks a link). Only links with a positive non-spread
        edge are listed, ranked by it, with at most 500 links. An edge computed
        more than 10 s ago is not served. Prices and edges are dollars per $1
        contract, fees included.


        Cached with `Cache-Control: public, max-age=3, s-maxage=3`.
      operationId: getMarketLinkEdges
      responses:
        '200':
          description: The ranked links and each one's edges, in type order.
          headers:
            Cache-Control:
              schema:
                type: string
                example: public, max-age=3, s-maxage=3
          content:
            application/json:
              schema:
                type: object
                required:
                  - links
                properties:
                  links:
                    type: array
                    items:
                      type: object
                      required:
                        - linkId
                        - edges
                      properties:
                        linkId:
                          type: string
                        edges:
                          type: array
                          items:
                            type: object
                            required:
                              - type
                              - side
                              - edge
                              - returnOnCost
                              - buy
                              - other
                              - executable
                              - computedAt
                            properties:
                              type:
                                type: string
                                enum:
                                  - cross_venue_arb
                                  - yes_no_under_one
                                  - cheaper_venue
                                  - spread
                              side:
                                type: string
                                enum:
                                  - 'yes'
                                  - 'no'
                                nullable: true
                                description: >-
                                  Null for yes_no_under_one, which buys both
                                  sides.
                              edge:
                                type: number
                              returnOnCost:
                                type: number
                                nullable: true
                                description: Null for spread.
                              buy:
                                type: object
                                properties:
                                  provider:
                                    type: string
                                  side:
                                    type: string
                                    enum:
                                      - 'yes'
                                      - 'no'
                                  price:
                                    type: number
                              other:
                                type: object
                                properties:
                                  provider:
                                    type: string
                                  side:
                                    type: string
                                    enum:
                                      - 'yes'
                                      - 'no'
                                  price:
                                    type: number
                              executable:
                                type: boolean
                              computedAt:
                                type: integer
                                description: Epoch milliseconds.
        '429':
          $ref: '#/components/responses/DataRateLimited'
        '503':
          description: The catalog store could not be read.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataError'
      security: []
components:
  responses:
    DataRateLimited:
      description: >
        Rate limit exceeded for this route's sliding window, keyed on the
        session `sub` when

        authenticated and on the trusted client IP otherwise. Honor
        `Retry-After`. A per-API-key

        data ceiling (set per credential) rejects with `{"detail": "API key data
        rate limit

        exceeded"}` instead of the `error` envelope below.
      headers:
        Retry-After:
          schema:
            type: integer
        X-RateLimit-Limit:
          schema:
            type: integer
        X-RateLimit-Remaining:
          schema:
            type: integer
        X-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: 'Rate limit exceeded: 100 per 1 minute'
  schemas:
    DataError:
      type: object
      description: Handler error envelope (FastAPI HTTPException).
      required:
        - detail
      properties:
        detail:
          type: string
          description: Human-readable error message.
          example: Invalid provider
  securitySchemes:
    apiKeyClientId:
      type: apiKey
      in: header
      name: X-Client-Id
      description: >-
        Credential client id (`kairos_ck_...`). Must be sent together with
        X-Api-Key and X-Api-Secret.
    apiKeyKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: 64-char hex API key.
    apiKeySecret:
      type: apiKey
      in: header
      name: X-Api-Secret
      description: 64-char hex API secret.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.