MCPcopy Create free account
hub / github.com/NoFxAiOS/nofx / handleVergexSignalLab

Method handleVergexSignalLab

api/handler_vergex.go:38–55  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

36}
37
38func (s *Server) handleVergexSignalLab(c *gin.Context) {
39 client, ok := s.newVergexClientForRequest(c)
40 if !ok {
41 return
42 }
43 body, err := client.GetSignalLab(context.Background(), vergex.Query{
44 MarketType: withDefault(strings.TrimSpace(c.Query("marketType")), vergex.DefaultMarketType),
45 Symbol: strings.TrimSpace(c.Query("symbol")),
46 Chain: strings.TrimSpace(c.Query("chain")),
47 LiqBand: strings.TrimSpace(c.Query("liqBand")),
48 })
49 if err != nil {
50 logger.Warnf("Vergex signal-lab failed: %v", err)
51 c.JSON(http.StatusBadGateway, gin.H{"error": err.Error()})
52 return
53 }
54 c.Data(http.StatusOK, "application/json; charset=utf-8", body)
55}
56
57func (s *Server) handleVergexCostLiquidationHeatmap(c *gin.Context) {
58 client, ok := s.newVergexClientForRequest(c)

Callers

nothing calls this directly

Calls 5

WarnfFunction · 0.92
withDefaultFunction · 0.85
GetSignalLabMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected