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

# Get transactions

> Returns historical transactions for the authenticated user. An optional time range may be supplied via `start_timestamp_ns` / `end_timestamp_ns`; when both bounds are given, `end_timestamp_ns` must be greater than `start_timestamp_ns`. Inverted ranges are rejected with a 400.



## OpenAPI

````yaml openapi/api-gateway.json GET /transactions
openapi: 3.1.0
info:
  title: ax-api-gateway
  description: ''
  license:
    name: ''
  version: 15.24.0
servers:
  - url: https://gateway.architect.exchange/api
security: []
tags:
  - name: api-gateway
    description: API gateway
paths:
  /transactions:
    get:
      tags:
        - api-gateway
      description: >-
        Returns historical transactions for the authenticated user. An optional
        time range may be supplied via `start_timestamp_ns` /
        `end_timestamp_ns`; when both bounds are given, `end_timestamp_ns` must
        be greater than `start_timestamp_ns`. Inverted ranges are rejected with
        a 400.
      operationId: get_transactions
      parameters:
        - name: account_id
          in: query
          description: >-
            Optional account ID. If omitted, default (primary) user account is
            used.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: transaction_types
          in: query
          required: true
          schema:
            type: array
            items:
              $ref: '#/components/schemas/TransactionType'
            description: >-
              Transaction types to include, as a single comma-separated value

              (`transaction_types=deposit,withdrawal`). Repeating the parameter
              is

              rejected; an empty value includes every type. Values not listed
              here

              match nothing rather than erroring.
          style: form
          explode: false
        - name: end_timestamp_ns
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
            minimum: 0
        - name: start_timestamp_ns
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int64
            minimum: 0
        - name: cursor
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: limit
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
            minimum: 0
        - name: sort_ts
          in: query
          required: false
          schema:
            oneOf:
              - type: 'null'
              - $ref: '#/components/schemas/SortDirection'
                description: Timestamp sort direction (defaults to `desc`).
      responses:
        '200':
          description: List of transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTransactionsResponse'
        '400':
          description: Time range inverted (end_timestamp_ns <= start_timestamp_ns)
      security:
        - session_token: []
components:
  schemas:
    TransactionType:
      type: string
      description: >-
        Kinds of ledger entry that can appear as a
        `Transaction::transaction_type`.
      enum:
        - deposit
        - withdrawal
        - funding
        - fee
        - pnl
        - lending_credit
        - lending_debit
    SortDirection:
      type: string
      description: >-
        Sort order/direction.


        - `asc`: ascending order per field type (e.g. lexicographic, numeric,
        etc.)

        - `desc`: descending order per field type
      enum:
        - asc
        - desc
    GetTransactionsResponse:
      allOf:
        - $ref: '#/components/schemas/CursorPage'
        - type: object
          required:
            - transactions
          properties:
            transactions:
              type: array
              items:
                $ref: '#/components/schemas/Transaction'
    CursorPage:
      type: object
      description: |-
        Page metadata for cursor-paged responses.

        This is intended for response bodies (not query params).
      properties:
        limit:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        next_cursor:
          type:
            - string
            - 'null'
        total_count:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
    Transaction:
      type: object
      required:
        - account_id
        - event_id
        - symbol
        - timestamp
        - amount
        - transaction_type
      properties:
        account_id:
          type: string
        amount:
          type: string
        event_id:
          type: string
        initiated_by_user_id:
          type:
            - string
            - 'null'
          description: >-
            Actor of record — the user who initiated the transaction. Present
            only

            for directly-initiated kinds (`deposit`, `withdrawal`); `None` for

            order-derived and system-generated transactions.
        reference_id:
          type:
            - string
            - 'null'
        symbol:
          type: string
        timestamp:
          type: string
          format: date-time
        transaction_type:
          type: string
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      description: User session token

````