Documentation ¶
Index ¶
- Variables
- func CheckSimilarity(a Offer, b Offer, percentage int64) bool
- func FormatUSD(usd *big.Rat) string
- type ExchangeRate
- type FixedPremiumTrader
- func (t *FixedPremiumTrader) PauseOrderPreparation(now time.Time)
- func (t *FixedPremiumTrader) PrepareBindingOffer(siacoin types.Currency, minerFee types.Currency, now time.Time) (*Offer, *time.Time, error)
- func (t *FixedPremiumTrader) PrepareNonBindingOffer(siacoin types.Currency, minerFee types.Currency, now time.Time) (*Offer, error)
- func (t *FixedPremiumTrader) ResumeOrderPreparation()
- type Offer
- type Rate
- type Trader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParsingFailed = errors.New("unable to parse exchange rate") ErrExchangeRateNotFound = errors.New("requested exchange rate not found") )
Functions ¶
Types ¶
type ExchangeRate ¶
type ExchangeRate struct {
// contains filtered or unexported fields
}
func NewExchangeRate ¶
func NewExchangeRate() *ExchangeRate
type FixedPremiumTrader ¶
type FixedPremiumTrader struct {
// contains filtered or unexported fields
}
func NewFixedPremiumTrader ¶
func NewFixedPremiumTrader(premiumUSD *big.Rat, antiSpamFee big.Int, ethChain ethereum.Blockchain, siaChain sia.Blockchain) FixedPremiumTrader
func (*FixedPremiumTrader) PauseOrderPreparation ¶
func (t *FixedPremiumTrader) PauseOrderPreparation(now time.Time)
func (*FixedPremiumTrader) PrepareBindingOffer ¶
func (*FixedPremiumTrader) PrepareNonBindingOffer ¶
func (*FixedPremiumTrader) ResumeOrderPreparation ¶
func (t *FixedPremiumTrader) ResumeOrderPreparation()
type Trader ¶
type Trader interface { PrepareNonBindingOffer(siacoin types.Currency, minerFee types.Currency, now time.Time) (offer *Offer, err error) PrepareBindingOffer(siacoin types.Currency, minerFee types.Currency, now time.Time) (offer *Offer, deadline *time.Time, err error) PauseOrderPreparation(now time.Time) ResumeOrderPreparation() }
Click to show internal directories.
Click to hide internal directories.