Remove get_fee_maker/taker and add argument to get_fee instead
This commit is contained in:
parent
91b2092d55
commit
6115fb08c0
@ -342,18 +342,12 @@ def get_id() -> str:
|
||||
return _API.id
|
||||
|
||||
|
||||
def get_fee_maker() -> float:
|
||||
return _API.fees['trading']['maker']
|
||||
|
||||
|
||||
def get_fee_taker() -> float:
|
||||
return _API.fees['trading']['taker']
|
||||
|
||||
|
||||
def get_fee() -> float:
|
||||
def get_fee(symbol='ETH/BTC', type='', side='', amount=1,
|
||||
price=1, taker_or_maker='maker') -> float:
|
||||
# validate that markets are loaded before trying to get fee
|
||||
if _API.markets is None or len(_API.markets) == 0:
|
||||
_API.load_markets()
|
||||
|
||||
return _API.calculate_fee(symbol='ETH/BTC', type='', side='', amount=1, price=1)['rate']
|
||||
return _API.calculate_fee(symbol=symbol, type=type, side=side, amount=amount,
|
||||
price=price, takerOrMaker=taker_or_maker)['rate']
|
||||
|
||||
|
@ -323,7 +323,7 @@ class FreqtradeBot(object):
|
||||
pair=pair,
|
||||
stake_amount=stake_amount,
|
||||
amount=amount,
|
||||
fee=exchange.get_fee_maker(),
|
||||
fee=exchange.get_fee(taker_or_maker='maker'),
|
||||
open_rate=buy_limit,
|
||||
open_date=datetime.utcnow(),
|
||||
exchange=exchange.get_id(),
|
||||
|
Loading…
Reference in New Issue
Block a user