ReturnTradeHistory: Returns the past 200 trades for a given market, or up to...

Description Usage Arguments Value Examples

Description

Returns the past 200 trades for a given market, or up to 50,000 trades inside a specified input date range interval.

Usage

1
ReturnTradeHistory(theObject, pair = "USDT_BTC", from = NULL, to = NULL)

Arguments

theObject

The public client API object on which the function should be called.

pair

length-one character vector - The currencypair for which trade history information should be fetched.

from

POSIXct (or NULL) - starting timestamp for optional date range interval. if from != NULL: from must be < 'to' & from must be >= (to - 1 year)

to

POSIXct (or NULL) - ending timestamp for optional date range interval.

Value

an xts object containing historical trade information

Rows - Information for one specific trade. Columns - globalTradeID, tradeID, type, rate, amount, total

if from == NULL: Receive information for last 200 trades before 'to' if to == NULL: Ending timestamp for daterange will be set to Sys.time()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Sys.setenv(tz = "UTC")
poloniex.public <- PoloniexPublicAPI()
pair   <- "BTC_NXT"
from   <- as.POSIXct("2017-02-01 00:00:00 UTC")
to     <- as.POSIXct("2017-02-02 00:00:00 UTC")

trades.data <- ReturnTradeHistory(theObject = poloniex.public,
                                  pair      = pair,
                                  from      = from,
                                  to        = to)

PoloniexR documentation built on July 11, 2017, 1:02 a.m.