ethereum

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CandleTicker

type CandleTicker struct {
	SellPrice string `json:"sell_price"`
	BuyPrice  string `json:"buy_price"`
	UnixTime  uint64 `json:"unix_time"`
}

type CurrencyData

type CurrencyData struct {
	ETH float64 `json:"eth"`
	USD float64 `json:"usd"`
}

type EventHistory

type EventHistory struct {
	ActualDestAmount string `json:"actualDestAmount"`
	ActualSrcAmount  string `json:"actualSrcAmount"`
	Dest             string `json:"dest"`
	Source           string `json:"source"`

	BlockNumber string `json:"blockNumber"`
	Txhash      string `json:"txHash"`
	Timestamp   string `json:"timestamp"`
}

type EventRaw

type EventRaw struct {
	Timestamp   string `json:"timestamp"`
	BlockNumber string `json:"blockNumber"`
	Txhash      string `json:"transactionHash"`
	Data        string `json:"data"`
}

type GasPrice

type GasPrice struct {
	Fast     string `json:"fast"`
	Standard string `json:"standard"`
	Low      string `json:"low"`
	Default  string `json:"default"`
}

type MarketInfo

type MarketInfo struct {
	Rates  *Rates             `json:"rates"`
	Quotes map[string]QuoInfo `json:"quotes"`
}

func NewMarketInfo

func NewMarketInfo(quotes map[string]QuoInfo, rates *Rates) *MarketInfo

type QuoInfo

type QuoInfo struct {
	MarketCap float64 `json:"market_cap"`
	Volume24h float64 `json:"volume_24h"`
}

type Rate

type Rate struct {
	Source  string `json:"source"`
	Dest    string `json:"dest"`
	Rate    string `json:"rate"`
	Minrate string `json:"minRate"`
}

type RateHistory

type RateHistory struct {
	SellPrice string `json:"sell_price"`
	BuyPrice  string `json:"buy_price"`
}

type RateInfo

type RateInfo struct {
	LastSell      string                 `json:"last_sell"`
	LastBuy       string                 `json:"last_buy"`
	HistoryRecord map[int64]*RateHistory `json:"history_record"`
}

type RateUSD

type RateUSD struct {
	Symbol   string `json:"symbol"`
	PriceUsd string `json:"price_usd"`
}

type RateUSDCG

type RateUSDCG struct {
	MarketData struct {
		CurrentPrice struct {
			USD float64 `json:"usd"`
		} `json:"current_price"`
	} `json:"market_data"`
}

type Rates

type Rates struct {
	R float64   `json:"r"`
	P []float64 `json:"p"`
}

type ResultRpc

type ResultRpc struct {
	Result string `json:"result"`
}

type RightMarketInfo

type RightMarketInfo struct {
	Rate      *float64           `json:"rate"`
	Change24H string             `json:"change_24h"`
	Quotes    map[string]QuoInfo `json:"quotes"`
}

type StepRate

type StepRate struct {
	Source      string `json: "src"`
	Dest        string `json: "dest"`
	SrcDecimal  int
	DestDecimal int
	SrcAmount   *big.Int `json: "src_amount"`
	DestAmount  *big.Int `json: "dest_amount"`
}

type Token

type Token struct {
	Name       string `json:"name"`
	Symbol     string `json:"symbol"`
	Address    string `json:"address"`
	Decimal    int    `json:"decimals"`
	DelistTime uint64 `json:"delist_time"`
	CGId       string `json:"cg_id"`
	Priority   bool   `json:"priority"`
	TokenID    string `json:"token_id"`
}

func TokenAPIToToken

func TokenAPIToToken(tokenAPI TokenAPI) Token

type TokenAPI

type TokenAPI struct {
	Symbol      string `json:"symbol"`
	Name        string `json:"name"`
	Address     string `json:"address"`
	Decimals    int    `json:"decimals"`
	UsdID       string `json:"cmc_id"`
	TimeListing uint64 `json:"listing_time,omitempty"`
	CGId        string `json:"cg_id"`
}

type TokenConfig

type TokenConfig struct {
	Success bool    `json:"success"`
	Data    []Token `json:"data"`
}

type TokenGeneralInfo

type TokenGeneralInfo struct {
	CirculatingSupply float64            `json:"circulating_supply"`
	TotalSupply       float64            `json:"total_supply"`
	MaxSupply         float64            `json:"max_supply"`
	MarketCap         float64            `json:"market_cap"`
	Quotes            map[string]QuoInfo `json:"quotes"`
	Change24H         string             `json:"change_24h"`
}

type TokenInfo

type TokenInfo struct {
	TokenSymbol       string                  `json:"symbol"`
	CirculatingSupply string                  `json:"circulating_supply"`
	TotalSupply       string                  `json:"total_supply"`
	MaxSupply         string                  `json:"max_supply"`
	MarketCap         string                  `json:"market_cap"`
	SellPrice         string                  `json:"sell_price"`
	BuyPrice          string                  `json:"buy_price"`
	Last7days         map[uint64]CandleTicker `json:"last_7d"`
}

type TokenInfoCoinGecko

type TokenInfoCoinGecko struct {
	MarketData struct {
		MarketCap CurrencyData `json:"market_cap"`
		Volume24H CurrencyData `json:"total_volume"`
		Change24H float64      `json:"price_change_percentage_24h"`
	} `json:"market_data"`
}

func (TokenInfoCoinGecko) ToTokenInfoCMC

func (tokenInfo TokenInfoCoinGecko) ToTokenInfoCMC() TokenGeneralInfo

Jump to

Keyboard shortcuts

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