ParseTrueFX: Parse TrueFX response

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

View source: R/TrueFX.R

Description

Parse the results of a TrueFX query.

Usage

1

Arguments

x

The response from a TrueFX 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 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

Note

Although the TrueFX Market Data Web API Developer Guide indicates that both the “csv” and “html” formats include values for “Open”, only the “html” format actually does.

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)

TrueFX documentation built on May 2, 2019, 4:47 p.m.

Related to ParseTrueFX in TrueFX...