(c *gin.Context)
| 36 | } |
| 37 | |
| 38 | func (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 | |
| 57 | func (s *Server) handleVergexCostLiquidationHeatmap(c *gin.Context) { |
| 58 | client, ok := s.newVergexClientForRequest(c) |
nothing calls this directly
no test coverage detected