Skip to contents

This function fetches the current server time from the Kraken API in either UNIX timestamp or RFC 1123 format.

Usage

getTime(format = "unix")

Arguments

format

A character string specifying the time format to return. Use "unix" for UNIX timestamp or "rfc" for RFC 1123 format. The default is "unix".

Value

A POSIXct object if format = "unix" or a character string in RFC 1123 format if format = "rfc".

Examples

getTime("unix")
#> [1] "2025-03-13 16:11:16 UTC"
getTime("rfc")
#> [1] "Thu, 13 Mar 25 16:11:16 +0000"