---
title: "Get Spot price history"
method: GET
path: "/v1/spot/history"
tags: ["Spot market data"]
---

# Get Spot price history

`GET /v1/spot/history`

## Request

- Base URL: `https://api.ondoperps.xyz`
- URL: `https://api.ondoperps.xyz/v1/spot/history`
- Auth: one of:
  - HTTP bearer
  - API key in header `ONDO-KEY-ID`

Returns historical bar data in TradingView UDF format, as required by the TradingView charting library: a single object with parallel arrays keyed `t`, `o`, `h`, `l`, `c`, and `v` (values are numbers), plus a status field `s`. For a standard array-of-objects representation with full field names (`open`, `high`, `low`, `close`, `volume`), use `GET /v1/spot/candles` (Get Candles). Supply market (candles) or symbol (history), resolution, to, and either from or countback. Resolutions: 1, 5, 15, 60, 240, 1D, 1W; D/W aliases are accepted. to is inclusive.

## Query parameters

- `symbol` string, required
- `resolution` string, required
- `from` integer
- `to` integer, required
- `countback` integer

## Response `200`

TradingView UDF history response

- object: TradingView UDF history response with parallel arrays of OHLCV data.
  - `s` string: Status ('ok' or 'no_data')
  - `t` integer[]: Array of Unix timestamps
  - `o` number[]: Array of open prices
  - `h` number[]: Array of high prices
  - `l` number[]: Array of low prices
  - `c` number[]: Array of close prices
  - `v` number[]: Array of volumes

## Other responses

- `400`: Bad request. The request was malformed or failed validation.
- `429`: Rate limit exceeded. Slow down request frequency.
- `500`: Internal server error.

## Changes

- **2026-11-03** `1601c3adedda`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ondoperps/apis/ondo-perps-rest-api/changes/v1/spot/history/get.md)

---

[API](https://skmtc.dev/ondoperps/apis/ondo-perps-rest-api.md) - [All operations](https://skmtc.dev/ondoperps/apis/ondo-perps-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ondoperps/apis/ondo-perps-rest-api/revisions/1601c3adedda?raw)
