chinadata 0.1.6__py3-none-any.whl → 0.1.7__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.
chinadata/ca_data.py CHANGED
@@ -41,7 +41,7 @@ class pro_api:
41
41
  pd.DataFrame: A DataFrame containing the fetched stock data.
42
42
  """
43
43
  # url="http://127.0.0.1:9002/tq"
44
- url = "http://120.53.122.167:9002/tq"
44
+ url = "http://59.110.217.205:9002/tq"
45
45
 
46
46
  params = {
47
47
  'token': get_token(),
@@ -52,7 +52,6 @@ class pro_api:
52
52
 
53
53
 
54
54
 
55
-
56
55
  response = requests.post(url, json=params)
57
56
 
58
57
  if response.status_code == 200:
@@ -69,8 +68,6 @@ class pro_api:
69
68
  raise ValueError("数据获取错误",e)
70
69
 
71
70
  else:
72
- # print(f"Failed to fetch data. Status code: {response.status_code}")
73
- # print(response.text)
74
71
  raise ValueError("数据获取错误",response.status_code,response.text)
75
72
 
76
73
 
@@ -443,10 +440,11 @@ class pro_api:
443
440
 
444
441
  def index_global(self, api_name='index_global', **kwargs):
445
442
  return self.query(token=self.token, api_name=api_name, **kwargs)
446
-
447
443
  def idx_factor_pro(self, api_name='idx_factor_pro', **kwargs):
448
444
  return self.query(token=self.token, api_name=api_name, **kwargs)
449
445
 
446
+
447
+
450
448
  def ncov_global(self, api_name='ncov_global', **kwargs):
451
449
  return self.query(token=self.token, api_name=api_name, **kwargs)
452
450
 
@@ -776,7 +774,7 @@ def pro_bar(ts_code='', api=None, start_date='', end_date='', freq='D', asset='E
776
774
 
777
775
  """
778
776
  # url = "http://127.0.0.1:9002/tp"
779
- url = "http://120.53.122.167:9002/tp"
777
+ url = "http://59.110.217.205:9002/tp"
780
778
 
781
779
  params = {
782
780
  'token':get_token(),
chinadata/example.py CHANGED
@@ -4,22 +4,30 @@
4
4
  pip install chinadata
5
5
 
6
6
  """
7
+
8
+
7
9
  #2、
8
10
  import chinadata.ca_data as ts
9
11
 
10
12
 
11
- ts.set_token('5821074c7482c04e8d39da5c8313')
12
- pro=ts.pro_api('d55821074c7482c04e8d39da5c8313')
13
+ ts.set_token('3a9e334456c8405c00d013914953')
14
+ pro=ts.pro_api('a9e334456c8405c00d013914953')
15
+
16
+
17
+
18
+ # 你要测量的代码块
13
19
 
14
20
  # #查询当前所有正常上市交易的股票列表
15
21
  data = pro.stock_basic(exchange='', list_status='L', fields='ts_code,symbol,name,area,industry,list_date')
16
22
  print(data)
17
- #
23
+
18
24
  #
19
25
  df = ts.pro_bar(ts_code='000007.SZ', start_date='20240817', end_date='20241215')
20
26
  print(df)
21
27
 
28
+
22
29
  df = pro.daily(ts_code='000001.SZ', start_date='20000701', end_date='20180718')
23
30
  print(df)
24
31
 
25
32
 
33
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: chinadata
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Author: xc
5
5
  Author-email: utyu@gmail.com
6
6
  Platform: any
@@ -0,0 +1,7 @@
1
+ chinadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ chinadata/ca_data.py,sha256=1A-SESKt7NZAb55zXWhBTLQvwV8UBHv1SbiFAIk4YHE,33733
3
+ chinadata/example.py,sha256=T0U_8u9NhhqoMlTHOSgODsHeSEryGnz6Ze-EpvOwl8k,580
4
+ chinadata-0.1.7.dist-info/METADATA,sha256=sCFrF7hlVHAN_wpADGcgFuXoe1Y6INttwiBvdj3QQso,161
5
+ chinadata-0.1.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
6
+ chinadata-0.1.7.dist-info/top_level.txt,sha256=Ptxvu9uzRHP4kVGRf413KuwSvsY2mk_KgQJ6ssWwisU,10
7
+ chinadata-0.1.7.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- chinadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- chinadata/ca_data.py,sha256=A16HYV3Et5alJIWdklWvUuP6cvlf9sIcgIRwgzJZldo,33850
3
- chinadata/example.py,sha256=xg-x7vXppzXxHyyXE2mDqeD7fs3KOj4d3IV2F6dxdtE,550
4
- chinadata-0.1.6.dist-info/METADATA,sha256=KFHVyE3yFQtU-qezEHw2g1ealoQ8T6SqiWE9G9ZXc04,161
5
- chinadata-0.1.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
6
- chinadata-0.1.6.dist-info/top_level.txt,sha256=Ptxvu9uzRHP4kVGRf413KuwSvsY2mk_KgQJ6ssWwisU,10
7
- chinadata-0.1.6.dist-info/RECORD,,