---
title: "Get Candles"
method: POST
path: "/market-data/candles"
tags: ["Market Data"]
---

# Get Candles

`POST /market-data/candles`

Get real-time candles data for a specific trading pair.

This endpoint uses the MarketDataProvider to get or create a candles feed that will
automatically start and maintain real-time updates. Subsequent requests with the same
configuration will reuse the existing feed for up-to-date data.

Args:
    request: FastAPI request object
    candles_config: Configuration for the candles including connector, trading_pair, interval, and max_records

Returns:
    Real-time candles data or error message

## Request body

- CandlesConfigRequest — The CandlesConfig class is a data class that stores the configuration of a Candle object. It has the following attributes: - connector: str - trading_pair: str - interval: str - max_records: int
  - `connector_name` string, required
  - `trading_pair` string, required
  - `interval` string
  - `max_records` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/hummingbot/apis/hummingbot-api.md) · [All operations](https://skmtc.net/hummingbot/apis/hummingbot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hummingbot/hummingbot-api/revisions/5347fe79537f/schema)
