Documentation
¶
Index ¶
- Constants
- Variables
- func Close()
- func ErrorCode(err error) string
- func Init(ctx context.Context, dbSource string, migrationURL string)
- type CancelAllOrdersParams
- type CancelOrderParams
- type CancelOrderRow
- type ChatThread
- type CountOrdersByWalletParams
- type CreateBatchYieldMetricsTxResult
- type CreatePoolParams
- type CreateTokenParams
- type DBTX
- type FillOrderParams
- type FillTwapOrderParams
- type GetChatThreadParams
- type GetChatThreadsParams
- type GetOrderByIDParams
- type GetOrderByIDRow
- type GetOrdersByWalletParams
- type GetOrdersByWalletRow
- type GetPoolByTokenParams
- type GetYieldMetricsForChatRow
- type GetYieldMetricsParams
- type InsertOrderParams
- type InsertOrderRow
- type ListOrdersByWalletResult
- type ListThreadsByWalletResult
- type NullOrderSide
- type NullOrderStatus
- type NullOrderType
- type Order
- type OrderSide
- type OrderStatus
- type OrderType
- type Pool
- type PoolDetailsRow
- type Price
- type Querier
- type Queries
- func (q *Queries) CancelAllOrders(ctx context.Context, arg CancelAllOrdersParams) error
- func (q *Queries) CancelOrder(ctx context.Context, arg CancelOrderParams) (CancelOrderRow, error)
- func (q *Queries) CountChatThreads(ctx context.Context, userAddress string) (int64, error)
- func (q *Queries) CountOrdersByWallet(ctx context.Context, arg CountOrdersByWalletParams) (int64, error)
- func (q *Queries) CreatePool(ctx context.Context, arg CreatePoolParams) (Pool, error)
- func (q *Queries) CreateToken(ctx context.Context, arg CreateTokenParams) (Token, error)
- func (q *Queries) FillOrder(ctx context.Context, arg FillOrderParams) (Order, error)
- func (q *Queries) FillTwapOrder(ctx context.Context, arg FillTwapOrderParams) (Order, error)
- func (q *Queries) GetChatThread(ctx context.Context, arg GetChatThreadParams) (ChatThread, error)
- func (q *Queries) GetChatThreads(ctx context.Context, arg GetChatThreadsParams) ([]ChatThread, error)
- func (q *Queries) GetLatestYieldMetric(ctx context.Context) (YieldMetric, error)
- func (q *Queries) GetMatchedOrder(ctx context.Context, price pgtype.Numeric) (Order, error)
- func (q *Queries) GetMatchedTwapOrder(ctx context.Context) ([]Order, error)
- func (q *Queries) GetOrderByID(ctx context.Context, arg GetOrderByIDParams) (GetOrderByIDRow, error)
- func (q *Queries) GetOrdersByWallet(ctx context.Context, arg GetOrdersByWalletParams) ([]GetOrdersByWalletRow, error)
- func (q *Queries) GetPool(ctx context.Context, id string) (Pool, error)
- func (q *Queries) GetPoolByToken(ctx context.Context, arg GetPoolByTokenParams) (Pool, error)
- func (q *Queries) GetPools(ctx context.Context) ([]Pool, error)
- func (q *Queries) GetPoolsByIDs(ctx context.Context, ids []string) ([]Pool, error)
- func (q *Queries) GetYieldMetrics(ctx context.Context, arg GetYieldMetricsParams) ([]YieldMetric, error)
- func (q *Queries) GetYieldMetricsForChat(ctx context.Context, dollar_1 []string) ([]GetYieldMetricsForChatRow, error)
- func (q *Queries) InsertOrder(ctx context.Context, arg InsertOrderParams) (InsertOrderRow, error)
- func (q *Queries) PoolDetails(ctx context.Context, id string) (PoolDetailsRow, error)
- func (q *Queries) RejectOrder(ctx context.Context, arg RejectOrderParams) (Order, error)
- func (q *Queries) UpsertChatThread(ctx context.Context, arg UpsertChatThreadParams) (ChatThread, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type RejectOrderParams
- type SqlStore
- func (store *SqlStore) CreateBatchYieldMetricsTx(ctx context.Context, yieldMetrics []*YieldMetricData) (CreateBatchYieldMetricsTxResult, error)
- func (store *SqlStore) ListOrdersByWalletTx(ctx context.Context, params GetOrdersByWalletParams) (*ListOrdersByWalletResult, error)
- func (store *SqlStore) ListThreadsTx(ctx context.Context, params GetChatThreadsParams) (*ListThreadsByWalletResult, error)
- type Token
- type UpsertChatThreadParams
- type YieldMetric
- type YieldMetricData
Constants ¶
View Source
const ( ForeignKeyViolation = "23503" UniqueViolation = "23505" )
Variables ¶
View Source
var ErrRecordNotFound = pgx.ErrNoRows
View Source
var ErrUniqueViolation = &pgconn.PgError{ Code: UniqueViolation, }
Functions ¶
Types ¶
type CancelAllOrdersParams ¶
type CancelOrderParams ¶
type CancelOrderRow ¶
type CancelOrderRow struct {
ID int64 `json:"id"`
PoolIds []string `json:"poolIds"`
ParentID pgtype.Int8 `json:"parentId"`
Wallet string `json:"wallet"`
Status OrderStatus `json:"status"`
Side OrderSide `json:"side"`
Type OrderType `json:"type"`
Price pgtype.Numeric `json:"price"`
Amount pgtype.Numeric `json:"amount"`
Slippage pgtype.Float8 `json:"slippage"`
TwapIntervalSeconds pgtype.Int4 `json:"twapIntervalSeconds"`
TwapExecutedTimes pgtype.Int4 `json:"twapExecutedTimes"`
TwapCurrentExecutedTimes pgtype.Int4 `json:"twapCurrentExecutedTimes"`
TwapMinPrice pgtype.Numeric `json:"twapMinPrice"`
TwapMaxPrice pgtype.Numeric `json:"twapMaxPrice"`
Deadline pgtype.Timestamp `json:"deadline"`
Nonce int64 `json:"nonce"`
Paths string `json:"paths"`
TxHash pgtype.Text `json:"txHash"`
ActualAmount pgtype.Numeric `json:"actualAmount"`
PartialFilledAt pgtype.Timestamp `json:"partialFilledAt"`
FilledAt pgtype.Timestamp `json:"filledAt"`
RejectedAt pgtype.Timestamp `json:"rejectedAt"`
CancelledAt pgtype.Timestamp `json:"cancelledAt"`
CreatedAt pgtype.Timestamp `json:"createdAt"`
}
type ChatThread ¶
type CountOrdersByWalletParams ¶
type CountOrdersByWalletParams struct {
Wallet string `json:"wallet"`
Status []OrderStatus `json:"status"`
NotStatus []OrderStatus `json:"notStatus"`
Types []OrderType `json:"types"`
Side NullOrderSide `json:"side"`
ParentID pgtype.Int8 `json:"parentId"`
}
type CreateBatchYieldMetricsTxResult ¶
type CreateBatchYieldMetricsTxResult struct {
RowsAffected int64
}
type CreatePoolParams ¶
type CreateTokenParams ¶
type FillOrderParams ¶
type FillTwapOrderParams ¶
type FillTwapOrderParams struct {
Status OrderStatus `json:"status"`
TwapCurrentExecutedTimes pgtype.Int4 `json:"twapCurrentExecutedTimes"`
PartialFilledAt pgtype.Timestamp `json:"partialFilledAt"`
FilledAt pgtype.Timestamp `json:"filledAt"`
ActualAmount pgtype.Numeric `json:"actualAmount"`
ID int64 `json:"id"`
}
type GetChatThreadParams ¶
type GetChatThreadsParams ¶
type GetOrderByIDParams ¶
type GetOrderByIDRow ¶
type GetOrderByIDRow struct {
ID int64 `json:"id"`
PoolIds []string `json:"poolIds"`
ParentID pgtype.Int8 `json:"parentId"`
Wallet string `json:"wallet"`
Status OrderStatus `json:"status"`
Side OrderSide `json:"side"`
Type OrderType `json:"type"`
Price pgtype.Numeric `json:"price"`
Amount pgtype.Numeric `json:"amount"`
Slippage pgtype.Float8 `json:"slippage"`
TwapIntervalSeconds pgtype.Int4 `json:"twapIntervalSeconds"`
TwapExecutedTimes pgtype.Int4 `json:"twapExecutedTimes"`
TwapCurrentExecutedTimes pgtype.Int4 `json:"twapCurrentExecutedTimes"`
TwapMinPrice pgtype.Numeric `json:"twapMinPrice"`
TwapMaxPrice pgtype.Numeric `json:"twapMaxPrice"`
TwapStartedAt pgtype.Timestamp `json:"twapStartedAt"`
Deadline pgtype.Timestamp `json:"deadline"`
Nonce int64 `json:"nonce"`
Paths string `json:"paths"`
TxHash pgtype.Text `json:"txHash"`
ActualAmount pgtype.Numeric `json:"actualAmount"`
PartialFilledAt pgtype.Timestamp `json:"partialFilledAt"`
FilledAt pgtype.Timestamp `json:"filledAt"`
RejectedAt pgtype.Timestamp `json:"rejectedAt"`
CancelledAt pgtype.Timestamp `json:"cancelledAt"`
CreatedAt pgtype.Timestamp `json:"createdAt"`
}
type GetOrdersByWalletParams ¶
type GetOrdersByWalletParams struct {
Wallet string `json:"wallet"`
Limit int32 `json:"limit"`
Offset int32 `json:"offset"`
Status []OrderStatus `json:"status"`
NotStatus []OrderStatus `json:"notStatus"`
Types []OrderType `json:"types"`
Side NullOrderSide `json:"side"`
ParentID pgtype.Int8 `json:"parentId"`
}
type GetOrdersByWalletRow ¶
type GetOrdersByWalletRow struct {
ID int64 `json:"id"`
PoolIds []string `json:"poolIds"`
ParentID pgtype.Int8 `json:"parentId"`
Wallet string `json:"wallet"`
Status OrderStatus `json:"status"`
Side OrderSide `json:"side"`
Type OrderType `json:"type"`
Price pgtype.Numeric `json:"price"`
Amount pgtype.Numeric `json:"amount"`
ActualAmount pgtype.Numeric `json:"actualAmount"`
Slippage pgtype.Float8 `json:"slippage"`
TwapIntervalSeconds pgtype.Int4 `json:"twapIntervalSeconds"`
TwapExecutedTimes pgtype.Int4 `json:"twapExecutedTimes"`
TwapCurrentExecutedTimes pgtype.Int4 `json:"twapCurrentExecutedTimes"`
TwapMinPrice pgtype.Numeric `json:"twapMinPrice"`
TwapMaxPrice pgtype.Numeric `json:"twapMaxPrice"`
TwapStartedAt pgtype.Timestamp `json:"twapStartedAt"`
Deadline pgtype.Timestamp `json:"deadline"`
Nonce int64 `json:"nonce"`
Paths string `json:"paths"`
TxHash pgtype.Text `json:"txHash"`
ActualAmount_2 pgtype.Numeric `json:"actualAmount2"`
PartialFilledAt pgtype.Timestamp `json:"partialFilledAt"`
FilledAt pgtype.Timestamp `json:"filledAt"`
RejectedAt pgtype.Timestamp `json:"rejectedAt"`
CancelledAt pgtype.Timestamp `json:"cancelledAt"`
CreatedAt pgtype.Timestamp `json:"createdAt"`
}
type GetPoolByTokenParams ¶
type GetYieldMetricsForChatRow ¶
type GetYieldMetricsForChatRow struct {
Pool string `json:"pool"`
Chain string `json:"chain"`
Project string `json:"project"`
Symbol string `json:"symbol"`
Apy pgtype.Numeric `json:"apy"`
ApyBase pgtype.Numeric `json:"apyBase"`
ApyReward pgtype.Numeric `json:"apyReward"`
RewardTokens []string `json:"rewardTokens"`
UnderlyingTokens []string `json:"underlyingTokens"`
}
type GetYieldMetricsParams ¶
type InsertOrderParams ¶
type InsertOrderParams struct {
PoolIds []string `json:"poolIds"`
ParentID pgtype.Int8 `json:"parentId"`
Wallet string `json:"wallet"`
Status OrderStatus `json:"status"`
Side OrderSide `json:"side"`
Type OrderType `json:"type"`
Price pgtype.Numeric `json:"price"`
Amount pgtype.Numeric `json:"amount"`
Slippage pgtype.Float8 `json:"slippage"`
TwapIntervalSeconds pgtype.Int4 `json:"twapIntervalSeconds"`
TwapExecutedTimes pgtype.Int4 `json:"twapExecutedTimes"`
TwapCurrentExecutedTimes pgtype.Int4 `json:"twapCurrentExecutedTimes"`
TwapMinPrice pgtype.Numeric `json:"twapMinPrice"`
TwapMaxPrice pgtype.Numeric `json:"twapMaxPrice"`
TwapStartedAt pgtype.Timestamp `json:"twapStartedAt"`
Deadline pgtype.Timestamp `json:"deadline"`
Signature string `json:"signature"`
Paths string `json:"paths"`
Nonce int64 `json:"nonce"`
TxHash pgtype.Text `json:"txHash"`
ActualAmount pgtype.Numeric `json:"actualAmount"`
PartialFilledAt pgtype.Timestamp `json:"partialFilledAt"`
FilledAt pgtype.Timestamp `json:"filledAt"`
RejectedAt pgtype.Timestamp `json:"rejectedAt"`
CancelledAt pgtype.Timestamp `json:"cancelledAt"`
CreatedAt pgtype.Timestamp `json:"createdAt"`
}
type InsertOrderRow ¶
type InsertOrderRow struct {
ID int64 `json:"id"`
PoolIds []string `json:"poolIds"`
ParentID pgtype.Int8 `json:"parentId"`
Wallet string `json:"wallet"`
Status OrderStatus `json:"status"`
Side OrderSide `json:"side"`
Type OrderType `json:"type"`
Price pgtype.Numeric `json:"price"`
Amount pgtype.Numeric `json:"amount"`
Slippage pgtype.Float8 `json:"slippage"`
TwapIntervalSeconds pgtype.Int4 `json:"twapIntervalSeconds"`
TwapExecutedTimes pgtype.Int4 `json:"twapExecutedTimes"`
TwapCurrentExecutedTimes pgtype.Int4 `json:"twapCurrentExecutedTimes"`
TwapMinPrice pgtype.Numeric `json:"twapMinPrice"`
TwapMaxPrice pgtype.Numeric `json:"twapMaxPrice"`
TwapStartedAt pgtype.Timestamp `json:"twapStartedAt"`
Deadline pgtype.Timestamp `json:"deadline"`
Nonce int64 `json:"nonce"`
Paths string `json:"paths"`
TxHash pgtype.Text `json:"txHash"`
ActualAmount pgtype.Numeric `json:"actualAmount"`
PartialFilledAt pgtype.Timestamp `json:"partialFilledAt"`
FilledAt pgtype.Timestamp `json:"filledAt"`
RejectedAt pgtype.Timestamp `json:"rejectedAt"`
CancelledAt pgtype.Timestamp `json:"cancelledAt"`
CreatedAt pgtype.Timestamp `json:"createdAt"`
}
type ListOrdersByWalletResult ¶
type ListOrdersByWalletResult struct {
Orders []GetOrdersByWalletRow
Count int64
}
type ListThreadsByWalletResult ¶
type ListThreadsByWalletResult struct {
Threads []ChatThread
Count int64
}
type NullOrderSide ¶
type NullOrderSide struct {
OrderSide OrderSide `json:"orderSide"`
Valid bool `json:"valid"` // Valid is true if OrderSide is not NULL
}
func (*NullOrderSide) Scan ¶
func (ns *NullOrderSide) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullOrderStatus ¶
type NullOrderStatus struct {
OrderStatus OrderStatus `json:"orderStatus"`
Valid bool `json:"valid"` // Valid is true if OrderStatus is not NULL
}
func (*NullOrderStatus) Scan ¶
func (ns *NullOrderStatus) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullOrderType ¶
type NullOrderType struct {
OrderType OrderType `json:"orderType"`
Valid bool `json:"valid"` // Valid is true if OrderType is not NULL
}
func (*NullOrderType) Scan ¶
func (ns *NullOrderType) Scan(value interface{}) error
Scan implements the Scanner interface.
type Order ¶
type Order struct {
ID int64 `json:"id"`
PoolIds []string `json:"poolIds"`
Paths string `json:"paths"`
Wallet string `json:"wallet"`
Status OrderStatus `json:"status"`
Side OrderSide `json:"side"`
Type OrderType `json:"type"`
Price pgtype.Numeric `json:"price"`
ActualAmount pgtype.Numeric `json:"actualAmount"`
Amount pgtype.Numeric `json:"amount"`
Slippage pgtype.Float8 `json:"slippage"`
Nonce int64 `json:"nonce"`
Signature string `json:"signature"`
TxHash pgtype.Text `json:"txHash"`
ParentID pgtype.Int8 `json:"parentId"`
TwapIntervalSeconds pgtype.Int4 `json:"twapIntervalSeconds"`
TwapExecutedTimes pgtype.Int4 `json:"twapExecutedTimes"`
TwapCurrentExecutedTimes pgtype.Int4 `json:"twapCurrentExecutedTimes"`
TwapMinPrice pgtype.Numeric `json:"twapMinPrice"`
TwapMaxPrice pgtype.Numeric `json:"twapMaxPrice"`
TwapStartedAt pgtype.Timestamp `json:"twapStartedAt"`
Deadline pgtype.Timestamp `json:"deadline"`
PartialFilledAt pgtype.Timestamp `json:"partialFilledAt"`
FilledAt pgtype.Timestamp `json:"filledAt"`
RejectedAt pgtype.Timestamp `json:"rejectedAt"`
CancelledAt pgtype.Timestamp `json:"cancelledAt"`
CreatedAt pgtype.Timestamp `json:"createdAt"`
}
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusPENDING OrderStatus = "PENDING" OrderStatusPARTIALFILLED OrderStatus = "PARTIAL_FILLED" OrderStatusFILLED OrderStatus = "FILLED" OrderStatusREJECTED OrderStatus = "REJECTED" OrderStatusCANCELLED OrderStatus = "CANCELLED" )
func (*OrderStatus) Scan ¶
func (e *OrderStatus) Scan(src interface{}) error
type Pool ¶
type Pool struct {
ID string `json:"id"`
Token0ID string `json:"token0Id"`
Token1ID string `json:"token1Id"`
CreatedAt pgtype.Timestamptz `json:"createdAt"`
}
type PoolDetailsRow ¶
type PoolDetailsRow struct {
ID string `json:"id"`
Token0ID string `json:"token0Id"`
Token1ID string `json:"token1Id"`
Token0Name string `json:"token0Name"`
Token0Symbol string `json:"token0Symbol"`
Token0Decimals int32 `json:"token0Decimals"`
Token0IsStable bool `json:"token0IsStable"`
Token1Name string `json:"token1Name"`
Token1Symbol string `json:"token1Symbol"`
Token1Decimals int32 `json:"token1Decimals"`
Token1IsStable bool `json:"token1IsStable"`
}
type Price ¶
type Price struct {
ID int64 `json:"id"`
PoolID string `json:"poolId"`
BlockNumber int64 `json:"blockNumber"`
BlockTimestamp int64 `json:"blockTimestamp"`
Sender string `json:"sender"`
Recipient string `json:"recipient"`
Amount0 int64 `json:"amount0"`
Amount1 int64 `json:"amount1"`
SqrtPriceX96 int64 `json:"sqrtPriceX96"`
Liquidity int64 `json:"liquidity"`
Tick int32 `json:"tick"`
PriceUsd pgtype.Numeric `json:"priceUsd"`
TimestampUtc pgtype.Timestamp `json:"timestampUtc"`
CreatedAt pgtype.Timestamp `json:"createdAt"`
}
type Querier ¶
type Querier interface {
CancelAllOrders(ctx context.Context, arg CancelAllOrdersParams) error
CancelOrder(ctx context.Context, arg CancelOrderParams) (CancelOrderRow, error)
CountChatThreads(ctx context.Context, userAddress string) (int64, error)
CountOrdersByWallet(ctx context.Context, arg CountOrdersByWalletParams) (int64, error)
CreatePool(ctx context.Context, arg CreatePoolParams) (Pool, error)
CreateToken(ctx context.Context, arg CreateTokenParams) (Token, error)
FillOrder(ctx context.Context, arg FillOrderParams) (Order, error)
FillTwapOrder(ctx context.Context, arg FillTwapOrderParams) (Order, error)
GetChatThread(ctx context.Context, arg GetChatThreadParams) (ChatThread, error)
GetChatThreads(ctx context.Context, arg GetChatThreadsParams) ([]ChatThread, error)
GetLatestYieldMetric(ctx context.Context) (YieldMetric, error)
GetMatchedOrder(ctx context.Context, price pgtype.Numeric) (Order, error)
GetMatchedTwapOrder(ctx context.Context) ([]Order, error)
GetOrderByID(ctx context.Context, arg GetOrderByIDParams) (GetOrderByIDRow, error)
GetOrdersByWallet(ctx context.Context, arg GetOrdersByWalletParams) ([]GetOrdersByWalletRow, error)
GetPool(ctx context.Context, id string) (Pool, error)
GetPoolByToken(ctx context.Context, arg GetPoolByTokenParams) (Pool, error)
GetPools(ctx context.Context) ([]Pool, error)
GetPoolsByIDs(ctx context.Context, ids []string) ([]Pool, error)
GetYieldMetrics(ctx context.Context, arg GetYieldMetricsParams) ([]YieldMetric, error)
GetYieldMetricsForChat(ctx context.Context, dollar_1 []string) ([]GetYieldMetricsForChatRow, error)
InsertOrder(ctx context.Context, arg InsertOrderParams) (InsertOrderRow, error)
PoolDetails(ctx context.Context, id string) (PoolDetailsRow, error)
RejectOrder(ctx context.Context, arg RejectOrderParams) (Order, error)
UpsertChatThread(ctx context.Context, arg UpsertChatThreadParams) (ChatThread, error)
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CancelAllOrders ¶
func (q *Queries) CancelAllOrders(ctx context.Context, arg CancelAllOrdersParams) error
func (*Queries) CancelOrder ¶
func (q *Queries) CancelOrder(ctx context.Context, arg CancelOrderParams) (CancelOrderRow, error)
func (*Queries) CountChatThreads ¶
func (*Queries) CountOrdersByWallet ¶
func (*Queries) CreatePool ¶
func (*Queries) CreateToken ¶
func (*Queries) FillTwapOrder ¶
func (*Queries) GetChatThread ¶
func (q *Queries) GetChatThread(ctx context.Context, arg GetChatThreadParams) (ChatThread, error)
func (*Queries) GetChatThreads ¶
func (q *Queries) GetChatThreads(ctx context.Context, arg GetChatThreadsParams) ([]ChatThread, error)
func (*Queries) GetLatestYieldMetric ¶
func (q *Queries) GetLatestYieldMetric(ctx context.Context) (YieldMetric, error)
func (*Queries) GetMatchedOrder ¶
func (*Queries) GetMatchedTwapOrder ¶
func (*Queries) GetOrderByID ¶
func (q *Queries) GetOrderByID(ctx context.Context, arg GetOrderByIDParams) (GetOrderByIDRow, error)
func (*Queries) GetOrdersByWallet ¶
func (q *Queries) GetOrdersByWallet(ctx context.Context, arg GetOrdersByWalletParams) ([]GetOrdersByWalletRow, error)
func (*Queries) GetPoolByToken ¶
func (*Queries) GetPoolsByIDs ¶
func (*Queries) GetYieldMetrics ¶
func (q *Queries) GetYieldMetrics(ctx context.Context, arg GetYieldMetricsParams) ([]YieldMetric, error)
func (*Queries) GetYieldMetricsForChat ¶
func (*Queries) InsertOrder ¶
func (q *Queries) InsertOrder(ctx context.Context, arg InsertOrderParams) (InsertOrderRow, error)
func (*Queries) PoolDetails ¶
func (*Queries) RejectOrder ¶
func (*Queries) UpsertChatThread ¶
func (q *Queries) UpsertChatThread(ctx context.Context, arg UpsertChatThreadParams) (ChatThread, error)
type RejectOrderParams ¶
type SqlStore ¶
type SqlStore struct {
*Queries
// contains filtered or unexported fields
}
var DB *SqlStore
func (*SqlStore) CreateBatchYieldMetricsTx ¶
func (store *SqlStore) CreateBatchYieldMetricsTx(ctx context.Context, yieldMetrics []*YieldMetricData) (CreateBatchYieldMetricsTxResult, error)
func (*SqlStore) ListOrdersByWalletTx ¶
func (store *SqlStore) ListOrdersByWalletTx(ctx context.Context, params GetOrdersByWalletParams) (*ListOrdersByWalletResult, error)
func (*SqlStore) ListThreadsTx ¶
func (store *SqlStore) ListThreadsTx(ctx context.Context, params GetChatThreadsParams) (*ListThreadsByWalletResult, error)
type UpsertChatThreadParams ¶
type YieldMetric ¶
type YieldMetric struct {
ID int64 `json:"id"`
Pool string `json:"pool"`
Chain string `json:"chain"`
Project string `json:"project"`
Symbol string `json:"symbol"`
TvlUsd pgtype.Numeric `json:"tvlUsd"`
ApyBase pgtype.Numeric `json:"apyBase"`
ApyReward pgtype.Numeric `json:"apyReward"`
Apy pgtype.Numeric `json:"apy"`
RewardTokens []string `json:"rewardTokens"`
ApyPct1d pgtype.Numeric `json:"apyPct1d"`
ApyPct7d pgtype.Numeric `json:"apyPct7d"`
ApyPct30d pgtype.Numeric `json:"apyPct30d"`
Stablecoin pgtype.Bool `json:"stablecoin"`
IlRisk pgtype.Text `json:"ilRisk"`
Exposure pgtype.Text `json:"exposure"`
Predictions []byte `json:"predictions"`
PoolMeta pgtype.Text `json:"poolMeta"`
Mu pgtype.Numeric `json:"mu"`
Sigma pgtype.Numeric `json:"sigma"`
Count pgtype.Int4 `json:"count"`
Outlier pgtype.Bool `json:"outlier"`
UnderlyingTokens []string `json:"underlyingTokens"`
Il7d pgtype.Numeric `json:"il7d"`
ApyBase7d pgtype.Numeric `json:"apyBase7d"`
ApyMean30d pgtype.Numeric `json:"apyMean30d"`
VolumeUsd1d pgtype.Numeric `json:"volumeUsd1d"`
VolumeUsd7d pgtype.Numeric `json:"volumeUsd7d"`
ApyBaseInception pgtype.Numeric `json:"apyBaseInception"`
CreatedAt pgtype.Timestamptz `json:"createdAt"`
UpdatedAt pgtype.Timestamptz `json:"updatedAt"`
}
type YieldMetricData ¶
type YieldMetricData struct {
Pool string `json:"pool"`
Chain string `json:"chain"`
Project string `json:"project"`
Symbol string `json:"symbol"`
TvlUsd float64 `json:"tvlUsd"`
ApyBase float64 `json:"apyBase"`
ApyReward float64 `json:"apyReward"`
Apy float64 `json:"apy"`
RewardTokens []string `json:"rewardTokens"`
ApyPct1d float64 `json:"apyPct1D"`
ApyPct7d float64 `json:"apyPct7D"`
ApyPct30d float64 `json:"apyPct30D"`
Stablecoin bool `json:"stablecoin"`
IlRisk string `json:"ilRisk"`
Exposure string `json:"exposure"`
Predictions json.RawMessage `json:"predictions"`
PoolMeta string `json:"poolMeta"`
UnderlyingTokens []string `json:"underlyingTokens"`
Il7d float64 `json:"il7d"`
ApyBase7d float64 `json:"apyBase7d"`
ApyMean30d float64 `json:"apyMean30d"`
VolumeUsd1d float64 `json:"volumeUsd1d"`
VolumeUsd7d float64 `json:"volumeUsd7d"`
ApyBaseInception float64 `json:"apyBaseInception"`
}
Click to show internal directories.
Click to hide internal directories.