question

Upvotes
Accepted
43 2 2 6

Understanding options for ReportDateRangeType for TRTH

I am running examples to retrieve TimeandSales and MarketDepth for various futures contracts. Is there a way to retrieve all ContentFieldNames for a specific trading session? Is Range the only ReportDateRangeType type? I could not find other examples....

tick-history-rest-apirest-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
4.4k 10 6 9

Hi @jwaldron

Currently, there are three ReportDateRange types available for TimeandSales and MarketDepth templates.

  1. "Range"
  2. "Delta"
  3. "Relative"

"Delta" is used in conjunction with "DaysAgo". It will return all data that has occurred a number of days ago, beginning at 00:00:00.

"Relative" is used in conjunction with "RelativeStartDaysAgo", "RelativeEndDaysAgo", "RelativeStartTime", and "RelativeEndTime". Similar to Delta, it will return all data that has occurred between the set number of days ago.

So, no, you cannot specify "trading session" as date range type. However, if you know the trading session window, you can use the condition "TimeRangeMode": "Window" to limit extracted data to the specific time window daily between start and end times.

For example, the below JSON will limit extracted data to the time between 10:00 to 11:00 from the 3 to 5 days ago.

"Condition": {
  "MessageTimeStampIn": "GmtUtc",
  "ApplyCorrectionsAndCancellations": false,
  "ReportDateRangeType": "Relative",
  "RelativeStartDaysAgo": 5,
  "RelativeEndDaysAgo": 3,
  "RelativeStartTime": "10:00:00",
  "RelativeEndTime": "11:00:00",
  "TimeRangeMode": "Window",
  "DisplaySourceRIC": true
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
13.7k 26 8 12

@jwaldron, you cannot specify a trading session as the criteria to extract data. You can specify a datetime range, you can also specify a relative range, or start at 00:00 N days ago, but at the end of the day it is still a user specified range.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
43 2 2 6

Thank you, that is helpful

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.