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.
- whitebit_python_sdk-1.1.0/HISTORY.txt +20 -0
- whitebit_python_sdk-1.1.0/LICENSE +20 -0
- whitebit_python_sdk-1.1.0/MANIFEST.in +10 -0
- whitebit_python_sdk-1.1.0/PKG-INFO +155 -0
- whitebit_python_sdk-1.1.0/README.md +123 -0
- whitebit_python_sdk-1.1.0/examples/collateral_examples.py +62 -0
- whitebit_python_sdk-1.1.0/examples/main_examples.py +40 -0
- whitebit_python_sdk-1.1.0/examples/trade_examples.py +79 -0
- whitebit_python_sdk-1.1.0/examples/ws_example.py +47 -0
- whitebit_python_sdk-1.1.0/pyproject.toml +53 -0
- whitebit_python_sdk-1.1.0/requirements.txt +4 -0
- whitebit_python_sdk-1.1.0/setup.cfg +4 -0
- whitebit_python_sdk-1.1.0/src/whitebit/__init__.py +793 -0
- whitebit_python_sdk-1.1.0/src/whitebit/client.py +580 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/__init__.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/client.py +510 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/raw_client.py +809 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/types/__init__.py +10 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/types/apply_code_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/types/create_code_response.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/types/get_codes_history_response.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/codes/types/get_my_codes_response.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/__init__.py +183 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/client.py +2452 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/raw_client.py +4337 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/__init__.py +213 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss.py +146 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss_activation_condition.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_take_profit.py +114 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/cancel_oco_order_response_take_profit_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/change_collateral_account_leverage_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/close_position_request_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/collateral_account_balance_summary_response_item.py +48 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/collateral_account_summary_response.py +60 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item.py +98 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item_position_side.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_error.py +36 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result.py +132 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_position_side.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_status.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_request_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response.py +132 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_oto.py +44 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_limit_order_response_status.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_request_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response.py +110 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_oto.py +44 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_market_order_response_status.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss.py +159 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_activation_condition.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_status.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit.py +139 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_position_side.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_status.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_request_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response.py +122 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_oto.py +44 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_status.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_request_position_side.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response.py +117 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_oto.py +44 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_position_side.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_status.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_collateral_hedge_mode_response.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response.py +38 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item.py +60 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco.py +31 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_stop_loss.py +28 -0
- 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
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_take_profit.py +28 -0
- 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
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto_conditional_order.py +30 -0
- 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
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_funding_history_response.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_funding_history_response_records_item.py +66 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss.py +49 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss_activation_condition.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_take_profit.py +43 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_oco_orders_response_item_take_profit_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item.py +136 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item_liquidation_state.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_open_positions_response_item_tpsl.py +51 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item.py +95 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item_liquidation_state.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item_order_detail.py +61 -0
- whitebit_python_sdk-1.1.0/src/whitebit/collateral_trading/types/get_positions_history_response_item_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/__init__.py +52 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/api_error.py +23 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/client_wrapper.py +57 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/datetime_utils.py +28 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/file.py +67 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/http_client.py +497 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/http_response.py +55 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/jsonable_encoder.py +100 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/pydantic_utilities.py +255 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/query_encoder.py +58 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/remove_none_from_dict.py +11 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/request_options.py +35 -0
- whitebit_python_sdk-1.1.0/src/whitebit/core/serialization.py +276 -0
- whitebit_python_sdk-1.1.0/src/whitebit/credit_line/__init__.py +4 -0
- whitebit_python_sdk-1.1.0/src/whitebit/credit_line/client.py +128 -0
- whitebit_python_sdk-1.1.0/src/whitebit/credit_line/raw_client.py +191 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/__init__.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/client.py +651 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/raw_client.py +931 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/__init__.py +9 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/create_fixed_investment_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/get_fixed_investments_history_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_fixed/types/get_interest_payment_history_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/__init__.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/client.py +1140 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/raw_client.py +1651 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/__init__.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/close_flex_investment_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/close_flex_investment_response_data.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/create_flex_investment_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/create_flex_investment_response_data.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/get_flex_investment_history_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/get_flex_payment_history_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/get_user_flex_investments_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/update_flex_auto_reinvestment_response.py +19 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/withdraw_from_flex_investment_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/crypto_lending_flex/types/withdraw_from_flex_investment_response_data.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/__init__.py +35 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/client.py +997 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/raw_client.py +1342 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/__init__.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_request_type.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response_account.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response_required.py +48 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/create_new_address_response_required_flex_fee.py +42 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response_account.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response_required.py +48 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_deposit_address_response_required_flex_fee.py +42 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_fiat_deposit_url_request_customer.py +61 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_fiat_deposit_url_request_customer_address.py +56 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/get_fiat_deposit_url_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/deposit/types/refund_deposit_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/environment.py +17 -0
- whitebit_python_sdk-1.1.0/src/whitebit/errors/__init__.py +19 -0
- whitebit_python_sdk-1.1.0/src/whitebit/errors/bad_request_error.py +10 -0
- whitebit_python_sdk-1.1.0/src/whitebit/errors/internal_server_error.py +10 -0
- whitebit_python_sdk-1.1.0/src/whitebit/errors/not_found_error.py +11 -0
- whitebit_python_sdk-1.1.0/src/whitebit/errors/service_unavailable_error.py +10 -0
- whitebit_python_sdk-1.1.0/src/whitebit/errors/unauthorized_error.py +10 -0
- whitebit_python_sdk-1.1.0/src/whitebit/errors/unprocessable_entity_error.py +10 -0
- whitebit_python_sdk-1.1.0/src/whitebit/fees/__init__.py +4 -0
- whitebit_python_sdk-1.1.0/src/whitebit/fees/client.py +126 -0
- whitebit_python_sdk-1.1.0/src/whitebit/fees/raw_client.py +144 -0
- whitebit_python_sdk-1.1.0/src/whitebit/jwt/__init__.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/jwt/client.py +224 -0
- whitebit_python_sdk-1.1.0/src/whitebit/jwt/raw_client.py +389 -0
- whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/__init__.py +9 -0
- whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/get_web_socket_token_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/issue_jwt_token_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/jwt/types/issue_jwt_token_response_data.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/main_account/__init__.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/main_account/client.py +380 -0
- whitebit_python_sdk-1.1.0/src/whitebit/main_account/raw_client.py +493 -0
- whitebit_python_sdk-1.1.0/src/whitebit/main_account/types/__init__.py +8 -0
- whitebit_python_sdk-1.1.0/src/whitebit/main_account/types/get_deposit_withdraw_history_response.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/main_account/types/get_main_balance_response_value.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/market_fee/__init__.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/market_fee/client.py +193 -0
- whitebit_python_sdk-1.1.0/src/whitebit/market_fee/raw_client.py +267 -0
- whitebit_python_sdk-1.1.0/src/whitebit/market_fee/types/__init__.py +8 -0
- whitebit_python_sdk-1.1.0/src/whitebit/market_fee/types/get_all_market_fees_response.py +43 -0
- whitebit_python_sdk-1.1.0/src/whitebit/market_fee/types/get_market_fee_response.py +38 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/__init__.py +67 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/client.py +1083 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/raw_client.py +1695 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/__init__.py +69 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_account_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_account_response_data.py +31 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_request_live_until.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_request_permissions_item.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/create_mining_watcher_link_response_data.py +24 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_accounts_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_accounts_response_data_item.py +31 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_request_interval.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_response_data.py +21 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_hashrate_response_data_hashrate_item.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_miner_info_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_miner_info_response_data.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_miner_info_response_data_stratum_item.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_payout_destination_response.py +36 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_payout_destination_response_payout_destination.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_rewards_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_request_interval.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_response_data.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_hashrate_response_data_hashrates_item.py +23 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_names_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/get_mining_worker_names_response_data.py +19 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/list_mining_watcher_links_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/list_mining_watcher_links_response_data_item.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/set_mining_payout_destination_request_destination.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/set_mining_payout_destination_response.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/mining_pool/types/set_mining_payout_destination_response_payout_destination.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/__init__.py +37 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/client.py +1096 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/raw_client.py +1398 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/__init__.py +37 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_funding_history_market_response_item.py +52 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_futures_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_markets_response_item.py +110 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_markets_response_item_type.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_mining_pool_response.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data.py +39 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data_blocks_item.py +22 -0
- 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
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_platform_status_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_ticker_response_value.py +56 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_time_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_trades_market_request_type.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_trades_market_response_item.py +57 -0
- whitebit_python_sdk-1.1.0/src/whitebit/public_api_v4/types/get_api_v4public_trades_market_response_item_type.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/raw_client.py +637 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/__init__.py +47 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/client.py +4143 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/raw_client.py +5628 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/__init__.py +45 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/cancel_all_orders_request_type_item.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_executed_order_history_response_value_item.py +62 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_executed_order_history_response_value_item_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_kill_switch_status_response_item.py +44 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_kill_switch_status_response_item_types_item.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_deals_response.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_deals_response_records_item.py +80 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_history_response_value_item.py +131 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/get_order_history_response_value_item_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/limit_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/limit_order_request_stp.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/set_kill_switch_request_types_item.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/set_kill_switch_response.py +44 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/set_kill_switch_response_types_item.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_limit_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_limit_order_request_stp.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_market_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/stop_market_order_request_stp.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/spot_trading/types/trade_account_balance_response_value.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/__init__.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/client.py +892 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/raw_client.py +1399 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/__init__.py +23 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/create_sub_account_request_permissions.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/edit_sub_account_request_permissions.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/get_sub_account_balances_response_value_item.py +21 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/get_sub_account_transfer_history_request_direction.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/get_sub_account_transfer_history_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/list_sub_accounts_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/sub_account_transfer_request_direction.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account/types/sub_account_transfer_response.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/__init__.py +19 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/client.py +754 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/raw_client.py +1183 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/__init__.py +17 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/create_sub_account_api_key_ip_address_response.py +19 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/delete_sub_account_api_key_ip_address_response.py +19 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/edit_sub_account_api_key_request_urls_item.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/list_sub_account_api_key_ip_addresses_response.py +19 -0
- whitebit_python_sdk-1.1.0/src/whitebit/sub_account_api_keys/types/list_sub_account_api_keys_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/transfer/__init__.py +15 -0
- whitebit_python_sdk-1.1.0/src/whitebit/transfer/client.py +220 -0
- whitebit_python_sdk-1.1.0/src/whitebit/transfer/raw_client.py +276 -0
- whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/__init__.py +13 -0
- whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/transfer_between_balances_request_from.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/transfer_between_balances_request_method.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/transfer/types/transfer_between_balances_request_to.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/__init__.py +311 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/asset.py +106 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/asset_limits.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/asset_limits_deposit_value.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/asset_limits_withdraw_value.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/asset_memo.py +24 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/asset_networks.py +36 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/asset_providers.py +24 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/authorize_request.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/authorize_response.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/authorize_response_result.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/bad_request_error_body.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_request.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_response.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_response_result_value.py +37 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_update.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_margin_update_params_item.py +48 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_request.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_response.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_response_result_value.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_update.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/balance_spot_update_params_item_value.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/base_request.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/base_response.py +24 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/book_ticker_subscribe.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/book_ticker_update.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/book_ticker_update_data.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_events_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_events_update.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_update.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_update_params.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/borrows_update_params_records_item.py +47 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_limit_order_response.py +7 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_limit_order_response_item.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_order_item.py +42 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/bulk_order_item_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/candle.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/candles_request.py +36 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/candles_response.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/candles_subscribe.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/candles_update.py +26 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/code_history.py +47 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/code_info.py +47 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/convert_confirm_response.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/convert_estimate_request_direction.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/convert_estimate_response.py +56 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/convert_history_response.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/convert_history_response_records_item.py +45 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/convert_history_response_records_item_path_item.py +23 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/credit_line.py +28 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/deals_request.py +35 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/deals_response.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/deals_response_result.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/deals_response_result_records_item.py +82 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/deals_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/deals_update.py +43 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/depth_level.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/depth_request.py +35 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/depth_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/depth_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/depth_update.py +31 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/depth_update_data.py +40 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/error.py +21 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/error_inner.py +21 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/error_response.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/error_v4.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/executed_order_object.py +133 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/executed_order_object_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/executed_order_object_stp.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/fee_details.py +23 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/fee_details_flex.py +21 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/fee_info.py +49 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/fee_info_deposit.py +63 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/fee_info_withdraw.py +63 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/fixed_plan.py +79 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/flex_investment.py +67 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/flex_investment_history.py +64 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/flex_plan.py +50 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/futures_market.py +117 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/interest_payment.py +48 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/investment.py +64 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_request.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_response.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_subscribe.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/lastprice_update.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/margin_positions_events_subscribe.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/margin_positions_events_update.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_order_request.py +51 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_order_request_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_order_request_stp.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_request.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_statistics.py +57 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_subscribe.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_request.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_statistics.py +47 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_subscribe.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_today_update.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/market_update.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/mining_reward.py +62 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/not_found_error_body.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/order_book.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/order_object.py +118 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/order_object_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/order_object_stp.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/order_response.py +123 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orderbook_response.py +37 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_request.py +35 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_response.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_response_result.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_subscribe.py +34 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_executed_update.py +33 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_request.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_response.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_response_result.py +35 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/orders_pending_update.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/ping_request.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/ping_response.py +21 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/ping_response_result.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/positions_subscribe.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params_records_item.py +99 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params_records_item_liq_stage.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/positions_update_params_records_item_position_side.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/provider_fee_details.py +28 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account.py +63 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key.py +84 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key_access_endpoints_item.py +27 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key_list.py +39 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_api_key_list_access_endpoints_item.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_kyc.py +37 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_permissions.py +37 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/sub_account_transfer.py +53 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/subscription_response.py +29 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/subscription_response_result.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/time_request.py +25 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/time_response.py +23 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/trade.py +48 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/trade_type.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/trades_request.py +35 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/trades_response.py +22 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/trades_subscribe.py +28 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/trades_update.py +30 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/transaction_history.py +108 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/transaction_history_confirmations.py +31 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/unprocessable_entity_error_body.py +20 -0
- whitebit_python_sdk-1.1.0/src/whitebit/types/unsubscribe_request.py +32 -0
- whitebit_python_sdk-1.1.0/src/whitebit/withdraw/__init__.py +11 -0
- whitebit_python_sdk-1.1.0/src/whitebit/withdraw/client.py +496 -0
- whitebit_python_sdk-1.1.0/src/whitebit/withdraw/raw_client.py +634 -0
- whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/__init__.py +9 -0
- whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/create_withdraw_request_beneficiary.py +74 -0
- whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/create_withdraw_request_travel_rule.py +52 -0
- whitebit_python_sdk-1.1.0/src/whitebit/withdraw/types/create_withdraw_request_travel_rule_type.py +5 -0
- whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/PKG-INFO +155 -0
- whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/SOURCES.txt +463 -0
- whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/dependency_links.txt +1 -0
- whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/not-zip-safe +1 -0
- whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/requires.txt +6 -0
- whitebit_python_sdk-1.1.0/src/whitebit_python_sdk.egg-info/top_level.txt +1 -0
- 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
|
+
[](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
|
+
[](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"]
|