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

# Account open orders

> Account's currently open perp and spot orders. Each order row carries `asset_type` (`perp` or `spot`) so clients can demux mixed snapshots. Spot order rows use `time_in_force`, report `order_direction` as `Buy` or `Sell` (spot has no position to open or close, so perp's `Open Long` / `Close Short` vocabulary does not apply), and leave perp-only fields such as `client_order_id`, reduce-only, and TP/SL empty, false, or null.



## AsyncAPI

````yaml api-reference/asyncapi.json accountOpenOrders
id: accountOpenOrders
title: Account open orders
description: >-
  Account's currently open perp and spot orders. Each order row carries
  `asset_type` (`perp` or `spot`) so clients can demux mixed snapshots. Spot
  order rows use `time_in_force`, report `order_direction` as `Buy` or `Sell`
  (spot has no position to open or close, so perp's `Open Long` / `Close Short`
  vocabulary does not apply), and leave perp-only fields such as
  `client_order_id`, reduce-only, and TP/SL empty, false, or null.
servers:
  - id: testnet
    protocol: wss
    host: api.testnet.aptoslabs.com/decibel/ws
    bindings: []
    variables: []
address: account_open_orders:{accountAddr}
parameters:
  - id: accountAddr
    jsonSchema:
      type: string
      description: Account address (Aptos address format, e.g. 0x123...)
    description: Account address (Aptos address format, e.g. 0x123...)
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_8
    id: receiveaccountOpenOrders
    title: Receiveaccount open orders
    description: >-
      Receive updates for account's currently open perp and spot orders. each
      order row carries `asset_type` (`perp` or `spot`) so clients can demux
      mixed snapshots. spot order rows use `time_in_force`, report
      `order_direction` as `buy` or `sell` (spot has no position to open or
      close, so perp's `open long` / `close short` vocabulary does not apply),
      and leave perp-only fields such as `client_order_id`, reduce-only, and
      tp/sl empty, false, or null.
    type: receive
    messages:
      - &ref_9
        id: AccountOpenOrdersMessage
        payload:
          - name: AccountOpenOrdersMessage
            description: >-
              Account's currently open perp and spot orders. Each order row
              carries `asset_type` (`perp` or `spot`) so clients can demux mixed
              snapshots. Spot order rows use `time_in_force`, report
              `order_direction` as `Buy` or `Sell` (spot has no position to open
              or close, so perp's `Open Long` / `Close Short` vocabulary does
              not apply), and leave perp-only fields such as `client_order_id`,
              reduce-only, and TP/SL empty, false, or null.
            type: object
            properties:
              - name: orders
                type: array
                required: true
                properties:
                  - name: asset_type
                    type: string
                    description: >-
                      Discriminator carried on DTOs that can mix perp and spot
                      rows (markets,

                      orders, trades, bulk orders, bulk order fills, and
                      WebSocket payloads).

                      Also accepted as a query parameter on REST endpoints that
                      can filter to one

                      product.


                      Wire format is lowercase (`"perp"` / `"spot"`) and
                      accepted

                      case-insensitively on the request side via
                      [`impl_case_insensitive_deserialize`].
                    enumValues:
                      - perp
                      - spot
                    required: true
                  - name: cancellation_reason
                    type: string
                    required: true
                  - name: client_order_id
                    type: string
                    description: >-
                      Client-supplied order ID. Empty when the order was placed
                      without one

                      (both perp and spot carry this on the shared
                      `OrderEvent`).
                    required: true
                  - name: details
                    type: string
                    required: true
                  - name: is_buy
                    type: boolean
                    required: true
                  - name: is_reduce_only
                    type: boolean
                    description: Perp reduce-only flag. Always false for spot orders.
                    required: true
                  - name: is_tpsl
                    type: boolean
                    description: Perp TP/SL marker. Always false for spot orders.
                    required: true
                  - name: market
                    type: string
                    required: true
                  - name: order_direction
                    type: string
                    description: >-
                      Direction, in the vocabulary of this row's product. Perp
                      is

                      position-centric (`"Open Long"` / `"Close Long"` / `"Open
                      Short"` /

                      `"Close Short"`). Spot has no position to open or close,
                      so it is

                      simply `"Buy"` / `"Sell"`, the same values
                      `TradeDto::action` uses for

                      spot fills. Demux on `asset_type`.
                    required: true
                  - name: order_id
                    type: string
                    required: true
                  - name: order_type
                    type: string
                    description: >-
                      Perp order type. Empty for spot orders; use
                      `time_in_force` for spot.
                    required: true
                  - name: orig_size
                    type: &ref_0
                      - number
                      - 'null'
                    required: false
                  - name: parent
                    type: string
                    description: >-
                      Perp parent order ID. Empty for spot orders, which are
                      always top-level.
                    required: true
                  - name: price
                    type: &ref_1
                      - number
                      - 'null'
                    required: false
                  - name: remaining_size
                    type: &ref_2
                      - number
                      - 'null'
                    required: false
                  - name: size_delta
                    type: &ref_3
                      - number
                      - 'null'
                    required: false
                  - name: sl_limit_price
                    type: &ref_4
                      - number
                      - 'null'
                    description: Perp TP/SL field. Null for spot orders.
                    required: false
                  - name: sl_trigger_price
                    type: &ref_5
                      - number
                      - 'null'
                    description: Perp TP/SL field. Null for spot orders.
                    required: false
                  - name: status
                    type: string
                    required: true
                  - name: time_in_force
                    type: string
                    description: >-
                      Time-in-force tag for spot orders (`"GTC"` / `"POST_ONLY"`
                      / `"IOC"`).

                      Empty string for perp orders, which carry this signal in
                      `order_type`

                      instead. Surfaced separately because the spot engine
                      reports it as a

                      first-class field on every `OrderEvent`.
                    required: false
                  - name: tp_limit_price
                    type: &ref_6
                      - number
                      - 'null'
                    description: Perp TP/SL field. Null for spot orders.
                    required: false
                  - name: tp_trigger_price
                    type: &ref_7
                      - number
                      - 'null'
                    description: Perp TP/SL field. Null for spot orders.
                    required: false
                  - name: transaction_version
                    type: integer
                    required: true
                  - name: trigger_condition
                    type: string
                    description: Perp trigger condition. Empty for spot orders.
                    required: true
                  - name: unix_ms
                    type: integer
                    required: true
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - topic
            - orders
          properties:
            orders:
              type: array
              items:
                type: object
                required:
                  - asset_type
                  - parent
                  - market
                  - client_order_id
                  - order_id
                  - status
                  - order_type
                  - trigger_condition
                  - order_direction
                  - is_buy
                  - is_reduce_only
                  - details
                  - is_tpsl
                  - cancellation_reason
                  - transaction_version
                  - unix_ms
                properties:
                  asset_type:
                    type: string
                    description: >-
                      Discriminator carried on DTOs that can mix perp and spot
                      rows (markets,

                      orders, trades, bulk orders, bulk order fills, and
                      WebSocket payloads).

                      Also accepted as a query parameter on REST endpoints that
                      can filter to one

                      product.


                      Wire format is lowercase (`"perp"` / `"spot"`) and
                      accepted

                      case-insensitively on the request side via
                      [`impl_case_insensitive_deserialize`].
                    enum:
                      - perp
                      - spot
                    x-parser-schema-id: AssetType
                  cancellation_reason:
                    type: string
                    x-parser-schema-id: <anonymous-schema-3>
                  client_order_id:
                    type: string
                    description: >-
                      Client-supplied order ID. Empty when the order was placed
                      without one

                      (both perp and spot carry this on the shared
                      `OrderEvent`).
                    x-parser-schema-id: <anonymous-schema-4>
                  details:
                    type: string
                    x-parser-schema-id: <anonymous-schema-5>
                  is_buy:
                    type: boolean
                    x-parser-schema-id: <anonymous-schema-6>
                  is_reduce_only:
                    type: boolean
                    description: Perp reduce-only flag. Always false for spot orders.
                    x-parser-schema-id: <anonymous-schema-7>
                  is_tpsl:
                    type: boolean
                    description: Perp TP/SL marker. Always false for spot orders.
                    x-parser-schema-id: <anonymous-schema-8>
                  market:
                    type: string
                    x-parser-schema-id: <anonymous-schema-9>
                  order_direction:
                    type: string
                    description: >-
                      Direction, in the vocabulary of this row's product. Perp
                      is

                      position-centric (`"Open Long"` / `"Close Long"` / `"Open
                      Short"` /

                      `"Close Short"`). Spot has no position to open or close,
                      so it is

                      simply `"Buy"` / `"Sell"`, the same values
                      `TradeDto::action` uses for

                      spot fills. Demux on `asset_type`.
                    x-parser-schema-id: <anonymous-schema-10>
                  order_id:
                    type: string
                    x-parser-schema-id: <anonymous-schema-11>
                  order_type:
                    type: string
                    description: >-
                      Perp order type. Empty for spot orders; use
                      `time_in_force` for spot.
                    x-parser-schema-id: <anonymous-schema-12>
                  orig_size:
                    type: *ref_0
                    format: double
                    x-parser-schema-id: <anonymous-schema-13>
                  parent:
                    type: string
                    description: >-
                      Perp parent order ID. Empty for spot orders, which are
                      always top-level.
                    x-parser-schema-id: <anonymous-schema-14>
                  price:
                    type: *ref_1
                    format: double
                    x-parser-schema-id: <anonymous-schema-15>
                  remaining_size:
                    type: *ref_2
                    format: double
                    x-parser-schema-id: <anonymous-schema-16>
                  size_delta:
                    type: *ref_3
                    format: double
                    x-parser-schema-id: <anonymous-schema-17>
                  sl_limit_price:
                    type: *ref_4
                    format: double
                    description: Perp TP/SL field. Null for spot orders.
                    x-parser-schema-id: <anonymous-schema-18>
                  sl_trigger_price:
                    type: *ref_5
                    format: double
                    description: Perp TP/SL field. Null for spot orders.
                    x-parser-schema-id: <anonymous-schema-19>
                  status:
                    type: string
                    x-parser-schema-id: <anonymous-schema-20>
                  time_in_force:
                    type: string
                    description: >-
                      Time-in-force tag for spot orders (`"GTC"` / `"POST_ONLY"`
                      / `"IOC"`).

                      Empty string for perp orders, which carry this signal in
                      `order_type`

                      instead. Surfaced separately because the spot engine
                      reports it as a

                      first-class field on every `OrderEvent`.
                    x-parser-schema-id: <anonymous-schema-21>
                  tp_limit_price:
                    type: *ref_6
                    format: double
                    description: Perp TP/SL field. Null for spot orders.
                    x-parser-schema-id: <anonymous-schema-22>
                  tp_trigger_price:
                    type: *ref_7
                    format: double
                    description: Perp TP/SL field. Null for spot orders.
                    x-parser-schema-id: <anonymous-schema-23>
                  transaction_version:
                    type: integer
                    format: int64
                    minimum: 0
                    x-parser-schema-id: <anonymous-schema-24>
                  trigger_condition:
                    type: string
                    description: Perp trigger condition. Empty for spot orders.
                    x-parser-schema-id: <anonymous-schema-25>
                  unix_ms:
                    type: integer
                    format: int64
                    minimum: 0
                    x-parser-schema-id: <anonymous-schema-26>
                x-parser-schema-id: OrderDto
              x-parser-schema-id: <anonymous-schema-2>
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-27>
          x-parser-schema-id: AccountOpenOrdersResponse
        title: Account open orders message
        description: >-
          Account's currently open perp and spot orders. Each order row carries
          `asset_type` (`perp` or `spot`) so clients can demux mixed snapshots.
          Spot order rows use `time_in_force`, report `order_direction` as `Buy`
          or `Sell` (spot has no position to open or close, so perp's `Open
          Long` / `Close Short` vocabulary does not apply), and leave perp-only
          fields such as `client_order_id`, reduce-only, and TP/SL empty, false,
          or null.
        example: |-
          {
            "topic": "account_open_orders:0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
            "orders": [
              {
                "asset_type": "perp",
                "parent": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
                "market": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
                "client_order_id": "order_123",
                "order_id": "45678",
                "status": "Open",
                "order_type": "Limit",
                "trigger_condition": "None",
                "order_direction": "Open Long",
                "orig_size": 1.5,
                "remaining_size": 1.5,
                "size_delta": null,
                "price": 50000.5,
                "is_buy": true,
                "is_reduce_only": false,
                "details": "",
                "is_tpsl": false,
                "tp_trigger_price": null,
                "tp_limit_price": null,
                "sl_trigger_price": null,
                "sl_limit_price": null,
                "cancellation_reason": "",
                "transaction_version": 12345678,
                "unix_ms": 1699564800000,
                "time_in_force": ""
              },
              {
                "asset_type": "spot",
                "parent": "",
                "market": "0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba",
                "client_order_id": "",
                "order_id": "45679",
                "status": "Open",
                "order_type": "",
                "trigger_condition": "",
                "order_direction": "Buy",
                "orig_size": 10,
                "remaining_size": 10,
                "size_delta": null,
                "price": 8.25,
                "is_buy": true,
                "is_reduce_only": false,
                "details": "",
                "is_tpsl": false,
                "tp_trigger_price": null,
                "tp_limit_price": null,
                "sl_trigger_price": null,
                "sl_limit_price": null,
                "cancellation_reason": "",
                "transaction_version": 12345679,
                "unix_ms": 1699564800000,
                "time_in_force": "GTC"
              }
            ]
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: AccountOpenOrdersMessage
          - id: x-parser-message-name
            value: AccountOpenOrdersMessage
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: accountOpenOrders
sendOperations:
  - *ref_8
receiveOperations: []
sendMessages:
  - *ref_9
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: accountOpenOrders
securitySchemes: []

````