Note that there are some explanatory texts on larger screens.

plurals
  1. POLive price updates in R-Bloomberg price subcriptions
    text
    copied!<p>I am using the RBloomberg library for live and historical price data, but I would like to know if it is possible for a variable to update its live pricing continuously. Right now:</p> <pre><code>&gt; library(RBloomberg) Loading required package: rJava &gt; conn &lt;- blpConnect() R version 2.12.2 (2011-02-25) rJava Version 0.8-8 RBloomberg Version 0.4-148 Java environment initialized successfully. Looking for most recent blpapi3.jar file... Adding C:\blp\API\APIv3\JavaAPI\v3.4.1.3\lib\blpapi3.jar to Java classpath Bloomberg API Version 3.4.1.3 &gt; bdp(conn, "EURUSD Curncy", "Last Price") Last Price EURUSD Curncy 1.4575 </code></pre> <p>So as you can see I can get the EURUSD exchange rate easily. But how can I make a variable <em>subscribe</em> to the EURUSD Curncy Last_price so that the variable updates itself in real time for the current value, rather than always re-running bdp(conn, "EURUSD Curncy", "last price")? Could I do something like this?</p> <pre><code>&gt; eurusd &lt;- bdp(conn, "EURUSD Curncy", "Last Price") &gt; eurusd Last Price EURUSD Curncy 1.4575 </code></pre> <p>so that whenever I type eurusd I get the <em>latest</em> exchange rate and not the one from when I initialised the variable? Right now this does not seem to work (just has the same value in it all the time even after the exchange rate has changed). </p> <pre><code>&gt; eurusd Last Price EURUSD Curncy 1.4575 &gt; eurusd Last Price EURUSD Curncy 1.4575 &gt; eurusd &lt;- bdp(conn, "EURUSD Curncy", "Last Price") &gt; eurusd Last Price EURUSD Curncy 1.4578 &gt; </code></pre> <p>Basically, can R do what Excel does, which is to have a cell which always has the latest value of EURUSD in it, without constantly running bdp to update the variable?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload