question

Upvotes
Accepted
3 2 2 6

Fields missing in TRTH TimeAndSales on-demand

We have a problem with some volume fields missing, when requested.

Please see this request below:

candles_req_pattern = {
  
"ExtractionRequest": {
"@odata.type":
"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
"ContentFieldNames": [
"Close Ask",
"Close Bid",
"High Ask",
"High Bid",
"Last",
"Low",
"Low Ask",
"Low Bid",
"No. Asks",
"No. Bids",
"No. Trades",
"Open",
"Open Ask",
"Open Bid",
"Volume"],
"IdentifierList": {
"@odata.type":
"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [
],
"ValidationOptions": None,
"UseUserPreferencesForValidationOptions": False},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "",
"QueryEndDate": "",
"SummaryInterval": "FifteenMinutes",
"TimebarPersistence": True,
"DisplaySourceRIC": True}
}
}
tick-history-rest-api
icon clock
10 |1500

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

Upvotes
Accepted
13.7k 26 8 12

@mihanix.it,

ValidateOptions

A series of boolean values that allow you to override preferences settings for instrument lists: you can set any combination of these:

AllowDuplicateInstruments, AllowHistoricalInstruments, AllowInactiveInstruments, AllowLimitedTermInstruments, AllowOpenAccessInstruments, AllowSubclassImport, AllowUnsupportedInstruments, ExcludeFinrAsPricingSourceForBonds, UseConsolidatedQuoteSourceForCanada, UseConsolidatedQuoteSourceForUsa, UseDebtOverEquity, UseExchangeCodeInsteadOfLipper, UseOtcPqSource, UseUsQuoteInsteadOfCanadian

Example:

      "ValidationOptions": {
        "AllowHistoricalInstruments": true,
        "AllowInactiveInstruments": true,
        "AllowOpenAccessInstruments": true      
      },

Volume

Volume, Open, Low, Last and No. Trades are only delivered if there are trades, which only occur during market open hours. They are not delivered on banking holidays and weekends (for your query, that represents 22, 28, 29 July).

  • EUR= this instrument does not deliver trades, so the following fields will always be empty: Open,Low,Last,Volume,No. Trades
  • VOD.L this instrument delivers trading data and volume, but only during trading hours. Per trading day there are ~36-40 bars with volume (out of 96).
  • ICBK.NS this instrument delivers trading data and volume, but only during trading hours. Per trading day there are 29 bars with volume (out of 96).

This explains why you see many records without volume.

Infliuence of TimebarPersistence

By setting "TimebarPersistence": true, you request that all bars be delivered, if they include new data or not. You will note that the content does not vary outside of trading hours, the values are always the same, because they are persisted.

If you set "TimebarPersistence": false, then bars are only delivered if there was actual new data recorded in them, a vast majority of those will therefore contain a value for Volume.

icon clock
10 |1500

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

Upvotes
13.7k 26 8 12

@mihanix.it, the query body has some issues:

Empty InstrumentIdentifiers. Should contain at least one instrument, for instance;

"InstrumentIdentifiers": [{ "Identifier": "CARR.PA", "IdentifierType": "Ric" }],

ValidationOptions can either be set to some values, or null:

"ValidationOptions": null,

A range query requires a QueryStartDate and a QueryEndDate, as an example:

"QueryStartDate": "2016-09-29T00:00:00.000Z",
"QueryEndDate": "2016-09-30T00:00:00.000Z",

Note: there are cases where some data fields might be missing, that can be normal. Possible causes: banking holiday, low volatility, deprecated instrument, etc.

icon clock
10 |1500

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

Please, read my comment

Upvotes
3 2 2 6

Actually I forgot to add fields "QueryStartDate", "QueryEndDate" and "InstrumentIdentifiers". To this message, because they are fielled automatically inside my program. I do belive there is no issue with those fields and I set them correctly.

Could you please tell me more abouy "ValidateOptions" ?

The main point of my question is why the data, I recieve, seems to be incorrect:

"Volume" field is empty in 90% cases, while the other fields are not empty.

I may be not a good economist, but I can't imagine a trade with price and without volume.

My RIC's are: identifier_list = ["EUR=", "ICBK.NS", "VOD.L"]

Query dates are 2018-07-22 til 2018-07-30 (today)

Thank you in advance

icon clock
10 |1500

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

Click below to post an Idea Post Idea