Skip to main content
Glama

Controtto

by contre95
isolatedComponents.go1.07 kB
package rest import ( "controtto/src/app/querying" "controtto/src/domain/pnl" "slices" "github.com/gofiber/fiber/v2" ) func pairTape(tpq querying.PairsQuerier) func(*fiber.Ctx) error { return func(c *fiber.Ctx) error { id := c.Params("id") req := querying.GetPairReq{ TPID: id, WithCalculations: false, } resp, err := tpq.GetPair(req) if err != nil { return c.Render("toastErr", fiber.Map{ "Title": "Error", "Msg": err, }) } if resp.Pair.BaseAsset.Type == pnl.Stock { } return c.Render("pairTape", fiber.Map{ "Pair": resp.Pair, }) } } func pairChart(tpq querying.PairsQuerier) func(*fiber.Ctx) error { return func(c *fiber.Ctx) error { id := c.Params("id") req := querying.GetPairReq{ TPID: id, WithCalculations: false, } resp, err := tpq.GetPair(req) if err != nil { return c.Render("toastErr", fiber.Map{ "Title": "Error", "Msg": err, }) } slices.Reverse(resp.Pair.Trades) return c.Render("pairChart", fiber.Map{ "Pair": resp.Pair, }) } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/contre95/controtto'

If you have feedback or need assistance with the MCP directory API, please join our Discord server