> ## 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.

# Consolidated trades

> Get consolidated trade history with pagination on the SX Bet exchange.

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


## OpenAPI

````yaml GET /trades/consolidated
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:
  /trades/consolidated:
    get:
      tags:
        - Trades
      summary: Get consolidated trades
      description: >-
        This endpoint retrieves past consolidated trades on the exchange via
        pagination. If a trade fills multiple orders, it will show up as one
        entry here per bettor.
      operationId: getConsolidatedTrades
      parameters:
        - name: bettor
          in: query
          required: false
          schema:
            type: string
          description: Only get trades placed by this bettor
        - name: settled
          in: query
          required: true
          schema:
            type: boolean
          description: If `true` only get settled trades
        - name: page
          in: query
          required: true
          schema:
            type: integer
          description: Page number for pagination
        - name: perPage
          in: query
          required: true
          schema:
            type: integer
          description: Amount of records to fetch per page
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - totalStake
              - totalBetTimeValue
              - weightedAverageOdds
              - netReturn
              - netReturnBetTimeValue
              - settleNetReturnValue
              - outcome
              - gameLabel
              - bettingOutcome
              - gameTime
              - leagueLabel
              - bettingOutcomeLabel
              - betTime
              - settleDate
              - totalReturn
          description: Which field to sort by
        - name: sortAsc
          in: query
          required: true
          schema:
            type: boolean
          description: If `true`, sorts in ascending order
        - name: maker
          in: query
          required: false
          schema:
            type: boolean
          description: If `true`, only gets trades where the bettor was a market maker
        - name: sportXeventId
          in: query
          required: false
          schema:
            type: string
          description: Only gets trades for this event ID
        - name: tradeStatus
          in: query
          required: false
          schema:
            type: string
          description: Filter trades to see only those with `SUCCESS` or `FAILED` status
        - name: marketHash
          in: query
          required: false
          schema:
            type: string
          description: Only get trades for this market hash
      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:
                      trades:
                        type: array
                        items:
                          $ref: '#/components/schemas/ConsolidatedTrade'
                        description: The consolidated trades for this request
                      count:
                        type: number
                        description: Total count of trades for this query
              example:
                status: success
                data:
                  trades:
                    - baseToken: '0x6629Ce1Cf35Cc1329ebB4F63202F3f197b3F050B'
                      tradeStatus: SUCCESS
                      bettor: '0x97EC1C9682F70091efB04e97b0B34698cF815EE1'
                      totalStake: '34.32'
                      totalBetTimeValue: '34.32'
                      weightedAverageOdds: '56125000449719554886'
                      netReturn: '61.14922'
                      netReturnBetTimeValue: 61.14922
                      marketHash: >-
                        0xd9f2178b498227143d86b7d62cf82a7b8c56c5df3586d279949a3ea5e3eb1f6b
                      maker: false
                      settled: false
                      fillHash: >-
                        0x108723368a33e52789dc96f21f4542fb29e72903b6d130d78e5ff041c770d296
                      gameLabel: Liverpool vs Galatasaray SK
                      bettingOutcome: 2
                      sportXeventId: L18240954
                      gameTime: '2026-03-18T20:00:00.000Z'
                      leagueLabel: Champions League_UEFA
                      sportId: 5
                      bettingOutcomeLabel: Galatasaray SK +2
                      betTime: 1773240290
                      fillOrderHash: >-
                        0xc45631446e945a59b7282ca13b4604933692796ac254c3045985cfb425f70e86
                      totalReturn: '61.14922'
                      crosschainNetReturn: '0'
                      chainVersion: SXR
                      marketHasRefunds: false
                      marketType: 3
                  count: 4161
components:
  schemas:
    ConsolidatedTrade:
      type: object
      properties:
        baseToken:
          type: string
          description: The token in which this trade was placed
        tradeStatus:
          type: string
          description: '`SUCCESS` or `FAILED` depending on if this trade succeeded or not'
        bettor:
          type: string
          description: The address of the bettor who placed the trade
        totalStake:
          type: string
          description: Total nominal stake of the trade
        totalBetTimeValue:
          type: string
          description: Total stake value in a human-readable decimal format
        weightedAverageOdds:
          type: string
          description: >-
            Weighted average odds (based on stake) of the trade if the trade
            filled multiple orders. Divide by 10^20 to get the odds in decimal
            format.
        netReturn:
          type: string
          description: The net return amount in the `baseToken` value
        netReturnBetTimeValue:
          type: number
          description: The net return value in a human-readable decimal format
        marketHash:
          type: string
          description: The unique identifier of the market for which this trade was placed
        maker:
          type: boolean
          description: '`true` if the bettor is market maker in this trade'
        settled:
          type: boolean
          description: >-
            `true` if this bet is settled (this refers to if the bet was won
            lost or voided, not if the trade succeeded or not)
        fillHash:
          type: string
          description: The unique identifier for this trade
        gameLabel:
          type: string
          description: A general label for the market
        bettingOutcome:
          type: number
          description: '`1` if the bettor is betting outcome one, `2` otherwise'
        sportXeventId:
          type: string
          description: The unique fixture ID for this trade
        gameTime:
          type: string
          description: ISO formatted date string of when the game is supposed to occur
        leagueLabel:
          type: string
          description: The name of this league
        sportId:
          type: integer
          description: The sport ID for this trade
        bettingOutcomeLabel:
          type: string
          description: Which team/side the bettor bet
        betTime:
          type: number
          description: The time in UNIX seconds when the trade was placed
        fillOrderHash:
          type: string
          description: The hash of the fill order transaction
        totalReturn:
          type: string
          description: Total return amount in the `baseToken` value
        crosschainNetReturn:
          type: string
          description: Net return from cross-chain activity
        chainVersion:
          type: string
          description: '`SXN` or `SXR`. See migration docs.'
        marketHasRefunds:
          type: boolean
          description: >-
            `true` if capital efficient refunds exist for this market group; if
            `true`, query [Get portfolio
            refunds](/api-reference/get-trades-refunds) for details
        marketType:
          type: integer
          description: The market type for this trade
        outcome:
          type: number
          description: >-
            `0`, `1`, or `2` depending on the final outcome of the market. Only
            present on settled trades.
        settleNetReturnValue:
          type: number
          description: >-
            The net return value in human-readable decimal format at settlement
            time

````