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

# Subaccount trades tx status

> Channel name: `{subaccount_id}.trades.{tx_status}`. Private channel (requires authentication) that streams your subaccount's trades filtered by on-chain settlement outcome, where {subaccount_id} is the numeric subaccount identifier and {tx_status} is the settlement state (settled, reverted, or timed_out).



## AsyncAPI

````yaml subscriptions.asyncapi.json subaccountTradesTxStatus
id: subaccountTradesTxStatus
title: Subaccount trades tx status
description: >-
  Channel name: `{subaccount_id}.trades.{tx_status}`. Private channel (requires
  authentication) that streams your subaccount's trades filtered by on-chain
  settlement outcome, where {subaccount_id} is the numeric subaccount identifier
  and {tx_status} is the settlement state (settled, reverted, or timed_out).
servers:
  - id: production
    protocol: wss
    host: api.derive.xyz
    bindings: []
    variables: []
  - id: testnet
    protocol: wss
    host: testnet.api.derive.xyz
    bindings: []
    variables: []
address: /v3/ws
parameters: []
bindings: []
operations:
  - &ref_9
    id: receive_subaccountTradesTxStatus
    title: Receive_subaccount trades tx status
    type: send
    messages:
      - &ref_12
        id: subaccountTradesTxStatusNotification
        payload:
          - name: subaccountTradesTxStatusNotification
            description: Pushed as a JSON array; each element has the fields below.
            type: object
            properties:
              - name: direction
                type: string
                enumValues:
                  - buy
                  - sell
                required: true
              - name: expected_rebate
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: extra_fee
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: index_price
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: instrument_name
                type: string
                required: true
              - name: is_transfer
                type: boolean
                required: true
              - name: label
                type: string
                required: false
              - name: liquidity_role
                type: string
                enumValues:
                  - maker
                  - taker
                required: true
              - name: mark_price
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: op_uuid
                type: string
                required: true
              - name: order_id
                type: string
                required: true
              - name: quote_id
                type: &ref_0
                  - string
                  - 'null'
                description: Optional UUID v4 string
                required: true
              - name: realized_pnl
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: realized_pnl_excl_fees
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: rfq_id
                type: &ref_1
                  - string
                  - 'null'
                description: Optional UUID v4 string
                required: true
              - name: subaccount_id
                type: integer
                required: true
              - name: timestamp
                type: integer
                required: true
              - name: trade_amount
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: trade_fee
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: trade_id
                type: string
                required: true
              - name: trade_price
                type: string
                description: >-
                  Decimal string of the human value (e.g. `"1.5"`), up to 12
                  fractional digits; a string or JSON number is accepted
                required: true
              - name: tx_hash
                type: &ref_2
                  - string
                  - 'null'
                required: false
              - name: tx_status
                type: string
                required: true
        headers: []
        jsonPayloadSchema:
          description: >-
            Info that the user expects to get delivered when requesting trade
            info.
          type: object
          required:
            - direction
            - expected_rebate
            - extra_fee
            - index_price
            - instrument_name
            - is_transfer
            - liquidity_role
            - mark_price
            - op_uuid
            - order_id
            - quote_id
            - realized_pnl
            - realized_pnl_excl_fees
            - rfq_id
            - subaccount_id
            - timestamp
            - trade_amount
            - trade_fee
            - trade_id
            - trade_price
            - tx_status
          properties:
            direction:
              type: string
              enum:
                - buy
                - sell
              x-parser-schema-id: Direction
            expected_rebate:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-150>
            extra_fee:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-151>
            index_price:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-152>
            instrument_name:
              type: string
              x-parser-schema-id: <anonymous-schema-153>
            is_transfer:
              type: boolean
              x-parser-schema-id: <anonymous-schema-154>
            label:
              default: ''
              type: string
              x-parser-schema-id: <anonymous-schema-155>
            liquidity_role:
              type: string
              enum:
                - maker
                - taker
              x-parser-schema-id: LiquidityRole
            mark_price:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-156>
            op_uuid:
              type: string
              x-parser-schema-id: <anonymous-schema-157>
            order_id:
              type: string
              x-parser-schema-id: <anonymous-schema-158>
            quote_id:
              description: Optional UUID v4 string
              type: *ref_0
              format: uuid
              x-parser-schema-id: <anonymous-schema-159>
            realized_pnl:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-160>
            realized_pnl_excl_fees:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-161>
            rfq_id:
              description: Optional UUID v4 string
              type: *ref_1
              format: uuid
              x-parser-schema-id: <anonymous-schema-162>
            subaccount_id:
              type: integer
              format: int64
              x-parser-schema-id: <anonymous-schema-163>
            timestamp:
              type: integer
              format: int64
              x-parser-schema-id: <anonymous-schema-164>
            trade_amount:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-165>
            trade_fee:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-166>
            trade_id:
              type: string
              x-parser-schema-id: <anonymous-schema-167>
            trade_price:
              description: >-
                Decimal string of the human value (e.g. `"1.5"`), up to 12
                fractional digits; a string or JSON number is accepted
              type: string
              format: decimal
              x-parser-schema-id: <anonymous-schema-168>
            tx_hash:
              type: *ref_2
              x-parser-schema-id: <anonymous-schema-169>
            tx_status:
              oneOf:
                - type: string
                  enum:
                    - requested
                    - pending
                    - settled
                    - reverted
                    - ignored
                    - timed_out
                  x-parser-schema-id: <anonymous-schema-144>
                - description: >-
                    Applied off-chain; not yet included in an on-chain
                    settlement batch.
                  type: string
                  enum:
                    - applied
                  x-parser-schema-id: <anonymous-schema-145>
                - description: Included in a settlement batch and executing.
                  type: string
                  enum:
                    - in_batch
                  x-parser-schema-id: <anonymous-schema-146>
                - description: Settlement proof in progress.
                  type: string
                  enum:
                    - proving
                  x-parser-schema-id: <anonymous-schema-147>
                - description: >-
                    Settlement transaction broadcast on-chain; awaiting
                    confirmation.
                  type: string
                  enum:
                    - submitted
                  x-parser-schema-id: <anonymous-schema-148>
              x-parser-schema-id: TxStatus
          x-parser-schema-id: Trade
        title: Subaccount trades tx status notification
        description: Pushed as a JSON array; each element has the fields below.
        example: |-
          {
            "direction": "<string>",
            "expected_rebate": "<string>",
            "extra_fee": "<string>",
            "index_price": "<string>",
            "instrument_name": "<string>",
            "is_transfer": true,
            "label": "<string>",
            "liquidity_role": "<string>",
            "mark_price": "<string>",
            "op_uuid": "<string>",
            "order_id": "<string>",
            "realized_pnl": "<string>",
            "realized_pnl_excl_fees": "<string>",
            "subaccount_id": 123,
            "timestamp": 123,
            "trade_amount": "<string>",
            "trade_fee": "<string>",
            "trade_id": "<string>",
            "trade_price": "<string>",
            "tx_status": "<string>"
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subaccountTradesTxStatusNotification
    bindings: []
    extensions: &ref_7
      - id: x-parser-unique-object-id
        value: subaccountTradesTxStatus
  - &ref_8
    id: send_subscribe_subaccountTradesTxStatus
    title: Send_subscribe_subaccount trades tx status
    type: receive
    messages:
      - &ref_10
        id: subscribeRequest
        payload:
          - name: subscribeRequest
            description: >-
              Send to subscribe: list this channel's address (with the {param}
              segments filled, e.g. orderbook.ETH-PERP.10.20) in
              params.channels.
            type: object
            properties:
              - name: headers
                type: &ref_3
                  - object
                  - 'null'
                description: Non-standard; used by `auth/login`.
                required: false
              - name: id
                type: anyOf
                required: true
              - name: method
                type: string
                description: subscribe
                required: true
              - name: params
                type: object
                description: >-
                  Params for `subscribe`. `channels` is the required list of
                  channel names to subscribe to.
                required: true
                properties:
                  - name: channels
                    type: array
                    required: true
                    properties:
                      - name: item
                        type: string
                        required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - id
            - method
            - params
          properties:
            headers:
              description: Non-standard; used by `auth/login`.
              type: *ref_3
              additionalProperties: true
              x-parser-schema-id: <anonymous-schema-16>
            id: &ref_5
              anyOf:
                - type: string
                  x-parser-schema-id: <anonymous-schema-17>
                - type: number
                  x-parser-schema-id: <anonymous-schema-18>
                - type: 'null'
                  x-parser-schema-id: <anonymous-schema-19>
              x-parser-schema-id: JsonRpcId
            method:
              type: string
              const: subscribe
              x-parser-schema-id: <anonymous-schema-20>
            params:
              description: >-
                Params for `subscribe`. `channels` is the required list of
                channel names to subscribe to.
              type: object
              required:
                - channels
              properties:
                channels:
                  type: array
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-22>
                  x-parser-schema-id: <anonymous-schema-21>
              x-parser-schema-id: SubscribeParams
          x-parser-schema-id: <anonymous-schema-15>
        title: Subscribe request
        description: >-
          Send to subscribe: list this channel's address (with the {param}
          segments filled, e.g. orderbook.ETH-PERP.10.20) in params.channels.
        example: |-
          {
            "id": 1,
            "method": "subscribe",
            "params": {
              "channels": [
                "orderbook.ETH-PERP.10.20"
              ]
            }
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: subscribeRequest
      - &ref_11
        id: unsubscribeRequest
        payload:
          - name: unsubscribeRequest
            description: >-
              Send to unsubscribe: list the channel addresses to drop in
              params.channels, or omit it to unsubscribe from everything.
            type: object
            properties:
              - name: headers
                type: &ref_4
                  - object
                  - 'null'
                description: Non-standard; used by `auth/login`.
                required: false
              - name: id
                type: anyOf
                required: true
              - name: method
                type: string
                description: unsubscribe
                required: true
              - name: params
                type: object
                description: >-
                  Params for `unsubscribe`. `channels` is optional.


                  When omitted (or null) the connection unsubscribes from all
                  channels.
                required: true
                properties:
                  - name: channels
                    type: &ref_6
                      - array
                      - 'null'
                    required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - id
            - method
            - params
          properties:
            headers:
              description: Non-standard; used by `auth/login`.
              type: *ref_4
              additionalProperties: true
              x-parser-schema-id: <anonymous-schema-24>
            id: *ref_5
            method:
              type: string
              const: unsubscribe
              x-parser-schema-id: <anonymous-schema-25>
            params:
              description: >-
                Params for `unsubscribe`. `channels` is optional.


                When omitted (or null) the connection unsubscribes from all
                channels.
              type: object
              properties:
                channels:
                  default: null
                  type: *ref_6
                  items:
                    type: string
                    x-parser-schema-id: <anonymous-schema-27>
                  x-parser-schema-id: <anonymous-schema-26>
              x-parser-schema-id: UnsubscribeParams
          x-parser-schema-id: <anonymous-schema-23>
        title: Unsubscribe request
        description: >-
          Send to unsubscribe: list the channel addresses to drop in
          params.channels, or omit it to unsubscribe from everything.
        example: |-
          {
            "method": "<string>",
            "params": {}
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: unsubscribeRequest
    bindings: []
    extensions: *ref_7
sendOperations:
  - *ref_8
receiveOperations:
  - *ref_9
sendMessages:
  - *ref_10
  - *ref_11
receiveMessages:
  - *ref_12
extensions:
  - id: x-parser-unique-object-id
    value: subaccountTradesTxStatus
securitySchemes: []

````

## Related topics

- [Trades by instrument type currency tx status](/api-reference/channels/tradesbyinstrumenttypecurrencytxstatus.md)
- [Query anonymized public trade history](/api-reference/market-data/query-anonymized-public-trade-history.md)
- [Get historical trades for a subaccount](/api-reference/history/get-historical-trades-for-a-subaccount.md)
