whitebit-python-sdk 1.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 (465) hide show
  1. whitebit_python_sdk-1.1.0/HISTORY.txt +20 -0
  2. whitebit_python_sdk-1.1.0/LICENSE +20 -0
  3. whitebit_python_sdk-1.1.0/MANIFEST.in +10 -0
  4. whitebit_python_sdk-1.1.0/PKG-INFO +155 -0
  5. whitebit_python_sdk-1.1.0/README.md +123 -0
  6. whitebit_python_sdk-1.1.0/examples/collateral_examples.py +62 -0
  7. whitebit_python_sdk-1.1.0/examples/main_examples.py +40 -0
  8. whitebit_python_sdk-1.1.0/examples/trade_examples.py +79 -0
  9. whitebit_python_sdk-1.1.0/examples/ws_example.py +47 -0
  10. whitebit_python_sdk-1.1.0/pyproject.toml +53 -0
  11. whitebit_python_sdk-1.1.0/requirements.txt +4 -0
  12. whitebit_python_sdk-1.1.0/setup.cfg +4 -0
  13. whitebit_python_sdk-1.1.0/src/whitebit/__init__.py +793 -0
  14. whitebit_python_sdk-1.1.0/src/whitebit/client.py +580 -0
  15. whitebit_python_sdk-1.1.0/src/whitebit/codes/__init__.py +7 -0
  16. whitebit_python_sdk-1.1.0/src/whitebit/codes/client.py +510 -0
  17. whitebit_python_sdk-1.1.0/src/whitebit/codes/raw_client.py +809 -0
  18. whitebit_python_sdk-1.1.0/src/whitebit/codes/types/__init__.py +10 -0
  19. whitebit_python_sdk-1.1.0/src/whitebit/codes/types/apply_code_response.py +22 -0
  20. whitebit_python_sdk-1.1.0/src/whitebit/codes/types/create_code_response.py +32 -0
  21. whitebit_python_sdk-1.1.0/src/whitebit/codes/types/get_codes_history_response.py +27 -0
  22. whitebit_python_sdk-1.1.0/src/whitebit/codes/types/get_my_codes_response.py +27 -0
  23. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/__init__.py +183 -0
  24. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/client.py +2452 -0
  25. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/raw_client.py +4337 -0
  26. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/__init__.py +213 -0
  27. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response.py +34 -0
  28. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss.py +146 -0
  29. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss_activation_condition.py +5 -0
  30. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss_side.py +5 -0
  31. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_take_profit.py +114 -0
  32. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_take_profit_side.py +5 -0
  33. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/change_collateral_account_leverage_response.py +22 -0
  34. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/close_position_request_position_side.py +5 -0
  35. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/collateral_account_balance_summary_response_item.py +48 -0
  36. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/collateral_account_summary_response.py +60 -0
  37. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item.py +98 -0
  38. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item_position_side.py +7 -0
  39. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item_side.py +5 -0
  40. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item.py +29 -0
  41. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_error.py +36 -0
  42. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result.py +132 -0
  43. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_position_side.py +7 -0
  44. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_side.py +5 -0
  45. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_status.py +7 -0
  46. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_request_position_side.py +5 -0
  47. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_request_side.py +5 -0
  48. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response.py +132 -0
  49. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_oto.py +44 -0
  50. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_position_side.py +5 -0
  51. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_side.py +5 -0
  52. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_status.py +7 -0
  53. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_request_position_side.py +5 -0
  54. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_request_side.py +5 -0
  55. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response.py +110 -0
  56. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_oto.py +44 -0
  57. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_position_side.py +5 -0
  58. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_side.py +5 -0
  59. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_status.py +7 -0
  60. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_request_side.py +5 -0
  61. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response.py +34 -0
  62. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss.py +159 -0
  63. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_activation_condition.py +5 -0
  64. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_position_side.py +5 -0
  65. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_side.py +5 -0
  66. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_status.py +7 -0
  67. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit.py +139 -0
  68. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_position_side.py +7 -0
  69. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_side.py +5 -0
  70. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_status.py +7 -0
  71. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_request_position_side.py +5 -0
  72. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_request_side.py +5 -0
  73. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response.py +122 -0
  74. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_oto.py +44 -0
  75. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_position_side.py +5 -0
  76. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_side.py +5 -0
  77. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_status.py +7 -0
  78. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_request_position_side.py +7 -0
  79. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_request_side.py +5 -0
  80. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response.py +117 -0
  81. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_oto.py +44 -0
  82. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_position_side.py +7 -0
  83. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_side.py +5 -0
  84. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_status.py +7 -0
  85. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_collateral_hedge_mode_response.py +26 -0
  86. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response.py +38 -0
  87. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item.py +60 -0
  88. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco.py +31 -0
  89. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_stop_loss.py +28 -0
  90. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_stop_loss_position_side.py +7 -0
  91. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_take_profit.py +28 -0
  92. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_take_profit_position_side.py +7 -0
  93. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto.py +34 -0
  94. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto_conditional_order.py +30 -0
  95. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto_conditional_order_position_side.py +7 -0
  96. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_funding_history_response.py +33 -0
  97. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_funding_history_response_records_item.py +66 -0
  98. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item.py +34 -0
  99. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss.py +49 -0
  100. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss_activation_condition.py +5 -0
  101. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss_side.py +5 -0
  102. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_take_profit.py +43 -0
  103. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_take_profit_side.py +5 -0
  104. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item.py +136 -0
  105. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item_liquidation_state.py +5 -0
  106. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item_position_side.py +5 -0
  107. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item_tpsl.py +51 -0
  108. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item.py +95 -0
  109. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item_liquidation_state.py +5 -0
  110. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item_order_detail.py +61 -0
  111. whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item_position_side.py +5 -0
  112. whitebit_python_sdk-1.1.0/src/whitebit/core/__init__.py +52 -0
  113. whitebit_python_sdk-1.1.0/src/whitebit/core/api_error.py +23 -0
  114. whitebit_python_sdk-1.1.0/src/whitebit/core/client_wrapper.py +57 -0
  115. whitebit_python_sdk-1.1.0/src/whitebit/core/datetime_utils.py +28 -0
  116. whitebit_python_sdk-1.1.0/src/whitebit/core/file.py +67 -0
  117. whitebit_python_sdk-1.1.0/src/whitebit/core/http_client.py +497 -0
  118. whitebit_python_sdk-1.1.0/src/whitebit/core/http_response.py +55 -0
  119. whitebit_python_sdk-1.1.0/src/whitebit/core/jsonable_encoder.py +100 -0
  120. whitebit_python_sdk-1.1.0/src/whitebit/core/pydantic_utilities.py +255 -0
  121. whitebit_python_sdk-1.1.0/src/whitebit/core/query_encoder.py +58 -0
  122. whitebit_python_sdk-1.1.0/src/whitebit/core/remove_none_from_dict.py +11 -0
  123. whitebit_python_sdk-1.1.0/src/whitebit/core/request_options.py +35 -0
  124. whitebit_python_sdk-1.1.0/src/whitebit/core/serialization.py +276 -0
  125. whitebit_python_sdk-1.1.0/src/whitebit/credit_line/__init__.py +4 -0
  126. whitebit_python_sdk-1.1.0/src/whitebit/credit_line/client.py +128 -0
  127. whitebit_python_sdk-1.1.0/src/whitebit/credit_line/raw_client.py +191 -0
  128. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/__init__.py +7 -0
  129. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/client.py +651 -0
  130. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/raw_client.py +931 -0
  131. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/__init__.py +9 -0
  132. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/create_fixed_investment_response.py +22 -0
  133. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/get_fixed_investments_history_response.py +22 -0
  134. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/get_interest_payment_history_response.py +22 -0
  135. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/__init__.py +29 -0
  136. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/client.py +1140 -0
  137. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/raw_client.py +1651 -0
  138. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/__init__.py +27 -0
  139. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/close_flex_investment_response.py +20 -0
  140. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/close_flex_investment_response_data.py +26 -0
  141. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/create_flex_investment_response.py +20 -0
  142. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/create_flex_investment_response_data.py +26 -0
  143. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/get_flex_investment_history_response.py +22 -0
  144. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/get_flex_payment_history_response.py +22 -0
  145. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/get_user_flex_investments_response.py +22 -0
  146. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/update_flex_auto_reinvestment_response.py +19 -0
  147. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/withdraw_from_flex_investment_response.py +20 -0
  148. whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/withdraw_from_flex_investment_response_data.py +26 -0
  149. whitebit_python_sdk-1.1.0/src/whitebit/deposit/__init__.py +35 -0
  150. whitebit_python_sdk-1.1.0/src/whitebit/deposit/client.py +997 -0
  151. whitebit_python_sdk-1.1.0/src/whitebit/deposit/raw_client.py +1342 -0
  152. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/__init__.py +33 -0
  153. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_request_type.py +5 -0
  154. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response.py +22 -0
  155. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response_account.py +27 -0
  156. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response_required.py +48 -0
  157. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response_required_flex_fee.py +42 -0
  158. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response.py +22 -0
  159. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response_account.py +27 -0
  160. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response_required.py +48 -0
  161. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response_required_flex_fee.py +42 -0
  162. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_fiat_deposit_url_request_customer.py +61 -0
  163. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_fiat_deposit_url_request_customer_address.py +56 -0
  164. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_fiat_deposit_url_response.py +22 -0
  165. whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/refund_deposit_response.py +22 -0
  166. whitebit_python_sdk-1.1.0/src/whitebit/environment.py +17 -0
  167. whitebit_python_sdk-1.1.0/src/whitebit/errors/__init__.py +19 -0
  168. whitebit_python_sdk-1.1.0/src/whitebit/errors/bad_request_error.py +10 -0
  169. whitebit_python_sdk-1.1.0/src/whitebit/errors/internal_server_error.py +10 -0
  170. whitebit_python_sdk-1.1.0/src/whitebit/errors/not_found_error.py +11 -0
  171. whitebit_python_sdk-1.1.0/src/whitebit/errors/service_unavailable_error.py +10 -0
  172. whitebit_python_sdk-1.1.0/src/whitebit/errors/unauthorized_error.py +10 -0
  173. whitebit_python_sdk-1.1.0/src/whitebit/errors/unprocessable_entity_error.py +10 -0
  174. whitebit_python_sdk-1.1.0/src/whitebit/fees/__init__.py +4 -0
  175. whitebit_python_sdk-1.1.0/src/whitebit/fees/client.py +126 -0
  176. whitebit_python_sdk-1.1.0/src/whitebit/fees/raw_client.py +144 -0
  177. whitebit_python_sdk-1.1.0/src/whitebit/jwt/__init__.py +7 -0
  178. whitebit_python_sdk-1.1.0/src/whitebit/jwt/client.py +224 -0
  179. whitebit_python_sdk-1.1.0/src/whitebit/jwt/raw_client.py +389 -0
  180. whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/__init__.py +9 -0
  181. whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/get_web_socket_token_response.py +22 -0
  182. whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/issue_jwt_token_response.py +20 -0
  183. whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/issue_jwt_token_response_data.py +27 -0
  184. whitebit_python_sdk-1.1.0/src/whitebit/main_account/__init__.py +7 -0
  185. whitebit_python_sdk-1.1.0/src/whitebit/main_account/client.py +380 -0
  186. whitebit_python_sdk-1.1.0/src/whitebit/main_account/raw_client.py +493 -0
  187. whitebit_python_sdk-1.1.0/src/whitebit/main_account/types/__init__.py +8 -0
  188. whitebit_python_sdk-1.1.0/src/whitebit/main_account/types/get_deposit_withdraw_history_response.py +26 -0
  189. whitebit_python_sdk-1.1.0/src/whitebit/main_account/types/get_main_balance_response_value.py +22 -0
  190. whitebit_python_sdk-1.1.0/src/whitebit/market_fee/__init__.py +7 -0
  191. whitebit_python_sdk-1.1.0/src/whitebit/market_fee/client.py +193 -0
  192. whitebit_python_sdk-1.1.0/src/whitebit/market_fee/raw_client.py +267 -0
  193. whitebit_python_sdk-1.1.0/src/whitebit/market_fee/types/__init__.py +8 -0
  194. whitebit_python_sdk-1.1.0/src/whitebit/market_fee/types/get_all_market_fees_response.py +43 -0
  195. whitebit_python_sdk-1.1.0/src/whitebit/market_fee/types/get_market_fee_response.py +38 -0
  196. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/__init__.py +67 -0
  197. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/client.py +1083 -0
  198. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/raw_client.py +1695 -0
  199. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/__init__.py +69 -0
  200. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_account_response.py +20 -0
  201. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_account_response_data.py +31 -0
  202. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_request_live_until.py +5 -0
  203. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_request_permissions_item.py +7 -0
  204. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_response.py +20 -0
  205. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_response_data.py +24 -0
  206. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_accounts_response.py +20 -0
  207. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_accounts_response_data_item.py +31 -0
  208. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_request_interval.py +5 -0
  209. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_response.py +20 -0
  210. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_response_data.py +21 -0
  211. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_response_data_hashrate_item.py +20 -0
  212. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_miner_info_response.py +20 -0
  213. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_miner_info_response_data.py +25 -0
  214. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_miner_info_response_data_stratum_item.py +22 -0
  215. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_payout_destination_response.py +36 -0
  216. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_payout_destination_response_payout_destination.py +7 -0
  217. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_rewards_response.py +22 -0
  218. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_request_interval.py +5 -0
  219. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_response.py +20 -0
  220. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_response_data.py +20 -0
  221. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_response_data_hashrates_item.py +23 -0
  222. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_names_response.py +22 -0
  223. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_names_response_data.py +19 -0
  224. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/list_mining_watcher_links_response.py +20 -0
  225. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/list_mining_watcher_links_response_data_item.py +27 -0
  226. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/set_mining_payout_destination_request_destination.py +7 -0
  227. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/set_mining_payout_destination_response.py +27 -0
  228. whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/set_mining_payout_destination_response_payout_destination.py +7 -0
  229. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/__init__.py +37 -0
  230. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/client.py +1096 -0
  231. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/raw_client.py +1398 -0
  232. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/__init__.py +37 -0
  233. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_funding_history_market_response_item.py +52 -0
  234. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_futures_response.py +22 -0
  235. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_markets_response_item.py +110 -0
  236. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_markets_response_item_type.py +5 -0
  237. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_mining_pool_response.py +20 -0
  238. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data.py +39 -0
  239. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data_blocks_item.py +22 -0
  240. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data_last7days_hash_rate_item.py +20 -0
  241. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_platform_status_response.py +22 -0
  242. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_ticker_response_value.py +56 -0
  243. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_time_response.py +22 -0
  244. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_trades_market_request_type.py +5 -0
  245. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_trades_market_response_item.py +57 -0
  246. whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_trades_market_response_item_type.py +5 -0
  247. whitebit_python_sdk-1.1.0/src/whitebit/raw_client.py +637 -0
  248. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/__init__.py +47 -0
  249. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/client.py +4143 -0
  250. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/raw_client.py +5628 -0
  251. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/__init__.py +45 -0
  252. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/cancel_all_orders_request_type_item.py +5 -0
  253. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_executed_order_history_response_value_item.py +62 -0
  254. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_executed_order_history_response_value_item_side.py +5 -0
  255. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_kill_switch_status_response_item.py +44 -0
  256. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_kill_switch_status_response_item_types_item.py +5 -0
  257. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_deals_response.py +33 -0
  258. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_deals_response_records_item.py +80 -0
  259. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_history_response_value_item.py +131 -0
  260. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_history_response_value_item_side.py +5 -0
  261. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/limit_order_request_side.py +5 -0
  262. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/limit_order_request_stp.py +5 -0
  263. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/set_kill_switch_request_types_item.py +5 -0
  264. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/set_kill_switch_response.py +44 -0
  265. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/set_kill_switch_response_types_item.py +5 -0
  266. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_limit_order_request_side.py +5 -0
  267. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_limit_order_request_stp.py +5 -0
  268. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_market_order_request_side.py +5 -0
  269. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_market_order_request_stp.py +5 -0
  270. whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/trade_account_balance_response_value.py +27 -0
  271. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/__init__.py +25 -0
  272. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/client.py +892 -0
  273. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/raw_client.py +1399 -0
  274. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/__init__.py +23 -0
  275. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/create_sub_account_request_permissions.py +29 -0
  276. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/edit_sub_account_request_permissions.py +29 -0
  277. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/get_sub_account_balances_response_value_item.py +21 -0
  278. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/get_sub_account_transfer_history_request_direction.py +5 -0
  279. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/get_sub_account_transfer_history_response.py +22 -0
  280. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/list_sub_accounts_response.py +22 -0
  281. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/sub_account_transfer_request_direction.py +5 -0
  282. whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/sub_account_transfer_response.py +26 -0
  283. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/__init__.py +19 -0
  284. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/client.py +754 -0
  285. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/raw_client.py +1183 -0
  286. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/__init__.py +17 -0
  287. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/create_sub_account_api_key_ip_address_response.py +19 -0
  288. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/delete_sub_account_api_key_ip_address_response.py +19 -0
  289. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/edit_sub_account_api_key_request_urls_item.py +20 -0
  290. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/list_sub_account_api_key_ip_addresses_response.py +19 -0
  291. whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/list_sub_account_api_keys_response.py +22 -0
  292. whitebit_python_sdk-1.1.0/src/whitebit/transfer/__init__.py +15 -0
  293. whitebit_python_sdk-1.1.0/src/whitebit/transfer/client.py +220 -0
  294. whitebit_python_sdk-1.1.0/src/whitebit/transfer/raw_client.py +276 -0
  295. whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/__init__.py +13 -0
  296. whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/transfer_between_balances_request_from.py +5 -0
  297. whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/transfer_between_balances_request_method.py +7 -0
  298. whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/transfer_between_balances_request_to.py +5 -0
  299. whitebit_python_sdk-1.1.0/src/whitebit/types/__init__.py +311 -0
  300. whitebit_python_sdk-1.1.0/src/whitebit/types/asset.py +106 -0
  301. whitebit_python_sdk-1.1.0/src/whitebit/types/asset_limits.py +33 -0
  302. whitebit_python_sdk-1.1.0/src/whitebit/types/asset_limits_deposit_value.py +20 -0
  303. whitebit_python_sdk-1.1.0/src/whitebit/types/asset_limits_withdraw_value.py +20 -0
  304. whitebit_python_sdk-1.1.0/src/whitebit/types/asset_memo.py +24 -0
  305. whitebit_python_sdk-1.1.0/src/whitebit/types/asset_networks.py +36 -0
  306. whitebit_python_sdk-1.1.0/src/whitebit/types/asset_providers.py +24 -0
  307. whitebit_python_sdk-1.1.0/src/whitebit/types/authorize_request.py +32 -0
  308. whitebit_python_sdk-1.1.0/src/whitebit/types/authorize_response.py +29 -0
  309. whitebit_python_sdk-1.1.0/src/whitebit/types/authorize_response_result.py +22 -0
  310. whitebit_python_sdk-1.1.0/src/whitebit/types/bad_request_error_body.py +20 -0
  311. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_request.py +32 -0
  312. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_response.py +33 -0
  313. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_response_result_value.py +37 -0
  314. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_subscribe.py +32 -0
  315. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_update.py +33 -0
  316. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_update_params_item.py +48 -0
  317. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_request.py +32 -0
  318. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_response.py +33 -0
  319. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_response_result_value.py +27 -0
  320. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_subscribe.py +32 -0
  321. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_update.py +33 -0
  322. whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_update_params_item_value.py +27 -0
  323. whitebit_python_sdk-1.1.0/src/whitebit/types/base_request.py +22 -0
  324. whitebit_python_sdk-1.1.0/src/whitebit/types/base_response.py +24 -0
  325. whitebit_python_sdk-1.1.0/src/whitebit/types/book_ticker_subscribe.py +29 -0
  326. whitebit_python_sdk-1.1.0/src/whitebit/types/book_ticker_update.py +26 -0
  327. whitebit_python_sdk-1.1.0/src/whitebit/types/book_ticker_update_data.py +5 -0
  328. whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_events_subscribe.py +32 -0
  329. whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_events_update.py +34 -0
  330. whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_subscribe.py +32 -0
  331. whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_update.py +30 -0
  332. whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_update_params.py +25 -0
  333. whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_update_params_records_item.py +47 -0
  334. whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_limit_order_response.py +7 -0
  335. whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_limit_order_response_item.py +22 -0
  336. whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_order_item.py +42 -0
  337. whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_order_item_side.py +5 -0
  338. whitebit_python_sdk-1.1.0/src/whitebit/types/candle.py +5 -0
  339. whitebit_python_sdk-1.1.0/src/whitebit/types/candles_request.py +36 -0
  340. whitebit_python_sdk-1.1.0/src/whitebit/types/candles_response.py +26 -0
  341. whitebit_python_sdk-1.1.0/src/whitebit/types/candles_subscribe.py +34 -0
  342. whitebit_python_sdk-1.1.0/src/whitebit/types/candles_update.py +26 -0
  343. whitebit_python_sdk-1.1.0/src/whitebit/types/code_history.py +47 -0
  344. whitebit_python_sdk-1.1.0/src/whitebit/types/code_info.py +47 -0
  345. whitebit_python_sdk-1.1.0/src/whitebit/types/convert_confirm_response.py +33 -0
  346. whitebit_python_sdk-1.1.0/src/whitebit/types/convert_estimate_request_direction.py +5 -0
  347. whitebit_python_sdk-1.1.0/src/whitebit/types/convert_estimate_response.py +56 -0
  348. whitebit_python_sdk-1.1.0/src/whitebit/types/convert_history_response.py +34 -0
  349. whitebit_python_sdk-1.1.0/src/whitebit/types/convert_history_response_records_item.py +45 -0
  350. whitebit_python_sdk-1.1.0/src/whitebit/types/convert_history_response_records_item_path_item.py +23 -0
  351. whitebit_python_sdk-1.1.0/src/whitebit/types/credit_line.py +28 -0
  352. whitebit_python_sdk-1.1.0/src/whitebit/types/deals_request.py +35 -0
  353. whitebit_python_sdk-1.1.0/src/whitebit/types/deals_response.py +29 -0
  354. whitebit_python_sdk-1.1.0/src/whitebit/types/deals_response_result.py +30 -0
  355. whitebit_python_sdk-1.1.0/src/whitebit/types/deals_response_result_records_item.py +82 -0
  356. whitebit_python_sdk-1.1.0/src/whitebit/types/deals_subscribe.py +32 -0
  357. whitebit_python_sdk-1.1.0/src/whitebit/types/deals_update.py +43 -0
  358. whitebit_python_sdk-1.1.0/src/whitebit/types/depth_level.py +5 -0
  359. whitebit_python_sdk-1.1.0/src/whitebit/types/depth_request.py +35 -0
  360. whitebit_python_sdk-1.1.0/src/whitebit/types/depth_response.py +22 -0
  361. whitebit_python_sdk-1.1.0/src/whitebit/types/depth_subscribe.py +32 -0
  362. whitebit_python_sdk-1.1.0/src/whitebit/types/depth_update.py +31 -0
  363. whitebit_python_sdk-1.1.0/src/whitebit/types/depth_update_data.py +40 -0
  364. whitebit_python_sdk-1.1.0/src/whitebit/types/error.py +21 -0
  365. whitebit_python_sdk-1.1.0/src/whitebit/types/error_inner.py +21 -0
  366. whitebit_python_sdk-1.1.0/src/whitebit/types/error_response.py +32 -0
  367. whitebit_python_sdk-1.1.0/src/whitebit/types/error_v4.py +25 -0
  368. whitebit_python_sdk-1.1.0/src/whitebit/types/executed_order_object.py +133 -0
  369. whitebit_python_sdk-1.1.0/src/whitebit/types/executed_order_object_position_side.py +5 -0
  370. whitebit_python_sdk-1.1.0/src/whitebit/types/executed_order_object_stp.py +5 -0
  371. whitebit_python_sdk-1.1.0/src/whitebit/types/fee_details.py +23 -0
  372. whitebit_python_sdk-1.1.0/src/whitebit/types/fee_details_flex.py +21 -0
  373. whitebit_python_sdk-1.1.0/src/whitebit/types/fee_info.py +49 -0
  374. whitebit_python_sdk-1.1.0/src/whitebit/types/fee_info_deposit.py +63 -0
  375. whitebit_python_sdk-1.1.0/src/whitebit/types/fee_info_withdraw.py +63 -0
  376. whitebit_python_sdk-1.1.0/src/whitebit/types/fixed_plan.py +79 -0
  377. whitebit_python_sdk-1.1.0/src/whitebit/types/flex_investment.py +67 -0
  378. whitebit_python_sdk-1.1.0/src/whitebit/types/flex_investment_history.py +64 -0
  379. whitebit_python_sdk-1.1.0/src/whitebit/types/flex_plan.py +50 -0
  380. whitebit_python_sdk-1.1.0/src/whitebit/types/futures_market.py +117 -0
  381. whitebit_python_sdk-1.1.0/src/whitebit/types/interest_payment.py +48 -0
  382. whitebit_python_sdk-1.1.0/src/whitebit/types/investment.py +64 -0
  383. whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_request.py +29 -0
  384. whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_response.py +25 -0
  385. whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_subscribe.py +29 -0
  386. whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_update.py +30 -0
  387. whitebit_python_sdk-1.1.0/src/whitebit/types/margin_positions_events_subscribe.py +34 -0
  388. whitebit_python_sdk-1.1.0/src/whitebit/types/margin_positions_events_update.py +34 -0
  389. whitebit_python_sdk-1.1.0/src/whitebit/types/market_order_request.py +51 -0
  390. whitebit_python_sdk-1.1.0/src/whitebit/types/market_order_request_side.py +5 -0
  391. whitebit_python_sdk-1.1.0/src/whitebit/types/market_order_request_stp.py +5 -0
  392. whitebit_python_sdk-1.1.0/src/whitebit/types/market_request.py +34 -0
  393. whitebit_python_sdk-1.1.0/src/whitebit/types/market_response.py +22 -0
  394. whitebit_python_sdk-1.1.0/src/whitebit/types/market_statistics.py +57 -0
  395. whitebit_python_sdk-1.1.0/src/whitebit/types/market_subscribe.py +25 -0
  396. whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_request.py +29 -0
  397. whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_response.py +22 -0
  398. whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_statistics.py +47 -0
  399. whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_subscribe.py +25 -0
  400. whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_update.py +30 -0
  401. whitebit_python_sdk-1.1.0/src/whitebit/types/market_update.py +30 -0
  402. whitebit_python_sdk-1.1.0/src/whitebit/types/mining_reward.py +62 -0
  403. whitebit_python_sdk-1.1.0/src/whitebit/types/not_found_error_body.py +20 -0
  404. whitebit_python_sdk-1.1.0/src/whitebit/types/order_book.py +33 -0
  405. whitebit_python_sdk-1.1.0/src/whitebit/types/order_object.py +118 -0
  406. whitebit_python_sdk-1.1.0/src/whitebit/types/order_object_position_side.py +5 -0
  407. whitebit_python_sdk-1.1.0/src/whitebit/types/order_object_stp.py +5 -0
  408. whitebit_python_sdk-1.1.0/src/whitebit/types/order_response.py +123 -0
  409. whitebit_python_sdk-1.1.0/src/whitebit/types/orderbook_response.py +37 -0
  410. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_request.py +35 -0
  411. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_response.py +29 -0
  412. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_response_result.py +30 -0
  413. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_subscribe.py +34 -0
  414. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_update.py +33 -0
  415. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_request.py +32 -0
  416. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_response.py +29 -0
  417. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_response_result.py +35 -0
  418. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_subscribe.py +32 -0
  419. whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_update.py +32 -0
  420. whitebit_python_sdk-1.1.0/src/whitebit/types/ping_request.py +25 -0
  421. whitebit_python_sdk-1.1.0/src/whitebit/types/ping_response.py +21 -0
  422. whitebit_python_sdk-1.1.0/src/whitebit/types/ping_response_result.py +5 -0
  423. whitebit_python_sdk-1.1.0/src/whitebit/types/positions_subscribe.py +32 -0
  424. whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update.py +30 -0
  425. whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params.py +25 -0
  426. whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params_records_item.py +99 -0
  427. whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params_records_item_liq_stage.py +5 -0
  428. whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params_records_item_position_side.py +5 -0
  429. whitebit_python_sdk-1.1.0/src/whitebit/types/provider_fee_details.py +28 -0
  430. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account.py +63 -0
  431. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key.py +84 -0
  432. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key_access_endpoints_item.py +27 -0
  433. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key_list.py +39 -0
  434. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key_list_access_endpoints_item.py +20 -0
  435. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_kyc.py +37 -0
  436. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_permissions.py +37 -0
  437. whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_transfer.py +53 -0
  438. whitebit_python_sdk-1.1.0/src/whitebit/types/subscription_response.py +29 -0
  439. whitebit_python_sdk-1.1.0/src/whitebit/types/subscription_response_result.py +22 -0
  440. whitebit_python_sdk-1.1.0/src/whitebit/types/time_request.py +25 -0
  441. whitebit_python_sdk-1.1.0/src/whitebit/types/time_response.py +23 -0
  442. whitebit_python_sdk-1.1.0/src/whitebit/types/trade.py +48 -0
  443. whitebit_python_sdk-1.1.0/src/whitebit/types/trade_type.py +5 -0
  444. whitebit_python_sdk-1.1.0/src/whitebit/types/trades_request.py +35 -0
  445. whitebit_python_sdk-1.1.0/src/whitebit/types/trades_response.py +22 -0
  446. whitebit_python_sdk-1.1.0/src/whitebit/types/trades_subscribe.py +28 -0
  447. whitebit_python_sdk-1.1.0/src/whitebit/types/trades_update.py +30 -0
  448. whitebit_python_sdk-1.1.0/src/whitebit/types/transaction_history.py +108 -0
  449. whitebit_python_sdk-1.1.0/src/whitebit/types/transaction_history_confirmations.py +31 -0
  450. whitebit_python_sdk-1.1.0/src/whitebit/types/unprocessable_entity_error_body.py +20 -0
  451. whitebit_python_sdk-1.1.0/src/whitebit/types/unsubscribe_request.py +32 -0
  452. whitebit_python_sdk-1.1.0/src/whitebit/withdraw/__init__.py +11 -0
  453. whitebit_python_sdk-1.1.0/src/whitebit/withdraw/client.py +496 -0
  454. whitebit_python_sdk-1.1.0/src/whitebit/withdraw/raw_client.py +634 -0
  455. whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/__init__.py +9 -0
  456. whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/create_withdraw_request_beneficiary.py +74 -0
  457. whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/create_withdraw_request_travel_rule.py +52 -0
  458. whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/create_withdraw_request_travel_rule_type.py +5 -0
  459. whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/PKG-INFO +155 -0
  460. whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/SOURCES.txt +463 -0
  461. whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/dependency_links.txt +1 -0
  462. whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/not-zip-safe +1 -0
  463. whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/requires.txt +6 -0
  464. whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/top_level.txt +1 -0
  465. whitebit_python_sdk-1.1.0/tests/test.py +128 -0
@@ -0,0 +1,20 @@
1
+ v1.0.5 - March 16, 2023
2
+
3
+ #### Breaking Changes:
4
+ - Margin balance response format changed
5
+
6
+ #### Highlights
7
+ - feature: Add postOnly flag to order responses
8
+ - feature: Add ioc flag to order responses
9
+ - feature: Add ioc and postOnly parameters to create margin/spot limit
10
+ - feature: Add endpoints for get user custom fee and user fee for some market
11
+ - doc: Added an example of using websocket
12
+
13
+
14
+ v1.1.0 - August 28, 2023
15
+
16
+ #### Highlights
17
+ - feature: The parameter "market" in the function "get_unexecuted_orders" has become optional.
18
+ - feature: Add the put_kill_switch endpoint to cancel orders after a specified time (sec) in the "timeout" parameter.
19
+ - feature: Add the get_kill_switch_status endpoint retrieves the status of kill-switch timer.
20
+ - feature: Add the bulk endpoint creates bulk limit trading orders.
@@ -0,0 +1,20 @@
1
+ Copyright 2023 UAB Clear White Technologies
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the “Software”), to deal in
5
+ the Software without restriction, including without limitation the rights to use,
6
+ copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
7
+ Software, and to permit persons to whom the Software is furnished to do so,
8
+ subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
14
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
15
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
16
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,10 @@
1
+ include README.md
2
+ include LICENSE
3
+ include HISTORY.txt
4
+ include requirements.txt
5
+ recursive-include src/whitebit *.py
6
+ recursive-include src/whitebit *.typed
7
+ recursive-include examples *.py
8
+ recursive-exclude * __pycache__
9
+ recursive-exclude * *.py[co]
10
+ recursive-exclude * .DS_Store
@@ -0,0 +1,155 @@
1
+ Metadata-Version: 2.4
2
+ Name: whitebit-python-sdk
3
+ Version: 1.1.0
4
+ Summary: A Python SDK for WhiteBit cryptocurrency exchange API
5
+ Author: WhiteBit SDK Team
6
+ License: MIT
7
+ Project-URL: Homepage, https://www.whitebit.com
8
+ Project-URL: Documentation, https://whitebit-exchange.github.io/api-docs/
9
+ Project-URL: Repository, https://github.com/whitebit-exchange/python-sdk
10
+ Project-URL: Issues, https://github.com/whitebit-exchange/python-sdk/issues
11
+ Keywords: whitebit,cryptocurrency,exchange,api,sdk,trading
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Office/Business :: Financial
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: requests<3.0.0,>=2.28.1
26
+ Requires-Dist: websockets<11.0,>=10.4
27
+ Requires-Dist: responses>=0.23.1
28
+ Requires-Dist: urllib3<2.0.0,>=1.26.15
29
+ Requires-Dist: pydantic<3.0.0,>=1.10.0
30
+ Requires-Dist: httpx<1.0.0,>=0.23.0
31
+ Dynamic: license-file
32
+
33
+ ## A Python SDK for [whitebit](https://www.whitebit.com)
34
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
35
+
36
+ Please read [whitebit API document](https://whitebit-exchange.github.io/api-docs/) before continuing.
37
+
38
+ ## API List
39
+
40
+ - [Private API](https://whitebit-exchange.github.io/api-docs/private/http-trade-v4/)
41
+ - [Public API](https://whitebit-exchange.github.io/api-docs/public/http-v4/)
42
+ - [Private WS](https://whitebit-exchange.github.io/api-docs/private/websocket/)
43
+ - [Public WS](https://whitebit-exchange.github.io/api-docs/public/websocket/)
44
+
45
+ v4 is the preferred one to use
46
+
47
+ ## Disclaimer
48
+ “You acknowledge that the software is provided “as is”. Author makes no representations or warranties with respect to
49
+ the software whether express or implied, including but not limited to, implied warranties of merchantability and fitness
50
+ for a particular purpose. author makes no representation or warranty that: (i) the use and distribution of the software
51
+ will be uninterrupted or error free, and (ii) any use and distribution of the software is free from infringement of any
52
+ third party intellectual property rights. It shall be your sole responsibility to make such determination before the use
53
+ of software. Author disclaims any liability in case any such use and distribution infringe any third party’s
54
+ intellectual property rights. Author hereby disclaims any warranty and liability whatsoever for any development created
55
+ by or for you with respect to your customers. You acknowledge that you have relied on no warranties and that no
56
+ warranties are made by author or granted by law whenever it is permitted by law.”
57
+
58
+ ## REST API
59
+
60
+ ### Setup
61
+
62
+ #### Install the Python module:
63
+
64
+ ```bash
65
+ python3 -m pip install python-whitebit-sdk
66
+ ```
67
+
68
+ Init client for API services. Get APIKey/SecretKey from your whitebit account.
69
+
70
+ ```python
71
+ from whitebit import MainAccountClient
72
+
73
+ account = MainAccountClient(api_key="", api_secret=""))
74
+ ```
75
+
76
+ Following are some simple examples.
77
+
78
+ See the **examples** folder for full references.
79
+
80
+ #### Create Spot Limit Order
81
+
82
+ ```python
83
+ # Create order/spot client
84
+ order = OrderClient(api_key="",
85
+ api_secret="")
86
+
87
+ # Call SDK function put_limit
88
+ print(order.put_limit("BTC_USDT", "sell", "0.1", "40000", True))
89
+ ```
90
+
91
+ ## Websocket API
92
+
93
+ ### Setup
94
+
95
+ Init bot class and "on_message" method for work with ws responses. Get APIKey/SecretKey from your whitebit account.
96
+
97
+ ```python
98
+ class Bot(WhitebitWsClient):
99
+ def __init__(self):
100
+ super().__init__(key="", secret="")
101
+
102
+ async def on_message(self, event) -> None:
103
+ logging.info(event)
104
+
105
+ ```
106
+
107
+ Following are some simple examples.
108
+
109
+ See the **examples** folder for full references.
110
+
111
+ #### Subscribe on deals topic
112
+
113
+ ```python
114
+ class Bot(WhitebitWsClient):
115
+ '''Can be used to create a custom trading strategy/bot'''
116
+
117
+ def __init__(self):
118
+ super().__init__(key="", secret="")
119
+
120
+ async def on_message(self, event) -> None:
121
+ '''receives the websocket events'''
122
+ if 'result' in event:
123
+ result = event['result']
124
+ match result:
125
+ case 'pong': return
126
+ logging.info(event['result'])
127
+ return
128
+ else:
129
+ method = event['method']
130
+ match method:
131
+ case WhitebitWsClient.DEALS_UPDATE:
132
+ logging.info(event['params'])
133
+ return
134
+
135
+
136
+ async def main() -> None:
137
+ bot = Bot()
138
+ await bot.get_deals("BTC_USDT", 0, 100)
139
+ await bot.subscribe_deals(["BTC_USDT"])
140
+ while not bot.exception_occur:
141
+ await asyncio.sleep(100)
142
+ return
143
+
144
+
145
+ if __name__ == '__main__':
146
+ logging.basicConfig(level=logging.INFO)
147
+ loop = asyncio.new_event_loop()
148
+ asyncio.set_event_loop(loop)
149
+ try:
150
+ asyncio.run(main())
151
+ except KeyboardInterrupt:
152
+ pass
153
+ finally:
154
+ loop.close()
155
+ ```
@@ -0,0 +1,123 @@
1
+ ## A Python SDK for [whitebit](https://www.whitebit.com)
2
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
3
+
4
+ Please read [whitebit API document](https://whitebit-exchange.github.io/api-docs/) before continuing.
5
+
6
+ ## API List
7
+
8
+ - [Private API](https://whitebit-exchange.github.io/api-docs/private/http-trade-v4/)
9
+ - [Public API](https://whitebit-exchange.github.io/api-docs/public/http-v4/)
10
+ - [Private WS](https://whitebit-exchange.github.io/api-docs/private/websocket/)
11
+ - [Public WS](https://whitebit-exchange.github.io/api-docs/public/websocket/)
12
+
13
+ v4 is the preferred one to use
14
+
15
+ ## Disclaimer
16
+ “You acknowledge that the software is provided “as is”. Author makes no representations or warranties with respect to
17
+ the software whether express or implied, including but not limited to, implied warranties of merchantability and fitness
18
+ for a particular purpose. author makes no representation or warranty that: (i) the use and distribution of the software
19
+ will be uninterrupted or error free, and (ii) any use and distribution of the software is free from infringement of any
20
+ third party intellectual property rights. It shall be your sole responsibility to make such determination before the use
21
+ of software. Author disclaims any liability in case any such use and distribution infringe any third party’s
22
+ intellectual property rights. Author hereby disclaims any warranty and liability whatsoever for any development created
23
+ by or for you with respect to your customers. You acknowledge that you have relied on no warranties and that no
24
+ warranties are made by author or granted by law whenever it is permitted by law.”
25
+
26
+ ## REST API
27
+
28
+ ### Setup
29
+
30
+ #### Install the Python module:
31
+
32
+ ```bash
33
+ python3 -m pip install python-whitebit-sdk
34
+ ```
35
+
36
+ Init client for API services. Get APIKey/SecretKey from your whitebit account.
37
+
38
+ ```python
39
+ from whitebit import MainAccountClient
40
+
41
+ account = MainAccountClient(api_key="", api_secret=""))
42
+ ```
43
+
44
+ Following are some simple examples.
45
+
46
+ See the **examples** folder for full references.
47
+
48
+ #### Create Spot Limit Order
49
+
50
+ ```python
51
+ # Create order/spot client
52
+ order = OrderClient(api_key="",
53
+ api_secret="")
54
+
55
+ # Call SDK function put_limit
56
+ print(order.put_limit("BTC_USDT", "sell", "0.1", "40000", True))
57
+ ```
58
+
59
+ ## Websocket API
60
+
61
+ ### Setup
62
+
63
+ Init bot class and "on_message" method for work with ws responses. Get APIKey/SecretKey from your whitebit account.
64
+
65
+ ```python
66
+ class Bot(WhitebitWsClient):
67
+ def __init__(self):
68
+ super().__init__(key="", secret="")
69
+
70
+ async def on_message(self, event) -> None:
71
+ logging.info(event)
72
+
73
+ ```
74
+
75
+ Following are some simple examples.
76
+
77
+ See the **examples** folder for full references.
78
+
79
+ #### Subscribe on deals topic
80
+
81
+ ```python
82
+ class Bot(WhitebitWsClient):
83
+ '''Can be used to create a custom trading strategy/bot'''
84
+
85
+ def __init__(self):
86
+ super().__init__(key="", secret="")
87
+
88
+ async def on_message(self, event) -> None:
89
+ '''receives the websocket events'''
90
+ if 'result' in event:
91
+ result = event['result']
92
+ match result:
93
+ case 'pong': return
94
+ logging.info(event['result'])
95
+ return
96
+ else:
97
+ method = event['method']
98
+ match method:
99
+ case WhitebitWsClient.DEALS_UPDATE:
100
+ logging.info(event['params'])
101
+ return
102
+
103
+
104
+ async def main() -> None:
105
+ bot = Bot()
106
+ await bot.get_deals("BTC_USDT", 0, 100)
107
+ await bot.subscribe_deals(["BTC_USDT"])
108
+ while not bot.exception_occur:
109
+ await asyncio.sleep(100)
110
+ return
111
+
112
+
113
+ if __name__ == '__main__':
114
+ logging.basicConfig(level=logging.INFO)
115
+ loop = asyncio.new_event_loop()
116
+ asyncio.set_event_loop(loop)
117
+ try:
118
+ asyncio.run(main())
119
+ except KeyboardInterrupt:
120
+ pass
121
+ finally:
122
+ loop.close()
123
+ ```
@@ -0,0 +1,62 @@
1
+ import time
2
+ import logging.config
3
+
4
+ from whitebit.collateral.market.market import CollateralMarketClient
5
+ from whitebit.collateral.account.account import CollateralAccountClient
6
+ from whitebit.collateral.order.order import CollateralOrderClient
7
+
8
+ logging.basicConfig(
9
+ format='%(asctime)s %(module)s,line: %(lineno)d %(levelname)8s | %(message)s',
10
+ datefmt='%Y/%m/%d %H:%M:%S',
11
+ level=logging.INFO
12
+ )
13
+
14
+ logging.getLogger().setLevel(logging.INFO)
15
+ logging.getLogger('requests').setLevel(logging.WARNING)
16
+ logging.getLogger('urllib3').setLevel(logging.WARNING)
17
+
18
+
19
+ def market_examples() -> None:
20
+ """Example usage of the Market client"""
21
+ market = CollateralMarketClient()
22
+
23
+ print(market.get_markets_info())
24
+ print(market.get_futures_markets())
25
+
26
+ time.sleep(2)
27
+
28
+
29
+ def account_examples() -> None:
30
+ account = CollateralAccountClient(api_key="",
31
+ api_secret="")
32
+
33
+ print(account.get_balance())
34
+ print(account.get_open_positions("BTC_USDT"))
35
+ print(account.set_leverage("5"))
36
+ print(account.get_summary())
37
+ print(account.get_positions_history())
38
+ print(account.get_oco_orders("BTC_USDT"))
39
+
40
+
41
+ def order_examples() ->None:
42
+ margin_order = CollateralOrderClient(api_key="",
43
+ api_secret="")
44
+
45
+ print(margin_order.put_limit("BTC_USDT", "sell", "0.1", "40000", True))
46
+ print(margin_order.put_market("BTC_USDT", "sell", "6"))
47
+ print(margin_order.put_oco("BTC_USDT", "sell", "0.1", "30000", "20000", "21000"))
48
+ print(margin_order.put_stop_limit("BTC_USDT", "sell", "0.1", "30000", "31000"))
49
+ print(margin_order.put_stop_market("BTC_USDT", "sell", "0.1", "30000"))
50
+ print(margin_order.cancel_order("BTC_USDT", 168937230825))
51
+ print(margin_order.cancel_oco("BTC_USDT", 168937233685))
52
+
53
+
54
+
55
+ def main() -> None:
56
+ market_examples()
57
+ account_examples()
58
+ order_examples()
59
+
60
+
61
+ if __name__ == '__main__':
62
+ main()
@@ -0,0 +1,40 @@
1
+ import time
2
+ import logging.config
3
+
4
+ from whitebit.main.account.account import MainAccountClient
5
+
6
+ logging.basicConfig(
7
+ format='%(asctime)s %(module)s,line: %(lineno)d %(levelname)8s | %(message)s',
8
+ datefmt='%Y/%m/%d %H:%M:%S',
9
+ level=logging.INFO
10
+ )
11
+
12
+ logging.getLogger().setLevel(logging.INFO)
13
+ logging.getLogger('requests').setLevel(logging.WARNING)
14
+ logging.getLogger('urllib3').setLevel(logging.WARNING)
15
+
16
+
17
+ def main_examples() -> None:
18
+ """Example usage of the main account client"""
19
+ account = MainAccountClient(api_key="",
20
+ api_secret="")
21
+
22
+ print(account.get_my_codes())
23
+ print(account.get_codes_history())
24
+ print(account.get_fee())
25
+ print(account.get_balance("USDT"))
26
+ print(account.get_history())
27
+ print(account.create_code("USDT", "10"))
28
+ print(account.apply_code("WB5cb61d11-baa5-40a9-a9ad-ee81f50909f4USDT"))
29
+ print(account.get_custom_fee())
30
+ print(account.get_custom_fee_by_market("BTC_USDT"))
31
+
32
+ time.sleep(2)
33
+
34
+
35
+ def main() -> None:
36
+ main_examples()
37
+
38
+
39
+ if __name__ == '__main__':
40
+ main()
@@ -0,0 +1,79 @@
1
+ import time
2
+ import logging.config
3
+
4
+ from whitebit.trade.market.market import TradeMarketClient
5
+ from whitebit.trade.account.account import TradeAccountClient
6
+ from whitebit.trade.order.order import TradeOrderClient
7
+
8
+ logging.basicConfig(
9
+ format='%(asctime)s %(module)s,line: %(lineno)d %(levelname)8s | %(message)s',
10
+ datefmt='%Y/%m/%d %H:%M:%S',
11
+ level=logging.INFO
12
+ )
13
+
14
+ logging.getLogger().setLevel(logging.INFO)
15
+ logging.getLogger('requests').setLevel(logging.WARNING)
16
+ logging.getLogger('urllib3').setLevel(logging.WARNING)
17
+
18
+
19
+ def market_examples() -> None:
20
+ """Example usage of the Market client"""
21
+ market = TradeMarketClient()
22
+
23
+ print(market.get_tickers())
24
+ print(market.get_markets_info())
25
+ print(market.get_market_activity())
26
+ print(market.get_single_market_activity("BTC_USDT"))
27
+ print(market.get_symbols())
28
+ print(market.get_kline("BTC_USDT"))
29
+ print(market.get_trading_fee())
30
+ print(market.get_fee_list())
31
+ print(market.get_depth("BTC_USDT"))
32
+ print(market.get_order_book(market="BTC_USDT", limit="10", level="0.1"))
33
+ print(market.get_trade_history("BTC_USDT", 123))
34
+ print(market.get_deals("BTC_USDT"))
35
+ print(market.get_assets())
36
+ time.sleep(2)
37
+
38
+
39
+ def account_examples():
40
+ account = TradeAccountClient(api_key="",
41
+ api_secret="")
42
+ print(account.get_balance())
43
+ print(account.get_history())
44
+ print(account.get_order_deals(1))
45
+ print(account.get_executed_history())
46
+ print(account.get_unexecuted_orders("BTC_USDT"))
47
+ print(account.get_ping())
48
+ print(account.get_time())
49
+ print(account.get_ws_token())
50
+
51
+
52
+ def order_examples():
53
+ order = TradeOrderClient(api_key="",
54
+ api_secret="")
55
+ print(order.put_limit("BTC_UzSDT", "sell", "0.1", "40000", True))
56
+ print(order.put_market("BTC_USDT", "buy", "6"))
57
+ print(order.put_market_stock("BTC_USDT", "sell", "0.1"))
58
+ print(order.put_stop_limit("BTC_USDT", "sell", "0.1", "30000", "31000"))
59
+ print(order.put_stop_market("BTC_USDT", "sell", "0.1", "30000"))
60
+ print(order.cancel_order("BTC_USDT", 168935136388))
61
+
62
+ bulk_orders = list()
63
+ bulk_orders.append(order.build_limit_order("BTC_USDT", "buy", "0.000199", "20000"))
64
+ bulk_orders.append(
65
+ order.build_limit_order("ETH_USDT", "buy", "0.00428", "1400", post_only=True, ioc=False, client_order_id="myId")
66
+ )
67
+ print(order.limit_bulk(bulk_orders))
68
+ print(order.put_kill_switch("BTC_USDT", "30", [order.ORDER_TYPE_SPOT]))
69
+ print(order.get_kill_switch_status())
70
+
71
+
72
+ def main() -> None:
73
+ market_examples()
74
+ account_examples()
75
+ order_examples()
76
+
77
+
78
+ if __name__ == '__main__':
79
+ main()
@@ -0,0 +1,47 @@
1
+ import asyncio
2
+ import logging
3
+
4
+ from whitebit.stream.ws import WhitebitWsClient
5
+
6
+
7
+ class Bot(WhitebitWsClient):
8
+ '''Can be used to create a custom trading strategy/bot'''
9
+
10
+ def __init__(self):
11
+ super().__init__(key="", secret="")
12
+
13
+ async def on_message(self, event) -> None:
14
+ '''receives the websocket events'''
15
+ if 'result' in event:
16
+ result = event['result']
17
+ match result:
18
+ case 'pong': return
19
+ logging.info(event['result'])
20
+ return
21
+ else:
22
+ method = event['method']
23
+ match method:
24
+ case WhitebitWsClient.DEALS_UPDATE:
25
+ logging.info(event['params'])
26
+ return
27
+
28
+
29
+ async def main() -> None:
30
+ bot = Bot()
31
+ await bot.get_deals("BTC_USDT", 0, 100)
32
+ await bot.subscribe_deals(["BTC_USDT"])
33
+ while not bot.exception_occur:
34
+ await asyncio.sleep(100)
35
+ return
36
+
37
+
38
+ if __name__ == '__main__':
39
+ logging.basicConfig(level=logging.INFO)
40
+ loop = asyncio.new_event_loop()
41
+ asyncio.set_event_loop(loop)
42
+ try:
43
+ asyncio.run(main())
44
+ except KeyboardInterrupt:
45
+ pass
46
+ finally:
47
+ loop.close()
@@ -0,0 +1,53 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "whitebit-python-sdk"
7
+ version = "1.1.0"
8
+ description = "A Python SDK for WhiteBit cryptocurrency exchange API"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = {text = "MIT"}
12
+ keywords = ["whitebit", "cryptocurrency", "exchange", "api", "sdk", "trading"]
13
+ authors = [
14
+ {name = "WhiteBit SDK Team"}
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: Software Development :: Libraries :: Python Modules",
26
+ "Topic :: Office/Business :: Financial",
27
+ ]
28
+ dependencies = [
29
+ "requests>=2.28.1,<3.0.0",
30
+ "websockets>=10.4,<11.0",
31
+ "responses>=0.23.1",
32
+ "urllib3>=1.26.15,<2.0.0",
33
+ "pydantic>=1.10.0,<3.0.0",
34
+ "httpx>=0.23.0,<1.0.0",
35
+ ]
36
+
37
+ [project.urls]
38
+ Homepage = "https://www.whitebit.com"
39
+ Documentation = "https://whitebit-exchange.github.io/api-docs/"
40
+ Repository = "https://github.com/whitebit-exchange/python-sdk"
41
+ Issues = "https://github.com/whitebit-exchange/python-sdk/issues"
42
+
43
+ [tool.setuptools]
44
+ # Автоматически найти пакеты в src/
45
+ zip-safe = false
46
+
47
+ [tool.setuptools.packages.find]
48
+ where = ["src"]
49
+ include = ["whitebit*"]
50
+ namespaces = false
51
+
52
+ [tool.setuptools.package-data]
53
+ whitebit = ["py.typed"]
@@ -0,0 +1,4 @@
1
+ requests==2.28.1
2
+ websockets==10.4
3
+ responses==0.23.1
4
+ urllib3==1.26.15
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+