gethlyletrades

package
v1.3.57 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGethTradesByBaseAssetId added in v1.3.13

func DeleteGethTradesByBaseAssetId(baseAssetID *int) error

func GetFirstNonProcessedSwapBlockNumberForTrades added in v1.3.3

func GetFirstNonProcessedSwapBlockNumberForTrades(baseAssetID *int) (int, error)

func GetMinMaxBlocksOfMissingSwapByBaseAssetID added in v1.3.12

func GetMinMaxBlocksOfMissingSwapByBaseAssetID(baseAssetID *int) (int, int, error)

func GetMissingTradesFromSwapsByBaseAssetID added in v1.3.12

func GetMissingTradesFromSwapsByBaseAssetID(baseAssetID *int) ([]gethlyleswaps.GethSwap, error)

func GetMissingTxnHashesFromSwapsByBaseAssetID added in v1.3.12

func GetMissingTxnHashesFromSwapsByBaseAssetID(baseAssetID, maxBlockNumber *int) ([]string, error)

func GetStartAndEndBlockForNewTradesByBaseAssetID added in v1.3.13

func GetStartAndEndBlockForNewTradesByBaseAssetID(baseAssetID *int) (*uint64, *uint64, error)

func InsertGethTrade

func InsertGethTrade(gethTrade *GethTrade) (int, string, error)

func InsertGethTradeSwap

func InsertGethTradeSwap(gethTradeSwap GethTradeSwap) (int, int, error)

func InsertGethTradeSwaps

func InsertGethTradeSwaps(gethTradeSwaps []*GethTradeSwap) error

func InsertGethTradeTaxTransfer

func InsertGethTradeTaxTransfer(gethTradeTaxTransfer GethTradeTaxTransfer) (int, int, error)

func InsertGethTradeTaxTransfers

func InsertGethTradeTaxTransfers(gethTradeTaxTransfers []*GethTradeTaxTransfer) error

func InsertGethTrades

func InsertGethTrades(gethTrades []*GethTrade) error

func RemoveGethTrade added in v1.3.1

func RemoveGethTrade(gethTradeID int) error

func RemoveGethTradeSwap

func RemoveGethTradeSwap(gethTradeID int, gethGethSwapID int) error

func RemoveGethTradeTaxTransfer

func RemoveGethTradeTaxTransfer(gethTradeID int, gethGethTransferID int) error

func UpdateGethTrade

func UpdateGethTrade(gethTrade GethTrade) error

func UpdateGethTradeSwap

func UpdateGethTradeSwap(gethTradeSwap GethTradeSwap) error

func UpdateGethTradeTaxTransfer

func UpdateGethTradeTaxTransfer(gethTradeTaxTransfer GethTradeTaxTransfer) error

Types

type GethTrade

type GethTrade struct {
	ID                     *int             `json:"id"`
	UUID                   string           `json:"uuid"`
	Name                   string           `json:"name"`
	AlternateName          string           `json:"alternateName"`
	AddressStr             string           `json:"addressStr"`
	AddressID              *int             `json:"addressId"`
	TradeDate              time.Time        `json:"tradeDate"`
	TxnHash                string           `json:"txnHash"`
	Token0Amount           *decimal.Decimal `json:"token0Amount"`
	Token0AmountDecimalAdj *decimal.Decimal `json:"token0AmountDecimalAdj"`
	Token1Amount           *decimal.Decimal `json:"token1Amount"`
	Token1AmountDecimalAdj *decimal.Decimal `json:"token1AmountDecimalAdj"`
	IsBuy                  *bool            `json:"isBuy"`
	Price                  *decimal.Decimal `json:"price"`
	PriceUSD               *decimal.Decimal `json:"priceUsd"`
	LPToken1PriceUSD       *decimal.Decimal `json:"lpToken1PriceUsd"`
	TotalAmountUSD         *decimal.Decimal `json:"totalAmountUsd"`
	Token0AssetId          *int             `json:"token0Id"`
	Token1AssetId          *int             `json:"token1Id"`
	GethProcessJobID       *int             `json:"gethProcessJobId"`
	StatusID               *int             `json:"statusId"`
	TradeTypeID            *int             `json:"tradeTypeId"`
	Description            string           `json:"description"`
	CreatedBy              string           `json:"createdBy"`
	CreatedAt              time.Time        `json:"createdAt"`
	UpdatedBy              string           `json:"updatedBy"`
	UpdatedAt              time.Time        `json:"updatedAt"`
	BaseAssetID            *int             `json:"baseAssetId"`
	OraclePriceUSD         *decimal.Decimal `json:"oraclePriceUsd"`
	OraclePriceAssetID     *int             `json:"oraclePriceAssetId"`
}

func GetGethTrade

func GetGethTrade(gethTradeID int) (*GethTrade, error)

func GetGethTradeByFromAddress

func GetGethTradeByFromAddress(addressStr string) ([]GethTrade, error)

func GetGethTradeByFromAddressId

func GetGethTradeByFromAddressId(addressID *int) ([]*GethTrade, error)

func GetGethTradeByStartAndEndDates

func GetGethTradeByStartAndEndDates(startDate, endDate time.Time) ([]GethTrade, error)

func GetGethTradeByUUIDs

func GetGethTradeByUUIDs(UUIDList []string) ([]*GethTrade, error)

func GetGethTradeList added in v1.3.1

func GetGethTradeList() ([]GethTrade, error)

func GetLatestGethTradeFromAssetIDAnDate added in v1.3.49

func GetLatestGethTradeFromAssetIDAnDate(assetID *int, asOfDate *time.Time, isBefore *bool) (*GethTrade, error)

type GethTradeSwap

type GethTradeSwap struct {
	GethTradeID   *int      `json:"gethTradeId"`
	GethSwapID    *int      `json:"gethSwapId"`
	UUID          string    `json:"uuid"`
	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"`
}

Asset

func GetAllGethTradeSwapsByTradeID

func GetAllGethTradeSwapsByTradeID(gethTradeID int) ([]GethTradeSwap, error)

func GetGethTradeSwap

func GetGethTradeSwap(gethGethSwapID int, gethTradeID int) (*GethTradeSwap, error)

func GetGethTradeSwapList

func GetGethTradeSwapList(gethTradeIds []int, swapIds []int) ([]GethTradeSwap, error)

type GethTradeTaxTransfer

type GethTradeTaxTransfer struct {
	GethTradeID    *int      `json:"gethTradeId"`
	GethTransferID *int      `json:"gethTransferId"`
	TaxID          *int      `json:"taxId"`
	UUID           string    `json:"uuid"`
	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"`
}

Asset

func GetAllGethTradeTaxTransfersByTradeID

func GetAllGethTradeTaxTransfersByTradeID(gethTradeID int) ([]GethTradeTaxTransfer, error)

func GetGethTradeTaxTransfer

func GetGethTradeTaxTransfer(gethTradeID int, gethGethTransferID int) (*GethTradeTaxTransfer, error)

func GetGethTradeTaxTransferList

func GetGethTradeTaxTransferList(gethTradeIds []int, swapIds []int) ([]GethTradeTaxTransfer, error)

type NetTransferByAddress

type NetTransferByAddress struct {
	TxnHash    string           `json:"txnHash"`
	AddressStr string           `json:"addressStr"`
	AssetID    *int             `json:"addressId"`
	NetAmount  *decimal.Decimal `json:"netAmount"`
	asset.Asset
}

func GetFromNetTransfersByTxnHashesAndAddressStrs added in v1.3.15

func GetFromNetTransfersByTxnHashesAndAddressStrs(txnHashes []string, baseAssetID *int) ([]*NetTransferByAddress, error)

func GetNetTransfersByTxnHashAndAddressStrs

func GetNetTransfersByTxnHashAndAddressStrs(txnHash, addressStr string, baseAssetID *int) ([]*NetTransferByAddress, error)

Jump to

Keyboard shortcuts

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