Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 1

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apistreaming-prices
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.

1 Answer

· Write an Answer
Upvotes
Accepted
18.2k 21 13 21

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 512.0 KiB each and 1.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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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