gethlyletrades

package
v2.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteGethTradesByBaseAssetId

func DeleteGethTradesByBaseAssetId(dbConnPgx utils.PgxIface, baseAssetID *int) error

func GetFirstNonProcessedSwapBlockNumberForTrades

func GetFirstNonProcessedSwapBlockNumberForTrades(dbConnPgx utils.PgxIface, baseAssetID *int) (*uint64, error)

func GetMinMaxBlocksOfMissingSwapByBaseAssetID

func GetMinMaxBlocksOfMissingSwapByBaseAssetID(dbConnPgx utils.PgxIface, baseAssetID *int) (*uint64, *uint64, error)

func GetMissingTradesFromSwapsByBaseAssetID

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

func GetMissingTxnHashesFromSwapsByBaseAssetID

func GetMissingTxnHashesFromSwapsByBaseAssetID(dbConnPgx utils.PgxIface, baseAssetID *int, maxBlockNumber *uint64) ([]string, error)

func GetStartAndEndBlockForNewTradesByBaseAssetID

func GetStartAndEndBlockForNewTradesByBaseAssetID(dbConnPgx utils.PgxIface, baseAssetID *int) (*uint64, *uint64, error)

func GetTotalGethTradeSwapCount

func GetTotalGethTradeSwapCount(dbConnPgx utils.PgxIface) (*int, error)

func GetTotalGethTradeTaxTransferCount

func GetTotalGethTradeTaxTransferCount(dbConnPgx utils.PgxIface) (*int, error)

func GetTotalTradesCount

func GetTotalTradesCount(dbConnPgx utils.PgxIface) (*int, error)

func InsertGethTrade

func InsertGethTrade(dbConnPgx utils.PgxIface, gethTrade *GethTrade) (int, string, error)

func InsertGethTradeSwap

func InsertGethTradeSwap(dbConnPgx utils.PgxIface, gethTradeSwap *GethTradeSwap) (int, int, error)

func InsertGethTradeSwaps

func InsertGethTradeSwaps(dbConnPgx utils.PgxIface, gethTradeSwaps []GethTradeSwap) error

func InsertGethTradeTaxTransfer

func InsertGethTradeTaxTransfer(dbConnPgx utils.PgxIface, gethTradeTaxTransfer *GethTradeTaxTransfer) (int, int, error)

func InsertGethTradeTaxTransfers

func InsertGethTradeTaxTransfers(dbConnPgx utils.PgxIface, gethTradeTaxTransfers []GethTradeTaxTransfer) error

func InsertGethTrades

func InsertGethTrades(dbConnPgx utils.PgxIface, gethTrades []GethTrade) error

func RemoveGethTrade

func RemoveGethTrade(dbConnPgx utils.PgxIface, gethTradeID *int) error

func RemoveGethTradeSwap

func RemoveGethTradeSwap(dbConnPgx utils.PgxIface, gethTradeID, gethGethSwapID *int) error

func RemoveGethTradeTaxTransfer

func RemoveGethTradeTaxTransfer(dbConnPgx utils.PgxIface, gethTradeID, gethGethTransferID *int) error

func UpdateGethTrade

func UpdateGethTrade(dbConnPgx utils.PgxIface, gethTrade *GethTrade) error

func UpdateGethTradeSwap

func UpdateGethTradeSwap(dbConnPgx utils.PgxIface, gethTradeSwap *GethTradeSwap) error

func UpdateGethTradeTaxTransfer

func UpdateGethTradeTaxTransfer(dbConnPgx utils.PgxIface, gethTradeTaxTransfer *GethTradeTaxTransfer) error

Types

type GethTrade

type GethTrade struct {
	ID                     *int             `json:"id" db:"id"`                                            //1
	UUID                   string           `json:"uuid" db:"uuid"`                                        //2
	Name                   string           `json:"name" db:"name"`                                        //3
	AlternateName          string           `json:"alternateName" db:"alternate_name"`                     //4
	AddressStr             string           `json:"addressStr" db:"address_str"`                           //5
	AddressID              *int             `json:"addressId" db:"address_id"`                             //6
	TradeDate              *time.Time       `json:"tradeDate" db:"trade_date"`                             //7
	TxnHash                string           `json:"txnHash" db:"txn_hash"`                                 //8
	Token0Amount           *decimal.Decimal `json:"token0Amount" db:"token0_amount"`                       //9
	Token0AmountDecimalAdj *decimal.Decimal `json:"token0AmountDecimalAdj" db:"token0_amount_decimal_adj"` //10
	Token1Amount           *decimal.Decimal `json:"token1Amount" db:"token1_amount"`                       //11
	Token1AmountDecimalAdj *decimal.Decimal `json:"token1AmountDecimalAdj" db:"token1_amount_decimal_adj"` //12
	IsBuy                  *bool            `json:"isBuy" db:"is_buy"`                                     //13
	Price                  *decimal.Decimal `json:"price" db:"price"`                                      //14
	PriceUSD               *decimal.Decimal `json:"priceUsd" db:"price_usd"`                               //15
	LPToken1PriceUSD       *decimal.Decimal `json:"lpToken1PriceUsd" db:"lp_token1_price_usd"`             //16
	TotalAmountUSD         *decimal.Decimal `json:"totalAmountUsd" db:"total_amount_usd"`                  //17
	Token0AssetId          *int             `json:"token0Id" db:"token0_asset_id"`                         //18
	Token1AssetId          *int             `json:"token1Id" db:"token1_asset_id"`                         //19
	GethProcessJobID       *int             `json:"gethProcessJobId" db:"geth_process_job_id"`             //20
	StatusID               *int             `json:"statusId" db:"status_id"`                               //21
	TradeTypeID            *int             `json:"tradeTypeId" db:"trade_type_id"`                        //22
	Description            string           `json:"description" db:"description"`                          //23
	CreatedBy              string           `json:"createdBy" db:"created_by"`                             //24
	CreatedAt              time.Time        `json:"createdAt" db:"created_at"`                             //25
	UpdatedBy              string           `json:"updatedBy" db:"updated_by"`                             //26
	UpdatedAt              time.Time        `json:"updatedAt" db:"updated_at"`                             //27
	BaseAssetID            *int             `json:"baseAssetId" db:"base_asset_id"`                        //28
	OraclePriceUSD         *decimal.Decimal `json:"oraclePriceUsd" db:"oracle_price_usd"`                  //29
	OraclePriceAssetID     *int             `json:"oraclePriceAssetId" db:"oracle_price_asset_id"`         //30
}

func GetGethTrade

func GetGethTrade(dbConnPgx utils.PgxIface, gethTradeID *int) (*GethTrade, error)

func GetGethTradeByFromAddress

func GetGethTradeByFromAddress(dbConnPgx utils.PgxIface, addressStr string) ([]GethTrade, error)

func GetGethTradeByFromAddressId

func GetGethTradeByFromAddressId(dbConnPgx utils.PgxIface, addressID *int) ([]GethTrade, error)

func GetGethTradeByStartAndEndDates

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

func GetGethTradeByUUIDs

func GetGethTradeByUUIDs(dbConnPgx utils.PgxIface, UUIDList []string) ([]GethTrade, error)

func GetGethTradeList

func GetGethTradeList(dbConnPgx utils.PgxIface) ([]GethTrade, error)

func GetGethTradeListByPagination

func GetGethTradeListByPagination(dbConnPgx utils.PgxIface, _start, _end *int, _order, _sort string, _filters []string) ([]GethTrade, error)

for refinedev

func GetLatestGethTradeFromAssetIDAnDate

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

type GethTradeSwap

type GethTradeSwap struct {
	GethTradeID   *int      `json:"gethTradeId" db:"geth_trade_id"`    //1
	GethSwapID    *int      `json:"gethSwapId"  db:"geth_swap_id"`     //2
	UUID          string    `json:"uuid" db:"uuid"`                    //3
	Name          string    `json:"name" db:"name"`                    //4
	AlternateName string    `json:"alternateName" db:"alternate_name"` //5
	Description   string    `json:"description" db:"description"`      //6
	CreatedBy     string    `json:"createdBy" db:"created_by"`         //7
	CreatedAt     time.Time `json:"createdAt" db:"created_at"`         //8
	UpdatedBy     string    `json:"updatedBy" db:"updated_by"`         //9
	UpdatedAt     time.Time `json:"updatedAt" db:"updated_at"`         //10
}

Asset

func GetAllGethTradeSwapsByTradeID

func GetAllGethTradeSwapsByTradeID(dbConnPgx utils.PgxIface, gethTradeID *int) ([]GethTradeSwap, error)

func GetGethTradeSwap

func GetGethTradeSwap(dbConnPgx utils.PgxIface, gethGethSwapID, gethTradeID *int) (*GethTradeSwap, error)

func GetGethTradeSwapList

func GetGethTradeSwapList(dbConnPgx utils.PgxIface, gethTradeIds []int, swapIds []int) ([]GethTradeSwap, error)

func GetGethTradeSwapListByPagination

func GetGethTradeSwapListByPagination(dbConnPgx utils.PgxIface, _start, _end *int, _order, _sort string, _filters []string) ([]GethTradeSwap, error)

for refinedev

type GethTradeTaxTransfer

type GethTradeTaxTransfer struct {
	GethTradeID    *int      `json:"gethTradeId" db:"geth_trade_id"`       //1
	GethTransferID *int      `json:"gethTransferId" db:"geth_transfer_id"` //2
	TaxID          *int      `json:"taxId" db:"tax_id"`                    //3
	UUID           string    `json:"uuid" db:"uuid"`                       //4
	Name           string    `json:"name" db:"name"`                       //5
	AlternateName  string    `json:"alternateName" db:"alternate_name"`    //6
	Description    string    `json:"description" db:"description"`         //7
	CreatedBy      string    `json:"createdBy" db:"created_by"`            //8
	CreatedAt      time.Time `json:"createdAt" db:"created_at"`            //9
	UpdatedBy      string    `json:"updatedBy" db:"updated_by"`            //10
	UpdatedAt      time.Time `json:"updatedAt" db:"updated_at"`            //11
}

Asset

func GetAllGethTradeTaxTransfersByTradeID

func GetAllGethTradeTaxTransfersByTradeID(dbConnPgx utils.PgxIface, gethTradeID *int) ([]GethTradeTaxTransfer, error)

func GetGethTradeTaxTransfer

func GetGethTradeTaxTransfer(dbConnPgx utils.PgxIface, gethTradeID, gethGethTransferID *int) (*GethTradeTaxTransfer, error)

func GetGethTradeTaxTransferList

func GetGethTradeTaxTransferList(dbConnPgx utils.PgxIface, gethTradeIds []int, swapIds []int) ([]GethTradeTaxTransfer, error)

func GetGethTradeTaxTransferListByPagination

func GetGethTradeTaxTransferListByPagination(dbConnPgx utils.PgxIface, _start, _end *int, _order, _sort string, _filters []string) ([]GethTradeTaxTransfer, error)

for refinedev

type NetTransferByAddress

type NetTransferByAddress struct {
	TxnHash    string           `json:"txnHash" db:"txn_hash"`       //1
	AddressStr string           `json:"addressStr" db:"address_str"` //2
	AssetID    *int             `json:"addressId" db:"asset_id"`     //3
	NetAmount  *decimal.Decimal `json:"netAmount" db:"net_amount"`   //4
	asset.Asset
}

func GetFromNetTransfersByTxnHashesAndAddressStrs

func GetFromNetTransfersByTxnHashesAndAddressStrs(dbConnPgx utils.PgxIface, txnHashes []string, baseAssetID *int) ([]NetTransferByAddress, error)

func GetNetTransfersByTxnHashAndAddressStrs

func GetNetTransfersByTxnHashAndAddressStrs(dbConnPgx utils.PgxIface, 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