Documentation ¶
Index ¶
- Constants
- type CandleRangeArgs
- type IViews
- type PoolLiqCurve
- type TokenDexAgg
- type UserLimitOrder
- type UserPosition
- type UserTokensResponse
- type UserTxHistory
- type Views
- func (v *Views) QueryChainStats(chainId types.ChainId, nResults int) []TokenDexAgg
- 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, ...) model.AccumPoolStats
- func (v *Views) QueryPoolStatsFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) model.AccumPoolStats
- func (v *Views) QueryPoolTxHist(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, ...) []UserTxHistory
- func (v *Views) QueryPoolTxHistFrom(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) 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) []UserTxHistory
Constants ¶
View Source
const MAX_POOL_POSITIONS = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CandleRangeArgs ¶
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) []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 QueryUserLimits(chainId types.ChainId, user types.EthAddress) []UserLimitOrder QueryPoolLimits(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int) []UserLimitOrder QueryUserPoolLimits(chainId types.ChainId, user types.EthAddress, base types.EthAddress, quote types.EthAddress, poolIdx int) []UserLimitOrder 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) []UserTxHistory QueryPoolTxHist(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int) []UserTxHistory QueryPoolTxHistFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int, time int, period 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) model.AccumPoolStats QueryPoolStatsFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, histTime int) model.AccumPoolStats 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 }
type PoolLiqCurve ¶
type PoolLiqCurve struct { AmbientLiq float64 `json:"ambientLiq"` Bumps []*model.LiquidityBump `json:"liquidityBumps"` }
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) QueryChainStats ¶
func (v *Views) QueryChainStats(chainId types.ChainId, nResults int) []TokenDexAgg
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) []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) []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) model.AccumPoolStats
func (*Views) QueryPoolStatsFrom ¶
func (v *Views) QueryPoolStatsFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, histTime int) model.AccumPoolStats
func (*Views) QueryPoolTxHist ¶
func (v *Views) QueryPoolTxHist(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int) []UserTxHistory
func (*Views) QueryPoolTxHistFrom ¶
func (v *Views) QueryPoolTxHistFrom(chainId types.ChainId, base types.EthAddress, quote types.EthAddress, poolIdx int, nResults int, time int, period 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) 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) []UserTxHistory
Click to show internal directories.
Click to hide internal directories.