absortium / poloniex-api

Python Poloniex sync/async API
MIT License
93 stars 21 forks source link

Trading API "buy" bug #18

Open Sajam opened 7 years ago

Sajam commented 7 years ago

When I call:

sync_app_with_auth.trading.buy('BTC_XMR', 1, 1)

I got:

[...]
  File "/src/poloniex/poloniex/api/base.py", line 42, in decorator
    method, params = self.get_params(func.__name__, **kwargs)
TypeError: get_params() got multiple values for argument 'self'

The same for sell (and probably any other method).

When I call it like this:

sync_app_with_auth.trading.api_call(data={
    'command': 'buy',
    'currencyPair': 'BTC_XMR',
    'rate': 1,
    'amount': 1,
})

Everything works well (so it's probably command_operator decorator bug).

Python 3.5

rueberger commented 7 years ago

Workaround: use kwargs