Skip to content

Market:QueryChartHistory

Retrieves charting history data for a symbol.

Controller: Market
Topic: QueryChartHistory
Action: Publish
Permissions: Zenith/Market

NameTypeExpectDescription
MarketStringAlwaysThe code for the Market the symbol belongs to. Can be a Mixed Market code.
CodeStringAlwaysThe symbol code to retrieve history for
CountIntegerOptionalThe number of records to retrieve. If omitted, retrieves all available.
PeriodTimeSpanOptionalThe time period to retrieve records for. If omitted, defaults to one day. Valid periods: 00:01:00 – Retrieves 1-minute records 00:05:00 – Retrieves 5-minute records 00:15:00 – Retrieves 15-minute records 00:30:00 – Retrieves 30-minute records 1.00:00:00 – Retrieves daily records
FromDateDateTimeOptionalThe minimum date and time to retrieve records for. If specifying a period of daily or larger, the time value is ignored and should be midnight (00:00:00)
ToDateDateTimeOptionalThe maximum date and time to retrieve records for. If specifying a period of daily or larger, the time value is ignored and should be midnight (00:00:00)

This method supports all combinations of From, To and Count.

FromToCountDescription
Retrieve all records
XRetrieve all records after From date
XRetrieve all records before To date
XRetrieve Count newest records before the current date
XXRetrieve Count oldest records after From date
XXRetrieve all records between From and To date
XXRetrieve Count newest records before To date
XXXRetrieve Count newest records between From and To date

An unordered array of Chart Records.

NameTypeExpectDescription
DateDateTimeAlwaysThe date and time of this record. If specifying a period of daily or larger, the time value will be omitted.
OpenDecimalOptionalThe opening price. If omitted, did not trade in this period.
HighDecimalOptionalThe high price. If omitted, did not trade in this period.
LowDecimalOptionalThe low price. If omitted, did not trade in this period.
CloseDecimalOptionalThe closing price. If omitted, did not trade in this period.
VolumeDecimalOptionalThe total volume traded. If omitted, did not trade in this period.
TradesIntegerOptionalThe total number of trades. If omitted, did not trade in this period, or the data is unavailable.

Send:

{"Controller":"Market","Topic":"QueryChartHistory","TransactionID":1,"Data":{"Market":"ASX","Code":"BHP","Count":1}}

Receive:

{
"Controller":"Market",
"Topic":"QueryChartHistory",
"TransactionID":1,
"Data":
[
{
"Date":"2016-01-20+10:00",
"Open":14.53,
"High":14.67,
"Low":14.14,
"Close":14.21,
"Volume":11597193
}
]
}