Documentation ¶
Index ¶
Constants ¶
View Source
const ( CacheL5KeyNotices = "cache/notices" EastmoneyNoticesPageSize = 100 )
View Source
const (
EastmoneyFinanceReportsPageSize = 100
)
View Source
const (
EastmoneyGdfxHoldingAnalysePageSize = 500
)
View Source
const (
EastmoneyQuarterlyReportAllPageSize = 50 // 一页最大50条
)
Variables ¶
View Source
var ( ErrNoticeBadApi = exception.New(kErrorBaseNotice, "接口异常") ErrNoticeNotFound = exception.New(kErrorBaseNotice+1, "没有数据") )
Functions ¶
func GetNoticeType ¶
func GetNoticeType(noticeType EMNoticeType) string
Types ¶
type CirculatingShareholder ¶
type CirculatingShareholder struct {}
CirculatingShareholder Top10CirculatingShareholders
func FreeHoldingAnalyse ¶
func FreeHoldingAnalyse(pageNumber ...int) ([]CirculatingShareholder, int, error)
func GetCacheShareHolder ¶
func GetCacheShareHolder(securityCode, date string, diffQuarters ...int) (list []CirculatingShareholder)
GetCacheShareHolder 获取流动股东数据
func ShareHolder ¶
func ShareHolder(securityCode, date string, diffQuarters ...int) (list []CirculatingShareholder)
type EMNoticeType ¶
type EMNoticeType = int
const ( NoticeAll EMNoticeType = iota // 全部 NoticeUnused1 // 财务报告 NoticeUnused2 // 融资公告 NoticeUnused3 // 风险提示 NoticeUnused4 // 信息变更 NoticeWarning // 重大事项 NoticeUnused6 // 资产重组 NoticeHolderChange // 持股变动 )
type FundFlow ¶
type FundFlow struct { Date string `array:"0"` Code string Main float64 `array:"1"` MainRatio float64 `array:"6"` SuperLarge float64 `array:"5"` SuperLargeRatio float64 `array:"10"` Large float64 `array:"4"` LargeRatio float64 `array:"9"` Medium float64 `array:"3"` MediumRatio float64 `array:"8"` Small float64 `array:"2"` SmallRatio float64 `array:"7"` }
FundFlow 资金流向
func IndividualStocksFundFlow ¶
IndividualStocksFundFlow 个股资金流向
type HoldNumChangeState ¶
type HoldNumChangeState = int
const ( HoldNumDampened HoldNumChangeState = -1 // 减少 HoldNumUnChanged HoldNumChangeState = 0 // 不变 HoldNumNewlyAdded HoldNumChangeState = 1 // 新进/新增 HoldNumIncrease HoldNumChangeState = 2 // 增加 HoldNumUnknownChanges HoldNumChangeState = -9 // 未知变化 )
type HoldingAnalyse ¶
type HoldingAnalyse struct { SECUCODE string `json:"SECUCODE"` // "股票代码", SECURITY_NAME string `json:"SECURITY_NAME_ABBR"` // "股票简称", END_DATE string `json:"END_DATE"` // "报告期", UPDATE_DATE string `json:"UPDATE_DATE"` // "公告日", HOLDER_TYPE string `json:"HOLDER_TYPE"` // "股东类型", HOLDER_NEWTYPE string `json:"HOLDER_NEWTYPE"` // "-", HOLDER_NAME string `json:"HOLDER_NAME"` // "股东名称", IS_HOLDORG string `json:"IS_HOLDORG"` // "是否机构", HOLDER_RANK int `json:"HOLDER_RANK"` // "股东排名", HOLD_NUM int `json:"HOLD_NUM"` // "期末持股-数量", FREE_HOLDNUM_RATIO float64 `json:"FREE_HOLDNUM_RATIO"` // "-", HOLD_NUM_CHANGE_NAME string `json:"HOLDNUM_CHANGE_NAME"` // "-", XZCHANGE int `json:"XZCHANGE"` // "期末持股-数量变化", CHANGE_RATIO float64 `json:"CHANGE_RATIO"` // "-", HOLDER_STATE string `json:"HOLDER_STATE"` // "-", REPORT_DATE_NAME string `json:"REPORT_DATE_NAME"` // ---华丽的分割线--- HOLDER_MARKET_CAP float64 `json:"HOLDER_MARKET_CAP"` // "期末持股-流通市值", HOLD_RATIO float64 `json:"HOLD_RATIO"` // "-", SECURITY_CODE string `json:"SECURITY_CODE"` // "股票代码简写", HOLD_CHANGE string `json:"HOLD_CHANGE"` // "-", HOLD_RATIO_CHANGE float64 `json:"HOLD_RATIO_CHANGE"` // "期末持股-数量变化比例", ORG_CODE string `json:"ORG_CODE"` // "-", HOLDER_CODE string `json:"HOLDER_CODE"` // "-", SECURITY_TYPE_CODE string `json:"SECURITY_TYPE_CODE"` // "-", SHARES_TYPE string `json:"SHARES_TYPE"` // "-", HOLDER_NEW string `json:"HOLDER_NEW"` // "-", FREE_RATIO_QOQ string `json:"FREE_RATIO_QOQ"` // "-", HOLDER_STATEE string `json:"HOLDER_STATEE"` // "-", IS_REPORT string `json:"IS_REPORT"` // "-", HOLDER_CODE_OLD string `json:"HOLDER_CODE_OLD"` // "-", IS_MAX_REPORT_DATE string `json:"IS_MAX_REPORTDATE"` // "-", COOPERATION_HOLDER_MARK string `json:"COOPERATION_HOLDER_MARK"` // "-", MXID string `json:"MXID"` // "-", LISTING_STATE string `json:"LISTING_STATE"` // "-", NEW_CHANGE_RATIO string `json:"NEW_CHANGE_RATIO"` // "-", HOLD_NUM_CHANGE string `json:"HOLD_NUM_CHANGE"` // "期末持股-持股变动", }
HoldingAnalyse 持股分析
type NoticeDetail ¶
type NoticeDetail struct { Code string `csv:"证券代码" dataframe:"证券代码"` // 证券代码 Name string `csv:"证券名称" dataframe:"证券名称"` // 证券名称 DisplayTime string `csv:"显示时间" dataframe:"显示时间"` // 显示时间 NoticeDate string `csv:"公告时间" dataframe:"公告时间"` // 公告时间 Title string `csv:"内容提要" dataframe:"公告标题"` // 公告标题 Keywords string `csv:"关键词" dataframe:"关键词"` // 公告关键词 Increase int `csv:"增持" dataframe:"增持"` // 增持 Reduce int `csv:"减持" dataframe:"减持"` // 减持 HolderChange int `csv:"控制人变更" dataframe:"控制人变更"` // 实际控制人变更 Risk int `csv:"风险数" dataframe:"监管"` // 风险数 }
NoticeDetail 公告详情
func AllNotices ¶
func AllNotices(noticeType EMNoticeType, date string, pageNumber ...int) (notices []NoticeDetail, pages int, err error)
AllNotices 东方财富网-数据中心-公告大全-沪深京 A 股公告
http://data.eastmoney.com/notices/hsa/5.html :param symbol: 报告类型; choice of {"全部", "重大事项", "财务报告", "融资公告", "风险提示", "资产重组", "信息变更", "持股变动"} :type symbol: str :param date: 制定日期 :type date: str :return: 沪深京 A 股公告 Deprecated: 弃用
func StockNotices ¶
func StockNotices(securityCode, beginDate, endDate string, pageNumber ...int) (notices []NoticeDetail, pages int, err error)
StockNotices 个股公告
type PreviewQuarterlyReport ¶
type PreviewQuarterlyReport struct { SecurityCode string `name:"证券代码" json:"SECURITY_CODE"` SecurityName string `name:"证券名称" json:"SECURITY_NAME"` OrgCode string `name:"机构代码" json:"ORG_CODE"` NoticeDate string `name:"公告日期" json:"NOTICE_DATE"` ReportDate string `name:"报告日期" json:"REPORT_DATE"` PredictFinanceCode string `name:"预告代码" json:"PREDICT_FINANCE_CODE"` PredictFinance string `name:"预告财报" json:"PREDICT_FINANCE"` PredictAmtLower float64 `name:"预计营收下限" json:"PREDICT_AMT_LOWER"` PredictAmtUpper float64 `name:"预计营收上限" json:"PREDICT_AMT_UPPER"` AddAmpLower float64 `name:"增长下限" json:"ADD_AMP_LOWER"` AddAmpUpper float64 `name:"增长下限" json:"ADD_AMP_UPPER"` PredictContent string `name:"预告内容" json:"PREDICT_CONTENT"` ChangeReasonExplain string `name:"改变原因" json:"CHANGE_REASON_EXPLAIN"` PredictType string `name:"预计类型" json:"PREDICT_TYPE"` PreyearSamePeriod float64 `name:"上年同期" json:"PREYEAR_SAME_PERIOD"` TradeMarket string `name:"所在交易所" json:"TRADE_MARKET"` TradeMarketCode string `name:"场内交易代码" json:"TRADE_MARKET_CODE"` SecurityType string `name:"证券类型" json:"SECURITY_TYPE"` SecurityTypeCode string `name:"证券类型代码" json:"SECURITY_TYPE_CODE"` IncreaseJz float64 `name:"增长均值" json:"INCREASE_JZ"` ForecastJz float64 `name:"预测均值" json:"FORECAST_JZ"` ForecastState string `name:"预测状态" json:"FORECAST_STATE"` IsLatest string `name:"是否最新财报" json:"IS_LATEST"` PredictRatioLower float64 `name:"预测增速下限" json:"PREDICT_RATIO_LOWER"` PredictRatioUpper float64 `name:"预测增速上限" json:"PREDICT_RATIO_UPPER"` PredictHbmean float64 `name:"预计每股盈利?" json:"PREDICT_HBMEAN"` }
PreviewQuarterlyReport 财报详情
func FinanceReports ¶
func FinanceReports(date string, pageNumber ...int) (reports []PreviewQuarterlyReport, pages, originalRecords int, err error)
FinanceReports 获取哪天开始的财报数据 https://data.eastmoney.com/bbsj/202303/yjyg.html?type=increase https://data.eastmoney.com/bbsj/202303/yjbb.html
func (PreviewQuarterlyReport) GetDate ¶
func (f PreviewQuarterlyReport) GetDate() string
func (PreviewQuarterlyReport) GetSecurityCode ¶
func (f PreviewQuarterlyReport) GetSecurityCode() string
type QuarterlyReport ¶
type QuarterlyReport struct { SecurityCode string `json:"CODE"` // 证券代码 ReportDate string `json:"REPORTDATE"` // 报告日期 NoticeDate string `json:"NOTICE_DATE"` // 最新公告日期 UpdateDate string `json:"UPDATE_DATE"` // 更新日期 SecuCode string `json:"SECUCODE"` // 证券代码 BasicEPS float64 `json:"BASIC_EPS"` // 每股收益 DedtctBasicEPS float64 `json:"DEDUCT_BASIC_EPS"` // 每股收益(扣除) TOTALOPERATEINCOME float64 `json:"TOTAL_OPERATE_INCOME"` // 营业总收入 PARENTNETPROFIT float64 `json:"PARENT_NETPROFIT"` // 净利润 WEIGHTAVGROE float64 `json:"WEIGHTAVG_ROE"` // 净资产收益率 YSTZ float64 `json:"YSTZ"` // 营业总收入同比增长 SJLTZ float64 `json:"SJLTZ"` // 净利润同比增长 BPS float64 `json:"BPS"` // 每股净资产 MGJYXJJE float64 `json:"MGJYXJJE"` // 每股经营现金流量(元) XSMLL float64 `json:"XSMLL"` // 销售毛利率(%) YSHZ float64 `json:"YSHZ"` SJLHZ float64 `json:"SJLHZ"` ASSIGNDSCRPT float64 `json:"ASSIGNDSCRPT"` PAYYEAR float64 `json:"PAYYEAR"` PUBLISHNAME float64 `json:"PUBLISHNAME"` ZXGXL float64 `json:"ZXGXL"` ORGCODE string `json:"ORG_CODE"` TRADEMARKETZJG string `json:"TRADE_MARKET_ZJG"` IsNew string `json:"ISNEW"` QDATE string `json:"QDATE"` DATATYPE string `json:"DATATYPE"` DATAYEAR string `json:"DATAYEAR"` DATEMMDD string `json:"DATEMMDD"` EITIME string `json:"EITIME"` TRADEMARKETCODE string `json:"TRADE_MARKET_CODE"` TRADEMARKET string `json:"TRADE_MARKET"` //市场 SECURITYTYPECODE string `json:"SECURITY_TYPE_CODE"` SECURITYTYPE string `json:"SECURITY_TYPE"` SECURITYCODE string `json:"SECURITY_CODE"` // 证券代码 SECURITYNAMEABBR string `json:"SECURITY_NAME_ABBR"` // 证券名称 }
QuarterlyReport 财报
func GetQuarterlyReports ¶
func GetQuarterlyReports(pageNumber ...int) (reports []QuarterlyReport, pages int, err error)
GetQuarterlyReports 分页获取季报数据
func QuarterlyReports ¶
func QuarterlyReports(featureData string, pageNumber ...int) (reports []QuarterlyReport, pages int, err error)
QuarterlyReports 分页获取季报数据
type StockCapital ¶
type StockCapital struct { Code string // 证券代码 Date string // 变动日期 ChangeReson string // 变动原因 UpdateTime string // 更新时间 }
func CapitalChange ¶
func CapitalChange(securityCode string) (list []StockCapital)
CapitalChange 获取股本变动记录
deprecated: 不推荐, 太慢
Click to show internal directories.
Click to hide internal directories.