webull-openapi-python-sdk 2.0.0__tar.gz → 2.0.2__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 (263) hide show
  1. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/PKG-INFO +1 -1
  2. webull_openapi_python_sdk-2.0.2/samples/__init__.py +1 -0
  3. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/data/data_client_event.py +19 -2
  4. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/data/data_streaming_client_event.py +1 -1
  5. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/trade/trade_client_v3.py +2 -0
  6. webull_openapi_python_sdk-2.0.2/webull/__init__.py +1 -0
  7. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/__init__.py +1 -1
  8. webull_openapi_python_sdk-2.0.2/webull/data/__init__.py +3 -0
  9. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/data_streaming_client.py +3 -1
  10. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/event_market_data.py +42 -0
  11. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/instrument.py +44 -7
  12. webull_openapi_python_sdk-2.0.2/webull/data/quotes/subscribe/event_tick_decoder.py +30 -0
  13. webull_openapi_python_sdk-2.0.2/webull/data/quotes/subscribe/event_tick_result.py +56 -0
  14. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/message_pb2.py +3 -1
  15. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/payload_type.py +2 -1
  16. webull_openapi_python_sdk-2.0.2/webull/data/request/get_event_bars_request.py +43 -0
  17. webull_openapi_python_sdk-2.0.2/webull/data/request/get_event_events_request.py +33 -0
  18. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_event_instrument_request.py +9 -0
  19. webull_openapi_python_sdk-2.0.2/webull/data/request/get_event_series_categories.py +21 -0
  20. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_event_series_request.py +8 -2
  21. webull_openapi_python_sdk-2.0.2/webull/data/request/get_event_tick_request.py +32 -0
  22. webull_openapi_python_sdk-2.0.2/webull/trade/__init__.py +1 -0
  23. webull_openapi_python_sdk-2.0.2/webull/trade/common/position_intent.py +24 -0
  24. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade_events_client.py +5 -1
  25. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull_openapi_python_sdk.egg-info/PKG-INFO +1 -1
  26. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull_openapi_python_sdk.egg-info/SOURCES.txt +7 -0
  27. webull_openapi_python_sdk-2.0.0/samples/__init__.py +0 -1
  28. webull_openapi_python_sdk-2.0.0/webull/__init__.py +0 -1
  29. webull_openapi_python_sdk-2.0.0/webull/data/__init__.py +0 -3
  30. webull_openapi_python_sdk-2.0.0/webull/trade/__init__.py +0 -1
  31. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/ChangeLog.txt +0 -0
  32. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/LICENSE +0 -0
  33. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/MANIFEST.in +0 -0
  34. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/NOTICE +0 -0
  35. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/README.rst +0 -0
  36. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/account/__init__.py +0 -0
  37. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/account/account_client.py +0 -0
  38. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/assets/__init__.py +0 -0
  39. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/assets/assets_client.py +0 -0
  40. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/data/__init__.py +0 -0
  41. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/data/data_client.py +0 -0
  42. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/data/data_streaming_client.py +0 -0
  43. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/data/data_streaming_client_async.py +0 -0
  44. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/order/__init__.py +0 -0
  45. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/order/order_option_client.py +0 -0
  46. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/order/order_stock_client.py +0 -0
  47. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/trade/__init__.py +0 -0
  48. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/trade/trade_client.py +0 -0
  49. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/trade/trade_client_v2.py +0 -0
  50. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/trade/trade_client_v3_event.py +0 -0
  51. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/samples/trade/trade_event_client.py +0 -0
  52. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/setup.cfg +0 -0
  53. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/setup.py +0 -0
  54. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/__init__.py +0 -0
  55. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/algorithm/__init__.py +0 -0
  56. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/algorithm/sha_hmac1.py +0 -0
  57. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/algorithm/sha_hmac256.py +0 -0
  58. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/composer/__init__.py +0 -0
  59. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/composer/default_signature_composer.py +0 -0
  60. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/credentials.py +0 -0
  61. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/signers/__init__.py +0 -0
  62. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/signers/app_key_signer.py +0 -0
  63. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/signers/signer.py +0 -0
  64. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/auth/signers/signer_factory.py +0 -0
  65. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/cache/__init__.py +0 -0
  66. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/client.py +0 -0
  67. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/common/__init__.py +0 -0
  68. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/common/api_type.py +0 -0
  69. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/common/easy_enum.py +0 -0
  70. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/common/region.py +0 -0
  71. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/compat.py +0 -0
  72. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/context/__init__.py +0 -0
  73. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/context/request_context_holder.py +0 -0
  74. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/data/endpoints.json +0 -0
  75. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/data/retry_config.json +0 -0
  76. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/endpoint/__init__.py +0 -0
  77. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/endpoint/chained_endpoint_resolver.py +0 -0
  78. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/endpoint/default_endpoint_resolver.py +0 -0
  79. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/endpoint/local_config_regional_endpoint_resolver.py +0 -0
  80. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/endpoint/resolver_endpoint_request.py +0 -0
  81. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/endpoint/user_customized_endpoint_resolver.py +0 -0
  82. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/exception/__init__.py +0 -0
  83. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/exception/error_code.py +0 -0
  84. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/exception/error_msg.py +0 -0
  85. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/exception/exceptions.py +0 -0
  86. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/headers.py +0 -0
  87. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/__init__.py +0 -0
  88. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/__init__.py +0 -0
  89. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/client_initializer.py +0 -0
  90. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/config/__init__.py +0 -0
  91. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/config/bean/__init__.py +0 -0
  92. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/config/bean/query_config_request.py +0 -0
  93. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/config/config_operation.py +0 -0
  94. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/__init__.py +0 -0
  95. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/bean/__init__.py +0 -0
  96. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/bean/access_token.py +0 -0
  97. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/bean/check_token_request.py +0 -0
  98. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/bean/create_token_request.py +0 -0
  99. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/bean/refresh_token_request.py +0 -0
  100. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/token_manager.py +0 -0
  101. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/token_operation.py +0 -0
  102. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/initializer/token/token_storage.py +0 -0
  103. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/method_type.py +0 -0
  104. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/protocol_type.py +0 -0
  105. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/request.py +0 -0
  106. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/http/response.py +0 -0
  107. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/request.py +0 -0
  108. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/retry/__init__.py +0 -0
  109. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/retry/backoff_strategy.py +0 -0
  110. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/retry/retry_condition.py +0 -0
  111. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/retry/retry_policy.py +0 -0
  112. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/retry/retry_policy_context.py +0 -0
  113. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/utils/__init__.py +0 -0
  114. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/utils/common.py +0 -0
  115. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/utils/data.py +0 -0
  116. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/utils/desensitize.py +0 -0
  117. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/core/utils/validation.py +0 -0
  118. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/__init__.py +0 -0
  119. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/category.py +0 -0
  120. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/connect_ack.py +0 -0
  121. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/contract_type.py +0 -0
  122. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/direction.py +0 -0
  123. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/exchange_code.py +0 -0
  124. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/exercise_style.py +0 -0
  125. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/expiration_cycle.py +0 -0
  126. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/instrument_status.py +0 -0
  127. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/option_type.py +0 -0
  128. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/subscribe_type.py +0 -0
  129. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/common/timespan.py +0 -0
  130. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/data_client.py +0 -0
  131. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/internal/__init__.py +0 -0
  132. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/internal/default_retry_policy.py +0 -0
  133. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/internal/exceptions.py +0 -0
  134. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/internal/quotes_client.py +0 -0
  135. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/internal/quotes_decoder.py +0 -0
  136. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/internal/quotes_payload_decoder.py +0 -0
  137. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/internal/quotes_topic.py +0 -0
  138. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/__init__.py +0 -0
  139. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/crypto_market_data.py +0 -0
  140. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/futures_market_data.py +0 -0
  141. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/market_data.py +0 -0
  142. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/market_streaming_data.py +0 -0
  143. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/__init__.py +0 -0
  144. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/ask_bid_result.py +0 -0
  145. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/basic_result.py +0 -0
  146. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/broker_result.py +0 -0
  147. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/event_depth_decoder.py +0 -0
  148. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/event_depth_result.py +0 -0
  149. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/event_snapshot_decoder.py +0 -0
  150. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/event_snapshot_result.py +0 -0
  151. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/order_result.py +0 -0
  152. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/quote_decoder.py +0 -0
  153. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/quote_result.py +0 -0
  154. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/snapshot_decoder.py +0 -0
  155. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/snapshot_result.py +0 -0
  156. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/tick_decoder.py +0 -0
  157. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/quotes/subscribe/tick_result.py +0 -0
  158. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/__init__.py +0 -0
  159. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_batch_historical_bars_request.py +0 -0
  160. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_corp_action_request.py +0 -0
  161. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_crypto_historical_bars_request.py +0 -0
  162. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_crypto_instruments_request.py +0 -0
  163. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_crypto_snapshot_request.py +0 -0
  164. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_eod_bars_request.py +0 -0
  165. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_event_depth_request.py +0 -0
  166. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_event_snapshot_request.py +0 -0
  167. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_footprint_request.py +0 -0
  168. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_depth_request.py +0 -0
  169. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_footprint_request.py +0 -0
  170. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_historical_bars_request.py +0 -0
  171. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_instruments_by_code_request.py +0 -0
  172. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_instruments_request.py +0 -0
  173. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_products_request.py +0 -0
  174. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_snapshot_request.py +0 -0
  175. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_futures_tick_request.py +0 -0
  176. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_historical_bars_request.py +0 -0
  177. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_instruments_request.py +0 -0
  178. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_quotes_request.py +0 -0
  179. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_snapshot_request.py +0 -0
  180. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/get_tick_request.py +0 -0
  181. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/subscribe_request.py +0 -0
  182. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/data/request/unsubscribe_request.py +0 -0
  183. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/__init__.py +0 -0
  184. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/account_type.py +0 -0
  185. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/category.py +0 -0
  186. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/combo_ticker_type.py +0 -0
  187. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/combo_type.py +0 -0
  188. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/currency.py +0 -0
  189. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/forbid_reason.py +0 -0
  190. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/instrument_type.py +0 -0
  191. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/markets.py +0 -0
  192. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/order_entrust_type.py +0 -0
  193. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/order_side.py +0 -0
  194. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/order_status.py +0 -0
  195. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/order_tif.py +0 -0
  196. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/order_type.py +0 -0
  197. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/trade_policy.py +0 -0
  198. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/trading_date_type.py +0 -0
  199. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/common/trailing_type.py +0 -0
  200. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/events/__init__.py +0 -0
  201. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/events/default_retry_policy.py +0 -0
  202. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/events/events_pb2.py +0 -0
  203. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/events/events_pb2_grpc.py +0 -0
  204. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/events/signature_composer.py +0 -0
  205. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/events/types.py +0 -0
  206. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/__init__.py +0 -0
  207. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/cancel_order_request.py +0 -0
  208. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_account_balance_request.py +0 -0
  209. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_account_positions_request.py +0 -0
  210. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_account_profile_request.py +0 -0
  211. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_app_subscriptions.py +0 -0
  212. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_open_orders_request.py +0 -0
  213. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_order_detail_request.py +0 -0
  214. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_today_orders_request.py +0 -0
  215. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_trade_calendar_request.py +0 -0
  216. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_trade_instrument_detail_request.py +0 -0
  217. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_trade_security_detail_request.py +0 -0
  218. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/get_tradeable_instruments_request.py +0 -0
  219. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/palce_order_request.py +0 -0
  220. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/place_order_request.py +0 -0
  221. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/place_order_request_v2.py +0 -0
  222. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/replace_order_request.py +0 -0
  223. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/replace_order_request_v2.py +0 -0
  224. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/__init__.py +0 -0
  225. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/cancel_option_request.py +0 -0
  226. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/cancel_order_request.py +0 -0
  227. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/get_account_balance_request.py +0 -0
  228. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/get_account_list.py +0 -0
  229. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/get_account_list_request.py +0 -0
  230. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/get_account_positions_request.py +0 -0
  231. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/get_order_detail_request.py +0 -0
  232. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/get_order_history_request.py +0 -0
  233. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/get_order_open_request.py +0 -0
  234. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/palce_order_request.py +0 -0
  235. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/place_option_request.py +0 -0
  236. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/place_order_request.py +0 -0
  237. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/preview_option_request.py +0 -0
  238. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/preview_order_request.py +0 -0
  239. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/replace_option_request.py +0 -0
  240. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v2/replace_order_request.py +0 -0
  241. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/__init__.py +0 -0
  242. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/batch_place_order_request.py +0 -0
  243. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/cancel_order_request.py +0 -0
  244. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/get_order_detail_request.py +0 -0
  245. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/get_order_history_request.py +0 -0
  246. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/get_order_open_request.py +0 -0
  247. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/place_order_request.py +0 -0
  248. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/preview_order_request.py +0 -0
  249. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/request/v3/replace_order_request.py +0 -0
  250. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/__init__.py +0 -0
  251. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/account_info.py +0 -0
  252. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/order_operation.py +0 -0
  253. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/trade_calendar.py +0 -0
  254. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/trade_instrument.py +0 -0
  255. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/v2/__init__.py +0 -0
  256. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/v2/account_info_v2.py +0 -0
  257. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/v2/order_operation_v2.py +0 -0
  258. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/v3/__init__.py +0 -0
  259. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade/v3/order_opration_v3.py +0 -0
  260. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull/trade/trade_client.py +0 -0
  261. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull_openapi_python_sdk.egg-info/dependency_links.txt +0 -0
  262. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/webull_openapi_python_sdk.egg-info/requires.txt +0 -0
  263. {webull_openapi_python_sdk-2.0.0 → webull_openapi_python_sdk-2.0.2}/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: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: Webull Python SDK.
5
5
  Home-page:
6
6
  Author: Webull
@@ -0,0 +1 @@
1
+ __version__ = '2.0.2'
@@ -11,6 +11,7 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+ from webull.data.common.timespan import Timespan
14
15
 
15
16
  # coding=utf-8
16
17
 
@@ -35,11 +36,19 @@ api_client.add_endpoint(region_id, optional_api_endpoint)
35
36
  if __name__ == '__main__':
36
37
  data_client = DataClient(api_client)
37
38
 
39
+ res = data_client.instrument.get_event_categories()
40
+ if res.status_code == 200:
41
+ print('get_event_categories:', res.json())
42
+
38
43
  res = data_client.instrument.get_event_series("ECONOMICS")
39
44
  if res.status_code == 200:
40
45
  print('get_event_series:', res.json())
41
46
 
42
- res = data_client.instrument.get_event_instrument("KXGDP")
47
+ res = data_client.instrument.get_event_events("KXRATECUTCOUNT")
48
+ if res.status_code == 200:
49
+ print('get_event_events:', res.json())
50
+
51
+ res = data_client.instrument.get_event_instrument("KXRATECUTCOUNT")
43
52
  if res.status_code == 200:
44
53
  print('get_event_instrument:', res.json())
45
54
 
@@ -49,4 +58,12 @@ if __name__ == '__main__':
49
58
 
50
59
  res = data_client.event_market_data.get_event_depth("KXRATECUTCOUNT-25DEC31-T10", Category.US_EVENT.name)
51
60
  if res.status_code == 200:
52
- print('get_event_depth:', res.json())
61
+ print('get_event_depth:', res.json())
62
+
63
+ res = data_client.event_market_data.get_event_bars("KXRATECUTCOUNT-25DEC31-T10", Timespan.M1, Category.US_EVENT.name, 200, False)
64
+ if res.status_code == 200:
65
+ print('get_event_bars:', res.json())
66
+
67
+ res = data_client.event_market_data.get_event_tick("KXRATECUTCOUNT-25DEC31-T10", Category.US_EVENT.name, 30)
68
+ if res.status_code == 200:
69
+ print('get_event_tick:', res.json())
@@ -43,7 +43,7 @@ if __name__ == '__main__':
43
43
  print("connect success with session_id:%s" % quotes_session_id)
44
44
  # subscribe
45
45
  symbols = ['KXNHLGAME-26JAN21ANACOL-ANA', 'KXNBAGAME-26JAN20LACCHI-LAC']
46
- sub_types = [SubscribeType.QUOTE.name, SubscribeType.SNAPSHOT.name]
46
+ sub_types = [SubscribeType.QUOTE.name, SubscribeType.SNAPSHOT.name, SubscribeType.TICK.name]
47
47
  client.subscribe(symbols, Category.US_EVENT.name, sub_types)
48
48
 
49
49
  def my_quotes_message_func(client, topic, quotes):
@@ -247,6 +247,7 @@ if __name__ == '__main__':
247
247
  # ============================================================
248
248
 
249
249
  # normal option order
250
+ # position_intent: Currently, only the US market is supported, and only options orders are allowed.
250
251
  normal_option_client_order_id = uuid.uuid4().hex
251
252
  new_normal_option_orders = [
252
253
  {
@@ -259,6 +260,7 @@ if __name__ == '__main__':
259
260
  "side": "BUY",
260
261
  "time_in_force": "GTC",
261
262
  "entrust_type": "QTY",
263
+ "position_intent": "BUY_TO_OPEN",
262
264
  "legs": [
263
265
  {
264
266
  "side": "BUY",
@@ -0,0 +1 @@
1
+ __version__ = '2.0.2'
@@ -1,4 +1,4 @@
1
- __version__ = '2.0.0'
1
+ __version__ = '2.0.2'
2
2
 
3
3
  import logging
4
4
 
@@ -0,0 +1,3 @@
1
+ # coding=utf-8
2
+
3
+ __version__ = '2.0.2'
@@ -18,8 +18,9 @@ from webull.data.internal.quotes_client import QuotesClient, LOG_ERR
18
18
  from webull.data.quotes.market_streaming_data import MarketDataStreaming
19
19
  from webull.data.quotes.subscribe.event_depth_decoder import EventDepthDecoder
20
20
  from webull.data.quotes.subscribe.event_snapshot_decoder import EventSnapshotDecoder
21
+ from webull.data.quotes.subscribe.event_tick_decoder import EventTickDecoder
21
22
  from webull.data.quotes.subscribe.payload_type import PAYLOAD_TYPE_QUOTE, PAYLOAD_TYPE_SHAPSHOT, PAYLOAD_TYPE_TICK, \
22
- PAYLOAD_TYPE_EVENT_SHAPSHOT, PAYLOAD_TYPE_EVENT_DEPTH
23
+ PAYLOAD_TYPE_EVENT_SHAPSHOT, PAYLOAD_TYPE_EVENT_DEPTH, PAYLOAD_TYPE_EVENT_TICK
23
24
  from webull.data.quotes.subscribe.quote_decoder import QuoteDecoder
24
25
  from webull.data.quotes.subscribe.snapshot_decoder import SnapshotDecoder
25
26
  from webull.data.quotes.subscribe.tick_decoder import TickDecoder
@@ -44,6 +45,7 @@ class DataStreamingClient(QuotesClient):
44
45
  self.register_payload_decoder(PAYLOAD_TYPE_TICK, TickDecoder())
45
46
  self.register_payload_decoder(PAYLOAD_TYPE_EVENT_DEPTH, EventDepthDecoder())
46
47
  self.register_payload_decoder(PAYLOAD_TYPE_EVENT_SHAPSHOT, EventSnapshotDecoder())
48
+ self.register_payload_decoder(PAYLOAD_TYPE_EVENT_TICK, EventTickDecoder())
47
49
 
48
50
  @property
49
51
  def on_connect_success(self):
@@ -12,8 +12,11 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
  from webull.data.common.category import Category
15
+ from webull.data.request.get_event_bars_request import GetEventBarsRequest
15
16
  from webull.data.request.get_event_depth_request import GetEventDepthRequest
16
17
  from webull.data.request.get_event_snapshot_request import GetEventSnapshotRequest
18
+ from webull.data.request.get_event_tick_request import GetEventTickRequest
19
+
17
20
 
18
21
  class EventMarketData:
19
22
  def __init__(self, api_client):
@@ -47,4 +50,43 @@ class EventMarketData:
47
50
  quote_request.set_category(category)
48
51
  quote_request.set_depth(depth)
49
52
  response = self.client.get_response(quote_request)
53
+ return response
54
+
55
+ def get_event_bars(self, symbols, timespan, category=Category.US_EVENT.name, count=200, real_time_required=False):
56
+ """
57
+ Get the current order book for a specific event instrument.
58
+ The order book shows all active bid orders for both yes and no sides of a binary market.
59
+ It returns yes bids and no bids only (no asks are returned). Price unit is based on usd_cent.
60
+
61
+ :param symbols: Symbol of the event market, supports JSON array format, multiple symbols separated by commas; maximum 100 symbols per query.
62
+ :param timespan:K-line time granularity.
63
+ :param category: default is US_EVENT, currently only US_EVENT is supported.
64
+ :param count: Number of entries, default 200 entries, maximum 1200 entries.
65
+ :param real_time_required: Does it include the latest data? The k-line that has not been finalized is not included by default. It is false and only used for minutes.
66
+ """
67
+ quote_request = GetEventBarsRequest()
68
+ quote_request.set_symbols(symbols)
69
+ quote_request.set_category(category)
70
+ quote_request.set_timespan(timespan)
71
+ quote_request.set_count(count)
72
+ quote_request.set_real_time_required(real_time_required)
73
+ response = self.client.get_response(quote_request)
74
+ return response
75
+
76
+
77
+ def get_event_tick(self, symbol, category=Category.US_EVENT.name, count=30):
78
+ """
79
+ Detailed transaction records, including transaction time, price, quantity,
80
+ and transaction direction. Data is sorted in reverse chronological order,
81
+ with the most recent transaction record first.
82
+
83
+ :param symbol:Symbol of the event market.
84
+ :param category: default is US_EVENT, currently only US_EVENT is supported.
85
+ :param count: Number of entries, default 30 entries, maximum 1200 entries.
86
+ """
87
+ quote_request = GetEventTickRequest()
88
+ quote_request.set_symbol(symbol)
89
+ quote_request.set_category(category)
90
+ quote_request.set_count(count)
91
+ response = self.client.get_response(quote_request)
50
92
  return response
@@ -12,7 +12,9 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
  from webull.data.common.category import Category
15
+ from webull.data.request.get_event_events_request import GetEventEventsRequest
15
16
  from webull.data.request.get_event_instrument_request import GetEventInstrumentRequest
17
+ from webull.data.request.get_event_series_categories import GetEventCategoriesRequest
16
18
  from webull.data.request.get_event_series_request import GetEventSeriesRequest
17
19
  from webull.data.request.get_instruments_request import GetInstrumentsRequest
18
20
  from webull.data.request.get_crypto_instruments_request import GetCryptoInstrumentsRequest
@@ -111,7 +113,15 @@ class Instrument:
111
113
  response = self.client.get_response(futures_instrument_request)
112
114
  return response
113
115
 
114
- def get_event_series(self, category, last_instrument_id=None, page_size=500):
116
+ def get_event_categories(self):
117
+ """
118
+ Query event contract categories
119
+ """
120
+ event_categories_request = GetEventCategoriesRequest()
121
+ response = self.client.get_response(event_categories_request)
122
+ return response
123
+
124
+ def get_event_series(self, category=None, symbols=None, last_series_id=None, page_size=500):
115
125
  """
116
126
  Retrieve multiple series with specified filters.
117
127
  A series represents a template for recurring events that follow the same format and rules (e.g., “Monthly Jobs Report” ).
@@ -120,30 +130,57 @@ class Instrument:
120
130
  :param category: The category which this series belongs to.Allowed values:
121
131
  ECONOMICS, FINANCIALS, POLITICS, ENTERTAINMENT, SCIENCE_TECHNOLOGY,
122
132
  CLIMATE_WEATHER, TRANSPORTATION, CRYPTO, SPORTS
123
- :param last_instrument_id: Last series id for pagination.
133
+ :param symbols: Symbol of the event series, supports JSON array format, multiple symbols separated by commas; maximum 100 symbols per query.
134
+ :param last_series_id: Last series id for pagination.
124
135
  :param page_size: Page size, default 500.
125
136
  """
126
137
 
127
138
  event_series_request = GetEventSeriesRequest()
128
- event_series_request.set_category(category)
129
- if last_instrument_id:
130
- event_series_request.set_last_instrument_id(last_instrument_id)
139
+ if category:
140
+ event_series_request.set_category(category)
141
+ if symbols:
142
+ event_series_request.set_symbols(symbols)
143
+ if last_series_id:
144
+ event_series_request.set_last_series_id(last_series_id)
131
145
  event_series_request.set_page_size(page_size)
132
146
  response = self.client.get_response(event_series_request)
133
147
  return response
134
148
 
135
- def get_event_instrument(self, series_symbol, expiration_date_after=None, last_instrument_id=None, page_size=500):
149
+ def get_event_events(self, series_symbol, symbols=None, status=None):
150
+ """
151
+ Query event contract events
152
+
153
+ :param series_symbol: Series Symbol that identifies this series.
154
+ :param symbols: Symbol of the event events, supports JSON array format, multiple symbols separated by commas; maximum 100 symbols per query.
155
+ :param status: Event status (optional, defaults to querying tradable/valid events).
156
+ """
157
+ event_events_request = GetEventEventsRequest()
158
+ event_events_request.set_series_symbol(series_symbol)
159
+ if symbols:
160
+ event_events_request.set_symbols(symbols)
161
+ if status:
162
+ event_events_request.set_status(status)
163
+ response = self.client.get_response(event_events_request)
164
+ return response
165
+
166
+ def get_event_instrument(self, series_symbol, event_symbol=None, symbols=None, expiration_date_after=None, last_instrument_id=None, page_size=500):
136
167
  """
137
168
  Retrieve profile information for event contract markets based on the series symbol.
138
169
 
139
170
  :param series_symbol: Symbol that identifies this series.
171
+ :param event_symbol: Symbol of the event events.
172
+ :param symbols: Symbol of the event market, supports JSON array format, multiple symbols separated by commas; maximum 100 symbols per query.
140
173
  :param expiration_date_after: Used to filter items whose expiration date is later than a specified date; the default selection is the current day (inclusive).
141
- :param last_instrument_id: Last series id for pagination.
174
+ :param last_instrument_id: Last instrument id for pagination.
142
175
  :param page_size: Page size, default 500.
143
176
  """
144
177
 
145
178
  event_instrument_request = GetEventInstrumentRequest()
146
179
  event_instrument_request.set_series_symbol(series_symbol)
180
+ if event_symbol:
181
+ event_instrument_request.set_event_symbol(event_symbol)
182
+ if symbols:
183
+ event_instrument_request.set_symbols(symbols)
147
184
  if expiration_date_after:
148
185
  event_instrument_request.set_expiration_date_after(expiration_date_after)
149
186
  if last_instrument_id:
@@ -0,0 +1,30 @@
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
+ # coding=utf-8
15
+
16
+ from webull.data.quotes.subscribe.message_pb2 import EventTick
17
+ from webull.data.quotes.subscribe.event_tick_result import EventTickResult
18
+
19
+ from webull.data.internal.quotes_payload_decoder import BaseQuotesPayloadDecoder
20
+
21
+
22
+
23
+ class EventTickDecoder(BaseQuotesPayloadDecoder):
24
+ def __init__(self):
25
+ super().__init__()
26
+
27
+ def parse(self, payload):
28
+ eventTick = EventTick()
29
+ eventTick.ParseFromString(payload)
30
+ return EventTickResult(eventTick)
@@ -0,0 +1,56 @@
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
+ from decimal import Decimal
18
+ from webull.data.quotes.subscribe.basic_result import BasicResult
19
+
20
+
21
+ class EventTickResult:
22
+ def __init__(self, pb_event_tick):
23
+ self.basic = BasicResult(pb_event_tick.basic)
24
+ self.time = pb_event_tick.time
25
+ self.yes_price = Decimal(pb_event_tick.yes_price) if pb_event_tick.yes_price else None
26
+ self.no_price = Decimal(pb_event_tick.no_price) if pb_event_tick.no_price else None
27
+ self.volume = pb_event_tick.volume
28
+ self.side = pb_event_tick.side
29
+ self.trade_id = pb_event_tick.trade_id
30
+
31
+ def get_basic(self):
32
+ return self.basic
33
+
34
+ def get_time(self):
35
+ return self.time
36
+
37
+ def get_yes_price(self):
38
+ return self.yes_price
39
+
40
+ def get_no_price(self):
41
+ return self.no_price
42
+
43
+ def get_volume(self):
44
+ return self.volume
45
+
46
+ def get_side(self):
47
+ return self.side
48
+
49
+ def get_trade_id(self):
50
+ return self.trade_id
51
+
52
+ def __repr__(self):
53
+ return "basic: %s,time: %s,yes_price: %s,no_price:%s,volume:%s,side:%s,trade_id:%s" % (self.basic, self.time, self.yes_price, self.no_price, self.volume, self.side, self.trade_id)
54
+
55
+ def __str__(self):
56
+ return self.__repr__()
@@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
13
13
 
14
14
 
15
15
 
16
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rmessage.proto\"Z\n\x05\x42\x61sic\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x15\n\rinstrument_id\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\t\x12\x17\n\x0ftrading_session\x18\x04 \x01(\t\"\xd6\x03\n\x08Snapshot\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x12\n\ntrade_time\x18\x02 \x01(\t\x12\r\n\x05price\x18\x03 \x01(\t\x12\x0c\n\x04open\x18\x04 \x01(\t\x12\x0c\n\x04high\x18\x05 \x01(\t\x12\x0b\n\x03low\x18\x06 \x01(\t\x12\x11\n\tpre_close\x18\x07 \x01(\t\x12\x0e\n\x06volume\x18\x08 \x01(\t\x12\x0e\n\x06\x63hange\x18\t \x01(\t\x12\x14\n\x0c\x63hange_ratio\x18\n \x01(\t\x12\x16\n\x0e\x65xt_trade_time\x18\x0b \x01(\t\x12\x11\n\text_price\x18\x0c \x01(\t\x12\x10\n\x08\x65xt_high\x18\r \x01(\t\x12\x0f\n\x07\x65xt_low\x18\x0e \x01(\t\x12\x12\n\next_volume\x18\x0f \x01(\t\x12\x12\n\next_change\x18\x10 \x01(\t\x12\x18\n\x10\x65xt_change_ratio\x18\x11 \x01(\t\x12\x16\n\x0eovn_trade_time\x18\x12 \x01(\t\x12\x11\n\tovn_price\x18\x13 \x01(\t\x12\x10\n\x08ovn_high\x18\x14 \x01(\t\x12\x0f\n\x07ovn_low\x18\x15 \x01(\t\x12\x12\n\novn_volume\x18\x16 \x01(\t\x12\x12\n\novn_change\x18\x17 \x01(\t\x12\x18\n\x10ovn_change_ratio\x18\x18 \x01(\t\"L\n\x05Quote\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x15\n\x04\x61sks\x18\x02 \x03(\x0b\x32\x07.AskBid\x12\x15\n\x04\x62ids\x18\x03 \x03(\x0b\x32\x07.AskBid\"X\n\x04Tick\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x0c\n\x04time\x18\x02 \x01(\t\x12\r\n\x05price\x18\x03 \x01(\t\x12\x0e\n\x06volume\x18\x04 \x01(\t\x12\x0c\n\x04side\x18\x05 \x01(\t\"U\n\x06\x41skBid\x12\r\n\x05price\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\t\x12\x15\n\x05order\x18\x03 \x03(\x0b\x32\x06.Order\x12\x17\n\x06\x62roker\x18\x04 \x03(\x0b\x32\x07.Broker\"#\n\x05Order\x12\x0c\n\x04mpid\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\t\"#\n\x06\x42roker\x12\x0b\n\x03\x62id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x8d\x02\n\rEventSnapshot\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\r\n\x05price\x18\x02 \x01(\t\x12\x0e\n\x06volume\x18\x03 \x01(\t\x12\x17\n\x0flast_trade_time\x18\x04 \x01(\t\x12\x15\n\ropen_interest\x18\x05 \x01(\t\x12\x0f\n\x07yes_ask\x18\x06 \x01(\t\x12\x0f\n\x07yes_bid\x18\x07 \x01(\t\x12\x14\n\x0cyes_ask_size\x18\x08 \x01(\t\x12\x14\n\x0cyes_bid_size\x18\t \x01(\t\x12\x0e\n\x06no_ask\x18\n \x01(\t\x12\x0e\n\x06no_bid\x18\x0b \x01(\t\x12\x13\n\x0bno_ask_size\x18\x0c \x01(\t\x12\x13\n\x0bno_bid_size\x18\r \x01(\t\"b\n\nEventQuote\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x1e\n\x08yes_bids\x18\x02 \x03(\x0b\x32\x0c.EventAskBid\x12\x1d\n\x07no_bids\x18\x03 \x03(\x0b\x32\x0c.EventAskBid\"*\n\x0b\x45ventAskBid\x12\r\n\x05price\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\tb\x06proto3')
16
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rmessage.proto\"Z\n\x05\x42\x61sic\x12\x0e\n\x06symbol\x18\x01 \x01(\t\x12\x15\n\rinstrument_id\x18\x02 \x01(\t\x12\x11\n\ttimestamp\x18\x03 \x01(\t\x12\x17\n\x0ftrading_session\x18\x04 \x01(\t\"\xd6\x03\n\x08Snapshot\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x12\n\ntrade_time\x18\x02 \x01(\t\x12\r\n\x05price\x18\x03 \x01(\t\x12\x0c\n\x04open\x18\x04 \x01(\t\x12\x0c\n\x04high\x18\x05 \x01(\t\x12\x0b\n\x03low\x18\x06 \x01(\t\x12\x11\n\tpre_close\x18\x07 \x01(\t\x12\x0e\n\x06volume\x18\x08 \x01(\t\x12\x0e\n\x06\x63hange\x18\t \x01(\t\x12\x14\n\x0c\x63hange_ratio\x18\n \x01(\t\x12\x16\n\x0e\x65xt_trade_time\x18\x0b \x01(\t\x12\x11\n\text_price\x18\x0c \x01(\t\x12\x10\n\x08\x65xt_high\x18\r \x01(\t\x12\x0f\n\x07\x65xt_low\x18\x0e \x01(\t\x12\x12\n\next_volume\x18\x0f \x01(\t\x12\x12\n\next_change\x18\x10 \x01(\t\x12\x18\n\x10\x65xt_change_ratio\x18\x11 \x01(\t\x12\x16\n\x0eovn_trade_time\x18\x12 \x01(\t\x12\x11\n\tovn_price\x18\x13 \x01(\t\x12\x10\n\x08ovn_high\x18\x14 \x01(\t\x12\x0f\n\x07ovn_low\x18\x15 \x01(\t\x12\x12\n\novn_volume\x18\x16 \x01(\t\x12\x12\n\novn_change\x18\x17 \x01(\t\x12\x18\n\x10ovn_change_ratio\x18\x18 \x01(\t\"L\n\x05Quote\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x15\n\x04\x61sks\x18\x02 \x03(\x0b\x32\x07.AskBid\x12\x15\n\x04\x62ids\x18\x03 \x03(\x0b\x32\x07.AskBid\"X\n\x04Tick\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x0c\n\x04time\x18\x02 \x01(\t\x12\r\n\x05price\x18\x03 \x01(\t\x12\x0e\n\x06volume\x18\x04 \x01(\t\x12\x0c\n\x04side\x18\x05 \x01(\t\"U\n\x06\x41skBid\x12\r\n\x05price\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\t\x12\x15\n\x05order\x18\x03 \x03(\x0b\x32\x06.Order\x12\x17\n\x06\x62roker\x18\x04 \x03(\x0b\x32\x07.Broker\"#\n\x05Order\x12\x0c\n\x04mpid\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\t\"#\n\x06\x42roker\x12\x0b\n\x03\x62id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x8d\x02\n\rEventSnapshot\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\r\n\x05price\x18\x02 \x01(\t\x12\x0e\n\x06volume\x18\x03 \x01(\t\x12\x17\n\x0flast_trade_time\x18\x04 \x01(\t\x12\x15\n\ropen_interest\x18\x05 \x01(\t\x12\x0f\n\x07yes_ask\x18\x06 \x01(\t\x12\x0f\n\x07yes_bid\x18\x07 \x01(\t\x12\x14\n\x0cyes_ask_size\x18\x08 \x01(\t\x12\x14\n\x0cyes_bid_size\x18\t \x01(\t\x12\x0e\n\x06no_ask\x18\n \x01(\t\x12\x0e\n\x06no_bid\x18\x0b \x01(\t\x12\x13\n\x0bno_ask_size\x18\x0c \x01(\t\x12\x13\n\x0bno_bid_size\x18\r \x01(\t\"b\n\nEventQuote\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x1e\n\x08yes_bids\x18\x02 \x03(\x0b\x32\x0c.EventAskBid\x12\x1d\n\x07no_bids\x18\x03 \x03(\x0b\x32\x0c.EventAskBid\"*\n\x0b\x45ventAskBid\x12\r\n\x05price\x18\x01 \x01(\t\x12\x0c\n\x04size\x18\x02 \x01(\t\"\x85\x01\n\tEventTick\x12\x15\n\x05\x62\x61sic\x18\x01 \x01(\x0b\x32\x06.Basic\x12\x11\n\tyes_price\x18\x02 \x01(\t\x12\x10\n\x08no_price\x18\x03 \x01(\t\x12\x0e\n\x06volume\x18\x04 \x01(\t\x12\x0c\n\x04side\x18\x05 \x01(\t\x12\x10\n\x08trade_id\x18\x06 \x01(\t\x12\x0c\n\x04time\x18\x07 \x01(\tb\x06proto3')
17
17
 
18
18
  _globals = globals()
19
19
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -40,4 +40,6 @@ if _descriptor._USE_C_DESCRIPTORS == False:
40
40
  _globals['_EVENTQUOTE']._serialized_end=1281
41
41
  _globals['_EVENTASKBID']._serialized_start=1283
42
42
  _globals['_EVENTASKBID']._serialized_end=1325
43
+ _globals['_EVENTTICK']._serialized_start=1328
44
+ _globals['_EVENTTICK']._serialized_end=1461
43
45
  # @@protoc_insertion_point(module_scope)
@@ -18,4 +18,5 @@ PAYLOAD_TYPE_QUOTE = 'quote'
18
18
  PAYLOAD_TYPE_SHAPSHOT = 'snapshot'
19
19
  PAYLOAD_TYPE_TICK = 'tick'
20
20
  PAYLOAD_TYPE_EVENT_DEPTH = 'event-quote'
21
- PAYLOAD_TYPE_EVENT_SHAPSHOT = 'event-snapshot'
21
+ PAYLOAD_TYPE_EVENT_SHAPSHOT = 'event-snapshot'
22
+ PAYLOAD_TYPE_EVENT_TICK = 'event-tick'
@@ -0,0 +1,43 @@
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
+ from webull.core.request import ApiRequest
18
+
19
+
20
+ class GetEventBarsRequest(ApiRequest):
21
+ def __init__(self):
22
+ ApiRequest.__init__(self, "/openapi/market-data/event/bars", version='v2', method="GET", query_params={})
23
+
24
+ def set_symbols(self, symbols):
25
+ if isinstance(symbols, str):
26
+ self.add_query_param("symbols", symbols)
27
+ elif isinstance(symbols, list):
28
+ self.add_query_param("symbols", ",".join(symbols))
29
+
30
+ def set_category(self, category):
31
+ self.add_query_param("category", category)
32
+
33
+ def set_timespan(self, timespan):
34
+ if timespan:
35
+ self.add_query_param("timespan", timespan)
36
+
37
+ def set_count(self, count):
38
+ if count:
39
+ self.add_query_param("count", count)
40
+
41
+ def set_real_time_required(self, real_time_required):
42
+ if real_time_required:
43
+ self.add_query_param("real_time_required", real_time_required)
@@ -0,0 +1,33 @@
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
+ from webull.core.request import ApiRequest
18
+
19
+ class GetEventEventsRequest(ApiRequest):
20
+ def __init__(self):
21
+ ApiRequest.__init__(self, "/openapi/instrument/event/events", version='v2', method="GET", query_params={})
22
+
23
+ def set_series_symbol(self, series_symbol):
24
+ self.add_query_param("series_symbol", series_symbol)
25
+
26
+ def set_symbols(self, symbols):
27
+ if isinstance(symbols, str):
28
+ self.add_query_param("symbols", symbols)
29
+ elif isinstance(symbols, list):
30
+ self.add_query_param("symbols", ",".join(symbols))
31
+
32
+ def set_status(self, status):
33
+ self.add_query_param("status", status)
@@ -23,6 +23,15 @@ class GetEventInstrumentRequest(ApiRequest):
23
23
  def set_series_symbol(self, series_symbol):
24
24
  self.add_query_param("series_symbol", series_symbol)
25
25
 
26
+ def set_event_symbol(self, event_symbol):
27
+ self.add_query_param("event_symbol", event_symbol)
28
+
29
+ def set_symbols(self, symbols):
30
+ if isinstance(symbols, str):
31
+ self.add_query_param("symbols", symbols)
32
+ elif isinstance(symbols, list):
33
+ self.add_query_param("symbols", ",".join(symbols))
34
+
26
35
  def set_expiration_date_after(self, expiration_date_after):
27
36
  self.add_query_param("expiration_date_after", expiration_date_after)
28
37
 
@@ -0,0 +1,21 @@
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
+ from webull.core.request import ApiRequest
18
+
19
+ class GetEventCategoriesRequest(ApiRequest):
20
+ def __init__(self):
21
+ ApiRequest.__init__(self, "/openapi/instrument/event/categories", version='v2', method="GET", query_params={})
@@ -23,8 +23,14 @@ class GetEventSeriesRequest(ApiRequest):
23
23
  def set_category(self, category):
24
24
  self.add_query_param("category", category)
25
25
 
26
- def set_last_instrument_id(self, last_instrument_id):
27
- self.add_query_param("last_instrument_id", last_instrument_id)
26
+ def set_symbols(self, symbols):
27
+ if isinstance(symbols, str):
28
+ self.add_query_param("symbols", symbols)
29
+ elif isinstance(symbols, list):
30
+ self.add_query_param("symbols", ",".join(symbols))
31
+
32
+ def set_last_series_id(self, last_series_id):
33
+ self.add_query_param("last_series_id", last_series_id)
28
34
 
29
35
  def set_page_size(self, page_size):
30
36
  self.add_query_param("page_size", page_size)
@@ -0,0 +1,32 @@
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
+ from webull.core.request import ApiRequest
18
+
19
+
20
+ class GetEventTickRequest(ApiRequest):
21
+ def __init__(self):
22
+ ApiRequest.__init__(self, "/openapi/market-data/event/tick", version='v2', method="GET", query_params={})
23
+
24
+ def set_symbol(self, symbol):
25
+ self.add_query_param("symbol", symbol)
26
+
27
+ def set_category(self, category):
28
+ self.add_query_param("category", category)
29
+
30
+ def set_count(self, count):
31
+ if count:
32
+ self.add_query_param("count", count)
@@ -0,0 +1 @@
1
+ __version__ = '2.0.2'
@@ -0,0 +1,24 @@
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
+ from webull.core.common.easy_enum import EasyEnum
18
+
19
+
20
+ class OrderStatus(EasyEnum):
21
+ BUY_TO_OPEN = (1, "BUY_TO_OPEN")
22
+ BUY_TO_CLOSE = (2, "BUY_TO_CLOSE")
23
+ SELL_TO_OPEN = (3, "SELL_TO_OPEN")
24
+ SELL_TO_CLOSE = (4, "SELL_TO_CLOSE")
@@ -68,8 +68,12 @@ class TradeEventsClient():
68
68
  self._on_log = None
69
69
 
70
70
  def _build_request(self, app_key, app_secret, accounts):
71
+ if self._region_id == 'us':
72
+ subscribeType = 3
73
+ else:
74
+ subscribeType = 1
71
75
  request = pb.SubscribeRequest(
72
- subscribeType= 3, # only 1、2 allowed now
76
+ subscribeType= subscribeType, # 1、2、3 allowed now
73
77
  timestamp=int(time.time() * 1000), # millis
74
78
  accounts=accounts,
75
79
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: webull-openapi-python-sdk
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: Webull Python SDK.
5
5
  Home-page:
6
6
  Author: Webull
@@ -128,6 +128,8 @@ webull/data/quotes/subscribe/event_depth_decoder.py
128
128
  webull/data/quotes/subscribe/event_depth_result.py
129
129
  webull/data/quotes/subscribe/event_snapshot_decoder.py
130
130
  webull/data/quotes/subscribe/event_snapshot_result.py
131
+ webull/data/quotes/subscribe/event_tick_decoder.py
132
+ webull/data/quotes/subscribe/event_tick_result.py
131
133
  webull/data/quotes/subscribe/message_pb2.py
132
134
  webull/data/quotes/subscribe/order_result.py
133
135
  webull/data/quotes/subscribe/payload_type.py
@@ -144,10 +146,14 @@ webull/data/request/get_crypto_historical_bars_request.py
144
146
  webull/data/request/get_crypto_instruments_request.py
145
147
  webull/data/request/get_crypto_snapshot_request.py
146
148
  webull/data/request/get_eod_bars_request.py
149
+ webull/data/request/get_event_bars_request.py
147
150
  webull/data/request/get_event_depth_request.py
151
+ webull/data/request/get_event_events_request.py
148
152
  webull/data/request/get_event_instrument_request.py
153
+ webull/data/request/get_event_series_categories.py
149
154
  webull/data/request/get_event_series_request.py
150
155
  webull/data/request/get_event_snapshot_request.py
156
+ webull/data/request/get_event_tick_request.py
151
157
  webull/data/request/get_footprint_request.py
152
158
  webull/data/request/get_futures_depth_request.py
153
159
  webull/data/request/get_futures_footprint_request.py
@@ -181,6 +187,7 @@ webull/trade/common/order_side.py
181
187
  webull/trade/common/order_status.py
182
188
  webull/trade/common/order_tif.py
183
189
  webull/trade/common/order_type.py
190
+ webull/trade/common/position_intent.py
184
191
  webull/trade/common/trade_policy.py
185
192
  webull/trade/common/trading_date_type.py
186
193
  webull/trade/common/trailing_type.py
@@ -1 +0,0 @@
1
- __version__ = '2.0.0'
@@ -1 +0,0 @@
1
- __version__ = '2.0.0'