gethlyletrades

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGethTradesByToken0Id

func DeleteGethTradesByToken0Id(token0ID *int) error

func GetFirstNonProcessedSwapBlockNumberForTrades added in v1.3.3

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

func GetMinMaxBlocksOfMissingSwapByToken0AssetID

func GetMinMaxBlocksOfMissingSwapByToken0AssetID(token0AssetID *int) (int, int, error)

func GetMissingTradesFromSwapsByToken0AssetID

func GetMissingTradesFromSwapsByToken0AssetID(token0AssetID *int) ([]gethlyleswaps.GethSwap, error)

func GetMissingTxnHashesFromSwapsByToken0AssetID

func GetMissingTxnHashesFromSwapsByToken0AssetID(token0AssetID, maxBlockNumber *int) ([]string, error)

func GetStartAndEndBlockForNewTradesByAssetID

func GetStartAndEndBlockForNewTradesByAssetID(assetID *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"`
}

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)

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 {
	AddressStr string           `json:"addressStr"`
	AssetID    *int             `json:"addressId"`
	NetAmount  *decimal.Decimal `json:"netAmount"`
	asset.Asset
}

func GetNetTransfersByTxnHashAndAddressStrs

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

Jump to

Keyboard shortcuts

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