Skip to content

Commit

Permalink
Change min btc amount
Browse files Browse the repository at this point in the history
  • Loading branch information
primeroz committed Feb 9, 2021
1 parent 3ba5d18 commit 6d07476
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions exchange/kraken.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ type Kraken struct {
UserRef int32
}

const MIN_BTC_AMOUNT = 0.0002

//func getTimeInfo() (time.Time, time.Time, time.Duration) {
// // Always use the local timezone
// loc, _ := time.LoadLocation("Local")
Expand Down Expand Up @@ -174,9 +176,9 @@ func (k *Kraken) createOrderArgs(c *cli.Context, volume float64, price string, l
args["price"] = price
args["oflags"] = "fciq" // "buy" button will actually sell the quote currency in exchange for the base currency, pay fee in the the quote currenty ( fiat )

// If volume < 0.001 then error - this is the minimum kraken order volume
if volume < 0.001 {
return args, fmt.Errorf("Minimum volume for BTC Order on Kraken is 0.001 got %s. Consider increasing the amount of Fiat", args["volume"])
// If volume < MIN_BTC_AMOUNT then error - this is the minimum kraken order volume
if volume < MIN_BTC_AMOUNT {
return args, fmt.Errorf("Minimum volume for BTC Order on Kraken is %f got %s. Consider increasing the amount of Fiat", MIN_BTC_AMOUNT, args["volume"])
}

log.WithFields(logrus.Fields{
Expand Down

0 comments on commit 6d07476

Please sign in to comment.