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

# Get vault events

> Paginated vault deposit and withdrawal events.

### Parameters

| Parameter | Required | Type | Description |
| --------- | -------- | ---- | ----------- |
| vault | yes | string (hex) | Optional vault address filter. |
| account | yes | string (hex) | Optional account address filter. |
| roundFrom | yes | string | null | Optional start round (inclusive). If provided, `roundTo` should also be provided. |
| roundTo | yes | string | null | Optional end round (inclusive). If provided, `roundFrom` should also be provided. |
| pageNumber | yes | integer | Zero-based page number. Accepts either a number or a numeric string. |
| pageSize | yes | integer | Page size (number of items per page). Accepts either a number or a numeric string. |

### Response fields

| Parameter | Required | Type | Description |
| --------- | -------- | ---- | ----------- |
| `events` | yes | object[] | Vault events returned for the selected filters. |
| `events[].account` | yes | string (hex) | Account associated with the event. |
| `events[].amount` | yes | string | Absolute collateral amount in dollar units. |
| `events[].assetId` | yes | integer | — |
| `events[].eventIndex` | yes | integer (int32) | Event index within the round. |
| `events[].eventType` | yes | string | Event type exposed to clients (`deposit` or `withdraw` for vault flows). |
| `events[].round` | yes | integer (int64) | — |
| `events[].shares` | yes | string | Signed share delta stored in the vault event row. |
| `events[].timestamp` | yes | integer (int64) | — |
| `events[].txHash` | yes | string (hex) | Transaction hash as a hex string. |
| `events[].txIndex` | yes | integer (int32) | Transaction index within the round. |
| `events[].vault` | yes | string (hex) | Vault address. |
| `pageNumber` | yes | integer | — |
| `pageSize` | yes | integer | — |

### Response example

A sample **`200`** response body is attached to this operation as an OpenAPI **example** — see the **Example** panel on this page.



## OpenAPI

````yaml /specs/indexer-openapi.json get /vault-events
openapi: 3.1.0
info:
  title: Rocket Indexer API Documentation
  description: >-
    Welcome to the RocketChain Indexer API documentation!


    The indexer REST API serves historical and aggregated market data from
    ClickHouse. Endpoints cover candles, trades, order history, portfolio
    curves, funding events, bridge events, vault events, current/historical
    instruments, and live instrument details.
  license:
    name: MIT
    url: https://github.com/rocketfoundation/rocket-sdk-rust/blob/main/LICENSE
  version: '1.0'
  x-logo:
    altText: ROCKET
    backgroundColor: '#00000000'
    url: https://www.rocketfoundation.io/assets/rocket-logo.svg
servers:
  - url: https://beta.rocket-cluster-1.com/indexer
    description: Beta
  - url: https://testnet.rocket-cluster-1.com/indexer
    description: Testnet
  - url: https://devnet.rocket-cluster-1.com/indexer
    description: Devnet
security: []
tags:
  - name: Indexer REST-API
    description: >-
      Read-only REST endpoints backed by the RocketChain indexer. All routes are
      served over HTTP GET.
paths:
  /vault-events:
    get:
      tags:
        - Indexer REST-API
      summary: Get vault events
      description: >-
        Paginated vault deposit and withdrawal events.


        ### Parameters


        | Parameter | Required | Type | Description |

        | --------- | -------- | ---- | ----------- |

        | vault | yes | string (hex) | Optional vault address filter. |

        | account | yes | string (hex) | Optional account address filter. |

        | roundFrom | yes | string | null | Optional start round (inclusive). If
        provided, `roundTo` should also be provided. |

        | roundTo | yes | string | null | Optional end round (inclusive). If
        provided, `roundFrom` should also be provided. |

        | pageNumber | yes | integer | Zero-based page number. Accepts either a
        number or a numeric string. |

        | pageSize | yes | integer | Page size (number of items per page).
        Accepts either a number or a numeric string. |


        ### Response fields


        | Parameter | Required | Type | Description |

        | --------- | -------- | ---- | ----------- |

        | `events` | yes | object[] | Vault events returned for the selected
        filters. |

        | `events[].account` | yes | string (hex) | Account associated with the
        event. |

        | `events[].amount` | yes | string | Absolute collateral amount in
        dollar units. |

        | `events[].assetId` | yes | integer | — |

        | `events[].eventIndex` | yes | integer (int32) | Event index within the
        round. |

        | `events[].eventType` | yes | string | Event type exposed to clients
        (`deposit` or `withdraw` for vault flows). |

        | `events[].round` | yes | integer (int64) | — |

        | `events[].shares` | yes | string | Signed share delta stored in the
        vault event row. |

        | `events[].timestamp` | yes | integer (int64) | — |

        | `events[].txHash` | yes | string (hex) | Transaction hash as a hex
        string. |

        | `events[].txIndex` | yes | integer (int32) | Transaction index within
        the round. |

        | `events[].vault` | yes | string (hex) | Vault address. |

        | `pageNumber` | yes | integer | — |

        | `pageSize` | yes | integer | — |


        ### Response example


        A sample **`200`** response body is attached to this operation as an
        OpenAPI **example** — see the **Example** panel on this page.
      operationId: getVaultEvents
      parameters:
        - name: vault
          in: path
          description: Optional vault address filter.
          required: true
          schema:
            type: string
            format: hex
          example: '0xf19e16fe3cf25c630f55f66d6c6cbf64f84fc86b'
        - name: account
          in: path
          description: Optional account address filter.
          required: true
          schema:
            type: string
            format: hex
          example: '0xd6963dda208f0f36acd13cce5bbc26720c8b612f'
        - name: roundFrom
          in: path
          description: >-
            Optional start round (inclusive). If provided, `roundTo` should also
            be provided.
          required: true
          schema:
            type:
              - string
              - 'null'
          example: 1000
        - name: roundTo
          in: path
          description: >-
            Optional end round (inclusive). If provided, `roundFrom` should also
            be provided.
          required: true
          schema:
            type:
              - string
              - 'null'
          example: 1100
        - name: pageNumber
          in: path
          description: |-
            Zero-based page number.
            Accepts either a number or a numeric string.
          required: true
          schema:
            oneOf:
              - $ref: '#/components/schemas/usize'
            default: 0
          example: 0
        - name: pageSize
          in: path
          description: |-
            Page size (number of items per page).
            Accepts either a number or a numeric string.
          required: true
          schema:
            oneOf:
              - $ref: '#/components/schemas/usize'
            default: 2000
          example: 100
      responses:
        '200':
          description: Vault events
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVaultEventsResponse'
              example:
                events:
                  - account: '0xd6963dda208f0f36acd13cce5bbc26720c8b612f'
                    amount: '5000'
                    assetId: 0
                    eventIndex: 0
                    eventType: deposit
                    round: 29083401
                    shares: '500000'
                    timestamp: 1774368107590
                    txHash: >-
                      0x0000000000000000000000000000000000000000000000000000000000000000
                    txIndex: 0
                    vault: '0xf19e16fe3cf25c630f55f66d6c6cbf64f84fc86b'
                pageNumber: 0
                pageSize: 100
        '400':
          description: Invalid query parameters
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Internal server error
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    usize:
      type: integer
      minimum: 0
    GetVaultEventsResponse:
      type: object
      required:
        - events
        - pageNumber
        - pageSize
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/VaultEventResponseItem'
          description: Vault events returned for the selected filters.
        pageNumber:
          $ref: '#/components/schemas/usize'
          description: Zero-based page number.
        pageSize:
          $ref: '#/components/schemas/usize'
          description: Page size (max items per page).
      examples:
        - events:
            - account: '0xd6963dda208f0f36acd13cce5bbc26720c8b612f'
              amount: '5000'
              assetId: 0
              eventIndex: 0
              eventType: deposit
              round: 29083401
              shares: '500000'
              timestamp: 1774368107590
              txHash: >-
                0x0000000000000000000000000000000000000000000000000000000000000000
              txIndex: 0
              vault: '0xf19e16fe3cf25c630f55f66d6c6cbf64f84fc86b'
          pageNumber: 0
          pageSize: 100
    VaultEventResponseItem:
      type: object
      required:
        - timestamp
        - round
        - txIndex
        - eventIndex
        - vault
        - account
        - eventType
        - assetId
        - amount
        - shares
        - txHash
      properties:
        account:
          type: string
          format: hex
          description: Account associated with the event.
        amount:
          type: string
          description: Absolute collateral amount in dollar units.
        assetId:
          $ref: '#/components/schemas/usize'
          description: Asset associated with the event.
        eventIndex:
          type: integer
          format: int32
          description: Event index within the round.
          minimum: 0
        eventType:
          type: string
          description: >-
            Event type exposed to clients (`deposit` or `withdraw` for vault
            flows).
        round:
          $ref: '#/components/schemas/u64'
          description: Round in which the event occurred.
        shares:
          type: string
          description: Signed share delta stored in the vault event row.
        timestamp:
          $ref: '#/components/schemas/u64'
          description: Event timestamp in milliseconds since Unix epoch.
        txHash:
          type: string
          format: hex
          description: Transaction hash as a hex string.
        txIndex:
          type: integer
          format: int32
          description: Transaction index within the round.
          minimum: 0
        vault:
          type: string
          format: hex
          description: Vault address.
    u64:
      type: integer
      format: int64
      minimum: 0

````