# Get Financial Statements

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

  • Description

    Get financial statements (income/balance sheet/cash flow/key metrics) for a specified stock, with pagination support

  • Parameters

    Parameter Type Description
    code str Stock code
    statement_type FinancialStatementsType Financial statement type
    financial_type F10Type Report type
    currency_code str Currency code
    next_key str Pagination key
    num int Records per page
  • Returns

    Parameter Type Description
    ret RET_CODE API call result
    data dict When ret == RET_OK, returns financial statements data dictionary
    str When ret != RET_OK, returns error description
    • The returned dictionary contains the following fields:

      Field Type Description
      structure_list list Field structure list
      report_list list Financial report list
      next_key str Pagination key
    • Each entry in structure_list contains the following fields:

      Field Type Description
      field_id int Financial field ID
      display_name str Field display name
    • Each entry in report_list contains the following fields:

      Field Type Description
      date_time int Report end date timestamp (seconds)
      date_time_str str Report end date string
      fiscal_year int Fiscal year
      financial_type F10Type Report type
      period_text str Reporting period
      item_list list Financial data item list
      currency_info str Currency display name
      accounting_standards str Accounting standard
      auditor_report str Auditor opinion
      currency_code str Currency code
    • Each entry in item_list contains the following fields:

      Field Type Description
      field_id int Financial field ID
      data float Financial value
      yoy float Year-over-year
      qoq float Quarter-over-quarter
      display_name str Field display name
  • Example

import pandas as pd
from moomoo 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

Interface Limit

  • Up to 30 requests per 30 seconds.
  • Supports stocks and funds.