
Last chance! 50% off unlimited learning
Sale ends in
ConnectTrueFX(currency.pairs, username, password, qualifier = "default", format, snapshot = FALSE)
QueryTrueFX(session, parse.response = TRUE, pretty = TRUE, reconnect = TRUE)
"EUR/USD,AUD/USD"
, or
c("EUR/USD", "AUD/USD")
). If missing
or if
nchar(currency.pairs) < 1
, the Symbols of all
currency pairs for which TrueFX(tm) provides historical
data will be used (see references section).TRUE
TFXsession
object created by
ConnectTrueFX
.ParseTrueFX
before returning?ParseTrueFX
.
Indicates whether to format the parsed results and
convert to data.frame
. Ignored if
parse.response
is not TRUE
ConnectTrueFX
returns a TFXsession
object
that is a TrueFX(tm) server-generated session ID returned
with a successful authenticated session request. It is a
colon delimited string with username, password,
qualifier, and the time (in milliseconds) that the
session was created.QueryTrueFX
returns the results of a TrueFX(tm)
request using
currency.pairs
are provided to
ConnectTrueFX
, the 15 pairs for which TrueFX(tm)
offers historical data will be used. Note that only the
first 10 of these are returned in an unauthenticated
session. ConnectTrueFX
will create a TFXsession
classed object that can be used in calls to
QueryTrueFX
to request market data.
Of the three format
s, “default” is the most
timely (updates first)and “csv” is the most
delayed (updates last)
the “csv” and “html” formats have the “High” and “Low” columns backwards. (“default” does not). This may be corrected for in a future release if the TrueFX(tm) Web service doesn't correct it first.
http://truefx.com/?page=downloads to see for which pairs TrueFX(tm) provides historical data.
ParseTrueFX
, Reconnect
,
TrueFXRef
## Cannot run these because there may not be an internet connection
## Not run:
# QueryTrueFX() #unauthenticated
# QueryTrueFX(pretty=FALSE)
# QueryTrueFX(parse=FALSE)
#
# ## For authenticated session, you must have a username and password (it's free).
# ## Use your username and passward instead of JSTrader and Ou812
# id <- ConnectTrueFX('EUR/USD,GBP/USD', username='JSTrader', password='Ou812')
# QueryTrueFX(id)
# QueryTrueFX(ConnectTrueFX(username='JSTrader', password='Ou812',
# format='csv'), parse=FALSE)
#
# QueryTrueFX(ConnectTrueFX(username='JSTrader', password='Ou812',
# format='html'), parse=FALSE)
#
# ## If you have shiny installed
# ## install.packages("shiny", repos="http://rstudio.org/_packages")
# library(shiny)
# runGist("4122626")
# ## view the code for this shiny app at
# #browseURL("https://gist.github.com/4122626")
# ## End(Not run)
Run the code above in your browser using DataLab