---
title: "Candles"
url: https://docs.truemarkets.co/api/websocket/market-data/candles
description: "One candle for a subscribed candles.{SYMBOL}.{interval} topic."
---

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

# Candles

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

### candles

One candle for one symbol and interval.

Payload: `CandlesPayload`

Example payload:

```json
{
  "type": "candles",
  "timestamp": 0,
  "topics": [
    "string"
  ],
  "data": {
    "symbol": "string",
    "address": "string",
    "chain": "string",
    "product_type": "spot",
    "interval": "string",
    "open": "string",
    "high": "string",
    "low": "string",
    "close": "string"
  }
}
```

## Types

```ts
export type CandlesMessage = CandlesPayload;

export interface CandlesPayload {
  type: "candles";
  timestamp: number;

  /** The concrete topic, e.g. `["candles.ETH.1h"]`. */
  topics: string[];
  data: PriceCandle;
}

/** OHLC price data for a single asset and interval. */
export interface PriceCandle {
  /** Asset symbol. */
  symbol?: string;

  /** Asset contract address. */
  address?: string;

  /** Blockchain the asset lives on. */
  chain?: string;

  /** How the asset trades. A spot and a perp listing can share a symbol (e.g. `NVDA`); this tells them apart. */
  product_type?: "spot" | "perp";

  /** Candle interval (e.g. `1h`, `4h`, `24h`). */
  interval?: string;

  /** Opening price for the interval. */
  open?: string;

  /** Highest price during the interval. */
  high?: string;

  /** Lowest price during the interval. */
  low?: string;

  /** Closing price for the interval. */
  close?: string;
}
```