30 Star 77 Fork 79

liuyinghua/FastTrader

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Sqlite3Sql.h 2.21 KB
一键复制 编辑 原始数据 按行查看 历史
liuyinghua 提交于 2018-04-22 22:33 +08:00 . 数据的存储
#pragma once
const char* sql_create_table_instruments =
"create table if not exists instruments"
"(InstrumentID char(31),"
"ExchangeID char(9),"
"InstrumentName char(21),"
"ExchangeInstID char(31),"
"ProductID char(31),"
"ProductClass int,"
"DeliveryYear int,"
"DeliveryMonth int,"
"MaxMarketOrderVolume int,"
"MinMarketOrderVolume int,"
"MaxLimitOrderVolume int,"
"MinLimitOrderVolume int,"
"VolumeMultiple int,"
"PriceTick double,"
"CreateDate char(9),"
"OpenDate char(9),"
"ExpireDate char(9),"
"StartDelivDate char(9),"
"EndDelivDate char(9),"
"InstLifePhase int,"
"IsTrading int,"
"PositionType int,"
"PositionDateType int,"
"LongMarginRatio double,"
"ShortMarginRatio double,"
"Primary Key(InstrumentID,ExchangeID))";
const char* sql_create_table_report =
"create table if not exists %1%("
"InstrumentID char(31),"
"ExchangeID char(9),"
"TradingDay char(9),"
"TradingTime BIGINT,"
"TradingMillisec int,"
"PreClosePrice double,"
"OpenPrice double,"
"ClosePrice double,"
"HighestPrice double,"
"LowestPrice double,"
"LastPrice double,"
"AveragePrice double,"
"CurrDelta double,"
"PreDelta double,"
"PreSettlementPrice double,"
"SettlementPrice double,"
"UpperLimitPrice double,"
"LowerLimitPrice double,"
"OpenInterest double,"
"Volume double,"
"Turnover double,"
"BidPrice1 double,"
"BidVolume1 int,"
"AskPrice1 double,"
"AskVolume1 int)";
const char* sql_create_minute =
"create table if not exists %1%("
"InstrumentID char(31),"
"ExchangeID char(31),"
"InstrumentName char(31),"
"LastPrice double,"
"HighestPrice double,"
"LowestPrice double,"
"Volume BIGINT,"
"Turnover double,"
"UpdateTime int,"
"UpdateMillisec int)";
const char* sql_create_exchange =
"create table if not exists exchanges("
"ExchangeID char(16),"
"ExchangeName char(32),"
"ExchangeProperty int,"
"Primary Key(ExchangeID))";
const char* sql_create_kata =
"create table if not exists %1%(kid INTEGER PRIMARY KEY AUTOINCREMENT,"
"InstrumentID char(31),ExchangeID char(31),TradingDay char(9),"
"OpenPrice double,HighestPrice double,LowestPrice double,"
"ClosePrice double,Volume BIGINT,Turnover double,AveragePrice double,"
"PreClosePrice double,TradingTime int)";
const char* sql_begin_transaction = "begin transaction;";
const char* sql_commit_transaction = "commit transaction;";
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mongodb_client/FastTrader.git
[email protected]:mongodb_client/FastTrader.git
mongodb_client
FastTrader
FastTrader
master

搜索帮助