Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于getAmountConfig错误 #3

Open
fantasy-mark opened this issue Jan 9, 2017 · 4 comments
Open

关于getAmountConfig错误 #3

fantasy-mark opened this issue Jan 9, 2017 · 4 comments

Comments

@fantasy-mark
Copy link

我调试的过程有这个错误,是config.json没有设置好吗?谢谢
image

@philsong
Copy link
Owner

没有配置交易所的key

@fantasy-mark
Copy link
Author

fantasy-mark commented Jan 14, 2017 via email

@boyzun
Copy link

boyzun commented Apr 24, 2017

你好,我调试过程中出现与fantasy-mark同样的错误。请问除了bitcoin-arbitrage模块需要配置key外,在bitcoin-broker模块中还需要配置吗?我在bitcoin-arbitrage中出现如下错误,但key应该是已经配置好的,查询两个账号的能正确返回数据。

[root@x3550m2-1 bitcoin-arbitrage-github]# python3 arbitrage/arbitrage.py -m OkCoinCNY,HuobiCNY get-balance
PrivateOkCoinCNY: {'btc_balance': 0.0, 'btc_frozen': 0.0, 'cny_balance': 100.53, 'cny_frozen': 0.0}
PrivateHuobiCNY: {'btc_balance': 0.0009, 'btc_frozen': 0.0, 'cny_balance': 93.27, 'cny_frozen': 0.0}

[root@x3550m2-1 bitcoin-arbitrage-github]# python3 arbitrage/arbitrage.py -oTraderBotSim -mOKCoinCNY,HuobiCNY
2017-04-25 00:06:17,108 [INFO] BasicBot Setup complete
2017-04-25 00:06:17,359 [WARNING] load client id failed!
Traceback (most recent call last):
File "arbitrage/arbitrage.py", line 204, in
main()
File "arbitrage/arbitrage.py", line 201, in main
cli.main()
File "arbitrage/arbitrage.py", line 197, in main
self.exec_command(args)
File "arbitrage/arbitrage.py", line 33, in exec_command
self.arbitrer.loop()
File "/root/BTC/bitcoin-arbitrage-github/arbitrage/arbitrer.py", line 242, in loop
self.tick()
File "/root/BTC/bitcoin-arbitrage-github/arbitrage/arbitrer.py", line 204, in tick
observer.begin_opportunity_finder(self.depths)
File "/root/BTC/bitcoin-arbitrage-github/arbitrage/observers/traderbot.py", line 47, in begin_opportunity_finder
self.check_order(depths)
File "/root/BTC/bitcoin-arbitrage-github/arbitrage/observers/traderbot.py", line 70, in check_order
if self.is_buying():
File "/root/BTC/bitcoin-arbitrage-github/arbitrage/observers/basicbot.py", line 145, in is_buying
return len(self.get_orders('buy')) > 0
File "/root/BTC/bitcoin-arbitrage-github/arbitrage/observers/basicbot.py", line 132, in get_orders
orders = [x for x in self.orders if x['type'] == type]
AttributeError: 'TraderBotSim' object has no attribute 'orders'

@qct
Copy link
Contributor

qct commented Jun 25, 2017

交易所的 public key, secret key 要自己往数据库里面写吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants