Description Usage Arguments Details Value Note Author(s) References See Also Examples
Create a session with TrueFX(tm) and request market data.
1 2 3 4 5 | ConnectTrueFX(currency.pairs, username, password,
qualifier = "default", format, snapshot = FALSE)
QueryTrueFX(session, parse.response = TRUE,
pretty = TRUE, reconnect = TRUE)
|
currency.pairs |
character vector, or comma
delimited string of Symbols (ISO names) of currency
pairs. (e.g. |
username |
character. A registered TrueFX(tm) user name; required to establish an authenticated session. |
password |
character. A registered TrueFX(tm) password; required to establish an authenticated session |
qualifier |
any string; required to establish an authenticated session. (“default” by default) |
format |
One of “default”, “csv”, or “html”. Indicates the format for the HTTP Response. |
snapshot |
logical. No incremental updates if
|
session |
a |
parse.response |
logical. Should the results be
passed through |
pretty |
logical. Passed to |
reconnect |
logical. If the TFXsession has timed out, should it be reconnected? |
If no 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.
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
the formal arguments start with the same lowercase letter as their corresponding TrueFX(tm) Market Data Web Query Parameters
Garrett See
http://www.truefx.com/dev/data/TrueFX_MarketDataWebAPI_DeveloperGuide.pdf
http://truefx.com/?page=downloads to see for which pairs TrueFX(tm) provides historical data.
ParseTrueFX
, Reconnect
,
TrueFXRef
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.