> For the complete documentation index, see [llms.txt](https://docs.openmm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openmm.io/api-reference/market-data/ticker.md).

# GET /ticker

Get current ticker data for a trading pair.

## Request

```
GET /api/v1/ticker?exchange={exchange}&symbol={symbol}
```

### Parameters

| Parameter | Type   | Required | Description                   |
| --------- | ------ | -------- | ----------------------------- |
| exchange  | string | ✅        | Exchange ID                   |
| symbol    | string | ✅        | Trading pair (e.g., BTC/USDT) |

## Response

```json
{
  "exchange": "mexc",
  "symbol": "BTC/USDT",
  "last": 42150.50,
  "bid": 42148.00,
  "ask": 42152.00,
  "spread": 4.00,
  "spreadPercent": 0.0095,
  "baseVolume": 1234.56,
  "quoteVolume": 52000000.00,
  "timestamp": 1710000000000
}
```

### Response Fields

| Field         | Type   | Description                  |
| ------------- | ------ | ---------------------------- |
| last          | number | Last traded price            |
| bid           | number | Best bid price               |
| ask           | number | Best ask price               |
| spread        | number | Absolute spread (ask - bid)  |
| spreadPercent | number | Spread as % of mid price     |
| baseVolume    | number | 24h volume in base currency  |
| quoteVolume   | number | 24h volume in quote currency |
| timestamp     | number | Data timestamp (ms)          |

## Examples

### cURL

```bash
curl "http://localhost:3000/api/v1/ticker?exchange=mexc&symbol=BTC/USDT"
```

### JavaScript

```javascript
const response = await fetch(
  'http://localhost:3000/api/v1/ticker?exchange=mexc&symbol=BTC/USDT'
);
const ticker = await response.json();
console.log(`BTC price: $${ticker.last}`);
```

## Errors

| Code | Error            | Description                   |
| ---- | ---------------- | ----------------------------- |
| 400  | Invalid exchange | Exchange not supported        |
| 400  | Missing symbol   | Symbol parameter required     |
| 500  | Exchange error   | Failed to fetch from exchange |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.openmm.io/api-reference/market-data/ticker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
