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

# Get user realized PnL, broken down by exchange



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json get /broker-statistics/user-pnl
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /broker-statistics/user-pnl:
    get:
      tags:
        - Broker Statistics
      summary: Get user realized PnL, broken down by exchange
      operationId: BrokerStatisticsController_getUserPnl
      parameters:
        - name: X-Broker-Key
          in: header
          description: Broker API key
          required: true
          schema:
            type: string
        - name: from
          required: false
          in: query
          schema:
            example: 1767225600000
            type: integer
            exclusiveMinimum: 0
            maximum: 9007199254740991
          description: >-
            Start of the period as unix timestamp in milliseconds (inclusive).
            Defaults to now - 30 days (1 day for hour resolution).
        - name: resolution
          required: false
          in: query
          schema:
            default: day
            type: string
            enum:
              - day
              - hour
          description: >-
            Aggregation interval: day (UTC calendar day) or hour (UTC clock
            hour). from/to snap to interval boundaries. On series endpoints,
            items span one interval and hour limits the range to 7 days.
            Defaults to day.
        - name: to
          required: false
          in: query
          schema:
            example: 1769903999000
            type: integer
            exclusiveMinimum: 0
            maximum: 9007199254740991
          description: >-
            End of the period as unix timestamp in milliseconds (inclusive).
            Defaults to now.
        - name: userId
          required: true
          in: query
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: User id to compute stats for.
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBrokerUserPnlDTO'
components:
  schemas:
    GetBrokerUserPnlDTO:
      type: object
      properties:
        exchangesPnl:
          $ref: '#/components/schemas/BrokerUserExchangePnl'
          description: >-
            Net realized PnL per exchange over the period — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected accounts, not only api-placed orders.
        totalPnl:
          type: string
          description: >-
            Total net realized PnL across all exchanges over the period — trade
            PnL minus trading fees plus funding payments — for every trade on
            the connected accounts, not only api-placed orders.
          example: '1250.00'
      required:
        - exchangesPnl
        - totalPnl
      title: BrokerUserPnl
    BrokerUserExchangePnl:
      type: object
      properties:
        aster:
          type: string
          description: >-
            Net realized PnL on Aster in quote currency — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected account, not only api-placed orders.
        binance:
          type: string
          description: >-
            Net realized PnL on Binance in quote currency — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected account, not only api-placed orders.
        bybit:
          type: string
          description: >-
            Net realized PnL on Bybit in quote currency — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected account, not only api-placed orders.
        extended:
          type: string
          description: >-
            Net realized PnL on Extended in quote currency — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected account, not only api-placed orders.
        gate:
          type: string
          description: >-
            Net realized PnL on Gate in quote currency — trade PnL minus trading
            fees plus funding payments — for every trade on the connected
            account, not only api-placed orders.
        hyperliquid:
          type: string
          description: >-
            Net realized PnL on Hyperliquid in quote currency — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected account, not only api-placed orders.
        lighter:
          type: string
          description: >-
            Net realized PnL on Lighter in quote currency — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected account, not only api-placed orders.
        mexc:
          type: string
          description: >-
            Net realized PnL on Mexc in quote currency — trade PnL minus trading
            fees plus funding payments — for every trade on the connected
            account, not only api-placed orders.
        ondo:
          type: string
          description: >-
            Net realized PnL on Ondo in quote currency — trade PnL minus trading
            fees plus funding payments — for every trade on the connected
            account, not only api-placed orders.
        robinhood:
          type: string
          description: >-
            Net realized PnL on Robinhood in quote currency — trade PnL minus
            trading fees plus funding payments — for every trade on the
            connected account, not only api-placed orders.
      required:
        - aster
        - binance
        - bybit
        - extended
        - gate
        - hyperliquid
        - lighter
        - mexc
        - ondo
        - robinhood
      title: BrokerUserExchangePnl

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.