Technical Contract Clarification: Longport capital_flow Unit, Currency, Scale, and Turnover Compatibility

未关闭
#1,260 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

审查官方 CLI 文档以及 issue 中引用的 QuoteContext.capital_flow、quote 和 candlestick 接口,同时审查 SDK 和 Hosted MCP 路径。当一份权威的、带版本的声明确认序列语义、单位、货币、缩放、兼容性及任何转换,或指出该契约记录在何处时,工作即告完成。

由索引模型根据 Issue 内容生成。

描述

documentation question

Hello Longport Technical Support,

We are integrating the official Longport Hosted MCP capital_flow output into a fail-closed, read-only validation workflow.

The official CLI documentation states that each bar represents the net inflow for that minute. We have also verified from the official CLI, MCP, and SDK source paths that the returned Decimal value is passed through without a visible accumulation or scaling transformation.

However, we do not want to infer a monetary contract from observed values or implementation behavior. We therefore need authoritative clarification of the following points:

  1. Series semantics

Does each CapitalFlowLine.inflow returned by QuoteContext.capital_flow(symbol) represent the net inflow for that individual minute, rather than a cumulative intraday value?

Does this same semantic contract apply to the value exposed through the official SDK, CLI, and Hosted MCP capital_flow tool?

  1. Monetary unit and scale

What is the exact monetary unit of CapitalFlowLine.inflow?

For example, is the returned Decimal already expressed in the major currency unit, or is there an implicit minor-unit or other numeric scale?

Please specify any required multiplier or divisor.

  1. Currency

Is capital_flow denominated in the security's quote currency?

Specifically, would:

AAPL.US capital flow be denominated in USD; and
700.HK capital flow be denominated in HKD?

Is this rule guaranteed for all supported securities/markets?

  1. capital_distribution compatibility

For the same symbol, do the monetary values returned by capital_flow and capital_distribution use exactly the same:

monetary unit,
numeric scale, and
currency?

  1. turnover dimensional compatibility

Does the turnover field returned by the official quote and candlestick interfaces use the same monetary unit, scale, and currency contract as capital_flow.inflow?

In particular, is the following expression dimensionally valid without any additional unit or currency conversion?

sum(CapitalFlowLine.inflow) / turnover

  1. Hidden transformations

Is there any implicit multiplier, divisor, denomination conversion, currency conversion, or other numeric transformation between the underlying provider value and the value exposed by:

QuoteContext.capital_flow → official SDK → official CLI / Hosted MCP?

If possible, please provide or identify the authoritative and versioned documentation, schema, source contract, or technical specification that guarantees these answers.

If no published specification currently exists, a written confirmation from the Longport technical team stating the applicable contract and the affected API/SDK versions would also be very helpful.

This request contains no access token, refresh token, account identifier, cookie, Authorization header, or other credential.

Thank you.

主要语言
TypeScript
星标
61
派生
30
平均合并
7 小时 27 分钟
30 天内合并 PR
19

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

longbridge/developers 的其他 Issue

查看 longbridge/developers 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。