Ensure markets are loaded before getting fee
This commit is contained in:
parent
116cd126e0
commit
219bd58db1
@ -203,7 +203,8 @@ def get_name() -> str:
|
||||
|
||||
|
||||
def get_fee() -> float:
|
||||
if not _API.markets:
|
||||
# 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('ETH/BTC', '', '', 1, 1)['rate']
|
||||
|
Loading…
Reference in New Issue
Block a user