diff --git a/ethfinex/__init__.py b/ethfinex/__init__.py index aee9568..1d2e3e2 100644 --- a/ethfinex/__init__.py +++ b/ethfinex/__init__.py @@ -1 +1 @@ -name = "ethfniex" \ No newline at end of file +name = "ethfniex" diff --git a/ethfinex/public_client.py b/ethfinex/public_client.py index ea4183e..6b96ccb 100644 --- a/ethfinex/public_client.py +++ b/ethfinex/public_client.py @@ -115,11 +115,10 @@ def get_books(self, pair, precision, len=None): accepted_len = [25, 100] if len and len in accepted_len: params['len'] = len - return self._send_message(f'/book/{pair}/{precision}', params=params) elif len and len not in accepted_len: raise ValueError('The len can only be 25 or 100.') - return self._send_message(f'/book/{pair}/{precision}') + return self._send_message(f'/book/{pair}/{precision}', params=params) # TODO: Include 'side' for the 'pos.size' calls. def get_stats(self, symbol, key, size, side, section, sort=None): @@ -209,7 +208,8 @@ def get_candles(self, symbol, time_frame, section, if sort: params['sort'] = sort - return self._send_message(f'/candles/trade:{time_frame}:{symbol}/{section}', + url = 'candles/trade:' + return self._send_message(f'{url}{time_frame}:{symbol}/{section}', params=params) def _send_message(self, endpoint, params=None, data=None): diff --git a/setup.py b/setup.py index bbd1cd1..d7cac60 100644 --- a/setup.py +++ b/setup.py @@ -18,4 +18,4 @@ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], -) \ No newline at end of file +)