akshare 1.12.99__py3-none-any.whl → 1.15.72__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of akshare might be problematic. Click here for more details.
- akshare/__init__.py +441 -138
- akshare/air/air_hebei.py +79 -53
- akshare/air/air_zhenqi.py +29 -43
- akshare/air/sunrise_tad.py +32 -17
- akshare/bank/bank_cbirc_2020.py +12 -9
- akshare/bond/bond_cb_ths.py +17 -9
- akshare/bond/bond_china.py +38 -39
- akshare/bond/bond_china_money.py +75 -48
- akshare/bond/bond_info_cm.py +28 -8
- akshare/bond/bond_issue_cninfo.py +73 -30
- akshare/bond/bond_zh_cov.py +1 -1
- akshare/bond/bond_zh_sina.py +57 -51
- akshare/cal/__init__.py +0 -0
- akshare/cal/rv.py +170 -0
- akshare/cost/cost_living.py +7 -5
- akshare/currency/currency_safe.py +7 -6
- akshare/data/cninfo.js +15 -0
- akshare/datasets.py +10 -21
- akshare/economic/macro_bank.py +95 -653
- akshare/economic/macro_china.py +772 -1024
- akshare/economic/macro_china_hk.py +65 -243
- akshare/economic/macro_china_nbs.py +24 -7
- akshare/economic/macro_constitute.py +17 -12
- akshare/economic/macro_euro.py +13 -6
- akshare/economic/macro_finance_ths.py +133 -0
- akshare/economic/macro_info_ws.py +100 -0
- akshare/economic/macro_japan.py +5 -4
- akshare/economic/macro_other.py +12 -9
- akshare/economic/macro_usa.py +376 -1940
- akshare/economic/marco_cnbs.py +11 -6
- akshare/energy/energy_carbon.py +94 -125
- akshare/event/migration.py +3 -2
- akshare/exceptions.py +43 -0
- akshare/file_fold/calendar.json +245 -2
- akshare/fortune/fortune_500.py +15 -48
- akshare/fund/fund_amac.py +157 -75
- akshare/fund/fund_em.py +191 -184
- akshare/fund/fund_etf_em.py +16 -15
- akshare/fund/fund_etf_sina.py +71 -23
- akshare/fund/fund_etf_ths.py +93 -0
- akshare/fund/fund_fee_em.py +98 -0
- akshare/fund/fund_portfolio_em.py +60 -50
- akshare/fund/fund_rank_em.py +91 -82
- akshare/fund/fund_report_cninfo.py +63 -48
- akshare/fund/fund_scale_sina.py +20 -10
- akshare/fund/fund_xq.py +139 -109
- akshare/futures/cons.py +8 -31
- akshare/futures/cot.py +185 -137
- akshare/futures/futures_basis.py +97 -32
- akshare/futures/futures_comm_ctp.py +37 -0
- akshare/futures/futures_comm_qihuo.py +74 -45
- akshare/futures/futures_daily_bar.py +121 -184
- akshare/futures/futures_hf_em.py +66 -61
- akshare/futures/futures_hq_sina.py +79 -61
- akshare/futures/futures_index_ccidx.py +6 -3
- akshare/futures/futures_inventory_99.py +61 -272
- akshare/futures/futures_news_shmet.py +4 -2
- akshare/futures/futures_roll_yield.py +12 -25
- akshare/futures/futures_spot_stock_em.py +19 -13
- akshare/futures/futures_stock_js.py +14 -12
- akshare/futures/futures_to_spot.py +38 -33
- akshare/futures/futures_warehouse_receipt.py +75 -71
- akshare/futures/futures_zh_sina.py +5 -5
- akshare/futures/symbol_var.py +18 -13
- akshare/futures_derivative/futures_contract_info_czce.py +60 -52
- akshare/futures_derivative/futures_contract_info_ine.py +43 -34
- akshare/futures_derivative/futures_contract_info_shfe.py +46 -35
- akshare/futures_derivative/futures_cot_sina.py +26 -19
- akshare/futures_derivative/futures_spot_sys.py +21 -8
- akshare/fx/currency_investing.py +19 -285
- akshare/index/index_cflp.py +29 -26
- akshare/index/index_cni.py +86 -88
- akshare/index/index_cons.py +26 -10
- akshare/index/index_cx.py +248 -47
- akshare/index/index_drewry.py +17 -16
- akshare/index/index_option_qvix.py +329 -0
- akshare/index/index_research_fund_sw.py +134 -0
- akshare/index/{index_sw_research.py → index_research_sw.py} +122 -58
- akshare/index/index_spot.py +9 -5
- akshare/index/index_stock_hk.py +35 -16
- akshare/index/index_stock_us_sina.py +1 -1
- akshare/index/index_stock_zh.py +180 -89
- akshare/index/index_stock_zh_csindex.py +15 -369
- akshare/index/index_sw.py +62 -34
- akshare/index/index_yw.py +46 -23
- akshare/index/index_zh_a_scope.py +48 -0
- akshare/index/index_zh_em.py +6 -4
- akshare/interest_rate/interbank_rate_em.py +14 -9
- akshare/movie/artist_yien.py +32 -5
- akshare/movie/movie_yien.py +92 -18
- akshare/movie/video_yien.py +28 -5
- akshare/news/news_baidu.py +78 -44
- akshare/news/news_cctv.py +38 -38
- akshare/news/news_stock.py +6 -3
- akshare/nlp/nlp_interface.py +7 -8
- akshare/option/cons.py +11 -11
- akshare/option/option_comm_qihuo.py +86 -0
- akshare/option/option_commodity.py +178 -51
- akshare/option/option_daily_stats_sse_szse.py +146 -0
- akshare/option/option_em.py +147 -138
- akshare/option/option_finance_sina.py +160 -137
- akshare/option/option_lhb_em.py +62 -56
- akshare/option/option_risk_indicator_sse.py +17 -14
- akshare/other/other_car_cpca.py +934 -0
- akshare/other/{other_car.py → other_car_gasgoo.py} +15 -54
- akshare/qdii/__init__.py +0 -0
- akshare/qdii/qdii_jsl.py +233 -0
- akshare/request.py +117 -0
- akshare/spot/spot_hog_soozhu.py +232 -0
- akshare/spot/spot_price_qh.py +121 -0
- akshare/spot/spot_sge.py +63 -10
- akshare/stock/stock_allotment_cninfo.py +10 -9
- akshare/stock/stock_board_concept_em.py +23 -14
- akshare/stock/stock_board_industry_em.py +40 -34
- akshare/stock/stock_cg_equity_mortgage.py +15 -11
- akshare/stock/stock_cg_guarantee.py +41 -51
- akshare/stock/stock_cg_lawsuit.py +36 -35
- akshare/stock/stock_dividend_cninfo.py +12 -6
- akshare/stock/stock_dzjy_em.py +347 -260
- akshare/stock/stock_fund_em.py +332 -84
- akshare/stock/stock_hk_famous.py +108 -0
- akshare/stock/stock_hk_sina.py +8 -7
- akshare/stock/stock_hold_control_cninfo.py +100 -15
- akshare/stock/stock_hold_control_em.py +4 -3
- akshare/stock/stock_hold_num_cninfo.py +18 -12
- akshare/stock/stock_hot_rank_em.py +2 -1
- akshare/stock/stock_hot_search_baidu.py +5 -2
- akshare/stock/stock_industry_cninfo.py +24 -18
- akshare/stock/stock_industry_pe_cninfo.py +45 -31
- akshare/stock/stock_industry_sw.py +9 -10
- akshare/stock/stock_info.py +25 -15
- akshare/stock/stock_info_em.py +5 -2
- akshare/stock/stock_intraday_em.py +5 -2
- akshare/stock/stock_intraday_sina.py +22 -18
- akshare/stock/stock_ipo_summary_cninfo.py +25 -10
- akshare/stock/stock_new_cninfo.py +32 -19
- akshare/stock/stock_news_cx.py +39 -0
- akshare/stock/stock_profile_cninfo.py +9 -8
- akshare/stock/stock_rank_forecast.py +8 -6
- akshare/stock/stock_share_changes_cninfo.py +18 -14
- akshare/stock/stock_share_hold.py +24 -19
- akshare/stock/stock_summary.py +54 -26
- akshare/stock/stock_us_famous.py +15 -6
- akshare/stock/stock_us_pink.py +7 -5
- akshare/stock/stock_us_sina.py +15 -12
- akshare/stock/stock_xq.py +38 -12
- akshare/stock/stock_zh_a_sina.py +53 -78
- akshare/stock/stock_zh_b_sina.py +32 -55
- akshare/stock/stock_zh_kcb_report.py +11 -9
- akshare/stock/stock_zh_kcb_sina.py +67 -64
- akshare/stock_feature/stock_a_below_net_asset_statistics.py +5 -2
- akshare/stock_feature/stock_a_high_low.py +5 -2
- akshare/stock_feature/stock_a_indicator.py +12 -9
- akshare/stock_feature/stock_a_pe_and_pb.py +27 -6
- akshare/stock_feature/stock_account_em.py +58 -40
- akshare/stock_feature/stock_analyst_em.py +36 -27
- akshare/stock_feature/stock_board_industry_ths.py +136 -400
- akshare/stock_feature/stock_comment_em.py +118 -85
- akshare/stock_feature/stock_concept_futu.py +183 -0
- akshare/stock_feature/stock_cyq_em.py +58 -54
- akshare/stock_feature/stock_disclosure_cninfo.py +147 -102
- akshare/stock_feature/stock_esg_sina.py +216 -11
- akshare/stock_feature/stock_fhps_em.py +60 -25
- akshare/stock_feature/stock_fhps_ths.py +25 -6
- akshare/stock_feature/stock_fund_flow.py +38 -25
- akshare/stock_feature/stock_gdfx_em.py +180 -95
- akshare/stock_feature/stock_gdhs.py +73 -49
- akshare/stock_feature/stock_gpzy_em.py +78 -46
- akshare/stock_feature/stock_hist_em.py +55 -23
- akshare/stock_feature/stock_hk_valuation_baidu.py +20 -8
- akshare/stock_feature/stock_hsgt_em.py +184 -452
- akshare/stock_feature/stock_info.py +52 -29
- akshare/stock_feature/stock_inner_trade_xq.py +39 -31
- akshare/stock_feature/stock_irm_cninfo.py +32 -9
- akshare/stock_feature/stock_jgdy_em.py +41 -38
- akshare/stock_feature/stock_lh_yybpm.py +36 -37
- akshare/stock_feature/stock_lhb_em.py +135 -71
- akshare/stock_feature/stock_lhb_sina.py +93 -46
- akshare/stock_feature/stock_margin_em.py +102 -0
- akshare/stock_feature/{stock_sse_margin.py → stock_margin_sse.py} +21 -15
- akshare/stock_feature/{stock_szse_margin.py → stock_margin_szse.py} +23 -19
- akshare/stock_feature/stock_market_legu.py +13 -8
- akshare/stock_feature/stock_pankou_em.py +72 -34
- akshare/stock_feature/stock_report_em.py +244 -54
- akshare/stock_feature/stock_research_report_em.py +48 -19
- akshare/stock_feature/stock_sns_sseinfo.py +15 -12
- akshare/stock_feature/stock_sy_em.py +86 -33
- akshare/stock_feature/stock_technology_ths.py +152 -120
- akshare/stock_feature/stock_tfp_em.py +35 -13
- akshare/stock_feature/stock_three_report_em.py +119 -77
- akshare/stock_feature/stock_ttm_lyr.py +4 -7
- akshare/stock_feature/stock_value_em.py +83 -0
- akshare/stock_feature/stock_wencai.py +21 -9
- akshare/stock_feature/stock_yjyg_em.py +63 -28
- akshare/stock_feature/stock_zf_pg.py +61 -38
- akshare/stock_feature/stock_zh_valuation_baidu.py +3 -2
- akshare/stock_feature/stock_ztb_em.py +62 -40
- akshare/stock_fundamental/stock_finance.py +150 -58
- akshare/stock_fundamental/stock_finance_ths.py +116 -31
- akshare/stock_fundamental/stock_mda_ym.py +5 -3
- akshare/stock_fundamental/stock_notice.py +29 -15
- akshare/stock_fundamental/stock_profit_forecast_em.py +31 -13
- akshare/stock_fundamental/stock_profit_forecast_ths.py +19 -10
- akshare/stock_fundamental/stock_register_em.py +448 -0
- akshare/stock_fundamental/stock_restricted_em.py +79 -32
- akshare/stock_fundamental/stock_zygc.py +10 -8
- akshare/stock_fundamental/stock_zyjs_ths.py +5 -3
- akshare/tool/trade_date_hist.py +4 -3
- akshare/utils/cons.py +10 -0
- akshare/utils/context.py +43 -0
- akshare/utils/demjson.py +2 -2
- akshare/utils/func.py +26 -0
- akshare/utils/tqdm.py +13 -3
- {akshare-1.12.99.dist-info → akshare-1.15.72.dist-info}/METADATA +52 -69
- akshare-1.15.72.dist-info/RECORD +385 -0
- {akshare-1.12.99.dist-info → akshare-1.15.72.dist-info}/WHEEL +1 -1
- tests/test_func.py +3 -5
- akshare/bond/bond_futures.py +0 -50
- akshare/bond/bond_investing.py +0 -139
- akshare/crypto/crypto_hist_investing.py +0 -249
- akshare/fortune/fortune_it_juzi.py +0 -123
- akshare/futures/futures_international.py +0 -170
- akshare/futures/futures_news_baidu.py +0 -54
- akshare/futures/inventory_data.py +0 -100
- akshare/futures_derivative/futures_index_price_nh.py +0 -61
- akshare/futures_derivative/futures_index_return_nh.py +0 -47
- akshare/futures_derivative/futures_index_volatility_nh.py +0 -51
- akshare/futures_derivative/futures_other_index_nh.py +0 -145
- akshare/index/index_fear_greed_funddb.py +0 -71
- akshare/index/index_investing.py +0 -232
- akshare/sport/sport_olympic_winter.py +0 -39
- akshare/stock_feature/stock_board_concept_ths.py +0 -422
- akshare/stock_fundamental/stock_register.py +0 -292
- akshare-1.12.99.dist-info/RECORD +0 -374
- {akshare-1.12.99.dist-info → akshare-1.15.72.dist-info}/LICENSE +0 -0
- {akshare-1.12.99.dist-info → akshare-1.15.72.dist-info}/top_level.txt +0 -0
akshare/stock/stock_fund_em.py
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date: 2024/3/
|
|
4
|
+
Date: 2024/3/25 12:30
|
|
5
5
|
Desc: 东方财富网-数据中心-资金流向
|
|
6
6
|
https://data.eastmoney.com/zjlx/detail.html
|
|
7
7
|
"""
|
|
8
|
+
|
|
8
9
|
import json
|
|
9
10
|
import time
|
|
10
11
|
from functools import lru_cache
|
|
@@ -14,7 +15,7 @@ import requests
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
def stock_individual_fund_flow(
|
|
17
|
-
|
|
18
|
+
stock: str = "600094", market: str = "sh"
|
|
18
19
|
) -> pd.DataFrame:
|
|
19
20
|
"""
|
|
20
21
|
东方财富网-数据中心-资金流向-个股
|
|
@@ -29,7 +30,8 @@ def stock_individual_fund_flow(
|
|
|
29
30
|
market_map = {"sh": 1, "sz": 0, "bj": 0}
|
|
30
31
|
url = "https://push2his.eastmoney.com/api/qt/stock/fflow/daykline/get"
|
|
31
32
|
headers = {
|
|
32
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
|
|
33
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
|
34
|
+
"(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
|
33
35
|
}
|
|
34
36
|
params = {
|
|
35
37
|
"lmt": "0",
|
|
@@ -78,16 +80,37 @@ def stock_individual_fund_flow(
|
|
|
78
80
|
"小单净流入-净占比",
|
|
79
81
|
]
|
|
80
82
|
]
|
|
81
|
-
temp_df["
|
|
82
|
-
temp_df["
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
temp_df["
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
temp_df["
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
temp_df["日期"] = pd.to_datetime(temp_df["日期"], errors="coerce").dt.date
|
|
84
|
+
temp_df["主力净流入-净额"] = pd.to_numeric(
|
|
85
|
+
temp_df["主力净流入-净额"], errors="coerce"
|
|
86
|
+
)
|
|
87
|
+
temp_df["小单净流入-净额"] = pd.to_numeric(
|
|
88
|
+
temp_df["小单净流入-净额"], errors="coerce"
|
|
89
|
+
)
|
|
90
|
+
temp_df["中单净流入-净额"] = pd.to_numeric(
|
|
91
|
+
temp_df["中单净流入-净额"], errors="coerce"
|
|
92
|
+
)
|
|
93
|
+
temp_df["大单净流入-净额"] = pd.to_numeric(
|
|
94
|
+
temp_df["大单净流入-净额"], errors="coerce"
|
|
95
|
+
)
|
|
96
|
+
temp_df["超大单净流入-净额"] = pd.to_numeric(
|
|
97
|
+
temp_df["超大单净流入-净额"], errors="coerce"
|
|
98
|
+
)
|
|
99
|
+
temp_df["主力净流入-净占比"] = pd.to_numeric(
|
|
100
|
+
temp_df["主力净流入-净占比"], errors="coerce"
|
|
101
|
+
)
|
|
102
|
+
temp_df["小单净流入-净占比"] = pd.to_numeric(
|
|
103
|
+
temp_df["小单净流入-净占比"], errors="coerce"
|
|
104
|
+
)
|
|
105
|
+
temp_df["中单净流入-净占比"] = pd.to_numeric(
|
|
106
|
+
temp_df["中单净流入-净占比"], errors="coerce"
|
|
107
|
+
)
|
|
108
|
+
temp_df["大单净流入-净占比"] = pd.to_numeric(
|
|
109
|
+
temp_df["大单净流入-净占比"], errors="coerce"
|
|
110
|
+
)
|
|
111
|
+
temp_df["超大单净流入-净占比"] = pd.to_numeric(
|
|
112
|
+
temp_df["超大单净流入-净占比"], errors="coerce"
|
|
113
|
+
)
|
|
91
114
|
temp_df["收盘价"] = pd.to_numeric(temp_df["收盘价"], errors="coerce")
|
|
92
115
|
temp_df["涨跌幅"] = pd.to_numeric(temp_df["涨跌幅"], errors="coerce")
|
|
93
116
|
return temp_df
|
|
@@ -314,7 +337,8 @@ def stock_market_fund_flow() -> pd.DataFrame:
|
|
|
314
337
|
"""
|
|
315
338
|
url = "https://push2his.eastmoney.com/api/qt/stock/fflow/daykline/get"
|
|
316
339
|
headers = {
|
|
317
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
|
|
340
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
|
341
|
+
"(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
|
318
342
|
}
|
|
319
343
|
params = {
|
|
320
344
|
"lmt": "0",
|
|
@@ -329,7 +353,7 @@ def stock_market_fund_flow() -> pd.DataFrame:
|
|
|
329
353
|
}
|
|
330
354
|
r = requests.get(url, params=params, headers=headers)
|
|
331
355
|
text_data = r.text
|
|
332
|
-
json_data = json.loads(text_data[text_data.find("{"): -2])
|
|
356
|
+
json_data = json.loads(text_data[text_data.find("{") : -2])
|
|
333
357
|
content_list = json_data["data"]["klines"]
|
|
334
358
|
temp_df = pd.DataFrame([item.split(",") for item in content_list])
|
|
335
359
|
temp_df.columns = [
|
|
@@ -373,21 +397,41 @@ def stock_market_fund_flow() -> pd.DataFrame:
|
|
|
373
397
|
temp_df["上证-涨跌幅"] = pd.to_numeric(temp_df["上证-涨跌幅"], errors="coerce")
|
|
374
398
|
temp_df["深证-收盘价"] = pd.to_numeric(temp_df["深证-收盘价"], errors="coerce")
|
|
375
399
|
temp_df["深证-涨跌幅"] = pd.to_numeric(temp_df["深证-涨跌幅"], errors="coerce")
|
|
376
|
-
temp_df["主力净流入-净额"] = pd.to_numeric(
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
temp_df["
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
temp_df["
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
temp_df["
|
|
400
|
+
temp_df["主力净流入-净额"] = pd.to_numeric(
|
|
401
|
+
temp_df["主力净流入-净额"], errors="coerce"
|
|
402
|
+
)
|
|
403
|
+
temp_df["主力净流入-净占比"] = pd.to_numeric(
|
|
404
|
+
temp_df["主力净流入-净占比"], errors="coerce"
|
|
405
|
+
)
|
|
406
|
+
temp_df["超大单净流入-净额"] = pd.to_numeric(
|
|
407
|
+
temp_df["超大单净流入-净额"], errors="coerce"
|
|
408
|
+
)
|
|
409
|
+
temp_df["超大单净流入-净占比"] = pd.to_numeric(
|
|
410
|
+
temp_df["超大单净流入-净占比"], errors="coerce"
|
|
411
|
+
)
|
|
412
|
+
temp_df["大单净流入-净额"] = pd.to_numeric(
|
|
413
|
+
temp_df["大单净流入-净额"], errors="coerce"
|
|
414
|
+
)
|
|
415
|
+
temp_df["大单净流入-净占比"] = pd.to_numeric(
|
|
416
|
+
temp_df["大单净流入-净占比"], errors="coerce"
|
|
417
|
+
)
|
|
418
|
+
temp_df["中单净流入-净额"] = pd.to_numeric(
|
|
419
|
+
temp_df["中单净流入-净额"], errors="coerce"
|
|
420
|
+
)
|
|
421
|
+
temp_df["中单净流入-净占比"] = pd.to_numeric(
|
|
422
|
+
temp_df["中单净流入-净占比"], errors="coerce"
|
|
423
|
+
)
|
|
424
|
+
temp_df["小单净流入-净额"] = pd.to_numeric(
|
|
425
|
+
temp_df["小单净流入-净额"], errors="coerce"
|
|
426
|
+
)
|
|
427
|
+
temp_df["小单净流入-净占比"] = pd.to_numeric(
|
|
428
|
+
temp_df["小单净流入-净占比"], errors="coerce"
|
|
429
|
+
)
|
|
386
430
|
return temp_df
|
|
387
431
|
|
|
388
432
|
|
|
389
433
|
def stock_sector_fund_flow_rank(
|
|
390
|
-
|
|
434
|
+
indicator: str = "今日", sector_type: str = "行业资金流"
|
|
391
435
|
) -> pd.DataFrame:
|
|
392
436
|
"""
|
|
393
437
|
东方财富网-数据中心-资金流向-板块资金流-排名
|
|
@@ -419,7 +463,8 @@ def stock_sector_fund_flow_rank(
|
|
|
419
463
|
}
|
|
420
464
|
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
|
421
465
|
headers = {
|
|
422
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
|
|
466
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
|
467
|
+
"(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
|
423
468
|
}
|
|
424
469
|
params = {
|
|
425
470
|
"pn": "1",
|
|
@@ -439,7 +484,7 @@ def stock_sector_fund_flow_rank(
|
|
|
439
484
|
}
|
|
440
485
|
r = requests.get(url, params=params, headers=headers)
|
|
441
486
|
text_data = r.text
|
|
442
|
-
json_data = json.loads(text_data[text_data.find("{"): -2])
|
|
487
|
+
json_data = json.loads(text_data[text_data.find("{") : -2])
|
|
443
488
|
temp_df = pd.DataFrame(json_data["data"]["diff"])
|
|
444
489
|
if indicator == "今日":
|
|
445
490
|
temp_df.columns = [
|
|
@@ -480,7 +525,9 @@ def stock_sector_fund_flow_rank(
|
|
|
480
525
|
"今日主力净流入最大股",
|
|
481
526
|
]
|
|
482
527
|
]
|
|
483
|
-
temp_df["今日主力净流入-净额"] = pd.to_numeric(
|
|
528
|
+
temp_df["今日主力净流入-净额"] = pd.to_numeric(
|
|
529
|
+
temp_df["今日主力净流入-净额"], errors="coerce"
|
|
530
|
+
)
|
|
484
531
|
temp_df.sort_values(["今日主力净流入-净额"], ascending=False, inplace=True)
|
|
485
532
|
temp_df.reset_index(inplace=True)
|
|
486
533
|
temp_df["index"] = range(1, len(temp_df) + 1)
|
|
@@ -584,7 +631,8 @@ def _get_stock_sector_fund_flow_summary_code() -> dict:
|
|
|
584
631
|
"""
|
|
585
632
|
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
|
586
633
|
headers = {
|
|
587
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
|
|
634
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
|
635
|
+
"(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
|
588
636
|
}
|
|
589
637
|
params = {
|
|
590
638
|
"pn": "1",
|
|
@@ -595,7 +643,7 @@ def _get_stock_sector_fund_flow_summary_code() -> dict:
|
|
|
595
643
|
"fltt": "2",
|
|
596
644
|
"invt": "2",
|
|
597
645
|
"fid0": "f62",
|
|
598
|
-
"fs":
|
|
646
|
+
"fs": "m:90 t:2",
|
|
599
647
|
"stat": "1",
|
|
600
648
|
"fields": "f12,f14,f2,f3,f62,f184,f66,f69,f72,f75,f78,f81,f84,f87,f204,f205,f124",
|
|
601
649
|
"rt": "52975239",
|
|
@@ -609,7 +657,7 @@ def _get_stock_sector_fund_flow_summary_code() -> dict:
|
|
|
609
657
|
|
|
610
658
|
|
|
611
659
|
def stock_sector_fund_flow_summary(
|
|
612
|
-
|
|
660
|
+
symbol: str = "电源设备", indicator: str = "今日"
|
|
613
661
|
) -> pd.DataFrame:
|
|
614
662
|
"""
|
|
615
663
|
东方财富网-数据中心-资金流向-行业资金流-xx行业个股资金流
|
|
@@ -627,7 +675,7 @@ def stock_sector_fund_flow_summary(
|
|
|
627
675
|
params = {
|
|
628
676
|
"fid": "f62",
|
|
629
677
|
"po": "1",
|
|
630
|
-
"pz": "
|
|
678
|
+
"pz": "500",
|
|
631
679
|
"pn": "1",
|
|
632
680
|
"np": "1",
|
|
633
681
|
"fltt": "2",
|
|
@@ -681,24 +729,42 @@ def stock_sector_fund_flow_summary(
|
|
|
681
729
|
]
|
|
682
730
|
temp_df["最新价"] = pd.to_numeric(temp_df["最新价"], errors="coerce")
|
|
683
731
|
temp_df["今天涨跌幅"] = pd.to_numeric(temp_df["今天涨跌幅"], errors="coerce")
|
|
684
|
-
temp_df["今日主力净流入-净额"] = pd.to_numeric(
|
|
685
|
-
|
|
686
|
-
|
|
732
|
+
temp_df["今日主力净流入-净额"] = pd.to_numeric(
|
|
733
|
+
temp_df["今日主力净流入-净额"], errors="coerce"
|
|
734
|
+
)
|
|
735
|
+
temp_df["今日主力净流入-净占比"] = pd.to_numeric(
|
|
736
|
+
temp_df["今日主力净流入-净占比"], errors="coerce"
|
|
737
|
+
)
|
|
738
|
+
temp_df["今日超大单净流入-净额"] = pd.to_numeric(
|
|
739
|
+
temp_df["今日超大单净流入-净额"], errors="coerce"
|
|
740
|
+
)
|
|
687
741
|
temp_df["今日超大单净流入-净占比"] = pd.to_numeric(
|
|
688
742
|
temp_df["今日超大单净流入-净占比"], errors="coerce"
|
|
689
743
|
)
|
|
690
|
-
temp_df["今日大单净流入-净额"] = pd.to_numeric(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
temp_df["
|
|
694
|
-
|
|
695
|
-
|
|
744
|
+
temp_df["今日大单净流入-净额"] = pd.to_numeric(
|
|
745
|
+
temp_df["今日大单净流入-净额"], errors="coerce"
|
|
746
|
+
)
|
|
747
|
+
temp_df["今日大单净流入-净占比"] = pd.to_numeric(
|
|
748
|
+
temp_df["今日大单净流入-净占比"], errors="coerce"
|
|
749
|
+
)
|
|
750
|
+
temp_df["今日中单净流入-净额"] = pd.to_numeric(
|
|
751
|
+
temp_df["今日中单净流入-净额"], errors="coerce"
|
|
752
|
+
)
|
|
753
|
+
temp_df["今日中单净流入-净占比"] = pd.to_numeric(
|
|
754
|
+
temp_df["今日中单净流入-净占比"], errors="coerce"
|
|
755
|
+
)
|
|
756
|
+
temp_df["今日小单净流入-净额"] = pd.to_numeric(
|
|
757
|
+
temp_df["今日小单净流入-净额"], errors="coerce"
|
|
758
|
+
)
|
|
759
|
+
temp_df["今日小单净流入-净占比"] = pd.to_numeric(
|
|
760
|
+
temp_df["今日小单净流入-净占比"], errors="coerce"
|
|
761
|
+
)
|
|
696
762
|
return temp_df
|
|
697
763
|
if indicator == "5日":
|
|
698
764
|
params = {
|
|
699
765
|
"fid": "f164",
|
|
700
766
|
"po": "1",
|
|
701
|
-
"pz": "
|
|
767
|
+
"pz": "500",
|
|
702
768
|
"pn": "1",
|
|
703
769
|
"np": "1",
|
|
704
770
|
"fltt": "2",
|
|
@@ -752,24 +818,42 @@ def stock_sector_fund_flow_summary(
|
|
|
752
818
|
]
|
|
753
819
|
temp_df["最新价"] = pd.to_numeric(temp_df["最新价"], errors="coerce")
|
|
754
820
|
temp_df["5日涨跌幅"] = pd.to_numeric(temp_df["5日涨跌幅"], errors="coerce")
|
|
755
|
-
temp_df["5日主力净流入-净额"] = pd.to_numeric(
|
|
756
|
-
|
|
757
|
-
|
|
821
|
+
temp_df["5日主力净流入-净额"] = pd.to_numeric(
|
|
822
|
+
temp_df["5日主力净流入-净额"], errors="coerce"
|
|
823
|
+
)
|
|
824
|
+
temp_df["5日主力净流入-净占比"] = pd.to_numeric(
|
|
825
|
+
temp_df["5日主力净流入-净占比"], errors="coerce"
|
|
826
|
+
)
|
|
827
|
+
temp_df["5日超大单净流入-净额"] = pd.to_numeric(
|
|
828
|
+
temp_df["5日超大单净流入-净额"], errors="coerce"
|
|
829
|
+
)
|
|
758
830
|
temp_df["5日超大单净流入-净占比"] = pd.to_numeric(
|
|
759
831
|
temp_df["5日超大单净流入-净占比"], errors="coerce"
|
|
760
832
|
)
|
|
761
|
-
temp_df["5日大单净流入-净额"] = pd.to_numeric(
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
temp_df["5
|
|
765
|
-
|
|
766
|
-
|
|
833
|
+
temp_df["5日大单净流入-净额"] = pd.to_numeric(
|
|
834
|
+
temp_df["5日大单净流入-净额"], errors="coerce"
|
|
835
|
+
)
|
|
836
|
+
temp_df["5日大单净流入-净占比"] = pd.to_numeric(
|
|
837
|
+
temp_df["5日大单净流入-净占比"], errors="coerce"
|
|
838
|
+
)
|
|
839
|
+
temp_df["5日中单净流入-净额"] = pd.to_numeric(
|
|
840
|
+
temp_df["5日中单净流入-净额"], errors="coerce"
|
|
841
|
+
)
|
|
842
|
+
temp_df["5日中单净流入-净占比"] = pd.to_numeric(
|
|
843
|
+
temp_df["5日中单净流入-净占比"], errors="coerce"
|
|
844
|
+
)
|
|
845
|
+
temp_df["5日小单净流入-净额"] = pd.to_numeric(
|
|
846
|
+
temp_df["5日小单净流入-净额"], errors="coerce"
|
|
847
|
+
)
|
|
848
|
+
temp_df["5日小单净流入-净占比"] = pd.to_numeric(
|
|
849
|
+
temp_df["5日小单净流入-净占比"], errors="coerce"
|
|
850
|
+
)
|
|
767
851
|
return temp_df
|
|
768
852
|
if indicator == "10日":
|
|
769
853
|
params = {
|
|
770
854
|
"fid": "f174",
|
|
771
855
|
"po": "1",
|
|
772
|
-
"pz": "
|
|
856
|
+
"pz": "500",
|
|
773
857
|
"pn": "1",
|
|
774
858
|
"np": "1",
|
|
775
859
|
"fltt": "2",
|
|
@@ -823,7 +907,9 @@ def stock_sector_fund_flow_summary(
|
|
|
823
907
|
]
|
|
824
908
|
temp_df["最新价"] = pd.to_numeric(temp_df["最新价"], errors="coerce")
|
|
825
909
|
temp_df["10日涨跌幅"] = pd.to_numeric(temp_df["10日涨跌幅"], errors="coerce")
|
|
826
|
-
temp_df["10日主力净流入-净额"] = pd.to_numeric(
|
|
910
|
+
temp_df["10日主力净流入-净额"] = pd.to_numeric(
|
|
911
|
+
temp_df["10日主力净流入-净额"], errors="coerce"
|
|
912
|
+
)
|
|
827
913
|
temp_df["10日主力净流入-净占比"] = pd.to_numeric(
|
|
828
914
|
temp_df["10日主力净流入-净占比"], errors="coerce"
|
|
829
915
|
)
|
|
@@ -833,15 +919,21 @@ def stock_sector_fund_flow_summary(
|
|
|
833
919
|
temp_df["10日超大单净流入-净占比"] = pd.to_numeric(
|
|
834
920
|
temp_df["10日超大单净流入-净占比"], errors="coerce"
|
|
835
921
|
)
|
|
836
|
-
temp_df["10日大单净流入-净额"] = pd.to_numeric(
|
|
922
|
+
temp_df["10日大单净流入-净额"] = pd.to_numeric(
|
|
923
|
+
temp_df["10日大单净流入-净额"], errors="coerce"
|
|
924
|
+
)
|
|
837
925
|
temp_df["10日大单净流入-净占比"] = pd.to_numeric(
|
|
838
926
|
temp_df["10日大单净流入-净占比"], errors="coerce"
|
|
839
927
|
)
|
|
840
|
-
temp_df["10日中单净流入-净额"] = pd.to_numeric(
|
|
928
|
+
temp_df["10日中单净流入-净额"] = pd.to_numeric(
|
|
929
|
+
temp_df["10日中单净流入-净额"], errors="coerce"
|
|
930
|
+
)
|
|
841
931
|
temp_df["10日中单净流入-净占比"] = pd.to_numeric(
|
|
842
932
|
temp_df["10日中单净流入-净占比"], errors="coerce"
|
|
843
933
|
)
|
|
844
|
-
temp_df["10日小单净流入-净额"] = pd.to_numeric(
|
|
934
|
+
temp_df["10日小单净流入-净额"] = pd.to_numeric(
|
|
935
|
+
temp_df["10日小单净流入-净额"], errors="coerce"
|
|
936
|
+
)
|
|
845
937
|
temp_df["10日小单净流入-净占比"] = pd.to_numeric(
|
|
846
938
|
temp_df["10日小单净流入-净占比"], errors="coerce"
|
|
847
939
|
)
|
|
@@ -902,17 +994,37 @@ def stock_sector_fund_flow_hist(symbol: str = "电源设备") -> pd.DataFrame:
|
|
|
902
994
|
"小单净流入-净占比",
|
|
903
995
|
]
|
|
904
996
|
]
|
|
905
|
-
temp_df["主力净流入-净额"] = pd.to_numeric(
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
temp_df["
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
temp_df["
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
temp_df["
|
|
915
|
-
|
|
997
|
+
temp_df["主力净流入-净额"] = pd.to_numeric(
|
|
998
|
+
temp_df["主力净流入-净额"], errors="coerce"
|
|
999
|
+
)
|
|
1000
|
+
temp_df["主力净流入-净占比"] = pd.to_numeric(
|
|
1001
|
+
temp_df["主力净流入-净占比"], errors="coerce"
|
|
1002
|
+
)
|
|
1003
|
+
temp_df["超大单净流入-净额"] = pd.to_numeric(
|
|
1004
|
+
temp_df["超大单净流入-净额"], errors="coerce"
|
|
1005
|
+
)
|
|
1006
|
+
temp_df["超大单净流入-净占比"] = pd.to_numeric(
|
|
1007
|
+
temp_df["超大单净流入-净占比"], errors="coerce"
|
|
1008
|
+
)
|
|
1009
|
+
temp_df["大单净流入-净额"] = pd.to_numeric(
|
|
1010
|
+
temp_df["大单净流入-净额"], errors="coerce"
|
|
1011
|
+
)
|
|
1012
|
+
temp_df["大单净流入-净占比"] = pd.to_numeric(
|
|
1013
|
+
temp_df["大单净流入-净占比"], errors="coerce"
|
|
1014
|
+
)
|
|
1015
|
+
temp_df["中单净流入-净额"] = pd.to_numeric(
|
|
1016
|
+
temp_df["中单净流入-净额"], errors="coerce"
|
|
1017
|
+
)
|
|
1018
|
+
temp_df["中单净流入-净占比"] = pd.to_numeric(
|
|
1019
|
+
temp_df["中单净流入-净占比"], errors="coerce"
|
|
1020
|
+
)
|
|
1021
|
+
temp_df["小单净流入-净额"] = pd.to_numeric(
|
|
1022
|
+
temp_df["小单净流入-净额"], errors="coerce"
|
|
1023
|
+
)
|
|
1024
|
+
temp_df["小单净流入-净占比"] = pd.to_numeric(
|
|
1025
|
+
temp_df["小单净流入-净占比"], errors="coerce"
|
|
1026
|
+
)
|
|
1027
|
+
temp_df["日期"] = pd.to_datetime(temp_df["日期"]).dt.date
|
|
916
1028
|
return temp_df
|
|
917
1029
|
|
|
918
1030
|
|
|
@@ -926,7 +1038,8 @@ def _get_stock_concept_fund_flow_summary_code() -> dict:
|
|
|
926
1038
|
"""
|
|
927
1039
|
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
|
928
1040
|
headers = {
|
|
929
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
|
|
1041
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 "
|
|
1042
|
+
"(KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
|
|
930
1043
|
}
|
|
931
1044
|
params = {
|
|
932
1045
|
"pn": "1",
|
|
@@ -1000,17 +1113,141 @@ def stock_concept_fund_flow_hist(symbol: str = "锂电池") -> pd.DataFrame:
|
|
|
1000
1113
|
"小单净流入-净占比",
|
|
1001
1114
|
]
|
|
1002
1115
|
]
|
|
1003
|
-
temp_df["主力净流入-净额"] = pd.to_numeric(
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
temp_df["
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
temp_df["
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
temp_df["
|
|
1013
|
-
|
|
1116
|
+
temp_df["主力净流入-净额"] = pd.to_numeric(
|
|
1117
|
+
temp_df["主力净流入-净额"], errors="coerce"
|
|
1118
|
+
)
|
|
1119
|
+
temp_df["主力净流入-净占比"] = pd.to_numeric(
|
|
1120
|
+
temp_df["主力净流入-净占比"], errors="coerce"
|
|
1121
|
+
)
|
|
1122
|
+
temp_df["超大单净流入-净额"] = pd.to_numeric(
|
|
1123
|
+
temp_df["超大单净流入-净额"], errors="coerce"
|
|
1124
|
+
)
|
|
1125
|
+
temp_df["超大单净流入-净占比"] = pd.to_numeric(
|
|
1126
|
+
temp_df["超大单净流入-净占比"], errors="coerce"
|
|
1127
|
+
)
|
|
1128
|
+
temp_df["大单净流入-净额"] = pd.to_numeric(
|
|
1129
|
+
temp_df["大单净流入-净额"], errors="coerce"
|
|
1130
|
+
)
|
|
1131
|
+
temp_df["大单净流入-净占比"] = pd.to_numeric(
|
|
1132
|
+
temp_df["大单净流入-净占比"], errors="coerce"
|
|
1133
|
+
)
|
|
1134
|
+
temp_df["中单净流入-净额"] = pd.to_numeric(
|
|
1135
|
+
temp_df["中单净流入-净额"], errors="coerce"
|
|
1136
|
+
)
|
|
1137
|
+
temp_df["中单净流入-净占比"] = pd.to_numeric(
|
|
1138
|
+
temp_df["中单净流入-净占比"], errors="coerce"
|
|
1139
|
+
)
|
|
1140
|
+
temp_df["小单净流入-净额"] = pd.to_numeric(
|
|
1141
|
+
temp_df["小单净流入-净额"], errors="coerce"
|
|
1142
|
+
)
|
|
1143
|
+
temp_df["小单净流入-净占比"] = pd.to_numeric(
|
|
1144
|
+
temp_df["小单净流入-净占比"], errors="coerce"
|
|
1145
|
+
)
|
|
1146
|
+
temp_df["日期"] = pd.to_datetime(temp_df["日期"]).dt.date
|
|
1147
|
+
return temp_df
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
def stock_main_fund_flow(symbol: str = "全部股票") -> pd.DataFrame:
|
|
1151
|
+
"""
|
|
1152
|
+
东方财富网-数据中心-资金流向-主力净流入排名
|
|
1153
|
+
https://data.eastmoney.com/zjlx/list.html
|
|
1154
|
+
:param symbol: 全部股票; choice of {"全部股票", "沪深A股", "沪市A股", "科创板", "深市A股", "创业板", "沪市B股", "深市B股"}
|
|
1155
|
+
:type symbol: str
|
|
1156
|
+
:return: 主力净流入排名
|
|
1157
|
+
:rtype: pandas.DataFrame
|
|
1158
|
+
"""
|
|
1159
|
+
symbol_map = {
|
|
1160
|
+
"全部股票": "m:0+t:6+f:!2,m:0+t:13+f:!2,m:0+t:80+f:!2,m:1+t:2+f:!2,m:1+t:23+f:!2,m:0+t:7+f:!2,m:1+t:3+f:!2",
|
|
1161
|
+
"沪深A股": "m:0+t:6+f:!2,m:0+t:13+f:!2,m:0+t:80+f:!2,m:1+t:2+f:!2,m:1+t:23+f:!2",
|
|
1162
|
+
"沪市A股": "m:1+t:2+f:!2,m:1+t:23+f:!2",
|
|
1163
|
+
"科创板": "m:1+t:23+f:!2",
|
|
1164
|
+
"深市A股": "m:0+t:6+f:!2,m:0+t:13+f:!2,m:0+t:80+f:!2",
|
|
1165
|
+
"创业板": "m:0+t:80+f:!2",
|
|
1166
|
+
"沪市B股": "m:1+t:3+f:!2",
|
|
1167
|
+
"深市B股": "m:0+t:7+f:!2",
|
|
1168
|
+
}
|
|
1169
|
+
url = "https://push2.eastmoney.com/api/qt/clist/get"
|
|
1170
|
+
params = {
|
|
1171
|
+
"fid": "f184",
|
|
1172
|
+
"po": "1",
|
|
1173
|
+
"pz": "50000",
|
|
1174
|
+
"pn": "1",
|
|
1175
|
+
"np": "1",
|
|
1176
|
+
"fltt": "2",
|
|
1177
|
+
"invt": "2",
|
|
1178
|
+
"fields": "f2,f3,f12,f13,f14,f62,f184,f225,f165,f263,f109,f175,f264,f160,f100,f124,f265,f1",
|
|
1179
|
+
"ut": "b2884a393a59ad64002292a3e90d46a5",
|
|
1180
|
+
"fs": symbol_map[symbol],
|
|
1181
|
+
}
|
|
1182
|
+
r = requests.get(url, params=params, timeout=15)
|
|
1183
|
+
data_json = r.json()
|
|
1184
|
+
temp_df = pd.DataFrame(data_json["data"]["diff"])
|
|
1185
|
+
temp_df.reset_index(inplace=True)
|
|
1186
|
+
temp_df.rename(
|
|
1187
|
+
columns={
|
|
1188
|
+
"index": "序号",
|
|
1189
|
+
"f12": "代码",
|
|
1190
|
+
"f14": "名称",
|
|
1191
|
+
"f2": "最新价",
|
|
1192
|
+
"f184": "今日排行榜-主力净占比",
|
|
1193
|
+
"f225": "今日排行榜-今日排名",
|
|
1194
|
+
"f3": "今日排行榜-今日涨跌",
|
|
1195
|
+
"f165": "5日排行榜-主力净占比",
|
|
1196
|
+
"f263": "5日排行榜-5日排名",
|
|
1197
|
+
"f109": "5日排行榜-5日涨跌",
|
|
1198
|
+
"f175": "10日排行榜-主力净占比",
|
|
1199
|
+
"f264": "10日排行榜-10日排名",
|
|
1200
|
+
"f160": "10日排行榜-10日涨跌",
|
|
1201
|
+
"f100": "所属板块",
|
|
1202
|
+
},
|
|
1203
|
+
inplace=True,
|
|
1204
|
+
)
|
|
1205
|
+
temp_df = temp_df[
|
|
1206
|
+
[
|
|
1207
|
+
"序号",
|
|
1208
|
+
"代码",
|
|
1209
|
+
"名称",
|
|
1210
|
+
"最新价",
|
|
1211
|
+
"今日排行榜-主力净占比",
|
|
1212
|
+
"今日排行榜-今日排名",
|
|
1213
|
+
"今日排行榜-今日涨跌",
|
|
1214
|
+
"5日排行榜-主力净占比",
|
|
1215
|
+
"5日排行榜-5日排名",
|
|
1216
|
+
"5日排行榜-5日涨跌",
|
|
1217
|
+
"10日排行榜-主力净占比",
|
|
1218
|
+
"10日排行榜-10日排名",
|
|
1219
|
+
"10日排行榜-10日涨跌",
|
|
1220
|
+
"所属板块",
|
|
1221
|
+
]
|
|
1222
|
+
]
|
|
1223
|
+
temp_df["最新价"] = pd.to_numeric(temp_df["最新价"], errors="coerce")
|
|
1224
|
+
temp_df["今日排行榜-主力净占比"] = pd.to_numeric(
|
|
1225
|
+
temp_df["今日排行榜-主力净占比"], errors="coerce"
|
|
1226
|
+
)
|
|
1227
|
+
temp_df["今日排行榜-今日排名"] = pd.to_numeric(
|
|
1228
|
+
temp_df["今日排行榜-今日排名"], errors="coerce"
|
|
1229
|
+
)
|
|
1230
|
+
temp_df["今日排行榜-今日涨跌"] = pd.to_numeric(
|
|
1231
|
+
temp_df["今日排行榜-今日涨跌"], errors="coerce"
|
|
1232
|
+
)
|
|
1233
|
+
temp_df["5日排行榜-主力净占比"] = pd.to_numeric(
|
|
1234
|
+
temp_df["5日排行榜-主力净占比"], errors="coerce"
|
|
1235
|
+
)
|
|
1236
|
+
temp_df["5日排行榜-5日排名"] = pd.to_numeric(
|
|
1237
|
+
temp_df["5日排行榜-5日排名"], errors="coerce"
|
|
1238
|
+
)
|
|
1239
|
+
temp_df["5日排行榜-5日涨跌"] = pd.to_numeric(
|
|
1240
|
+
temp_df["5日排行榜-5日涨跌"], errors="coerce"
|
|
1241
|
+
)
|
|
1242
|
+
temp_df["10日排行榜-主力净占比"] = pd.to_numeric(
|
|
1243
|
+
temp_df["10日排行榜-主力净占比"], errors="coerce"
|
|
1244
|
+
)
|
|
1245
|
+
temp_df["10日排行榜-10日排名"] = pd.to_numeric(
|
|
1246
|
+
temp_df["10日排行榜-10日排名"], errors="coerce"
|
|
1247
|
+
)
|
|
1248
|
+
temp_df["10日排行榜-10日涨跌"] = pd.to_numeric(
|
|
1249
|
+
temp_df["10日排行榜-10日涨跌"], errors="coerce"
|
|
1250
|
+
)
|
|
1014
1251
|
return temp_df
|
|
1015
1252
|
|
|
1016
1253
|
|
|
@@ -1020,13 +1257,19 @@ if __name__ == "__main__":
|
|
|
1020
1257
|
)
|
|
1021
1258
|
print(stock_individual_fund_flow_df)
|
|
1022
1259
|
|
|
1023
|
-
stock_individual_fund_flow_rank_df = stock_individual_fund_flow_rank(
|
|
1260
|
+
stock_individual_fund_flow_rank_df = stock_individual_fund_flow_rank(
|
|
1261
|
+
indicator="今日"
|
|
1262
|
+
)
|
|
1024
1263
|
print(stock_individual_fund_flow_rank_df)
|
|
1025
1264
|
|
|
1026
|
-
stock_individual_fund_flow_rank_df = stock_individual_fund_flow_rank(
|
|
1265
|
+
stock_individual_fund_flow_rank_df = stock_individual_fund_flow_rank(
|
|
1266
|
+
indicator="3日"
|
|
1267
|
+
)
|
|
1027
1268
|
print(stock_individual_fund_flow_rank_df)
|
|
1028
1269
|
|
|
1029
|
-
stock_individual_fund_flow_rank_df = stock_individual_fund_flow_rank(
|
|
1270
|
+
stock_individual_fund_flow_rank_df = stock_individual_fund_flow_rank(
|
|
1271
|
+
indicator="5日"
|
|
1272
|
+
)
|
|
1030
1273
|
print(stock_individual_fund_flow_rank_df)
|
|
1031
1274
|
|
|
1032
1275
|
stock_individual_fund_flow_rank_df = stock_individual_fund_flow_rank(
|
|
@@ -1052,7 +1295,9 @@ if __name__ == "__main__":
|
|
|
1052
1295
|
)
|
|
1053
1296
|
print(stock_sector_fund_flow_rank_df)
|
|
1054
1297
|
|
|
1055
|
-
stock_sector_fund_flow_summary_df = stock_sector_fund_flow_summary(
|
|
1298
|
+
stock_sector_fund_flow_summary_df = stock_sector_fund_flow_summary(
|
|
1299
|
+
symbol="文化传媒", indicator="今日"
|
|
1300
|
+
)
|
|
1056
1301
|
print(stock_sector_fund_flow_summary_df)
|
|
1057
1302
|
|
|
1058
1303
|
stock_sector_fund_flow_hist_df = stock_sector_fund_flow_hist(symbol="电源设备")
|
|
@@ -1060,3 +1305,6 @@ if __name__ == "__main__":
|
|
|
1060
1305
|
|
|
1061
1306
|
stock_concept_fund_flow_hist_df = stock_concept_fund_flow_hist(symbol="锂电池")
|
|
1062
1307
|
print(stock_concept_fund_flow_hist_df)
|
|
1308
|
+
|
|
1309
|
+
stock_main_fund_flow_df = stock_main_fund_flow(symbol="全部股票")
|
|
1310
|
+
print(stock_main_fund_flow_df)
|