calling code shouldn't have to split out the Cryptsy key...preparing for support for other exchanges

This commit is contained in:
2014-10-20 20:25:38 -07:00
parent 61078cae92
commit dd1032b007
3 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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=(',', ': '))

View File

@@ -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={}