# 獲取財務報表

get_financials_statements(code, statement_type=None, financial_type=None, currency_code=None, next_key=None, num=None)

  • 介紹

    獲取指定股票的財務報表(利潤表/資產負債表/現金流量表/關鍵指標),支持分頁拉取

  • 參數

    參數 類型 說明
    code str 股票代碼
    statement_type FinancialStatementsType 財務報表類型
    financial_type F10Type 財報類型
    currency_code str 幣種代碼
    next_key str 分頁標識
    num int 每頁返回數量
  • 返回

    參數 類型 說明
    ret RET_CODE 介面調用結果
    data dict 當 ret == RET_OK,返回財務報表數據字典
    str 當 ret != RET_OK,返回錯誤描述
    • 返回字典包含以下欄位:

      欄位 類型 說明
      structure_list list 欄位結構列表
      report_list list 財報數據列表
      next_key str 分頁標識
    • structure_list 每項包含的欄位:

      欄位 類型 說明
      field_id int 財務欄位 ID
      display_name str 欄位展示名
    • report_list 每項包含的欄位:

      欄位 類型 說明
      date_time int 財報截止日時間戳(秒)
      date_time_str str 財報截止日字符串
      fiscal_year int 財務年度
      financial_type F10Type 財報類型
      period_text str 財報周期
      item_list list 財務數據項列表
      currency_info str 貨幣單位
      accounting_standards str 會計準則
      auditor_report str 審計意見
      currency_code str 幣種代碼
    • item_list 每項包含的欄位:

      欄位 類型 說明
      field_id int 財務欄位 ID
      data float 財務數據
      yoy float 同比
      qoq float 環比
      display_name str 欄位展示名
  • Example

import pandas as pd
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)

ret, data = quote_ctx.get_financials_statements("HK.00700")
if ret == RET_OK:
    df = pd.DataFrame(data['report_list'][0]['item_list'])
    print(df)
else:
    print('error:', data)
quote_ctx.close()
1
2
3
4
5
6
7
8
9
10
11
  • Output
field_id                       display_name          data         yoy
0       5001                      Total Revenue  7.517660e+11   13.859603
1       5002                  Operating Revenue  7.517660e+11   13.859603
2       5005                    Cost of Revenue -3.291730e+11   -5.839665
3       5008                 Cost of Goods Sold -3.291730e+11   -5.839665
4       5010                       Gross Profit  4.225930e+11   21.001529
5       5013                  Operating Expense -1.778540e+11  -19.245855
6       5015                   Selling Expenses -4.172700e+10  -14.672419
7       5016            Administrative Expenses -1.361270e+11  -20.721703
8       5032  Special Items of Operating Income -3.177000e+09 -139.702574
9       5034                   Operating Profit  2.415620e+11   16.080327
10      5035                   Financing Income  1.690900e+10    5.654836
11      5036                     Financing Cost -1.513000e+10  -26.283282
12      5037     Share of Profits of Associates  2.374000e+10   -5.703845
13      5040                      Pretax Profit  2.772490e+11   14.810030
14      5041     Special Items of Pretax Income  1.016800e+10  142.846907
15      5043                                Tax -4.744800e+10   -5.397841
16      5045                         Net Profit  2.298010e+11   16.966717
17      5046  Profit from Continuing Operations  2.298010e+11   16.966717
18      5050                 Minority Interests  4.959000e+09  107.142857
19      5051       Net Income to Parent Company  2.248420e+11   15.854343
20      5052  Net Income to Common Stockholders  2.248420e+11   15.854343
21      5054                          Basic EPS  2.474900e+01   18.201356
22      5055                        Diluted EPS  2.415300e+01   17.900029
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

接口限制

  • 每 30 秒內最多請求 30 次。
  • 支持正股及基金。