For a deeper look into our Elektron API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Hi @3352edee-c7b3-42de-95ff-77348a2fc138
The Websocket API can be used to consume realtime streaming tick data from a realtime data source such as Elektron.
For historical or reference data you will need to use an alternative data source + API such as DataScope Select - REST API
I would recommend you contact the Refinitiv Helpdesk and raise a Content type query to ascertain which data source (and therefore API) you would need to use.
Hi @3352edee-c7b3-42de-95ff-77348a2fc138
I understand that you spoke to a content specialist who advised that the Corn contractws settlement price for different months can be accessed on Elektron by using different RIC codes.
e.g. CH1=MAR1, CK1=MAY1, CN1=JUL1, CU1=SEP1, CZ1=DEC1 etc.
In view of this you can make a Websocket View Request using the RIC code for the date you are interested in and specify the subset of Fields you wish to request.
{ "ID": 3, "Key": { "Name": "CZ0" }, "View": [ "SETTLE", "SETTLEDATE", "CONTR_MNTH" ] }
So, for example the above Websocket request should return something like:
RECEIVED: [ { "ID": 3, "Type": "Refresh", "Key": { "Service": "ELEKTRON_DD", "Name": "CZ0" }, "State": { "Stream": "Open", "Data": "Ok", "Text": "All is well" }, "Qos": { "Timeliness": "Realtime", "Rate": "JitConflated" }, "PermData": "AwEBkcA=", "SeqNumber": 8624, "Fields": { "CONTR_MNTH": "DEC0", "SETTLE": 416.25, "SETTLEDATE": "2018-12-13" } } ]
You can changed the exact list of fields in the View as per your requirement.
The above request will make a streaming request, i.e. one where you are expecting to receive updates for the RIC as and when they occur. If you are only interested in a Snapshot request, then you should specify Streaming : false in the request message e.g.
{ "ID": 3, "Streaming" : false, "Key": { "Name": "CZ0" }, "View": [ "SETTLE", "SETTLEDATE", "CONTR_MNTH" ] }
The above will ensure you only receive snapshot of the field values at that moment in time. After which the stream will be closed.
Note that if you are going to request multiple RICS then you can make a Batch request.
You can combine a Batch + View to request the required Fields for multiple RICs e.g.
{ "ID": 3, "Streaming" : false, "Key": { "Name": [ "CH0", "CK0", "CN0", "CU0", "CZ0" ] }, "View": [ "SETTLE", "SETTLEDATE", "CONTR_MNTH" ] }
Obviously, before you make any Item requests, you will need to send a Login Request to the server. and ensure a successful Login.
The other thing to note is that if you are requesting individual streaming RICs i.e.not in a Batch, then you will need to use a unique ID for each item you request. You will note that when you make a Batch request, the server allocates a unique ID for each item in the responses you receive back.
Many thanks for this! As i understand it correctly: this settlement request returns the latest known settlement, is that correct? So when requested today before market close, i will get the settle from yesterday, and when requested after market close today, it will be the settlement of today?
Hi @3352edee-c7b3-42de-95ff-77348a2fc138
You are welcome.
Regards the exact settlement value timing, I would refer this back to the Content helpdesk - as they are best placed to answer content related questions.
I would also confirm with the Content team that the SETTLE field is indeed the correct field for your requirements - as there are several Price type fields being returned for those RICs in question.