lixinger-python 0.3.2__tar.gz → 0.3.4__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.
Files changed (185) hide show
  1. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.claude/settings.local.json +4 -1
  2. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/PKG-INFO +1 -1
  3. lixinger_python-0.3.4/examples/dividend_example.py +20 -0
  4. lixinger_python-0.3.4/lixinger/api/cn/company/candlestick.py +113 -0
  5. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/dividend.py +2 -0
  6. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/pyproject.toml +1 -1
  7. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/api/cn/company/test_dividend.py +128 -1
  8. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_candlestick.py +3 -6
  9. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_integration.py +0 -1
  10. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/uv.lock +1 -1
  11. lixinger_python-0.3.2/lixinger/api/cn/company/candlestick.py +0 -76
  12. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.env.example +0 -0
  13. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.github/copilot-instructions.md +0 -0
  14. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.github/workflows/README.md +0 -0
  15. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.github/workflows/pr-checks.yml +0 -0
  16. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.gitignore +0 -0
  17. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.pre-commit-config.yaml +0 -0
  18. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.python-version +0 -0
  19. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/.ruff.toml +0 -0
  20. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/ADD_NEW_API_QUICK.md +0 -0
  21. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/AGENTS.md +0 -0
  22. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/CHANGELOG.md +0 -0
  23. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/CLAUDE.md +0 -0
  24. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/DOCS.md +0 -0
  25. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/LICENSE +0 -0
  26. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/MANIFEST.in +0 -0
  27. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/PUBLISHING.md +0 -0
  28. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/README.md +0 -0
  29. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/SETUP.md +0 -0
  30. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/codecov.yml +0 -0
  31. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/client.md +0 -0
  32. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/announcement.md +0 -0
  33. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/candlestick.md +0 -0
  34. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/company.md +0 -0
  35. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/dividend.md +0 -0
  36. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/equity_change.md +0 -0
  37. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/fs/non_financial.md +0 -0
  38. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/fundamental/bank.md +0 -0
  39. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/fundamental/insurance.md +0 -0
  40. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/fundamental/non_financial.md +0 -0
  41. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/fundamental/other_financial.md +0 -0
  42. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/fundamental/security.md +0 -0
  43. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/indices.md +0 -0
  44. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/company/profile.md +0 -0
  45. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/fund/announcement.md +0 -0
  46. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/fund/asset_combination.md +0 -0
  47. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/fund/asset_industry_combination.md +0 -0
  48. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/fund/candlestick.md +0 -0
  49. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/fund/fund.md +0 -0
  50. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/fund/profile.md +0 -0
  51. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/fund/shareholdings.md +0 -0
  52. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/index/candlestick.md +0 -0
  53. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/index/constituent_weightings.md +0 -0
  54. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/index/constituents.md +0 -0
  55. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/index/drawdown.md +0 -0
  56. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/index/fundamental.md +0 -0
  57. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/index/index.md +0 -0
  58. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/index/tracking_fund.md +0 -0
  59. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/api/overview.md +0 -0
  60. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/development/code-style.md +0 -0
  61. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/development/contributing.md +0 -0
  62. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/development/testing.md +0 -0
  63. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/examples/company.md +0 -0
  64. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/examples/fund.md +0 -0
  65. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/examples/index.md +0 -0
  66. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/getting-started/configuration.md +0 -0
  67. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/getting-started/installation.md +0 -0
  68. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/getting-started/quickstart.md +0 -0
  69. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/docs/index.md +0 -0
  70. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/examples/company_example.py +0 -0
  71. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/examples/company_profile_example.py +0 -0
  72. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/examples/index_constituent_weightings_example.py +0 -0
  73. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/examples/index_constituents_example.py +0 -0
  74. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/examples/index_info_example.py +0 -0
  75. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/fund_response.json +0 -0
  76. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/__init__.py +0 -0
  77. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/__init__.py +0 -0
  78. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/base.py +0 -0
  79. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/__init__.py +0 -0
  80. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/__init__.py +0 -0
  81. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/announcement.py +0 -0
  82. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/company.py +0 -0
  83. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/dividend.py +0 -0
  84. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/equity_change.py +0 -0
  85. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fs/__init__.py +0 -0
  86. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fs/non_financial.py +0 -0
  87. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fundamental/__init__.py +0 -0
  88. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fundamental/bank.py +0 -0
  89. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fundamental/insurance.py +0 -0
  90. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fundamental/non_financial.py +0 -0
  91. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fundamental/other_financial.py +0 -0
  92. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/fundamental/security.py +0 -0
  93. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/indices.py +0 -0
  94. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/namespace.py +0 -0
  95. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/company/profile.py +0 -0
  96. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/__init__.py +0 -0
  97. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/announcement.py +0 -0
  98. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/asset_combination.py +0 -0
  99. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/asset_industry_combination.py +0 -0
  100. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/candlestick.py +0 -0
  101. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/fund.py +0 -0
  102. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/profile.py +0 -0
  103. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/fund/shareholdings.py +0 -0
  104. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/__init__.py +0 -0
  105. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/candlestick.py +0 -0
  106. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/constituent_weightings.py +0 -0
  107. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/constituents.py +0 -0
  108. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/drawdown.py +0 -0
  109. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/fundamental.py +0 -0
  110. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/index.py +0 -0
  111. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/namespace.py +0 -0
  112. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/api/cn/index/tracking_fund.py +0 -0
  113. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/client.py +0 -0
  114. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/config.py +0 -0
  115. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/exceptions.py +0 -0
  116. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/__init__.py +0 -0
  117. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/__init__.py +0 -0
  118. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/__init__.py +0 -0
  119. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/announcement.py +0 -0
  120. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/candlestick.py +0 -0
  121. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/company.py +0 -0
  122. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/equity_change.py +0 -0
  123. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fs/__init__.py +0 -0
  124. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fs/non_financial.py +0 -0
  125. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fundamental/__init__.py +0 -0
  126. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fundamental/bank.py +0 -0
  127. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fundamental/insurance.py +0 -0
  128. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fundamental/non_financial.py +0 -0
  129. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fundamental/other_financial.py +0 -0
  130. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/fundamental/security.py +0 -0
  131. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/company/indices.py +0 -0
  132. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/__init__.py +0 -0
  133. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/announcement.py +0 -0
  134. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/asset_combination.py +0 -0
  135. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/asset_industry_combination.py +0 -0
  136. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/candlestick.py +0 -0
  137. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/fund.py +0 -0
  138. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/profile.py +0 -0
  139. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/fund/shareholdings.py +0 -0
  140. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/__init__.py +0 -0
  141. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/candlestick.py +0 -0
  142. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/constituent_weightings.py +0 -0
  143. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/constituents.py +0 -0
  144. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/drawdown.py +0 -0
  145. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/fundamental.py +0 -0
  146. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/index.py +0 -0
  147. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/models/cn/index/tracking_fund.py +0 -0
  148. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/py.typed +0 -0
  149. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/utils/__init__.py +0 -0
  150. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/utils/api.py +0 -0
  151. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/utils/dataframe.py +0 -0
  152. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/utils/dict.py +0 -0
  153. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/utils/rate_limiter.py +0 -0
  154. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/lixinger/utils/retry.py +0 -0
  155. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/mkdocs.yml +0 -0
  156. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/mypy.ini +0 -0
  157. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/scripts/explore_api.py +0 -0
  158. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/scripts/generate_docs.py +0 -0
  159. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/scripts/publish.sh +0 -0
  160. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/api/cn/company/test_announcement.py +0 -0
  161. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/api/cn/index/test_constituents.py +0 -0
  162. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/conftest.py +0 -0
  163. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_client.py +0 -0
  164. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_cn_index_candlestick.py +0 -0
  165. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_cn_index_constituent_weightings.py +0 -0
  166. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_company.py +0 -0
  167. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_company_profile.py +0 -0
  168. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_equity_change.py +0 -0
  169. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fund.py +0 -0
  170. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fund_announcement.py +0 -0
  171. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fund_asset_combination.py +0 -0
  172. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fund_asset_industry_combination.py +0 -0
  173. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fund_candlestick.py +0 -0
  174. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fund_profile.py +0 -0
  175. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fund_shareholdings.py +0 -0
  176. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fundamental.py +0 -0
  177. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fundamental_bank.py +0 -0
  178. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_fundamental_security.py +0 -0
  179. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_index.py +0 -0
  180. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_index_constituents.py +0 -0
  181. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_index_drawdown.py +0 -0
  182. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_index_fundamental.py +0 -0
  183. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_indices.py +0 -0
  184. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_non_financial_statements.py +0 -0
  185. {lixinger_python-0.3.2 → lixinger_python-0.3.4}/tests/test_tracking_fund.py +0 -0
@@ -106,7 +106,10 @@
106
106
  "Bash(grep -r \"API Endpoint:\" lixinger/api/cn/company/*.py | head -10)",
107
107
  "Bash(uv run mypy lixinger/api/cn/company/dividend.py)",
108
108
  "Bash(uv run mypy lixinger/models/cn/company/dividend.py lixinger/api/cn/company/dividend.py)",
109
- "Bash(uv run:*)"
109
+ "Bash(uv run:*)",
110
+ "Bash(curl *)",
111
+ "Read(//Users/JianGuo/.claude/plugins/cache/playwright-skill/playwright-skill/4.1.0/skills/playwright-skill/**)",
112
+ "Bash(node run.js ' *)"
110
113
  ]
111
114
  }
112
115
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lixinger-python
3
- Version: 0.3.2
3
+ Version: 0.3.4
4
4
  Summary: Python SDK for Lixinger Financial Data API
5
5
  Project-URL: Homepage, https://www.lixinger.com
6
6
  Project-URL: Documentation, https://www.lixinger.com/open/api/doc
@@ -0,0 +1,20 @@
1
+ import asyncio
2
+
3
+ from lixinger import AsyncLixingerClient
4
+
5
+
6
+ async def main():
7
+ # Method 1: Using the async client with environment variables
8
+ # The API key is ALWAYS loaded from .env file (LIXINGER_API_KEY)
9
+ print("Method 1: Using async client (loads API key from .env)...")
10
+ client = AsyncLixingerClient()
11
+ try:
12
+ print("Fetching company information using client...")
13
+ df = await client.company.dividend.get_dividend(stock_code="000001", start_date="2026-03-01")
14
+ print(df)
15
+ finally:
16
+ await client.close()
17
+
18
+
19
+ if __name__ == "__main__":
20
+ asyncio.run(main())
@@ -0,0 +1,113 @@
1
+ from typing import Any, Literal
2
+
3
+ import pandas as pd
4
+
5
+ from lixinger.api.base import BaseAPI
6
+ from lixinger.models.cn.company import Candlestick
7
+ from lixinger.utils.api import api
8
+ from lixinger.utils.dataframe import get_response_df
9
+
10
+
11
+ class CandlestickAPI(BaseAPI):
12
+ """Candlestick (K-line) data APIs."""
13
+
14
+ async def get_candlestick( # noqa: PLR0913
15
+ self,
16
+ stock_code: str,
17
+ start_date: str,
18
+ end_date: str,
19
+ adjust_type: Literal["ex_rights", "lxr_fc_rights", "fc_rights", "bc_rights"] | None = None,
20
+ adjust_forward_date: str | None = None,
21
+ adjust_backward_date: str | None = None,
22
+ limit: int | None = None,
23
+ ) -> pd.DataFrame:
24
+ """获取K线数据.
25
+
26
+ API Endpoint: /cn/company/candlestick
27
+ API Method: POST
28
+
29
+ Args:
30
+ stock_code: 股票代码
31
+ start_date: 开始日期 (YYYY-MM-DD)
32
+ end_date: 结束日期 (YYYY-MM-DD)
33
+ adjust_type: 复权类型
34
+ - ex_rights: 不复权
35
+ - lxr_fc_rights: 理杏仁前复权
36
+ - fc_rights: 前复权
37
+ - bc_rights: 后复权
38
+ adjust_forward_date: 前复权指定起始时间点 (YYYY-MM-DD),需要与endDate一起使用且大于或等于endDate
39
+ adjust_backward_date: 后复权指定起始时间点 (YYYY-MM-DD),需要与startDate一起使用且小于或等于startDate
40
+ limit: 返回最近数据的数量
41
+
42
+ Returns:
43
+ DataFrame containing candlestick data
44
+
45
+ """
46
+ payload: dict[str, Any] = {
47
+ "stockCode": stock_code,
48
+ "startDate": start_date,
49
+ "endDate": end_date,
50
+ }
51
+ if adjust_type is not None:
52
+ payload["type"] = adjust_type
53
+ if adjust_forward_date is not None:
54
+ payload["adjustForwardDate"] = adjust_forward_date
55
+ if adjust_backward_date is not None:
56
+ payload["adjustBackwardDate"] = adjust_backward_date
57
+ if limit is not None:
58
+ payload["limit"] = limit
59
+
60
+ data = await self._request("POST", "/cn/company/candlestick", json=payload)
61
+ return get_response_df(data, Candlestick)
62
+
63
+
64
+ # Functional API instance
65
+ _api_instance = CandlestickAPI()
66
+
67
+
68
+ @api
69
+ async def get_candlestick( # noqa: PLR0913
70
+ stock_code: str,
71
+ start_date: str,
72
+ end_date: str,
73
+ adjust_type: Literal["ex_rights", "lxr_fc_rights", "fc_rights", "bc_rights"] | None = None,
74
+ adjust_forward_date: str | None = None,
75
+ adjust_backward_date: str | None = None,
76
+ limit: int | None = None,
77
+ ) -> pd.DataFrame:
78
+ """获取K线数据.
79
+
80
+ Args:
81
+ stock_code: 股票代码
82
+ start_date: 开始日期 (YYYY-MM-DD)
83
+ end_date: 结束日期 (YYYY-MM-DD)
84
+ adjust_type: 复权类型
85
+ - ex_rights: 不复权
86
+ - lxr_fc_rights: 理杏仁前复权
87
+ - fc_rights: 前复权
88
+ - bc_rights: 后复权
89
+ adjust_forward_date: 前复权指定起始时间点 (YYYY-MM-DD)
90
+ adjust_backward_date: 后复权指定起始时间点 (YYYY-MM-DD)
91
+ limit: 返回最近数据的数量
92
+
93
+ Returns:
94
+ DataFrame containing candlestick data
95
+
96
+ Example:
97
+ >>> df = await get_candlestick(
98
+ ... stock_code="300750",
99
+ ... start_date="2025-04-01",
100
+ ... end_date="2026-04-01",
101
+ ... adjust_type="lxr_fc_rights"
102
+ ... )
103
+
104
+ """
105
+ return await _api_instance.get_candlestick(
106
+ stock_code=stock_code,
107
+ start_date=start_date,
108
+ end_date=end_date,
109
+ adjust_type=adjust_type,
110
+ adjust_forward_date=adjust_forward_date,
111
+ adjust_backward_date=adjust_backward_date,
112
+ limit=limit,
113
+ )
@@ -22,6 +22,7 @@ class Dividend(pa.DataFrameModel):
22
22
  ex_date: 除权除息日
23
23
  payment_date: 分红到账日
24
24
  fs_end_date: 财报时间
25
+ status: 状态(board_director_plan/shareholders_meeting_plan/company_plan/delay_implementation/cancelled/implemented/terminated/plan)
25
26
  stock_code: 股票代码(由SDK添加)
26
27
 
27
28
  """
@@ -43,6 +44,7 @@ class Dividend(pa.DataFrameModel):
43
44
 
44
45
  # 可选字段
45
46
  content: pa.typing.Series[str] | None = pa.Field(nullable=True)
47
+ status: pa.typing.Series[str] | None = pa.Field(nullable=True)
46
48
  register_date: pa.typing.Series[pa.typing.DateTime] | None = pa.Field(nullable=True)
47
49
  ex_date: pa.typing.Series[pa.typing.DateTime] | None = pa.Field(nullable=True)
48
50
  payment_date: pa.typing.Series[pa.typing.DateTime] | None = pa.Field(nullable=True)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lixinger-python"
3
- version = "0.3.2"
3
+ version = "0.3.4"
4
4
  description = "Python SDK for Lixinger Financial Data API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -121,7 +121,7 @@ async def test_get_dividend_with_optional_fields_missing():
121
121
  "bonusSharesFromCapitalReserve": 0,
122
122
  "dividend": 1.5,
123
123
  # Optional fields missing: content, registerDate, exDate, paymentDate,
124
- # dividendAmount, annualNetProfit, annualNetProfitDividendRatio
124
+ # dividendAmount, annualNetProfit, annualNetProfitDividendRatio, status
125
125
  }
126
126
  ],
127
127
  }
@@ -141,3 +141,130 @@ async def test_get_dividend_with_optional_fields_missing():
141
141
  assert "content" not in df.columns
142
142
  assert "annual_net_profit" not in df.columns
143
143
  assert "annual_net_profit_dividend_ratio" not in df.columns
144
+ assert "status" not in df.columns
145
+
146
+
147
+ @pytest.mark.asyncio
148
+ async def test_get_dividend_with_status_field():
149
+ """Test that status field is properly handled when present."""
150
+ mock_response = {
151
+ "code": 1,
152
+ "message": "success",
153
+ "data": [
154
+ {
155
+ "date": "2023-03-25T00:00:00+08:00",
156
+ "fsEndDate": "2022-12-31T00:00:00+08:00",
157
+ "currency": "CNY",
158
+ "bonusSharesFromProfit": 0,
159
+ "bonusSharesFromCapitalReserve": 0,
160
+ "dividend": 1.738,
161
+ "status": "implemented",
162
+ }
163
+ ],
164
+ }
165
+
166
+ with patch("httpx.AsyncClient.request") as mock_request:
167
+ mock_request.return_value = Mock()
168
+ mock_request.return_value.status_code = 200
169
+ mock_request.return_value.json.return_value = mock_response
170
+
171
+ df = await get_dividend(stock_code="600036", start_date="2023-01-01")
172
+
173
+ assert isinstance(df, pd.DataFrame)
174
+ assert len(df) == 1
175
+ assert df.iloc[0]["status"] == "implemented"
176
+
177
+
178
+ @pytest.mark.asyncio
179
+ @pytest.mark.parametrize(
180
+ "status_value",
181
+ [
182
+ "board_director_plan", # 董事会预案
183
+ "shareholders_meeting_plan", # 股东大会预案
184
+ "company_plan", # 公司预案
185
+ "delay_implementation", # 延迟实施
186
+ "cancelled", # 取消分红
187
+ "implemented", # 已执行
188
+ "terminated", # 终止
189
+ "plan", # 预案
190
+ ],
191
+ )
192
+ async def test_get_dividend_with_all_status_values(status_value: str):
193
+ """Test all possible status values from the API documentation."""
194
+ mock_response = {
195
+ "code": 1,
196
+ "message": "success",
197
+ "data": [
198
+ {
199
+ "date": "2023-03-25T00:00:00+08:00",
200
+ "fsEndDate": "2022-12-31T00:00:00+08:00",
201
+ "currency": "CNY",
202
+ "bonusSharesFromProfit": 0,
203
+ "bonusSharesFromCapitalReserve": 0,
204
+ "dividend": 1.5,
205
+ "status": status_value,
206
+ }
207
+ ],
208
+ }
209
+
210
+ with patch("httpx.AsyncClient.request") as mock_request:
211
+ mock_request.return_value = Mock()
212
+ mock_request.return_value.status_code = 200
213
+ mock_request.return_value.json.return_value = mock_response
214
+
215
+ df = await get_dividend(stock_code="600036", start_date="2023-01-01")
216
+
217
+ assert isinstance(df, pd.DataFrame)
218
+ assert len(df) == 1
219
+ assert df.iloc[0]["status"] == status_value
220
+
221
+
222
+ @pytest.mark.asyncio
223
+ async def test_get_dividend_with_multiple_status_values():
224
+ """Test multiple dividend records with different status values."""
225
+ mock_response = {
226
+ "code": 1,
227
+ "message": "success",
228
+ "data": [
229
+ {
230
+ "date": "2023-03-25T00:00:00+08:00",
231
+ "fsEndDate": "2022-12-31T00:00:00+08:00",
232
+ "currency": "CNY",
233
+ "bonusSharesFromProfit": 0,
234
+ "bonusSharesFromCapitalReserve": 0,
235
+ "dividend": 1.738,
236
+ "status": "implemented",
237
+ },
238
+ {
239
+ "date": "2024-03-20T00:00:00+08:00",
240
+ "fsEndDate": "2023-12-31T00:00:00+08:00",
241
+ "currency": "CNY",
242
+ "bonusSharesFromProfit": 0,
243
+ "bonusSharesFromCapitalReserve": 0,
244
+ "dividend": 1.8,
245
+ "status": "board_director_plan",
246
+ },
247
+ {
248
+ "date": "2024-04-15T00:00:00+08:00",
249
+ "fsEndDate": "2023-12-31T00:00:00+08:00",
250
+ "currency": "CNY",
251
+ "bonusSharesFromProfit": 0,
252
+ "bonusSharesFromCapitalReserve": 0,
253
+ "dividend": 1.8,
254
+ "status": "shareholders_meeting_plan",
255
+ },
256
+ ],
257
+ }
258
+
259
+ with patch("httpx.AsyncClient.request") as mock_request:
260
+ mock_request.return_value = Mock()
261
+ mock_request.return_value.status_code = 200
262
+ mock_request.return_value.json.return_value = mock_response
263
+
264
+ df = await get_dividend(stock_code="600036", start_date="2023-01-01")
265
+
266
+ assert isinstance(df, pd.DataFrame)
267
+ assert len(df) == 3
268
+ assert df.iloc[0]["status"] == "implemented"
269
+ assert df.iloc[1]["status"] == "board_director_plan"
270
+ assert df.iloc[2]["status"] == "shareholders_meeting_plan"
@@ -53,7 +53,6 @@ async def test_get_candlestick():
53
53
  mock_request.return_value = mock_response
54
54
 
55
55
  df = await get_candlestick(
56
- type="1d",
57
56
  stock_code="600036",
58
57
  start_date="2024-01-09",
59
58
  end_date="2024-01-10",
@@ -72,10 +71,9 @@ async def test_get_candlestick():
72
71
  assert args[0] == "POST"
73
72
  assert "/cn/company/candlestick" in str(args[1])
74
73
  assert kwargs["json"]["stockCode"] == "600036"
75
- assert kwargs["json"]["type"] == "1d"
76
74
  assert kwargs["json"]["startDate"] == "2024-01-09"
77
75
  assert kwargs["json"]["endDate"] == "2024-01-10"
78
- assert "adjustType" not in kwargs["json"]
76
+ assert "type" not in kwargs["json"]
79
77
 
80
78
 
81
79
  @pytest.mark.asyncio
@@ -107,11 +105,10 @@ async def test_get_candlestick_with_adjust_type():
107
105
  mock_request.return_value = mock_response
108
106
 
109
107
  df = await get_candlestick(
110
- type="1d",
111
108
  stock_code="600036",
112
109
  start_date="2024-01-09",
113
110
  end_date="2024-01-10",
114
- adjust_type="qxw",
111
+ adjust_type="lxr_fc_rights",
115
112
  )
116
113
 
117
114
  assert isinstance(df, pd.DataFrame)
@@ -120,4 +117,4 @@ async def test_get_candlestick_with_adjust_type():
120
117
 
121
118
  # Verify request parameters
122
119
  args, kwargs = mock_request.call_args
123
- assert kwargs["json"]["adjustType"] == "qxw"
120
+ assert kwargs["json"]["type"] == "lxr_fc_rights"
@@ -211,7 +211,6 @@ class TestRealAPIResponses:
211
211
 
212
212
  # Make a real API call for candlestick data
213
213
  result = await real_client.candlestick.get_candlestick(
214
- type="1d",
215
214
  stock_code="600036",
216
215
  start_date="2024-01-01",
217
216
  end_date="2024-01-10",
@@ -629,7 +629,7 @@ wheels = [
629
629
 
630
630
  [[package]]
631
631
  name = "lixinger-python"
632
- version = "0.3.2"
632
+ version = "0.3.4"
633
633
  source = { editable = "." }
634
634
  dependencies = [
635
635
  { name = "httpx", extra = ["socks"] },
@@ -1,76 +0,0 @@
1
- from typing import Any, Literal
2
-
3
- import pandas as pd
4
-
5
- from lixinger.api.base import BaseAPI
6
- from lixinger.models.cn.company import Candlestick
7
- from lixinger.utils.api import api
8
- from lixinger.utils.dataframe import get_response_df
9
-
10
-
11
- class CandlestickAPI(BaseAPI):
12
- """Candlestick (K-line) data APIs."""
13
-
14
- async def get_candlestick(
15
- self,
16
- type: Literal["1d", "1w", "1m", "5m", "15m", "30m", "60m"],
17
- stock_code: str,
18
- start_date: str,
19
- end_date: str,
20
- adjust_type: Literal["none", "qxw", "hxw"] | None = None,
21
- ) -> pd.DataFrame:
22
- """获取K线数据.
23
-
24
- API Endpoint: /cn/company/candlestick
25
- API Method: POST
26
-
27
- Args:
28
- type: K线类型 (1d, 1w, 1m, 5m, 15m, 30m, 60m)
29
- stock_code: 股票代码
30
- start_date: 开始日期 (YYYY-MM-DD)
31
- end_date: 结束日期 (YYYY-MM-DD)
32
- adjust_type: 复权类型 (none, qxw, hxw)
33
-
34
- """
35
- payload: dict[str, Any] = {
36
- "type": type,
37
- "stockCode": stock_code,
38
- "startDate": start_date,
39
- "endDate": end_date,
40
- }
41
- if adjust_type is not None:
42
- payload["adjustType"] = adjust_type
43
-
44
- data = await self._request("POST", "/cn/company/candlestick", json=payload)
45
- return get_response_df(data, Candlestick)
46
-
47
-
48
- # Functional API instance
49
- _api_instance = CandlestickAPI()
50
-
51
-
52
- @api
53
- async def get_candlestick(
54
- type: Literal["1d", "1w", "1m", "5m", "15m", "30m", "60m"],
55
- stock_code: str,
56
- start_date: str,
57
- end_date: str,
58
- adjust_type: Literal["none", "qxw", "hxw"] | None = None,
59
- ) -> pd.DataFrame:
60
- """获取K线数据.
61
-
62
- Args:
63
- type: K线类型 (1d, 1w, 1m, 5m, 15m, 30m, 60m)
64
- stock_code: 股票代码
65
- start_date: 开始日期 (YYYY-MM-DD)
66
- end_date: 结束日期 (YYYY-MM-DD)
67
- adjust_type: 复权类型 (none, qxw, hxw)
68
-
69
- """
70
- return await _api_instance.get_candlestick(
71
- type=type,
72
- stock_code=stock_code,
73
- start_date=start_date,
74
- end_date=end_date,
75
- adjust_type=adjust_type,
76
- )
File without changes
File without changes