Documentation
¶
Index ¶
- type CoinMarketCap
- func (m *CoinMarketCap) DexPairsTradeLatest(contractAddress, networkSlug string) (*DexPairsTradeLatestResp, error)
- func (m *CoinMarketCap) DexSearch(keyword string) ([]*DexPairsResp, error)
- func (m *CoinMarketCap) DexSpotPairsLatest(quoteAssetSymbol, networkSlug string) (*DexSpotPairsLatestResp, error)
- func (m *CoinMarketCap) GetCryptocurrencyMap() (map[string]*MapDataCoin, error)
- func (m *CoinMarketCap) GetHistoricalPrice(id string, unixEnd int64) (*big.Float, error)
- func (m *CoinMarketCap) GetQuotesLatest(arrayIDs []string) (map[string]*QuotesLatestDataCoin, error)
- type DexPairsResp
- type DexPairsTradeLatestDetail
- type DexPairsTradeLatestResp
- type DexSearchResp
- type DexSpotPairsLatestDetail
- type DexSpotPairsLatestResp
- type HistoricalData
- type HistoricalDataCoin
- type MapData
- type MapDataCoin
- type PriceConversionDataResponse
- type PriceConversionResponse
- type Quote
- type QuotesLatestData
- type QuotesLatestDataCoin
- type USD
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoinMarketCap ¶
type CoinMarketCap struct {
// contains filtered or unexported fields
}
func NewCoinMarketCap ¶
func NewCoinMarketCap(apiKey string) *CoinMarketCap
func (*CoinMarketCap) DexPairsTradeLatest ¶
func (m *CoinMarketCap) DexPairsTradeLatest(contractAddress, networkSlug string) (*DexPairsTradeLatestResp, error)
func (*CoinMarketCap) DexSearch ¶
func (m *CoinMarketCap) DexSearch(keyword string) ([]*DexPairsResp, error)
func (*CoinMarketCap) DexSpotPairsLatest ¶
func (m *CoinMarketCap) DexSpotPairsLatest(quoteAssetSymbol, networkSlug string) (*DexSpotPairsLatestResp, error)
func (*CoinMarketCap) GetCryptocurrencyMap ¶
func (m *CoinMarketCap) GetCryptocurrencyMap() (map[string]*MapDataCoin, error)
func (*CoinMarketCap) GetHistoricalPrice ¶
func (*CoinMarketCap) GetQuotesLatest ¶
func (m *CoinMarketCap) GetQuotesLatest(arrayIDs []string) (map[string]*QuotesLatestDataCoin, error)
type DexPairsResp ¶
type DexPairsResp struct { PlatformId uint `json:"platformId"` PlatformName string `json:"platformName"` BaseTokenSymbol string `json:"baseTokenSymbol"` QuoteTokenSymbol string `json:"quoteTokenSymbol"` Liquidity string `json:"liquidity"` PairContractAddress string `json:"pairContractAddress"` PlatFormCryptoId string `json:"platFormCryptoId"` ExchangeId uint `json:"exchangeId"` PoolId uint `json:"poolId"` BaseTokenName string `json:"baseTokenName"` MarketCap string `json:"marketCap"` PriceUsd string `json:"priceUsd"` PriceChange24h string `json:"priceChange24h"` BaseToken *struct { Name string `json:"name"` Address string `json:"address"` Symbol string `json:"symbol"` Decimals uint `json:"decimals"` } `json:"baseToken"` QuoteToken *struct { Name string `json:"name"` Address string `json:"address"` Symbol string `json:"symbol"` Decimals uint `json:"decimals"` } `json:"quoteToken"` Volume24h string `json:"volume24h"` VolumeQuote24h string `json:"volumeQuote24h"` }
type DexPairsTradeLatestDetail ¶
type DexPairsTradeLatestDetail struct { ScrollId string `json:"scroll_id"` ContractAddress string `json:"contract_address"` Name string `json:"name"` BaseAssetId string `json:"base_asset_id"` BaseAssetUcid string `json:"base_asset_ucid"` BaseAssetName string `json:"base_asset_name"` BaseAssetSymbol string `json:"base_asset_symbol"` BaseAssetContractAddress string `json:"base_asset_contract_address"` QuoteAssetId string `json:"quote_asset_id"` QuoteAssetUcid string `json:"quote_asset_ucid"` QuoteAssetName string `json:"quote_asset_name"` QuoteAssetSymbol string `json:"quote_asset_symbol"` QuoteAssetContractAddress string `json:"quote_asset_contract_address"` DexId string `json:"dex_id"` DexSlug string `json:"dex_slug"` NetworkId string `json:"network_id"` NetworkSlug string `json:"network_slug"` LastUpdated string `json:"last_updated"` CreatedAt string `json:"created_at"` Trades []*struct { Date string `json:"date"` TradeType string `json:"type"` Quote []*struct { Price float64 `json:"price"` Total float64 `json:"total"` ConvertId string `json:"convert_id"` PriceByQuoteAsset float64 `json:"price_by_quote_asset"` AmountBaseAsset float64 `json:"amount_base_asset"` AmountQuoteAsset float64 `json:"amount_quote_asset"` } `json:"quote"` } `json:"trades"` }
type DexPairsTradeLatestResp ¶
type DexPairsTradeLatestResp struct {
Data *[]*DexPairsTradeLatestDetail `json:"data"`
}
type DexSearchResp ¶
type DexSearchResp struct { Data *struct { Total uint `json:"total"` Pairs []*DexPairsResp `json:"pairs"` } `json:"data"` }
type DexSpotPairsLatestDetail ¶
type DexSpotPairsLatestDetail struct { ScrollId string `json:"scroll_id"` ContractAddress string `json:"contract_address"` Name string `json:"name"` BaseAssetId string `json:"base_asset_id"` BaseAssetUcid string `json:"base_asset_ucid"` BaseAssetName string `json:"base_asset_name"` BaseAssetSymbol string `json:"base_asset_symbol"` BaseAssetContractAddress string `json:"base_asset_contract_address"` QuoteAssetId string `json:"quote_asset_id"` QuoteAssetUcid string `json:"quote_asset_ucid"` QuoteAssetName string `json:"quote_asset_name"` QuoteAssetSymbol string `json:"quote_asset_symbol"` QuoteAssetContractAddress string `json:"quote_asset_contract_address"` DexId string `json:"dex_id"` DexSlug string `json:"dex_slug"` NetworkId string `json:"network_id"` NetworkSlug string `json:"network_slug"` LastUpdated string `json:"last_updated"` CreatedAt string `json:"created_at"` Quote []*struct { ConvertId string `json:"convert_id"` Price float64 `json:"price"` PriceByQuoteAsset float64 `json:"price_by_quote_asset"` LastUpdated string `json:"last_updated"` Volume24h float64 `json:"volume_24h"` PercentChangePrice1h float64 `json:"percent_change_price_1h"` PercentChangePrice24h float64 `json:"percent_change_price_24h"` Liquidity float64 `json:"liquidity"` FullyDilutedValue float64 `json:"fully_diluted_value"` } `json:"quote"` }
type DexSpotPairsLatestResp ¶
type DexSpotPairsLatestResp struct {
Data *[]*DexSpotPairsLatestDetail `json:"data"`
}
type HistoricalData ¶
type HistoricalData struct {
Data map[string]*HistoricalDataCoin `json:"data"`
}
type HistoricalDataCoin ¶
type HistoricalDataCoin struct { ID uint `json:"id"` Name string `json:"name"` Symbol string `json:"symbol"` Quotes []*struct { Timestamp string `json:"timestamp"` Quote *struct { USD *struct { Price numeric.BigFloat `json:"price"` Timestamp time.Time `json:"timestamp"` } `json:"USD"` } `json:"quote"` } `json:"quotes"` }
type MapData ¶
type MapData struct {
Data []*MapDataCoin `json:"data"`
}
type MapDataCoin ¶
type PriceConversionResponse ¶
type PriceConversionResponse struct { Status interface{} `json:"status"` Data PriceConversionDataResponse `json:"data"` }
type QuotesLatestData ¶
type QuotesLatestData struct {
Data map[string]*QuotesLatestDataCoin `json:"data"`
}
type QuotesLatestDataCoin ¶
type QuotesLatestDataCoin struct { ID uint `json:"id"` Name string `json:"name"` Symbol string `json:"symbol"` Quote *struct { USD *struct { Price numeric.BigFloat `json:"price"` MarketCap numeric.BigFloat `json:"market_cap"` Volume24h numeric.BigFloat `json:"volume_24h"` } `json:"USD"` } `json:"quote"` }
Click to show internal directories.
Click to hide internal directories.