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

# Best odds

> Get the best available odds for markets or leagues on the SX Bet exchange.

<Note>**Rate limit:** All `GET /orders/*` endpoints share a combined limit of 20 requests/10s. See [Rate Limits](/developers/rate-limits).</Note>

<Info>Exactly one of `marketHashes` or `leagueIds` must be provided, but not both.</Info>


## OpenAPI

````yaml GET /orders/odds/best
openapi: 3.0.1
info:
  title: SX Bet API
  version: 1.0.0
  description: >-
    REST API for the SX Bet decentralized sports betting exchange. Retrieve
    sports data, markets, and orderbook information. Post, cancel, and fill
    orders with signed payloads.


    Base URLs:

    - **Mainnet**: `https://api.sx.bet`

    - **Testnet**: `https://api.toronto.sx.bet`
servers:
  - url: https://api.sx.bet
    description: Mainnet (SX Network, chainId 4162)
  - url: https://api.toronto.sx.bet
    description: Testnet (Toronto, chainId 79479957)
security: []
tags:
  - name: Connection
    description: Server metadata and heartbeat management
  - name: Sports Data
    description: Sports, leagues, teams, fixtures, and live scores
  - name: Markets
    description: Active, specific, and popular betting markets
  - name: Trades
    description: Matched trades and portfolio history
  - name: Orders
    description: Orderbook queries, posting, cancelling, and filling orders
paths:
  /orders/odds/best:
    get:
      tags:
        - Orders
      summary: Get best odds
      description: >-
        This endpoint returns the best available odds for the specified
        baseToken and marketHashes or leagueIds.
      operationId: getBestOdds
      parameters:
        - name: marketHashes
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: >-
            Only get best odds for these market hashes. Comma separated. Exactly
            one of `marketHashes` or `leagueIds` must be provided, but not both.
        - name: leagueIds
          in: query
          required: false
          schema:
            type: array
            items:
              type: integer
          description: >-
            Only get best odds for these league IDs. Comma separated. Exactly
            one of `marketHashes` or `leagueIds` must be provided, but not both.
        - name: baseToken
          in: query
          required: true
          schema:
            type: string
          description: Only get best odds denominated in this base token.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: '`success` or `failure` if the request succeeded or not'
                  data:
                    type: object
                    properties:
                      bestOdds:
                        type: array
                        items:
                          type: object
                          properties:
                            marketHash:
                              type: string
                              description: >-
                                The resulting market for the given best odds
                                query
                            baseToken:
                              type: string
                              description: The baseToken for the given best odds query
                            outcomeOne:
                              type: object
                              description: >-
                                An object representing outcome one, including
                                the best available percentage odds as
                                `percentageOdds` (string) and the last update
                                time as `updatedAt` (numerical timestamp in
                                milliseconds)
                              properties:
                                percentageOdds:
                                  type: string
                                updatedAt:
                                  type: number
                            outcomeTwo:
                              type: object
                              description: >-
                                An object representing outcome two, including
                                the best available percentage odds as
                                `percentageOdds` (string) and the last update
                                time as `updatedAt` (numerical timestamp in
                                milliseconds)
                              properties:
                                percentageOdds:
                                  type: string
                                updatedAt:
                                  type: number
              example:
                status: success
                data:
                  bestOdds:
                    - marketHash: >-
                        0xbe621aead370a0c8c48fcfcff6fa60c49126683f4ba30945fbb94fcf8fb3fe9e
                      baseToken: '0x6629Ce1Cf35Cc1329ebB4F63202F3f197b3F050B'
                      outcomeOne:
                        percentageOdds: '65750000000000000000'
                        updatedAt: 1773008449368
                      outcomeTwo:
                        percentageOdds: '33000000000000000000'
                        updatedAt: 1773007355305

````