> 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/end-of-day-queries/end-of-day-query-parameters.md).

# End-of-Day Query Parameters

| Name             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| username\*       | This parameter should be set to the user name provided by ddfplus to the user account.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| password\*       | This parameter should be set to the password provided by ddfplus for the user name passed in parameter username.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| symbol\*         | This parameter should be set to the symbol for which the query should return data. This query supports the '*' notation for futures (i.e. RS*1, where RS is the root symbol for the commodity). Note that a SYMBOL field containing the active contract for which data is returned will be prepended to each record in the result set when using the '\*' notation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| start            | This parameter should be set to the desired start date/time for the query (the result set will include records back to, and including, this value). If not set, the value will default to the beginning of available data if a maximum number of records is specified; otherwise it will default to the beginning of the day specified in the end parameter, if specified, or to the beginning of the current day, if end is not specified. The value should conform to the format yyyymmdd\[hhmm\[ss]], where fields in brackets are optional. Any optional fields that are not explicitly set will default to 0 (i.e. 20090203 will default to 20090203000000 or February 3, 2009 at 00:00:00).                                                                                                                                                                                                                                                                                                                             |
| end              | This parameter should be set to the desired end date/time for the query (the result set will include records up to, but not including, this value). If not set, the value will default to the end of available data, if a maximum number of records is specified; otherwise, the value will default to the end of the day specified in the start parameter, if specified, or to the end of the current day, if start is not specified. The value should conform to the format yyyymmdd\[hhmm\[ss]], where fields in brackets are optional. Any optional fields that are not explicitly set will default to 0 (i.e. 20090203 will default to 20090203000000 or February 3, 2009 at 00:00:00).                                                                                                                                                                                                                                                                                                                                  |
| maxrecords       | This parameter should be set to the maximum number of records desired. If not specified, the number of records returned will be determined by the date parameters specified as well as any defaults that apply to the query.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| order            | This parameter can be set to one of two values (asc and desc) in order to specify the chronological order of the result set returned. If this parameter is not specified, the order results is not guaranteed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| data             | This parameter can be set to one of fifteen values (daily, dailynearest, dailycontinue, weekly, weeklynearest, weeklycontinue, monthly, monthlynearest, monthlycontinue, quarterly, quarterlynearest, quarterlycontinue, yearly, yearlynearest, and yearlycontinue) in order to specify whether daily, weekly, monthly, quarterly or yearly records are to be returned, and whether they should be plain, nearest, or continuation records. Nearest and continuation are ignored for equities, and if specified the query will simply return plain records. The 'nearest' queries return the total volume by default (\&volume=total) but if you desire contract volume, this can be overridden by passing \&volume=contract. A "nearby record" is the nearest futures contract to expiration at any given date in time. Example: Corn Dec 2008, Corn Sep 2008, Corn July 2008 ... A "continuation record" is the same contract month over different contract years. Example: Corn Dec 2008, Corn Dec 2007, Corn Dec 2006 ... |
| contractroll     | For futures, multi-contract nearest queries (data parameter set to dailynearest, weeklynearest, monthlynearest, quarterlynearest or yearlynearest), this parameter can be set to one of two values (expiration, combined), and determines how the switch from one contract to the next in the series is calculated. When the value specified is 'expiration', the switch from one contract to the next in the series will be based on the expiration date (and the value of the 'daystoexpiration' parameter if specified). When the value specified is 'combined', a combination of volume and openinterest will be used to determine when to switch from one contract to the next in the series (when using this value, the 'daystoexpiration' parameter is ignored).                                                                                                                                                                                                                                                       |
| volume           | For futures, this parameter can be set to one of two values (contract and total) in order to specify whether the volume returned should be the contract volume or the total volume. For aggregates (such as weekly, monthly or yearly), this returns the average volume for the period specified. If the value is preceded by 'sum' (sumcontract and sumtotal), then it returns the sum of the volumes in each daily bar during the period specified. If not specified, the value will default to contract. For aggregate equities queries (such as weekly, monthly or yearly), this parameter can be set to sum to return the sum of the volumes in each daily bar during the period specified. If not specified, then the average volume is returned.                                                                                                                                                                                                                                                                       |
| dividends        | =false (turns off dividends adjustment for stock data)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| splits           | =false (turns off split adjustment for stock data). If you want data in raw unadjusted form, then both of these need to be set.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| nearby           | This parameter specifies the offset from the front month for 'nearest' queries (data parameter set to dailynearest, weeklynearest, monthlynearest, quarterlynearest and yearlynearest). The default value for this parameter is 1, which sets nearest queries to the most current front month. If set to a value greater than 1, then the nth front month is used (for example, in August of 2010, ESU10 would be the current front month, so nearby=2 would use ESZ10, nearby=3 would use ESH11, etc.) This parameter is ignored for all other queries. Alternatively, the same functionality provided by the nearby parameter can be achieved using the symbol notation symbol=RS*n, where RS is the root symbol and n is the nth front month (i.e. symbol=ES*1, symbol=YM\*3, etc.). When using this notation on the symbol parameter, the nearby parameter should be omitted.                                                                                                                                             |
| daystoexpiration | This parameter specifies the number of calendar days prior to a contract expiration when the series of contracts will be switched to the next contract in the series. Valid values are 0 through 60. A value of 0 will tell the system to use the day of expiration. If not specified, the default value (1) is used, resulting in each contract in the series to run until (and including) the day prior to its expiration. This parameter only applies to multi-contract futures queries and is ignored for all other queries.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| backadjust       | This parameter specifies whether the contracts in the series will be adjusted based on the roll-gap between the closing prices of the current contract and the previous contract on the day of the switch. Valid values are true and false. If not specified, the default value is false resulting in a non-adjusted query. Adjustments are reflected starting from the current date, regardless if an end date is set or not. This parameter only applies to multi-contract futures queries and is ignored for all other queries.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |


---

# 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/end-of-day-queries/end-of-day-query-parameters.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.
