mns-common 1.4.0.4__tar.gz → 1.4.0.5__tar.gz
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 mns-common might be problematic. Click here for more details.
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/PKG-INFO +1 -1
- mns_common-1.4.0.5/mns_common/component/tfp/stock_tfp_api.py +132 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common.egg-info/PKG-INFO +1 -1
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/setup.py +1 -1
- mns_common-1.4.0.4/mns_common/component/tfp/stock_tfp_api.py +0 -62
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/README.md +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/akshare/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/akshare/k_line_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/akshare/stock_bid_ask_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/akshare/stock_dt_pool.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/akshare/stock_zb_pool.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/akshare/stock_zt_pool_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/akshare/yjyg_sync_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/concept/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/concept/em_concept_index_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/gd/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_debt_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_etf_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_a_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_a_v2_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_hk_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_us_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/hk/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/hk/ths_hk_company_info_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/k_line/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/k_line/stock_k_line_data_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/k_line/stock_minute_data_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/common/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/common/kpl_common_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/common/kpl_common_field_constant.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/concept/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/concept/kpl_concept_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/constant/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/constant/kpl_constant.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/industry/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/industry/kpl_industry_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/selection/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/selection/kpl_selection_plate_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/symbol/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/symbol/kpl_symbol_common_field_constant.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/symbol/symbol_his_quotes_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/msg/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/msg/push_msg_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/proxies/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/proxies/liu_guan_proxy_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/qmt/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/qmt/qmt_minunte_tick_data.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/big_deal/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/big_deal/ths_big_deal_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/company/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/company/ths_company_announce_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/company/ths_company_info_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/app/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/app/ths_concept_detail_app.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/app/ths_concept_index_app.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_common_js_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_company_info_web.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_concept_detail_web.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_concept_index_web.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/self_choose/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/self_choose/ths_self_choose_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/wen_cai/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/wen_cai/ths_wen_cai_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/zt/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/zt/ths_stock_zt_pool_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/zt/ths_stock_zt_pool_v2_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/us/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/us/ths_us_company_info_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/xueqiu/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/xueqiu/xue_qiu_k_line_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/cache/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/cache/cache_service.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/classify/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/classify/symbol_classify_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/classify/symbol_classify_param.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/common_service_fun_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/company/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/company/company_common_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/company/company_common_service_new_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/concept/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/concept/kpl_concept_common_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/concept/ths_concept_common_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/cookie/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/cookie/cookie_info_service.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/data/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/data/data_init_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/deal/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/deal/deal_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/deal/terminal_enum.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/em/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/em/em_real_time_quotes_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/em/em_stock_info_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/exception/ExceptionMonitor.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/exception/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/hk/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/hk/company_hk_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/industry/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/industry/ths_industry_index_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/clean/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/clean/k_line_param.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/clean/sh_small_normal_zt_k_line_check_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/common/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/common/k_line_common_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/patterns/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/patterns/k_line_patterns_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/patterns/pattern_Enum.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/price/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/price/trade_price_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/proxies/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/proxies/proxy_common_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/qmt/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/qmt/qmt_buy_service.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/real_time/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/real_time/real_time_common_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/redis_msg/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/redis_msg/redis_msg_publish_service.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/self_choose/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/self_choose/black_list_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/self_choose/self_choose_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/task/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/task/real_time_data_sync_check.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/tfp/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/trade_date/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/trade_date/trade_date_common_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/zt/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/zt/zt_common_service_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/black_list_classify_enum.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/db_name_constant.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/east_money_stock_api.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/extra_income_db_name.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/price_enum.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/redis_msg_constant.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/constant/self_choose_constant.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/db/MongodbUtil.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/db/MongodbUtilLocal.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/db/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/db/v2/MongodbUtilV2.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/db/v2/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/__init__.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/async_fun.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/cmd_util.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/data_frame_util.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/date_handle_util.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/db_util.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/file_util.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/utils/ip_util.py +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common.egg-info/SOURCES.txt +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common.egg-info/dependency_links.txt +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common.egg-info/top_level.txt +0 -0
- {mns_common-1.4.0.4 → mns_common-1.4.0.5}/setup.cfg +0 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
file_path = os.path.abspath(__file__)
|
|
5
|
+
end = file_path.index('mns') + 16
|
|
6
|
+
project_path = file_path[0:end]
|
|
7
|
+
sys.path.append(project_path)
|
|
8
|
+
import mns_common.utils.date_handle_util as date_handle_util
|
|
9
|
+
from loguru import logger
|
|
10
|
+
import mns_common.utils.data_frame_util as data_frame_util
|
|
11
|
+
from functools import lru_cache
|
|
12
|
+
from mns_common.db.MongodbUtil import MongodbUtil
|
|
13
|
+
import mns_common.constant.db_name_constant as db_name_constant
|
|
14
|
+
|
|
15
|
+
mongodb_util = MongodbUtil('27017')
|
|
16
|
+
|
|
17
|
+
"""
|
|
18
|
+
Date: 2024/4/29 15:00
|
|
19
|
+
Desc: 东方财富网-数据中心-特色数据-停复牌信息
|
|
20
|
+
https://data.eastmoney.com/tfpxx/
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
import pandas as pd
|
|
24
|
+
import requests
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def stock_tfp_em(date: str = "20240426") -> pd.DataFrame:
|
|
28
|
+
"""
|
|
29
|
+
东方财富网-数据中心-特色数据-停复牌信息
|
|
30
|
+
https://data.eastmoney.com/tfpxx/
|
|
31
|
+
:param date: specific date as "2020-03-19"
|
|
32
|
+
:type date: str
|
|
33
|
+
:return: 停复牌信息表
|
|
34
|
+
:rtype: pandas.DataFrame
|
|
35
|
+
"""
|
|
36
|
+
url = "https://datacenter-web.eastmoney.com/api/data/v1/get"
|
|
37
|
+
params = {
|
|
38
|
+
"sortColumns": "SUSPEND_START_DATE",
|
|
39
|
+
"sortTypes": "-1",
|
|
40
|
+
"pageSize": "500",
|
|
41
|
+
"pageNumber": "1",
|
|
42
|
+
"reportName": "RPT_CUSTOM_SUSPEND_DATA_INTERFACE",
|
|
43
|
+
"columns": "ALL",
|
|
44
|
+
"source": "WEB",
|
|
45
|
+
"client": "WEB",
|
|
46
|
+
"filter": f"""(MARKET="全部")(DATETIME='{"-".join([date[:4], date[4:6], date[6:]])}')""",
|
|
47
|
+
}
|
|
48
|
+
r = requests.get(url, params=params)
|
|
49
|
+
data_json = r.json()
|
|
50
|
+
total_page = data_json["result"]["pages"]
|
|
51
|
+
big_df = pd.DataFrame()
|
|
52
|
+
for page in range(1, total_page + 1):
|
|
53
|
+
params.update({"pageNumber": page})
|
|
54
|
+
r = requests.get(url, params=params)
|
|
55
|
+
data_json = r.json()
|
|
56
|
+
temp_df = pd.DataFrame(data_json["result"]["data"])
|
|
57
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
|
58
|
+
|
|
59
|
+
big_df.reset_index(inplace=True)
|
|
60
|
+
|
|
61
|
+
big_df["SUSPEND_START_TIME"] = pd.to_datetime(big_df["SUSPEND_START_TIME"], errors="coerce").dt.date
|
|
62
|
+
big_df["SUSPEND_END_TIME"] = pd.to_datetime(
|
|
63
|
+
big_df["SUSPEND_END_TIME"], errors="coerce"
|
|
64
|
+
).dt.date
|
|
65
|
+
|
|
66
|
+
big_df["SUSPEND_START_DATE"] = pd.to_datetime(
|
|
67
|
+
big_df["SUSPEND_START_DATE"], errors="coerce"
|
|
68
|
+
).dt.date
|
|
69
|
+
big_df["PREDICT_RESUME_DATE"] = pd.to_datetime(
|
|
70
|
+
big_df["PREDICT_RESUME_DATE"], errors="coerce"
|
|
71
|
+
).dt.date
|
|
72
|
+
|
|
73
|
+
big_df = big_df[['index', 'SECURITY_CODE', 'SECURITY_NAME_ABBR', 'SUSPEND_START_TIME',
|
|
74
|
+
'SUSPEND_END_TIME', 'SUSPEND_EXPIRE', 'SUSPEND_REASON', 'TRADE_MARKET',
|
|
75
|
+
'SUSPEND_START_DATE',
|
|
76
|
+
'PREDICT_RESUME_DATE'
|
|
77
|
+
]]
|
|
78
|
+
|
|
79
|
+
return big_df
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def get_stock_tfp_by_day(str_day):
|
|
83
|
+
stock_tfp_em_df = stock_tfp_em(date_handle_util.no_slash_date(str_day))
|
|
84
|
+
stock_tfp_em_df = stock_tfp_em_df.rename(
|
|
85
|
+
columns={'index': 'index',
|
|
86
|
+
'SECURITY_CODE': 'symbol',
|
|
87
|
+
'SECURITY_NAME_ABBR': 'name',
|
|
88
|
+
'SUSPEND_START_TIME': 'sus_begin_time',
|
|
89
|
+
'SUSPEND_END_TIME': 'sus_end_time',
|
|
90
|
+
|
|
91
|
+
'SUSPEND_START_DATE': 'sus_begin_date',
|
|
92
|
+
'PREDICT_RESUME_DATE': 'resume_time',
|
|
93
|
+
|
|
94
|
+
'SUSPEND_EXPIRE': 'sus_period',
|
|
95
|
+
'SUSPEND_REASON': 'sus_reason',
|
|
96
|
+
'TRADE_MARKET': 'market',
|
|
97
|
+
|
|
98
|
+
})
|
|
99
|
+
return stock_tfp_em_df
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# 获取停牌股票列表
|
|
103
|
+
@lru_cache(maxsize=None)
|
|
104
|
+
def get_stock_tfp_symbol_list_by_day(str_day):
|
|
105
|
+
try:
|
|
106
|
+
stock_tfp_em_df = get_stock_tfp_by_day(str_day)
|
|
107
|
+
if data_frame_util.is_not_empty(stock_tfp_em_df):
|
|
108
|
+
return list(stock_tfp_em_df['symbol'])
|
|
109
|
+
else:
|
|
110
|
+
return ['666666']
|
|
111
|
+
|
|
112
|
+
except BaseException as e:
|
|
113
|
+
logger.error("获取停牌信息异常:{}", e)
|
|
114
|
+
return ['666666']
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
@lru_cache(maxsize=None)
|
|
118
|
+
def get_stock_tfp_symbol_from_db(str_day):
|
|
119
|
+
try:
|
|
120
|
+
query = {'str_day': str_day}
|
|
121
|
+
stock_tfp_df = mongodb_util.find_query_data(db_name_constant.STOCK_TFP_INFO, query)
|
|
122
|
+
if data_frame_util.is_not_empty(stock_tfp_df):
|
|
123
|
+
return list(stock_tfp_df['symbol'])
|
|
124
|
+
else:
|
|
125
|
+
return ['666666']
|
|
126
|
+
except BaseException as e:
|
|
127
|
+
logger.error("获取停牌信息异常:{}", e)
|
|
128
|
+
return ['666666']
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
if __name__ == '__main__':
|
|
132
|
+
get_stock_tfp_symbol_list_by_day('2025-06-21')
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
file_path = os.path.abspath(__file__)
|
|
5
|
-
end = file_path.index('mns') + 16
|
|
6
|
-
project_path = file_path[0:end]
|
|
7
|
-
sys.path.append(project_path)
|
|
8
|
-
import akshare as ak
|
|
9
|
-
import mns_common.utils.date_handle_util as date_handle_util
|
|
10
|
-
from loguru import logger
|
|
11
|
-
import mns_common.utils.data_frame_util as data_frame_util
|
|
12
|
-
from functools import lru_cache
|
|
13
|
-
from mns_common.db.MongodbUtil import MongodbUtil
|
|
14
|
-
import mns_common.constant.db_name_constant as db_name_constant
|
|
15
|
-
|
|
16
|
-
mongodb_util = MongodbUtil('27017')
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def get_stock_tfp_by_day(str_day):
|
|
20
|
-
stock_tfp_em_df = ak.stock_tfp_em(date_handle_util.no_slash_date(str_day))
|
|
21
|
-
stock_tfp_em_df = stock_tfp_em_df.rename(
|
|
22
|
-
columns={'序号': 'index',
|
|
23
|
-
'代码': 'symbol',
|
|
24
|
-
'名称': 'name',
|
|
25
|
-
'停牌时间': 'sus_begin_time',
|
|
26
|
-
'停牌截止时间': 'sus_end_time',
|
|
27
|
-
'停牌截止时间': 'sus_end_time',
|
|
28
|
-
'停牌期限': 'sus_period',
|
|
29
|
-
'停牌原因': 'sus_reason',
|
|
30
|
-
'所属市场': 'market',
|
|
31
|
-
'预计复牌时间': 'resume_time'
|
|
32
|
-
})
|
|
33
|
-
return stock_tfp_em_df
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
# 获取停牌股票列表
|
|
37
|
-
@lru_cache(maxsize=None)
|
|
38
|
-
def get_stock_tfp_symbol_list_by_day(str_day):
|
|
39
|
-
try:
|
|
40
|
-
stock_tfp_em_df = get_stock_tfp_by_day(str_day)
|
|
41
|
-
if data_frame_util.is_not_empty(stock_tfp_em_df):
|
|
42
|
-
return list(stock_tfp_em_df['symbol'])
|
|
43
|
-
else:
|
|
44
|
-
return ['666666']
|
|
45
|
-
|
|
46
|
-
except BaseException as e:
|
|
47
|
-
logger.error("获取停牌信息异常:{}", e)
|
|
48
|
-
return ['666666']
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@lru_cache(maxsize=None)
|
|
52
|
-
def get_stock_tfp_symbol_from_db(str_day):
|
|
53
|
-
try:
|
|
54
|
-
query = {'str_day': str_day}
|
|
55
|
-
stock_tfp_df = mongodb_util.find_query_data(db_name_constant.STOCK_TFP_INFO, query)
|
|
56
|
-
if data_frame_util.is_not_empty(stock_tfp_df):
|
|
57
|
-
return list(stock_tfp_df['symbol'])
|
|
58
|
-
else:
|
|
59
|
-
return ['666666']
|
|
60
|
-
except BaseException as e:
|
|
61
|
-
logger.error("获取停牌信息异常:{}", e)
|
|
62
|
-
return ['666666']
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_debt_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_a_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_a_v2_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_hk_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/em/real_time/east_money_stock_us_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/common/kpl_common_field_constant.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/selection/kpl_selection_plate_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/symbol/kpl_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/kpl/symbol/symbol_his_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/company/ths_company_announce_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/company/ths_company_info_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/app/ths_concept_detail_app.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/app/ths_concept_index_app.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_common_js_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_company_info_web.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_concept_detail_web.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/concept/web/ths_concept_index_web.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/api/ths/self_choose/ths_self_choose_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/classify/symbol_classify_api.py
RENAMED
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/classify/symbol_classify_param.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/company/company_common_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/cookie/cookie_info_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/em/em_real_time_quotes_api.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/exception/ExceptionMonitor.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/industry/ths_industry_index_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/k_line/patterns/pattern_Enum.py
RENAMED
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/price/trade_price_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/self_choose/black_list_service_api.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mns_common-1.4.0.4 → mns_common-1.4.0.5}/mns_common/component/task/real_time_data_sync_check.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|