> ## 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/fetch-onchain-transactions-for-a-contract",
  "feedback": "Description of the issue"
}
```

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

</AgentInstructions>

# Fetch onchain transactions for a contract

> Returns a paginated list of onchain transactions for the specified contract address and base asset ID, optionally filtered by date range.



## OpenAPI

````yaml https://docs.fireblocks.com/api/v1/swagger.yaml get /onchain_data/base_asset_id/{baseAssetId}/contract_address/{contractAddress}/transactions
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}/transactions:
    get:
      tags:
        - Onchain Data
      summary: Fetch onchain transactions for a contract
      description: >-
        Returns a paginated list of onchain transactions for the specified
        contract address and base asset ID, optionally filtered by date range.
      operationId: getOnchainTransactions
      parameters:
        - $ref: '#/components/parameters/BaseAssetId'
        - $ref: '#/components/parameters/ContractAddress'
        - $ref: '#/components/parameters/StartDate'
        - $ref: '#/components/parameters/EndDate'
        - $ref: '#/components/parameters/PageCursor'
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/TransactionsSortBy'
        - $ref: '#/components/parameters/Order'
      responses:
        '200':
          description: Onchain transactions fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnchainTransactionsPagedResponse'
        default:
          $ref: '#/components/responses/Error'
      x-codeSamples:
        - lang: TypeScript
          source: >-
            const response:
            Promise<FireblocksResponse<OnchainTransactionsPagedResponse>> =
            fireblocks.onchainData.getOnchainTransactions(onchainDataApiGetOnchainTransactionsRequest);
        - lang: Java
          source: >-
            CompletableFuture<ApiResponse<OnchainTransactionsPagedResponse>>
            response =
            fireblocks.onchainData().getOnchainTransactions(baseAssetId,
            contractAddress, startDate, endDate, pageCursor, pageSize, sortBy,
            order);
        - lang: Python
          source: >-
            response =
            fireblocks.onchain_data.get_onchain_transactions(base_asset_id,
            contract_address, start_date, end_date, 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
    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
    TransactionsSortBy:
      name: sortBy
      in: query
      description: Sorting field (enum).
      required: false
      schema:
        type: string
        enum:
          - blockTimestamp
          - blockNumber
          - transactionHash
        default: blockTimestamp
    Order:
      name: order
      in: query
      description: ASC / DESC ordering (default DESC)
      required: false
      schema:
        type: string
        enum:
          - ASC
          - DESC
        default: DESC
  schemas:
    OnchainTransactionsPagedResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OnchainTransaction'
          description: Array of onchain transactions
        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
    OnchainTransaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the transaction
          example: 550e8400-e29b-41d4-a716-446655440000
        baseAssetId:
          type: string
          description: The blockchain base asset identifier
          example: ETH_TEST3
        blockHash:
          type: string
          description: Hash of the block containing this transaction
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
        blockNumber:
          type: integer
          description: Block number containing this transaction
          example: 12345678
        blockTimestamp:
          type: string
          format: date-time
          description: Timestamp when the block was mined
          example: '2025-01-16T15:45:00Z'
        chainId:
          type: integer
          description: Chain ID of the blockchain
          example: 1
        contractAddress:
          type: string
          nullable: true
          description: Contract address if this is a contract transaction
          example: '0x1234567890123456789012345678901234567890'
        cumulativeGasUsed:
          type: string
          description: Cumulative gas used in the block up to this transaction
          example: '21000'
        decodedLogs:
          $ref: '#/components/schemas/DecodedLog'
        effectiveGasPrice:
          type: string
          description: Effective gas price paid for the transaction
          example: '20000000000'
        fromAddress:
          type: string
          description: Address that initiated the transaction
          example: '0xabcdef1234567890abcdef1234567890abcdef12'
        gasUsed:
          type: string
          description: Amount of gas used by this transaction
          example: '21000'
        status:
          type: string
          description: Transaction status
          example: '1'
        toAddress:
          type: string
          nullable: true
          description: Address that received the transaction
          example: '0x1234567890123456789012345678901234567890'
        transactionHash:
          type: string
          description: Hash of the transaction
          example: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890'
        transactionIndex:
          type: string
          description: Index of the transaction in the block
          example: '0'
        type:
          type: string
          description: Transaction type
          example: '2'
      required:
        - id
        - baseAssetId
        - blockHash
        - blockNumber
        - blockTimestamp
        - chainId
        - cumulativeGasUsed
        - effectiveGasPrice
        - fromAddress
        - gasUsed
        - status
        - transactionHash
        - transactionIndex
        - type
    ErrorSchema:
      type: object
      properties:
        message:
          type: string
        code:
          type: number
    DecodedLog:
      type: object
      properties:
        address:
          type: string
          description: Contract address that emitted the log
          example: '0x1234567890123456789012345678901234567890'
        blockHash:
          type: string
          description: Hash of the block containing this log
          example: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
        blockNumber:
          type: string
          description: Block number containing this log
          example: '12345678'
        transactionHash:
          type: string
          description: Hash of the transaction that generated this log
          example: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890'
        logIndex:
          type: string
          description: Index of the log in the transaction
          example: '0'
      required:
        - address
        - blockHash
        - blockNumber
        - transactionHash
        - logIndex
      description: >-
        Decoded event log from a blockchain transaction. Note - Additional
        dynamic properties may be present beyond the required ones.
  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

````