[R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API

G See gsee000 at gmail.com
Mon Dec 3 17:41:36 CET 2012


Aw. That's a shame.  What version of shiny and websockets are you using?

Maybe try:
   devtools::install_github('shiny', 'rstudio')

It works for me on linux with the following sessionInfo

> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=C                 LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] bitops_1.0-4.1 TFX_0.1.1      shiny_0.1.12

loaded via a namespace (and not attached):
[1] caTools_1.13     digest_0.6.0     RJSONIO_1.0-1    tools_2.15.2
[5] websockets_1.1.6 XML_3.95-0.1     xtable_1.7-0


Garrett

On Mon, Dec 3, 2012 at 10:33 AM, Dennis Lee <dennislwm at yahoo.com.au> wrote:
>
>
> I copied and pasted the code for Shiny app, but it doesn't update the FX quotes
> every 750 ms. I tried it on Firefox and Chrome.
>
>
>
> ________________________________
>  From: G See <gsee000 at gmail.com>
> To: r-sig-finance <r-sig-finance at r-project.org>
> Sent: Monday, 3 December 2012 8:57 PM
> Subject: [R-SIG-Finance] Introducing TFX: An R Interface to the TrueFX Web API
>
> [sorry for the previous HTML e-mail. Gmail seems to think that's what
> I meant to do]
>
> Hello all,
>
> I'd like to introduce the TFX package which I recently published to CRAN.
>
> It is a simple R interface to the free TrueFX Web API. You can use it
> to get real-time quotes with millisecond resolution and fractional-pip
> bid/ask spreads for 26 currency pairs.
>
> There is an RPub overview of the TFX package available here:
> http://rpubs.com/gsee/TFX
>
> The shiny package (http://www.rstudio.com/shiny/) has made the TFX
> package more relevant (at least to me). You can see a demo of using
> TFX with shiny by running the following code which will open a browser
> window and display FX quotes that update every 750 milliseconds:
>
> # install.packages('shiny', repos=c('http://rstudio.org/_packages',
> # getOption('repos'))
> library(shiny)
> runGist("4122626")
> #--------------------------
> The code for the above shiny app can be viewed or downloaded from
> https://gist.github.com/4122626
>
> I've also had a little bit of success creating real-time streaming
> charts using svSockets, following the video
> (http://www.youtube.com/watch?v=rvT8XThGA8o) on the data.table
> homepage (http://datatable.r-forge.r-project.org/) as a template and
> using TFX as the data source.
>
> Finally, TrueFX provides historical tick data for 15 currency pairs
> going back to May 2009 (http://truefx.com/?page=downloads). There is a
> script in the inst/parser directory of the FinancialInstrument package
> (www.tinyurl.com/DownloadTrueFX) that can be used to download all of
> that data to disk in a format that FinancialInstrument::getSymbols.FI
> can easily read. This script is not intended to be used on Windows.
>
> I have no affiliation with TrueFX.
>
> Hope it's useful,
> Garrett
>
> P.S. The RPub (http://rpubs.com/gsee/TFX) is also included as a
> vignette in the R-Forge version (installable with
> install.packages("TFX", repos="http://r-forge.r-project.org"). As
> outlined in the NEWS file, the only updates in the R-Forge version are
> aesthetic: there are better error messages, a print.TFXsession method,
> and Reconnect and Disconnect no longer print the returned TFXsession
> object.
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.



More information about the R-SIG-Finance mailing list