aboutsummaryrefslogtreecommitdiff
path: root/api/routes.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/routes.go')
-rw-r--r--api/routes.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/api/routes.go b/api/routes.go
index d7e712c..385db9a 100644
--- a/api/routes.go
+++ b/api/routes.go
@@ -41,6 +41,7 @@ var Groups = []Group{
41 []Route{ 41 []Route{
42 {"GET", []gin.HandlerFunc{GetMarketConfig}, "/:name"}, 42 {"GET", []gin.HandlerFunc{GetMarketConfig}, "/:name"},
43 {"POST", []gin.HandlerFunc{UpdateMarketConfig}, "/:name/update"}, 43 {"POST", []gin.HandlerFunc{UpdateMarketConfig}, "/:name/update"},
44 {"GET", []gin.HandlerFunc{GetMarketBalance}, "/:name/balance"},
44 }, 45 },
45 }, 46 },
46} 47}
@@ -111,6 +112,16 @@ func GetMarketConfig(c *gin.Context) {
111 RunQuery(query, c) 112 RunQuery(query, c)
112} 113}
113 114
115func GetMarketBalance(c *gin.Context) {
116 query := &MarketBalanceQuery{}
117
118 query.In.User = GetUser(c)
119 query.In.Market = c.Param("name")
120 query.In.Currency = "BTC"
121
122 RunQuery(query, c)
123}
124
114func UpdateMarketConfig(c *gin.Context) { 125func UpdateMarketConfig(c *gin.Context) {
115 query := &UpdateMarketConfigQuery{} 126 query := &UpdateMarketConfigQuery{}
116 127