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

交易发生错误 #1

Open
chenpu85 opened this issue Sep 5, 2014 · 2 comments
Open

交易发生错误 #1

chenpu85 opened this issue Sep 5, 2014 · 2 comments

Comments

@chenpu85
Copy link

chenpu85 commented Sep 5, 2014

File "D:\Program Files\Code\python2732\lib\urllib2.py", line 382, in _call_chain
result = func(*args)
File "D:\Program Files\Code\python2732\lib\urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 400: Bad Request

您好,用了您的API,查询账户什么的都没问题,交易就会出错,上面是错误信息,请问是什么原因呢?谢谢!
下面是代码:

markets = client.get(get_api_path('markets'))
print markets

sell 10 dogecoins at price 0.01

params = {'market': 'dogcny', 'side': 'sell', 'volume': 10, 'price': 0.01}
res = client.post(get_api_path('orders'), params)
print res

@JohnnyZhao
Copy link
Owner

你调试什么 API 出的错?挂卖单?
有可能是你卖单或者买单的价格太高或太低导致的,挂单价格需要在交易所时时成交价格的上下 100 倍(具体倍数忘记了,你可以再求证下貔貅的工作人员)以内才可以成功挂单。

@chenpu85
Copy link
Author

chenpu85 commented Sep 9, 2014

试过了,还是不行,在这个范围内也是这个错误

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

2 participants