asset

package
v1.3.63 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLookupByContractAddressFromAssetList added in v1.3.0

func CreateLookupByContractAddressFromAssetList(assetList []Asset) map[string]*Asset

lowercase for the contract address

func GetTotalAssetCount added in v1.1.3

func GetTotalAssetCount() (*int, error)

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"`
	StartingBlockNumber *uint64   `json:"startingBlockNumber"`
	ImportGeth          *bool     `json:"importGeth"`
	ImportGethInitial   *bool     `json:"importGethInitial"`
}

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 GetAssetByContractAddress added in v1.0.49

func GetAssetByContractAddress(contractAddress string) (*Asset, error)

GetAssetByContractAddress : get asset by contract address

func GetAssetByCusip added in v1.0.49

func GetAssetByCusip(cusip string) (*Asset, error)

GetAssetByCusip : get asset by cusip

func GetAssetByTicker

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

GetAssetByTicker : get asset by ticker

func GetAssetList

func GetAssetList(ids []int) ([]Asset, error)

func GetAssetListByPagination added in v1.1.3

func GetAssetListByPagination(_start, _end *int, _order, _sort string, _filters []string) ([]Asset, error)

for refinedev

func GetAssetsByChainId added in v1.3.0

func GetAssetsByChainId(chainID *int) ([]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 GetGethImportAssets added in v1.0.67

func GetGethImportAssets() ([]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 GetAssetsByAssetTypeAndSource added in v1.0.32

func GetAssetsByAssetTypeAndSource(assetTypeID *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