Documentation ¶
Index ¶
- Constants
- func NewQuerier(keeper Keeper) sdk.Querier
- func RegisterRoutes(ctx context.CLIContext, r *mux.Router, cdc *codec.Codec)
- type CandleEntry
- type CandleInterval
- type CandleQueryParams
- type CandleQueryResult
- type DailyQueryResult
- type IteratorCB
- type Keeper
- func (k Keeper) IteratorByMarketAndInterval(mktID store.EntityID, from time.Time, to time.Time, cb IteratorCB)
- func (k Keeper) OnEvent(event interface{}) error
- func (k Keeper) OnFillEvent(event types.Fill)
- func (k Keeper) ReverseIteratorByMarket(mktID store.EntityID, cb IteratorCB)
- func (k Keeper) ReverseIteratorByMarketFrom(mktID store.EntityID, from time.Time, cb IteratorCB)
- type Tick
- type TickEntry
- type TickQueryResult
Constants ¶
View Source
const ( QueryHistory = "history" QueryCandles = "candles" QueryDaily = "daily" MaxTicks = 2000 )
View Source
const ( CandleInterval1M CandleInterval = "1m" CandleInterval5M = "5m" CandleInterval15M = "15m" CandleInterval30M = "30m" CandleInterval60M = "60m" )
View Source
const (
EntityName = "price"
)
Variables ¶
This section is empty.
Functions ¶
func NewQuerier ¶
func RegisterRoutes ¶
Types ¶
type CandleEntry ¶
type CandleInterval ¶
type CandleInterval string
func NewCandleIntervalFromString ¶
func NewCandleIntervalFromString(in string) (CandleInterval, error)
func (CandleInterval) Delta ¶
func (c CandleInterval) Delta() int64
func (*CandleInterval) UnmarshalJSON ¶
func (c *CandleInterval) UnmarshalJSON(data []byte) error
type CandleQueryParams ¶
type CandleQueryParams struct { From time.Time To time.Time Interval CandleInterval }
type CandleQueryResult ¶
type CandleQueryResult struct { MarketID store.EntityID `json:"market_id"` Pair string `json:"pair"` Candles []CandleEntry `json:"candles"` }
type DailyQueryResult ¶
type IteratorCB ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) IteratorByMarketAndInterval ¶
func (Keeper) OnFillEvent ¶
func (Keeper) ReverseIteratorByMarket ¶
func (k Keeper) ReverseIteratorByMarket(mktID store.EntityID, cb IteratorCB)
func (Keeper) ReverseIteratorByMarketFrom ¶
type TickQueryResult ¶
type TickQueryResult struct { MarketID store.EntityID `json:"market_id"` Pair string `json:"pair"` Ticks []TickEntry `json:"ticks"` }
func (TickQueryResult) String ¶
func (t TickQueryResult) String() string
Click to show internal directories.
Click to hide internal directories.