> 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/getting-started/quickstart.md).

# Quickstart

Use this guide to make your first Market Replay request fast. Start with minute data, then move to ticks, end-of-day data, and events.

{% hint style="success" %}
**Estimated time: 5 minutes.** All you need is your Market Replay username, password, and a symbol.
{% endhint %}

## Before you start

Market Replay uses simple HTTP endpoints with query string parameters.

* Historical ticks, minutes, EOD, and events use `https://historical.aws.barchart.com/historical/`
* Futures options EOD uses `https://marketreplay.barchart.com/historical/`
* Most endpoints return comma-delimited text
* Authentication uses `username` and `password` on each request

### Date and time rules

* Use `yyyymmdd[hhmm[ss]]` for `start` and `end`
* `start` is inclusive
* `end` is exclusive
* Equities use Eastern Time
* Futures and other markets use Central Time

{% hint style="info" %}
Tick queries always stay within a single day. Query multiple days one day at a time.
{% endhint %}

## Make your first request

Start with minute data. It is easy to inspect and works well for first integration tests.

{% stepper %}
{% step %}

#### Query minute data

Request Apple minute bars from `9:00` to `12:00` on February 3, 2009:

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

Response format:

```
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
```

{% endstep %}

{% step %}

#### Query tick data

Use tick queries when you need every trade or quote event.

```bash
curl "https://historical.aws.barchart.com/historical/queryticks.ashx?username=YOUR_USERNAME&password=YOUR_PASSWORD&symbol=AAPL&start=20090203090000&end=20090203120000"
```

Default tick response format:

```
YYYY-MM-DD HH:MM:SS.FFF,TRADING_DAY,SESSION_CODE,PRICE,SIZE
```

Example:

```
2009-02-03 13:30:00.000,10,G,823.5,1
2009-02-03 13:30:00.125,10,G,823.75,7
```

Use `type=T` for trades, `type=Q` for quotes, and `type=B` for both when enabled.
{% endstep %}

{% step %}

#### Query end-of-day data

Use EOD queries for daily, weekly, monthly, quarterly, or yearly bars.

```bash
curl "https://historical.aws.barchart.com/historical/queryeod.ashx?username=YOUR_USERNAME&password=YOUR_PASSWORD&symbol=AAPL&start=20090203&end=20090223&data=daily"
```

Response format:

```
SYMBOL,YYYY-MM-DD,OPEN,HIGH,LOW,CLOSE,VOLUME[,OPENINTEREST]
```

Example:

```
CSCO,2009-02-09,16.99,17.05,16.62,16.85,37633398
CSCO,2009-02-10,16.59,16.93,15.92,16.05,69148797
```

{% endstep %}

{% step %}

#### Add filters and limits

Most queries support these parameters:

* `maxrecords` to cap the number of rows
* `order=asc` or `order=desc` for sort order
* `start` and `end` to control the range

Example — last `1000` minute records for Apple:

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

{% hint style="info" %}
If you use `maxrecords` with tick data, all ticks within a matching second are returned even if that pushes the result over the requested limit.
{% endhint %}
{% endstep %}
{% endstepper %}

## Pick the right endpoint

* [Tick queries](/market-replay-docs/api-query-types/tick-queries.md) — `queryticks.ashx` for tick-level trades and quotes
* [Minute queries](/market-replay-docs/api-query-types/minute-queries.md) — `queryminutes.ashx`, `querynearbyminutes.ashx`, and `queryformtminutes.ashx`
* [End-of-day queries](/market-replay-docs/api-query-types/end-of-day-queries.md) — `queryeod.ashx` for daily and aggregated history
* [Events and date range queries](/market-replay-docs/api-query-types/events-queries.md) — `queryevents.ashx`, `queryminutedaterange.ashx`, and `queryeoddaterange.ashx`
* [Futures options EOD](/market-replay-docs/api-query-types/futures-options-eod.md) — futures options chains and aggregate stats

### Common parameters

#### Tick queries

Required:

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

Common optional parameters:

* `start`
* `end`
* `maxrecords`
* `order`
* `sessionfilter`
* `type`
* `sale4Condition=true`
* `participantID=true`
* `exchId=true`

#### Minute queries

Required:

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

Common optional parameters:

* `start`
* `end`
* `maxrecords`
* `interval`
* `order`
* `splits=true|false`
* `dividends=true|false`

#### End-of-day queries

Required:

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

Common optional parameters:

* `start`
* `end`
* `maxrecords`
* `order`
* `data=daily|weekly|monthly|quarterly|yearly`
* `volume=contract|total|sumcontract|sumtotal`
* `splits=false`
* `dividends=false`

### Futures options EOD

Futures options EOD uses a separate endpoint and returns options data for one root on one date.

```bash
curl "https://marketreplay.barchart.com/historical/futuresoptions?username=YOUR_USERNAME&password=YOUR_PASSWORD&root=CK&date=2023-04-14"
```

JSON output is also available:

```bash
curl "https://marketreplay.barchart.com/historical/futuresoptions/json?username=YOUR_USERNAME&password=YOUR_PASSWORD&root=ZC&date=2023-08-16"
```

### Tips that save time

* Set `splits` and `dividends` explicitly for stock queries
* Use `queryminutedaterange.ashx` or `queryeoddaterange.ashx` before large backfills
* Use `interval` on minute queries to reduce payload size
* Use one tick query per day when building multi-day tick downloads

### Example URLs

First `1000` minute bars for Apple on February 3, 2009:

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

Last `1000` Apple ticks for the current day:

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

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

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

### Response formats at a glance

* Tick:

```
YYYY-MM-DD HH:MM:SS.FFF,TRADING_DAY,SESSION_CODE,PRICE,SIZE
```

* Minute:

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

* EOD:

```
SYMBOL,YYYY-MM-DD,OPEN,HIGH,LOW,CLOSE,VOLUME[,OPENINTEREST]
```

### Go deeper

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/6ticCtUe2G31nhuBgjEi" %}
[Authentication](/market-replay-docs/reference/authentication.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/AfDfQunz0wpsjBgBa1Z6" %}
[Python example](/market-replay-docs/getting-started/python-example.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/QXzwos3y5aGhz3J9sKFP" %}
[JavaScript example](/market-replay-docs/getting-started/javascript-example.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/veotAwDoOwuMXlenfUhc" %}
[curl examples](/market-replay-docs/getting-started/curl-examples.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/gttkUbhdbgqDwpSihEtL" %}
[Futures examples](/market-replay-docs/getting-started/futures-examples.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/Yt8o8HYC0EZRwVMPXBZj" %}
[Query parameter cheat sheet](/market-replay-docs/reference/query-parameter-cheat-sheet.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/MMs57vuTmnLWoIwIMqvK" %}
[Response formats](/market-replay-docs/reference/response-formats.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/I07GZzPAsQm20AhxRMtV" %}
[Symbols and notation](/market-replay-docs/reference/symbols-and-notation.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/llJCRAfYoMolfy9gkTy0" %}
[Errors and troubleshooting](/market-replay-docs/reference/errors-and-troubleshooting.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/1gZoHWMpLFhEoI9weU65" %}
[Tick queries](/market-replay-docs/api-query-types/tick-queries.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/nieQpf2moY2k8kctoLHK" %}
[Minute Queries](/market-replay-docs/api-query-types/minute-queries.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/Dv3XTjE2mwx9twF5OTRP" %}
[End-of-Day Queries](/market-replay-docs/api-query-types/end-of-day-queries.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/Tt2j0dYarO25WKnucqdl" %}
[Events queries](/market-replay-docs/api-query-types/events-queries.md)
{% endcontent-ref %}

{% content-ref url="/spaces/oV0AxMuTZVOIz4u9H5B3/pages/jA1Q3kKOunnqVBKZgm3z" %}
[Futures options EOD](/market-replay-docs/api-query-types/futures-options-eod.md)
{% endcontent-ref %}


---

# 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/getting-started/quickstart.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.
