Add daily BTC/USD endpoint with historical caching and Swagger UI
pr / test (pull_request) Successful in 58s
pr / test (pull_request) Successful in 58s
This commit is contained in:
@@ -47,6 +47,26 @@ SET open = EXCLUDED.open,
|
||||
-- :doc Get the most recent Kraken daily candle by timestamp
|
||||
SELECT ts FROM kraken_day ORDER BY ts DESC LIMIT 1
|
||||
|
||||
-- :name get-kraken-day-by-ts :? :1
|
||||
SELECT ts, open, high, low, close, vwap, volume, trade_count
|
||||
FROM kraken_day WHERE ts = :ts
|
||||
|
||||
-- :name get-kraken-day-history-by-ts :? :1
|
||||
SELECT ts, open, high, low, close, vwap, volume, trade_count
|
||||
FROM kraken_day_history WHERE ts = :ts
|
||||
|
||||
-- :name upsert-kraken-day-history! :! :n
|
||||
INSERT INTO kraken_day_history (ts, open, high, low, close, vwap, volume, trade_count)
|
||||
VALUES (:ts, :open, :high, :low, :close, :vwap, :volume, :trade-count)
|
||||
ON CONFLICT (ts) DO UPDATE
|
||||
SET open = EXCLUDED.open,
|
||||
high = EXCLUDED.high,
|
||||
low = EXCLUDED.low,
|
||||
close = EXCLUDED.close,
|
||||
vwap = EXCLUDED.vwap,
|
||||
volume = EXCLUDED.volume,
|
||||
trade_count = EXCLUDED.trade_count
|
||||
|
||||
-- :name insert-strike-price! :! :n
|
||||
-- :doc Insert a Strike ticker snapshot
|
||||
INSERT INTO strike_price (rates, quote_sats) VALUES (:rates, :quote-sats)
|
||||
|
||||
Reference in New Issue
Block a user