finhay-market

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Finhay Market

Finhay Market

Read-only market data via the Finhay Securities Open API. All requests are signed
GET
.
MANDATORY: Before any action, read and complete pre-flight checks. Required:
FINHAY_API_KEY
,
FINHAY_API_SECRET
.
USER_ID
not needed for market endpoints. Do not skip or defer.
通过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

接口列表

EndpointUse whenPath paramQuery params
/market/stock-realtime
Stock price, realtime quoteexactly one of:
symbol
,
symbols
,
exchange
/market/funds
Fund list, NAV
/market/funds/:fund/portfolio
Fund holdings
:fund
month
(optional)
/market/financial-data/gold
,
silver
Gold/silver spot price
/market/financial-data/gold-chart
,
silver-chart
Gold/silver price chart
days
(default 30)
/market/financial-data/gold-providers
,
metal-providers
Price by provider (PNJ, DOJI…)
/market/financial-data/bank-interest-rates
Bank deposit rates
/market/financial-data/cryptos/top-trending
Top crypto
/market/financial-data/macro
CPI, PMI, interest rates…
type
,
country
,
period
/market/recommendation-reports/:symbol
Analyst reports
:symbol
/market/price-histories-chart
OHLCV price history
symbol
,
resolution
(only
1D
),
from
,
to
(seconds)
/market/company-financial/overview
Key ratios: PE, PB, ROE, EPS, dividend yield
symbol
/market/company-financial/analysis
Historical financial metrics by period
symbol
,
period
(
annual
/
quarterly
)
/market/v2/financial-statement/statement
Income/balance sheet/cash flow, metric-value row format
symbol
,
type
,
period
,
limit
接口路径适用场景路径参数查询参数
/market/stock-realtime
股票价格、实时行情只能传入以下三个参数中的一个:
symbol
symbols
exchange
/market/funds
基金列表、单位净值
/market/funds/:fund/portfolio
基金持仓
:fund
month
(可选)
/market/financial-data/gold
silver
黄金/白银现货价格
/market/financial-data/gold-chart
silver-chart
黄金/白银价格图表
days
(默认30)
/market/financial-data/gold-providers
metal-providers
不同供应商(PNJ、DOJI等)的报价
/market/financial-data/bank-interest-rates
银行存款利率
/market/financial-data/cryptos/top-trending
热门加密货币
/market/financial-data/macro
CPI、PMI、利率等宏观数据
type
country
period
/market/recommendation-reports/:symbol
分析师报告
:symbol
/market/price-histories-chart
OHLCV价格历史
symbol
resolution
(仅支持
1D
)、
from
to
(秒级时间戳)
/market/company-financial/overview
核心财务比率:PE、PB、ROE、EPS、股息率
symbol
/market/company-financial/analysis
分周期的历史财务指标
symbol
period
annual
/
quarterly
/market/v2/financial-statement/statement
利润表/资产负债表/现金流,指标-数值行格式
symbol
type
period
limit

Parameter rules

参数规则

  • Each endpoint accepts only the parameters listed in its path and query columns above. Do not add extra parameters.
  • All
    :variables
    in the URL are path variables — substitute them into the URL, never pass as query params.
Details & response shapes: references/endpoints.md.
  • 每个接口支持上述路径和查询列中列出的参数,请勿添加额外参数。
  • URL中的所有
    :variables
    都是路径变量,请直接替换到URL中,切勿作为查询参数传递。
详情与返回结构:references/endpoints.md

Constraints

约束规则

See shared constraints, plus:
  • Stock realtime — pass exactly one of
    symbol
    ,
    symbols
    , or
    exchange
    . Never combine them.
  • Price history
    from
    and
    to
    are Unix timestamps in seconds, not milliseconds. If a value exceeds 9,999,999,999, stop and ask the user to convert.
    resolution
    must be
    1D
    . When not provided, default
    to
    to now and
    from
    to 5 years ago.
请参阅通用约束,同时补充:
  • 股票实时行情 — 仅传入
    symbol
    symbols
    exchange
    三个参数中的一个,切勿同时组合使用。
  • 价格历史
    from
    to
    秒级Unix时间戳,不是毫秒级。如果传入值超过9,999,999,999,请停止操作并要求用户转换格式。
    resolution
    必须为
    1D
    。未传值时,
    to
    默认取当前时间,
    from
    默认取5年前时间。