From 2c2c861a8f3629f994ba0dbbc1c7bb86256d4459 Mon Sep 17 00:00:00 2001 From: Victor Grau Serrat Date: Tue, 26 Sep 2017 11:40:25 -0600 Subject: [PATCH] WIP: Poloniex exchange - fix for multiple exchanges --- catalyst/exchange/poloniex/poloniex_api.py | 1 - catalyst/utils/run_algo.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/catalyst/exchange/poloniex/poloniex_api.py b/catalyst/exchange/poloniex/poloniex_api.py index 2efdd858..ee5f5198 100644 --- a/catalyst/exchange/poloniex/poloniex_api.py +++ b/catalyst/exchange/poloniex/poloniex_api.py @@ -40,7 +40,6 @@ class Poloniex_api(object): req['command'] = method req['nonce'] = int(time.time()*1000) post_data = urllib.parse.urlencode(req) - print(post_data) signature = hmac.new(self.secret, post_data, hashlib.sha512).hexdigest() headers = { 'Sign': signature, 'Key': self.key} else: diff --git a/catalyst/utils/run_algo.py b/catalyst/utils/run_algo.py index de8e64a5..9130d2af 100644 --- a/catalyst/utils/run_algo.py +++ b/catalyst/utils/run_algo.py @@ -170,7 +170,6 @@ def _run(handle_data, base_currency=base_currency, portfolio=portfolio ) - elif exchange_name == 'bittrex': exchanges[exchange_name] = Bittrex( key=exchange_auth['key'], @@ -179,7 +178,7 @@ def _run(handle_data, portfolio=portfolio ) elif exchange_name == 'poloniex': - exchange = Poloniex( + exchanges[exchange_name] = Poloniex( key=exchange_auth['key'], secret=exchange_auth['secret'], base_currency=base_currency,