---
title: "Obtain chart data from historical closed trades"
method: POST
path: "/v3/trade/chart"
tags: ["Order Book"]
---

# Obtain chart data from historical closed trades

`POST /v3/trade/chart`

## Request

- Base URL: `https://api.tatum.io`
- URL: `https://api.tatum.io/v3/trade/chart`
- Auth: API key in header `x-api-key`

/v3/trade/chart

#### 2 credits for API call.

  

Obtain data from the closed trades for entering in the chart. Time interval is set between _from_ and _to_ and there is defined time frame. There can be obtained at most 200 time points in the time interval.

## Query parameters

- `direction` 'asc' | 'desc'

## Request body

- ChartRequest
  - `pair` string, required: Trading pair
  - `from` number, required: Start interval in UTC millis.
  - `to` number, required: End interval in UTC millis.
  - `timeFrame` 'MIN_1' | 'MIN_3' | 'MIN_5' | 'MIN_15' | 'MIN_30' | 'HOUR_1' | 'HOUR_4' | 'HOUR_12' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR', required: Time frame of the chart.

## Response `200`

OK

- Chart[]
  - `timestamp` number, required: Milliseconds in UTC of the time interval.
  - `high` string, required: Highest trade value in the current interval.
  - `low` string, required: Lowest trade value in the current interval.
  - `open` string, required: Open trade value in the current interval.
  - `close` string, required: Close trade value in the current interval.
  - `volume` string, required: Total volume of assets traded in the current interval. Volume is in currency1 asset.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `500`: Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.dev/tatum/apis/virtual-accounts.md) - [All operations](https://skmtc.dev/tatum/apis/virtual-accounts/llms.txt) - [OpenAPI document](https://skmtc.dev/tatum/apis/virtual-accounts/revisions/ba220553084b?raw)
