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

# Get Transactions

> Retrieves a paginated list of the most recent transactions on the blockchain.



## OpenAPI

````yaml /open-api/0xapi.yaml get /v2/{chain_name}/transactions
openapi: 3.0.0
info:
  description: >-
    API for accessing blockchain data including tokens, NFTs, transactions,
    events, ENS, and blocks. Authentication is optional; providing an API key
    via Bearer token may grant higher rate limits or access to additional
    features.
  title: Ormi Data API
  version: v2
servers:
  - url: https://api.data.ormilabs.com
security:
  - OrmiApiKey: []
tags:
  - description: Operations related to fungible tokens and wallet balances.
    name: Tokens
  - description: Operations related to Non-Fungible Tokens (NFTs).
    name: NFTs
  - description: Operations related to blockchain transactions.
    name: Transactions
  - description: Operations related to smart contract events.
    name: Events
  - description: Operations related to blockchain blocks.
    name: Blocks
paths:
  /v2/{chain_name}/transactions:
    get:
      tags:
        - Transactions
      summary: Get Transactions
      description: >-
        Retrieves a paginated list of the most recent transactions on the
        blockchain.
      operationId: getTransactions
      parameters:
        - $ref: '#/components/parameters/WindowParameter'
        - description: Sort order for results.
          in: query
          name: sort_by
          schema:
            default: latest
            enum:
              - latest
              - earliest
            type: string
        - $ref: '#/components/parameters/LimitParameter'
        - $ref: '#/components/parameters/CursorParameter'
        - $ref: '#/components/parameters/ChainNameParameter'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionsResponse'
          description: Successfully retrieved transactions.
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    WindowParameter:
      description: |
        Specifies time or block range for the query.
        The format can be a relative duration like `30d` or `12h`.
        Or interval of time `2025-08-20T00:00:00Z..2025-08-26T12:00:00Z`.
        Or range of blocks `18000000..18000100`.
      examples:
        block_range:
          summary: Data between two block numbers
          value: 18000000..18000100
        last_30_days:
          summary: Data from the last 30 days
          value: 30d
        open_ended_range:
          summary: Data from block 18,500,000 to latest
          value: 18500000..
        time_range:
          summary: Data between two timestamps
          value: 2025-08-20T00:00:00Z..2025-08-26T12:00:00Z
      in: query
      name: window
      required: false
      schema:
        type: string
    LimitParameter:
      description: Maximum number of items to return.
      in: query
      name: limit
      schema:
        default: 50
        maximum: 1000
        minimum: 1
        type: integer
    CursorParameter:
      description: Cursor for pagination to retrieve the next set of results.
      in: query
      name: cursor
      schema:
        type: string
    ChainNameParameter:
      description: The name or ID of the blockchain.
      in: path
      name: chain_name
      required: true
      schema:
        enum:
          - ethereum
          - apechain
          - arbitrum
          - avalanche
          - base
          - bsc
          - polygon
        example: ethereum
        type: string
  schemas:
    TransactionsResponse:
      allOf:
        - $ref: '#/components/schemas/PaginationBase'
        - properties:
            transactions:
              items:
                $ref: '#/components/schemas/TransactionItem'
              type: array
          required:
            - transactions
          type: object
    PaginationBase:
      properties:
        next_cursor:
          example: ICJkYXNkYXMifQ==
          type: string
          x-omitempty: false
      type: object
    TransactionItem:
      properties:
        block_hash:
          example: '0xfc88f174eb6ab4e4deec01fb6484489659b5515b9229735a6e1a087dc3e2eb3f'
          type: string
        block_number:
          example: 22412527
          format: int64
          type: integer
        block_timestamp:
          example: '2025-05-04T19:38:11Z'
          format: date-time
          type: string
        contract_address:
          example: '0x312e67b47a2a29ae200184949093d92369f80b53'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
        cumulative_gas_used:
          example: '2692235'
          type: string
        effective_gas_price:
          example: '1000000000'
          type: string
        from_address:
          example: '0x290ca4da2c963dea5ae736469a5b8a53d64d4e6a'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
        gas:
          example: '40000'
          type: string
        gas_price:
          example: '1000000000'
          type: string
        gas_used:
          example: '22901'
          type: string
        input:
          example: 0x6874...
          type: string
        l1_fee:
          type: string
        l1_fee_scalar:
          type: string
        l1_gas_price:
          type: string
        l1_gas_used:
          type: string
        max_fee_per_gas:
          example: '1000000000'
          type: string
        max_priority_fee_per_gas:
          example: '1000000000'
          type: string
        nonce:
          example: '132573'
          type: string
        status:
          description: 'Transaction status: 0 for failure, 1 for success.'
          example: 0
          type: integer
        to_address:
          example: '0x312e67b47a2a29ae200184949093d92369f80b53'
          pattern: ^0x[a-fA-F0-9]{40}$
          type: string
        transaction_hash:
          example: '0x94ead602754fb7b4e6a884173ef9f68860e847a43788f5da13f7dbb4922e52ea'
          pattern: ^0x[a-fA-F0-9]{64}$
          type: string
        transaction_index:
          example: 43
          type: integer
        transaction_type:
          description: Type of transaction (e.g., 0 for legacy, 2 for EIP-1559).
          example: 2
          type: integer
        value:
          example: 0
          format: double
          type: number
        value_raw:
          example: '0'
          type: string
      required:
        - block_hash
        - block_number
        - block_timestamp
        - contract_address
        - cumulative_gas_used
        - effective_gas_price
        - from_address
        - gas
        - gas_price
        - gas_used
        - input
        - l1_fee
        - l1_fee_scalar
        - l1_gas_price
        - l1_gas_used
        - max_fee_per_gas
        - max_priority_fee_per_gas
        - nonce
        - status
        - to_address
        - transaction_hash
        - transaction_index
        - transaction_type
        - value
        - value_raw
      type: object
    ApiError:
      properties:
        code:
          description: Internal application-specific error code.
          example: 20001
          type: integer
        data:
          additionalProperties: true
          description: Additional data related to the error, if applicable.
          example: {}
          type: object
        msg:
          description: A human-readable message providing more details about the error.
          example: Invalid API key provided.
          type: string
      required:
        - code
        - msg
      type: object
  responses:
    BadRequestError:
      content:
        application/json:
          examples:
            genericBadRequest:
              summary: Generic Bad Request
              value:
                code: 20101
                data: {}
                msg: Bad request. Please check your input.
            missingData:
              summary: Missing data
              value:
                code: 20301
                data: {}
                msg: Data missing. Please check your input.
            validationFailed:
              summary: Validation Failed
              value:
                code: 20201
                data:
                  errors:
                    - field: email
                      message: Email is not valid
                    - field: age
                      message: Age must be a positive number
                msg: Validation failed. Please check your input
          schema:
            $ref: '#/components/schemas/ApiError'
      description: >-
        Bad Request - The server cannot or will not process the request due to
        something that is perceived to be a client error (e.g., malformed
        request syntax, invalid request message framing, or deceptive request
        routing).
    UnauthorizedError:
      content:
        application/json:
          examples:
            invalidApiKey:
              summary: Invalid API Key
              value:
                code: 10005
                data: {}
                msg: Invalid API key provided.
            missingApiKey:
              summary: Missing API Key
              value:
                code: 10003
                data: {}
                msg: API key is missing from the Authorization header.
          schema:
            $ref: '#/components/schemas/ApiError'
      description: >-
        Unauthorized - The client request has not been completed because it
        lacks valid authentication credentials for the requested resource.
        Typically for an invalid or missing API key.
    RateLimitError:
      content:
        application/json:
          examples:
            rateLimited:
              summary: Rate Limit Exceeded
              value:
                code: 10020
                data:
                  retry_after_seconds: 60
                msg: Rate limit exceeded. Please try again later.
          schema:
            $ref: '#/components/schemas/ApiError'
      description: >-
        Too Many Requests - The user has sent too many requests in a given
        amount of time ("rate limiting").
    InternalServerError:
      content:
        application/json:
          examples:
            serverError:
              summary: Internal Server Error
              value:
                code: 20901
                data: {}
                msg: An unexpected internal server error occurred.
          schema:
            $ref: '#/components/schemas/ApiError'
      description: >-
        Internal Server Error - The server encountered an unexpected condition
        that prevented it from fulfilling the request.
  securitySchemes:
    OrmiApiKey:
      description: >
        Enter your API key in the format: Bearer <api_key>.

        Providing an API key may grant higher rate limits or access to
        additional features.

        The API will function without an API key for basic access.
      scheme: bearer
      type: http

````