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

# Get Account Statistics

> Returns historical snapshots of equity, PnL, volume, and ROI. When step is omitted, raw snapshots are returned, otherwise time bucketed by day/week/month. Optional sub_account_address: when set, the result includes only specified subaccount, otherwise all of the user's subaccounts;. Default limit 100, max 1000.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/account/statistics
openapi: 3.1.0
info:
  title: ekiden-gateway
  description: >-
    API Gateway and WebSocket proxy based on Axum and Utoipa, handling auth,
    rate limiting, and connection buffering.
  license:
    name: ''
  version: 0.1.1
servers:
  - url: https://api.cnt.ekiden.fi/
    description: Testnet
  - url: https://api.canton.ekiden.fi/
    description: Staging
security: []
paths:
  /api/v1/account/statistics:
    get:
      tags:
        - Account
      summary: Get Account Statistics
      description: >-
        Returns historical snapshots of equity, PnL, volume, and ROI. When step
        is omitted, raw snapshots are returned, otherwise time bucketed by
        day/week/month. Optional sub_account_address: when set, the result
        includes only specified subaccount, otherwise all of the user's
        subaccounts;. Default limit 100, max 1000.
      operationId: get_account_statistics
      parameters:
        - name: sub_account_address
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: start_time
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: end_time
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
            format: date-time
        - name: step
          in: query
          required: false
          schema:
            oneOf:
              - type: 'null'
              - type: string
                description: >-
                  Temporal resolution for statistics. Single-letter shorthands
                  are allowed(h/d/w/m).
                enum:
                  - hour
                  - day
                  - week
                  - month
        - name: limit
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
            minimum: 0
        - name: sorting_order
          in: query
          required: false
          schema:
            oneOf:
              - type: 'null'
              - type: string
                description: >-
                  Sort direction for account statistics snapshots (older/newer
                  first).
                enum:
                  - asc
                  - desc
      responses:
        '200':
          description: Account statistics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAccountStatisticsResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
      security:
        - bearer_auth: []
components:
  schemas:
    GetAccountStatisticsResponse:
      type: object
      required:
        - list
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/AccountStatistics'
    AccountStatistics:
      type: object
      required:
        - sub_account_address
        - equity
        - realised_pnl_cum
        - unrealised_pnl
        - volume
        - roi
        - timestamp
      properties:
        equity:
          type: string
        realised_pnl_cum:
          type: string
        roi:
          type: string
        sub_account_address:
          type: string
        timestamp:
          type: string
          format: date-time
        unrealised_pnl:
          type: string
        volume:
          type: string
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````