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

# List user historical positions

> Returns vaults the user held a position in (had a non-zero balance at the start of the window or deposited during the window). Both timestamps are optional.



## OpenAPI

````yaml https://api.vaults.fyi/alpha/documentation/json get /alpha/historical-positions/{userAddress}
openapi: 3.0.3
info:
  title: Vaults.fyi Alpha API
  version: 0.1.0
  description: >-
    Alpha API endpoints for features in early access. These endpoints are not
    included in the main API documentation and may change without notice.
servers:
  - url: https://api.vaults.fyi
    description: Vaults.fyi Alpha API
security: []
tags:
  - name: Cross Chain
  - name: CCTP Bridge
  - name: SVM
  - name: Holders
  - name: Advanced Analytics
  - name: Historical Positions
paths:
  /alpha/historical-positions/{userAddress}:
    get:
      tags:
        - Historical Positions
      summary: List user historical positions
      description: >-
        Returns vaults the user held a position in (had a non-zero balance at
        the start of the window or deposited during the window). Both timestamps
        are optional.
      operationId: listHistoricalPositions
      parameters:
        - schema:
            type: integer
          in: query
          name: fromTimestamp
          required: false
          description: >-
            Optional start of the window (unix seconds). Omit to start from the
            beginning.
        - schema:
            type: integer
          in: query
          name: toTimestamp
          required: false
          description: >-
            Optional end of the window (unix seconds). Omit to use the current
            time.
        - schema:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
          in: path
          name: userAddress
          required: true
          description: User address to fetch historical positions for
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  historicalPositions:
                    type: array
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          pattern: ^0x[a-fA-F0-9]{40}$
                          description: Address of the vault
                        network:
                          type: object
                          properties:
                            name:
                              type: string
                              enum:
                                - mainnet
                                - optimism
                                - arbitrum
                                - polygon
                                - gnosis
                                - base
                                - unichain
                                - swellchain
                                - celo
                                - worldchain
                                - berachain
                                - ink
                                - bsc
                                - hyperliquid
                                - plasma
                                - avalanche
                                - katana
                                - linea
                                - mega-eth
                                - monad
                                - etherlink
                              description: Name of the network
                            chainId:
                              type: integer
                              description: Chain ID of the network
                            networkCaip:
                              type: string
                              pattern: ^eip155:\d+$
                              description: CAIP-2 of the network
                          required:
                            - name
                            - chainId
                            - networkCaip
                          additionalProperties: false
                          description: Network details of the vault
                        name:
                          type: string
                          description: Name of the vault
                        protocol:
                          type: object
                          properties:
                            name:
                              type: string
                              description: Name of the protocol
                            product:
                              type: string
                              description: Product of the protocol
                            version:
                              type: string
                              description: Version of the protocol
                            protocolUrl:
                              type: string
                              description: URL of the protocol
                            description:
                              type: string
                              description: Description of the protocol
                            protocolLogo:
                              type: string
                              description: URL of the protocol logo
                          required:
                            - name
                          additionalProperties: false
                          description: Protocol details of the vault
                        asset:
                          type: object
                          properties:
                            address:
                              type: string
                              pattern: ^0x[a-fA-F0-9]{40}$
                              description: Address of the asset
                            assetCaip:
                              type: string
                              pattern: >-
                                ^eip155:\d+\/(erc20:0x[0-9a-fA-F]{40}|slip44:\d+)$
                              description: CAIP-2 of the asset
                            name:
                              type: string
                              description: Name of the asset
                            symbol:
                              type: string
                              description: Symbol of the asset
                            decimals:
                              type: integer
                              description: Number of decimals of the asset
                            assetLogo:
                              type: string
                              format: uri
                              description: URL of the asset logo
                            assetPriceInUsd:
                              type: string
                              description: Price of the asset in USD
                            assetGroup:
                              type: string
                              description: >-
                                Group of the asset, e.g., ETH, USD, EURO, BTC,
                                OTHER
                          required:
                            - address
                            - assetCaip
                            - name
                            - symbol
                            - decimals
                            - assetGroup
                          additionalProperties: false
                          description: Primary asset details of the vault
                        active:
                          type: boolean
                          description: >-
                            Whether the user currently holds a non-zero LP token
                            balance for the vault
                      required:
                        - address
                        - network
                        - name
                        - protocol
                        - asset
                        - active
                      additionalProperties: false
                required:
                  - historicalPositions
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      statusCode:
                        type: number
                      error:
                        type: string
                        enum:
                          - Bad Request
                      message:
                        type: string
                      errorId:
                        type: string
                    required:
                      - statusCode
                      - error
                      - message
                    additionalProperties: false
                  - {}
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                        enum:
                          - Unauthorized
                      message:
                        type: string
                        enum:
                          - >-
                            An API key is required to access this service. Sign
                            up at https://portal.vaults.fyi/signup to generate a
                            key. We offer a Pay-As-You-Go plan so you only pay
                            for what you use, with no commitments.
                      errorId:
                        type: string
                    required:
                      - error
                      - message
                    additionalProperties: false
                  - {}
        '402':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      x402Version:
                        anyOf:
                          - type: number
                          - type: string
                      error:
                        type: string
                      resource:
                        type: object
                        properties:
                          url:
                            type: string
                          description:
                            type: string
                          mimeType:
                            type: string
                          serviceName:
                            type: string
                          tags:
                            type: array
                            items:
                              type: string
                          iconUrl:
                            type: string
                        required:
                          - url
                        additionalProperties: false
                      accepts:
                        anyOf:
                          - type: array
                            items:
                              type: object
                              properties:
                                scheme:
                                  type: string
                                  enum:
                                    - exact
                                network:
                                  type: string
                                amount:
                                  type: string
                                payTo:
                                  type: string
                                maxTimeoutSeconds:
                                  type: number
                                asset:
                                  type: string
                                extra:
                                  type: object
                                  properties:
                                    name:
                                      type: string
                                    version:
                                      type: string
                                  required:
                                    - name
                                    - version
                                  additionalProperties: false
                              required:
                                - scheme
                                - network
                                - amount
                                - payTo
                                - maxTimeoutSeconds
                                - asset
                              additionalProperties: false
                          - {}
                      extensions:
                        type: object
                        additionalProperties: {}
                    required:
                      - x402Version
                      - resource
                    additionalProperties: false
                  - {}
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                        enum:
                          - Forbidden
                      message:
                        type: string
                        enum:
                          - >-
                            This API key has exhausted its available credits. To
                            resume service, please visit
                            https://portal.vaults.fyi/signup to top-up your
                            credits
                      errorId:
                        type: string
                    required:
                      - error
                      - message
                    additionalProperties: false
                  - {}
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - Not Found
                  message:
                    type: string
                required:
                  - error
                  - message
                additionalProperties: false
        '408':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      message:
                        type: string
                      errorId:
                        type: string
                    additionalProperties: false
                  - {}
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      statusCode:
                        type: number
                      error:
                        type: string
                        enum:
                          - Unprocessable Entity
                      message:
                        type: string
                      errorId:
                        type: string
                    required:
                      - statusCode
                      - error
                      - message
                    additionalProperties: false
                  - {}
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      error:
                        type: string
                        enum:
                          - Internal Server Error
                      message:
                        type: string
                      errorId:
                        type: string
                    required:
                      - error
                      - message
                    additionalProperties: false
                  - {}
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      statusCode:
                        type: number
                      error:
                        type: string
                        enum:
                          - Service Unavailable
                      message:
                        type: string
                      errorId:
                        type: string
                    required:
                      - statusCode
                      - error
                      - message
                    additionalProperties: false
                  - {}
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````