question

Upvotes
Accepted
38 0 1 4

Retrieve Item V3 timestamp of bid

I am currently using the Retrieve Item V3 method to bring down futures prices for grain commodities. I use the BID value from the given XML for the futures price for a given month, but I do not see any field that represents when that bid is from. A separate user has given me a screenshot of the Time & Sales screen which seems to have a timestamp down to the millisecond for all activity, so I imagine the field is available. I'm not sure if I'm just not able to identify it, or if it is maybe locked from me at this time?

rkd-apirkdfieldscommoditiestimestamp
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
52.9k 136 44 63

You can try the QUOTIM_MS field. It returns a number of milliseconds since midnight. Therefore, you need to convert it to time with the following formula.

int msec = QUOTIM_MS%1000;
int seconds = (((int)(QUOTIM_MS/1000)) % 60); 
int minutes = (((int)(QUOTIM_MS/60000)) % 60); 
int hours = (((int)(QUOTIM_MS/3600000)) % 24); 

35984451 is converted to 09:59:44.451.


quotim-ms.png (5.4 KiB)
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.

I don't seem to have a QUOTIM_MS field in the XML I receive back from the API when I make a request. Even outside of my code using the website that field just does not seem to be available to me. I can request a QUOTIM field, but nothing is actually returned as per my image: cc1response.png

Is it possible this field is locked to me based on my permissions with Thomson Reuters?

cc1response.png (20.4 KiB)
Upvotes
16.7k 42 12 19

Hi @cbernardin, The fields are not locked based on permission, but you can restrict the number of fields an application wants to receive in the response.

In your application you are probably not asking for QUOTIM_MS, as one of the requested fields in addition to usual CF_BID, CF_ASK etc.

Here is the request snippet in NodeJS using the JSON request format. Something similar can also be done in the XML format as well:

"RetrieveItem_Request_3" : {
                
"TrimResponse" : false,
"ItemRequest" : [{
"RequestKey" : [{
"Name" : ric,
"NameType" : "RIC"
}
],
"Fields": "CF_LAST:CF_HIGH:CF_LOW:CF_BID:CF_ASK:CF_YIELD:CF_SOURCE:CF_SRC_PAGE:CF_LOTSIZE:CF_DATE:CF_TIME:CF_TICK:CF_NETCHNG:CF_EXCHNG:CF_VOLUME:CF_CLOSE:CF_OPEN:CF_NAME:CF_CURRENCY:QUOTIM_MS",
"Scope" : "List",
"ProvideChainLinks" : true
}
]
}

and the JSON response from TRKD (including Quote time in milliseconds):

[{
                
"Item": [{
"RequestKey": {
"Name": "Cc1",
"Service": "IDN",
"NameType": "RIC"
},
"QoS": {
"TimelinessInfo": {
"Timeliness": "REALTIME",
"TimeInfo": 0
},
"RateInfo": {
"Rate": "TICK_BY_TICK",
"TimeInfo": 3000
}
},
"Status": {
"StatusMsg": "OK",
"StatusCode": 0
},
"Fields": {
"Field": [{
"DataType": "Int64",
"Name": "QUOTIM_MS",
"Int64": 62023140
}, {
"DataType": "Double",
"Name": "CF_ASK",
"Double": 367.75
}, {
"DataType": "Double",
"Name": "CF_BID",
"Double": 367.5
}, {
"DataType": "Double",
"Name": "CF_CLOSE",
"Double": 367.5
}, {
"DataType": "Utf8String",
"Name": "CF_DATE",
"Utf8String": "03 OCT 2018"
}, {
"DataType": "Utf8String",
"Name": "CF_EXCHNG",
"Utf8String": "CBT"
}, {
"DataType": "Double",
"Name": "CF_HIGH",
"Double": 369
}, {
"DataType": "Double",
"Name": "CF_LAST",
"Double": 367.5
}, {
"DataType": "Double",
"Name": "CF_LOTSIZE",
"Double": 5000
}, {
"DataType": "Double",
"Name": "CF_LOW",
"Double": 366
}, {
"DataType": "Double",
"Name": "CF_NETCHNG",
"Double": 0
}, {
"DataType": "Double",
"Name": "CF_OPEN",
"Double": 367.75
}, {
"DataType": "Utf8String",
"Name": "CF_SOURCE",
"Utf8String": "CBT"
}, {
"DataType": "Utf8String",
"Name": "CF_TICK",
"Utf8String": "⇧"
}, {
"DataType": "Utf8String",
"Name": "CF_TIME",
"Utf8String": "17:13:43"
}, {
"DataType": "Int64",
"Name": "CF_VOLUME",
"Int64": 82663
}, {
"DataType": "Utf8String",
"Name": "CF_NAME",
"Utf8String": "CORN DEC8"
}, {
"DataType": "Utf8String",
"Name": "CF_CURRENCY",
"Utf8String": "USc"
}
]
}
}
]
}
]

Let me know if you have additional questions.

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.

Thank you, I am now able to get the field to return. My issue was that I did not notice that I needed to set the Scope field to List otherwise it would just ignore the list I was passing in.

So now that I've got it returning the field, it seems to be working for every RIC except 0#1MWE: Is there a reason this RIC symbol would not have this field returned when it is requested?

Upvotes
16.7k 42 12 19

Content questions can be asked by calling Thomson Reuters Helpdesk, or online at: https://mytr.thomsonreuters.com/content/mytr/en/signin.html.

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.