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
1 1 1 0

How can I get the data of Order Book using Eikon Data Api in R Studio?


  • I already installed library("eikonapir")
  • I already have the key (set_app_id)
  • I want the information contained in the image below:
eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apir-studioorder-book
screenshot-1.png (74.1 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.

Upvote
Accepted
5.9k 21 2 6

Hi @beatriz.assis, for windows operating system please use the following code, line by line, in your R interpreter. This will import the 1st row of data that you are looking for. Simply change the '1's with '2's or other such numbers if you would like more data (e.g.: changing 'B_NPLRS_1' to 'B_NPLRS_2'). If you are using the Mac OS Eikon Standalone proxy - use port 36036 (include the L suffix). Please do not hesitate to revert to this chain if you have any relevant questions or to let us know if this is the answer you were looking for.

If you would like more such data in your list, don't hesitate to use the Data Item Browser (that you can find typing 'DIB' in your Refinitiv Workspace Search Bar) to find more fields to use in the code below.


install.packages("devtools")
library(devtools)
install_github("ahmedmohamedali/eikonapir")
library(eikonapir)
eikonapir::set_proxy_port(9000L)
eikonapir::set_app_id('Your App Key Here')
df <- get_data(list("SHOW3.SAO"), list("B_NPLRS_1", "B_QTY_1", "B_PRICE_1", "A_PRICE_1", "A_QTY_1", "A_NPLRS_1"))
colnames(df) <- c('Instrument','Bid BrokerID',"Bid Size", "Bid Price", "Ask Price", "Ask Size", "Ask Broker ID")
print(df)
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
1 1 1 0

Hii @jonathan.legrand! I tried to use teh code that you sent me, but it showed the error below. Can you help me? Error:

Error in curl::curl_fetch_memory(url, handle = handle) :

Failed to connect to localhost port 9000: Connection refused

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.

Upvote
5.9k 21 2 6

Hi @beatriz.assis,

Your Eikon/Refinitiv Workspace needs to be running in the background. Please ensure that it is on when using the code above.

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
1 1 1 0

Hii,@jonathan.legrand!

Thank you for your support, I was abble to get the information.

I'd like to know if its possible to get the offer book for futures.

list('DIJK21') for example.

Sincerely,

Beatriz Assis

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.

You can view market by price using the RIC 'DIJK21m' and market by order using the RIC ''DIJK21d'. Display these RICs in a Quote app in Eikon application to get an understanding of the data structure within these real-time records.

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.