diff --git a/node/pkg/dal/api/controller.go b/node/pkg/dal/api/controller.go index faad2abdd..60f56dd01 100644 --- a/node/pkg/dal/api/controller.go +++ b/node/pkg/dal/api/controller.go @@ -210,6 +210,14 @@ func (c *Controller) getLatestSubmissionDataSingle(ctx context.Context, symbol s }, nil } +func getSymbols(c *fiber.Ctx) error { + result := []string{} + for key := range ApiController.configs { + result = append(result, key) + } + return c.JSON(result) +} + func getLatestFeeds(c *fiber.Ctx) error { defer func() { _ = db.QueryWithoutResult( diff --git a/node/pkg/dal/api/route.go b/node/pkg/dal/api/route.go index 251b10403..305fcea99 100644 --- a/node/pkg/dal/api/route.go +++ b/node/pkg/dal/api/route.go @@ -8,6 +8,7 @@ import ( func Routes(router fiber.Router) { api := router.Group("/dal") + api.Get("/symbols", getSymbols) api.Get("/latest-data-feeds/all", getLatestFeeds) api.Get("/latest-data-feeds/:symbol", getLatestFeed) api.Get("/ws", websocket.New(ApiController.handleWebsocket))