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

# Fast authoritative wallet PnL chart

> Reads precomputed hourly authoritative PnL snapshots. Daily, weekly, and monthly points are last-value rollups and never scan raw fills.



## OpenAPI

````yaml /prediction-markets/openapi.json get /v1/accounts/{address}/pnl/chart
openapi: 3.1.0
info:
  title: Prediction Market API (Beta)
  description: >-
    Unified **beta** prediction market API for Kalshi and Polymarket — markets,
    events, full historical trades and candlesticks, orderbooks, crypto up/down
    windows, and Polymarket wallet analytics. Read/market-data only.


    **Auth:** pass your Data API key in the `x-api-key` header.


    **Conventions:** response bodies use camelCase. Query params are snake_case
    (camelCase aliases accepted where noted).


    **Caching:** SWR endpoints may set `X-Cache` (`HIT` | `HIT-STALE` | `MISS`).
    Busy backends may return `503` with `SERVICE_BUSY`.


    **Realtime:** join `pm:*` rooms on
    `wss://datastream.solanatracker.io/{apiKey}` (same Datastream hub as other
    products — see Datastream → Prediction Markets).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://prediction-market-api.solanatracker.io
    description: Public beta
security:
  - apiKey: []
tags:
  - name: Exchange
    description: Exchange status
  - name: Events
    description: >-
      Cross-exchange event groupings (Kalshi event_ticker, Polymarket Gamma
      grouped/negRisk events). Includes metadata: image, icon, description,
      tags, and nested markets with groupItemTitle.
  - name: Crypto
    description: >-
      Polymarket crypto up/down (Chainlink) Price to Beat, final price, chart
      history, and series windows.
  - name: Meta
    description: Categories, series, sports, live data
  - name: Markets
    description: Market data, orderbooks, candles
  - name: Trades
    description: Trade feeds
  - name: Accounts
    description: Polymarket wallet analytics (FIFO PnL)
  - name: Leaderboard
    description: Top wallet PnL rankings (Polymarket; Kalshi has no public wallets)
  - name: Stats
    description: Platform statistics
paths:
  /v1/accounts/{address}/pnl/chart:
    get:
      tags:
        - Accounts
      summary: Fast authoritative wallet PnL chart
      description: >-
        Reads precomputed hourly authoritative PnL snapshots. Daily, weekly, and
        monthly points are last-value rollups and never scan raw fills.
      operationId: get_account_pnl_chart_path
      parameters:
        - name: address
          in: path
          description: Ethereum wallet address
          required: true
          schema:
            type: string
        - name: resolution
          in: query
          description: 1h/hourly, 1d/daily, 1w/weekly, or 1mo/monthly (default 1d)
          required: false
          schema:
            type: string
        - name: from
          in: query
          description: Inclusive Unix milliseconds
          required: false
          schema:
            type: integer
            format: int64
        - name: to
          in: query
          description: Inclusive Unix milliseconds
          required: false
          schema:
            type: integer
            format: int64
        - name: limit
          in: query
          description: Maximum points (default 500, max 5000)
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
      responses:
        '200':
          description: Wallet PnL time series
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletPnlChartResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
components:
  schemas:
    WalletPnlChartResponse:
      type: object
      required:
        - address
        - resolution
        - points
      properties:
        address:
          type: string
        dataStartAt:
          type:
            - integer
            - 'null'
          format: int64
          description: First available bucket as Unix milliseconds.
        points:
          type: array
          items:
            $ref: '#/components/schemas/WalletPnlChartPoint'
        resolution:
          type: string
          description: '`1h`, `1d`, `1w`, or `1mo`.'
    ApiErrorBody:
      type: object
      description: Standard API error response envelope.
      required:
        - error
        - code
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code (duplicated for convenience).
          minimum: 0
        error:
          type: string
        errorCode:
          type:
            - string
            - 'null'
          description: >-
            Stable machine-readable code: RATE_LIMITED, SERVICE_BUSY,
            BAD_REQUEST, NOT_FOUND, INTERNAL.
    WalletPnlChartPoint:
      type: object
      required:
        - timestamp
        - portfolioValueUsd
        - realizedPnlUsd
        - unrealizedPnlUsd
        - totalPnlUsd
      properties:
        portfolioValueUsd:
          type: number
          format: double
        realizedPnlUsd:
          type: number
          format: double
        timestamp:
          type: integer
          format: int64
          description: Bucket start as Unix milliseconds.
        totalPnlUsd:
          type: number
          format: double
        unrealizedPnlUsd:
          type: number
          format: double
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Solana Tracker Data API key

````