Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func NewApi ¶
NewApi returns a new Api instance. It accepts a slice of token indexes, which are used to filter the results of the GetTokenIndexPrice and GetTokenAddressPrice functions.
func (*Api) GetTokenAddressPrice ¶
func (a *Api) GetTokenAddressPrice(networkId int) ([]common.TokenAddressPrice, error)
GetTokenAddressPrice returns an array of TokenAddressPrice structs, which contain the token address and its price for a given network ID.
func (*Api) GetTokenIndexInfo ¶
func (a *Api) GetTokenIndexInfo() (map[int]common.TokenIndexInfo, error)
func (*Api) GetTokenIndexPrice ¶
func (a *Api) GetTokenIndexPrice() ([]common.TokenIndexPrice, error)
GetTokenIndexPrice retrieves the current prices of all tokens in the XOracle index. It returns a slice of TokenIndexPrice structs, each containing the token index and its corresponding price.
Click to show internal directories.
Click to hide internal directories.