Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动说明
Massive snapshot 的
lastTrade.t单位是纳秒,但当前mapQuote将其当毫秒处理。例如1699559040123456000被输出为Quote.timestamp=1699559040123456,正确应是1699559040。错误时间继续传入 provenance,热力图将其判断为未来时间并保留unknown,正常报价的涨跌幅也无法使用。本次先将最新成交时间从纳秒转换到毫秒,再沿用已有秒级 Quote 输出。
min.t的毫秒与updated的纳秒后备路径保持不变。修正原测试中误用毫秒的成交 fixture,并补后备路径及 provider → router/cache → Heatmap 的精确时间和涨跌幅断言。官方契约:Single Ticker Snapshot;官方 Go SDK LastTradeSnapshot 将
t声明为Nanos。关联 Issue
未关联现有 Issue。与此前 Quote 秒 → provenance 毫秒的修复不同,本次处理供应商原始纳秒 → Quote 秒的入口转换。
测试报告
环境
helsome/folio的main,e42e9279bf6aac810dd1361ba458fec0b94be9dcbun install --frozen-lockfile --ignore-scripts实际执行命令与结果
Scope / 后续
仅修复 snapshot 最新成交时间的单位;未接入真实凭据或调用付费数据服务,网络响应使用官方字段契约的 fixture。