mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
add maker metrics
This commit is contained in:
parent
bd76a0e254
commit
60c7dfea29
36
pkg/metrics/maker.go
Normal file
36
pkg/metrics/maker.go
Normal file
|
@ -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,
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user