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

# Get the total surplus earned by the user. [UNSTABLE]

> ### Caution

This endpoint is under active development and should NOT be considered
stable.



## OpenAPI

````yaml cow-protocol/reference/apis/openapi/orderbook.yml get /api/v1/users/{address}/total_surplus
openapi: 3.0.3
info:
  version: 0.0.1
  title: Order Book API
servers:
  - description: Mainnet (Prod)
    url: https://api.cow.fi/mainnet
  - description: Mainnet (Staging)
    url: https://barn.api.cow.fi/mainnet
  - description: Gnosis Chain (Prod)
    url: https://api.cow.fi/xdai
  - description: Gnosis Chain (Staging)
    url: https://barn.api.cow.fi/xdai
  - description: Arbitrum One (Prod)
    url: https://api.cow.fi/arbitrum_one
  - description: Arbitrum One (Staging)
    url: https://barn.api.cow.fi/arbitrum_one
  - description: Base (Prod)
    url: https://api.cow.fi/base
  - description: Base (Staging)
    url: https://barn.api.cow.fi/base
  - description: Avalanche (Prod)
    url: https://api.cow.fi/avalanche
  - description: Avalanche (Staging)
    url: https://barn.api.cow.fi/avalanche
  - description: Polygon (Prod)
    url: https://api.cow.fi/polygon
  - description: Polygon (Staging)
    url: https://barn.api.cow.fi/polygon
  - description: Lens (Prod)
    url: https://api.cow.fi/lens
  - description: Lens (Staging)
    url: https://barn.api.cow.fi/lens
  - description: Linea (Prod)
    url: https://api.cow.fi/linea
  - description: Linea (Staging)
    url: https://barn.api.cow.fi/linea
  - description: BNB (Prod)
    url: https://api.cow.fi/bnb
  - description: BNB (Staging)
    url: https://barn.api.cow.fi/bnb
  - description: Plasma (Prod)
    url: https://api.cow.fi/plasma
  - description: Plasma (Staging)
    url: https://barn.api.cow.fi/plasma
  - description: Ink (Prod)
    url: https://api.cow.fi/ink
  - description: Ink (Staging)
    url: https://barn.api.cow.fi/ink
  - description: Sepolia (Prod)
    url: https://api.cow.fi/sepolia
  - description: Sepolia (Staging)
    url: https://barn.api.cow.fi/sepolia
  - description: Local
    url: http://localhost:8080
security: []
paths:
  /api/v1/users/{address}/total_surplus:
    get:
      summary: Get the total surplus earned by the user. [UNSTABLE]
      description: |-
        ### Caution

        This endpoint is under active development and should NOT be considered
        stable.
      operationId: getAddressTotalSurplus
      parameters:
        - in: path
          name: address
          schema:
            $ref: '#/components/schemas/Address'
          required: true
      responses:
        '200':
          description: The total surplus.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalSurplus'
        '400':
          description: Invalid address.
components:
  schemas:
    Address:
      description: 20 byte Ethereum address encoded as a hex with `0x` prefix.
      type: string
      example: '0x6810e776880c02933d47db1b9fc05908e5386b96'
    TotalSurplus:
      description: |
        The total surplus.
      type: object
      properties:
        totalSurplus:
          type: string
          description: The total surplus.

````