calling code shouldn't have to split out the Cryptsy key...preparing for support for other exchanges
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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=(',', ': '))
|
||||
|
||||
@@ -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={}
|
||||
|
||||
Reference in New Issue
Block a user