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

# Per-token trading breakdown for a wallet



## OpenAPI

````yaml openapi-spec/history.yaml get /api/sol/wallets/{address}/tokens
openapi: 3.0.3
info:
  title: Raze Database API
  description: >
    Paid subscription API for Solana transaction data and history.


    ## Batch Requests

    All endpoints with path parameters (mint, signer, address, tokenMint,
    ownerAddress) support batch queries

    via comma-separated values. For example:
    `/api/sol/trades/mint/mint1,mint2,mint3?limit=50`


    - Maximum 10 values per batch request

    - Each value must be a valid address (>= 32 characters)

    - Single values behave identically to non-batch requests

    - Batch response format: `{ "success": true, "results": { "value1": {...},
    "value2": {...} }, "count": N, "timestamp": "..." }`

    - Each key in `results` contains the full single-entity response

    - Queries run in parallel for maximum performance
  version: 1.0.0
servers:
  - url: https://api.raze.bot
    description: >-
      Raze global History API — GeoDNS routes to the nearest region
      automatically
security:
  - ApiKeyAuth: []
paths:
  /api/sol/wallets/{address}/tokens:
    get:
      summary: Per-token trading breakdown for a wallet
      operationId: getWalletTokens
      parameters:
        - name: address
          in: path
          required: true
          schema:
            type: string
          example: 62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: sort
          in: query
          schema:
            type: string
            enum:
              - volume
              - pnl
              - trades
              - recent
            default: volume
          description: Sort order for token list
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
          description: Number of records to skip for pagination
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletTokensResponse'
        '400':
          description: Invalid wallet address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Database error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    WalletTokensResponse:
      type: object
      properties:
        success:
          type: boolean
        address:
          type: string
        data:
          type: array
          items:
            type: object
            properties:
              mint:
                type: string
              totalTrades:
                type: integer
              buys:
                type: integer
              sells:
                type: integer
              totalVolumeSol:
                type: number
              totalVolumeUsd:
                type: number
              buyVolumeSol:
                type: number
              buyVolumeUsd:
                type: number
              sellVolumeSol:
                type: number
              sellVolumeUsd:
                type: number
              realizedPnlSol:
                type: number
              realizedPnlUsd:
                type: number
              firstTrade:
                type: string
                format: date-time
              lastTrade:
                type: string
                format: date-time
              totalFees:
                type: number
              name:
                type: string
                nullable: true
                description: Token name (from deploy)
              symbol:
                type: string
                nullable: true
                description: Token symbol (from deploy)
              platform:
                type: string
                nullable: true
                description: DEX platform (from deploy)
              positionStatus:
                type: string
                enum:
                  - open
                  - closed
                description: '"open" if buys > sells, "closed" otherwise'
              holdDurationSeconds:
                type: integer
                description: Seconds between first and last trade
        count:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        sort:
          type: string
          enum:
            - volume
            - pnl
            - trades
            - recent
        hasMore:
          type: boolean
        solPriceUsd:
          type: number
        timestamp:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        code:
          type: string
        success:
          type: boolean
      example:
        error: Unauthorized
        message: Invalid API key
        code: INVALID_KEY
        success: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: apiKey

````