-
Notifications
You must be signed in to change notification settings - Fork 368
/
querier.go
32 lines (28 loc) · 1011 Bytes
/
querier.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package types
// price Takes an [assetcode] and returns CurrentPrice for that asset
// pricefeed Takes an [assetcode] and returns the raw []PostedPrice for that asset
// assets Returns []Assets in the pricefeed system
const (
// QueryGetParams command for params query
QueryGetParams = "parameters"
// QueryMarkets command for assets query
QueryMarkets = "markets"
// QueryOracles command for oracles query
QueryOracles = "oracles"
// QueryRawPrices command for raw price queries
QueryRawPrices = "rawprices"
// QueryPrice command for price queries
QueryPrice = "price"
// QueryPrices command for quering all prices
QueryPrices = "prices"
)
// QueryWithMarketIDParams fields for querying information from a specific market
type QueryWithMarketIDParams struct {
MarketID string
}
// NewQueryWithMarketIDParams creates a new instance of QueryWithMarketIDParams
func NewQueryWithMarketIDParams(marketID string) QueryWithMarketIDParams {
return QueryWithMarketIDParams{
MarketID: marketID,
}
}