finhay-market
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFinhay Market
Finhay Market
Read-only market data via the Finhay Securities Open API. All requests are signed .
GETMANDATORY: Before any action, read and complete pre-flight checks. Required:,FINHAY_API_KEY.FINHAY_API_SECRETnot needed for market endpoints. Do not skip or defer.USER_ID
通过Finhay证券开放API获取只读的市场数据,所有请求均为带签名的请求。
GET强制要求:执行任何操作前,请阅读并完成预检检查。需要配置:、FINHAY_API_KEY。市场接口不需要FINHAY_API_SECRET,请勿跳过或推迟该步骤。USER_ID
Making a Request
发起请求
Use request.sh for every call.
bash
./_shared/scripts/request.sh GET /market/stock-realtime "symbol=VNM"
./_shared/scripts/request.sh GET /market/stock-realtime "symbols=VNM,VIC,HPG"
./_shared/scripts/request.sh GET /market/stock-realtime "exchange=HOSE"
./_shared/scripts/request.sh GET /market/financial-data/gold
./_shared/scripts/request.sh GET /market/price-histories-chart "symbol=VNM&resolution=1D&from=1609459200&to=1704067200"
./_shared/scripts/request.sh GET /market/financial-data/macro "type=CPI&country=VN&period=YEARLY"每次调用都使用request.sh脚本。
bash
./_shared/scripts/request.sh GET /market/stock-realtime "symbol=VNM"
./_shared/scripts/request.sh GET /market/stock-realtime "symbols=VNM,VIC,HPG"
./_shared/scripts/request.sh GET /market/stock-realtime "exchange=HOSE"
./_shared/scripts/request.sh GET /market/financial-data/gold
./_shared/scripts/request.sh GET /market/price-histories-chart "symbol=VNM&resolution=1D&from=1609459200&to=1704067200"
./_shared/scripts/request.sh GET /market/financial-data/macro "type=CPI&country=VN&period=YEARLY"Endpoints
接口列表
| Endpoint | Use when | Path param | Query params |
|---|---|---|---|
| Stock price, realtime quote | — | exactly one of: |
| Fund list, NAV | — | — |
| Fund holdings | | |
| Gold/silver spot price | — | — |
| Gold/silver price chart | — | |
| Price by provider (PNJ, DOJI…) | — | — |
| Bank deposit rates | — | — |
| Top crypto | — | — |
| CPI, PMI, interest rates… | — | |
| Analyst reports | | — |
| OHLCV price history | — | |
| Key ratios: PE, PB, ROE, EPS, dividend yield | — | |
| Historical financial metrics by period | — | |
| Income/balance sheet/cash flow, metric-value row format | — | |
| 接口路径 | 适用场景 | 路径参数 | 查询参数 |
|---|---|---|---|
| 股票价格、实时行情 | — | 只能传入以下三个参数中的一个: |
| 基金列表、单位净值 | — | — |
| 基金持仓 | | |
| 黄金/白银现货价格 | — | — |
| 黄金/白银价格图表 | — | |
| 不同供应商(PNJ、DOJI等)的报价 | — | — |
| 银行存款利率 | — | — |
| 热门加密货币 | — | — |
| CPI、PMI、利率等宏观数据 | — | |
| 分析师报告 | | — |
| OHLCV价格历史 | — | |
| 核心财务比率:PE、PB、ROE、EPS、股息率 | — | |
| 分周期的历史财务指标 | — | |
| 利润表/资产负债表/现金流,指标-数值行格式 | — | |
Parameter rules
参数规则
- Each endpoint accepts only the parameters listed in its path and query columns above. Do not add extra parameters.
- All in the URL are path variables — substitute them into the URL, never pass as query params.
:variables
Details & response shapes: references/endpoints.md.
- 每个接口仅支持上述路径和查询列中列出的参数,请勿添加额外参数。
- URL中的所有都是路径变量,请直接替换到URL中,切勿作为查询参数传递。
:variables
详情与返回结构:references/endpoints.md。
Constraints
约束规则
See shared constraints, plus:
- Stock realtime — pass exactly one of ,
symbol, orsymbols. Never combine them.exchange - Price history — and
fromare Unix timestamps in seconds, not milliseconds. If a value exceeds 9,999,999,999, stop and ask the user to convert.tomust beresolution. When not provided, default1Dto now andtoto 5 years ago.from
请参阅通用约束,同时补充:
- 股票实时行情 — 仅传入、
symbol、symbols三个参数中的一个,切勿同时组合使用。exchange - 价格历史 — 和
from为秒级Unix时间戳,不是毫秒级。如果传入值超过9,999,999,999,请停止操作并要求用户转换格式。to必须为resolution。未传值时,1D默认取当前时间,to默认取5年前时间。from