Add datetime field to kraken-hour and kraken-minute API responses

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 13:41:52 +01:00
co-authored by Claude Opus 4.6
parent b6c8745a86
commit bba9652ced
@@ -144,8 +144,13 @@
:headers {"Content-Type" "application/json"}
:body (json/write-str {:error "Invalid date format, use YYYY-MM-DD"})}))))
(def ^:private ohlc-fmt
(java.time.format.DateTimeFormatter/ofPattern "yyyy-MM-dd HH:mm:ss"))
(defn- ohlc-row->map [r]
{:ts (:ts r)
:datetime (.format (.atOffset (java.time.Instant/ofEpochSecond (:ts r))
java.time.ZoneOffset/UTC) ohlc-fmt)
:open (str (:open r))
:high (str (:high r))
:low (str (:low r))