Documentation ¶
Index ¶
- Constants
- func ServeAccountResource(r *mux.Router, accountService interfaces.AccountService)
- func ServeInfoResource(r *mux.Router, walletService interfaces.WalletService, ...)
- func ServeLendingMarketsResource(r *mux.Router, lendingMarketsService interfaces.LendingMarketsService, ...)
- func ServeLendingOhlcvResource(r *mux.Router, lendingOhlcvService interfaces.LendingOhlcvService)
- func ServeLendingOrderBookResource(r *mux.Router, lendingOrderBookService interfaces.LendingOrderBookService)
- func ServeLendingOrderResource(r *mux.Router, lendingorderService interfaces.LendingOrderService, ...)
- func ServeLendingPairResource(r *mux.Router, p interfaces.LendingPairService, rl interfaces.RelayerService)
- func ServeLendingPriceBoardResource(r *mux.Router, lendingPriceBoardService interfaces.LendingPriceBoardService)
- func ServeLendingTokenResource(r *mux.Router, collateralTokenService interfaces.TokenService, ...)
- func ServeLendingTradeResource(r *mux.Router, lendingTradeService interfaces.LendingTradeService, ...)
- func ServeMarketsResource(r *mux.Router, marketsService interfaces.MarketsService, ...)
- func ServeNotificationResource(r *mux.Router, notificationService interfaces.NotificationService)
- func ServeOHLCVResource(r *mux.Router, ohlcvService interfaces.OHLCVService)
- func ServeOrderBookResource(r *mux.Router, orderBookService interfaces.OrderBookService)
- func ServeOrderResource(r *mux.Router, orderService interfaces.OrderService, ...)
- func ServePairResource(r *mux.Router, p interfaces.PairService, rl interfaces.RelayerService)
- func ServePriceBoardResource(r *mux.Router, priceBoardService interfaces.PriceBoardService)
- func ServeRelayerResource(r *mux.Router, relayerService interfaces.RelayerService, ...)
- func ServeTokenResource(r *mux.Router, tokenService interfaces.TokenService, ...)
- func ServeTradeResource(r *mux.Router, tradeService interfaces.TradeService, ...)
- type AccountEndpoint
- type LendingMarketsEndpoint
- type LendingOhlcvEndpoint
- type LendingOrderBookEndpoint
- type LendingPriceBoardEndpoint
- type MarketsEndpoint
- type NotificationEndpoint
- func (e *NotificationEndpoint) HandleGetNotifications(w http.ResponseWriter, r *http.Request)
- func (e *NotificationEndpoint) HandleMarkReadAllNotification(w http.ResponseWriter, r *http.Request)
- func (e *NotificationEndpoint) HandleMarkReadNotification(w http.ResponseWriter, r *http.Request)
- func (e *NotificationEndpoint) HandleMarkUnReadNotification(w http.ResponseWriter, r *http.Request)
- func (e *NotificationEndpoint) HandleUpdateNotification(w http.ResponseWriter, r *http.Request)
- type OHLCVEndpoint
- type OrderBookEndpoint
- type PriceBoardEndpoint
Constants ¶
const (
COLLATERAL_RATE = 1.5
)
Variables ¶
This section is empty.
Functions ¶
func ServeAccountResource ¶
func ServeAccountResource( r *mux.Router, accountService interfaces.AccountService, )
func ServeInfoResource ¶
func ServeInfoResource( r *mux.Router, walletService interfaces.WalletService, tokenService interfaces.TokenService, relayerService interfaces.RelayerService, )
func ServeLendingMarketsResource ¶ added in v1.2.0
func ServeLendingMarketsResource( r *mux.Router, lendingMarketsService interfaces.LendingMarketsService, lendingOhlcvService interfaces.LendingOhlcvService, )
ServeLendingMarketsResource sets up the routing of token endpoints and the corresponding handlers.
func ServeLendingOhlcvResource ¶ added in v1.2.0
func ServeLendingOhlcvResource( r *mux.Router, lendingOhlcvService interfaces.LendingOhlcvService, )
ServeLendingOhlcvResource handle lending ohlcv api
func ServeLendingOrderBookResource ¶ added in v1.2.0
func ServeLendingOrderBookResource( r *mux.Router, lendingOrderBookService interfaces.LendingOrderBookService, )
ServeLendingOrderBookResource sets up the routing of pair endpoints and the corresponding handlers.
func ServeLendingOrderResource ¶ added in v1.2.0
func ServeLendingOrderResource( r *mux.Router, lendingorderService interfaces.LendingOrderService, relayerService interfaces.RelayerService, )
ServeLendingOrderResource sets up the routing of order endpoints and the corresponding handlers.
func ServeLendingPairResource ¶ added in v1.2.0
func ServeLendingPairResource( r *mux.Router, p interfaces.LendingPairService, rl interfaces.RelayerService, )
ServeLendingPairResource sets up the routing of pair endpoints and the corresponding handlers.
func ServeLendingPriceBoardResource ¶ added in v1.2.0
func ServeLendingPriceBoardResource( r *mux.Router, lendingPriceBoardService interfaces.LendingPriceBoardService, )
ServeLendingPriceBoardResource sets up the routing of token endpoints and the corresponding handlers.
func ServeLendingTokenResource ¶ added in v1.2.0
func ServeLendingTokenResource( r *mux.Router, collateralTokenService interfaces.TokenService, lendingTokenService interfaces.TokenService, lendingPairservice interfaces.LendingPairService, relayerService interfaces.RelayerService, )
ServeLendingTokenResource sets up the routing of token endpoints and the corresponding handlers.
func ServeLendingTradeResource ¶ added in v1.2.0
func ServeLendingTradeResource( r *mux.Router, lendingTradeService interfaces.LendingTradeService, relayerService interfaces.RelayerService, )
ServeLendingTradeResource sets up the routing of trade endpoints and the corresponding handlers. TODO trim down to one single endpoint with the 3 following params: base, quote, address
func ServeMarketsResource ¶
func ServeMarketsResource( r *mux.Router, marketsService interfaces.MarketsService, pairService interfaces.PairService, relayerService interfaces.RelayerService, )
ServeTokenResource sets up the routing of token endpoints and the corresponding handlers.
func ServeNotificationResource ¶
func ServeNotificationResource( r *mux.Router, notificationService interfaces.NotificationService, )
ServeNotificationResource sets up the routing of notification endpoints and the corresponding handlers.
func ServeOHLCVResource ¶
func ServeOHLCVResource( r *mux.Router, ohlcvService interfaces.OHLCVService, )
func ServeOrderBookResource ¶
func ServeOrderBookResource( r *mux.Router, orderBookService interfaces.OrderBookService, )
ServePairResource sets up the routing of pair endpoints and the corresponding handlers.
func ServeOrderResource ¶
func ServeOrderResource( r *mux.Router, orderService interfaces.OrderService, accountService interfaces.AccountService, relayerService interfaces.RelayerService, )
ServeOrderResource sets up the routing of order endpoints and the corresponding handlers.
func ServePairResource ¶
func ServePairResource( r *mux.Router, p interfaces.PairService, rl interfaces.RelayerService, )
ServePairResource sets up the routing of pair endpoints and the corresponding handlers.
func ServePriceBoardResource ¶
func ServePriceBoardResource( r *mux.Router, priceBoardService interfaces.PriceBoardService, )
ServePriceBoardResource sets up the routing of token endpoints and the corresponding handlers.
func ServeRelayerResource ¶
func ServeRelayerResource( r *mux.Router, relayerService interfaces.RelayerService, ohlcvService interfaces.OHLCVService, lendingOhlcvService interfaces.LendingOhlcvService, )
ServeRelayerResource sets up the routing of order endpoints and the corresponding handlers.
func ServeTokenResource ¶
func ServeTokenResource( r *mux.Router, tokenService interfaces.TokenService, relayerService interfaces.RelayerService, )
ServeTokenResource sets up the routing of token endpoints and the corresponding handlers.
func ServeTradeResource ¶
func ServeTradeResource( r *mux.Router, tradeService interfaces.TradeService, relayerService interfaces.RelayerService, )
ServeTradeResource sets up the routing of trade endpoints and the corresponding handlers. TODO trim down to one single endpoint with the 3 following params: base, quote, address
Types ¶
type AccountEndpoint ¶
type AccountEndpoint struct {
AccountService interfaces.AccountService
}
type LendingMarketsEndpoint ¶ added in v1.2.0
type LendingMarketsEndpoint struct { LendingMarketsService interfaces.LendingMarketsService LendingOhlcvService interfaces.LendingOhlcvService }
LendingMarketsEndpoint lending market endpoint
type LendingOhlcvEndpoint ¶ added in v1.2.0
type LendingOhlcvEndpoint struct {
// contains filtered or unexported fields
}
LendingOhlcvEndpoint struct for lending ohlcv endpoint
type LendingOrderBookEndpoint ¶ added in v1.2.0
type LendingOrderBookEndpoint struct {
// contains filtered or unexported fields
}
LendingOrderBookEndpoint struct for lending
func (*LendingOrderBookEndpoint) HandleGetLendingOrderBook ¶ added in v1.2.0
func (e *LendingOrderBookEndpoint) HandleGetLendingOrderBook(w http.ResponseWriter, r *http.Request)
func (*LendingOrderBookEndpoint) HandleGetLendingOrderBookInDb ¶ added in v1.2.0
func (e *LendingOrderBookEndpoint) HandleGetLendingOrderBookInDb(w http.ResponseWriter, r *http.Request)
type LendingPriceBoardEndpoint ¶ added in v1.2.0
type LendingPriceBoardEndpoint struct {
// contains filtered or unexported fields
}
type MarketsEndpoint ¶
type MarketsEndpoint struct {
// contains filtered or unexported fields
}
func (*MarketsEndpoint) HandleGetAllMarketStats ¶ added in v0.5.0
func (e *MarketsEndpoint) HandleGetAllMarketStats(w http.ResponseWriter, r *http.Request)
HandleGetAllMarketStats get all market token data
func (*MarketsEndpoint) HandleGetMarketStats ¶ added in v0.5.0
func (e *MarketsEndpoint) HandleGetMarketStats(w http.ResponseWriter, r *http.Request)
HandleGetMarketStats get market specific token data
type NotificationEndpoint ¶
type NotificationEndpoint struct {
NotificationService interfaces.NotificationService
}
func (*NotificationEndpoint) HandleGetNotifications ¶
func (e *NotificationEndpoint) HandleGetNotifications(w http.ResponseWriter, r *http.Request)
HandleGetNotifications get notifications user address
func (*NotificationEndpoint) HandleMarkReadAllNotification ¶
func (e *NotificationEndpoint) HandleMarkReadAllNotification(w http.ResponseWriter, r *http.Request)
HandleMarkReadAllNotification mark all read status
func (*NotificationEndpoint) HandleMarkReadNotification ¶
func (e *NotificationEndpoint) HandleMarkReadNotification(w http.ResponseWriter, r *http.Request)
HandleMarkReadNotification mark read status by id
func (*NotificationEndpoint) HandleMarkUnReadNotification ¶
func (e *NotificationEndpoint) HandleMarkUnReadNotification(w http.ResponseWriter, r *http.Request)
HandleMarkUnReadNotification mark unread status by id
func (*NotificationEndpoint) HandleUpdateNotification ¶
func (e *NotificationEndpoint) HandleUpdateNotification(w http.ResponseWriter, r *http.Request)
HandleUpdateNotification handle notification update
type OHLCVEndpoint ¶
type OHLCVEndpoint struct {
// contains filtered or unexported fields
}
type OrderBookEndpoint ¶
type OrderBookEndpoint struct {
// contains filtered or unexported fields
}
type PriceBoardEndpoint ¶
type PriceBoardEndpoint struct {
// contains filtered or unexported fields
}