---
title: "Price"
url: https://docs.truemarkets.co/api/websocket/market-data/price
description: "Live price for a subscribed price.{SYMBOL} topic."
---

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

# Price

True Markets Market Data WebSocket sends these messages to you.

Address: `/v1/defi/market`

## Servers

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

## Messages

### price

Live price for one symbol.

Payload: `PricePayload`

Example payload:

```json
{
  "type": "price",
  "timestamp": 0,
  "topics": [
    "string"
  ],
  "data": {
    "symbol": "string",
    "asset_class": "spot",
    "price": "string",
    "change_1h": "string",
    "change_24h": "string",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
```

## Types

```ts
export type PriceMessage = PricePayload;

export interface PricePayload {
  type: "price";
  timestamp: number;

  /** The concrete topic, e.g. `["price.BTC"]`. */
  topics: string[];
  data: LivePrice;
}

/** A symbol's displayed price and its change against the 1h and 24h candle opens. */
export interface LivePrice {
  symbol: string;
  asset_class: "spot" | "perp";

  /** Reference mid for spot symbols with a fresh reference price, else the 24h candle close. */
  price: string;

  /** Percent change from the 1h candle open, two decimals. Omitted without a 1h candle. */
  change_1h?: string;

  /** Percent change from the 24h candle open, two decimals. Omitted without a 24h candle. */
  change_24h?: string;
  timestamp: string;
}
```