rquote 0.4.7__py3-none-any.whl → 0.4.8__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.
@@ -16,7 +16,13 @@ class HKStockMarket(Market):
16
16
  def normalize_symbol(self, symbol: str) -> str:
17
17
  """标准化港股代码"""
18
18
  if not symbol.startswith('hk'):
19
- return 'hk' + symbol
19
+ symbol = 'hk' + symbol
20
+
21
+ # 如果hk后面只有4位数字,则添加一个0
22
+ if symbol.startswith('hk') and len(symbol) == 6:
23
+ # hk + 4位数字 = 6位,需要补0变成 hk + 0 + 4位数字
24
+ return 'hk0' + symbol[2:]
25
+
20
26
  return symbol
21
27
 
22
28
  def _fetch_price_data(self, symbol: str, sdate: str = '', edate: str = '',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rquote
3
- Version: 0.4.7
3
+ Version: 0.4.8
4
4
  Summary: Mostly day quotes of cn/hk/us/fund/future markets, side with quote list fetch
5
5
  Requires-Python: >=3.9.0
6
6
  Description-Content-Type: text/markdown
@@ -18,7 +18,7 @@ Requires-Dist: duckdb>=0.9.0; extra == "persistent"
18
18
 
19
19
  ## 版本信息
20
20
 
21
- 当前版本:**0.4.7**
21
+ 当前版本:**0.4.8**
22
22
 
23
23
  ## 主要特性
24
24
 
@@ -575,30 +575,8 @@ python -m pytest tests/test_api.py
575
575
  4. **网络要求**: 部分功能需要网络连接,请确保网络畅通
576
576
  5. **缓存使用**: 建议使用缓存机制减少网络请求,提升性能
577
577
 
578
- ## 更新日志
579
-
580
- ### v0.3.5 (2024)
581
- - 修复Critical Bugs
582
- - 新增配置管理模块
583
- - 新增异常处理体系
584
- - 新增缓存抽象层
585
- - 改进HTTP客户端
586
- - 新增单元测试
587
- - 完善文档
588
-
589
- ### v0.3.4
590
- - 初始版本
591
578
 
592
579
  ## 贡献
593
580
 
594
581
  欢迎提交Issue和Pull Request!
595
582
 
596
- ## 许可证
597
-
598
- Copyright (c) 2021 Roi ZHAO
599
-
600
- ## 相关文档
601
-
602
- - [架构改进建议](ARCHITECTURE_IMPROVEMENTS.md)
603
- - [重构代码示例](REFACTORING_EXAMPLES.md)
604
- - [快速修复清单](QUICK_FIXES.md)
@@ -23,7 +23,7 @@ rquote/markets/base.py,sha256=Oe-taKEdDCfaFGCnALB-gunSFMhe_OD736bVv7OBGHU,16433
23
23
  rquote/markets/cn_stock.py,sha256=MQj_mNADY50Hc3IPviQi51ixMI_XKZXiuYHo6k1PXCI,17150
24
24
  rquote/markets/factory.py,sha256=4Txpuok0LBOLT_vAiIU-NslwVnYF7sKHCdlacAboxpo,2875
25
25
  rquote/markets/future.py,sha256=yGMyUu9Fv75jbzPbvW6_36otEeebSij7vnzow_zyEn8,7358
26
- rquote/markets/hk_stock.py,sha256=AhRJpWp027ACew9ogxkVCJXbqbYQ1AkbFwDJccXbvAs,1183
26
+ rquote/markets/hk_stock.py,sha256=jB1TbQwskcRHMWUcZE9-6k4er6UsL-7vGOaQtU1_6GM,1434
27
27
  rquote/markets/us_stock.py,sha256=GT4IxCMTgxb0JSkDa6acZ6PpHLhK6lrskI0ftiYxGCA,2603
28
28
  rquote/parsers/__init__.py,sha256=q4g-FgpzxKBPfhJiQH3B5MEeZWUIXlyre-vAnOnfYmA,110
29
29
  rquote/parsers/kline.py,sha256=g6k8W76-4hpYsuBgvwmb5G6ZkzHOJDX-JrVVXYksw4c,4020
@@ -33,7 +33,7 @@ rquote/utils/helpers.py,sha256=V07n9BtRS8bEJH023Kca78-unk7iD3B9hn2UjELetYs,354
33
33
  rquote/utils/http.py,sha256=X0Alhnu0CNqyQeOt6ivUWmh2XwrWxXd2lSpQOKDdnzw,3249
34
34
  rquote/utils/logging.py,sha256=fs2YF1Srux4LLTdk_Grjm5g1f4mzewI38VVSAI82goA,1471
35
35
  rquote/utils/web.py,sha256=I8_pcThW6VUvahuRHdtp32iZwr85hEt1hB6TgznMy_U,3854
36
- rquote-0.4.7.dist-info/METADATA,sha256=Ugxawwms3YT8209UMnAaPwxZ20L2_fc2SmIlHQPV4YA,14898
37
- rquote-0.4.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- rquote-0.4.7.dist-info/top_level.txt,sha256=CehAiaZx7Fo8HGoV2zd5GhILUW1jQEN8YS-cWMlrK9Y,7
39
- rquote-0.4.7.dist-info/RECORD,,
36
+ rquote-0.4.8.dist-info/METADATA,sha256=qZGWiccqGzatqJTn5pAgAvzk3OHIj2QqCJAziMuxFQU,14478
37
+ rquote-0.4.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
+ rquote-0.4.8.dist-info/top_level.txt,sha256=CehAiaZx7Fo8HGoV2zd5GhILUW1jQEN8YS-cWMlrK9Y,7
39
+ rquote-0.4.8.dist-info/RECORD,,
File without changes