---
search:
  tags:
    - Market Data
    - SEND
seo:
  description: >-
    Public trades for the subscribed markets, or for every market when tickers
    are omitted, plus… Reference for the send operation on /ws in the WebSocket
    API.
sidebar:
  label: Stream Trades
  badge: SEND
title: Stream Trades
type: openapi-operation
---
Public trades for the subscribed markets, or for every market when tickers are omitted, plus retractions of trades the exchange voids.

### Operation

- Action and channel: `SEND /ws`
- Operation ID: `sendTradeData`
- API reference: [SEND /ws](/api-reference/websocket/market-data/send-trade-data)
- Complete specification: [AsyncAPI (YAML)](/asyncapi.yml)
- Spec location (JSON Pointer): `#/operations/sendTradeData`

#### Authorization

- Credential: `UDX-Access-Key`, `UDX-Access-Timestamp`, `UDX-Access-Signature` headers on the WebSocket upgrade request
- Details: [Connecting](/reference/connecting?api=websocket) and [Authentication](/reference/authentication?api=websocket)

Upgrade headers schema:

```yaml
$ref: "#/components/schemas/WebSocketUpgradeHeaders"
```


#### Messages

##### Trade

Deliver one public trade on a subscribed market.

Payload schema:

```yaml
$ref: "#/components/schemas/TradeEnvelope"
```

Example: TradeExample

One multi-leg market trade

```json
{
  "type": "trade",
  "sid": 9,
  "seq": 1,
  "msg": {
    "trade": {
      "trade_id": "BP1ZQ131E04K",
      "ticker": "UDXCOMBO-EXAMPLE",
      "price": "0.057",
      "quantity": "29.62",
      "taker_side": "sell",
      "executed_at": "2026-09-25T20:15:08.257000Z"
    }
  }
}
```

##### Trade Busted

Retract a trade the exchange voided after publication.

Payload schema:

```yaml
$ref: "#/components/schemas/TradeBustedEnvelope"
```

Example: TradeBustedExample

One voided trade

```json
{
  "type": "trade_busted",
  "sid": 9,
  "seq": 2,
  "msg": {
    "trade_id": "BP1ZQ131E04K",
    "ticker": "UDXCOMBO-EXAMPLE"
  }
}
```

#### Referenced definitions

The references in the excerpts above resolve to these definitions in the complete specification.

##### `#/components/schemas/WebSocketUpgradeHeaders`

```yaml
type: object
additionalProperties: true
description: Headers required for authentication and version negotiation.
required:
  - UDX-Access-Key
  - UDX-Access-Timestamp
  - UDX-Access-Signature
  - Sec-WebSocket-Protocol
properties:
  UDX-Access-Key:
    type: string
    minLength: 1
    maxLength: 255
    description: Opaque API key ID.
  UDX-Access-Timestamp:
    type: string
    pattern: ^[0-9]{13}$
    maxLength: 13
    description: Unix time in milliseconds, within 30 seconds of server time.
  UDX-Access-Signature:
    type: string
    minLength: 1
    maxLength: 1024
    description: Standard-base64 RSA-PSS/SHA-256 signature with a 32-byte salt. Sign timestamp + "GET" + "/ws"; the upgrade request has no body hash and no idempotency key.
  Sec-WebSocket-Protocol:
    type: string
    const: udx.json.2026-08-11
    description: Negotiated dated WebSocket API version.
```

##### `#/components/schemas/TradeEnvelope`

```yaml
type: object
additionalProperties: false
description: One public trade on one trades subscription.
required:
  - type
  - sid
  - seq
  - msg
properties:
  type:
    type: string
    const: trade
    description: Identifies one public trade.
  sid:
    $ref: "#/components/schemas/SubscriptionId"
  seq:
    $ref: "#/components/schemas/SequenceNumber"
  msg:
    $ref: "#/components/schemas/TradePayload"
```

##### `#/components/schemas/SubscriptionId`

```yaml
type: integer
format: int64
minimum: 1
maximum: 9007199254740991
description: Exchange-assigned subscription ID whose lifetime is this WebSocket connection.
```

##### `#/components/schemas/SequenceNumber`

```yaml
type: integer
format: int64
minimum: 1
maximum: 9007199254740991
description: Gap-detection sequence local to one subscription. It starts at 1 and increments once per frame on that subscription.
```

##### `#/components/schemas/TradePayload`

```yaml
type: object
additionalProperties: false
description: One public trade.
required:
  - trade
properties:
  trade:
    $ref: "#/components/schemas/Trade"
```

##### `#/components/schemas/Trade`

```yaml
type: object
additionalProperties: false
description: A public trade (match) on a market.
required:
  - trade_id
  - ticker
  - price
  - quantity
  - taker_side
  - executed_at
properties:
  trade_id:
    type: string
    maxLength: 64
    description: Exchange-assigned trade identifier.
    example: BP1ZQ131E04J
  ticker:
    $ref: "#/components/schemas/Ticker"
  price:
    type: string
    pattern: ^[0-9]+(\.[0-9]{1,6})?$
    maxLength: 24
    description: Trade price, in YES dollars.
    example: "0.55"
  quantity:
    type: string
    pattern: ^[0-9]+(\.[0-9]{1,2})?$
    maxLength: 24
    description: Contracts traded.
    example: "100"
  taker_side:
    type: string
    enum:
      - buy
      - sell
    description: The aggressor (taker) side of the trade.
  executed_at:
    type: string
    format: date-time
    maxLength: 40
    description: When the trade executed.
    example: 2026-01-01T00:00:00.000000Z
```

##### `#/components/schemas/Ticker`

```yaml
type: string
minLength: 1
maxLength: 128
description: A human-meaningful natural key naming a single-leg or multi-leg market.
example: UDX-EXAMPLE-MARKET
```

##### `#/components/schemas/TradeBustedEnvelope`

```yaml
type: object
additionalProperties: false
description: A retraction of a trade this subscription may already have delivered.
required:
  - type
  - sid
  - seq
  - msg
properties:
  type:
    type: string
    const: trade_busted
    description: Identifies a voided trade.
  sid:
    $ref: "#/components/schemas/SubscriptionId"
  seq:
    $ref: "#/components/schemas/SequenceNumber"
  msg:
    $ref: "#/components/schemas/TradeBustedPayload"
```

##### `#/components/schemas/TradeBustedPayload`

```yaml
type: object
additionalProperties: false
description: Identifies a trade the exchange voided after it was published.
required:
  - trade_id
  - ticker
properties:
  trade_id:
    type: string
    maxLength: 64
    description: Exchange-assigned identifier of the voided trade.
  ticker:
    $ref: "#/components/schemas/Ticker"
```
