2024-08-24 05:54:00 +00:00
|
|
|
package xmaker
|
|
|
|
|
|
|
|
import "github.com/prometheus/client_golang/prometheus"
|
|
|
|
|
2024-08-24 13:17:32 +00:00
|
|
|
var openOrderBidExposureInUsdMetrics = prometheus.NewGaugeVec(
|
2024-08-24 05:54:00 +00:00
|
|
|
prometheus.GaugeOpts{
|
2024-08-24 13:17:32 +00:00
|
|
|
Name: "xmaker_open_order_bid_exposure_in_usd",
|
2024-08-24 05:54:00 +00:00
|
|
|
Help: "",
|
2024-08-24 13:17:32 +00:00
|
|
|
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"})
|
|
|
|
|
|
|
|
var openOrderAskExposureInUsdMetrics = prometheus.NewGaugeVec(
|
|
|
|
prometheus.GaugeOpts{
|
|
|
|
Name: "xmaker_open_order_ask_exposure_in_usd",
|
|
|
|
Help: "",
|
|
|
|
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"})
|
2024-08-24 05:54:00 +00:00
|
|
|
|
|
|
|
var makerBestBidPriceMetrics = prometheus.NewGaugeVec(
|
|
|
|
prometheus.GaugeOpts{
|
|
|
|
Name: "xmaker_maker_best_bid_price",
|
|
|
|
Help: "",
|
|
|
|
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"})
|
|
|
|
|
|
|
|
var makerBestAskPriceMetrics = prometheus.NewGaugeVec(
|
|
|
|
prometheus.GaugeOpts{
|
|
|
|
Name: "xmaker_maker_best_ask_price",
|
|
|
|
Help: "",
|
|
|
|
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"})
|
|
|
|
|
|
|
|
var numOfLayersMetrics = prometheus.NewGaugeVec(
|
|
|
|
prometheus.GaugeOpts{
|
|
|
|
Name: "xmaker_num_of_layers",
|
|
|
|
Help: "",
|
|
|
|
}, []string{"strategy_type", "strategy_id", "exchange", "symbol"})
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
prometheus.MustRegister(
|
2024-08-24 13:17:32 +00:00
|
|
|
openOrderBidExposureInUsdMetrics,
|
|
|
|
openOrderAskExposureInUsdMetrics,
|
2024-08-24 05:54:00 +00:00
|
|
|
makerBestBidPriceMetrics,
|
|
|
|
makerBestAskPriceMetrics,
|
|
|
|
numOfLayersMetrics,
|
|
|
|
)
|
|
|
|
}
|