> For the complete documentation index, see [llms.txt](https://developer.barchart.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.barchart.com/market-replay-docs/api-query-types/minute-queries.md).

# Minute Queries

Minute queries aggregate intraday price and volume data into OHLCV bars. A bar represents one interval on a financial bar chart, such as one, five, or 60 minutes. Choose the interval that fits your analysis to create flexible views of open, high, low, close, and volume data.

{% hint style="warning" %}
This endpoint supports equity and futures symbols, but it is not recommended as a best practice. Options requests must use an option-chain symbol per query.
{% endhint %}

Use minute queries for intraday OHLCV bars.

The main request handler is:

```
https://historical.aws.barchart.com/historical/queryminutes.ashx
```

You can also use related handlers:

* `querynearbyminutes.ashx` for nearby futures minute data
* `queryformtminutes.ashx` for stock minute data including Form T trades
* `queryminutedaterange.ashx` for available minute history by symbol

## What a minute query returns

A minute query returns all minute records for a symbol in a requested period.

You can also aggregate contiguous minutes using `interval`.

If `interval` is omitted, the default is `1` minute.

## Time rules

* Equities use Eastern Time
* Futures and forex use Central Time
* `start` is inclusive
* `end` is exclusive
* Input format is `yyyymmdd[hhmm[ss]]`

## Parameters

Required:

* `username`
* `password`
* `symbol`

Optional:

* `start`
* `end`
* `maxrecords`
* `interval`
* `order`
* `splits`
* `dividends`

### `symbol`

This endpoint supports the `*` notation for futures.

When `*` notation is used, a `SYMBOL` field containing the active contract is prepended to each returned record.

### `interval`

Use `interval` to aggregate minute bars.

Examples:

* `1` — one-minute bars
* `5` — five-minute bars
* `60` — one-hour bars

### `splits` and `dividends`

These parameters apply only to stocks.

* `splits=true|false`
* `dividends=true|false`

If omitted:

* `splits` currently defaults to `true`
* `dividends` currently defaults to `false`

{% hint style="warning" %}
Set both values explicitly if you need stable adjustment behavior over time.
{% endhint %}

## Default behaviors

### When both `start` and `end` are set

All minute records in the period are returned.

If `maxrecords` is smaller than the full result set:

* `order=asc` trims from the chronological end
* `order=desc` trims from the chronological beginning

### When only `end` is set

* with `maxrecords`, returns up to that many records back to the beginning of available minute data
* without `maxrecords`, returns all records back to the beginning of the specified end day

### When only `start` is set

* with `maxrecords`, returns up to that many records forward to the most current minute available
* without `maxrecords`, returns all records through the end of the specified start day

### When neither date is set

Without `maxrecords`:

* `start` defaults to the beginning of the current day
* `end` defaults to the beginning of the next day

With `maxrecords`:

* `start` defaults to the beginning of available data
* `end` defaults to the end of available data

## Response format

Minute queries return comma-delimited text, one record per line:

```
YYYY-MM-DD HH:MM,TRADING_DAY,OPEN,HIGH,LOW,CLOSE,VOLUME
```

Example:

```
2009-02-03 14:44,10,821.75,823.25,820.75,823,10279
2009-02-03 14:43,10,823.25,823.75,821.75,821.75,11888
```

{% hint style="info" %}
For futures, `TRADING_DAY` reflects the exchange trading day used to build the daily OHLC values. It can differ from the calendar day.
{% endhint %}

## Examples

All Apple minute records between `9:00` and `12:00` on February 3, 2009:

```
https://historical.aws.barchart.com/historical/queryminutes.ashx?username=username&password=password&symbol=AAPL&start=200902030900&end=200902031200
```

Last `1000` Apple minute records for the current day in descending order:

```
https://historical.aws.barchart.com/historical/queryminutes.ashx?username=username&password=password&symbol=AAPL&maxrecords=1000&order=desc
```

First `1000` Apple minute records for February 3, 2009 in ascending order:

```
https://historical.aws.barchart.com/historical/queryminutes.ashx?username=username&password=password&symbol=AAPL&start=20090203&maxrecords=1000&order=asc
```

Five-minute Apple bars between `9:00` and `12:00`:

```
https://historical.aws.barchart.com/historical/queryminutes.ashx?username=username&password=password&symbol=AAPL&start=200902030900&end=200902031200&interval=5
```

## Nearby minute queries

Nearby minute queries are futures-only.

They differ from standard minute queries in three ways:

* they apply only to futures contracts
* only the root symbol is used
* each record includes the active contract symbol

Response format:

```
CONTRACT,YYYY-MM-DD HH:MM,TRADING_DAY,OPEN,HIGH,LOW,CLOSE,VOLUME
```

Example:

```
ESU09,2009-09-11 00:13,11,1040,1040,1039.75,1039.75,4
```

Example URL:

```
https://historical.aws.barchart.com/historical/querynearbyminutes.ashx?username=username&password=password&symbol=ES&start=20090601&end=20090701
```

## Form T minute queries

Form T minute queries are stock-only.

They include minutes built from Form T trades, including pre-market and post-market trades.

Example URL:

```
https://historical.aws.barchart.com/historical/queryformtminutes.ashx?username=username&password=password&symbol=IBM&start=20090901&end=20090910
```

## Related

* [Tick queries](/market-replay-docs/api-query-types/tick-queries.md)
* [End-of-day queries](/market-replay-docs/api-query-types/end-of-day-queries.md)
* [Events and date range queries](/market-replay-docs/api-query-types/events-queries.md)


---

# 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://developer.barchart.com/market-replay-docs/api-query-types/minute-queries.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.
