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