fixed 接收spot时,分钟级别的成交量为股数

This commit is contained in:
fasiondog 2024-05-07 23:09:39 +08:00
parent c63f9d6360
commit 2169f3fef9
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ public:
price_t lowPrice; ///< 最低价
price_t closePrice; ///< 最低价
price_t transAmount; ///< 成交金额(千元)
price_t transCount; ///< 成交量(手)
price_t transCount; ///< 成交量(手),日线以下为股数
KRecord()
: datetime(Null<Datetime>()),

View File

@ -156,7 +156,8 @@ static void updateStockMinData(const SpotRecord& spot, KQuery::KType ktype) {
}
price_t amount = spot.amount > sum_amount ? spot.amount - sum_amount : spot.amount;
price_t volume = spot.volume > sum_volume ? spot.volume - sum_volume : spot.volume;
price_t spot_volume = spot.volume * 100; // spot 传过来的是手数
price_t volume = spot_volume > sum_volume ? spot_volume - sum_volume : spot_volume;
KRecord krecord(minute, spot.open, spot.high, spot.low, spot.close, amount, volume);
stk.realtimeUpdate(krecord, ktype);
}