-
Notifications
You must be signed in to change notification settings - Fork 136
Conversation
bitex/interface/bittrex.py
Outdated
"""Return the account wallet.""" | ||
payload = kwargs | ||
if currency: | ||
payload = {'currency': currency} | ||
payload.update(kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good attempt at fixing this, but better would be:
payload = kwargs
if currency:
payload.update({'currency': currency})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better I think it's to update kwargs and pass kwargs to the params instead of a new variable called payload. I updated the entire file accordingly.
bitex/interface/bittrex.py
Outdated
@@ -103,13 +102,12 @@ def cancel_order(self, *order_ids, **kwargs): | |||
return results if len(results) > 1 else results[0] | |||
|
|||
@format_with(BittrexFormattedResponse) | |||
def wallet(self, *args, currency=None, **kwargs): # pylint: disable=arguments-differ | |||
def wallet(self, currency=None, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See Issue #183 for the reason *args
and **kwargs
need to stay.
Moving the pylint comment above the line might actually be prettier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, but *args must stay before currency or changing the order is ok? Because I was assuming, for consistency, that *args and **kwargs ideally should always be the last parameters of the methods. Not put something in the middle like the currency in this case...
Fix withdraw & *_history methods (they are private: authenticate=True). Add pair check in the trade_history method. Various DRY-ups and clean-ups.
Updated based on your feedback, just
Any reason to put |
Regarding the order of arguments: |
No description provided.