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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user