Documentation ¶
Index ¶
- type SimplePriceSolver
- func (m *SimplePriceSolver) BindStream(stream types.Stream)
- func (m *SimplePriceSolver) ResolvePrice(asset string, preferredFiats ...string) (fixedpoint.Value, bool)
- func (m *SimplePriceSolver) Update(symbol string, price fixedpoint.Value)
- func (m *SimplePriceSolver) UpdateFromTickers(ctx context.Context, ex types.Exchange, symbols ...string) error
- func (m *SimplePriceSolver) UpdateFromTrade(trade types.Trade)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimplePriceSolver ¶
type SimplePriceSolver struct {
// contains filtered or unexported fields
}
SimplePriceSolver implements a map-structure-based price index
func NewSimplePriceResolver ¶
func NewSimplePriceResolver(markets types.MarketMap) *SimplePriceSolver
func (*SimplePriceSolver) BindStream ¶ added in v1.61.0
func (m *SimplePriceSolver) BindStream(stream types.Stream)
func (*SimplePriceSolver) ResolvePrice ¶
func (m *SimplePriceSolver) ResolvePrice(asset string, preferredFiats ...string) (fixedpoint.Value, bool)
func (*SimplePriceSolver) Update ¶
func (m *SimplePriceSolver) Update(symbol string, price fixedpoint.Value)
func (*SimplePriceSolver) UpdateFromTickers ¶ added in v1.61.0
func (*SimplePriceSolver) UpdateFromTrade ¶
func (m *SimplePriceSolver) UpdateFromTrade(trade types.Trade)
Click to show internal directories.
Click to hide internal directories.