> ## 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.

# Notifications

> Real-time notifications for the user



## AsyncAPI

````yaml api-reference/asyncapi.json notifications
id: notifications
title: Notifications
description: Real-time notifications for the user
servers:
  - id: testnet
    protocol: wss
    host: api.testnet.aptoslabs.com/decibel/ws
    bindings: []
    variables: []
address: notifications:{userAddr}
parameters:
  - id: userAddr
    jsonSchema:
      type: string
      description: User wallet address (Aptos address format, e.g. 0x123...)
    description: User wallet address (Aptos address format, e.g. 0x123...)
    type: string
    required: true
    deprecated: false
bindings: []
operations:
  - &ref_14
    id: receivenotifications
    title: Receivenotifications
    description: Receive updates for real-time notifications for the user
    type: receive
    messages:
      - &ref_15
        id: NotificationsMessage
        payload:
          - name: NotificationsMessage
            description: Real-time notifications for the user
            type: object
            properties:
              - name: notification
                type: object
                required: true
                properties:
                  - name: account
                    type: string
                    required: false
                  - name: oneOf
                    type: oneOf
                    description: Must be one of these types
                    properties:
                      - name: type
                        type: string
                        description: 'null'
                        required: false
                      - name: amount
                        type: &ref_0
                          - integer
                          - 'null'
                        required: false
                      - name: filled_size
                        type: &ref_1
                          - number
                          - 'null'
                        required: false
                      - name: reason
                        type: &ref_2
                          - string
                          - 'null'
                        required: false
                      - name: trigger_price
                        type: &ref_3
                          - integer
                          - 'null'
                        required: false
                  - name: notification_type
                    type: string
                    enumValues:
                      - MarketOrderPlaced
                      - LimitOrderPlaced
                      - StopMarketOrderPlaced
                      - StopMarketOrderTriggered
                      - StopLimitOrderPlaced
                      - StopLimitOrderTriggered
                      - OrderPartiallyFilled
                      - OrderFilled
                      - OrderSizeReduced
                      - OrderCancelled
                      - OrderRejected
                      - OrderErrored
                      - TwapOrderPlaced
                      - TwapOrderTriggered
                      - TwapOrderCompleted
                      - TwapOrderCancelled
                      - TwapOrderErrored
                      - AccountDeposit
                      - AccountWithdrawal
                      - TpSlSet
                      - TpHit
                      - SlHit
                      - TpCancelled
                      - SlCancelled
                    required: false
                  - name: oneOf
                    type: oneOf
                    description: Must be one of these types
                    properties:
                      - name: type
                        type: string
                        description: 'null'
                        required: false
                      - name: client_order_id
                        type: string
                        required: true
                      - name: details
                        type: string
                        required: true
                      - name: is_buy
                        type: boolean
                        required: true
                      - name: is_reduce_only
                        type: boolean
                        required: true
                      - name: market
                        type: string
                        required: true
                      - name: order_direction
                        type: string
                        required: true
                      - name: order_id
                        type: string
                        required: true
                      - name: order_type
                        type: string
                        required: true
                      - name: orig_size
                        type: &ref_4
                          - number
                          - 'null'
                        required: false
                      - name: parent
                        type: string
                        required: true
                      - name: price
                        type: &ref_5
                          - number
                          - 'null'
                        required: false
                      - name: remaining_size
                        type: &ref_6
                          - number
                          - 'null'
                        required: false
                      - name: size_delta
                        type: &ref_7
                          - number
                          - 'null'
                        required: false
                      - name: sl_limit_price
                        type: &ref_8
                          - integer
                          - 'null'
                        required: false
                      - name: sl_order_id
                        type: &ref_9
                          - string
                          - 'null'
                        required: false
                      - name: sl_trigger_price
                        type: &ref_10
                          - integer
                          - 'null'
                        required: false
                      - name: status
                        type: string
                        required: true
                      - name: tp_limit_price
                        type: &ref_11
                          - integer
                          - 'null'
                        required: false
                      - name: tp_order_id
                        type: &ref_12
                          - string
                          - 'null'
                        required: false
                      - name: tp_trigger_price
                        type: &ref_13
                          - integer
                          - 'null'
                        required: false
                      - name: transaction_version
                        type: integer
                        required: true
                      - name: trigger_condition
                        type: string
                        required: true
                      - name: unix_ms
                        type: integer
                        required: true
                  - name: oneOf
                    type: oneOf
                    description: Must be one of these types
                    properties:
                      - name: type
                        type: string
                        description: 'null'
                        required: false
                      - name: duration_s
                        type: integer
                        required: true
                      - name: frequency_s
                        type: integer
                        required: true
                      - name: is_buy
                        type: boolean
                        required: true
                      - name: is_reduce_only
                        type: boolean
                        required: true
                      - name: market
                        type: string
                        required: true
                      - name: order_id
                        type: string
                        required: true
                      - name: orig_size
                        type: number
                        required: true
                      - name: remaining_size
                        type: number
                        required: true
                      - name: start_unix_ms
                        type: integer
                        required: true
                      - name: status
                        type: string
                        required: true
                      - name: transaction_unix_ms
                        type: integer
                        required: true
                      - name: transaction_version
                        type: integer
                        required: true
              - name: topic
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - topic
            - notification
          properties:
            notification:
              type: object
              required:
                - account
                - notification_type
              properties:
                account:
                  type: string
                  x-parser-schema-id: <anonymous-schema-29>
                notification_metadata:
                  oneOf:
                    - type: 'null'
                      x-parser-schema-id: <anonymous-schema-31>
                    - type: object
                      properties:
                        amount:
                          type: *ref_0
                          format: int64
                          x-parser-schema-id: <anonymous-schema-32>
                        filled_size:
                          type: *ref_1
                          format: double
                          x-parser-schema-id: <anonymous-schema-33>
                        reason:
                          type: *ref_2
                          x-parser-schema-id: <anonymous-schema-34>
                        trigger_price:
                          type: *ref_3
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-35>
                      x-parser-schema-id: NotificationMetadata
                  x-parser-schema-id: <anonymous-schema-30>
                notification_type:
                  type: string
                  enum:
                    - MarketOrderPlaced
                    - LimitOrderPlaced
                    - StopMarketOrderPlaced
                    - StopMarketOrderTriggered
                    - StopLimitOrderPlaced
                    - StopLimitOrderTriggered
                    - OrderPartiallyFilled
                    - OrderFilled
                    - OrderSizeReduced
                    - OrderCancelled
                    - OrderRejected
                    - OrderErrored
                    - TwapOrderPlaced
                    - TwapOrderTriggered
                    - TwapOrderCompleted
                    - TwapOrderCancelled
                    - TwapOrderErrored
                    - AccountDeposit
                    - AccountWithdrawal
                    - TpSlSet
                    - TpHit
                    - SlHit
                    - TpCancelled
                    - SlCancelled
                  x-parser-schema-id: NotificationType
                order:
                  oneOf:
                    - type: 'null'
                      x-parser-schema-id: <anonymous-schema-37>
                    - type: object
                      required:
                        - parent
                        - market
                        - client_order_id
                        - order_id
                        - status
                        - order_type
                        - trigger_condition
                        - order_direction
                        - is_buy
                        - is_reduce_only
                        - details
                        - transaction_version
                        - unix_ms
                      properties:
                        client_order_id:
                          type: string
                          x-parser-schema-id: <anonymous-schema-3>
                        details:
                          type: string
                          x-parser-schema-id: <anonymous-schema-4>
                        is_buy:
                          type: boolean
                          x-parser-schema-id: <anonymous-schema-5>
                        is_reduce_only:
                          type: boolean
                          x-parser-schema-id: <anonymous-schema-6>
                        market:
                          type: string
                          x-parser-schema-id: <anonymous-schema-7>
                        order_direction:
                          type: string
                          x-parser-schema-id: <anonymous-schema-8>
                        order_id:
                          type: string
                          x-parser-schema-id: <anonymous-schema-9>
                        order_type:
                          type: string
                          x-parser-schema-id: <anonymous-schema-10>
                        orig_size:
                          type: *ref_4
                          format: double
                          x-parser-schema-id: <anonymous-schema-11>
                        parent:
                          type: string
                          x-parser-schema-id: <anonymous-schema-12>
                        price:
                          type: *ref_5
                          format: double
                          x-parser-schema-id: <anonymous-schema-13>
                        remaining_size:
                          type: *ref_6
                          format: double
                          x-parser-schema-id: <anonymous-schema-14>
                        size_delta:
                          type: *ref_7
                          format: double
                          x-parser-schema-id: <anonymous-schema-15>
                        sl_limit_price:
                          type: *ref_8
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-16>
                        sl_order_id:
                          type: *ref_9
                          x-parser-schema-id: <anonymous-schema-17>
                        sl_trigger_price:
                          type: *ref_10
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-18>
                        status:
                          type: string
                          x-parser-schema-id: <anonymous-schema-19>
                        tp_limit_price:
                          type: *ref_11
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-20>
                        tp_order_id:
                          type: *ref_12
                          x-parser-schema-id: <anonymous-schema-21>
                        tp_trigger_price:
                          type: *ref_13
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-22>
                        transaction_version:
                          type: integer
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-23>
                        trigger_condition:
                          type: string
                          x-parser-schema-id: <anonymous-schema-24>
                        unix_ms:
                          type: integer
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-25>
                      x-parser-schema-id: OrderDto
                  x-parser-schema-id: <anonymous-schema-36>
                twap:
                  oneOf:
                    - type: 'null'
                      x-parser-schema-id: <anonymous-schema-39>
                    - type: object
                      required:
                        - market
                        - is_buy
                        - order_id
                        - is_reduce_only
                        - start_unix_ms
                        - frequency_s
                        - duration_s
                        - orig_size
                        - remaining_size
                        - status
                        - transaction_unix_ms
                        - transaction_version
                      properties:
                        duration_s:
                          type: integer
                          format: int64
                          example: 300
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-40>
                        frequency_s:
                          type: integer
                          format: int64
                          example: 30
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-41>
                        is_buy:
                          type: boolean
                          example: true
                          x-parser-schema-id: <anonymous-schema-42>
                        is_reduce_only:
                          type: boolean
                          x-parser-schema-id: <anonymous-schema-43>
                        market:
                          type: string
                          example: 0xmarket123...
                          x-parser-schema-id: <anonymous-schema-44>
                        order_id:
                          type: string
                          x-parser-schema-id: <anonymous-schema-45>
                        orig_size:
                          type: number
                          format: double
                          x-parser-schema-id: <anonymous-schema-46>
                        remaining_size:
                          type: number
                          format: double
                          x-parser-schema-id: <anonymous-schema-47>
                        start_unix_ms:
                          type: integer
                          format: int64
                          example: 1730841600000
                          x-parser-schema-id: <anonymous-schema-48>
                        status:
                          type: string
                          x-parser-schema-id: <anonymous-schema-49>
                        transaction_unix_ms:
                          type: integer
                          format: int64
                          x-parser-schema-id: <anonymous-schema-50>
                        transaction_version:
                          type: integer
                          format: int64
                          minimum: 0
                          x-parser-schema-id: <anonymous-schema-51>
                      x-parser-schema-id: TwapDto
                  x-parser-schema-id: <anonymous-schema-38>
              x-parser-schema-id: NotificationDto
            topic:
              type: string
              x-parser-schema-id: <anonymous-schema-52>
          x-parser-schema-id: UserNotificationResponse
        title: Notifications message
        description: Real-time notifications for the user
        example: |-
          {
            "topic": "notifications:0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
            "notification": {
              "account": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
              "notification_type": "OrderFilled",
              "order": {
                "parent": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
                "market": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
                "client_order_id": "order_123",
                "order_id": "45678",
                "status": "Filled",
                "order_type": "Limit",
                "trigger_condition": "None",
                "order_direction": "Open Long",
                "orig_size": 1.5,
                "remaining_size": 0,
                "size_delta": null,
                "price": 50000.5,
                "is_buy": true,
                "is_reduce_only": false,
                "details": "",
                "tp_order_id": null,
                "tp_trigger_price": null,
                "tp_limit_price": null,
                "sl_order_id": null,
                "sl_trigger_price": null,
                "sl_limit_price": null,
                "transaction_version": 12345678,
                "unix_ms": 1699564800000
              }
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: NotificationsMessage
          - id: x-parser-message-name
            value: NotificationsMessage
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: notifications
sendOperations:
  - *ref_14
receiveOperations: []
sendMessages:
  - *ref_15
receiveMessages: []
extensions:
  - id: x-parser-unique-object-id
    value: notifications
securitySchemes: []

````