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

# Get All Transactions

> Get all transactions of all users on the platform



## OpenAPI

````yaml GET /marketplace/transactions
openapi: 3.0.1
info:
  title: Marketplace API
  description: API specification for user authentication and transaction management
  version: 1.0.0
servers:
  - url: https://api.sandbox.external.bnznow.com
    description: Sandbox server for marketplace APIs
  - url: https://api.external.bnznow.com
    description: Production server for marketplace APIs
security: []
paths:
  /marketplace/transactions:
    get:
      description: >-
        Returns all transactions for all users on the platform registered with
        your API key
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: API key for authentication
        - name: user_id
          in: query
          description: ID of user to get transactions for
          schema:
            type: string
        - name: limit
          in: query
          description: The maximum number of results to return
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 100
            default: 20
        - name: page
          in: query
          description: The page number to return
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 1000
            default: 1
        - name: sort
          in: query
          description: The sort order of the results
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: type
          in: query
          description: The type of transactions to return
          schema:
            type: string
            enum:
              - buy
              - offset
      responses:
        '200':
          description: Transaction response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Transaction:
      type: object
      properties:
        metadata:
          type: object
          properties:
            current_page:
              type: integer
              description: Current page number
            total_records:
              type: integer
              description: Total number of records
            limit:
              type: integer
              description: Number of records per page
        overview:
          type: object
          properties:
            total_transactions:
              type: integer
              description: Total number of transactions
            total_offsetted:
              type: integer
              description: Total number of offset transactions
            total_users:
              type: integer
              description: Total number of users
        transactions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: Transaction ID
              amount:
                type: number
                description: Transaction amount in INR
              type:
                type: string
                enum:
                  - buy
                  - offset
                description: Transaction type
              carbon_credits:
                type: number
                description: Carbon credits bought or offsetted in tonCO2e
              timestamp:
                type: string
                description: Timestamp of the transaction
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string

````