Socket
Socket
Sign inDemoInstall

vnpy-mysql

Package Overview
Dependencies
2
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vnpy-mysql

MySQL database adapter for VeighNa quant trading framework.


Maintainers
1

Readme

VeighNa框架的MySQL数据库接口

说明

基于peewee开发的MySQL数据库接口。

使用

全局配置

在VeighNa中使用MySQL时,需要在全局配置中填写以下字段信息:

名称含义必填举例
database.name名称mysql
database.host地址localhost
database.port端口3306
database.database实例vnpy
database.user用户名root
database.password密码123456

创建实例(Schema)

VeighNa不会主动为MySQL数据库创建实例,所以使用前请确保database.database字段中填写的的数据库实例已经创建了。

若实例尚未创建,可以使用【MySQL Workbench】客户端的【new_schema】进行操作。

字符串大小写敏感支持

由于peewee的建表功能限制,默认情况下在保存合约代码的【symbol】字段时,无法区分字符串大小写。如果影响使用,可按照以下方式手动修改MySQL数据表来解决:

# 用MySQL命令行工具连接数据库

# 选择数据实例
use vnpy;

# 修改四张表symbol字段的BINARY属性
ALTER TABLE `dbbaroverview` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;

ALTER TABLE `dbtickoverview` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;

ALTER TABLE `dbbardata` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;

ALTER TABLE `dbtickdata` MODIFY COLUMN `symbol` VARCHAR(45) BINARY;

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc