collection

package
v0.0.0-...-d2cb140 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Persist

func Persist(db *sqlx.DB, chain, day string, nft *NFT, stats *Stats) error

Types

type NFT

type NFT struct {
	DataSource      string `json:"data_source_name" db:"data_source_name"`
	Chain           string `json:"chain" db:"chain"`
	Slug            string `json:"slug" db:"slug"`
	Name            string `json:"name" db:"name"`
	ImageURL        string `json:"large_image_url" db:"image_url"`
	DiscordURL      string `json:"discord_url" db:"discord_url"`
	URL             string `json:"external_url" db:"url"`
	SafelistStatus  string `json:"safelist_request_status" db:"safelist_status"`
	TwitterHandle   string `json:"twitter_username" db:"twitter_handle"`
	InstagramHandle string `json:"instagram_username" db:"instagram_handle"`
}

func ParseNFT

func ParseNFT(ds, chain, path string) (*NFT, error)

type Stats

type Stats struct {
	Day1Volume    decimal.Decimal `json:"one_day_volume" db:"d1_volume"`
	Day1Change    decimal.Decimal `json:"one_day_change" db:"d1_change"`
	Day1Sales     decimal.Decimal `json:"one_day_sales" db:"d1_sales"`
	Day1AvgPrice  decimal.Decimal `json:"one_day_average_price" db:"d1_avg_price"`
	Day7Volume    decimal.Decimal `json:"seven_day_volume" db:"d7_volume"`
	Day7Change    decimal.Decimal `json:"seven_day_change" db:"d7_change"`
	Day7Sales     decimal.Decimal `json:"seven_day_sales" db:"d7_sales"`
	Day7AvgPrice  decimal.Decimal `json:"seven_day_average_price" db:"d7_avg_price"`
	Day30Volume   decimal.Decimal `json:"thirty_day_volume" db:"d30_volume"`
	Day30Change   decimal.Decimal `json:"thirty_day_change" db:"d30_change"`
	Day30Sales    decimal.Decimal `json:"thirty_day_sales" db:"d30_sales"`
	Day30AvgPrice decimal.Decimal `json:"thirty_day_average_price" db:"d30_avg_price"`
	TotalVolume   decimal.Decimal `json:"total_volume" db:"total_volume"`
	TotalSales    decimal.Decimal `json:"total_sales" db:"total_sales"`
	TotalSupply   decimal.Decimal `json:"total_supply" db:"total_supply"`
	Owners        decimal.Decimal `json:"num_owners" db:"owners"`
	AvgPrice      decimal.Decimal `json:"average_price" db:"avg_price"`
	MarketCap     decimal.Decimal `json:"market_cap" db:"market_cap"`
	FloorPrice    decimal.Decimal `json:"floor_price" db:"floor_price"`
}

func ParseStats

func ParseStats(ds, chain, path string) (*Stats, error)

Jump to

Keyboard shortcuts

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