> ## 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 per-interval (day or hour) realized PnL of a user broken down by exchange, with gaps filled



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json get /broker-statistics/user-pnl/chart
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/chart:
    get:
      tags:
        - Broker Statistics
      summary: >-
        Get per-interval (day or hour) realized PnL of a user broken down by
        exchange, with gaps filled
      operationId: BrokerStatisticsController_getUserPnlChart
      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/BrokerUserPnlChartDto'
components:
  schemas:
    BrokerUserPnlChartDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/BrokerUserPnlChartItemDto'
      required:
        - items
      title: BrokerUserPnlChart
    BrokerUserPnlChartItemDto:
      type: object
      properties:
        date:
          description: Start of the interval as ISO 8601 datetime (UTC).
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
        exchangesPnl:
          $ref: '#/components/schemas/BrokerUserPnlChartExchangePnl'
          description: >-
            Net realized PnL per exchange in this interval of userId — 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 in this interval — trade
            PnL minus trading fees plus funding payments — for every trade on
            the connected accounts, not only api-placed orders.
          example: '150'
      required:
        - date
        - exchangesPnl
        - totalPnl
      title: BrokerUserPnlChartItem
    BrokerUserPnlChartExchangePnl:
      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: BrokerUserPnlChartExchangePnl

````

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