Timestamps & Sorting

Timestamp Formats

Absolute

Unix milliseconds (13 digits) or Unix seconds (10 digits); the value's size selects the unit. RFC 3339 and YYYY-MM-DD are also accepted.

?timeGte=1696630274000&timeLte=1696716674000
?timeGte=1696630274&timeLte=1696716674
?timeGte=2023-10-06T22:11:14Z&timeLte=2023-10-07

Relative Duration

?timeLast=24h

timeLast is a relative window that ends now. Write it as a number and one unit, such as 15m, 24h, 7d or 1M. The units are s (seconds), m (minutes), h (hours), d (days), w (weeks), M (months of 30 days) and y (years of 365 days). Units are case-sensitive, so 1m is one minute and 1M is one month.

Danger
On endpoints that also accept timeGte/timeLte, combining timeLast with either returns HTTP 400.

Sorting

  • sortKey — time (default), value, usd
  • sortDir — desc (default), asc

Example:

GET /transfers?sortKey=usd&sortDir=desc&timeLast=24h

Time Handling Notes

  • All timestamps are UTC
  • timeLast is calculated from server time at request
  • /portfolio time parameter is truncated to UTC midnight