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

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://developers.fireblocks.com/feedback

```json
{
  "path": "/api-reference/onchain-data/get-historical-total-supply-data-for-a-contract",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Get historical total supply data for a contract

> Returns the paginated total supply history of the specified contract with optional date range and interval filtering.



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml get /onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/total_supply
openapi: 3.0.0
info:
  title: Fireblocks API
  description: >
    Fireblocks provides a suite of applications to manage digital asset
    operations and a complete development platform to build your business on the
    blockchain.


    - Visit our website for more information: [Fireblocks
    Website](https://fireblocks.com)

    - Visit our developer docs: [Fireblocks
    DevPortal](https://developers.fireblocks.com)
  version: 1.6.2
  contact:
    email: developers@fireblocks.com
servers:
  - url: https://api.fireblocks.io/v1
    description: Fireblocks Production Environment Base URL
  - url: https://sandbox-api.fireblocks.io/v1
    description: Fireblocks Sandbox Environment Base URL
security: []
paths:
  /onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/total_supply:
    get:
      tags:
        - Onchain Data
      summary: Get historical total supply data for a contract
      description: >-
        Returns the paginated total supply history of the specified contract
        with optional date range and interval filtering.
      operationId: getContractTotalSupply
      parameters:
        - $ref: '#/components/parameters/BaseAssetId'
        - $ref: '#/components/parameters/ContractAddress'
        - $ref: '#/components/parameters/StartDate'
        - $ref: '#/components/parameters/EndDate'
        - $ref: '#/components/parameters/Interval'
        - $ref: '#/components/parameters/PageCursor'
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/SortByTimestamp'
        - $ref: '#/components/parameters/Order'
      responses:
        '200':
          description: Successfully retrieved the contract total supply history
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalSupplyPagedResponse'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response:
            Promise<FireblocksResponse<TotalSupplyPagedResponse>> =
            fireblocks.onchainData.getContractTotalSupply(onchainDataApiGetContractTotalSupplyRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<TotalSupplyPagedResponse>> response =
            fireblocks.onchainData().getContractTotalSupply(baseAssetId,
            contractAddress, startDate, endDate, interval, pageCursor, pageSize,
            sortBy, order);
        - lang: Python
          source: >-
            response =
            fireblocks.onchain_data.get_contract_total_supply(base_asset_id,
            contract_address, start_date, end_date, interval, page_cursor,
            page_size, sort_by, order);
components:
  parameters:
    BaseAssetId:
      name: baseAssetId
      in: path
      description: The blockchain base assetId
      example: ETH_TEST3
      schema:
        type: string
      required: true
    ContractAddress:
      name: contractAddress
      in: path
      description: The contract address
      example: '0xC2c4e1Db41F0bB97996D0eD0542D2170d146FB66'
      schema:
        type: string
      required: true
    StartDate:
      name: startDate
      in: query
      description: Start date of the time range in ISO 8601 format
      example: '2025-01-16T15:45:00Z'
      schema:
        type: string
        format: date-time
      required: false
    EndDate:
      name: endDate
      in: query
      description: End date of the time range in ISO 8601 format
      example: '2025-01-16T15:45:00Z'
      schema:
        type: string
        format: date-time
      required: false
    Interval:
      name: interval
      in: query
      description: Time interval for grouping data
      example: day
      schema:
        type: string
        enum:
          - hour
          - day
          - week
          - month
        default: day
      required: false
    PageCursor:
      name: pageCursor
      in: query
      description: Page cursor to get the next page"
      example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==
      schema:
        type: string
      required: false
    PageSize:
      name: pageSize
      in: query
      description: >-
        Number of items per page (max 100), requesting more then 100 will return
        100 items
      example: 10
      schema:
        type: integer
        minimum: 1
        maximum: 100
      required: false
    SortByTimestamp:
      name: sortBy
      in: query
      description: Sorting field (enum). Sorting only supported by 'blockTimestamp'
      required: false
      schema:
        type: string
        enum:
          - blockTimestamp
        default: blockTimestamp
    Order:
      name: order
      in: query
      description: ASC / DESC ordering (default DESC)
      required: false
      schema:
        type: string
        enum:
          - ASC
          - DESC
        default: DESC
  schemas:
    TotalSupplyPagedResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TotalSupplyItemDto'
          description: Array of total supply data points
        next:
          type: string
          example: MjAyMy0xMi0xMyAyMDozNjowOC4zMDI=:MTEwMA==
          description: Cursor for next page
        prev:
          type: string
          example: dGhpcyBpcyBhIHByZXZpb3VzIGN1cnNvcg==
          description: Cursor for previous page
        total:
          type: number
          example: 150
          description: Total count of items
      required:
        - data
    TotalSupplyItemDto:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the data point
          example: '2024-01-01T23:59:59.999Z'
        totalSupply:
          type: string
          description: Total supply at the given timestamp
          example: '1000000000000000000000'
      required:
        - timestamp
        - totalSupply
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
  responses:
    Error:
      description: Error Response
      headers:
        X-Request-ID:
          $ref: '#/components/headers/X-Request-ID'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorSchema'
  headers:
    X-Request-ID:
      schema:
        type: string
      description: >-
        Unique ID correlated to the API request. Please provide it in any
        support ticket you create or on Github issues related to Fireblocks SDKs

````