Documentation ¶
Index ¶
- func GenerateMarketParamPrice(optionalModifications ...MarketParamPriceModifierOption) *pricestypes.MarketParamPrice
- func MustHumanPriceToMarketPrice(humanPrice string, exponent int32) (marketPrice uint64)
- type MarketParamPriceModifierOption
- func WithExchangeConfigJson(configJson string) MarketParamPriceModifierOption
- func WithExponent(exp int32) MarketParamPriceModifierOption
- func WithId(id uint32) MarketParamPriceModifierOption
- func WithMinExchanges(minExchanges uint32) MarketParamPriceModifierOption
- func WithMinPriceChangePpm(minPriceChangePpm uint32) MarketParamPriceModifierOption
- func WithPair(pair string) MarketParamPriceModifierOption
- func WithPnlPriceValue(price uint64) MarketParamPriceModifierOption
- func WithSpotPriceValue(price uint64) MarketParamPriceModifierOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMarketParamPrice ¶
func GenerateMarketParamPrice(optionalModifications ...MarketParamPriceModifierOption) *pricestypes.MarketParamPrice
GenerateMarketParamPrice returns a `MarketParamPrice` object set to default values. Passing in `MarketParamPriceModifierOption` methods alters the value of the `MarketParamPrice` returned. It will start with the default, valid `MarketParamPrice` value defined within the method and make the requested modifications before returning the object.
Example usage: `GenerateMarketParamPrice(WithId(10))` This will start with the default `MarketParamPrice` object defined within the method and return the newly-created object after overriding the values of `Id` to 10.
Types ¶
type MarketParamPriceModifierOption ¶
type MarketParamPriceModifierOption func(cp *pricestypes.MarketParamPrice)
func WithExchangeConfigJson ¶
func WithExchangeConfigJson(configJson string) MarketParamPriceModifierOption
func WithExponent ¶
func WithExponent(exp int32) MarketParamPriceModifierOption
func WithId ¶
func WithId(id uint32) MarketParamPriceModifierOption
func WithMinExchanges ¶
func WithMinExchanges(minExchanges uint32) MarketParamPriceModifierOption
func WithMinPriceChangePpm ¶
func WithMinPriceChangePpm(minPriceChangePpm uint32) MarketParamPriceModifierOption
func WithPair ¶
func WithPair(pair string) MarketParamPriceModifierOption
func WithPnlPriceValue ¶
func WithPnlPriceValue(price uint64) MarketParamPriceModifierOption
func WithSpotPriceValue ¶
func WithSpotPriceValue(price uint64) MarketParamPriceModifierOption
Click to show internal directories.
Click to hide internal directories.