测试托管者与交易所服务器的真实网络延迟/ 支持同时测试多个交易所
0
Follow
14
Followers
Contact : [email protected] / WeChat@stay37
本策略为测试托管者到服务器之间的真实网络延迟,测试方法为:对比发送请求的时间和收到结果的时间,多次取平均值。
支持多个交易所同时测试,添加不同交易平台即可,需要安装numpy模块。
Source
Python
# Contact : [email protected] / WeChat@stay37
import time
import numpy as np
def test():
#延迟数据接收器
delay_list = []
for i in range(len(exchanges)):
delay_list.append([])
while True:Related strategies
Comment
All comments (1)
本机安装了numpy模块, 测试也没问题 ,可是fmz上依然提示 line 4, in <module> ModuleNotFoundError: No module named 'numpy'
~$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04)
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import numpy
exit()
6 years ago
- 1
