diaApi

package
v0.0.0-...-3beb7e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2022 License: GPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	DataStore models.Datastore
	RelDB     models.RelDB
}

func (*Env) Get24hVolume

func (env *Env) Get24hVolume(c *gin.Context)

Get24hVolume if no times are set use the last 24h

func (*Env) GetAllNFTClasses

func (env *Env) GetAllNFTClasses(c *gin.Context)

GetNFTClasses returns all NFT classes.

func (*Env) GetAllSymbols

func (env *Env) GetAllSymbols(c *gin.Context)

GetAllSymbols returns all symbols available in our (redis) database. Optional query parameter exchange returns only symbols available on this exchange.

func (*Env) GetChartPoints

func (env *Env) GetChartPoints(c *gin.Context)

GetChartPoints godoc @Summary Get chart points for @Description Get Symbol Details @Tags dia @Accept json @Produce json @Param symbol path string true "Some symbol" @Param exchange path string true "Some exchange" @Param filter path string true "Some filter" @Param scale query string false "scale 5m 30m 1h 4h 1d 1w" @Success 200 {object} models.Points "success" @Failure 404 {object} restApi.APIError "Symbol not found" @Failure 500 {object} restApi.APIError "error" @Router /v1/chartPoints/:filter/:exchange:/:symbol: [get]

func (*Env) GetChartPointsAllExchanges

func (env *Env) GetChartPointsAllExchanges(c *gin.Context)

GetChartPointsAllExchanges godoc @Param scale query string false "scale 5m 30m 1h 4h 1d 1w"

func (*Env) GetCoins

func (env *Env) GetCoins(c *gin.Context)

GetCoins godoc @Summary Get coins @Description GetCoins @Tags dia @Accept json @Produce json @Success 200 {object} models.Coins "success" @Failure 500 {object} restApi.APIError "error" @Router /v1/coins [get]

func (*Env) GetCompoundedAvg

func (env *Env) GetCompoundedAvg(c *gin.Context)

GetCompoundedAvg is the delegate method to fetch averaged compounded rate values for interest rates

func (*Env) GetCompoundedAvgDIA

func (env *Env) GetCompoundedAvgDIA(c *gin.Context)

GetCompoundedAvgDIA is the delegate method to fetch averaged compounded rate values for interest rates

func (*Env) GetCompoundedRate

func (env *Env) GetCompoundedRate(c *gin.Context)

GetCompoundedRate is the delegate method to fetch compounded rate values for interest rates

func (*Env) GetCryptoDerivative

func (env *Env) GetCryptoDerivative(c *gin.Context)

GetCryptoDerivative returns all information on a given derivative of class @derivativeType and name @name

func (*Env) GetCryptoIndex

func (env *Env) GetCryptoIndex(c *gin.Context)

func (*Env) GetCryptoIndexMintAmounts

func (env *Env) GetCryptoIndexMintAmounts(c *gin.Context)

func (*Env) GetCviIndex

func (env *Env) GetCviIndex(c *gin.Context)

func (*Env) GetDefiRate

func (env *Env) GetDefiRate(c *gin.Context)

GetDefiRate is the delegate method to fetch the value(s) of the defi lending rate of @asset at the exchange with @protocol. Last value is retrieved. Otional query parameters allow to obtain data in a time range.

func (*Env) GetDefiState

func (env *Env) GetDefiState(c *gin.Context)

GetDefiState is the delegate method to fetch the value(s) of the defi lending rate of @asset at the exchange with @protocol. Last value is retrieved. Otional query parameters allow to obtain data in a time range.

func (*Env) GetDiaCirculatingSupply

func (env *Env) GetDiaCirculatingSupply(c *gin.Context)

func (*Env) GetDiaTotalSupply

func (env *Env) GetDiaTotalSupply(c *gin.Context)

func (*Env) GetExchanges

func (env *Env) GetExchanges(c *gin.Context)

GetExchanges is the delegate method for fetching all available trading places.

func (*Env) GetFarmingPoolData

func (env *Env) GetFarmingPoolData(c *gin.Context)

GetFarmingPoolData is the delegate method to fetch the value(s) of the farming pool information of @protocol. Last value is retrieved. Otional query parameters allow to obtain data in a time range.

func (*Env) GetFarmingPools

func (env *Env) GetFarmingPools(c *gin.Context)

GetFarmingPools is the delegate method to fetch the value(s) of the farming pool information of @protocol. Last value is retrieved. Otional query parameters allow to obtain data in a time range.

func (*Env) GetFiatQuotations

func (env *Env) GetFiatQuotations(c *gin.Context)

GetFiatQuotations returns several quotations vs USD as published by the ECB

func (*Env) GetForeignQuotation

func (env *Env) GetForeignQuotation(c *gin.Context)

GetForeignQuotation returns several quotations vs USD as published by the ECB

func (*Env) GetForeignSymbols

func (env *Env) GetForeignSymbols(c *gin.Context)

GetForeignSymbols returns all symbols available for quotation from @source, along with their ITIN

func (*Env) GetInterestRate

func (env *Env) GetInterestRate(c *gin.Context)

GetInterestRate is the delegate method to fetch the value of the interest rate with symbol @symbol at the date @time. Optional query parameters allow to obtain data in a time range.

func (*Env) GetLastPriceBefore

func (env *Env) GetLastPriceBefore(c *gin.Context)

func (*Env) GetLastPriceBeforeAllExchanges

func (env *Env) GetLastPriceBeforeAllExchanges(c *gin.Context)

func (*Env) GetLastTrades

func (env *Env) GetLastTrades(c *gin.Context)

Get last 1000 trades of an asset

func (*Env) GetLendingProtocols

func (env *Env) GetLendingProtocols(c *gin.Context)

GetLendingProtocols returns all symbols available in our (redis) database. Optional query parameter exchange returns only symbols available on this exchange.

func (*Env) GetNFT

func (env *Env) GetNFT(c *gin.Context)

GetNFT returns an NFT.

func (*Env) GetNFTCategories

func (env *Env) GetNFTCategories(c *gin.Context)

GetNFTCategories returns all available NFT categories.

func (*Env) GetNFTClasses

func (env *Env) GetNFTClasses(c *gin.Context)

GetNFTClasses returns all NFT classes.

func (*Env) GetNFTPrice30Days

func (env *Env) GetNFTPrice30Days(c *gin.Context)

GetNFTPrice30Days returns the average price of the whole nft class over the last 30 days.

func (*Env) GetNFTTrades

func (env *Env) GetNFTTrades(c *gin.Context)

GetNFTTrades returns all trades of the unique NFT with given parameters.

func (*Env) GetPairs

func (env *Env) GetPairs(c *gin.Context)

GetPairs returns all pairs

func (*Env) GetPaxgQuotationGrams

func (env *Env) GetPaxgQuotationGrams(c *gin.Context)

func (*Env) GetPaxgQuotationOunces

func (env *Env) GetPaxgQuotationOunces(c *gin.Context)

func (*Env) GetQuotation

func (env *Env) GetQuotation(c *gin.Context)

GetQuotation godoc @Summary Get quotation @Description GetQuotation @Tags dia @Accept json @Produce json @Param symbol path string true "Some symbol" @Success 200 {object} models.Quotation "success" @Failure 404 {object} restApi.APIError "Symbol not found" @Failure 500 {object} restApi.APIError "error" @Router /v1/quotation/:symbol: [get]

func (*Env) GetRates

func (env *Env) GetRates(c *gin.Context)

GetRates is the delegate method for fetching all rate types present in the (redis) database.

func (*Env) GetStockQuotation

func (env *Env) GetStockQuotation(c *gin.Context)

GetStockQuotation is the delegate method to fetch the value(s) of quotations of asset with @symbol from @source. Last value is retrieved. Otional query parameters allow to obtain data in a time range.

func (*Env) GetStockSymbols

func (env *Env) GetStockSymbols(c *gin.Context)

func (*Env) GetSupplies

func (env *Env) GetSupplies(c *gin.Context)

GetSupplies returns a time range of supplies of token with @symbol

func (*Env) GetSupply

func (env *Env) GetSupply(c *gin.Context)

GetSupply returns latest supply of token with @symbol

func (*Env) GetSymbolDetails

func (env *Env) GetSymbolDetails(c *gin.Context)

GetSymbolDetails godoc @Summary Get Symbol Details @Description Get Symbol Details @Tags dia @Accept json @Produce json @Param symbol path string true "Some symbol" @Success 200 {object} models.SymbolDetails "success" @Failure 404 {object} restApi.APIError "Symbol not found" @Failure 500 {object} restApi.APIError "error" @Router /v1/symbol/:symbol: [get]

func (*Env) GetVolume

func (env *Env) GetVolume(c *gin.Context)

GetVolume if no times are set use the last 24h

func (*Env) PostIndexRebalance

func (env *Env) PostIndexRebalance(c *gin.Context)

func (*Env) PostSupply

func (env *Env) PostSupply(c *gin.Context)

PostSupply godoc @Summary Post the circulating supply @Description Post the circulating supply @Tags dia @Accept json @Produce json @Param Symbol query string true "Coin symbol" @Param CirculatingSupply query float64 true "number of coins in circulating supply" @Success 200 {object} dia.Supply "success" @Failure 500 {object} restApi.APIError "error" @Router /v1/supply [post]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL