diff --git a/pkg/metrics/maker.go b/pkg/metrics/maker.go new file mode 100644 index 000000000..ace54ebba --- /dev/null +++ b/pkg/metrics/maker.go @@ -0,0 +1,36 @@ +package metrics + +import "github.com/prometheus/client_golang/prometheus" + +var OpenOrderBidExposureInUsdMetrics = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "bbgo_maker_open_order_bid_exposure_in_usd", + Help: "", + }, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) + +var OpenOrderAskExposureInUsdMetrics = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "bbgo_maker_open_order_ask_exposure_in_usd", + Help: "", + }, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) + +var MakerBestBidPriceMetrics = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "bbgo_maker_maker_best_bid_price", + Help: "", + }, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) + +var MakerBestAskPriceMetrics = prometheus.NewGaugeVec( + prometheus.GaugeOpts{ + Name: "bbgo_maker_maker_best_ask_price", + Help: "", + }, []string{"strategy_type", "strategy_id", "exchange", "symbol"}) + +func init() { + prometheus.MustRegister( + OpenOrderAskExposureInUsdMetrics, + OpenOrderBidExposureInUsdMetrics, + MakerBestAskPriceMetrics, + MakerBestBidPriceMetrics, + ) +}