Skip to content

Commit

Permalink
Discover minimum amount in EUR (#594)
Browse files Browse the repository at this point in the history
I think this solves #589.
  • Loading branch information
tuberculo authored and rnevet committed Dec 13, 2017
1 parent a6fcefb commit 4bb2997
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/Bitfinex.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ def create_loan_offer(self, currency, amount, duration, auto_renew, lending_rate
usd_min = 50
cur_min = usd_min
if currency != 'USD':
if currency == 'EUR':
cur_min = usd_min / float(self.return_ticker()['USD_' + 'BTC']['lowestAsk']) * float(self.return_ticker()['EUR_' + 'BTC']['lowestAsk'])
cur_min = usd_min / float(self.return_ticker()['USD_' + currency]['lowestAsk'])

raise Exception("Error create_loan_offer: Amount must be at least " + str(cur_min) + " " + currency)
Expand Down

0 comments on commit 4bb2997

Please sign in to comment.