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

# Portfolio refunds

> Retrieve capital-efficiency refund events for a bettor on SX Bet.

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

It supports reconciling cases where `settledNetReturn` may differ from `netReturn` when `marketHasRefunds` is `true` (see [Capital Efficiency Upgrades](/developers/capital-efficiency)). Refunds reflect decreases in worst-case exposure (MXL) from offsetting positions and are only generated for market groups without prior cash outs; conversely, cash outs cannot occur after capital-efficient refunds.

<Info>See [Capital Efficiency Upgrade](/developers/capital-efficiency) for a high-level overview of the Capital Efficiency Upgrade.</Info>


## OpenAPI

````yaml GET /trades/portfolio/refunds
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/portfolio/refunds:
    get:
      tags:
        - Trades
      summary: Get portfolio refunds
      description: >-
        This endpoint retrieves capital-efficient refund events for a bettor,
        aggregated by market.
      operationId: getPortfolioRefunds
      parameters:
        - name: bettor
          in: query
          required: true
          schema:
            type: string
          description: Bettor address (checksummed).
        - name: marketHash
          in: query
          required: false
          schema:
            type: string
          description: Filter by market hash.
        - name: baseToken
          in: query
          required: false
          schema:
            type: string
          description: Filter by base token.
        - name: fillOrderHash
          in: query
          required: false
          schema:
            type: string
          description: Filter by the associated trade fill hash.
        - name: maker
          in: query
          required: false
          schema:
            type: boolean
          description: >-
            If `true`, only refunds where bettor was a maker; otherwise taker
            refunds.
        - name: sortAsc
          in: query
          required: true
          schema:
            type: boolean
          description: Sort ascending when `true`, descending when `false`.
        - name: page
          in: query
          required: true
          schema:
            type: integer
          description: Page number for pagination (min 0).
        - name: perPage
          in: query
          required: true
          schema:
            type: integer
          description: Page size (max 500).
      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:
                      results:
                        type: array
                        items:
                          $ref: '#/components/schemas/Refund'
                      count:
                        type: number
                        description: Total count of aggregated market results
              example:
                status: success
                data:
                  results:
                    - marketHash: >-
                        0x7d9e27978f12b65e36990df94dbfa85c9f63dacaab24225e38e2f04d1ec66e8e
                      baseToken: '0x6629Ce1Cf35Cc1329ebB4F63202F3f197b3F050B'
                      totalRefundedBetTimeValue: 65.54772
                      events:
                        - marketHash: >-
                            0x7d9e27978f12b65e36990df94dbfa85c9f63dacaab24225e38e2f04d1ec66e8e
                          baseToken: '0x6629Ce1Cf35Cc1329ebB4F63202F3f197b3F050B'
                          bettor: '0x8268feC8dCb0D284343054BDf2b649286c9aA0a1'
                          maker: true
                          fillOrderHash: >-
                            0x40b8c59cce8323952da3fb42b4e22a097a4922ae402bc46f958c441fd0f0902a
                          amount: '61.960285'
                          amountBetTimeValue: '61.960285'
                          createdAt: '2026-01-05T18:20:24.920Z'
                        - marketHash: >-
                            0x7d9e27978f12b65e36990df94dbfa85c9f63dacaab24225e38e2f04d1ec66e8e
                          baseToken: '0x6629Ce1Cf35Cc1329ebB4F63202F3f197b3F050B'
                          bettor: '0x8268feC8dCb0D284343054BDf2b649286c9aA0a1'
                          maker: true
                          fillOrderHash: >-
                            0xa56e17872d28b3021dc050006fcf10b469291e11472ff468196732169bc8371e
                          amount: '3.587435'
                          amountBetTimeValue: '3.587435'
                          createdAt: '2026-01-05T18:29:08.486Z'
                  count: 7324
components:
  schemas:
    Refund:
      type: object
      properties:
        marketHash:
          type: string
          description: Market hash for this refund aggregation
        baseToken:
          type: string
          description: Base token of the refunds
        totalRefundedBetTimeValue:
          type: number
          description: Sum of refund amounts for this market at bet-time value
        events:
          type: array
          description: Individual refund events that make up the aggregation
          items:
            type: object
            properties:
              marketHash:
                type: string
                description: Market hash
              baseToken:
                type: string
                description: Token address
              bettor:
                type: string
                description: Bettor address
              maker:
                type: boolean
                description: '`true` if bettor was maker for this refund'
              fillOrderHash:
                type: string
                description: Fill hash associated with the refund
              amount:
                type: string
                description: Refund amount in base token (string-encoded)
              createdAt:
                type: string
                description: ISO date string of event creation

````