Add /api/kraken-hour endpoint returning last 60 hourly candles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 13:33:08 +01:00
co-authored by Claude Opus 4.6
parent 44bb9a68d4
commit 42454646bb
2 changed files with 24 additions and 1 deletions
+5
View File
@@ -155,6 +155,11 @@ SELECT id, event_id, occurred_at, exchange, fiat_amount, fiat_currency,
FROM deposits
ORDER BY occurred_at DESC, id DESC
-- :name get-kraken-hour-latest-60 :? :*
-- :doc Get the 60 most recent Kraken hourly candles
SELECT ts, open, high, low, close, vwap, volume, trade_count, created_at
FROM kraken_hour ORDER BY ts DESC LIMIT 60
-- :name upsert-kraken-minute! :! :n
-- :doc Upsert a Kraken minute OHLC candle
INSERT INTO kraken_minute (ts, open, high, low, close, vwap, volume, trade_count)