mirror of
https://github.com/luxfi/broker.git
synced 2026-09-24 00:25:18 +00:00
Same issue as snapshots — Alpaca sandbox returns 404 for
/v1beta3/crypto/us/{sym}/bars but works with
/v1beta3/crypto/us/bars?symbols={sym}. Also handle the wrapped
response format {"bars":{"BTC/USD":[...]}} vs stock {"bars":[...]}.
17 lines
447 B
Go
17 lines
447 B
Go
package compliance
|
|
|
|
import "net/http"
|
|
|
|
// dashboardHandler holds dashboard HTTP handler state.
|
|
type dashboardHandler struct {
|
|
store ComplianceStore
|
|
}
|
|
|
|
func (h *dashboardHandler) handleDashboard(w http.ResponseWriter, r *http.Request) {
|
|
writeJSON(w, http.StatusOK, h.store.ComputeDashboard())
|
|
}
|
|
|
|
func (h *dashboardHandler) handleESignDashboard(w http.ResponseWriter, r *http.Request) {
|
|
writeJSON(w, http.StatusOK, h.store.ComputeESignStats())
|
|
}
|