> ## 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 funding transactions

> Returns historical funding transactions for the authenticated user, newest first by default, paged via the response cursor. The time range is optional and unbounded; an inverted range (`end_timestamp_ns` <= `start_timestamp_ns`) is rejected with a 400. A query too expensive to serve is also rejected with a 400 asking the caller to narrow the range. Pages may be returned partial.



## OpenAPI

````yaml openapi/api-gateway.json GET /funding-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:
  /funding-transactions:
    get:
      tags:
        - api-gateway
      description: >-
        Returns historical funding transactions for the authenticated user,
        newest first by default, paged via the response cursor. The time range
        is optional and unbounded; an inverted range (`end_timestamp_ns` <=
        `start_timestamp_ns`) is rejected with a 400. A query too expensive to
        serve is also rejected with a 400 asking the caller to narrow the range.
        Pages may be returned partial.
      operationId: get_funding_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: symbol
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
        - 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 funding transactions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFundingTransactionsResponse'
        '400':
          description: Invalid or too-expensive funding-transactions query
      security:
        - session_token: []
components:
  schemas:
    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
    GetFundingTransactionsResponse:
      allOf:
        - $ref: '#/components/schemas/CursorPage'
        - type: object
          required:
            - funding_transactions
          properties:
            funding_transactions:
              type: array
              items:
                $ref: '#/components/schemas/FundingTransaction'
    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
    FundingTransaction:
      type: object
      description: |-
        A cash leg booked against a position-bearing account by a settlement
        event. Covers perpetual funding-rate payments, daily mark-to-market on
        any position-bearing contract, and the one-time final settlement at a
        dated contract's expiration — discriminated by `transaction_type`.

        `funding_rate`, `funding_amount`, and `benchmark_price` are populated
        only for `Funding` and absent for the other kinds. `settlement_price`
        and `amount` apply to every kind.
      required:
        - account_id
        - currency
        - timestamp
        - transaction_type
        - amount
        - event_id
        - sequence_number
        - symbol
        - settlement_price
      properties:
        account_id:
          type: string
        amount:
          type: string
        benchmark_price:
          type:
            - string
            - 'null'
        currency:
          type: string
        event_id:
          type: string
        funding_amount:
          type:
            - string
            - 'null'
          description: |-
            Per-contract funding cash for this event — same for every user on
            the same `(symbol, timestamp)`. Multiply by signed position to
            reconstruct the per-user `amount`. (`amount` is the actual cash
            booked to *this* account; `funding_amount` is the per-contract
            quantity that drove the calculation.)
        funding_rate:
          type:
            - string
            - 'null'
        reference_id:
          type:
            - string
            - 'null'
        sequence_number:
          type: integer
          format: int32
        settlement_price:
          type: string
        symbol:
          type: string
        timestamp:
          type: string
          format: date-time
        transaction_type:
          $ref: '#/components/schemas/SettlementKind'
    SettlementKind:
      type: string
      description: |-
        Discriminator for `FundingTransaction`. All variants are a cash leg
        booked at a settlement price against a position; only the trigger
        differs.
      enum:
        - funding
        - mark_to_market
        - final_settlement
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      description: User session token

````