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

怎么处理请求超时异常的 #2

Open
hi-noikiy opened this issue Jun 10, 2018 · 3 comments
Open

怎么处理请求超时异常的 #2

hi-noikiy opened this issue Jun 10, 2018 · 3 comments

Comments

@hi-noikiy
Copy link

现在超时异常的话会退出程序,无法继续执行了。

@echo-ray
Copy link

在适当的位置加try, except吧,先在获取行情的时候计算一下延迟,太大了则不下单,继续查询行情之类的
另外如果经常超时的话,说明网络不太好(我这边一般在200ms以内,有朋友是100ms以内),这样可能会影响你的收益的

@songshijun007
Copy link

我这边是需要挂代理才可以,否则就是延迟就特别高,不知道你是不是这种情况

@echo-ray
Copy link

@hi-noikiy @songshijun007 可以考虑使用海外的服务器跑,否则容易产生滑点吧

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

3 participants