地址: https://github.com/siaosing/vnpy_arctic/tree/Dev
由于arctic不再支持python3.7之后的版本,其官方团队切换至ArcticDB项目(目前支持python3.6~3.11),VeighNa官方团队的vnpy_arctic在VNStudio 3.0系列之后不再维护更新。 本项目基于ArcticDB文档和vnpy_arctic代码重新开发,供大家参考使用。
ArcticDB支持多进程同时读取同一数据表,默认不支持同时写入同一数据表(Arctic libraries support concurrent writes and reads to multiple symbols as well as concurrent reads to a single symbol. However, concurrent writers to a single symbol are not supported other than for primitives that explicitly state support for single-symbol concurrent writes.)同时写入同一数据表需要用使用stage参数(Note that write is not designed for multiple concurrent writers over a single symbol unless the staged keyword argument is set to True. If staged is True, written segments will be staged and left in an "incomplete" stage, unable to be read until they are finalized. This enables multiple writers to a single symbol - all writing staged data at the same time - with one process able to later finalize all staged data rendering the data readable by clients. To finalize staged data, see finalize_staged_data.)
测试了一下 读取47475个bar 耗时在0.39s左右,相比之下sqlite耗时2.48s左右
(vt_setting.json中需配置
"database.timezone": "Asia/Shanghai",
"database.name": "arcticdb")