ParseTrueFX: Parse TrueFX(tm) response

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/TFX.R

Description

Parse the results of a TrueFX(tm) query.

Usage

1

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.

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

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

Author(s)

Garrett See

References

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

See Also

QueryTrueFX, TrueFXRef

Examples

1
2
3
4
5
# 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)

TFX documentation built on May 2, 2019, 5:04 p.m.