Documentation ¶
Index ¶
- Constants
- type CoinRate
- type RateController
- func (rc *RateController) GetCoinLiquidity(c *gin.Context)
- func (rc *RateController) GetCoinRateFromCoinToCoin(c *gin.Context)
- func (rc *RateController) GetCoinRates(c *gin.Context)
- func (rc *RateController) GetCoinRatesV2(c *gin.Context)
- func (rc *RateController) GetCoinToCoinRateWithExchangeMargin(c *gin.Context)
- func (rc *RateController) GetCoinToFIATRate(c *gin.Context)
- func (rc *RateController) GetNodeProvider(c *gin.Context)
Constants ¶
View Source
const RatesCacheTimeFrame = 60 * 15 // 15 minutes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RateController ¶
type RateController struct { RateService *services.RateSevice RatesCache map[string]CoinRate }
RateController is the main type for serving the API routes.
func (*RateController) GetCoinLiquidity ¶
func (rc *RateController) GetCoinLiquidity(c *gin.Context)
GetCoinLiquidity will return the liquidity available for the selected coin.
func (*RateController) GetCoinRateFromCoinToCoin ¶
func (rc *RateController) GetCoinRateFromCoinToCoin(c *gin.Context)
GetCoinRateFromCoinToCoin will return the rate converting from the first coin to the second coin There is also the option of sending the amount trough a query
func (*RateController) GetCoinRates ¶
func (rc *RateController) GetCoinRates(c *gin.Context)
GetCoinRates will return a rate map based on the selected coin
func (*RateController) GetCoinRatesV2 ¶
func (rc *RateController) GetCoinRatesV2(c *gin.Context)
GetCoinRatesV2 GetCoinRates will return a rate map based on the selected coin
func (*RateController) GetCoinToCoinRateWithExchangeMargin ¶
func (rc *RateController) GetCoinToCoinRateWithExchangeMargin(c *gin.Context)
func (*RateController) GetCoinToFIATRate ¶
func (rc *RateController) GetCoinToFIATRate(c *gin.Context)
Returns rate from crypto to specific FIAT currency
func (*RateController) GetNodeProvider ¶
func (rc *RateController) GetNodeProvider(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.