liquiditypool

package
v1.0.64 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertLiquidityPool

func InsertLiquidityPool(liquidityPool LiquidityPool) (int, error)

func InsertLiquidityPoolAsset added in v1.0.53

func InsertLiquidityPoolAsset(liquidityPoolAsset LiquidityPoolAsset) (int, error)

func InsertLiquidityPoolAssets added in v1.0.53

func InsertLiquidityPoolAssets(liquidityPoolAssets []LiquidityPoolAsset) error

func InsertLiquidityPools

func InsertLiquidityPools(liquidityPools []LiquidityPool) error

func RemoveLiquidityPool

func RemoveLiquidityPool(liquidityPoolID int) error

func UpdateLiquidityPool

func UpdateLiquidityPool(liquidityPool LiquidityPool) error

func UpdateLiquidityPoolAssetByUUID

func UpdateLiquidityPoolAssetByUUID(liquidityPoolAsset LiquidityPoolAsset) error

Types

type LiquidityPool

type LiquidityPool struct {
	ID                  *int      `json:"id"`
	UUID                string    `json:"uuid"`
	Name                string    `json:"name"`
	AlternateName       string    `json:"alternateName"`
	PairAddress         string    `json:"pairAddress"`
	ChainID             *int      `json:"chainId"`
	ExchangeID          *int      `json:"exchangeId"`
	LiquidityPoolTypeID *int      `json:"liquidityPoolTypeId"`
	Token0ID            *int      `json:"token0Id"`
	Token1ID            *int      `json:"token1Id"`
	Url                 string    `json:"url"`
	StartBlock          *int      `json:"startBlock"`
	LatestBlockSynced   *int      `json:"latestBlockSynced"`
	CreatedTxnHash      string    `json:"createdTxnHash"`
	IsActive            bool      `json:"isActive"`
	Description         string    `json:"description"`
	CreatedBy           string    `json:"createdBy"`
	CreatedAt           time.Time `json:"createdAt"`
	UpdatedBy           string    `json:"updatedBy"`
	UpdatedAt           time.Time `json:"updatedAt"`
}

func GetLiquidityPool

func GetLiquidityPool(liquidityPoolID int) (*LiquidityPool, error)

func GetLiquidityPoolList

func GetLiquidityPoolList(ids []int) ([]LiquidityPool, error)

func GetLiquidityPools

func GetLiquidityPools() ([]LiquidityPool, error)

func GetLiquidityPoolsByUUIDs

func GetLiquidityPoolsByUUIDs(UUIDList []string) ([]LiquidityPool, error)

func GetStartAndEndDateDiffLiquidityPools

func GetStartAndEndDateDiffLiquidityPools(diffInDate int) ([]LiquidityPool, error)

type LiquidityPoolAsset

type LiquidityPoolAsset struct {
	UUID            string    `json:"uuid"`
	LiquidityPoolID *int      `json:"liquidityPoolId"`
	AssetID         *int      `json:"assetId"`
	TokenNumber     *int      `json:"tokenNumber"`
	Name            string    `json:"name"`
	AlternateName   string    `json:"alternateName"`
	Description     string    `json:"description"`
	CreatedBy       string    `json:"createdBy"`
	CreatedAt       time.Time `json:"createdAt"`
	UpdatedBy       string    `json:"updatedBy"`
	UpdatedAt       time.Time `json:"updatedAt"`
}

type LiquidityPoolWithTokens added in v1.0.62

type LiquidityPoolWithTokens struct {
	LiquidityPool
	Token0 asset.Asset `json:"token0"`
	Token1 asset.Asset `json:"token1"`
}

func GetLiquidityPoolListByToken0 added in v1.0.62

func GetLiquidityPoolListByToken0(asset0ID *int) ([]LiquidityPoolWithTokens, error)

Jump to

Keyboard shortcuts

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