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

# Wallet PnL: batch

> Batch twin: up to 20 wallets per call, response array in input order. Each slot is `{ data }`, the body of the single GET for that wallet (PnL curve (daily buckets on `30d` and `all`, hourly on `1d` and `7d`) plus summary), or `{ error }` when that wallet failed, so one wallet never fails the others. `period` applies to every wallet of the call. Billed per wallet.

`POST /v1/wallet/pnl` · **1 per wallet credits**

Batch twin: up to 20 wallets per call, response array in input order. Each slot is `{ data }`, the body of the single GET for that wallet (PnL curve (daily buckets on `30d` and `all`, hourly on `1d` and `7d`) plus summary), or `{ error }` when that wallet failed, so one wallet never fails the others. `period` applies to every wallet of the call. Billed per wallet.

<Note>A slot's `data` is exactly what `GET /v1/wallet/pnl` returns for that wallet with the same `period`, `usdBasis` included on Solana; see that page for the fields.</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://api.serialized.xyz/v1/wallet/pnl' \\
    -H 'Authorization: YOUR_API_KEY' -H 'Content-Type: application/json' \\
    -d '{"items":[{"wallet":"0xd13da05b9288ba4961973110594bd0fe3428791f"},{"wallet":"GuhieZDx6nwJV14WjeUQH2ted6CGPKoGCCTaPSPNgG2E","chain":"solana"}],"period":"7d"}'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": [
      {
        "data": {
          "history": [
            {
              "at": 1788307200000,
              "realizedPnlUsd": 1140.85094,
              "trades": 2
            },
            {
              "at": 1788310800000,
              "realizedPnlUsd": 2788.333763,
              "trades": 4
            },
            {
              "at": 1788314400000,
              "realizedPnlUsd": 21605.963131,
              "trades": 34
            }
          ],
          "summary": {
            "realizedPnlUsd": 7349355.754098,
            "winRate": 99.774218,
            "trades": 9305,
            "wins": 9280,
            "losses": 21
          }
        }
      },
      {
        "data": {
          "usdBasis": "trade",
          "history": [],
          "summary": {
            "realizedPnlUsd": 0,
            "winRate": null,
            "trades": 0,
            "wins": 0,
            "losses": 0
          }
        }
      }
    ],
    "meta": {
      "asOf": 1788937658898
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi.json POST /v1/wallet/pnl
openapi: 3.1.0
info:
  title: Serialized Data API
  description: >-
    On-chain data for trading apps - tokens, candles, token filters. Built on
    our own indexers. 18 EVM chains + Solana, live.
  version: 0.1.0
servers:
  - url: https://demo.serialized.xyz
    description: 'Demo: no key needed, read endpoints, rate-limited per IP'
  - url: https://api.serialized.xyz
    description: 'Production: your API key in the Authorization header'
security:
  - apiKey: []
  - {}
paths:
  /v1/wallet/pnl:
    post:
      summary: 'Wallet PnL: batch'
      description: >-
        Batch twin: up to 20 wallets per call, response array in input order.
        Each slot is `{ data }`, the body of the single GET for that wallet
        (daily curve plus summary), or `{ error }` when that wallet failed, so
        one wallet never fails the others. `period` applies to every wallet of
        the call. Billed per wallet.
      operationId: wallet-pnl-batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              required:
                - items
              properties:
                items:
                  minItems: 1
                  maxItems: 20
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    required:
                      - wallet
                    properties:
                      wallet:
                        description: Wallet address (EVM hex or Solana base58)
                        type: string
                      chain:
                        description: Public chain id. Omit for all EVM chains.
                        type: string
                  description: >-
                    `[{ "wallet": "…", "chain": "…" }]` - 1 to 20 wallets, EVM
                    and Solana mixed freely; `chain` optional (omit for all EVM
                    chains).
                period:
                  enum:
                    - 1d
                    - 7d
                    - 30d
                    - all
                  default: 30d
                  type: string
                  description: >-
                    Same as the GET, applied to every wallet: `1d`, `7d`, `30d`
                    (default) or `all`.
                  example: 30d
                  x-default: 30d
      responses:
        '200':
          description: Standard `{ data, meta }` envelope.
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: Your raw API key (not needed on the demo server).

````

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