mns-common 1.3.7.0__py3-none-any.whl → 1.3.7.3__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/api/proxies/liu_guan_proxy_api.py +1 -1
- mns_common/component/proxies/proxy_common_api.py +1 -1
- {mns_common-1.3.7.0.dist-info → mns_common-1.3.7.3.dist-info}/METADATA +1 -1
- {mns_common-1.3.7.0.dist-info → mns_common-1.3.7.3.dist-info}/RECORD +7 -7
- {mns_common-1.3.7.0.dist-info → mns_common-1.3.7.3.dist-info}/WHEEL +0 -0
- {mns_common-1.3.7.0.dist-info → mns_common-1.3.7.3.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
|
# 北向/南向资金状况 北向已经停止
|
|
@@ -48,7 +48,7 @@ def generate_proxy_ip(minutes):
|
|
|
48
48
|
secret = list(stock_account_info['account'])[0]
|
|
49
49
|
|
|
50
50
|
now_date = datetime.datetime.now()
|
|
51
|
-
time_to_add = datetime.timedelta(minutes=minutes - 1, seconds=
|
|
51
|
+
time_to_add = datetime.timedelta(minutes=minutes - 1, seconds=50)
|
|
52
52
|
new_date = now_date + time_to_add
|
|
53
53
|
str_now_date = new_date.strftime('%Y-%m-%d %H:%M:%S')
|
|
54
54
|
|
|
@@ -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
|
|
@@ -43,7 +43,7 @@ mns_common/api/kpl/symbol/symbol_his_quotes_api.py,sha256=r3n7U2F7MZUDZFQgnx-JI4
|
|
|
43
43
|
mns_common/api/msg/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
44
44
|
mns_common/api/msg/push_msg_api.py,sha256=z8jDqFWygfxnCFFfQp4K-llgg27nRLv7Mx72lOddBH0,1390
|
|
45
45
|
mns_common/api/proxies/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
46
|
-
mns_common/api/proxies/liu_guan_proxy_api.py,sha256=
|
|
46
|
+
mns_common/api/proxies/liu_guan_proxy_api.py,sha256=VASqcWnKyAEmF4UYNY39Jazh45qugVMYblRrdKfQFuE,1923
|
|
47
47
|
mns_common/api/qmt/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
48
48
|
mns_common/api/qmt/qmt_minunte_tick_data.py,sha256=uwSw_AkA9RaD3pXPKzxqi4TKEkpglmFUwtYl9r5E6G8,3019
|
|
49
49
|
mns_common/api/ths/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
@@ -111,7 +111,7 @@ mns_common/component/k_line/patterns/pattern_Enum.py,sha256=bl8cH1H3BWdj_deVO124
|
|
|
111
111
|
mns_common/component/price/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
112
112
|
mns_common/component/price/trade_price_service_api.py,sha256=0loBjbOt__o-ngc2Q4n5lF8_0x2WINRpL-cH1341Uaw,4396
|
|
113
113
|
mns_common/component/proxies/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
114
|
-
mns_common/component/proxies/proxy_common_api.py,sha256=
|
|
114
|
+
mns_common/component/proxies/proxy_common_api.py,sha256=BOcxXuGf_f-uO-7YtvRNxsiOqcZYL1RQc-AN7FfMm4w,2782
|
|
115
115
|
mns_common/component/qmt/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
116
116
|
mns_common/component/qmt/qmt_buy_service.py,sha256=tLTgrSxCcxuMhADRBBrW4ZWR_3MdbMZvvMdH5hbwyJU,7190
|
|
117
117
|
mns_common/component/real_time/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0,163
|
|
@@ -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.3.dist-info/METADATA,sha256=P9-b8pUy5k4E238ZfIv0EB-JRnHA7rqOqXTwNJAKPUA,61
|
|
154
|
+
mns_common-1.3.7.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
155
|
+
mns_common-1.3.7.3.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
156
|
+
mns_common-1.3.7.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|