Learn R Programming

TFX (version 0.1.0)

ParseTrueFX: Parse TrueFX(tm) response

Description

Parse the results of a TrueFX(tm) query.

Usage

ParseTrueFX(x, pretty = TRUE)

Arguments

x
The response from a TrueFX(tm) request. Can be any of the three formats: default, csv or html
pretty
logical. If TRUE (Default), output will be converted to a data.frame and columns will be converted from character to the appropriate classes and combined.

Value

By default, a data.frame is returned that has columns “Bid.Price”, “Ask.Price”, “High”, “Low”, and “TimeStamp”. If called with pretty=FALSE, a list of character vectors -- named “Symbol”, “BidBigNumber”, “BidPip”, “OfferBigNumber”, “OfferPip”, “High”, “Low”, “TimeStamp” -- will be returned.If the format is “html”, there will also be an “Open” column

Details

This function will parse the results of a call to QueryTrueFX. It can handle any of the three TrueFX(tm) response formats: “default”, “csv”, or “html”. By default, it will convert the results into a nicely formatted data.frame. If, called with pretty=FALSE, a list of strings will be returned.

All times are in GMT

References

http://www.truefx.com/dev/data/TrueFX_MarketDataWebAPI_DeveloperGuide.pdf

See Also

QueryTrueFX, TrueFXRef

Examples

Run this code
# x <- QueryTrueFX()  #Cannot run this if no internet connection
x <- paste0("EUR/USDUSD/JPY1.31#81.9085661.31#81.9435941.31990#81.6421.3182",
            "1#81.50413351311514701335131150004")
ParseTrueFX(x)
ParseTrueFX(x, pretty=FALSE)

Run the code above in your browser using DataLab