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

# PnL Series

> Cumulative settled PnL through the window, from 0, for a PnL chart. Buckets are 1 h (1d, 7d), 4 h (30d) or a day beyond; a custom window gets at most 400 points. The last point adds today's open book when the window ends now.



## OpenAPI

````yaml /openapi.json get /v1/wallets/{wallet}/series
openapi: 3.1.0
info:
  title: Codex API
  version: 1.0.0
  description: >-
    Nomos's Polymarket index, rebuilt from Polygon: holders, positions, PnL,
    trades, leaderboards and live fills.
servers:
  - url: https://codex-api.nomos.trade
security:
  - bearerAuth: []
tags:
  - name: Markets
  - name: Wallets
  - name: Leaderboard
  - name: Events
  - name: Fills
  - name: Crypto Strikes
  - name: Health
paths:
  /v1/wallets/{wallet}/series:
    get:
      tags:
        - Wallets
      summary: PnL Series
      description: >-
        Cumulative settled PnL through the window, from 0, for a PnL chart.
        Buckets are 1 h (1d, 7d), 4 h (30d) or a day beyond; a custom window
        gets at most 400 points. The last point adds today's open book when the
        window ends now.
      operationId: wallet-series
      parameters:
        - name: wallet
          in: path
          required: true
          description: 'The wallet: 0x and 40 hex.'
          schema:
            type: string
            pattern: ^0x[0-9a-fA-F]{40}$
          example: '0x1f0ebc543b2d411f66947041625c0aa1ce61cf79'
        - name: period
          in: query
          required: false
          description: >-
            A rolling window ending now, or the lifetime. Or give `from` and
            `to` instead.
          schema:
            type: string
            enum:
              - all
              - 1d
              - 7d
              - 30d
              - 90d
              - 1y
            default: all
          example: 7d
        - name: from
          in: query
          required: false
          description: A custom window's start, unix seconds.
          schema:
            type: integer
        - name: to
          in: query
          required: false
          description: Its end, unix seconds, exclusive. Now when left out.
          schema:
            type: integer
        - name: category
          in: query
          required: false
          description: >-
            `global`, `Other`, or Politics, Sports, Crypto, Finance, Culture,
            Mentions, Weather, Economics, Tech (any case).
          schema:
            type: string
            default: global
      responses:
        '200':
          description: 'OK. Gzipped when you send `Accept-Encoding: gzip`.'
          headers:
            x-ratelimit-limit:
              description: Your rate, requests a minute.
              schema:
                type: integer
            x-ratelimit-remaining:
              description: Requests left in your bucket.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  block:
                    type:
                      - integer
                      - 'null'
                    description: The leaderboard rollup's block.
                  asOf:
                    type:
                      - integer
                      - 'null'
                    description: When the rollup ran. Unix seconds.
                  wallet:
                    type: string
                    description: ''
                  period:
                    type: string
                    description: ''
                  category:
                    type: string
                    description: ''
                  from:
                    type: integer
                    description: ' Unix seconds.'
                  to:
                    type: integer
                    description: ' Unix seconds.'
                  bucket:
                    type: integer
                    description: Seconds between points.
                  basis:
                    type: string
                    description: ''
                  series:
                    type: array
                    items:
                      type: string
                    description: '["realized", "total"] when the window ends now.'
                  points:
                    type: array
                    items:
                      type: object
                      properties:
                        t:
                          type: integer
                          description: ' Unix seconds.'
                        realized:
                          type: number
                          description: USD.
                        unrealized:
                          type: number
                          description: USD, last point only.
                        total:
                          type: number
                          description: USD.
                        openValue:
                          type: number
                          description: USD, last point only.
                        openCount:
                          type: integer
                          description: Last point only.
              example:
                block: 94812300
                asOf: 1790862180
                wallet: '0x1f0ebc543b2d411f66947041625c0aa1ce61cf79'
                period: 7d
                category: global
                from: 1790257380
                to: 1790862180
                bucket: 3600
                basis: settled
                series:
                  - realized
                  - total
                points:
                  - t: 1790257380
                    realized: 0
                    unrealized: 0
                    total: 0
                    openValue: 0
                    openCount: 0
                  - t: 1790862180
                    realized: 64011.2
                    unrealized: 50822.68
                    total: 114833.88
                    openValue: 402118.2
                    openCount: 31
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    Unauthorized:
      description: No key, or an unknown or revoked one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unknown or revoked API key
    RateLimited:
      description: >-
        Over your rate, or more than 4 requests (2 streams) at once. Wait
        `Retry-After` seconds.
      headers:
        retry-after:
          description: Seconds to wait.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'rate limit: 600 requests a minute; retry in 1 s'
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong, for a person to read.
      description: Every error answer.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key: `codex_` and 48 hex characters.'

````

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