webull-openapi-python-sdk 3.0.4__tar.gz → 3.1.0__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 (370) hide show
  1. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/PKG-INFO +2 -1
  2. webull_openapi_python_sdk-3.1.0/samples/__init__.py +1 -0
  3. webull_openapi_python_sdk-3.1.0/samples/trade/trade_event_sse_client.py +58 -0
  4. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/setup.py +1 -0
  5. webull_openapi_python_sdk-3.1.0/webull/__init__.py +1 -0
  6. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/__init__.py +1 -1
  7. webull_openapi_python_sdk-3.1.0/webull/core/sse/default_retry_policy.py +113 -0
  8. webull_openapi_python_sdk-3.1.0/webull/core/sse/signature_composer.py +73 -0
  9. webull_openapi_python_sdk-3.1.0/webull/core/sse/sse_parser.py +69 -0
  10. webull_openapi_python_sdk-3.1.0/webull/core/sse/subscribe_response.py +84 -0
  11. webull_openapi_python_sdk-3.1.0/webull/data/__init__.py +3 -0
  12. webull_openapi_python_sdk-3.1.0/webull/trade/__init__.py +1 -0
  13. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/account_info.py +1 -1
  14. webull_openapi_python_sdk-3.1.0/webull/trade/trade/v3/__init__.py +0 -0
  15. webull_openapi_python_sdk-3.1.0/webull/trade/trade_events_sse_client.py +480 -0
  16. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull_openapi_python_sdk.egg-info/PKG-INFO +2 -1
  17. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull_openapi_python_sdk.egg-info/SOURCES.txt +7 -0
  18. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull_openapi_python_sdk.egg-info/requires.txt +1 -0
  19. webull_openapi_python_sdk-3.0.4/samples/__init__.py +0 -1
  20. webull_openapi_python_sdk-3.0.4/webull/__init__.py +0 -1
  21. webull_openapi_python_sdk-3.0.4/webull/data/__init__.py +0 -3
  22. webull_openapi_python_sdk-3.0.4/webull/trade/__init__.py +0 -1
  23. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/ChangeLog.txt +0 -0
  24. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/LICENSE +0 -0
  25. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/MANIFEST.in +0 -0
  26. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/NOTICE +0 -0
  27. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/README.rst +0 -0
  28. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/account/__init__.py +0 -0
  29. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/account/account_client.py +0 -0
  30. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/assets/__init__.py +0 -0
  31. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/assets/assets_client.py +0 -0
  32. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/data/__init__.py +0 -0
  33. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/data/community.py +0 -0
  34. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/data/data_client.py +0 -0
  35. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/data/data_client_event.py +0 -0
  36. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/data/data_streaming_client.py +0 -0
  37. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/data/data_streaming_client_async.py +0 -0
  38. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/data/data_streaming_client_event.py +0 -0
  39. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/order/__init__.py +0 -0
  40. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/order/order_option_client.py +0 -0
  41. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/order/order_stock_client.py +0 -0
  42. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/screener/__init__.py +0 -0
  43. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/screener/screener_client.py +0 -0
  44. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/trade/__init__.py +0 -0
  45. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/trade/trade_client.py +0 -0
  46. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/trade/trade_client_v2.py +0 -0
  47. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/trade/trade_client_v3.py +0 -0
  48. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/trade/trade_client_v3_event.py +0 -0
  49. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/trade/trade_event_client.py +0 -0
  50. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/watchlist/__init__.py +0 -0
  51. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/samples/watchlist/watchlist_client.py +0 -0
  52. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/setup.cfg +0 -0
  53. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/__init__.py +0 -0
  54. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/algorithm/__init__.py +0 -0
  55. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/algorithm/sha_hmac1.py +0 -0
  56. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/algorithm/sha_hmac256.py +0 -0
  57. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/algorithm/sha_hmac256_new.py +0 -0
  58. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/composer/__init__.py +0 -0
  59. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/composer/default_signature_composer.py +0 -0
  60. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/credentials.py +0 -0
  61. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/signers/__init__.py +0 -0
  62. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/signers/app_key_signer.py +0 -0
  63. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/signers/signer.py +0 -0
  64. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/auth/signers/signer_factory.py +0 -0
  65. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/cache/__init__.py +0 -0
  66. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/client.py +0 -0
  67. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/common/__init__.py +0 -0
  68. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/common/api_type.py +0 -0
  69. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/common/easy_enum.py +0 -0
  70. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/common/region.py +0 -0
  71. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/compat.py +0 -0
  72. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/context/__init__.py +0 -0
  73. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/context/request_context_holder.py +0 -0
  74. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/data/endpoints.json +0 -0
  75. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/data/retry_config.json +0 -0
  76. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/endpoint/__init__.py +0 -0
  77. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/endpoint/chained_endpoint_resolver.py +0 -0
  78. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/endpoint/default_endpoint_resolver.py +0 -0
  79. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/endpoint/local_config_regional_endpoint_resolver.py +0 -0
  80. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/endpoint/resolver_endpoint_request.py +0 -0
  81. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/endpoint/user_customized_endpoint_resolver.py +0 -0
  82. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/exception/__init__.py +0 -0
  83. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/exception/error_code.py +0 -0
  84. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/exception/error_msg.py +0 -0
  85. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/exception/exceptions.py +0 -0
  86. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/headers.py +0 -0
  87. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/__init__.py +0 -0
  88. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/__init__.py +0 -0
  89. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/client_initializer.py +0 -0
  90. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/config/__init__.py +0 -0
  91. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/config/bean/__init__.py +0 -0
  92. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/config/bean/query_config_request.py +0 -0
  93. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/config/config_operation.py +0 -0
  94. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/__init__.py +0 -0
  95. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/bean/__init__.py +0 -0
  96. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/bean/access_token.py +0 -0
  97. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/bean/check_token_request.py +0 -0
  98. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/bean/create_token_request.py +0 -0
  99. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/bean/refresh_token_request.py +0 -0
  100. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/token_manager.py +0 -0
  101. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/token_operation.py +0 -0
  102. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/initializer/token/token_storage.py +0 -0
  103. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/method_type.py +0 -0
  104. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/protocol_type.py +0 -0
  105. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/request.py +0 -0
  106. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/http/response.py +0 -0
  107. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/request.py +0 -0
  108. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/retry/__init__.py +0 -0
  109. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/retry/backoff_strategy.py +0 -0
  110. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/retry/retry_condition.py +0 -0
  111. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/retry/retry_policy.py +0 -0
  112. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/retry/retry_policy_context.py +0 -0
  113. {webull_openapi_python_sdk-3.0.4/webull/core/utils → webull_openapi_python_sdk-3.1.0/webull/core/sse}/__init__.py +0 -0
  114. {webull_openapi_python_sdk-3.0.4/webull/data/common → webull_openapi_python_sdk-3.1.0/webull/core/utils}/__init__.py +0 -0
  115. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/utils/common.py +0 -0
  116. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/utils/data.py +0 -0
  117. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/utils/desensitize.py +0 -0
  118. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/core/utils/validation.py +0 -0
  119. {webull_openapi_python_sdk-3.0.4/webull/data/internal → webull_openapi_python_sdk-3.1.0/webull/data/common}/__init__.py +0 -0
  120. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/category.py +0 -0
  121. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/connect_ack.py +0 -0
  122. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/contract_type.py +0 -0
  123. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/direction.py +0 -0
  124. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/exchange_code.py +0 -0
  125. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/exercise_style.py +0 -0
  126. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/expiration_cycle.py +0 -0
  127. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/instrument_status.py +0 -0
  128. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/option_type.py +0 -0
  129. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/subscribe_type.py +0 -0
  130. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/common/timespan.py +0 -0
  131. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/data_client.py +0 -0
  132. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/data_streaming_client.py +0 -0
  133. {webull_openapi_python_sdk-3.0.4/webull/data/quotes → webull_openapi_python_sdk-3.1.0/webull/data/internal}/__init__.py +0 -0
  134. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/internal/default_retry_policy.py +0 -0
  135. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/internal/exceptions.py +0 -0
  136. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/internal/quotes_client.py +0 -0
  137. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/internal/quotes_decoder.py +0 -0
  138. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/internal/quotes_payload_decoder.py +0 -0
  139. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/internal/quotes_topic.py +0 -0
  140. {webull_openapi_python_sdk-3.0.4/webull/data/quotes/subscribe → webull_openapi_python_sdk-3.1.0/webull/data/quotes}/__init__.py +0 -0
  141. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/community.py +0 -0
  142. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/crypto_market_data.py +0 -0
  143. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/event_market_data.py +0 -0
  144. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/fundamentals.py +0 -0
  145. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/futures_market_data.py +0 -0
  146. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/instrument.py +0 -0
  147. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/market_data.py +0 -0
  148. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/market_streaming_data.py +0 -0
  149. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/news.py +0 -0
  150. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/option_market_data.py +0 -0
  151. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/screener.py +0 -0
  152. {webull_openapi_python_sdk-3.0.4/webull/data/request → webull_openapi_python_sdk-3.1.0/webull/data/quotes/subscribe}/__init__.py +0 -0
  153. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/ask_bid_result.py +0 -0
  154. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/basic_result.py +0 -0
  155. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/broker_result.py +0 -0
  156. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/event_depth_decoder.py +0 -0
  157. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/event_depth_result.py +0 -0
  158. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/event_snapshot_decoder.py +0 -0
  159. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/event_snapshot_result.py +0 -0
  160. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/event_tick_decoder.py +0 -0
  161. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/event_tick_result.py +0 -0
  162. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/message_pb2.py +0 -0
  163. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/notice_decoder.py +0 -0
  164. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/order_result.py +0 -0
  165. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/payload_type.py +0 -0
  166. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/quote_decoder.py +0 -0
  167. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/quote_result.py +0 -0
  168. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/snapshot_decoder.py +0 -0
  169. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/snapshot_result.py +0 -0
  170. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/tick_decoder.py +0 -0
  171. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/subscribe/tick_result.py +0 -0
  172. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/quotes/watchlist.py +0 -0
  173. {webull_openapi_python_sdk-3.0.4/webull/trade/common → webull_openapi_python_sdk-3.1.0/webull/data/request}/__init__.py +0 -0
  174. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/create_comment_request.py +0 -0
  175. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/create_post_request.py +0 -0
  176. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_analyst_rating_request.py +0 -0
  177. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_analyst_target_price_request.py +0 -0
  178. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_batch_historical_bars_request.py +0 -0
  179. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_capital_flow_request.py +0 -0
  180. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_company_profile_request.py +0 -0
  181. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_corp_action_request.py +0 -0
  182. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_crypto_historical_bars_request.py +0 -0
  183. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_crypto_instruments_request.py +0 -0
  184. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_crypto_instruments_request_v2.py +0 -0
  185. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_crypto_snapshot_request.py +0 -0
  186. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_dividend_calendar_request.py +0 -0
  187. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_earnings_calendar_request.py +0 -0
  188. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_economic_calendar_request.py +0 -0
  189. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_eod_bars_request.py +0 -0
  190. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_bars_request.py +0 -0
  191. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_depth_request.py +0 -0
  192. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_events_request.py +0 -0
  193. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_instrument_request.py +0 -0
  194. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_instrument_request_v2.py +0 -0
  195. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_series_categories.py +0 -0
  196. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_series_request.py +0 -0
  197. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_series_request_v2.py +0 -0
  198. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_snapshot_request.py +0 -0
  199. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_event_tick_request.py +0 -0
  200. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_financials_alert_request.py +0 -0
  201. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_financials_balance_sheet_request.py +0 -0
  202. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_financials_cashflow_request.py +0 -0
  203. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_financials_income_request.py +0 -0
  204. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_financials_indicators_request.py +0 -0
  205. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_footprint_request.py +0 -0
  206. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_forecast_eps_request.py +0 -0
  207. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_allocation_request.py +0 -0
  208. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_brief_request.py +0 -0
  209. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_dividends_request.py +0 -0
  210. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_dividends_request_v2.py +0 -0
  211. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_files_request.py +0 -0
  212. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_holdings_request.py +0 -0
  213. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_net_value_request.py +0 -0
  214. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_performance_request.py +0 -0
  215. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_rating_request.py +0 -0
  216. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_fund_splits_request.py +0 -0
  217. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_depth_request.py +0 -0
  218. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_footprint_request.py +0 -0
  219. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_historical_bars_request.py +0 -0
  220. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_instruments_by_code_request.py +0 -0
  221. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_instruments_request.py +0 -0
  222. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_product_class.py +0 -0
  223. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_products_request.py +0 -0
  224. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_snapshot_request.py +0 -0
  225. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_futures_tick_request.py +0 -0
  226. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_historical_bars_request.py +0 -0
  227. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_industry_comparison_request.py +0 -0
  228. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_insider_holdings_request.py +0 -0
  229. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_insider_transactions_request.py +0 -0
  230. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_institution_holding_changes_request.py +0 -0
  231. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_institution_holdings_request.py +0 -0
  232. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_institution_search_request.py +0 -0
  233. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_instruments_request.py +0 -0
  234. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_instruments_request_v2.py +0 -0
  235. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_news_detail_request.py +0 -0
  236. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_news_search_request.py +0 -0
  237. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_noii_bars_request.py +0 -0
  238. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_noii_snapshot_request.py +0 -0
  239. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_option_bars_request.py +0 -0
  240. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_option_contracts_request.py +0 -0
  241. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_option_contracts_request_v2.py +0 -0
  242. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_option_snapshot_request.py +0 -0
  243. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_option_tick_request.py +0 -0
  244. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_post_request.py +0 -0
  245. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_quotes_request.py +0 -0
  246. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_sec_filings_request.py +0 -0
  247. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_snapshot_request.py +0 -0
  248. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_stock_news_request.py +0 -0
  249. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/get_tick_request.py +0 -0
  250. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/list_hot_stocks_request.py +0 -0
  251. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/list_my_posts_request.py +0 -0
  252. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/list_posts_by_symbol_request.py +0 -0
  253. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/__init__.py +0 -0
  254. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_52whl_request.py +0 -0
  255. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_52whl_request_v2.py +0 -0
  256. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_fear_and_greed_index_request.py +0 -0
  257. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_gainers_losers_request.py +0 -0
  258. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_gainers_losers_request_v2.py +0 -0
  259. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_high_dividend_request.py +0 -0
  260. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_high_dividend_request_v2.py +0 -0
  261. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_market_sectors_detail_request.py +0 -0
  262. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_market_sectors_detail_request_v2.py +0 -0
  263. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_market_sectors_request.py +0 -0
  264. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_market_sectors_request_v2.py +0 -0
  265. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_most_active_request.py +0 -0
  266. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_most_active_request_v2.py +0 -0
  267. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/screener/get_stock_unusual_activities_request.py +0 -0
  268. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/subscribe_request.py +0 -0
  269. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/unsubscribe_request.py +0 -0
  270. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/__init__.py +0 -0
  271. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/add_watchlist_instruments_request.py +0 -0
  272. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/create_watchlist_request.py +0 -0
  273. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/delete_watchlist_request.py +0 -0
  274. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/get_watchlist_instruments_request.py +0 -0
  275. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/get_watchlist_request.py +0 -0
  276. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/remove_watchlist_instruments_request.py +0 -0
  277. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/update_watchlist_instruments_request.py +0 -0
  278. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/data/request/watchlist/update_watchlist_request.py +0 -0
  279. {webull_openapi_python_sdk-3.0.4/webull/trade/events → webull_openapi_python_sdk-3.1.0/webull/trade/common}/__init__.py +0 -0
  280. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/account_type.py +0 -0
  281. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/category.py +0 -0
  282. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/combo_ticker_type.py +0 -0
  283. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/combo_type.py +0 -0
  284. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/currency.py +0 -0
  285. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/forbid_reason.py +0 -0
  286. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/instrument_type.py +0 -0
  287. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/markets.py +0 -0
  288. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/order_entrust_type.py +0 -0
  289. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/order_side.py +0 -0
  290. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/order_status.py +0 -0
  291. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/order_tif.py +0 -0
  292. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/order_type.py +0 -0
  293. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/position_intent.py +0 -0
  294. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/trade_policy.py +0 -0
  295. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/trading_date_type.py +0 -0
  296. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/trailing_type.py +0 -0
  297. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/common/transfer_activities_param.py +0 -0
  298. {webull_openapi_python_sdk-3.0.4/webull/trade/request → webull_openapi_python_sdk-3.1.0/webull/trade/events}/__init__.py +0 -0
  299. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/events/default_retry_policy.py +0 -0
  300. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/events/events_pb2.py +0 -0
  301. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/events/events_pb2_grpc.py +0 -0
  302. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/events/signature_composer.py +0 -0
  303. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/events/types.py +0 -0
  304. {webull_openapi_python_sdk-3.0.4/webull/trade/request/v2 → webull_openapi_python_sdk-3.1.0/webull/trade/request}/__init__.py +0 -0
  305. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/cancel_order_request.py +0 -0
  306. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_account_balance_request.py +0 -0
  307. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_account_positions_request.py +0 -0
  308. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_account_profile_request.py +0 -0
  309. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_activities_request.py +0 -0
  310. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_activities_request_v2.py +0 -0
  311. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_app_subscriptions.py +0 -0
  312. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_open_orders_request.py +0 -0
  313. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_order_detail_request.py +0 -0
  314. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_today_orders_request.py +0 -0
  315. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_trade_calendar_request.py +0 -0
  316. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_trade_instrument_detail_request.py +0 -0
  317. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_trade_security_detail_request.py +0 -0
  318. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/get_tradeable_instruments_request.py +0 -0
  319. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/palce_order_request.py +0 -0
  320. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/place_order_request.py +0 -0
  321. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/place_order_request_v2.py +0 -0
  322. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/replace_order_request.py +0 -0
  323. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/replace_order_request_v2.py +0 -0
  324. {webull_openapi_python_sdk-3.0.4/webull/trade/request/v3 → webull_openapi_python_sdk-3.1.0/webull/trade/request/v2}/__init__.py +0 -0
  325. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/cancel_option_request.py +0 -0
  326. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/cancel_order_request.py +0 -0
  327. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_account_balance_request.py +0 -0
  328. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_account_list.py +0 -0
  329. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_account_list_request.py +0 -0
  330. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_account_position_details_request.py +0 -0
  331. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_account_position_details_request_v2.py +0 -0
  332. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_account_positions_request.py +0 -0
  333. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_order_detail_request.py +0 -0
  334. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_order_executions_request.py +0 -0
  335. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_order_executions_request_v2.py +0 -0
  336. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_order_history_request.py +0 -0
  337. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/get_order_open_request.py +0 -0
  338. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/palce_order_request.py +0 -0
  339. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/place_option_request.py +0 -0
  340. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/place_order_request.py +0 -0
  341. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/preview_option_request.py +0 -0
  342. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/preview_order_request.py +0 -0
  343. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/replace_option_request.py +0 -0
  344. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v2/replace_order_request.py +0 -0
  345. {webull_openapi_python_sdk-3.0.4/webull/trade/trade → webull_openapi_python_sdk-3.1.0/webull/trade/request/v3}/__init__.py +0 -0
  346. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/batch_place_order_request.py +0 -0
  347. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/cancel_order_request.py +0 -0
  348. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/get_order_detail_request.py +0 -0
  349. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/get_order_history_request.py +0 -0
  350. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/get_order_history_request_v2.py +0 -0
  351. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/get_order_open_request.py +0 -0
  352. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/get_order_open_request_v2.py +0 -0
  353. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/get_transfer_activities_detail_request.py +0 -0
  354. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/get_transfer_activities_request.py +0 -0
  355. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/place_order_request.py +0 -0
  356. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/preview_order_request.py +0 -0
  357. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/request/v3/replace_order_request.py +0 -0
  358. {webull_openapi_python_sdk-3.0.4/webull/trade/trade/v2 → webull_openapi_python_sdk-3.1.0/webull/trade/trade}/__init__.py +0 -0
  359. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/activity.py +0 -0
  360. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/order_operation.py +0 -0
  361. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/trade_calendar.py +0 -0
  362. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/trade_instrument.py +0 -0
  363. {webull_openapi_python_sdk-3.0.4/webull/trade/trade/v3 → webull_openapi_python_sdk-3.1.0/webull/trade/trade/v2}/__init__.py +0 -0
  364. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/v2/account_info_v2.py +0 -0
  365. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/v2/order_operation_v2.py +0 -0
  366. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade/v3/order_operation_v3.py +0 -0
  367. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade_client.py +0 -0
  368. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull/trade/trade_events_client.py +0 -0
  369. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull_openapi_python_sdk.egg-info/dependency_links.txt +0 -0
  370. {webull_openapi_python_sdk-3.0.4 → webull_openapi_python_sdk-3.1.0}/webull_openapi_python_sdk.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webull-openapi-python-sdk
3
- Version: 3.0.4
3
+ Version: 3.1.0
4
4
  Summary: Webull Python SDK.
5
5
  Home-page:
6
6
  Author: Webull
@@ -16,6 +16,7 @@ Requires-Dist: cachetools<6,>=5.2.0
16
16
  Requires-Dist: paho-mqtt<2,>=1.6.1
17
17
  Requires-Dist: urllib3>=2.0
18
18
  Requires-Dist: requests>=2.31.0
19
+ Requires-Dist: httpx[http2]<0.29,>=0.28.1
19
20
  Requires-Dist: six>=1.16.0
20
21
  Requires-Dist: cryptography<42,>=3.4; python_version < "3.12"
21
22
  Requires-Dist: cryptography<43,>=41.0; python_version >= "3.12" and python_version < "3.14"
@@ -0,0 +1 @@
1
+ __version__ = '3.1.0'
@@ -0,0 +1,58 @@
1
+ # Copyright 2022 Webull
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import logging
16
+
17
+ from webull.trade.events.types import ORDER_STATUS_CHANGED, EVENT_TYPE_ORDER, EVENT_TYPE_POSITION, \
18
+ POSITION_STATUS_CHANGED, EVENT_TYPE_OPTION, OPTION_STATUS_CHANGED
19
+ from webull.trade.trade_events_sse_client import TradeEventsSseClient
20
+
21
+ your_app_key = "<your_app_key>"
22
+ your_app_secret = "<your_app_secret>"
23
+ account_id = "<your_account_id>"
24
+ region_id = "<region_id>"
25
+
26
+ optional_api_endpoint = "<event_api_endpoint>"
27
+
28
+
29
+ def _on_log(level, log_content):
30
+ print(logging.getLevelName(level), log_content)
31
+
32
+
33
+ def my_on_events_message(event_type, subscribe_type, payload, raw_message):
34
+ if EVENT_TYPE_ORDER == event_type and ORDER_STATUS_CHANGED == subscribe_type:
35
+ print('----request_id:%s----' % payload['request_id'])
36
+ print(payload)
37
+ if EVENT_TYPE_POSITION == event_type and POSITION_STATUS_CHANGED == subscribe_type:
38
+ print('event payload:%s' % payload)
39
+ if EVENT_TYPE_OPTION == event_type and OPTION_STATUS_CHANGED == subscribe_type:
40
+ print('option payload:%s' % payload)
41
+
42
+
43
+ if __name__ == '__main__':
44
+ # Create SSE EventsClient instance
45
+ trade_events_sse_client = TradeEventsSseClient(your_app_key, your_app_secret, region_id)
46
+ # [Important] For non production environment, you need to set the domain name of the subscription service through events client. For example, the domain name of the UAT environment is set here
47
+ # [Important] The SSE endpoint shares the public port and TLS settings with the gRPC channel, the defaults (443, TLS) apply
48
+ # trade_events_sse_client = TradeEventsSseClient(your_app_key, your_app_secret, region_id, host=optional_api_endpoint)
49
+ trade_events_sse_client.on_log = _on_log
50
+
51
+ # Set the callback function when the event data is received.
52
+ # The data of order status change is printed here
53
+
54
+ trade_events_sse_client.on_events_message = my_on_events_message
55
+ # Set the account ID to be subscribed and initiate the subscription. This method is synchronous
56
+ # Note: one app key can hold only one active subscription across the gRPC and SSE channels,
57
+ # close the gRPC subscription first, otherwise the request is rejected with HTTP 429
58
+ trade_events_sse_client.do_subscribe([account_id])
@@ -20,6 +20,7 @@ requires = [
20
20
  "paho-mqtt>=1.6.1,<2",
21
21
  "urllib3>=2.0",
22
22
  "requests>=2.31.0",
23
+ "httpx[http2]>=0.28.1,<0.29",
23
24
  "six>=1.16.0",
24
25
 
25
26
  # cryptography
@@ -0,0 +1 @@
1
+ __version__ = '3.1.0'
@@ -1,4 +1,4 @@
1
- __version__ = '3.0.4'
1
+ __version__ = '3.1.0'
2
2
 
3
3
  import logging
4
4
 
@@ -0,0 +1,113 @@
1
+ # Copyright 2022 Webull
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # coding=utf-8
16
+ import httpx
17
+
18
+ from webull.core.retry.backoff_strategy import (
19
+ BackoffStrategy, FixedDelayStrategy, JitteredExponentialBackoffStrategy)
20
+ from webull.core.retry.retry_condition import (
21
+ MaxRetryTimesCondition, MergeRetryCondition, RetryCondition)
22
+ from webull.core.retry.retry_policy import RetryPolicy
23
+ from webull.core.retry.retry_policy_context import RetryPolicyContext
24
+
25
+
26
+ class SseSubscribeRetryPolicyContext(RetryPolicyContext):
27
+ """Retry context of the SSE subscription.
28
+
29
+ ``http_status_code`` is None when the failure happened on an already
30
+ established stream (connection reset, read timeout, server closed the
31
+ stream) or before any HTTP response was received.
32
+ """
33
+
34
+ def __init__(self, exception, retries_attempted, http_status_code):
35
+ super().__init__(None, exception, retries_attempted, http_status_code)
36
+
37
+ def __str__(self):
38
+ return "exception:%s, retries:%s, http_status_code:%s" % (
39
+ self.exception, self.retries_attempted, self.http_status_code)
40
+
41
+
42
+ class RetryOnSseHttpStatusCondition(RetryCondition):
43
+ # 429 is the session mutex rejection, it must be retried with backoff.
44
+ # 5xx are transient server side failures.
45
+ DEFAULT_RETRYABLE_HTTP_STATUS_LIST = [429, 500, 502, 503, 504]
46
+ THROTTLING_HTTP_STATUS_LIST = [429]
47
+
48
+ def __init__(self, retryable_http_status_list=None):
49
+ if retryable_http_status_list:
50
+ self.retryable_http_status_list = retryable_http_status_list
51
+ else:
52
+ self.retryable_http_status_list = self.DEFAULT_RETRYABLE_HTTP_STATUS_LIST
53
+
54
+ def should_retry(self, retry_policy_context):
55
+ http_status_code = retry_policy_context.http_status_code
56
+ if http_status_code is None:
57
+ exception = retry_policy_context.exception
58
+ # A stream closed by the server (no exception) or a transport level
59
+ # failure: the SSE channel has no resume support so a brand new
60
+ # subscription is the only way to keep receiving events.
61
+ if exception is None or isinstance(exception, httpx.TransportError):
62
+ return RetryCondition.RETRY
63
+ # Any other exception (e.g. raised by a user callback or a payload
64
+ # that cannot be decoded) would happen again after reconnecting,
65
+ # surface it to the caller instead, same as the gRPC channel.
66
+ return RetryCondition.NO_RETRY
67
+ if http_status_code in self.retryable_http_status_list:
68
+ if http_status_code in self.THROTTLING_HTTP_STATUS_LIST:
69
+ return RetryCondition.RETRY | RetryCondition.SHOULD_RETRY_WITH_THROTTLING_BACKOFF
70
+ return RetryCondition.RETRY
71
+ # 400/401/403/404/405 are caused by the request itself, retrying with
72
+ # the same parameters would fail again.
73
+ return RetryCondition.NO_RETRY
74
+
75
+
76
+ class DefaultSseSubscribeRetryCondition(RetryCondition):
77
+ def __init__(self, max_retry_times=-1):
78
+ RetryCondition.__init__(self)
79
+ if max_retry_times < 0:
80
+ _conditions = []
81
+ else:
82
+ _conditions = [MaxRetryTimesCondition(max_retry_times)]
83
+ _conditions.append(RetryOnSseHttpStatusCondition())
84
+ self._condition = MergeRetryCondition(_conditions)
85
+
86
+ def should_retry(self, retry_policy_context):
87
+ return self._condition.should_retry(retry_policy_context)
88
+
89
+
90
+ class SseSubscribeBackoffStrategy(BackoffStrategy):
91
+ """Fixed delay for regular reconnects, jittered backoff for 429 rejections."""
92
+
93
+ DEFAULT_THROTTLED_BASE_DELAY = 5000
94
+ DEFAULT_THROTTLED_MAX_DELAY = 60000
95
+
96
+ def __init__(self, fixed_delay=5000, throttled_base_delay=None, throttled_max_delay=None):
97
+ self._fixed_backoff_strategy = FixedDelayStrategy(fixed_delay)
98
+ self._throttled_backoff_strategy = JitteredExponentialBackoffStrategy(
99
+ throttled_base_delay or self.DEFAULT_THROTTLED_BASE_DELAY,
100
+ throttled_max_delay or self.DEFAULT_THROTTLED_MAX_DELAY)
101
+
102
+ def compute_delay_before_next_retry(self, retry_policy_context):
103
+ if retry_policy_context.retryable & RetryCondition.SHOULD_RETRY_WITH_THROTTLING_BACKOFF:
104
+ return self._throttled_backoff_strategy.compute_delay_before_next_retry(
105
+ retry_policy_context)
106
+ return self._fixed_backoff_strategy.compute_delay_before_next_retry(
107
+ retry_policy_context)
108
+
109
+
110
+ class DefaultSseSubscribeRetryPolicy(RetryPolicy):
111
+ def __init__(self, max_retry_times=-1, fixed_delay=5000):
112
+ RetryPolicy.__init__(self, DefaultSseSubscribeRetryCondition(max_retry_times),
113
+ SseSubscribeBackoffStrategy(fixed_delay))
@@ -0,0 +1,73 @@
1
+ # Copyright 2022 Webull
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # coding=utf-8
16
+ import logging
17
+
18
+ from webull.core.auth.algorithm import sha_hmac256_new
19
+ from webull.core.auth.composer import default_signature_composer
20
+ import webull.core.headers as hd
21
+ import webull.core.utils.common as core_common
22
+
23
+ logger = logging.getLogger(__name__)
24
+
25
+
26
+ def _build_sign_headers(app_key_id, signer_spec):
27
+ return {
28
+ hd.APP_KEY: app_key_id,
29
+ hd.SIGN_ALGORITHM: signer_spec.get_signer_name(),
30
+ hd.SIGN_VERSION: signer_spec.get_signer_version(),
31
+ hd.NONCE: core_common.get_uuid(),
32
+ hd.TIMESTAMP: core_common.get_iso_8601_date()
33
+ }
34
+
35
+
36
+ def _get_body_string(body_bytes, signer_spec):
37
+ """Hash the exact bytes that will be sent as the HTTP request body.
38
+
39
+ The SSE channel signs the raw JSON body bytes, unlike the gRPC channel
40
+ which signs the protobuf serialized bytes of SubscribeRequest.
41
+ """
42
+ if body_bytes:
43
+ if signer_spec == sha_hmac256_new:
44
+ return core_common.sha256_hex(body_bytes)
45
+ return core_common.md5_hex(body_bytes)
46
+ return None
47
+
48
+
49
+ def calc_signature(app_key_id, app_key_secret, body_bytes, signer_spec):
50
+ """Sign an SSE subscribe request.
51
+
52
+ Args:
53
+ app_key_id: application app key.
54
+ app_key_secret: application app secret.
55
+ body_bytes: raw bytes of the JSON request body, exactly as sent.
56
+ signer_spec: signing algorithm module, e.g. sha_hmac256_new or sha_hmac1.
57
+
58
+ Returns:
59
+ tuple of (signature, headers dict) where headers already contains the
60
+ five signing headers plus x-signature.
61
+ """
62
+ headers = _build_sign_headers(app_key_id, signer_spec)
63
+ sign_params = default_signature_composer._lower_key_dict(headers)
64
+ logger.debug("sign_params:%s", sign_params)
65
+ body_string = _get_body_string(body_bytes, signer_spec)
66
+ logger.debug("body_string:%s", body_string)
67
+ string_to_sign = default_signature_composer._build_sign_string(
68
+ sign_params, None, body_string)
69
+ logger.debug("string_to_sign:%s", string_to_sign)
70
+ signature = default_signature_composer._gen_signature(
71
+ string_to_sign, app_key_secret, signer_spec)
72
+ headers[hd.SIGNATURE] = signature
73
+ return signature, headers
@@ -0,0 +1,69 @@
1
+ # Copyright 2022 Webull
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # coding=utf-8
16
+
17
+ # Default event name used when the server omits the "event" field.
18
+ DEFAULT_EVENT_NAME = "message"
19
+
20
+ _FIELD_EVENT = "event"
21
+ _FIELD_DATA = "data"
22
+
23
+
24
+ def _decode_line(line):
25
+ if line is None:
26
+ return None
27
+ if isinstance(line, bytes):
28
+ return line.decode("utf-8", "replace")
29
+ return line
30
+
31
+
32
+ def iter_sse_frames(lines):
33
+ """Turn a raw SSE line stream into (event_name, data) tuples.
34
+
35
+ Args:
36
+ lines: iterator over the response lines, either bytes or str.
37
+ Typically ``httpx.Response.iter_lines()``.
38
+
39
+ Yields:
40
+ tuple of (event name, data payload). Multiple ``data:`` lines of the
41
+ same frame are joined with a newline, as required by the SSE spec.
42
+ """
43
+ event_name = None
44
+ data_lines = []
45
+ for raw_line in lines:
46
+ line = _decode_line(raw_line)
47
+ if line is None:
48
+ continue
49
+ line = line.rstrip("\r")
50
+ if not line:
51
+ # Blank line terminates the current frame.
52
+ if event_name is not None or data_lines:
53
+ yield event_name or DEFAULT_EVENT_NAME, "\n".join(data_lines)
54
+ event_name = None
55
+ data_lines = []
56
+ continue
57
+ if line.startswith(":"):
58
+ # Comment line, used by some servers to keep the connection alive.
59
+ continue
60
+ field, _, value = line.partition(":")
61
+ if value.startswith(" "):
62
+ value = value[1:]
63
+ if field == _FIELD_EVENT:
64
+ event_name = value
65
+ elif field == _FIELD_DATA:
66
+ data_lines.append(value)
67
+ # Other fields (id, retry) are not used by this channel.
68
+ if event_name is not None or data_lines:
69
+ yield event_name or DEFAULT_EVENT_NAME, "\n".join(data_lines)
@@ -0,0 +1,84 @@
1
+ # Copyright 2022 Webull
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # coding=utf-8
16
+ import json
17
+
18
+ # Control event type values, kept identical to the gRPC EventType enum.
19
+ # Declared locally so that the SSE channel does not depend on protobuf.
20
+ SUBSCRIBE_SUCCESS = 0
21
+ PING = 1
22
+ AUTH_ERROR = 2
23
+ NUM_OF_CONN_EXCEED = 3
24
+ SUBSCRIBE_EXPIRED = 4
25
+
26
+ # SSE frame names pushed by the server.
27
+ EVENT_SUBSCRIBE_SUCCESS = "subscribeSuccess"
28
+ EVENT_PING = "ping"
29
+ EVENT_BUSINESS = "event"
30
+ EVENT_SUBSCRIBE_EXPIRED = "subscribeExpired"
31
+ EVENT_AUTH_ERROR = "authError"
32
+ EVENT_NUM_OF_CONN_EXCEED = "numOfConnExceed"
33
+
34
+ # Control frames are identified by the SSE frame name, not by the eventType
35
+ # value in the data (zero value fields such as eventType 0 are omitted).
36
+ EVENT_NAME_TO_EVENT_TYPE = {
37
+ EVENT_SUBSCRIBE_SUCCESS: SUBSCRIBE_SUCCESS,
38
+ EVENT_PING: PING,
39
+ EVENT_AUTH_ERROR: AUTH_ERROR,
40
+ EVENT_NUM_OF_CONN_EXCEED: NUM_OF_CONN_EXCEED,
41
+ EVENT_SUBSCRIBE_EXPIRED: SUBSCRIBE_EXPIRED,
42
+ }
43
+
44
+
45
+ class SseSubscribeResponse:
46
+ """Decoded SSE frame exposing the same fields as the gRPC SubscribeResponse.
47
+
48
+ Field names intentionally match the protobuf message (``eventType``,
49
+ ``subscribeType``, ``contentType``, ``payload``, ``requestId``,
50
+ ``timestamp``) so that callbacks written against the gRPC channel keep
51
+ working without changes.
52
+ """
53
+
54
+ def __init__(self, event, data):
55
+ """
56
+ Args:
57
+ event: SSE frame name, e.g. ``subscribeSuccess``, ``ping``, ``event``.
58
+ data: raw ``data:`` payload of the frame, a JSON string.
59
+
60
+ Raises:
61
+ ValueError: the frame data is not a JSON object.
62
+ """
63
+ self.event = event
64
+ self.raw_data = data
65
+ fields = json.loads(data) if data else {}
66
+ if not isinstance(fields, dict):
67
+ raise ValueError("unexpected sse data, not a json object: %s" % data)
68
+ if event in EVENT_NAME_TO_EVENT_TYPE:
69
+ self.eventType = EVENT_NAME_TO_EVENT_TYPE[event]
70
+ else:
71
+ self.eventType = fields.get("eventType")
72
+ self.subscribeType = fields.get("subscribeType", 0)
73
+ self.contentType = fields.get("contentType", "")
74
+ self.payload = fields.get("payload", "")
75
+ self.requestId = fields.get("requestId", "")
76
+ self.timestamp = fields.get("timestamp", 0)
77
+
78
+ def __str__(self):
79
+ return ("event:%s, eventType:%s, subscribeType:%s, contentType:%s, "
80
+ "requestId:%s, timestamp:%s, payload:%s") % (
81
+ self.event, self.eventType, self.subscribeType, self.contentType,
82
+ self.requestId, self.timestamp, self.payload)
83
+
84
+ __repr__ = __str__
@@ -0,0 +1,3 @@
1
+ # coding=utf-8
2
+
3
+ __version__ = '3.1.0'
@@ -0,0 +1 @@
1
+ __version__ = '3.1.0'
@@ -44,7 +44,7 @@ class Account:
44
44
 
45
45
  :param account_id: Account ID
46
46
  :param total_asset_currency: The currency in which the total assets are denominated: the value refers to Currency
47
- in the dictionary value. If it is empty, it defaults to HKD
47
+ in the dictionary value.
48
48
  """
49
49
  account_balance_request = AccountBalanceRequest()
50
50
  account_balance_request.set_account_id(account_id)