mns-common 1.3.7.2__py3-none-any.whl → 1.3.7.4__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 mns-common might be problematic. Click here for more details.
- mns_common/api/em/real_time/east_money_stock_a_api.py +70 -66
- mns_common/constant/db_name_constant.py +3 -0
- {mns_common-1.3.7.2.dist-info → mns_common-1.3.7.4.dist-info}/METADATA +1 -1
- {mns_common-1.3.7.2.dist-info → mns_common-1.3.7.4.dist-info}/RECORD +6 -6
- {mns_common-1.3.7.2.dist-info → mns_common-1.3.7.4.dist-info}/WHEEL +0 -0
- {mns_common-1.3.7.2.dist-info → mns_common-1.3.7.4.dist-info}/top_level.txt +0 -0
|
@@ -12,6 +12,7 @@ import pandas as pd
|
|
|
12
12
|
from concurrent.futures import ThreadPoolExecutor
|
|
13
13
|
import datetime
|
|
14
14
|
from loguru import logger
|
|
15
|
+
import mns_common.utils.data_frame_util as data_frame_util
|
|
15
16
|
|
|
16
17
|
# 最大返回条数
|
|
17
18
|
max_number = 5800
|
|
@@ -160,72 +161,75 @@ def rename_real_time_quotes_df(temp_df):
|
|
|
160
161
|
"f211": "buy_1_num",
|
|
161
162
|
"f212": "sell_1_num"
|
|
162
163
|
})
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
164
|
+
if data_frame_util.is_empty(temp_df):
|
|
165
|
+
return pd.DataFrame()
|
|
166
|
+
else:
|
|
167
|
+
temp_df.loc[temp_df['buy_1_num'] == '-', 'buy_1_num'] = 0
|
|
168
|
+
temp_df.loc[temp_df['sell_1_num'] == '-', 'sell_1_num'] = 0
|
|
169
|
+
temp_df.loc[temp_df['up_speed_05'] == '-', 'up_speed_05'] = 0
|
|
170
|
+
temp_df.loc[temp_df['up_speed'] == '-', 'up_speed'] = 0
|
|
171
|
+
temp_df.loc[temp_df['average_price'] == '-', 'average_price'] = 0
|
|
172
|
+
temp_df.loc[temp_df['wei_bi'] == '-', 'wei_bi'] = 0
|
|
173
|
+
temp_df.loc[temp_df['yesterday_price'] == '-', 'yesterday_price'] = 0
|
|
174
|
+
temp_df.loc[temp_df['now_price'] == '-', 'now_price'] = 0
|
|
175
|
+
temp_df.loc[temp_df['chg'] == '-', 'chg'] = 0
|
|
176
|
+
temp_df.loc[temp_df['volume'] == '-', 'volume'] = 0
|
|
177
|
+
temp_df.loc[temp_df['amount'] == '-', 'amount'] = 0
|
|
178
|
+
temp_df.loc[temp_df['exchange'] == '-', 'exchange'] = 0
|
|
179
|
+
temp_df.loc[temp_df['quantity_ratio'] == '-', 'quantity_ratio'] = 0
|
|
180
|
+
temp_df.loc[temp_df['high'] == '-', 'high'] = 0
|
|
181
|
+
temp_df.loc[temp_df['low'] == '-', 'low'] = 0
|
|
182
|
+
temp_df.loc[temp_df['open'] == '-', 'open'] = 0
|
|
183
|
+
temp_df.loc[temp_df['total_mv'] == '-', 'total_mv'] = 0
|
|
184
|
+
temp_df.loc[temp_df['flow_mv'] == '-', 'flow_mv'] = 0
|
|
185
|
+
temp_df.loc[temp_df['inner_disk'] == '-', 'inner_disk'] = 0
|
|
186
|
+
temp_df.loc[temp_df['outer_disk'] == '-', 'outer_disk'] = 0
|
|
187
|
+
temp_df.loc[temp_df['today_main_net_inflow_ratio'] == '-', 'today_main_net_inflow_ratio'] = 0
|
|
188
|
+
temp_df.loc[temp_df['today_main_net_inflow'] == '-', 'today_main_net_inflow'] = 0
|
|
189
|
+
temp_df.loc[temp_df['super_large_order_net_inflow'] == '-', 'super_large_order_net_inflow'] = 0
|
|
190
|
+
temp_df.loc[temp_df['super_large_order_net_inflow_ratio'] == '-', 'super_large_order_net_inflow_ratio'] = 0
|
|
191
|
+
temp_df.loc[temp_df['large_order_net_inflow'] == '-', 'large_order_net_inflow'] = 0
|
|
192
|
+
# temp_df.loc[temp_df['medium_order_net_inflow'] == '-', 'medium_order_net_inflow'] = 0
|
|
193
|
+
# temp_df.loc[temp_df['small_order_net_inflow'] == '-', 'small_order_net_inflow'] = 0
|
|
194
|
+
|
|
195
|
+
temp_df["list_date"] = pd.to_numeric(temp_df["list_date"], errors="coerce")
|
|
196
|
+
temp_df["wei_bi"] = pd.to_numeric(temp_df["wei_bi"], errors="coerce")
|
|
197
|
+
temp_df["average_price"] = pd.to_numeric(temp_df["average_price"], errors="coerce")
|
|
198
|
+
temp_df["yesterday_price"] = pd.to_numeric(temp_df["yesterday_price"], errors="coerce")
|
|
199
|
+
temp_df["now_price"] = pd.to_numeric(temp_df["now_price"], errors="coerce")
|
|
200
|
+
temp_df["chg"] = pd.to_numeric(temp_df["chg"], errors="coerce")
|
|
201
|
+
temp_df["volume"] = pd.to_numeric(temp_df["volume"], errors="coerce")
|
|
202
|
+
temp_df["amount"] = pd.to_numeric(temp_df["amount"], errors="coerce")
|
|
203
|
+
temp_df["exchange"] = pd.to_numeric(temp_df["exchange"], errors="coerce")
|
|
204
|
+
temp_df["quantity_ratio"] = pd.to_numeric(temp_df["quantity_ratio"], errors="coerce")
|
|
205
|
+
temp_df["high"] = pd.to_numeric(temp_df["high"], errors="coerce")
|
|
206
|
+
temp_df["low"] = pd.to_numeric(temp_df["low"], errors="coerce")
|
|
207
|
+
temp_df["open"] = pd.to_numeric(temp_df["open"], errors="coerce")
|
|
208
|
+
temp_df["total_mv"] = pd.to_numeric(temp_df["total_mv"], errors="coerce")
|
|
209
|
+
temp_df["flow_mv"] = pd.to_numeric(temp_df["flow_mv"], errors="coerce")
|
|
210
|
+
temp_df["outer_disk"] = pd.to_numeric(temp_df["outer_disk"], errors="coerce")
|
|
211
|
+
temp_df["inner_disk"] = pd.to_numeric(temp_df["inner_disk"], errors="coerce")
|
|
212
|
+
temp_df["today_main_net_inflow"] = pd.to_numeric(temp_df["today_main_net_inflow"], errors="coerce")
|
|
213
|
+
temp_df["super_large_order_net_inflow"] = pd.to_numeric(temp_df["super_large_order_net_inflow"],
|
|
214
|
+
errors="coerce")
|
|
215
|
+
temp_df["super_large_order_net_inflow_ratio"] = pd.to_numeric(temp_df["super_large_order_net_inflow_ratio"],
|
|
216
|
+
errors="coerce")
|
|
217
|
+
temp_df["large_order_net_inflow"] = pd.to_numeric(temp_df["large_order_net_inflow"],
|
|
218
|
+
errors="coerce")
|
|
219
|
+
# temp_df["medium_order_net_inflow"] = pd.to_numeric(temp_df["medium_order_net_inflow"],
|
|
220
|
+
# errors="coerce")
|
|
221
|
+
# temp_df["small_order_net_inflow"] = pd.to_numeric(temp_df["small_order_net_inflow"], errors="coerce")
|
|
222
|
+
|
|
223
|
+
# 大单比例
|
|
224
|
+
temp_df['large_order_net_inflow_ratio'] = round((temp_df['large_order_net_inflow'] / temp_df['amount']) * 100,
|
|
225
|
+
2)
|
|
226
|
+
|
|
227
|
+
# 外盘是内盘倍数
|
|
228
|
+
temp_df['disk_ratio'] = round((temp_df['outer_disk'] - temp_df['inner_disk']) / temp_df['inner_disk'], 2)
|
|
229
|
+
# 只有外盘没有内盘
|
|
230
|
+
temp_df.loc[temp_df["inner_disk"] == 0, ['disk_ratio']] = 1688
|
|
231
|
+
temp_df = temp_df.sort_values(by=['chg'], ascending=False)
|
|
232
|
+
return temp_df
|
|
229
233
|
|
|
230
234
|
|
|
231
235
|
# 北向/南向资金状况 北向已经停止
|
|
@@ -15,7 +15,7 @@ mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py,sha256=hitzJuMwy5I
|
|
|
15
15
|
mns_common/api/em/real_time/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
16
16
|
mns_common/api/em/real_time/east_money_debt_api.py,sha256=jMvMZtlrDfExl_4jZ1hepHX8rUoeVLoLSOIhRBjkUGk,14753
|
|
17
17
|
mns_common/api/em/real_time/east_money_etf_api.py,sha256=tCyH4fNx-KfVRFuNGkgM8d_xkvR0oAfr8T3e7_XrjTM,14414
|
|
18
|
-
mns_common/api/em/real_time/east_money_stock_a_api.py,sha256=
|
|
18
|
+
mns_common/api/em/real_time/east_money_stock_a_api.py,sha256=twwrpwk6bvLuYeZRdF6QUG8w8J1EWHIgEJF1yvj1CDw,12722
|
|
19
19
|
mns_common/api/em/real_time/east_money_stock_a_v2_api.py,sha256=PXArsNK7IDQB1PoMMs97J6H5EtBgnZPEdUGhqk1VV4A,14505
|
|
20
20
|
mns_common/api/em/real_time/east_money_stock_hk_api.py,sha256=TEUx20NxUqdfujwT4pVb_hYJN5LCosFdkoQJr4ftZWU,15018
|
|
21
21
|
mns_common/api/em/real_time/east_money_stock_us_api.py,sha256=CYrhbNC-vvbwy43hhByVuA2IeJU_yzwZoxq3aCz1uY0,11597
|
|
@@ -131,7 +131,7 @@ mns_common/component/zt/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3Hi
|
|
|
131
131
|
mns_common/component/zt/zt_common_service_api.py,sha256=6pHRLLJjKcLLBA-xXkAU8SE6DZ5dgVFBRVjJmhkL0II,11945
|
|
132
132
|
mns_common/constant/__init__.py,sha256=xu36nA6MJTauswUWPfKIKH0E-lpOAHTw2TL5QI_6TeY,165
|
|
133
133
|
mns_common/constant/black_list_classify_enum.py,sha256=I8U_DcltzYvlWjgn-TFLImgVgPuO0lxMnEJAQJBljdo,3995
|
|
134
|
-
mns_common/constant/db_name_constant.py,sha256=
|
|
134
|
+
mns_common/constant/db_name_constant.py,sha256=Lw1QSN_N1NZMTPUbl5B8HW9zFiyJUkPWHxCZtFyrP-E,4623
|
|
135
135
|
mns_common/constant/east_money_stock_api.py,sha256=mW0b8sEgkf8WJtars2frOQYzsWgjIl4FDYEwcCcCSZY,7557
|
|
136
136
|
mns_common/constant/extra_income_db_name.py,sha256=AsIO1CtcVRq9k7TKtjFA1KzuL_jvAw2hA_Uq44wQL7o,1198
|
|
137
137
|
mns_common/constant/price_enum.py,sha256=nhcPxk0AFdQAp8IsNr5EP9xURLqqJuSl6ljIzTp7Wyo,1093
|
|
@@ -150,7 +150,7 @@ mns_common/utils/date_handle_util.py,sha256=XS-MyA8_7k35LOCFAYOHgVcVkMft_Kc4Wa9U
|
|
|
150
150
|
mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
|
|
151
151
|
mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
|
|
152
152
|
mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
|
|
153
|
-
mns_common-1.3.7.
|
|
154
|
-
mns_common-1.3.7.
|
|
155
|
-
mns_common-1.3.7.
|
|
156
|
-
mns_common-1.3.7.
|
|
153
|
+
mns_common-1.3.7.4.dist-info/METADATA,sha256=hFuzVmWbd1-cvAVPH0XZQM4afL9To0CG3Xp0n8sAiD4,61
|
|
154
|
+
mns_common-1.3.7.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
155
|
+
mns_common-1.3.7.4.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
156
|
+
mns_common-1.3.7.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|