Documentation
¶
Index ¶
- type AdditionalPoolStatsFields
- type CandleRangeArgs
- type HistoricUserPosition
- type IViews
- type PlumeTaskStatus
- type PoolLiqCurve
- type PoolStats
- type TokenDexAgg
- type UserLimitOrder
- type UserPosition
- type UserTokensResponse
- type UserTxHistory
- type Views
- func (v *Views) QueryAllPoolStats(chainId types.ChainId, histTime int, with24hPrices bool) (result []PoolStats)
- func (v *Views) QueryChainStats(chainId types.ChainId, nResults int) []TokenDexAgg
- func (v *Views) QueryHistoricPositions(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) []HistoricUserPosition
- func (v *Views) QueryPlumeUserTask(user types.EthAddress, task string) (status PlumeTaskStatus)
- func (v *Views) QueryPoolApyLeaders(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) []UserPosition
- func (v *Views) QueryPoolCandles(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) []model.Candle
- func (v *Views) QueryPoolLimits(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) []UserLimitOrder
- func (v *Views) QueryPoolLiquidityCurve(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) PoolLiqCurve
- func (v *Views) QueryPoolPositions(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) []UserPosition
- func (v *Views) QueryPoolSet(chainId types.ChainId) []types.PoolLocation
- func (v *Views) QueryPoolStats(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) PoolStats
- func (v *Views) QueryPoolStatsFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) PoolStats
- func (v *Views) QueryPoolTxHist(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) []UserTxHistory
- func (v *Views) QuerySingleLimit(chainId types.ChainId, user types.EthAddress, base types.EthAddress, ...) *UserLimitOrder
- func (v *Views) QuerySinglePosition(chainId types.ChainId, user types.EthAddress, base types.EthAddress, ...) *UserPosition
- func (v *Views) QueryUserLimits(chainId types.ChainId, user types.EthAddress) []UserLimitOrder
- func (v *Views) QueryUserPoolLimits(chainId types.ChainId, user types.EthAddress, base types.EthAddress, ...) []UserLimitOrder
- func (v *Views) QueryUserPoolPositions(chainId types.ChainId, user types.EthAddress, base types.EthAddress, ...) []UserPosition
- func (v *Views) QueryUserPoolTxHist(chainId types.ChainId, user types.EthAddress, base types.EthAddress, ...) []UserTxHistory
- func (v *Views) QueryUserPositions(chainId types.ChainId, user types.EthAddress) []UserPosition
- func (v *Views) QueryUserTokens(chainId types.ChainId, user types.EthAddress) UserTokensResponse
- func (v *Views) QueryUserTxHist(chainId types.ChainId, user types.EthAddress, nResults int, afterTime int, ...) []UserTxHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalPoolStatsFields ¶
type AdditionalPoolStatsFields struct {
*types.PoolLocation
PriceSwap24hAgo *float64 `json:"priceSwap24hAgo,omitempty"`
PriceLiq24hAgo *float64 `json:"priceLiq24hAgo,omitempty"`
PriceIndic24hAgo *float64 `json:"priceIndic24hAgo,omitempty"`
BaseVolume24hAgo *float64 `json:"baseVolume24hAgo,omitempty"`
QuoteVolume24hAgo *float64 `json:"quoteVolume24hAgo,omitempty"`
BaseFees24hAgo *float64 `json:"baseFees24hAgo,omitempty"`
QuoteFees24hAgo *float64 `json:"quoteFees24hAgo,omitempty"`
}
type CandleRangeArgs ¶
type HistoricUserPosition ¶
type HistoricUserPosition struct {
types.PositionLocation
PositionType tables.PosType `json:"positionType"`
TimeFirstMint int `json:"timeFirstMint"`
FirstMintTx string `json:"firstMintTx"`
PositionId string `json:"positionId"`
Liq *big.Int `json:"liq"`
BaseTokens *big.Int `json:"baseTokens"`
QuoteTokens *big.Int `json:"quoteTokens"`
PoolPrice float64 `json:"poolPrice"`
LiqHist model.LiquidityDeltaHist `json:"liqHist"`
}
type IViews ¶
type IViews interface {
QueryUserTokens(chainId types.ChainId, user types.EthAddress) UserTokensResponse
QueryUserPositions(chainId types.ChainId, user types.EthAddress) []UserPosition
QueryPoolPositions(chainId types.ChainId, base types.EthAddress, quote types.EthAddress,
poolIdx int, nResults int, omitEmpty bool, afterTime int, beforeTime int) []UserPosition
QueryPoolApyLeaders(chainId types.ChainId, base types.EthAddress, quote types.EthAddress,
poolIdx int, nResults int, omitEmpty bool) []UserPosition
QueryUserPoolPositions(chainId types.ChainId, user types.EthAddress,
base types.EthAddress, quote types.EthAddress, poolIdx int) []UserPosition
QuerySinglePosition(chainId types.ChainId, user types.EthAddress,
base types.EthAddress, quote types.EthAddress,
poolIdx int, bidTick int, askTick int) *UserPosition
QueryHistoricPositions(chainId types.ChainId, base types.EthAddress, quote types.EthAddress,
poolIdx int, time int, user types.EthAddress, omitEmpty bool) []HistoricUserPosition
QueryUserLimits(chainId types.ChainId, user types.EthAddress) []UserLimitOrder
QueryPoolLimits(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int,
nResults int, afterTime int, beforeTime int) []UserLimitOrder
QueryUserPoolLimits(chainId types.ChainId, user types.EthAddress,
base types.EthAddress, quote types.EthAddress, poolIdx int) []UserLimitOrder
QueryUserPoolTxHist(chainId types.ChainId, user types.EthAddress,
base types.EthAddress, quote types.EthAddress, poolIdx int,
nResults int, afterTime int, beforeTime int) []UserTxHistory
QuerySingleLimit(chainId types.ChainId, user types.EthAddress,
base types.EthAddress, quote types.EthAddress,
poolIdx int, bidTick int, askTick int, isBid bool, pivotTime int) *UserLimitOrder
QueryUserTxHist(chainId types.ChainId, user types.EthAddress,
nResults int, afterTime int, beforeTime int) []UserTxHistory
QueryPoolTxHist(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int,
nResults int, afterTime int, beforeTime int) []UserTxHistory
QueryPoolLiquidityCurve(chainId types.ChainId, base types.EthAddress, quote types.EthAddress,
poolIdx int) PoolLiqCurve
QueryPoolStats(chainId types.ChainId, base types.EthAddress, quote types.EthAddress,
poolIdx int, with24hPrices bool) PoolStats
QueryPoolStatsFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress,
poolIdx int, histTime int) PoolStats
QueryAllPoolStats(chainId types.ChainId, histTime int, with24hPrices bool) []PoolStats
QueryChainStats(chainId types.ChainId, nResults int) []TokenDexAgg
QueryPoolCandles(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int,
timeRange CandleRangeArgs) []model.Candle
QueryPoolSet(chainId types.ChainId) []types.PoolLocation
QueryPlumeUserTask(user types.EthAddress, task string) PlumeTaskStatus
}
type PlumeTaskStatus ¶
type PoolLiqCurve ¶
type PoolLiqCurve struct {
AmbientLiq float64 `json:"ambientLiq"`
Bumps []*model.LiquidityBump `json:"liquidityBumps"`
}
type PoolStats ¶
type PoolStats struct {
*AdditionalPoolStatsFields // Optional, only set when all pool stats are requested
model.AccumPoolStats
InitTime int `json:"initTime"`
Events int `json:"events"`
}
type TokenDexAgg ¶
type UserLimitOrder ¶
type UserLimitOrder struct {
types.KOClaimLocation
model.PositionLiquidity
// contains filtered or unexported fields
}
type UserPosition ¶
type UserPosition struct {
types.PositionLocation
model.PositionTracker
model.APRCalcResult
PositionId string `json:"positionId"`
}
type UserTokensResponse ¶
type UserTokensResponse struct {
ChainId types.ChainId `json:"chainId"`
User types.EthAddress `json:"user"`
Block int64 `json:"block"`
Tokens []types.EthAddress `json:"tokens"`
}
type UserTxHistory ¶
type UserTxHistory struct {
types.PoolTxEvent
EventId string `json:"txId"`
}
type Views ¶
type Views struct {
Cache *cache.MemoryCache
OnChain *loader.OnChainLoader
}
func (*Views) QueryAllPoolStats ¶
func (*Views) QueryChainStats ¶
func (v *Views) QueryChainStats(chainId types.ChainId, nResults int) []TokenDexAgg
func (*Views) QueryHistoricPositions ¶
func (v *Views) QueryHistoricPositions(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, time int, user types.EthAddress, omitEmpty bool) []HistoricUserPosition
func (*Views) QueryPlumeUserTask ¶
func (v *Views) QueryPlumeUserTask(user types.EthAddress, task string) (status PlumeTaskStatus)
func (*Views) QueryPoolApyLeaders ¶
func (v *Views) QueryPoolApyLeaders(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int, omitEmpty bool) []UserPosition
func (*Views) QueryPoolCandles ¶
func (v *Views) QueryPoolCandles(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, timeRange CandleRangeArgs) []model.Candle
func (*Views) QueryPoolLimits ¶
func (v *Views) QueryPoolLimits(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int, afterTime int, beforeTime int) []UserLimitOrder
func (*Views) QueryPoolLiquidityCurve ¶
func (v *Views) QueryPoolLiquidityCurve(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int) PoolLiqCurve
func (*Views) QueryPoolPositions ¶
func (v *Views) QueryPoolPositions(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int, omitEmpty bool, afterTime int, beforeTime int) []UserPosition
func (*Views) QueryPoolSet ¶
func (v *Views) QueryPoolSet(chainId types.ChainId) []types.PoolLocation
func (*Views) QueryPoolStats ¶
func (v *Views) QueryPoolStats(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, with24hPrices bool) PoolStats
func (*Views) QueryPoolStatsFrom ¶
func (v *Views) QueryPoolStatsFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, histTime int) PoolStats
func (*Views) QueryPoolTxHist ¶
func (v *Views) QueryPoolTxHist(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int, afterTime int, beforeTime int) []UserTxHistory
func (*Views) QuerySingleLimit ¶
func (v *Views) QuerySingleLimit(chainId types.ChainId, user types.EthAddress, base types.EthAddress, quote types.EthAddress, poolIdx int, bidTick int, askTick int, isBid bool, pivotTime int) *UserLimitOrder
func (*Views) QuerySinglePosition ¶
func (v *Views) QuerySinglePosition(chainId types.ChainId, user types.EthAddress, base types.EthAddress, quote types.EthAddress, poolIdx int, bidTick int, askTick int) *UserPosition
func (*Views) QueryUserLimits ¶
func (v *Views) QueryUserLimits(chainId types.ChainId, user types.EthAddress) []UserLimitOrder
func (*Views) QueryUserPoolLimits ¶
func (v *Views) QueryUserPoolLimits(chainId types.ChainId, user types.EthAddress, base types.EthAddress, quote types.EthAddress, poolIdx int) []UserLimitOrder
func (*Views) QueryUserPoolPositions ¶
func (v *Views) QueryUserPoolPositions(chainId types.ChainId, user types.EthAddress, base types.EthAddress, quote types.EthAddress, poolIdx int) []UserPosition
func (*Views) QueryUserPoolTxHist ¶
func (v *Views) QueryUserPoolTxHist(chainId types.ChainId, user types.EthAddress, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int, afterTime int, beforeTime int) []UserTxHistory
func (*Views) QueryUserPositions ¶
func (v *Views) QueryUserPositions(chainId types.ChainId, user types.EthAddress) []UserPosition
func (*Views) QueryUserTokens ¶
func (v *Views) QueryUserTokens(chainId types.ChainId, user types.EthAddress) UserTokensResponse
func (*Views) QueryUserTxHist ¶
func (v *Views) QueryUserTxHist(chainId types.ChainId, user types.EthAddress, nResults int, afterTime int, beforeTime int) []UserTxHistory
Click to show internal directories.
Click to hide internal directories.