Versions in this module Expand all Collapse all v0 v0.11.1 Mar 16, 2021 v0.10.1 Mar 16, 2021 Changes in this version + const BlockInterval + const BlocksPerDay + const BuyOrder + const CodeAddressAndProductRequired + const CodeAddressIsRequired + const CodeBackendModuleUnknownQueryType + const CodeBackendPluginNotEnabled + const CodeGetBlockTxHashesFailed + const CodeGetCandlesByMarketFailed + const CodeGetCandlesFailed + const CodeGetChainHeightFailed + const CodeGetInvalidTickerByProducts + const CodeGetInvalidateGranularity + const CodeGetTickerByProductsFailed + const CodeGoroutinePanic + const CodeMarketkeeperNotInitialized + const CodeNoKlinesFunctionFound + const CodeOrderIdIsRequired + const CodeOrderSideMustBuyOrSell + const CodeOrderStatusMustBeOpenOrClosed + const CodeParamNotCorrect + const CodeProductDoesNotExist + const CodeProductIsRequired + const DaysInYear + const DefaultCodespace + const DefaultPage + const DefaultPerPage + const FarmPoolApy + const FarmPoolCreated + const FarmPoolFinishAt + const FarmPoolFinished + const FarmPoolProvided + const FarmPoolStartAt + const FarmPoolTotalStaked + const FarmPoolYielded + const FarmSortAsc + const FeeTypeOrderCancel + const FeeTypeOrderDeal + const FeeTypeOrderExpire + const FeeTypeOrderNew + const FeeTypeOrderReceive + const Kline1GoRoutineWaitInSecond + const KlineTypeM1 + const KlineTypeM10080 + const KlineTypeM120 + const KlineTypeM1440 + const KlineTypeM15 + const KlineTypeM240 + const KlineTypeM3 + const KlineTypeM30 + const KlineTypeM360 + const KlineTypeM4320 + const KlineTypeM44640 + const KlineTypeM5 + const KlineTypeM525600 + const KlineTypeM60 + const KlineTypeM720 + const KlinexGoRoutineWaitInSecond + const ModuleName + const NormalFarmPool + const QuerierRoute + const QueryAccountOrders + const QueryCandleList + const QueryCandleListV2 + const QueryDealList + const QueryDealListV2 + const QueryDexFeesList + const QueryFarmDashboard + const QueryFarmFirstPool + const QueryFarmMaxApy + const QueryFarmPools + const QueryFarmStakedInfo + const QueryFeeDetails + const QueryFeeDetailsV2 + const QueryInstrumentsV2 + const QueryMatchResults + const QueryMatchResultsV2 + const QueryOrderByID + const QueryOrderList + const QueryOrderListV2 + const QueryOrderV2 + const QuerySwapLiquidityHistories + const QuerySwapTokenPairs + const QuerySwapTokens + const QuerySwapWatchlist + const QueryTickerList + const QueryTickerListV2 + const QueryTickerV2 + const QueryTxList + const QueryTxListV2 + const RouterKey + const SecondsInADay + const SecondsInDay + const SellOrder + const SwapBusinessTypeAdd + const SwapBusinessTypeCreate + const SwapBusinessTypeSwap + const SwapWatchlistChange24h + const SwapWatchlistFeeApy + const SwapWatchlistLastPrice + const SwapWatchlistLiquidity + const SwapWatchlistSortAsc + const SwapWatchlistVolume24h + const TestTokenPair + const TxSideBuy + const TxSideFrom + const TxSideSell + const TxSideTo + const TxTypeOrderCancel + const TxTypeOrderNew + const TxTypeTransfer + const WebsocketChanCapacity + const WhitelistFarmPool + func ErrAddressIsRequired() sdk.EnvelopedErr + func ErrBackendModuleUnknownQueryType() sdk.EnvelopedErr + func ErrBackendPluginNotEnabled() sdk.EnvelopedErr + func ErrGetInvalidTickerByProducts(key string) sdk.EnvelopedErr + func ErrGetInvalidateGranularity(msg string, key string, field string) sdk.EnvelopedErr + func ErrMarketkeeperNotInitialized() sdk.EnvelopedErr + func ErrNoKlinesFunctionFound() sdk.EnvelopedErr + func ErrOrderIdIsRequired() sdk.EnvelopedErr + func ErrOrderSideParamMustBuyOrSell(side string) sdk.EnvelopedErr + func ErrParamNotCorrect(size int, granularity int) sdk.EnvelopedErr + func ErrProductDoesNotExist(product string) sdk.EnvelopedErr + func ErrProductIsRequired() sdk.EnvelopedErr + func GetAllKlineMap() map[int]string + func GetChannelByKlineType(klineType string) string + func GetFreqByKlineType(klineType string) int + func GetKlineTableNameByFreq(freq int) string + func MustNewKlineFactory(name string, baseK *BaseKline) (r interface{}) + func NewErrorsMerged(args ...error) error + func NewKlineFactory(name string, baseK *BaseKline) (r interface{}, err error) + func NewKlinesFactory(name string) (r interface{}, err error) + func PrintStackIfPanic() + func TimeString(ts int64) string + func ToRestfulData(klines *[]IKline, limit int) [][]string + type BaseKline struct + Close float64 + High float64 + Low float64 + Open float64 + Product string + Timestamp int64 + Volume float64 + func (b *BaseKline) FormatResult() interface{} + func (b *BaseKline) GetAnchorTimeTS(ts int64) int64 + func (b *BaseKline) GetBriefInfo() []string + func (b *BaseKline) GetChannelInfo() (channel, filter string, err error) + func (b *BaseKline) GetClose() float64 + func (b *BaseKline) GetFreqInSecond() int + func (b *BaseKline) GetFullChannel() string + func (b *BaseKline) GetHigh() float64 + func (b *BaseKline) GetLow() float64 + func (b *BaseKline) GetOpen() float64 + func (b *BaseKline) GetProduct() string + func (b *BaseKline) GetTableName() string + func (b *BaseKline) GetTimestamp() int64 + func (b *BaseKline) GetVolume() float64 + func (b *BaseKline) PrettyTimeString() string + type ClaimInfo struct + Address string + Claimed string + Id uint64 + PoolName string + Timestamp int64 + type Deal struct + BlockHeight int64 + Fee string + FeeReceiver string + OrderID string + Price float64 + Product string + Quantity float64 + Sender string + Side string + Timestamp int64 + type DexFees struct + Fee string + HandlingFeeAddr string + OrderID string + Product string + Timestamp int64 + type DexKeeper interface + GetTokenPair func(ctx sdk.Context, product string) *dextypes.TokenPair + GetTokenPairs func(ctx sdk.Context) []*dextypes.TokenPair + SetObserverKeeper func(keeper dex.StreamKeeper) + type ErrorsMerged struct + func (em ErrorsMerged) Error() string + type FakeWSEvent struct + func NewFakeWSEvent(channel, filter string, ts int64) *FakeWSEvent + func (f *FakeWSEvent) FormatResult() interface{} + func (f *FakeWSEvent) GetChannelInfo() (channel, filter string, err error) + func (f *FakeWSEvent) GetFullChannel() string + func (f *FakeWSEvent) GetTimestamp() int64 + type FarmFirstPool struct + AccountStaked sdk.Dec + Balance sdk.Dec + ClaimAt int64 + EstimatedFarm sdk.Dec + FarmAmount sdk.Dec + FarmApy sdk.Dec + TotalStaked sdk.Dec + type FarmInfo struct + Claimed sdk.Dec + Symbol string + UnClaimed sdk.Dec + type FarmKeeper interface + CalculateAmountYieldedBetween func(ctx sdk.Context, pool farmtypes.FarmPool) (farmtypes.FarmPool, sdk.SysCoins) + GetEarnings func(ctx sdk.Context, poolName string, accAddr sdk.AccAddress) (farmtypes.Earnings, sdk.Error) + GetFarmPool func(ctx sdk.Context, poolName string) (pool farmtypes.FarmPool, found bool) + GetFarmPoolNamesForAccount func(ctx sdk.Context, accAddr sdk.AccAddress) (poolNames farmtypes.PoolNameList) + GetFarmPools func(ctx sdk.Context) (pools farmtypes.FarmPools) + GetLockInfo func(ctx sdk.Context, addr sdk.AccAddress, poolName string) (info farmtypes.LockInfo, found bool) + GetParams func(ctx sdk.Context) (params farmtypes.Params) + GetPoolLockedValue func(ctx sdk.Context, pool farmtypes.FarmPool) sdk.Dec + GetWhitelist func(ctx sdk.Context) (whitelist farmtypes.PoolNameList) + SetObserverKeeper func(k farmtypes.BackendKeeper) + SupplyKeeper func() supply.Keeper + type FarmPoolResponse struct + FarmApy sdk.SysCoins + FarmedDetails []FarmInfo + FinishAt int64 + InWhitelist bool + LockSymbol string + PoolName string + PoolRate sdk.SysCoins + PoolRatio sdk.Dec + StartAt int64 + Status FarmPoolStatus + TotalFarmed sdk.Dec + TotalStaked sdk.Dec + UserStaked sdk.Dec + YieldSymbol string + func (farmPool FarmPoolResponse) TotalApy() sdk.Dec + type FarmPoolStatus int + type FarmResponseList []FarmPoolResponse + func (list FarmResponseList) Len() int + func (list FarmResponseList) Less(i, j int) bool + func (list FarmResponseList) Swap(i, j int) + type FarmResponseListSorter struct + FarmPoolList FarmResponseList + SortDirectory string + SortField string + func (s *FarmResponseListSorter) Len() int + func (s *FarmResponseListSorter) Less(i, j int) bool + func (s *FarmResponseListSorter) Swap(i, j int) + type FarmStakedInfo struct + AccountStaked sdk.Dec + Balance sdk.Dec + MinLockAmount sdk.Dec + PoolName string + PoolRatio sdk.Dec + PoolTotalStaked sdk.Dec + type IKline interface + GetAnchorTimeTS func(ts int64) int64 + GetBriefInfo func() []string + GetClose func() float64 + GetFreqInSecond func() int + GetHigh func() float64 + GetLow func() float64 + GetOpen func() float64 + GetProduct func() string + GetTableName func() string + GetTimestamp func() int64 + GetVolume func() float64 + PrettyTimeString func() string + func ToIKlinesArray(klines interface{}, endTS int64, doPadding bool) []IKline + type IKlines []IKline + func (klines IKlines) Len() int + func (klines IKlines) Less(i, j int) bool + func (klines IKlines) Swap(i, j int) + type IKlinesDsc []IKline + func (c IKlinesDsc) Swap(i, j int) + func (klines IKlinesDsc) Len() int + func (klines IKlinesDsc) Less(i, j int) bool + type IWebsocket interface + FormatResult func() interface{} + GetChannelInfo func() (channel, filter string, err error) + GetFullChannel func() string + GetTimestamp func() int64 + type InstrumentV2 struct + BaseCurrency string + InstrumentID string + MinSize string + QuoteCurrency string + SizeIncrement string + TickSize string + func ConvertTokenPairToInstrumentV2(tokenPair *dex.TokenPair) *InstrumentV2 + type KlineM1 struct + func NewKlineM1(b *BaseKline) *KlineM1 + func (k *KlineM1) GetFreqInSecond() int + func (k *KlineM1) GetTableName() string + type KlineM10080 struct + func NewKlineM10080(b *BaseKline) *KlineM10080 + func (k *KlineM10080) GetFreqInSecond() int + func (k *KlineM10080) GetTableName() string + type KlineM120 struct + func NewKlineM120(b *BaseKline) *KlineM120 + func (k *KlineM120) GetFreqInSecond() int + func (k *KlineM120) GetTableName() string + type KlineM1440 struct + func NewKlineM1440(b *BaseKline) *KlineM1440 + func (k *KlineM1440) GetFreqInSecond() int + func (k *KlineM1440) GetTableName() string + type KlineM15 struct + func NewKlineM15(b *BaseKline) *KlineM15 + func (k *KlineM15) GetFreqInSecond() int + func (k *KlineM15) GetTableName() string + type KlineM240 struct + func NewKlineM240(b *BaseKline) *KlineM240 + func (k *KlineM240) GetFreqInSecond() int + func (k *KlineM240) GetTableName() string + type KlineM3 struct + func NewKlineM3(b *BaseKline) *KlineM3 + func (k *KlineM3) GetFreqInSecond() int + func (k *KlineM3) GetTableName() string + type KlineM30 struct + func NewKlineM30(b *BaseKline) *KlineM30 + func (k *KlineM30) GetFreqInSecond() int + func (k *KlineM30) GetTableName() string + type KlineM360 struct + func NewKlineM360(b *BaseKline) *KlineM360 + func (k *KlineM360) GetFreqInSecond() int + func (k *KlineM360) GetTableName() string + type KlineM4320 struct + func NewKlineM4320(b *BaseKline) *KlineM4320 + func (k *KlineM4320) GetFreqInSecond() int + func (k *KlineM4320) GetTableName() string + type KlineM44640 struct + func NewKlineM44640(b *BaseKline) *KlineM44640 + func (k *KlineM44640) GetFreqInSecond() int + func (k *KlineM44640) GetTableName() string + type KlineM5 struct + func NewKlineM5(b *BaseKline) *KlineM5 + func (k *KlineM5) GetFreqInSecond() int + func (k *KlineM5) GetTableName() string + type KlineM525600 struct + func NewKlineM525600(b *BaseKline) *KlineM525600 + func (k *KlineM525600) GetFreqInSecond() int + func (k *KlineM525600) GetTableName() string + type KlineM60 struct + func NewKlineM60(b *BaseKline) *KlineM60 + func (k *KlineM60) GetFreqInSecond() int + func (k *KlineM60) GetTableName() string + type KlineM720 struct + func NewKlineM720(b *BaseKline) *KlineM720 + func (k *KlineM720) GetFreqInSecond() int + func (k *KlineM720) GetTableName() string + type MarketKeeper interface + GetKlineByProductID func(productID uint64, granularity, size int) ([][]string, error) + GetTickerByProducts func(products []string) ([]map[string]string, error) + type MatchResult struct + BlockHeight int64 + Price float64 + Product string + Quantity float64 + Timestamp int64 + type MergedTickersEvent struct + func NewMergedTickersEvent(ts int64, freq int, tickers []interface{}) *MergedTickersEvent + func (m *MergedTickersEvent) FormatResult() interface{} + func (m *MergedTickersEvent) GetChannelInfo() (channel, filter string, err error) + func (m *MergedTickersEvent) GetFullChannel() string + func (m *MergedTickersEvent) GetTimestamp() int64 + type MintKeeper interface + GetParams func(ctx sdk.Context) (params mint.Params) + type Order struct + FilledAvgPrice string + OrderID string + Price string + Product string + Quantity string + RemainQuantity string + Sender string + Side string + Status int64 + Timestamp int64 + TxHash string + type OrderKeeper interface + GetBestBidAndAsk func(ctx sdk.Context, product string) (sdk.Dec, sdk.Dec) + GetBlockMatchResult func() *ordertypes.BlockMatchResult + GetBlockOrderNum func(ctx sdk.Context, blockHeight int64) int64 + GetLastPrice func(ctx sdk.Context, product string) sdk.Dec + GetOrder func(ctx sdk.Context, orderID string) *order.Order + GetTxHandlerMsgResult func() []bitset.BitSet + GetUpdatedOrderIDs func() []string + type OrderV2 struct + FilledNotional string + FilledSize string + InstrumentID string + Notional string + OrderID string + OrderType string + Price string + Side string + Size string + State string + Timestamp string + Type string + func ConvertOrderToOrderV2(order Order) OrderV2 + type QueryAccountOrdersParams struct + Address string + End int64 + Page int + PerPage int + Start int64 + func NewQueryAccountOrdersParams(address string, start int64, end int64, page, perPage int) QueryAccountOrdersParams + type QueryDealsParams struct + Address string + End int64 + Page int + PerPage int + Product string + Side string + Start int64 + func NewQueryDealsParams(addr, product string, start, end int64, page, perPage int, side string) QueryDealsParams + type QueryDealsParamsV2 struct + Address string + After string + Before string + Limit int + Product string + Side string + type QueryDexFeesParams struct + BaseAsset string + DexHandlingAddr string + Page int + PerPage int + QuoteAsset string + func NewQueryDexFeesParams(dexHandlingAddr, baseAsset, quoteAsset string, page, perPage int) QueryDexFeesParams + type QueryFarmDashboardParams struct + Address string + Page int + PerPage int + func NewQueryFarmDashboardParams(address string, page int, perPage int) QueryFarmDashboardParams + type QueryFarmFirstPoolParams struct + Address string + ClaimHeight int64 + PoolName string + StakeAt int64 + func NewQueryFarmFirstPoolParams(poolName string, address string, stakeAt int64, claimHeight int64) QueryFarmFirstPoolParams + type QueryFarmPoolsParams struct + Page int + PerPage int + PoolType string + SortColumn string + SortDirection string + func NewQueryFarmPoolsParams(poolType string, sortColumn string, sortDirection string, page int, ...) QueryFarmPoolsParams + type QueryFarmStakedInfoParams struct + Address string + PoolName string + func NewQueryFarmStakedInfoParams(poolName string, address string) QueryFarmStakedInfoParams + type QueryFeeDetailsParams struct + Address string + Page int + PerPage int + func NewQueryFeeDetailsParams(addr string, page, perPage int) QueryFeeDetailsParams + type QueryFeeDetailsParamsV2 struct + Address string + After string + Before string + Limit int + type QueryKlinesParams struct + Granularity int + Product string + Size int + func NewQueryKlinesParams(product string, granularity, size int) QueryKlinesParams + type QueryMatchParams struct + End int64 + Page int + PerPage int + Product string + Start int64 + func NewQueryMatchParams(product string, start, end int64, page, perPage int) QueryMatchParams + type QueryMatchParamsV2 struct + After string + Before string + Limit int + Product string + type QueryOrderListParams struct + Address string + End int64 + HideNoFill bool + Page int + PerPage int + Product string + Side string + Start int64 + func NewQueryOrderListParams(addr, product, side string, page, perPage int, start, end int64, ...) QueryOrderListParams + type QueryOrderParamsV2 struct + Address string + After string + Before string + IsOpen bool + Limit int + OrderID string + Product string + Side string + type QuerySwapLiquidityInfoParams struct + Address string + TokenPairName string + func NewQuerySwapLiquidityInfoParams(address string, tokenPairName string) QuerySwapLiquidityInfoParams + type QuerySwapTokensParams struct + Address string + BaseTokenName string + BusinessType string + func NewQuerySwapTokensParams(businessType string, address string, baseTokenName string) QuerySwapTokensParams + type QuerySwapWatchlistParams struct + Page int + PerPage int + SortColumn string + SortDirection string + func NewQuerySwapWatchlistParams(sortColumn string, sortDirection string, page int, perPage int) QuerySwapWatchlistParams + type QueryTickerParams struct + Count int + Product string + Sort bool + type QueryTxListParams struct + Address string + EndTime int64 + Page int + PerPage int + StartTime int64 + TxType int64 + func NewQueryTxListParams(addr string, txType, startTime, endTime int64, page, perPage int) QueryTxListParams + type QueryTxListParamsV2 struct + Address string + After string + Before string + Limit int + TxType int + type SwapInfo struct + Address string + BaseTokenAmount string + BuysAmount string + Price string + QuoteTokenAmount string + SellAmount string + Timestamp int64 + TokenPairName string + type SwapKeeper interface + GetParams func(ctx sdk.Context) (params ammswap.Params) + GetPoolTokenAmount func(ctx sdk.Context, poolTokenName string) sdk.Dec + GetSwapTokenPair func(ctx sdk.Context, tokenPairName string) (ammswap.SwapTokenPair, error) + GetSwapTokenPairs func(ctx sdk.Context) []ammswap.SwapTokenPair + SetObserverKeeper func(k ammswaptypes.BackendKeeper) + type SwapLiquidityInfo struct + BasePooledCoin sdk.SysCoin + PoolTokenCoin sdk.SysCoin + PoolTokenRatio sdk.Dec + QuotePooledCoin sdk.SysCoin + type SwapToken struct + Available sdk.Dec + Symbol string + func NewSwapToken(symbol string, available sdk.Dec) SwapToken + type SwapTokens []SwapToken + func (swapTokens SwapTokens) Len() int + func (swapTokens SwapTokens) Less(i, j int) bool + func (swapTokens SwapTokens) Swap(i, j int) + type SwapTokensResponse struct + NativeToken string + Tokens SwapTokens + type SwapVolumePriceInfo struct + Price24h sdk.Dec + Timestamp int64 + Volume sdk.Dec + type SwapWatchlist struct + Change24h sdk.Dec + FeeApy sdk.Dec + LastPrice sdk.Dec + Liquidity sdk.Dec + SwapPair string + Volume24h sdk.Dec + type SwapWatchlistSorter struct + SortDirectory string + SortField string + Watchlist []SwapWatchlist + func (s *SwapWatchlistSorter) Len() int + func (s *SwapWatchlistSorter) Less(i, j int) bool + func (s *SwapWatchlistSorter) Swap(i, j int) + type SwapWhitelist struct + Deleted bool + Id uint64 + Timestamp int64 + TokenPairName string + type Ticker struct + Change float64 + ChangePercentage string + Close float64 + High float64 + Low float64 + Open float64 + Price float64 + Product string + Symbol string + Timestamp int64 + Volume float64 + func (t *Ticker) FormatResult() interface{} + func (t *Ticker) GetChannelInfo() (channel, filter string, err error) + func (t *Ticker) GetFullChannel() string + func (t *Ticker) GetTimestamp() int64 + func (t *Ticker) PrettyString() string + type TickerV2 struct + BaseVolume24H string + BestAsk string + BestBid string + High24H string + InstrumentID string + Last string + Low24H string + Open24H string + QuoteVolume24H string + Timestamp string + func DefaultTickerV2(instrumentID string) TickerV2 + type Tickers []Ticker + func (c Tickers) Swap(i, j int) + func (tickers Tickers) Len() int + func (tickers Tickers) Less(i, j int) bool + type TokenKeeper interface + GetCoins func(ctx sdk.Context, addr sdk.AccAddress) sdk.SysCoins + GetFeeDetailList func() []*token.FeeDetail + GetParams func(ctx sdk.Context) (params token.Params) + GetTokensInfo func(ctx sdk.Context) (tokens []token.Token) + type Transaction struct + Address string + Fee string + Quantity string + Side int64 + Symbol string + Timestamp int64 + TxHash string + Type int64 + func GenerateTx(tx *auth.StdTx, txHash string, ctx sdk.Context, orderKeeper OrderKeeper, ...) []*Transaction