> ## 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: 17.9.1
servers:
  - url: https://gateway.architect.exchange/orders
    description: Production
  - url: https://gateway.sandbox.architect.exchange/orders
    description: Sandbox
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: 9444ea81-94a3-4bf9-8546-195358fe22df
      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.
            bid:
              oneOf:
                - $ref: '#/components/schemas/BrokerId'
                - type: 'null'
            cid:
              oneOf:
                - $ref: '#/components/schemas/ClientOrderId'
                - type: 'null'
            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:
                - $ref: '#/components/schemas/OrderRejectReason'
                - type: 'null'
            rb:
              oneOf:
                - $ref: '#/components/schemas/RepriceBehavior'
                  description: >-
                    The reprice behavior the client sent with this order's most
                    recent entry

                    into the book. That entry is the place request or, after a
                    replace, the

                    latest replace request.


                    The gateway reports the value as sent, whether or not it
                    applied. It

                    applied only if `po` was `true` on that same request.


                    Unlike `po`, this field does not carry over from one request
                    to the next.

                    A replace that omits `rb` reports the default, `rej`.


                    This field is absent for orders placed before the gateway
                    recorded it.
                - type: 'null'
            rq:
              type: integer
              format: int64
              minimum: 0
            s:
              type: string
            tag:
              type:
                - string
                - 'null'
            tif:
              $ref: '#/components/schemas/TimeInForce'
            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
    BrokerId:
      type: string
      description: |-
        ID of the partner software or broker that sent an order, e.g. `HBOT`:
        3 to 10 ASCII letters or digits, stored in uppercase.
    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
    RepriceBehavior:
      type: string
      description: >-
        Reprice behavior for an aggressive post-only order — the wire `rb`
        field,

        meaningful only alongside `po = true`. Defaults to `Reject`.
      enum:
        - rej
        - bo
        - tbl
    TimeInForce:
      type: string
      description: >-
        Order time-in-force: how long an order stays active before it is
        cancelled.
      enum:
        - GTC
        - IOC
        - DAY
  securitySchemes:
    session_token:
      type: http
      scheme: bearer
      description: User session token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.