---
title: "Trade"
url: https://docs.truemarkets.co/api/websocket/institutional/trade
description: "Message sent from server containing the latest trade information for a subscribed instrument."
---

Docs index: https://docs.truemarkets.co/llms.txt

# Trade

True Markets CeFi WebSocket sends these messages to you.

Address: `/v1/cefi/market`

## Servers

- `wss://api.truemarkets.co` (Production, wss)
- `wss://api.uat.truemarkets.co` (Uat, wss)

## Messages

### trade

Payload: `TradePayload`

Example payload:

```json
{
  "seqnum": "string",
  "channel": "TRADE",
  "update": "SNAPSHOT",
  "data": {
    "match_id": "string",
    "taking_side": "BUY",
    "info": {
      "price": "string",
      "qty": "string",
      "timestamp": "string"
    },
    "symbol": "string"
  }
}
```

## Types

```ts
export type TradeMessage = TradePayload;

export type TradePayload =
  | {
  /** Current sequence number of the channel. */
  seqnum: string;
  channel: "TRADE";
  update: "SNAPSHOT" | "UPDATE";
  data: Trade;
}
  | {
  /** Current sequence number of the channel. */
  seqnum: string;
  channel: "TRADE";
  update: "SNAPSHOT_COMPLETE";

  /** The subscribed item whose snapshot is complete. */
  item: string;
};

export interface Trade {
  /** A unique identifier for the trade match event. */
  match_id?: string;

  /** Which side initiated the trade. */
  taking_side?: "BUY" | "SELL";

  /** Last trade information. */
  info?: MarketQuote & Record<string, unknown>;

  /** Human readable representation of the instrument. */
  symbol?: string;
}

export interface MarketQuote {
  price?: string;
  qty?: string;

  /** The Unix UTC timestamp (in nanoseconds) when the event occurred. */
  timestamp?: string;
}
```