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

# Active trades

> Query recent trades on SX Bet, broken down by individual order.

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

<Note>**Required filter:** At least one of `bettor`, `marketHashes`, `sportXeventId`, or `startDate` must be provided.</Note>


## OpenAPI

````yaml GET /trades
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:
    get:
      tags:
        - Trades
      summary: Get trades
      description: >-
        This endpoint retrieves past trades on the exchange split up by order.
        This is a paginated endpoint. For example, if a trade fills more than
        one order at once, it will show up as two entries for the bettor.
      operationId: getTrades
      parameters:
        - name: startDate
          in: query
          required: false
          schema:
            type: integer
          description: Only get trades placed after this time in UNIX seconds
        - name: endDate
          in: query
          required: false
          schema:
            type: integer
          description: Only get trades placed before this time in UNIX seconds
        - name: bettor
          in: query
          required: false
          schema:
            type: string
          description: Only get trades placed by this bettor (regardless if maker or taker)
        - name: settled
          in: query
          required: false
          schema:
            type: boolean
          description: If `true`, only get settled trades
        - name: marketHashes
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
          description: Only get trades for particular markets. Comma separated
        - name: baseToken
          in: query
          required: false
          schema:
            type: string
          description: Only get trades placed for a particular token
        - name: maker
          in: query
          required: false
          schema:
            type: boolean
          description: If `true`, only get trades where the bettor is the maker
        - name: affiliate
          in: query
          required: false
          schema:
            type: string
          description: Only get trades under this affiliate
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Requested page size. Each call will only return up to this amount of
            records. Default is 100.
        - name: paginationKey
          in: query
          required: false
          schema:
            type: string
          description: >-
            Used for pagination. Pass the `nextKey` returned from the previous
            request to retrieve the next set of records.
        - name: tradeStatus
          in: query
          required: false
          schema:
            type: string
          description: Filter trades to see only those with `SUCCESS` or `FAILED` status
        - name: sportXeventId
          in: query
          required: false
          schema:
            type: string
          description: Only get trades for this event ID
      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/Trade'
                      nextKey:
                        type: string
                        description: >-
                          Pagination key to pass as `paginationKey` to retrieve
                          the next page of results. Absent if no more results.
                      pageSize:
                        type: number
                        description: >-
                          Maximum amount of records on this page. Will be equal
                          to the `pageSize` passed in.
                      count:
                        type: number
                        description: Total number of records matching the query.
              example:
                status: success
                data:
                  trades:
                    - baseToken: '0x6629Ce1Cf35Cc1329ebB4F63202F3f197b3F050B'
                      bettor: '0x713117eCdEfB29B919544C7502162423220fE78b'
                      stake: '5471240'
                      normalizedStake: '5'
                      odds: '65000000000000000000'
                      orderHash: >-
                        0xa39a03729714170256eb0ea3c3c14b2985f7320d6fa75663edbca8c6d6e4dc83
                      marketHash: >-
                        0x80f558d8535e4f1343e3dc0303ab6d32432c732607fc460fe910ef95845ba40d
                      maker: false
                      bettingOutcomeOne: false
                      settled: true
                      betTimeValue: 5.47124
                      settleValue: 1
                      fillHash: >-
                        0x8e55b9a69f8b2ff4b9816f59c772da765227df104833daad946cfe36d2873938
                      tradeStatus: SUCCESS
                      valid: true
                      betType: 1
                      settleDate: '2026-03-13T00:25:57.472Z'
                      outcome: 1
                      contractsVersion: '6.0'
                      settleTxHash: >-
                        0x612d33b89f6f84dfb1dfd034168e0b4620a999e8b3eb404e37206387c408a2f1
                      fillOrderHash: >-
                        0x48ecd08c526796f1d56249d33dbac46aaf9e8e8b45e023e8e291c9f4ad21d6ee
                      fillOrderHashAttempts:
                        - >-
                          0x48ecd08c526796f1d56249d33dbac46aaf9e8e8b45e023e8e291c9f4ad21d6ee
                      lastMineAttemptTime: '2026-03-12T23:18:50.703Z'
                      beneficiaryType: 0
                      targetNonce: 25152
                      createdAt: '2026-03-12T23:18:47.931Z'
                      updatedAt: '2026-03-13T00:25:57.472Z'
                      chainVersion: SXR
                      sportXeventId: L18268159
                      netReturn: '8.417292'
                      settleNetReturnValue: '0'
                      marketHasRefunds: false
                      _id: 69b349d7437e6866874f937d
                      betTime: 1773357527
                  nextKey: 69b349d7437e6866874f937d
                  pageSize: 100
                  count: 4840
components:
  schemas:
    Trade:
      type: object
      properties:
        baseToken:
          type: string
          description: The token in which this trade was placed
        bettor:
          type: string
          description: The address of the bettor who placed the trade
        stake:
          type: string
          description: >-
            Exact token amount that was staked for the bet. To convert into a
            readable token amount, see the token conversion section
        normalizedStake:
          type: number
          description: The `stake` value in the correct decimal format for the `baseToken`
        odds:
          type: string
          description: >-
            Implied odds that the bettor received for this bet. Divide by 10^20
            to get the odds in decimal format.
        orderHash:
          type: string
          description: The unique identifier of the order that was filled for this trade
        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'
        bettingOutcomeOne:
          type: boolean
          description: '`true` if the bettor is betting outcome one in the market'
        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)
        betTimeValue:
          type: number
          description: The stake value in a human-readable decimal format
        settleValue:
          type: number
          description: The settled payout value. `0` when unsettled.
        fillHash:
          type: string
          description: The unique identifier for this trade
        tradeStatus:
          type: string
          description: '`SUCCESS` or `FAILED` depending on if this trade succeeded or not'
        valid:
          type: boolean
          description: '`true` if the trade counts toward competitions or tournaments'
        betType:
          type: integer
          description: The type of bet. `0` for straight bets.
        affiliate:
          type: string
          description: The affiliate address associated with this trade
        providerEventId:
          type: string
          description: The provider's event ID for this trade
        settleDate:
          type: string
          description: >-
            ISO formatted date string of when the trade was settled. Only
            present on settled trades.
        outcome:
          type: number
          description: >-
            `0`, `1`, or `2` depending on the final outcome of the market. Only
            present on settled trades.
        contractsVersion:
          type: string
          description: The version of the smart contracts used for this trade
        settleTxHash:
          type: string
          description: >-
            The transaction hash of the settlement. Only present on settled
            trades.
        fillOrderHash:
          type: string
          description: The hash of the fill order transaction
        fillOrderHashAttempts:
          type: array
          items:
            type: string
          description: All transaction hash attempts for filling this order
        lastMineAttemptTime:
          type: string
          description: >-
            ISO formatted date string of the last time the transaction was
            attempted to be mined
        beneficiaryType:
          type: integer
          description: The type of beneficiary for this trade
        targetNonce:
          type: integer
          description: The nonce targeted for the fill transaction
        createdAt:
          type: string
          description: ISO formatted date string of when this trade record was created
        updatedAt:
          type: string
          description: ISO formatted date string of when this trade record was last updated
        chainVersion:
          type: string
          description: '`SXN` or `SXR`. See migration docs.'
        sportXeventId:
          type: string
          description: The event related to this trade
        netReturn:
          type: string
          description: The net return amount in the `baseToken` value
        settleNetReturnValue:
          type: number
          description: >-
            The net return amount in USD (at the time of settlement). Only
            present on settled trades.
        marketHasRefunds:
          type: boolean
          description: >-
            `true` if capital-efficient refunds exist for this trade's market
            group; if `true`, query [Get portfolio
            refunds](/api-reference/get-trades-refunds) for details
        betTime:
          type: number
          description: >-
            The time when the trade was placed. Returned as a UNIX timestamp
            (number) on `/trades`, or as an ISO date string on `/trades/orders`.

````