parser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadRepository

type ReadRepository interface {
	GetSyncedHeight() (uint64, error)
	GetPairs() ([]schemas.Pair, error)
	GetPoolInfosByHeight(height uint64) ([]schemas.PoolInfo, error)
	GetParsedTxs(height uint64) ([]schemas.ParsedTx, error)
	GetParsedTxsOfPair(height uint64, pair string) ([]schemas.ParsedTx, error)

	// aggregator
	HeightOnTimestamp(timestamp float64) (uint64, error)
	LastHeightOfPrice() (uint64, error)
	GetParsedTxsWithLimit(startHeight uint64, limit int) ([]schemas.ParsedTxWithPrice, error)
	GetRecentParsedTxs(startHeight uint64, endHeight uint64) ([]schemas.ParsedTxWithPrice, error)
	RecentPrices(startHeight uint64, endHeight uint64, targetTokens []string, priceToken string) (map[uint64][]schemas.Price, error)
	GetParsedTxsWithPriceOfPair(pairId uint64, priceToken string, startTs float64, endTs float64) ([]schemas.ParsedTxWithPrice, error)
	PairStats(startTs float64, endTs float64, priceToken string) ([]schemas.PairStats30m, error)
	LiquiditiesOfPairStats(startTs float64, endTs float64, priceToken string) (map[uint64]schemas.PairStats30m, error)
	OldestTxTimestamp() (float64, error)
	LatestTxTimestamp() (float64, error)
	PairIds() ([]uint64, error)
	NewPairIds(account string, startTs float64, endTs float64) ([]uint64, error)
	NewAccounts(startTs float64, endTs float64) ([]string, error)
	ProviderCount(pairId uint64, startTs float64, endTs float64) (uint64, error)
	TxCountOfAccount(account string, pairId uint64, startTs float64, endTs float64) (uint64, error)
	AssetAmountInPair(pairId uint64, startTs float64, endTs float64) (string, string, string, error)
	AssetAmountInPairOfAccount(account string, pairId uint64, startTs float64, endTs float64) (string, string, string, error)
	CommissionAmountInPair(pairId uint64, startTs float64, endTs float64) (string, string, error)
	Close() error
}

func NewReadRepo

func NewReadRepo(chainId string, dbConfig configs.RdbConfig) ReadRepository

Jump to

Keyboard shortcuts

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