getSpreads {KrakenR} | R Documentation |
This function fetches recent spread data from the Kraken API for a specified trading pair.
getSpreads(pair, since = NULL, timestamp = FALSE)
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. |
timestamp |
A logical value. If TRUE, the function returns both the spreads data frame and the last timestamp for future polling. If FALSE (default), it returns only the data frame. |
A data frame containing the spread data or a list containing the data frame and the last timestamp.
getSpreads("XTZUSD")
getSpreads("ADAEUR", since = "2024-10-01 00:00:00", timestamp = TRUE)