lixinger-python 0.3.8__tar.gz → 0.3.9__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 (215) hide show
  1. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/PKG-INFO +1 -1
  2. lixinger_python-0.3.9/examples/index_margin_trading_example.py +54 -0
  3. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/__init__.py +2 -0
  4. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/__init__.py +6 -0
  5. lixinger_python-0.3.9/lixinger/api/cn/index/margin_trading.py +117 -0
  6. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/namespace.py +9 -0
  7. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/client.py +4 -0
  8. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/__init__.py +2 -0
  9. lixinger_python-0.3.9/lixinger/models/cn/index/margin_trading.py +30 -0
  10. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/pyproject.toml +1 -1
  11. lixinger_python-0.3.9/tests/test_index_margin_trading.py +125 -0
  12. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/uv.lock +1 -1
  13. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.claude/settings.local.json +0 -0
  14. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.env.example +0 -0
  15. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.github/copilot-instructions.md +0 -0
  16. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.github/workflows/README.md +0 -0
  17. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.github/workflows/pr-checks.yml +0 -0
  18. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.gitignore +0 -0
  19. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.pre-commit-config.yaml +0 -0
  20. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.python-version +0 -0
  21. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/.ruff.toml +0 -0
  22. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/ADD_NEW_API_QUICK.md +0 -0
  23. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/AGENTS.md +0 -0
  24. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/CHANGELOG.md +0 -0
  25. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/CLAUDE.md +0 -0
  26. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/DOCS.md +0 -0
  27. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/LICENSE +0 -0
  28. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/MANIFEST.in +0 -0
  29. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/PUBLISHING.md +0 -0
  30. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/README.md +0 -0
  31. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/SETUP.md +0 -0
  32. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/codecov.yml +0 -0
  33. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/client.md +0 -0
  34. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/announcement.md +0 -0
  35. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/candlestick.md +0 -0
  36. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/company.md +0 -0
  37. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/dividend.md +0 -0
  38. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/equity_change.md +0 -0
  39. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/fs/non_financial.md +0 -0
  40. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/fundamental/bank.md +0 -0
  41. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/fundamental/insurance.md +0 -0
  42. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/fundamental/non_financial.md +0 -0
  43. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/fundamental/other_financial.md +0 -0
  44. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/fundamental/security.md +0 -0
  45. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/indices.md +0 -0
  46. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/company/profile.md +0 -0
  47. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/fund/announcement.md +0 -0
  48. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/fund/asset_combination.md +0 -0
  49. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/fund/asset_industry_combination.md +0 -0
  50. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/fund/candlestick.md +0 -0
  51. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/fund/fund.md +0 -0
  52. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/fund/profile.md +0 -0
  53. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/fund/shareholdings.md +0 -0
  54. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/index/candlestick.md +0 -0
  55. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/index/constituent_weightings.md +0 -0
  56. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/index/constituents.md +0 -0
  57. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/index/drawdown.md +0 -0
  58. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/index/fundamental.md +0 -0
  59. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/index/index.md +0 -0
  60. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/index/tracking_fund.md +0 -0
  61. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/api/overview.md +0 -0
  62. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/development/code-style.md +0 -0
  63. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/development/contributing.md +0 -0
  64. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/development/testing.md +0 -0
  65. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/examples/company.md +0 -0
  66. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/examples/fund.md +0 -0
  67. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/examples/index.md +0 -0
  68. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/getting-started/configuration.md +0 -0
  69. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/getting-started/installation.md +0 -0
  70. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/getting-started/quickstart.md +0 -0
  71. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/docs/index.md +0 -0
  72. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/examples/company_example.py +0 -0
  73. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/examples/company_profile_example.py +0 -0
  74. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/examples/dividend_example.py +0 -0
  75. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/examples/fs_example.py +0 -0
  76. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/examples/index_constituent_weightings_example.py +0 -0
  77. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/examples/index_constituents_example.py +0 -0
  78. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/examples/index_info_example.py +0 -0
  79. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/fund_response.json +0 -0
  80. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/__init__.py +0 -0
  81. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/base.py +0 -0
  82. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/__init__.py +0 -0
  83. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/__init__.py +0 -0
  84. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/announcement.py +0 -0
  85. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/candlestick.py +0 -0
  86. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/company.py +0 -0
  87. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/dividend.py +0 -0
  88. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/equity_change.py +0 -0
  89. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fs/__init__.py +0 -0
  90. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fs/bank.py +0 -0
  91. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fs/insurance.py +0 -0
  92. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fs/non_financial.py +0 -0
  93. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fs/other_financial.py +0 -0
  94. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fs/security.py +0 -0
  95. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fundamental/__init__.py +0 -0
  96. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fundamental/bank.py +0 -0
  97. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fundamental/insurance.py +0 -0
  98. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fundamental/non_financial.py +0 -0
  99. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fundamental/other_financial.py +0 -0
  100. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/fundamental/security.py +0 -0
  101. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/indices.py +0 -0
  102. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/namespace.py +0 -0
  103. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/company/profile.py +0 -0
  104. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/__init__.py +0 -0
  105. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/announcement.py +0 -0
  106. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/asset_combination.py +0 -0
  107. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/asset_industry_combination.py +0 -0
  108. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/candlestick.py +0 -0
  109. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/fund.py +0 -0
  110. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/profile.py +0 -0
  111. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/fund/shareholdings.py +0 -0
  112. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/candlestick.py +0 -0
  113. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/constituent_weightings.py +0 -0
  114. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/constituents.py +0 -0
  115. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/drawdown.py +0 -0
  116. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/fs/__init__.py +0 -0
  117. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/fs/bank.py +0 -0
  118. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/fs/hybrid.py +0 -0
  119. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/fs/non_financial.py +0 -0
  120. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/fs/security.py +0 -0
  121. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/fundamental.py +0 -0
  122. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/index.py +0 -0
  123. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/api/cn/index/tracking_fund.py +0 -0
  124. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/config.py +0 -0
  125. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/exceptions.py +0 -0
  126. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/__init__.py +0 -0
  127. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/__init__.py +0 -0
  128. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/__init__.py +0 -0
  129. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/announcement.py +0 -0
  130. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/candlestick.py +0 -0
  131. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/company.py +0 -0
  132. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/dividend.py +0 -0
  133. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/equity_change.py +0 -0
  134. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fs/__init__.py +0 -0
  135. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fs/bank.py +0 -0
  136. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fs/insurance.py +0 -0
  137. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fs/non_financial.py +0 -0
  138. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fs/other_financial.py +0 -0
  139. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fs/security.py +0 -0
  140. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fundamental/__init__.py +0 -0
  141. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fundamental/bank.py +0 -0
  142. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fundamental/insurance.py +0 -0
  143. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fundamental/non_financial.py +0 -0
  144. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fundamental/other_financial.py +0 -0
  145. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/fundamental/security.py +0 -0
  146. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/company/indices.py +0 -0
  147. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/__init__.py +0 -0
  148. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/announcement.py +0 -0
  149. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/asset_combination.py +0 -0
  150. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/asset_industry_combination.py +0 -0
  151. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/candlestick.py +0 -0
  152. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/fund.py +0 -0
  153. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/profile.py +0 -0
  154. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/fund/shareholdings.py +0 -0
  155. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/candlestick.py +0 -0
  156. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/constituent_weightings.py +0 -0
  157. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/constituents.py +0 -0
  158. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/drawdown.py +0 -0
  159. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/fs/__init__.py +0 -0
  160. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/fs/bank.py +0 -0
  161. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/fs/hybrid.py +0 -0
  162. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/fs/non_financial.py +0 -0
  163. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/fs/security.py +0 -0
  164. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/fundamental.py +0 -0
  165. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/index.py +0 -0
  166. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/models/cn/index/tracking_fund.py +0 -0
  167. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/py.typed +0 -0
  168. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/utils/__init__.py +0 -0
  169. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/utils/api.py +0 -0
  170. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/utils/dataframe.py +0 -0
  171. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/utils/dict.py +0 -0
  172. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/utils/rate_limiter.py +0 -0
  173. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/lixinger/utils/retry.py +0 -0
  174. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/mkdocs.yml +0 -0
  175. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/mypy.ini +0 -0
  176. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/scripts/explore_api.py +0 -0
  177. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/scripts/generate_docs.py +0 -0
  178. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/scripts/publish.sh +0 -0
  179. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/api/cn/company/test_announcement.py +0 -0
  180. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/api/cn/company/test_dividend.py +0 -0
  181. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/api/cn/index/test_constituents.py +0 -0
  182. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/conftest.py +0 -0
  183. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_bank_statements.py +0 -0
  184. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_candlestick.py +0 -0
  185. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_client.py +0 -0
  186. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_cn_index_candlestick.py +0 -0
  187. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_cn_index_constituent_weightings.py +0 -0
  188. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_company.py +0 -0
  189. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_company_profile.py +0 -0
  190. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_equity_change.py +0 -0
  191. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fund.py +0 -0
  192. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fund_announcement.py +0 -0
  193. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fund_asset_combination.py +0 -0
  194. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fund_asset_industry_combination.py +0 -0
  195. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fund_candlestick.py +0 -0
  196. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fund_profile.py +0 -0
  197. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fund_shareholdings.py +0 -0
  198. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fundamental.py +0 -0
  199. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fundamental_bank.py +0 -0
  200. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_fundamental_security.py +0 -0
  201. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index.py +0 -0
  202. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index_constituents.py +0 -0
  203. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index_drawdown.py +0 -0
  204. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index_fs_bank.py +0 -0
  205. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index_fs_hybrid.py +0 -0
  206. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index_fs_non_financial.py +0 -0
  207. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index_fs_security.py +0 -0
  208. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_index_fundamental.py +0 -0
  209. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_indices.py +0 -0
  210. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_insurance_statements.py +0 -0
  211. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_integration.py +0 -0
  212. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_non_financial_statements.py +0 -0
  213. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_other_financial_statements.py +0 -0
  214. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_security_statements.py +0 -0
  215. {lixinger_python-0.3.8 → lixinger_python-0.3.9}/tests/test_tracking_fund.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lixinger-python
3
- Version: 0.3.8
3
+ Version: 0.3.9
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,54 @@
1
+ """Index margin trading and securities lending API example.
2
+
3
+ This example demonstrates how to use the index margin trading API to retrieve
4
+ daily margin trading (融资) and securities lending (融券) metrics for an index.
5
+ """
6
+
7
+ import asyncio
8
+
9
+ from lixinger import AsyncLixingerClient, get_index_margin_trading
10
+
11
+
12
+ async def main():
13
+ """Demonstrate usage of index margin trading API."""
14
+ # Method 1: Using the async client with context manager (recommended)
15
+ print("Method 1: Using async client...")
16
+ async with AsyncLixingerClient() as client:
17
+ # Get margin trading data for SSE 50 index
18
+ print("\nFetching margin trading data for SSE 50 (000016)...")
19
+ df = await client.cn_index.margin_trading.get_margin_trading(
20
+ stock_code="000016",
21
+ start_date="2025-06-13",
22
+ end_date="2026-06-13",
23
+ )
24
+ print(f"Total records: {len(df)}")
25
+ print("\nLatest 5 records:")
26
+ print(
27
+ df.head(5)[
28
+ [
29
+ "date",
30
+ "financing_balance",
31
+ "financing_net_purchase_amount",
32
+ "securities_balance",
33
+ "securities_net_sell_amount",
34
+ ]
35
+ ]
36
+ )
37
+
38
+ # Analyze balance distribution
39
+ print("\nFinancing balance statistics:")
40
+ print(df["financing_balance"].describe())
41
+
42
+ # Method 2: Using functional API with limit parameter
43
+ print("\nMethod 2: Using functional API (last 10 days)...")
44
+ df = await get_index_margin_trading(
45
+ stock_code="000300", # CSI 300
46
+ start_date="2025-06-01",
47
+ limit=10,
48
+ )
49
+ print(f"Total records: {len(df)}")
50
+ print(df.head(10))
51
+
52
+
53
+ if __name__ == "__main__":
54
+ asyncio.run(main())
@@ -34,6 +34,7 @@ from lixinger.api.cn.index import (
34
34
  get_index_bank_statements,
35
35
  get_index_fundamental,
36
36
  get_index_hybrid_statements,
37
+ get_index_margin_trading,
37
38
  get_index_non_financial_statements,
38
39
  get_index_security_statements,
39
40
  get_tracking_fund,
@@ -75,6 +76,7 @@ __all__ = [
75
76
  "get_constituent_weightings",
76
77
  "get_index_fundamental",
77
78
  "get_tracking_fund",
79
+ "get_index_margin_trading",
78
80
  "get_candlestick",
79
81
  "get_index_candlestick",
80
82
  "get_index_drawdown",
@@ -22,6 +22,10 @@ from lixinger.api.cn.index.fundamental import (
22
22
  get_index_fundamental,
23
23
  )
24
24
  from lixinger.api.cn.index.index import IndexAPI, get_index
25
+ from lixinger.api.cn.index.margin_trading import (
26
+ IndexMarginTradingAPI,
27
+ get_index_margin_trading,
28
+ )
25
29
  from lixinger.api.cn.index.tracking_fund import TrackingFundAPI, get_tracking_fund
26
30
 
27
31
  __all__ = [
@@ -37,6 +41,8 @@ __all__ = [
37
41
  "get_drawdown",
38
42
  "IndexFundamentalAPI",
39
43
  "get_index_fundamental",
44
+ "IndexMarginTradingAPI",
45
+ "get_index_margin_trading",
40
46
  "TrackingFundAPI",
41
47
  "get_tracking_fund",
42
48
  # Index financial statements
@@ -0,0 +1,117 @@
1
+ """Index margin trading and securities lending APIs."""
2
+
3
+ from typing import Any
4
+
5
+ import pandas as pd
6
+
7
+ from lixinger.api.base import BaseAPI
8
+ from lixinger.models.cn.index.margin_trading import IndexMarginTrading
9
+ from lixinger.utils.api import api
10
+ from lixinger.utils.dataframe import get_response_df
11
+
12
+
13
+ class IndexMarginTradingAPI(BaseAPI):
14
+ """Index margin trading and securities lending APIs."""
15
+
16
+ async def get_margin_trading(
17
+ self,
18
+ stock_code: str,
19
+ start_date: str,
20
+ end_date: str | None = None,
21
+ limit: int | None = None,
22
+ ) -> pd.DataFrame:
23
+ """获取指数融资融券数据.
24
+
25
+ 获取大陆指数每日的融资融券数据. 可按指数代码批量查询返回每日指数融资买入金额、
26
+ 融资偿还金额、融资净买入金额、融资余额、融券卖出金额、融券偿还金额、
27
+ 融券净卖出金额、融券余额等数据. 当用户想了解某指数每日的融资融券余额以及变动情况、
28
+ 观察杠杆资金进出节奏或分析做空力量时, 调用此接口.
29
+
30
+ API Endpoint: /cn/index/margin-trading-and-securities-lending
31
+ API Method: POST
32
+ API Doc: https://www.lixinger.com/open/api/doc?api-key=cn/index/margin-trading-and-securities-lending
33
+
34
+ Args:
35
+ stock_code: 指数代码, 请参考指数信息API获取合法的stockCode
36
+ start_date: 信息起始时间 (YYYY-MM-DD, 北京时间), 开始和结束的时间间隔不超过10年
37
+ end_date: 结束信息日期 (YYYY-MM-DD, 北京时间), 默认为今天结束
38
+ limit: 返回最近数据的数量
39
+
40
+ Returns:
41
+ DataFrame containing margin trading data with columns:
42
+
43
+ - date: 数据时间
44
+ - stock_code: 指数代码
45
+ - financing_purchase_amount: 融资买入金额
46
+ - financing_repayment_amount: 融资偿还金额
47
+ - financing_net_purchase_amount: 融资净买入金额
48
+ - financing_balance: 融资余额
49
+ - securities_sell_amount: 融券卖出金额
50
+ - securities_repayment_amount: 融券偿还金额
51
+ - securities_net_sell_amount: 融券净卖出金额
52
+ - securities_balance: 融券余额
53
+ - financing_balance_to_market_cap: 融资余额占流通市值比例
54
+ - securities_balance_to_market_cap: 融券余额占流通市值比例
55
+
56
+ Example:
57
+ 获取上证50指数融资融券数据::
58
+
59
+ from lixinger import AsyncLixingerClient
60
+
61
+ async with AsyncLixingerClient() as client:
62
+ df = await client.cn_index.margin_trading.get_margin_trading(
63
+ stock_code="000016",
64
+ start_date="2025-06-13",
65
+ end_date="2026-06-13",
66
+ )
67
+ print(df)
68
+
69
+ """
70
+ payload: dict[str, Any] = {
71
+ "stockCode": stock_code,
72
+ "startDate": start_date,
73
+ }
74
+ if end_date is not None:
75
+ payload["endDate"] = end_date
76
+ if limit is not None:
77
+ payload["limit"] = limit
78
+
79
+ data = await self._request(
80
+ "POST",
81
+ "/cn/index/margin-trading-and-securities-lending",
82
+ json=payload,
83
+ )
84
+ for item in data:
85
+ item["stockCode"] = stock_code
86
+ return get_response_df(data, IndexMarginTrading)
87
+
88
+
89
+ # Functional API instance
90
+ _api_instance = IndexMarginTradingAPI()
91
+
92
+
93
+ @api
94
+ async def get_index_margin_trading(
95
+ stock_code: str,
96
+ start_date: str,
97
+ end_date: str | None = None,
98
+ limit: int | None = None,
99
+ ) -> pd.DataFrame:
100
+ """获取指数融资融券数据.
101
+
102
+ Args:
103
+ stock_code: 指数代码
104
+ start_date: 信息起始时间 (YYYY-MM-DD)
105
+ end_date: 结束信息日期 (YYYY-MM-DD)
106
+ limit: 返回最近数据的数量
107
+
108
+ Returns:
109
+ DataFrame containing index margin trading data
110
+
111
+ """
112
+ return await _api_instance.get_margin_trading(
113
+ stock_code=stock_code,
114
+ start_date=start_date,
115
+ end_date=end_date,
116
+ limit=limit,
117
+ )
@@ -10,6 +10,7 @@ from lixinger.api.cn.index.fs.non_financial import IndexNonFinancialStatementAPI
10
10
  from lixinger.api.cn.index.fs.security import IndexSecurityStatementAPI
11
11
  from lixinger.api.cn.index.fundamental import IndexFundamentalAPI
12
12
  from lixinger.api.cn.index.index import IndexAPI
13
+ from lixinger.api.cn.index.margin_trading import IndexMarginTradingAPI
13
14
  from lixinger.api.cn.index.tracking_fund import TrackingFundAPI
14
15
 
15
16
 
@@ -60,6 +61,7 @@ class IndexNamespace:
60
61
  - candlestick: Index candlestick data API (get_candlestick)
61
62
  - drawdown: Index drawdown data API (get_drawdown)
62
63
  - tracking_fund: Index tracking fund API (get_tracking_fund)
64
+ - margin_trading: Index margin trading API (get_margin_trading)
63
65
  - fs: Index financial statement APIs (sub-APIs for different index types)
64
66
  - fs.non_financial: Non-financial index statements
65
67
  - fs.bank: Bank index statements
@@ -77,6 +79,7 @@ class IndexNamespace:
77
79
  candlestick: IndexCandlestickAPI,
78
80
  drawdown: DrawdownAPI,
79
81
  tracking_fund: TrackingFundAPI,
82
+ margin_trading: IndexMarginTradingAPI,
80
83
  fs_non_financial: IndexNonFinancialStatementAPI,
81
84
  fs_bank: IndexBankStatementAPI,
82
85
  fs_security: IndexSecurityStatementAPI,
@@ -92,6 +95,7 @@ class IndexNamespace:
92
95
  candlestick: Index candlestick data API
93
96
  drawdown: Index drawdown data API
94
97
  tracking_fund: Index tracking fund API
98
+ margin_trading: Index margin trading and securities lending API
95
99
  fs_non_financial: Non-financial index statement API
96
100
  fs_bank: Bank index statement API
97
101
  fs_security: Security index statement API
@@ -105,6 +109,7 @@ class IndexNamespace:
105
109
  self.candlestick = candlestick
106
110
  self.drawdown = drawdown
107
111
  self.tracking_fund = tracking_fund
112
+ self.margin_trading = margin_trading
108
113
  self.fs = IndexFSNamespace(
109
114
  non_financial=fs_non_financial,
110
115
  bank=fs_bank,
@@ -140,3 +145,7 @@ class IndexNamespace:
140
145
  def get_tracking_fund(self, *args, **kwargs):
141
146
  """Alias for tracking_fund.get_tracking_fund."""
142
147
  return self.tracking_fund.get_tracking_fund(*args, **kwargs)
148
+
149
+ def get_margin_trading(self, *args, **kwargs):
150
+ """Alias for margin_trading.get_margin_trading."""
151
+ return self.margin_trading.get_margin_trading(*args, **kwargs)
@@ -36,6 +36,7 @@ from lixinger.api.cn.index import (
36
36
  IndexCandlestickAPI,
37
37
  IndexFundamentalAPI,
38
38
  IndexHybridStatementAPI,
39
+ IndexMarginTradingAPI,
39
40
  IndexNonFinancialStatementAPI,
40
41
  IndexSecurityStatementAPI,
41
42
  TrackingFundAPI,
@@ -186,6 +187,7 @@ class AsyncLixingerClient:
186
187
  cn_index_drawdown = DrawdownAPI(self._http_client, self.config, self._rate_limiter)
187
188
  cn_index_fundamental = IndexFundamentalAPI(self._http_client, self.config, self._rate_limiter)
188
189
  cn_index_tracking_fund = TrackingFundAPI(self._http_client, self.config, self._rate_limiter)
190
+ cn_index_margin_trading = IndexMarginTradingAPI(self._http_client, self.config, self._rate_limiter)
189
191
  cn_index_fs_non_financial = IndexNonFinancialStatementAPI(self._http_client, self.config, self._rate_limiter)
190
192
  cn_index_fs_bank = IndexBankStatementAPI(self._http_client, self.config, self._rate_limiter)
191
193
  cn_index_fs_security = IndexSecurityStatementAPI(self._http_client, self.config, self._rate_limiter)
@@ -200,6 +202,7 @@ class AsyncLixingerClient:
200
202
  candlestick=cn_index_candlestick,
201
203
  drawdown=cn_index_drawdown,
202
204
  tracking_fund=cn_index_tracking_fund,
205
+ margin_trading=cn_index_margin_trading,
203
206
  fs_non_financial=cn_index_fs_non_financial,
204
207
  fs_bank=cn_index_fs_bank,
205
208
  fs_security=cn_index_fs_security,
@@ -213,6 +216,7 @@ class AsyncLixingerClient:
213
216
  self.cn_index_drawdown = cn_index_drawdown
214
217
  self.cn_index_fundamental = cn_index_fundamental
215
218
  self.cn_index_tracking_fund = cn_index_tracking_fund
219
+ self.cn_index_margin_trading = cn_index_margin_trading
216
220
  self.cn_index_fs_non_financial = cn_index_fs_non_financial
217
221
  self.cn_index_fs_bank = cn_index_fs_bank
218
222
  self.cn_index_fs_security = cn_index_fs_security
@@ -12,6 +12,7 @@ from lixinger.models.cn.index.fs import (
12
12
  )
13
13
  from lixinger.models.cn.index.fundamental import IndexFundamentalData
14
14
  from lixinger.models.cn.index.index import Index
15
+ from lixinger.models.cn.index.margin_trading import IndexMarginTrading
15
16
  from lixinger.models.cn.index.tracking_fund import TrackingFund
16
17
 
17
18
  __all__ = [
@@ -21,6 +22,7 @@ __all__ = [
21
22
  "IndexCandlestick",
22
23
  "IndexDrawdown",
23
24
  "IndexFundamentalData",
25
+ "IndexMarginTrading",
24
26
  "TrackingFund",
25
27
  # Index financial statements
26
28
  "IndexBankStatementSchema",
@@ -0,0 +1,30 @@
1
+ """Index margin trading and securities lending models."""
2
+
3
+ import pandera.pandas as pa
4
+
5
+
6
+ class IndexMarginTrading(pa.DataFrameModel):
7
+ """Index margin trading and securities lending model.
8
+
9
+ Represents the daily margin trading (融资) and securities lending (融券)
10
+ metrics for an index.
11
+ """
12
+
13
+ class Config:
14
+ """Pandera configuration."""
15
+
16
+ coerce = True
17
+ strict = False
18
+
19
+ date: pa.typing.Series[pa.typing.DateTime]
20
+ stock_code: pa.typing.Series[str]
21
+ financing_purchase_amount: pa.typing.Series[float] | None = pa.Field(nullable=True)
22
+ financing_repayment_amount: pa.typing.Series[float] | None = pa.Field(nullable=True)
23
+ financing_net_purchase_amount: pa.typing.Series[float] | None = pa.Field(nullable=True)
24
+ financing_balance: pa.typing.Series[float] | None = pa.Field(nullable=True)
25
+ securities_sell_amount: pa.typing.Series[float] | None = pa.Field(nullable=True)
26
+ securities_repayment_amount: pa.typing.Series[float] | None = pa.Field(nullable=True)
27
+ securities_net_sell_amount: pa.typing.Series[float] | None = pa.Field(nullable=True)
28
+ securities_balance: pa.typing.Series[float] | None = pa.Field(nullable=True)
29
+ financing_balance_to_market_cap: pa.typing.Series[float] | None = pa.Field(nullable=True)
30
+ securities_balance_to_market_cap: pa.typing.Series[float] | None = pa.Field(nullable=True)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lixinger-python"
3
- version = "0.3.8"
3
+ version = "0.3.9"
4
4
  description = "Python SDK for Lixinger Financial Data API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -0,0 +1,125 @@
1
+ from unittest.mock import Mock, patch
2
+
3
+ import pandas as pd
4
+ import pytest
5
+
6
+ from lixinger import AsyncLixingerClient, get_index_margin_trading
7
+
8
+
9
+ @pytest.fixture
10
+ def client():
11
+ return AsyncLixingerClient()
12
+
13
+
14
+ @pytest.mark.asyncio
15
+ async def test_get_index_margin_trading(client):
16
+ mock_response = {
17
+ "code": 1,
18
+ "message": "success",
19
+ "data": [
20
+ {
21
+ "date": "2026-06-12T00:00:00+08:00",
22
+ "financingBalanceToMarketCap": None,
23
+ "securitiesBalanceToMarketCap": None,
24
+ },
25
+ {
26
+ "date": "2026-06-11T00:00:00+08:00",
27
+ "financingPurchaseAmount": 13388615589,
28
+ "financingRepaymentAmount": 14204571820,
29
+ "financingNetPurchaseAmount": -815956231,
30
+ "financingBalance": 317740762545,
31
+ "securitiesSellAmount": 95630381.56,
32
+ "securitiesRepaymentAmount": 142159882.89,
33
+ "securitiesNetSellAmount": -46529501.33,
34
+ "securitiesBalance": 1335088430.51,
35
+ "financingBalanceToMarketCap": 0.011534898947671552,
36
+ "securitiesBalanceToMarketCap": 0.00004846753060195487,
37
+ },
38
+ ],
39
+ }
40
+
41
+ with patch.object(client._http_client, "request") as mock_request:
42
+ mock_request.return_value = Mock()
43
+ mock_request.return_value.status_code = 200
44
+ mock_request.return_value.json.return_value = mock_response
45
+
46
+ df = await client.cn_index.margin_trading.get_margin_trading(
47
+ stock_code="000016",
48
+ start_date="2025-06-13",
49
+ end_date="2026-06-13",
50
+ )
51
+
52
+ assert isinstance(df, pd.DataFrame)
53
+ assert len(df) == 2
54
+ assert "date" in df.columns
55
+ assert "stock_code" in df.columns
56
+ assert "financing_purchase_amount" in df.columns
57
+ assert "securities_balance" in df.columns
58
+ assert df.iloc[0]["stock_code"] == "000016"
59
+ assert df.iloc[1]["stock_code"] == "000016"
60
+ assert df.iloc[1]["financing_balance"] == 317740762545
61
+ assert df.iloc[1]["securities_net_sell_amount"] == -46529501.33
62
+ assert pd.api.types.is_datetime64_any_dtype(df["date"])
63
+
64
+
65
+ @pytest.mark.asyncio
66
+ async def test_get_index_margin_trading_with_limit(client):
67
+ mock_response = {
68
+ "code": 1,
69
+ "message": "success",
70
+ "data": [
71
+ {
72
+ "date": "2026-06-11T00:00:00+08:00",
73
+ "financingBalance": 317740762545,
74
+ }
75
+ ],
76
+ }
77
+
78
+ with patch.object(client._http_client, "request") as mock_request:
79
+ mock_request.return_value = Mock()
80
+ mock_request.return_value.status_code = 200
81
+ mock_request.return_value.json.return_value = mock_response
82
+
83
+ await client.cn_index.margin_trading.get_margin_trading(
84
+ stock_code="000016",
85
+ start_date="2025-06-13",
86
+ limit=1,
87
+ )
88
+
89
+ _, kwargs = mock_request.call_args
90
+ assert kwargs["json"]["stockCode"] == "000016"
91
+ assert kwargs["json"]["startDate"] == "2025-06-13"
92
+ assert kwargs["json"]["limit"] == 1
93
+ assert "endDate" not in kwargs["json"]
94
+
95
+
96
+ @pytest.mark.asyncio
97
+ async def test_functional_get_index_margin_trading():
98
+ mock_response = {
99
+ "code": 1,
100
+ "message": "success",
101
+ "data": [
102
+ {
103
+ "date": "2026-06-11T00:00:00+08:00",
104
+ "financingPurchaseAmount": 13388615589,
105
+ "financingBalance": 317740762545,
106
+ "securitiesBalance": 1335088430.51,
107
+ }
108
+ ],
109
+ }
110
+
111
+ with patch("httpx.AsyncClient.request") as mock_request:
112
+ mock_request.return_value = Mock()
113
+ mock_request.return_value.status_code = 200
114
+ mock_request.return_value.json.return_value = mock_response
115
+
116
+ df = await get_index_margin_trading(
117
+ stock_code="000016",
118
+ start_date="2025-06-13",
119
+ end_date="2026-06-13",
120
+ )
121
+
122
+ assert isinstance(df, pd.DataFrame)
123
+ assert len(df) == 1
124
+ assert df.iloc[0]["stock_code"] == "000016"
125
+ assert df.iloc[0]["financing_balance"] == 317740762545
@@ -629,7 +629,7 @@ wheels = [
629
629
 
630
630
  [[package]]
631
631
  name = "lixinger-python"
632
- version = "0.3.8"
632
+ version = "0.3.9"
633
633
  source = { editable = "." }
634
634
  dependencies = [
635
635
  { name = "httpx", extra = ["socks"] },
File without changes
File without changes