Add /api/kraken-minute endpoint and limit kraken-hour to 24 rows
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -155,10 +155,15 @@ 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
|
||||
-- :name get-kraken-hour-latest-24 :? :*
|
||||
-- :doc Get the 24 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
|
||||
FROM kraken_hour ORDER BY ts DESC LIMIT 24
|
||||
|
||||
-- :name get-kraken-minute-latest-60 :? :*
|
||||
-- :doc Get the 60 most recent Kraken minute candles
|
||||
SELECT ts, open, high, low, close, vwap, volume, trade_count, created_at
|
||||
FROM kraken_minute ORDER BY ts DESC LIMIT 60
|
||||
|
||||
-- :name upsert-kraken-minute! :! :n
|
||||
-- :doc Upsert a Kraken minute OHLC candle
|
||||
|
||||
Reference in New Issue
Block a user