Documentation ¶
Index ¶
- Variables
- type AllCurrencies
- type ChartItem
- type CoinList
- type CoinsID
- type CoinsIDHistory
- type CoinsIDMarketChart
- type CoinsIDTickers
- type CoinsListItem
- type CoinsMarket
- type CoinsMarketItem
- type CommunityDataItem
- type DescriptionItem
- type DeveloperDataItem
- type EventCountryItem
- type EventsCountries
- type EventsTypes
- type ExchangeRatesItem
- type ExchangeRatesItemStruct
- type ExchangeRatesResponse
- type Global
- type GlobalResponse
- type ImageItem
- type LinksItem
- type LocalizationItem
- type MarketDataItem
- type OrderType
- type Ping
- type PriceChangePercentage
- type PublicInterestItem
- type ROIItem
- type SimpleSinglePrice
- type SimpleSupportedVSCurrencies
- type SparklineItem
- type StatusUpdateItem
- type TickerItem
Constants ¶
This section is empty.
Variables ¶
var OrderTypeObject = &OrderType{
MarketCapDesc: "market_cap_desc",
MarketCapAsc: "market_cap_asc",
GeckoDesc: "gecko_desc",
GeckoAsc: "gecko_asc",
VolumeAsc: "volume_asc",
VolumeDesc: "volume_desc",
}
OrderTypeObject for certain order
var PriceChangePercentageObject = &PriceChangePercentage{
PCP1h: "1h",
PCP24h: "24h",
PCP7d: "7d",
PCP14d: "14d",
PCP30d: "30d",
PCP200d: "200d",
PCP1y: "1y",
}
PriceChangePercentageObject for different amount of time
Functions ¶
This section is empty.
Types ¶
type AllCurrencies ¶
AllCurrencies map all currencies (USD, BTC) to float64
type CoinsID ¶
type CoinsID struct { BlockTimeInMin int32 `json:"block_time_in_minutes"` Categories []string `json:"categories"` Localization LocalizationItem `json:"localization"` Description DescriptionItem `json:"description"` Links *LinksItem `json:"links"` Image ImageItem `json:"image"` CountryOrigin string `json:"country_origin"` GenesisDate string `json:"genesis_date"` MarketCapRank uint16 `json:"market_cap_rank"` CoinGeckoRank uint16 `json:"coingecko_rank"` CoinGeckoScore float32 `json:"coingecko_score"` DeveloperScore float32 `json:"developer_score"` CommunityScore float32 `json:"community_score"` LiquidityScore float32 `json:"liquidity_score"` PublicInterestScore float32 `json:"public_interest_score"` MarketData *MarketDataItem `json:"market_data"` CommunityData *CommunityDataItem `json:"community_data"` DeveloperData *DeveloperDataItem `json:"developer_data"` PublicInterestStats *PublicInterestItem `json:"public_interest_stats"` StatusUpdates *[]StatusUpdateItem `json:"status_updates"` LastUpdated string `json:"last_updated"` Tickers *[]TickerItem `json:"tickers"` // contains filtered or unexported fields }
type CoinsIDHistory ¶
type CoinsIDHistory struct { Localization LocalizationItem `json:"localization"` Image ImageItem `json:"image"` MarketData *MarketDataItem `json:"market_data"` CommunityData *CommunityDataItem `json:"community_data"` DeveloperData *DeveloperDataItem `json:"developer_data"` PublicInterest *PublicInterestItem `json:"public_interest_stats"` // contains filtered or unexported fields }
CoinsIDHistory https://api.coingecko.com/api/v3/coins/steem/history?date=30-12-2018
type CoinsIDMarketChart ¶
type CoinsIDMarketChart struct { Prices *[]ChartItem `json:"prices"` MarketCaps *[]ChartItem `json:"market_caps"` TotalVolumes *[]ChartItem `json:"total_volumes"` // contains filtered or unexported fields }
CoinsIDMarketChart https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=1
type CoinsIDTickers ¶
type CoinsIDTickers struct { Name string `json:"name"` Tickers []TickerItem `json:"tickers"` }
CoinsIDTickers https://api.coingecko.com/api/v3/coins/steem/tickers?page=1
type CoinsListItem ¶
type CoinsListItem struct {
// contains filtered or unexported fields
}
CoinsListItem item in CoinList
type CoinsMarket ¶
type CoinsMarket []CoinsMarketItem
type CoinsMarketItem ¶
type CoinsMarketItem struct { Image string `json:"image"` CurrentPrice float64 `json:"current_price"` MarketCap float64 `json:"market_cap"` MarketCapRank int16 `json:"market_cap_rank"` TotalVolume float64 `json:"total_volume"` High24 float64 `json:"high_24h"` Low24 float64 `json:"low_24h"` PriceChange24h float64 `json:"price_change_24h"` PriceChangePercentage24h float64 `json:"price_change_percentage_24h"` MarketCapChange24h float64 `json:"market_cap_change_24h"` MarketCapChangePercentage24h float64 `json:"market_cap_change_percentage_24h"` CirculatingSupply float64 `json:"circulating_supply"` TotalSupply float64 `json:"total_supply"` ATH float64 `json:"ath"` ATHChangePercentage float64 `json:"ath_change_percentage"` ATHDate string `json:"ath_date"` ROI *ROIItem `json:"roi"` LastUpdated string `json:"last_updated"` SparklineIn7d *SparklineItem `json:"sparkline_in_7d"` PriceChangePercentage1hInCurrency *float64 `json:"price_change_percentage_1h_in_currency"` PriceChangePercentage24hInCurrency *float64 `json:"price_change_percentage_24h_in_currency"` PriceChangePercentage7dInCurrency *float64 `json:"price_change_percentage_7d_in_currency"` PriceChangePercentage14dInCurrency *float64 `json:"price_change_percentage_14d_in_currency"` PriceChangePercentage30dInCurrency *float64 `json:"price_change_percentage_30d_in_currency"` PriceChangePercentage200dInCurrency *float64 `json:"price_change_percentage_200d_in_currency"` PriceChangePercentage1yInCurrency *float64 `json:"price_change_percentage_1y_in_currency"` // contains filtered or unexported fields }
CoinsMarketItem item in CoinMarket
type CommunityDataItem ¶
type CommunityDataItem struct { FacebookLikes *uint `json:"facebook_likes"` TwitterFollowers *uint `json:"twitter_followers"` RedditAveragePosts48h *float64 `json:"reddit_average_posts_48h"` RedditAverageComments48h *float64 `json:"reddit_average_comments_48h"` RedditSubscribers *uint `json:"reddit_subscribers"` RedditAccountsActive48h *interface{} `json:"reddit_accounts_active_48h"` TelegramChannelUserCount *uint `json:"telegram_channel_user_count"` }
CommunityDataItem map all community data item
type DescriptionItem ¶
DescriptionItem map all description (in locale) into respective string
type DeveloperDataItem ¶
type DeveloperDataItem struct { Forks *uint `json:"forks"` Stars *uint `json:"stars"` Subscribers *uint `json:"subscribers"` TotalIssues *uint `json:"total_issues"` ClosedIssues *uint `json:"closed_issues"` PRMerged *uint `json:"pull_requests_merged"` PRContributors *uint `json:"pull_request_contributors"` CommitsCount4Weeks *uint `json:"commit_count_4_weeks"` }
DeveloperDataItem map all developer data item
type EventCountryItem ¶
EventCountryItem item in EventsCountries
type EventsCountries ¶
type EventsCountries struct {
Data []EventCountryItem `json:"data"`
}
EventsCountries https://api.coingecko.com/api/v3/events/countries
type EventsTypes ¶
EventsTypes https://api.coingecko.com/api/v3/events/types
type ExchangeRatesItem ¶
type ExchangeRatesItem map[string]ExchangeRatesItemStruct
ExchangeRatesItem item in ExchangeRate
type ExchangeRatesItemStruct ¶
type ExchangeRatesItemStruct struct { Name string `json:"name"` Unit string `json:"unit"` Value float64 `json:"value"` Type string `json:"type"` }
ExchangeRatesItemStruct struct in ExchangeRateItem
type ExchangeRatesResponse ¶
type ExchangeRatesResponse struct {
Rates ExchangeRatesItem `json:"rates"`
}
ExchangeRatesResponse https://api.coingecko.com/api/v3/exchange_rates
type Global ¶
type Global struct { ActiveCryptocurrencies uint16 `json:"active_cryptocurrencies"` UpcomingICOs uint16 `json:"upcoming_icos"` EndedICOs uint16 `json:"ended_icos"` Markets uint16 `json:"markets"` MarketCapChangePercentage24hUSD float32 `json:"market_cap_change_percentage_24h_usd"` TotalMarketCap AllCurrencies `json:"total_market_cap"` TotalVolume AllCurrencies `json:"total_volume"` MarketCapPercentage AllCurrencies `json:"market_cap_percentage"` UpdatedAt int64 `json:"updated_at"` }
Global for data of /global
type GlobalResponse ¶
type GlobalResponse struct {
Data Global `json:"data"`
}
GlobalResponse https://api.coingecko.com/api/v3/global
type ImageItem ¶
type ImageItem struct { Thumb string `json:"thumb"` Small string `json:"small"` Large string `json:"large"` }
ImageItem struct for all sizes of image
type LocalizationItem ¶
LocalizationItem map all locale (en, zh) into respective string
type MarketDataItem ¶
type MarketDataItem struct { CurrentPrice AllCurrencies `json:"current_price"` ROI *ROIItem `json:"roi"` ATH AllCurrencies `json:"ath"` ATHChangePercentage AllCurrencies `json:"ath_change_percentage"` ATHDate map[string]string `json:"ath_date"` ATL AllCurrencies `json:"atl"` ATLChangePercentage AllCurrencies `json:"atl_change_percentage"` ATLDate map[string]string `json:"atl_date"` MarketCap AllCurrencies `json:"market_cap"` MarketCapRank uint16 `json:"market_cap_rank"` TotalVolume AllCurrencies `json:"total_volume"` High24 AllCurrencies `json:"high_24h"` Low24 AllCurrencies `json:"low_24h"` PriceChange24h float64 `json:"price_change_24h"` PriceChangePercentage24h float64 `json:"price_change_percentage_24h"` PriceChangePercentage7d float64 `json:"price_change_percentage_7d"` PriceChangePercentage14d float64 `json:"price_change_percentage_14d"` PriceChangePercentage30d float64 `json:"price_change_percentage_30d"` PriceChangePercentage60d float64 `json:"price_change_percentage_60d"` PriceChangePercentage200d float64 `json:"price_change_percentage_200d"` PriceChangePercentage1y float64 `json:"price_change_percentage_1y"` MarketCapChange24h float64 `json:"market_cap_change_24h"` MarketCapChangePercentage24h float64 `json:"market_cap_change_percentage_24h"` PriceChange24hInCurrency AllCurrencies `json:"price_change_24h_in_currency"` PriceChangePercentage1hInCurrency AllCurrencies `json:"price_change_percentage_1h_in_currency"` PriceChangePercentage24hInCurrency AllCurrencies `json:"price_change_percentage_24h_in_currency"` PriceChangePercentage7dInCurrency AllCurrencies `json:"price_change_percentage_7d_in_currency"` PriceChangePercentage14dInCurrency AllCurrencies `json:"price_change_percentage_14d_in_currency"` PriceChangePercentage30dInCurrency AllCurrencies `json:"price_change_percentage_30d_in_currency"` PriceChangePercentage60dInCurrency AllCurrencies `json:"price_change_percentage_60d_in_currency"` PriceChangePercentage200dInCurrency AllCurrencies `json:"price_change_percentage_200d_in_currency"` PriceChangePercentage1yInCurrency AllCurrencies `json:"price_change_percentage_1y_in_currency"` MarketCapChange24hInCurrency AllCurrencies `json:"market_cap_change_24h_in_currency"` MarketCapChangePercentage24hInCurrency AllCurrencies `json:"market_cap_change_percentage_24h_in_currency"` TotalSupply *float64 `json:"total_supply"` CirculatingSupply float64 `json:"circulating_supply"` Sparkline *SparklineItem `json:"sparkline_7d"` LastUpdated string `json:"last_updated"` }
MarketDataItem map all market data item
type OrderType ¶
type OrderType struct { MarketCapDesc string MarketCapAsc string GeckoDesc string GeckoAsc string VolumeAsc string VolumeDesc string }
OrderType in CoinGecko
type PriceChangePercentage ¶
type PriceChangePercentage struct { PCP1h string PCP24h string PCP7d string PCP14d string PCP30d string PCP200d string PCP1y string }
PriceChangePercentage in different amount of time
type PublicInterestItem ¶
type PublicInterestItem struct { AlexaRank uint `json:"alexa_rank"` BingMatches uint `json:"bing_matches"` }
PublicInterestItem map all public interest item
type ROIItem ¶
type ROIItem struct { Times float64 `json:"times"` Currency string `json:"currency"` Percentage float64 `json:"percentage"` }
ROIItem ROI Item
type SimpleSinglePrice ¶
SimpleSinglePrice https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd
type SimpleSupportedVSCurrencies ¶
type SimpleSupportedVSCurrencies []string
SimpleSupportedVSCurrencies https://api.coingecko.com/api/v3/simple/supported_vs_currencies
type SparklineItem ¶
type SparklineItem struct {
Price []float64 `json:"price"`
}
SparklineItem for sparkline
type StatusUpdateItem ¶
type StatusUpdateItem struct { Description string `json:"description"` Category string `json:"category"` CreatedAt string `json:"created_at"` User string `json:"user"` UserTitle string `json:"user_title"` Pin bool `json:"pin"` Project struct { Type string `json:"type"` Image ImageItem `json:"image"` // contains filtered or unexported fields } `json:"project"` }
StatusUpdateItem for BEAM
type TickerItem ¶
type TickerItem struct { Base string `json:"base"` Target string `json:"target"` Market struct { Name string `json:"name"` Identifier string `json:"identifier"` TradingIncentive bool `json:"has_trading_incentive"` } `json:"market"` Last float64 `json:"last"` ConvertedLast map[string]float64 `json:"converted_last"` Volume float64 `json:"volume"` ConvertedVolume map[string]float64 `json:"converted_volume"` Timestamp string `json:"timestamp"` IsAnomaly bool `json:"is_anomaly"` IsStale bool `json:"is_stale"` CoinID string `json:"coin_id"` }
TickerItem for ticker