> ## 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 open orders



## OpenAPI

````yaml openapi/order-gateway.json GET /open-orders
openapi: 3.1.0
info:
  title: ax-order-gateway
  description: ''
  license:
    name: ''
  version: 15.24.0
servers:
  - url: https://gateway.architect.exchange/orders
security: []
tags:
  - name: order-gateway
    description: Order gateway
paths:
  /open-orders:
    get:
      tags:
        - order-gateway
      operationId: open_orders
      parameters:
        - name: account_id
          in: query
          description: >-
            Optional account ID. If omitted, default (primary) user account is
            used.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Page size. Defaults to 100.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: offset
          in: query
          description: Number of rows to skip. Defaults to 0.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: sort_ts
          in: query
          description: Timestamp sort direction. Defaults to desc.
          required: false
          schema:
            $ref: 257485e9-5ff0-4347-8317-19fa4b6a7669
      responses:
        '200':
          description: List of open orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOpenOrdersRestResponse'
      security:
        - session_token: []
components:
  schemas:
    GetOpenOrdersRestResponse:
      allOf:
        - $ref: '#/components/schemas/LimitOffsetPage'
        - type: object
          required:
            - orders
          properties:
            orders:
              type: array
              items:
                $ref: '#/components/schemas/OrderDetails'
    LimitOffsetPage:
      type: object
      description: |-
        Page metadata for limit/offset paged responses.

        This is intended for response bodies (not query params).
      required:
        - total_count
        - limit
        - offset
      properties:
        limit:
          type: integer
          format: int32
          minimum: 0
        offset:
          type: integer
          format: int32
          minimum: 0
        total_count:
          type: integer
          format: int64
          minimum: 0
    OrderDetails:
      allOf:
        - $ref: '#/components/schemas/Timestamp'
        - type: object
          required:
            - oid
            - u
            - aid
            - s
            - p
            - q
            - xq
            - rq
            - o
            - d
            - tif
          properties:
            aid:
              type: string
              description: >-
                Owning account — whose positions, balance, and risk this order
                moves.
            cid:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/ClientOrderId'
            d:
              $ref: '#/components/schemas/Side'
            o:
              $ref: '#/components/schemas/OrderState'
            oid:
              $ref: '#/components/schemas/OrderId'
            p:
              type: string
            po:
              type: boolean
            q:
              type: integer
              format: int64
              minimum: 0
            r:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/OrderRejectReason'
            rq:
              type: integer
              format: int64
              minimum: 0
            s:
              type: string
            tag:
              type:
                - string
                - 'null'
            tif:
              type: string
            txt:
              type:
                - string
                - 'null'
            u:
              type: string
              description: >-
                Actor of record — the authenticated user who *placed* this
                order. This

                is distinct from the owning `account_id`: a user may place
                orders on an

                account they do not own (e.g. a proxy or algo acting for another
                party).
            xq:
              type: integer
              format: int64
              minimum: 0
    Timestamp:
      type: object
      required:
        - ts
        - tn
      properties:
        tn:
          type: integer
          format: int32
          minimum: 0
        ts:
          type: integer
          format: int32
    ClientOrderId:
      type: integer
      format: int64
      minimum: 0
    Side:
      type: string
      enum:
        - B
        - S
    OrderState:
      type: string
      enum:
        - PENDING
        - ACCEPTED
        - PARTIALLY_FILLED
        - FILLED
        - CANCELED
        - REJECTED
        - EXPIRED
        - REPLACED
        - DONE_FOR_DAY
        - UNKNOWN
    OrderId:
      type: string
      description: |-
        Strong type for Order IDs to prevent mixing with other string values

        Order IDs are ULIDs with a prefix:

        - Regular orders: O-<ULID>
        - Liquidation orders: L-<ULID>
    OrderRejectReason:
      type: string
      enum:
        - CLOSE_ONLY
        - INSUFFICIENT_MARGIN
        - MAX_OPEN_ORDERS_EXCEEDED
        - UNKNOWN_SYMBOL
        - EXCHANGE_CLOSED
        - INCORRECT_QUANTITY
        - INVALID_PRICE_INCREMENT
        - INCORRECT_ORDER_TYPE
        - PRICE_OUT_OF_BOUNDS
        - NO_LIQUIDITY
        - INSUFFICIENT_CREDIT_LIMIT
        - ORIGINAL_ORDER_TERMINATED
        - DUPLICATE_CLIENT_ORDER_ID
        - UNKNOWN
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      description: User session token

````