asset

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertAsset

func InsertAsset(asset Asset) (int, error)

func RemoveAsset

func RemoveAsset(assetID int) error

func UpdateAsset

func UpdateAsset(asset Asset) error

Types

type Asset

type Asset struct {
	ID               *int      `json:"id"`
	UUID             string    `json:"uuid"`
	Name             string    `json:"name"`
	AlternateName    string    `json:"alternateName"`
	Cusip            string    `json:"cusip"`
	Ticker           string    `json:"ticker"`
	BaseAssetID      *int      `json:"baseAssetId"`
	QuoteAssetID     *int      `json:"quoteAssetId"`
	Description      string    `json:"description"`
	AssetTypeID      *int      `json:"assetTypeId"`
	CreatedBy        string    `json:"createdBy"`
	CreatedAt        time.Time `json:"createdAt"`
	UpdatedBy        string    `json:"updatedBy"`
	UpdatedAt        time.Time `json:"updatedAt"`
	ChainID          *int      `json:"chainId"`
	CategoryID       *int      `json:"categoryId"`
	SubCategoryID    *int      `json:"subCategoryId"`
	IsDefaultQuote   *bool     `json:"isDefaultQuote"`
	IgnoreMarketData *bool     `json:"ignoreMarketData"`
	Decimals         *int      `json:"decimals"`
	ContractAddress  string    `json:"contractAddress"`
}

Asset

func GetAsset

func GetAsset(assetID int) (*Asset, error)

func GetAssetByBaseAndQuoteID

func GetAssetByBaseAndQuoteID(baseAssetID *int, quoteAssetID *int) (*Asset, error)

GetAssetByBaseAndQuoteID : get asset by base and quote id

func GetAssetByTicker

func GetAssetByTicker(ticker string) (*Asset, error)

GetAssetByTicker : get asset by ticker

func GetAssetList

func GetAssetList() ([]Asset, error)

func GetCryptoAssets

func GetCryptoAssets() ([]Asset, error)

func GetCryptoAssetsBySourceID

func GetCryptoAssetsBySourceID(sourceID *int, excludeIgnoreMarketData bool) ([]Asset, error)

func GetCurrentTradingAssets

func GetCurrentTradingAssets() ([]Asset, error)

func GetDefaultQuoteAssetList

func GetDefaultQuoteAssetList() ([]Asset, error)

func GetTopTenAssets

func GetTopTenAssets() ([]Asset, error)

type AssetWithSources

type AssetWithSources struct {
	Asset
	SourceID         *int   `json:"sourceId"`
	SourceIdentifier string `json:"sourceIdentifier"`
}

Asset

func GetAssetWithSourceByAssetIdAndSourceID added in v1.0.2

func GetAssetWithSourceByAssetIdAndSourceID(assetID *int, sourceID *int, excludeIgnoreMarketData bool) (*AssetWithSources, error)

func GetAssetWithSourceByAssetIdsAndSourceID added in v1.0.2

func GetAssetWithSourceByAssetIdsAndSourceID(assetIDs []int, sourceID *int, excludeIgnoreMarketData bool) ([]AssetWithSources, error)

func GetCryptoAssetsBySourceId

func GetCryptoAssetsBySourceId(sourceID *int, excludeIgnoreMarketData bool) ([]AssetWithSources, error)

func GetDefaultQuoteAssetListBySourceID

func GetDefaultQuoteAssetListBySourceID(sourceID *int) ([]AssetWithSources, error)

Jump to

Keyboard shortcuts

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