For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 0

Customised functions on streamed data

I tried the ek.StreamingPrices to retrieve some streaming prices and it works.

Now I would like to construct a customised index based on the those price, and would like to see the index going up and down based on the movement of streamed prices.

For example, i would like to have a stupid but simple index as AA = EURUSD rate + 2 * USDCHF rate. I would like to show the value of AA based on streamed prices, so AA is expected to fluctuate as EURUSD and USDCHF are changing all the times.

Any ideas on how to get this done? Thanks.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonstreaming-prices
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.

1 Answer

Upvotes
Accepted
18k 21 12 20

Hi @boyang.liu

I would suggest that you study how to code in Python, here is an example online tutorial.

https://www.w3schools.com/python/


Here is the sample code using StreamingPrices to get EUR= and CHF= then do the calculation on Python code:


ahs.png (72.9 KiB)
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.

Thanks for your quick reply. Yes I am new to Python, will continue to learn more. Also, my I know where can I get a full documentation on the Eikon Data API for Python? I checked the https://docs-developers.refinitiv.com/1596106605746/14684/book/en/index.html , but the ek.StreamPrices seems not included.

Click below to post an Idea Post Idea