The base class for report query targets to extend
Constant
System.DateTime DEFAULT_TRADING_DAY_START_TIME = 1/1/1970 12:00:00 AM
The default start of trading day time is midnight (00:00)
Constant
System.TimeSpan MINIMUM_SQL_TIME_RESOLUTION = 00:00:00.0030000
Minimum resolution of our SQL time comparisons (3 milliseconds)
UseActualDateTimeForFilter : bool
If true - filter on the underlying DateStart DateTime rather than the Z TradingDate field.
By default Date queries apply to the trading period that a sale/payment/etc is assigned. Setting this to true instead
forces the query to apply to the actual time an item/payment/transaction/etc was created/paid/finalised
For TimePeriodTypes below the resolution of a Day, the TradingDate will be offset to match the time of day that the action occurred. i.e. an action aggregated hourly occuring at 4am will
have the Trading Date offset to 4am on the trading date.
For TimePeriodTypes above the resolution of a day, the trading date will be aligned to the period in question (eg - start of Month for Monthly queries)
Nullable
TimePeriodType :
TimePeriodTypeEnum
The time period type to filter. Defaults to TimePeriodTypeEnum.Month
Not all filter targets will support all TimePeriodTypes. eg - support for 15 minute aggregates are restricted to only specific usecases due to the volume of data
Nullable
TradingDayStartTime :
string (ISO 8601 DateTime)
The time at which a new trading day starts. Only the hours component is utilised.
Only relevant if Query.UseActualDate is specified
Nullable
DateStart :
DateStartFilterCondition
When to start filtering time period from (inclusive).
WARNING - This value MUST align with the exact start of a time period, otherwise everything will fail horribly. You have been warned
Nullable
DateStartPart :
DateStartPartFilterCondition
Filtering on Date against a specific date part of the time (eg - Day of Week, Hour of Day etc).
Example
{
"UseActualDateTimeForFilter": true,
"TimePeriodType": 1,
"TradingDayStartTime": "2012-04-03T09:40:59.736Z",
"DateStart": {},
"DateStartPart": {}
}