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

Best Answer

  • warat.boonyanit
    Answer ✓

    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
    }

Answers

  • @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.

  • Thank you, that is helpful

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.