indexCalculationService

package
v1.1.1-rc-21 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MAX_RELATIVE_CAP float64 = 0.3
)

Functions

func CalculateWeights

func CalculateWeights(indexSymbol string, constituents *[]models.CryptoIndexConstituent) error

func GetIndexBasket

func GetIndexBasket(constituentsAddresses []string) ([]models.CryptoIndexConstituent, error)

Get supply and price information for the index constituents

func GetIndexValue

func GetIndexValue(indexSymbol string, currentConstituents []models.CryptoIndexConstituent) float64

func UpdateConstituentsMarketData

func UpdateConstituentsMarketData(index string, currentConstituents *[]models.CryptoIndexConstituent) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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