Documentation ¶
Index ¶
- Constants
- Variables
- func GetNoticeType(noticeType EMNoticeType) string
- type CirculatingShareholder
- type EMNoticeType
- type FundFlow
- type HoldNumChangeState
- type HoldingAnalyse
- type NoticeDetail
- type PreviewQuarterlyReport
- type QuarterlyReport
- func GetCacheQuarterlyReportsBySecurityCode(securityCode, date string, diffQuarters ...int) *QuarterlyReport
- func GetQuarterlyReports(pageNumber ...int) (reports []QuarterlyReport, pages int, err error)
- func QuarterlyReports(featureDate string, pageNumber ...int) (reports []QuarterlyReport, pages int, err error)
- func QuarterlyReportsBySecurityCode(securityCode, date string, diffQuarters int, pageNumber ...int) (reports []QuarterlyReport)
- type SecurityMarginTrading
- type StockCapital
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(errorBaseNotice, "接口异常") ErrNoticeNotFound = exception.New(errorBaseNotice+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"` // 每股收益 DeductBasicEPS 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 `name:"报告期" 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 GetCacheQuarterlyReportsBySecurityCode ¶
func GetCacheQuarterlyReportsBySecurityCode(securityCode, date string, diffQuarters ...int) *QuarterlyReport
GetCacheQuarterlyReportsBySecurityCode 获取上市公司财务季报 Quarterly Reports
func GetQuarterlyReports ¶
func GetQuarterlyReports(pageNumber ...int) (reports []QuarterlyReport, pages int, err error)
GetQuarterlyReports 分页获取季报数据
func QuarterlyReports ¶
func QuarterlyReports(featureDate string, pageNumber ...int) (reports []QuarterlyReport, pages int, err error)
QuarterlyReports 分页获取季报数据
func QuarterlyReportsBySecurityCode ¶
func QuarterlyReportsBySecurityCode(securityCode, date string, diffQuarters int, pageNumber ...int) (reports []QuarterlyReport)
QuarterlyReportsBySecurityCode 分页获取季报数据
type SecurityMarginTrading ¶ added in v1.0.5
type SecurityMarginTrading struct { DATE string `name:"日期" json:"DATE"` MARKET string `name:"市场" json:"MARKET"` SCODE string `name:"代码" json:"SCODE"` SecName string `name:"证券名称" json:"SECNAME"` RZYE float64 `name:"融资余额(元)" json:"RZYE"` RQYL float64 `name:"融券余量(股)" json:"RQYL"` RZRQYE float64 `name:"融资融券余额(元)" json:"RZRQYE"` RQYE float64 `name:"融券余额(元)" json:"RQYE"` RQMCL float64 `name:"融券卖出量(股)" json:"RQMCL"` RZRQYECZ float64 `name:"融资融券余额差值(元)" json:"RZRQYECZ"` RZMRE float64 `name:"融资买入额(元)" json:"RZMRE"` SZ float64 `name:"SZ" json:"SZ"` RZYEZB float64 `name:"融资余额占流通市值比(%)" json:"RZYEZB"` RZMRE3D float64 `name:"3日融资买入额(元)" json:"RZMRE3D"` RZMRE5D float64 `name:"5日融资买入额(元)" json:"RZMRE5D"` RZMRE10D float64 `name:"10日融资买入额(元)" json:"RZMRE10D"` RZCHE float64 `name:"融资偿还额(元)" json:"RZCHE"` RZCHE3D float64 `name:"3日融资偿还额(元)" json:"RZCHE3D"` RZCHE5D float64 `name:"5日融资偿还额(元)" json:"RZCHE5D"` RZCHE10D float64 `name:"10日融资偿还额(元)" json:"RZCHE10D"` RZJME float64 `name:"融资净买额(元)" json:"RZJME"` RZJME3D float64 `name:"3日融资净买额(元)" json:"RZJME3D"` RZJME5D float64 `name:"5日融资净买额(元)" json:"RZJME5D"` RZJME10D float64 `name:"10日融资净买额(元)" json:"RZJME10D"` RQMCL3D float64 `name:"3日融券卖出量(股)" json:"RQMCL3D"` RQMCL5D float64 `name:"5日融券卖出量(股)" json:"RQMCL5D"` RQMCL10D float64 `name:"10日融券卖出量(股)" json:"RQMCL10D"` RQCHL float64 `name:"融券偿还量(股)" json:"RQCHL"` RQCHL3D float64 `name:"3日融券偿还量(股)" json:"RQCHL3D"` RQCHL5D float64 `name:"5日融券偿还量(股)" json:"RQCHL5D"` RQCHL10D float64 `name:"10日融券偿还量(股)" json:"RQCHL10D"` RQJMG float64 `name:"融券净卖出(股)" json:"RQJMG"` RQJMG3D float64 `name:"3日融券净卖出(股)" json:"RQJMG3D"` RQJMG5D float64 `name:"5日融券净卖出(股)" json:"RQJMG5D"` RQJMG10D float64 `name:"10日融券净卖出(股)" json:"RQJMG10D"` SPJ float64 `name:"收盘价" json:"SPJ"` ZDF float64 `name:"涨跌幅" json:"ZDF"` RChange3DCP float64 `name:"3日未识别" json:"RCHANGE3DCP"` RChange5DCP float64 `name:"5日未识别" json:"RCHANGE5DCP"` RChange10DCP float64 `name:"10日未识别" json:"RCHANGE10DCP"` KCB int `name:"科创板" json:"KCB"` TradeMarketCode string `name:"二级市场代码" json:"TRADE_MARKET_CODE"` TradeMarket string `name:"二级市场" json:"TRADE_MARKET"` FinBalanceGr float64 `json:"FIN_BALANCE_GR"` SecuCode string `name:"证券代码" json:"SECUCODE"` }
SecurityMarginTrading 融资融券
func GetMarginTradingList ¶ added in v1.0.5
func GetMarginTradingList(date string) []SecurityMarginTrading
GetMarginTradingList 获取两融列表
东方财富两融数据只有前一个交易日的数据
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.