Documentation
¶
Index ¶
- Constants
- func GetNativeName(network string) string
- func GetNativeTokenBalance(accountAddress string, network string) decimal.Decimal
- func GetUserAsset(accountAddress string, network string) []*ent.UserAssetInfo
- func SetConfig(conf *cfg.Config)
- type NativePrice
- type NativeTokenBalance
- type TokenBalance
- type TokenPrice
- type TokenPriceInfo
- type UserAssetInfo
- type WalletBalanceResp
Constants ¶
View Source
const MoralisUrl = "https://deep-index.moralis.io/api/v2.2"
Variables ¶
This section is empty.
Functions ¶
func GetNativeName ¶
func GetNativeTokenBalance ¶
func GetUserAsset ¶
func GetUserAsset(accountAddress string, network string) []*ent.UserAssetInfo
Types ¶
type NativePrice ¶
type NativeTokenBalance ¶
type TokenBalance ¶
type TokenBalance struct {
TokenAddress string `json:"token_address"`
Symbol string `json:"symbol"`
Name string `json:"name"`
Logo string `json:"logo"`
Thumbnail string `json:"thumbnail"`
Decimals int32 `json:"decimals"`
Balance decimal.Decimal `json:"balance,string"`
PossibleSpam bool `json:"possible_spam"`
}
func GetTokenBalance ¶
func GetTokenBalance(address string, network string) []*TokenBalance
type TokenPrice ¶
type TokenPrice struct {
TokenName string `json:"tokenName"`
TokenSymbol string `json:"tokenSymbol"`
TokenLogo string `json:"tokenLogo"`
TokenDecimals string `json:"tokenDecimals"`
NativePrice NativePrice `json:"nativePrice"`
UsdPrice decimal.Decimal `json:"usdPrice"`
PercentChange24h string `json:"24hrPercentChange"`
ExchangeAddress string `json:"exchangeAddress"`
ExchangeName string `json:"exchangeName"`
TokenAddress string `json:"tokenAddress"`
}
func GetTokenPrice ¶
func GetTokenPrice(token string, network string) *TokenPrice
func GetTokenPriceBatch ¶
func GetTokenPriceBatch(tokens []string) []*TokenPrice
type TokenPriceInfo ¶
type UserAssetInfo ¶
Click to show internal directories.
Click to hide internal directories.