diaApi

package
v1.4.479-rc-1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: GPL-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DECIMALS_CACHE                = make(map[dia.Asset]uint8)
	ASSET_CACHE                   = make(map[string]dia.Asset)
	QUOTATION_CACHE               = make(map[string]*models.AssetQuotation)
	BLOCKCHAINS                   = make(map[string]dia.BlockChain)
	ASSETQUOTATION_LOOKBACK_HOURS = 24 * 7
)

Functions

func BasicAuth added in v1.3.0

func BasicAuth(c *gin.Context)

Types

type Env

type Env struct {
	DataStore models.Datastore
	RelDB     models.RelDB
	// contains filtered or unexported fields
}

func NewEnv added in v1.4.171

func NewEnv(ds models.Datastore, rdb models.RelDB, signer *utils.AssetQuotationSigner) *Env

func (*Env) Get24hVolume

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

Get24hVolume if no times are set use the last 24h

func (*Env) GetAllBlockchains added in v1.2.0

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

func (*Env) GetAllNFTClasses

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

GetAllNFTClasses returns all NFT classes.

func (*Env) GetAllSymbols

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

GetAllSymbols returns all Symbols on @exchange. If @exchange is not set, it returns all symbols across all exchanges. If @top is set to an integer, only the top @top symbols w.r.t. trading volume are returned. This is only active if @exchange is not set.

func (*Env) GetAsset added in v1.2.0

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

func (*Env) GetAssetChartPoints added in v1.4.2

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

GetAssetChartPoints queries for filter points of asset given by address and blockchain.

func (*Env) GetAssetExchanges added in v1.2.0

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

func (*Env) GetAssetInfo added in v1.4.2

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

GetAssetInfo returns quotation of asset with highest market cap among all assets with symbol ticker @symbol. Additionally information on exchanges and volumes.

func (*Env) GetAssetMap added in v1.4.2

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

func (*Env) GetAssetPairs added in v1.4.22

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

func (*Env) GetAssetQuotation added in v1.3.5

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

GetAssetQuotation returns quotation of asset with highest market cap among all assets with symbol ticker @symbol.

func (*Env) GetAssetSupply added in v1.4.2

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

GetSupply returns latest supply of token with @symbol

func (*Env) GetAssetUpdates added in v1.4.2

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

GetAssetUpdates returns the number of updates an oracle with the given parameters would have done in the given time-range.

func (*Env) GetAvailableAssets added in v1.4.255

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

func (*Env) GetChartPoints

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

GetChartPoints returns Filter points for given symbol -> Deprecated?

func (*Env) GetChartPointsAllExchanges

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

GetChartPointsAllExchanges returns filter points across all exchanges.

func (*Env) GetDiaCirculatingSupply added in v1.4.2

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

func (*Env) GetDiaTotalSupply added in v1.4.2

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

func (*Env) GetExchangePairs added in v1.4.22

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

func (*Env) GetExchanges

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

GetExchanges is the delegate method for fetching all exchanges available in Postgres.

func (*Env) GetFeedStats added in v1.4.2

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

func (*Env) GetFiatQuotations

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

GetFiatQuotations returns several quotations vs USD as published by the ECB

func (*Env) GetFilterPerSource added in v1.4.131

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

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.

func (*Env) GetLastTradeTime added in v1.4.50

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

func (*Env) GetLastTradesAsset added in v1.4.0

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

GetLastTrades returns last N trades of an asset. Defaults to N=1000.

func (*Env) GetMissingExchangeSymbol added in v1.2.0

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

GetMissingExchangeSymbol returns all unverified symbol

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) GetNFTDistribution added in v1.4.78

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

func (*Env) GetNFTDownday added in v1.4.2

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

GetNFTDownday returns the moving average floor price of the nft class over the last 30 days.

func (*Env) GetNFTExchanges added in v1.4.8

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

GetNFTExchanges is the delegate method for fetching all exchanges available in Postgres.

func (*Env) GetNFTFloor added in v1.4.2

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

GetNFTFloor returns the last floor price of a collection before @timestamp.

func (*Env) GetNFTFloorMA added in v1.4.2

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

GetNFTFloorMA returns the moving average floor price of the nft class over the last 30 days.

func (*Env) GetNFTFloorVola added in v1.4.2

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

GetNFTFloorVola returns the volatility of the moving average floor price of the nft class over the last 90 days.

func (*Env) GetNFTMarketCap added in v1.4.211

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

func (*Env) GetNFTTrades added in v1.2.0

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

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

func (*Env) GetNFTTradesCollection added in v1.4.2

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

GetNFTTradesCollection returns all trades of the collection with given parameters.

func (*Env) GetNFTVolume added in v1.4.2

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

func (*Env) GetPairsInFeed added in v1.4.131

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

GetPairsInFeed returns quotation of asset with highest market cap among all assets with symbol ticker @symbol. Additionally information on exchanges and volumes.

func (*Env) GetPoolLiquidityByAddress added in v1.4.2

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

func (*Env) GetPoolPriceImpact added in v1.4.68

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

func (*Env) GetPoolSlippage added in v1.4.65

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

func (*Env) GetPoolsByAsset added in v1.4.252

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

func (*Env) GetPriceImpactSimulation added in v1.4.71

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

func (*Env) GetQuotation

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

GetQuotation returns quotation of asset with highest market cap among all assets with symbol ticker @symbol.

func (*Env) GetQuotedAssets added in v1.4.26

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

GetQuotedAssets is the delegate method to fetch all assets that have an asset quotation dating back at most 7 days.

func (*Env) GetStockQuotation added in v1.4.0

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 added in v1.4.0

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) GetSyntheticAsset added in v1.4.2

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

GetSyntheticAsset

func (*Env) GetTopAssets added in v1.4.2

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

func (*Env) GetTopNFTClasses added in v1.4.2

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

func (*Env) GetVwapFirefly added in v1.4.2

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

func (*Env) SearchAsset added in v1.4.2

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

func (*Env) SearchNFTs added in v1.4.2

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

type RestBasicAuth added in v1.3.0

type RestBasicAuth struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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