Curve Monitor is a project inspired by hal.xyz built with Python designed to allow users to receive alerts regarding Curve pool performance to their favorite messaging platforms like Slack and Telegram.
Current Supported Messaging Platforms: Slack, Telegram
Make sure you have Python installed (download). Version 3.9
or higher is required.
Initialize your project by cloning the repository:
git clone https://github.com/PathX-Projects/Curve-Monitor.git
cd Curve-Monitor/
Install/upgrade package requirements:
pip install --upgrade -r requirements.txt
Launch the software using the -m flag to run the module from the __main__.py script.
python3 -m curve_monitor
(Optional - Requires Mac or Linux OS) Run the UNIX CLI tool to manage alerts:
bash unix_cli.sh
Listed below are some of the common examples. If you want to see more code examples , please visit our Recipes repository or visit our hosted API documentation.
func main() {
app := fiber.New()
// GET /api/register
app.Get("/api/*", func(c *fiber.Ctx) error {
msg := fmt.Sprintf("✋ %s", c.Params("*"))
return c.SendString(msg) // => ✋ register
})
// GET /flights/LAX-SFO
app.Get("/flights/:from-:to", func(c *fiber.Ctx) error {
msg := fmt.Sprintf("💸 From: %s, To: %s", c.Params("from"), c.Params("to"))
return c.SendString(msg) // => 💸 From: LAX, To: SFO
})
// GET /dictionary.txt
app.Get("/:file.:ext", func(c *fiber.Ctx) error {
msg := fmt.Sprintf("📃 %s.%s", c.Params("file"), c.Params("ext"))
return c.SendString(msg) // => 📃 dictionary.txt
})
// GET /john/75
app.Get("/:name/:age/:gender?", func(c *fiber.Ctx) error {
msg := fmt.Sprintf("👴 %s is %s years old", c.Params("name"), c.Params("age"))
return c.SendString(msg) // => 👴 john is 75 years old
})
// GET /john
app.Get("/:name", func(c *fiber.Ctx) error {
msg := fmt.Sprintf("Hello, %s 👋!", c.Params("name"))
return c.SendString(msg) // => Hello john 👋!
})
log.Fatal(app.Listen(":3000"))
}