Skip to main content

MySQL database adapter for VeighNa quant trading framework.

Project description

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;

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vnpy_mysql-1.0.5.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

vnpy_mysql-1.0.5-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file vnpy_mysql-1.0.5.tar.gz.

File metadata

  • Download URL: vnpy_mysql-1.0.5.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for vnpy_mysql-1.0.5.tar.gz
Algorithm Hash digest
SHA256 3d507d76111c414847cce6abc9c395f9c5b1e35546bacbfe7ded9400d937076d
MD5 7dba660a7d708b216613925776f4d31f
BLAKE2b-256 e3b3026aafb19eaafc682d6d480045eaafaa6265f430f676ce8a03c7aca77fd7

See more details on using hashes here.

File details

Details for the file vnpy_mysql-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: vnpy_mysql-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for vnpy_mysql-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 aa66f63643ebc6ca9010d6fbf19366e3173cc130e4d9b8676aef27246c4673e0
MD5 e77a8b296e673ff3607576d0479db700
BLAKE2b-256 483774653512c2c6763cfddda126f396f68b37468650bb72879c3434ead95168

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page