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

# Get trader collateral history

> Handles `GET /v1/traders/{trader_pubkey}/collateral-history` via `get.v1.traders.by_trader_pubkey.collateral_history`.



## OpenAPI

````yaml /openapi/phoenix-public-api.json get /v1/traders/{trader_pubkey}/collateral-history
openapi: 3.1.0
info:
  title: Phoenix Eternal API
  description: >-
    RESTful API for accessing Phoenix Eternal perpetual trading data. Provides
    real-time orderbook levels, asset information, and market metadata.
  termsOfService: https://www.phoenix.trade/terms-of-service
  contact:
    name: Phoenix Development Team
    url: https://github.com/Ellipsis-Labs/phoenix
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://perp-api.phoenix.trade
    description: Phoenix Eternal Perp API
security: []
tags:
  - name: Auth
    description: Wallet and session authentication.
  - name: Exchange
    description: Exchange, market, candle, and no-referral register-instruction workflows.
  - name: Invite
    description: Invite validation, referral activation, and wallet allowlist checks.
  - name: Notifications
    description: Trader notification reads and acknowledgement helpers.
  - name: Trader
    description: Trader state, account history, and transaction builders.
externalDocs:
  url: https://docs.phoenix.trade
  description: Phoenix developer documentation
paths:
  /v1/traders/{trader_pubkey}/collateral-history:
    get:
      tags:
        - Trader
      summary: Get trader collateral history
      description: >-
        Handles `GET /v1/traders/{trader_pubkey}/collateral-history` via
        `get.v1.traders.by_trader_pubkey.collateral_history`.
      operationId: get.v1.traders.by_trader_pubkey.collateral_history
      parameters:
        - name: limit
          in: query
          description: Number of items to return (max 1000)
          required: true
          schema:
            type: integer
            format: int64
        - name: nextCursor
          in: query
          description: Cursor for older events (base64-encoded).
          required: false
          schema:
            type: string
        - name: prevCursor
          in: query
          description: Cursor for newer events (base64-encoded).
          required: false
          schema:
            type: string
        - name: cursor
          in: query
          description: Deprecated cursor parameter (older events).
          required: false
          schema:
            type: string
        - name: trader_pubkey
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollateralHistoryResponse'
      security:
        - PhoenixBearerAuth: []
components:
  schemas:
    CollateralHistoryResponse:
      type: object
      description: Response for collateral event history queries
      required:
        - data
        - hasMore
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CollateralEvent'
          description: The data payload (array of items)
        hasMore:
          type: boolean
          description: Whether there are more results in the requested direction
        nextCursor:
          type:
            - string
            - 'null'
          description: Cursor for fetching older results
        prevCursor:
          type:
            - string
            - 'null'
          description: Cursor for fetching newer results
    CollateralEvent:
      type: object
      description: A single collateral event (deposit or withdrawal)
      required:
        - slot
        - slotIndex
        - eventIndex
        - traderPdaIndex
        - traderSubaccountIndex
        - eventType
        - amount
        - collateralAfter
        - timestamp
      properties:
        amount:
          type: integer
          format: int64
          description: Amount deposited or withdrawn (in quote lots, 6 decimals)
        collateralAfter:
          type: integer
          format: int64
          description: Collateral balance after this event (in quote lots, 6 decimals)
        eventIndex:
          type: integer
          format: int32
          description: Event index for ordering within the slot
        eventType:
          type: string
          description: 'Event type: ''deposit'' or ''withdrawal'''
        slot:
          type: integer
          format: int64
          description: Solana slot when the event occurred
        slotIndex:
          type: integer
          format: int32
          description: Index within the slot
        timestamp:
          type: string
          format: date-time
          description: Formatted datetime string (ISO 8601).
        traderPdaIndex:
          type: integer
          format: int32
          description: Trader PDA index (usually 0)
        traderSubaccountIndex:
          type: integer
          format: int32
          description: Trader subaccount index
  securitySchemes:
    PhoenixBearerAuth:
      type: http
      scheme: bearer
      description: Bearer access token issued by `/v1/auth/*` login endpoints.

````