---
title: "Get price at a point in time"
url: https://docs.truemarkets.co/api/market-data/get-price-at-time
description: "Returns the last known price for an asset at or before the given timestamp."
---

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

# Get price at a point in time

```
GET https://api.truemarkets.co/v1/defi/market/prices/history/point
```

Returns the last known price for an asset at or before the given timestamp.
Use this to value a position, settle a trade, or anchor a calculation to a
specific moment in time.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `asset_id` | query | string (uuid) | no | Backend asset ID. Mutually exclusive with `symbol`: exactly one of the two is required, and naming both is a 400. |
| `symbol` | query | string | no | Asset symbol to look up (e.g. `SOL`, `BTC`). |
| `timestamp` | query | integer (int64) | yes | Unix timestamp in seconds. The response returns the most recent price at or before this moment. |
| `asset_class` | query | string, one of `spot`, `perp` | no | Asset class to resolve the symbol in. Defaults to `spot`. |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 200

Price at the requested point in time

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `asset_id` | string (uuid) | no | Backend asset ID. Absent on the CeFi routes. |
| `symbol` | string | no | The asset symbol |
| `timestamp` | integer (int64) | no | Unix timestamp of the actual data point returned |
| `price` | string | no | Price at the returned timestamp |

### 400

Bad request - invalid parameters

### 404

No price data found for the given symbol and timestamp

### 500

Internal server error
