你可能遇到的问题:
- 请求被Ban,国内服务器无法直接访问OKX API接口;
- 使用HTTP Proxy代理存在网络不稳定性与秘钥安全问题;
- 运行实盘算法需要高配置服务器,同配置的境外服务器价格比境内服务器价格贵数倍以上;
- 本地测试每次都需要将代码同步给境外服务器,测试不方便;
- 实盘服务的请求权重过多,经常被官方限制,如何通过多IP减缓权重压力;
OKX_resender是用于转发OKX请求的Web服务,帮助用户搭建私有转发服务器,保证请求的稳定、低延时与秘钥安全,OKX(库)实盘交易框架全面支持OKX_resender功能。
- 系统:Centos7.6
- 地区:香港
- 转发服务器性能最低要求:(2C2G10Mbps)建议:(2C4G30Mbps)
- 以下文档采用腾讯云的轻量应用服务器(2C4G30Mbps)
- 注意服务器的带宽,最佳应>=30Mpbs,因为有些单次请求的数据量较大,转发速度的瓶颈在于带宽(例如:获取全部产品信息);
- 不建议打开日志记录功能,极简配置更利于转发速率;
- 推荐使用服务器的内网调用,减少通信延迟;
- 对于时间粒度为1s的高频交易,实时价格信息同步不建议使用OKX_resender;
- 以香港服务器为例。内地通过OKX_resender转发并获得响应的平均等待时间为:220ms(公网通信)
- 香港服务器与OKX通信的平均等待时间为:80ms
- OKX仅建议使用香港服务器