getTrades {KrakenR}R Documentation

Retrieve Recent Trades Data from Kraken Exchange

Description

This function fetches recent trade data from the Kraken API for a specified trading pair.

Usage

getTrades(pair, since = NULL, count = NULL)

Arguments

pair

A character string specifying the trading pair (e.g., "XTZUSD", "ADAEUR"). This is a required parameter.

since

A character string for a human-readable date-time (e.g., "2024-10-01 12:00:00") or a Unix timestamp. Default is NULL (returns all available trades).

count

An optional integer between 1 and 1000 specifying the number of trades to retrieve. Default is NULL (returns up to 1000 trades).

Value

A data frame containing the recent trade data for the requested trading pair.

Examples

getTrades("XTZUSD")
getTrades("XTZUSD", since = "2024-10-01")
getTrades("XTZUSD", since = "2024-10-01 00:00:00", count = 100)

[Package KrakenR version 1.0.0 Index]