docs(skill): 修正 Go SDK reference 并补齐 content 文档#1062
Closed
huacnlee wants to merge 2 commits into
Closed
Conversation
Add references/go-sdk/ (overview, quote-context, trade-context, types)
mirroring the existing rust-sdk reference set, and link it from SKILL.md.
Content kept concise: high-level method/struct/enum coverage with pointers
to GoDoc + source for exact signatures.
Verified against the real SDK (github.com/longbridge/openapi-go v0.24.1):
1. Compile check — a program exercising every documented method, struct
field and constant was built with `go build` / `go vet` against v0.24.1.
Caught and fixed 6 issues:
- QuoteContext.CalcIndexes -> CalcIndex (method is singular)
- QuoteContext.Watchlist -> WatchedGroups (list getter)
- SecurityDepth fields are .Ask / .Bid (not .Asks / .Bids)
- GetHistoryOrders.StartAt/EndAt are int64 Unix secs (GetHistoryExecutions
uses time.Time — the two differ; now noted)
- GetAccountBalance.Currency is trade.Currency (use trade.CurrencyHKD)
- order quantities (SubmittedQuantity, ReplaceOrder.Quantity) are uint64,
only price fields use shopspring/decimal
2. Live read-only run — paper-trading account, no orders placed. Verified
Quote / StaticInfo / Candlesticks / Depth / AccountBalance /
StockPositions / TodayOrders all return real data with the documented
field names.
3. Independent cross-review — a second model (kimi) and a separate agent
re-checked the docs against source; both confirmed the fixes and the
uint64-vs-decimal correction.
- types.md: 删除不存在的 OutsideRTHOvernight(照搬 Rust 的错误,会编译失败),改为真实的 OutsideRTHOnly/Any/Unknown - 新增 go-sdk/content.md: 补齐 ContentContext(News/Topics) 与 QuoteContext.Filings,对齐 rust-sdk/content.md - SKILL.md: Go SDK 段加 Content 条目;正文与选型决策表纳入 Go - trade-context.md: SubmitOrder 补 LimitOffset(TSLPAMT/TSLPPCT 必填) - overview.md: 标注版本号 v0.21.0 签名均经 openapi-go v0.21.0 源码核实。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
背景
评估上一个 PR 新增的 Go SDK skill 文档与 Rust SDK 写法的一致性,修正发现的问题。所有 API 签名均经
openapi-gosubmodule(v0.21.0)源码核实。修正项
go-sdk/types.mdOutsideRTHOvernight(从 RustOutsideRTH::Overnight照搬,用户照写会编译失败),改为真实的OutsideRTHOnly/OutsideRTHAny/OutsideRTHUnknowngo-sdk/content.mdcontent包但原 PR 未覆盖。补齐ContentContext(News/Topics) 与QuoteContext.FilingsSKILL.mdPython/Rust SDK→Python/Rust/Go SDK;选型决策表纳入 Gogo-sdk/trade-context.mdLimitOffset(TSLPAMT/TSLPPCT 必填)go-sdk/overview.mdv0.21.0,对齐 rust-sdk 写法说明
同等改动已同步复制到
longbridge-skills仓库的skills/longbridge/references/go-sdk/(独立仓库,需单独提交)。🤖 Generated with Claude Code