Show 30-minute candles on the last-24-hours chart
pull-request / validate (pull_request) Successful in 2m34s

This commit is contained in:
2026-11-03 10:32:23 +01:00
parent 803df14813
commit 0a27d01f12
3 changed files with 30 additions and 2 deletions
+7 -2
View File
@@ -73,7 +73,7 @@ HOME_HTML = """\
</div>
<div class="mt-4">
<div class="bg-white rounded-2xl shadow-sm border border-gray-200 p-6">
<p class="text-sm text-gray-500 mb-3">24h Candles (1h)</p>
<p class="text-sm text-gray-500 mb-3">24h Candles (30m)</p>
<div id="chart-hour" style="height:300px"></div>
</div>
</div>
@@ -170,7 +170,7 @@ HOME_HTML = """\
}
initChart('chart-minute', '/api/kraken-minute', 60 * 1000);
initChart('chart-hour', '/api/kraken-hour', 5 * 60 * 1000, updateMidnightPrice);
initChart('chart-hour', '/api/kraken-half-hour', 5 * 60 * 1000, updateMidnightPrice);
})();
</script>
</body>
@@ -233,6 +233,11 @@ async def _proxy_btcdata_json(path: str) -> JSONResponse:
)
@app.get("/api/kraken-half-hour")
async def kraken_half_hour():
return await _proxy_btcdata_json("/api/kraken-half-hour")
@app.get("/api/kraken-hour")
async def kraken_hour():
return await _proxy_btcdata_json("/api/kraken-hour")