xiaohe wrote:
ctp接口不支持mac,请把ctp接口的代码注释掉,选择其他接口
https://www.vnpy.com/forum/topic/3120-30duo-tao-apijie-kou-huan-pa-man-zu-bu-liao-ni-de-liang-hua-jiao-yi-xu-qiu
国内市场用到的绝大部分量化交易接口(如CTP、飞马、飞创、恒生等),其开发商只提供了Windows和Linux的API开发包。没有Mac版本(无法直接使用)的同时,也没有提供API源代码(无法自行编译),因此这类接口在Mac系统上无法使用(强行加载会报错找不到C++的DLL文件)。但纯Python接口和REST/WebSocket接口,由于不存在对于C++链接库的依赖,所以在Mac上均可以直接运行。
能推荐一个MAC上的接口么?
qt.qpa.fonts: Populating font family aliases took 77 ms. Replace uses of missing font family "微软雅黑" with one that exists to avoid this cost.
2023-02-12 18:08:29.750 python[14653:285221] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit
Traceback (most recent call last):
File "/opt/homebrew/anaconda3/envs/toberich/lib/python3.9/site-packages/vnpy_portfoliostrategy/ui/widget.py", line 140, in add_strategy
self.strategy_engine.add_strategy(
File "/opt/homebrew/anaconda3/envs/toberich/lib/python3.9/site-packages/vnpy_portfoliostrategy/engine.py", line 344, in add_strategy
strategy: StrategyTemplate = strategy_class(self, strategy_name, vt_symbols, setting)
File "/opt/homebrew/anaconda3/envs/toberich/lib/python3.9/site-packages/vnpy_portfoliostrategy/strategies/pair_trading_strategy.py", line 66, in init
self.leg1_symbol, self.leg2_symbol = vt_symbols
ValueError: not enough values to unpack (expected 2, got 1)