skills/tushare-data-1.0.5/references/数据接口/股票数据/财务数据/主营业务构成.md
wangyitong a65adcc2e5 Initial commit: merged, deduplicated, and vetted skill collection
Sources: extracted from two upstream archives (skill-repo, skills-main),
merged with the following policy:

- 15 broken symlinks (pointing to /Users/jameslee/.cc-switch/skills or
  ../../.agents/skills on a foreign machine) discarded
- 3 real name collisions with identical content (ai-pair, ifind-http-api,
  zhipu-websearch) kept as one copy
- Functional overlaps deduped keeping the strongest variant:
  - docx family: kept docx (official, full toolchain) + docx-cn
    (GB/T 9704 Chinese official-document constants),
    dropped docx_writer (no scripts, name collided with docx)
  - humanizer family: kept humanizer-zh (6 zh reference docs),
    dropped humanizer (en, redundant for CN workflow)
- Skills that only ran in a foreign environment removed:
  ablemind-ops, app-publish, hlb-design-system, openclaw-adj-skill,
  claude-driver
- alphapai excluded from this public repo because its SKILL.md hard-coded
  live credentials

Result: 25 skills, 572 files, ~7.5 MB.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 14:47:12 +08:00

59 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 主营业务构成
----
接口fina_mainbz
描述:获得上市公司主营业务构成,分地区和产品两种方式
权限用户需要至少2000积分才可以调取具体请参阅[积分获取办法](https://tushare.pro/document/1?doc_id=13) 单次最大提取100行总量不限制可循环获取。
<font color="red">
提示当前接口只能按单只股票获取其历史数据如果需要获取某一季度全部上市公司数据请使用fina_mainbz_vip接口参数一致需积攒5000积分。
</font>
**输入参数**
名称 | 类型 | 必选 | 描述
---- | ----- | ---- | ----
ts_code | str | Y | 股票代码
period | str | N | 报告期(每个季度最后一天的日期,比如20171231表示年报)
type | str | N | 类型P按产品 D按地区 I按行业请输入大写字母P或者D
start_date | str | N | 报告期开始日期
end_date | str | N | 报告期结束日期
**输出参数**
名称 | 类型 | 描述
--- | ---- | ----
ts_code | str | TS代码
end_date | str | 报告期
bz_item | str | 主营业务来源
bz_sales | float | 主营业务收入(元)
bz_profit | float | 主营业务利润(元)
bz_cost | float | 主营业务成本(元)
curr_type | str | 货币代码
update_flag | str | 是否更新
**代码示例**
```python
pro = ts.pro_api()
df = pro.fina_mainbz(ts_code='000627.SZ', type='P')
```
获取某一季度全部股票数据
```python
df = pro.fina_mainbz_vip(period='20181231', type='P' ,fields='ts_code,end_date,bz_item,bz_sales')
```
**数据样例**
ts_code end_date bz_item bz_sales bz_profit bz_cost curr_type
0 000627.SZ 20171231 其他产品 1.847507e+08 None None CNY
1 000627.SZ 20171231 其他主营业务 1.847507e+08 None None CNY
2 000627.SZ 20171231 聚丙烯 6.629111e+07 None None CNY
3 000627.SZ 20171231 原料药产品 2.685909e+08 None None CNY
4 000627.SZ 20171231 保险业务 5.288595e+10 None None CNY