From dd1032b0074353e118d6ba48e4dcf27bb0a126b1 Mon Sep 17 00:00:00 2001 From: Scott Alfter Date: Mon, 20 Oct 2014 20:25:38 -0700 Subject: [PATCH] calling code shouldn't have to split out the Cryptsy key...preparing for support for other exchanges --- ProfitLib.py | 2 +- ProfitTest.py | 2 +- profit.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ProfitLib.py b/ProfitLib.py index 006cd61..ae2cd65 100755 --- a/ProfitLib.py +++ b/ProfitLib.py @@ -37,7 +37,7 @@ class ProfitLib: def __init__(self, daemons, credentials): self.daemons=daemons self.out={} - self.api=PyCryptsy(str(credentials["pubkey"]), str(credentials["privkey"])) + self.api=PyCryptsy(str(credentials["cryptsy"]["pubkey"]), str(credentials["cryptsy"]["privkey"])) # get latest profitability info diff --git a/ProfitTest.py b/ProfitTest.py index 3671149..d0d4b1c 100755 --- a/ProfitTest.py +++ b/ProfitTest.py @@ -26,5 +26,5 @@ from ProfitLib import * import json -profit=ProfitLib(json.loads(open("daemon_config.json").read()), json.loads(open("exchange_config.json").read())["cryptsy"]) +profit=ProfitLib(json.loads(open("daemon_config.json").read()), json.loads(open("exchange_config.json").read())) print json.dumps(profit.Calculate(), sort_keys=True, indent=4, separators=(',', ': ')) diff --git a/profit.py b/profit.py index 8432aaa..6407b2a 100755 --- a/profit.py +++ b/profit.py @@ -36,7 +36,7 @@ if (len(sys.argv)!=2): algo=sys.argv[1] -pl=ProfitLib(json.loads(open("daemon_config.json").read()), json.loads(open("exchange_config.json").read())["cryptsy"]) +pl=ProfitLib(json.loads(open("daemon_config.json").read()), json.loads(open("exchange_config.json").read())) profit=pl.Calculate() result={}