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

# Public Trades

> Public notifications for executed margin trades.

Requirements:
- no additional channel-level auth beyond the authenticated WebSocket connection
- market specification optional via `market_ticker` or `market_tickers`




## AsyncAPI

````yaml perps_asyncapi.yaml trade
id: trade
title: Public Trades
description: >
  Public notifications for executed margin trades.


  Requirements:

  - no additional channel-level auth beyond the authenticated WebSocket
  connection

  - market specification optional via `market_ticker` or `market_tickers`
servers:
  - id: production
    protocol: wss
    host: external-api-margin-ws.kalshi.com
    bindings: []
    variables: []
  - id: demo
    protocol: wss
    host: external-api-margin-ws.demo.kalshi.co
    bindings: []
    variables: []
address: trade
parameters: []
bindings: []
operations:
  - &ref_0
    id: receiveTrade
    title: Trade Update
    type: send
    messages:
      - &ref_1
        id: trade
        contentType: application/json
        payload:
          - name: Trade Update
            description: Public margin trade information
            type: object
            properties:
              - name: type
                type: string
                description: trade
                required: true
              - name: sid
                type: integer
                description: >-
                  Server-generated subscription identifier (sid) used to
                  identify the channel
                required: true
              - name: seq
                type: integer
                description: >-
                  Sequential number that should be checked if you want to
                  guarantee you received all the messages. Used for
                  snapshot/delta consistency
                required: true
              - name: msg
                type: object
                required: true
                properties:
                  - name: trade_id
                    type: string
                    required: true
                  - name: market_ticker
                    type: string
                    description: Unique market identifier
                    required: true
                  - name: price
                    type: string
                    required: true
                  - name: count
                    type: string
                    required: true
                  - name: taker_side
                    type: string
                    enumValues:
                      - bid
                      - ask
                    required: true
                  - name: ts_ms
                    type: integer
                    description: Unix timestamp in milliseconds.
                    required: true
              - name: sending_ts_ms
                type: integer
                description: >-
                  Unix timestamp in milliseconds when Kalshi queued this message
                  at the network layer.
                required: false
        headers: []
        jsonPayloadSchema:
          type: object
          required:
            - type
            - sid
            - seq
            - msg
          properties:
            type:
              type: string
              const: trade
              x-parser-schema-id: <anonymous-schema-90>
            sid:
              type: integer
              description: >-
                Server-generated subscription identifier (sid) used to identify
                the channel
              minimum: 1
              x-parser-schema-id: subscriptionId
            seq:
              type: integer
              description: >-
                Sequential number that should be checked if you want to
                guarantee you received all the messages. Used for snapshot/delta
                consistency
              minimum: 1
              x-parser-schema-id: sequenceNumber
            msg:
              type: object
              required:
                - trade_id
                - market_ticker
                - price
                - count
                - taker_side
                - ts_ms
              properties:
                trade_id:
                  type: string
                  format: uuid
                  x-parser-schema-id: <anonymous-schema-92>
                market_ticker:
                  type: string
                  description: Unique market identifier
                  x-parser-schema-id: marketTicker
                price:
                  type: string
                  x-rust-type: common::types::Price
                  x-rust-serialize-with: ws::dto::serde_money::serialize_price_dollars
                  x-parser-schema-id: <anonymous-schema-93>
                count:
                  type: string
                  x-rust-type: common::types::Amount
                  x-rust-serialize-with: ws::dto::serde_money::serialize_amount_fixed_point_count
                  x-parser-schema-id: <anonymous-schema-94>
                taker_side:
                  type: string
                  enum:
                    - bid
                    - ask
                  x-parser-schema-id: bookSide
                ts_ms:
                  type: integer
                  format: int64
                  description: Unix timestamp in milliseconds.
                  x-parser-schema-id: <anonymous-schema-95>
              x-parser-schema-id: <anonymous-schema-91>
            sending_ts_ms:
              type: integer
              format: int64
              description: >-
                Unix timestamp in milliseconds when Kalshi queued this message
                at the network layer.
              x-parser-schema-id: sendingTimestampMs
          x-parser-schema-id: marginTradePayload
        title: Trade Update
        description: Public margin trade information
        example: |-
          {
            "type": "<string>",
            "sid": 123,
            "seq": 123,
            "msg": {
              "trade_id": "<string>",
              "market_ticker": "<string>",
              "price": "<string>",
              "count": "<string>",
              "taker_side": "<string>",
              "ts_ms": 123
            },
            "sending_ts_ms": 123
          }
        bindings: []
        extensions:
          - id: x-parser-unique-object-id
            value: trade
    bindings: []
    extensions:
      - id: x-parser-unique-object-id
        value: trade
sendOperations: []
receiveOperations:
  - *ref_0
sendMessages: []
receiveMessages:
  - *ref_1
extensions:
  - id: x-parser-unique-object-id
    value: trade
securitySchemes:
  - id: apiKey
    name: apiKey
    type: apiKey
    description: API key authentication required for margin WebSocket connections.
    in: user
    extensions: []

````

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