whitebit-python-sdk 1.1.0__py3-none-any.whl
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/__init__.py +793 -0
- whitebit/client.py +580 -0
- whitebit/codes/__init__.py +7 -0
- whitebit/codes/client.py +510 -0
- whitebit/codes/raw_client.py +809 -0
- whitebit/codes/types/__init__.py +10 -0
- whitebit/codes/types/apply_code_response.py +22 -0
- whitebit/codes/types/create_code_response.py +32 -0
- whitebit/codes/types/get_codes_history_response.py +27 -0
- whitebit/codes/types/get_my_codes_response.py +27 -0
- whitebit/collateral_trading/__init__.py +183 -0
- whitebit/collateral_trading/client.py +2452 -0
- whitebit/collateral_trading/raw_client.py +4337 -0
- whitebit/collateral_trading/types/__init__.py +213 -0
- whitebit/collateral_trading/types/cancel_oco_order_response.py +34 -0
- whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss.py +146 -0
- whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss_activation_condition.py +5 -0
- whitebit/collateral_trading/types/cancel_oco_order_response_stop_loss_side.py +5 -0
- whitebit/collateral_trading/types/cancel_oco_order_response_take_profit.py +114 -0
- whitebit/collateral_trading/types/cancel_oco_order_response_take_profit_side.py +5 -0
- whitebit/collateral_trading/types/change_collateral_account_leverage_response.py +22 -0
- whitebit/collateral_trading/types/close_position_request_position_side.py +5 -0
- whitebit/collateral_trading/types/collateral_account_balance_summary_response_item.py +48 -0
- whitebit/collateral_trading/types/collateral_account_summary_response.py +60 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item.py +98 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item_position_side.py +7 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_request_orders_item_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_response_item.py +29 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_error.py +36 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result.py +132 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_position_side.py +7 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_bulk_order_response_item_result_status.py +7 -0
- whitebit/collateral_trading/types/create_collateral_limit_order_request_position_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_limit_order_request_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_limit_order_response.py +132 -0
- whitebit/collateral_trading/types/create_collateral_limit_order_response_oto.py +44 -0
- whitebit/collateral_trading/types/create_collateral_limit_order_response_position_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_limit_order_response_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_limit_order_response_status.py +7 -0
- whitebit/collateral_trading/types/create_collateral_market_order_request_position_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_market_order_request_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_market_order_response.py +110 -0
- whitebit/collateral_trading/types/create_collateral_market_order_response_oto.py +44 -0
- whitebit/collateral_trading/types/create_collateral_market_order_response_position_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_market_order_response_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_market_order_response_status.py +7 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_request_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response.py +34 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss.py +159 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_activation_condition.py +5 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_position_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_stop_loss_status.py +7 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit.py +139 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_position_side.py +7 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_oco_order_response_take_profit_status.py +7 -0
- whitebit/collateral_trading/types/create_collateral_stop_limit_order_request_position_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_stop_limit_order_request_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_stop_limit_order_response.py +122 -0
- whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_oto.py +44 -0
- whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_position_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_stop_limit_order_response_status.py +7 -0
- whitebit/collateral_trading/types/create_collateral_trigger_market_order_request_position_side.py +7 -0
- whitebit/collateral_trading/types/create_collateral_trigger_market_order_request_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_trigger_market_order_response.py +117 -0
- whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_oto.py +44 -0
- whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_position_side.py +7 -0
- whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_side.py +5 -0
- whitebit/collateral_trading/types/create_collateral_trigger_market_order_response_status.py +7 -0
- whitebit/collateral_trading/types/get_collateral_hedge_mode_response.py +26 -0
- whitebit/collateral_trading/types/get_conditional_orders_response.py +38 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item.py +60 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco.py +31 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_stop_loss.py +28 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_stop_loss_position_side.py +7 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_take_profit.py +28 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oco_take_profit_position_side.py +7 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto.py +34 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto_conditional_order.py +30 -0
- whitebit/collateral_trading/types/get_conditional_orders_response_records_item_oto_conditional_order_position_side.py +7 -0
- whitebit/collateral_trading/types/get_funding_history_response.py +33 -0
- whitebit/collateral_trading/types/get_funding_history_response_records_item.py +66 -0
- whitebit/collateral_trading/types/get_oco_orders_response_item.py +34 -0
- whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss.py +49 -0
- whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss_activation_condition.py +5 -0
- whitebit/collateral_trading/types/get_oco_orders_response_item_stop_loss_side.py +5 -0
- whitebit/collateral_trading/types/get_oco_orders_response_item_take_profit.py +43 -0
- whitebit/collateral_trading/types/get_oco_orders_response_item_take_profit_side.py +5 -0
- whitebit/collateral_trading/types/get_open_positions_response_item.py +136 -0
- whitebit/collateral_trading/types/get_open_positions_response_item_liquidation_state.py +5 -0
- whitebit/collateral_trading/types/get_open_positions_response_item_position_side.py +5 -0
- whitebit/collateral_trading/types/get_open_positions_response_item_tpsl.py +51 -0
- whitebit/collateral_trading/types/get_positions_history_response_item.py +95 -0
- whitebit/collateral_trading/types/get_positions_history_response_item_liquidation_state.py +5 -0
- whitebit/collateral_trading/types/get_positions_history_response_item_order_detail.py +61 -0
- whitebit/collateral_trading/types/get_positions_history_response_item_position_side.py +5 -0
- whitebit/core/__init__.py +52 -0
- whitebit/core/api_error.py +23 -0
- whitebit/core/client_wrapper.py +57 -0
- whitebit/core/datetime_utils.py +28 -0
- whitebit/core/file.py +67 -0
- whitebit/core/http_client.py +497 -0
- whitebit/core/http_response.py +55 -0
- whitebit/core/jsonable_encoder.py +100 -0
- whitebit/core/pydantic_utilities.py +255 -0
- whitebit/core/query_encoder.py +58 -0
- whitebit/core/remove_none_from_dict.py +11 -0
- whitebit/core/request_options.py +35 -0
- whitebit/core/serialization.py +276 -0
- whitebit/credit_line/__init__.py +4 -0
- whitebit/credit_line/client.py +128 -0
- whitebit/credit_line/raw_client.py +191 -0
- whitebit/crypto_lending_fixed/__init__.py +7 -0
- whitebit/crypto_lending_fixed/client.py +651 -0
- whitebit/crypto_lending_fixed/raw_client.py +931 -0
- whitebit/crypto_lending_fixed/types/__init__.py +9 -0
- whitebit/crypto_lending_fixed/types/create_fixed_investment_response.py +22 -0
- whitebit/crypto_lending_fixed/types/get_fixed_investments_history_response.py +22 -0
- whitebit/crypto_lending_fixed/types/get_interest_payment_history_response.py +22 -0
- whitebit/crypto_lending_flex/__init__.py +29 -0
- whitebit/crypto_lending_flex/client.py +1140 -0
- whitebit/crypto_lending_flex/raw_client.py +1651 -0
- whitebit/crypto_lending_flex/types/__init__.py +27 -0
- whitebit/crypto_lending_flex/types/close_flex_investment_response.py +20 -0
- whitebit/crypto_lending_flex/types/close_flex_investment_response_data.py +26 -0
- whitebit/crypto_lending_flex/types/create_flex_investment_response.py +20 -0
- whitebit/crypto_lending_flex/types/create_flex_investment_response_data.py +26 -0
- whitebit/crypto_lending_flex/types/get_flex_investment_history_response.py +22 -0
- whitebit/crypto_lending_flex/types/get_flex_payment_history_response.py +22 -0
- whitebit/crypto_lending_flex/types/get_user_flex_investments_response.py +22 -0
- whitebit/crypto_lending_flex/types/update_flex_auto_reinvestment_response.py +19 -0
- whitebit/crypto_lending_flex/types/withdraw_from_flex_investment_response.py +20 -0
- whitebit/crypto_lending_flex/types/withdraw_from_flex_investment_response_data.py +26 -0
- whitebit/deposit/__init__.py +35 -0
- whitebit/deposit/client.py +997 -0
- whitebit/deposit/raw_client.py +1342 -0
- whitebit/deposit/types/__init__.py +33 -0
- whitebit/deposit/types/create_new_address_request_type.py +5 -0
- whitebit/deposit/types/create_new_address_response.py +22 -0
- whitebit/deposit/types/create_new_address_response_account.py +27 -0
- whitebit/deposit/types/create_new_address_response_required.py +48 -0
- whitebit/deposit/types/create_new_address_response_required_flex_fee.py +42 -0
- whitebit/deposit/types/get_deposit_address_response.py +22 -0
- whitebit/deposit/types/get_deposit_address_response_account.py +27 -0
- whitebit/deposit/types/get_deposit_address_response_required.py +48 -0
- whitebit/deposit/types/get_deposit_address_response_required_flex_fee.py +42 -0
- whitebit/deposit/types/get_fiat_deposit_url_request_customer.py +61 -0
- whitebit/deposit/types/get_fiat_deposit_url_request_customer_address.py +56 -0
- whitebit/deposit/types/get_fiat_deposit_url_response.py +22 -0
- whitebit/deposit/types/refund_deposit_response.py +22 -0
- whitebit/environment.py +17 -0
- whitebit/errors/__init__.py +19 -0
- whitebit/errors/bad_request_error.py +10 -0
- whitebit/errors/internal_server_error.py +10 -0
- whitebit/errors/not_found_error.py +11 -0
- whitebit/errors/service_unavailable_error.py +10 -0
- whitebit/errors/unauthorized_error.py +10 -0
- whitebit/errors/unprocessable_entity_error.py +10 -0
- whitebit/fees/__init__.py +4 -0
- whitebit/fees/client.py +126 -0
- whitebit/fees/raw_client.py +144 -0
- whitebit/jwt/__init__.py +7 -0
- whitebit/jwt/client.py +224 -0
- whitebit/jwt/raw_client.py +389 -0
- whitebit/jwt/types/__init__.py +9 -0
- whitebit/jwt/types/get_web_socket_token_response.py +22 -0
- whitebit/jwt/types/issue_jwt_token_response.py +20 -0
- whitebit/jwt/types/issue_jwt_token_response_data.py +27 -0
- whitebit/main_account/__init__.py +7 -0
- whitebit/main_account/client.py +380 -0
- whitebit/main_account/raw_client.py +493 -0
- whitebit/main_account/types/__init__.py +8 -0
- whitebit/main_account/types/get_deposit_withdraw_history_response.py +26 -0
- whitebit/main_account/types/get_main_balance_response_value.py +22 -0
- whitebit/market_fee/__init__.py +7 -0
- whitebit/market_fee/client.py +193 -0
- whitebit/market_fee/raw_client.py +267 -0
- whitebit/market_fee/types/__init__.py +8 -0
- whitebit/market_fee/types/get_all_market_fees_response.py +43 -0
- whitebit/market_fee/types/get_market_fee_response.py +38 -0
- whitebit/mining_pool/__init__.py +67 -0
- whitebit/mining_pool/client.py +1083 -0
- whitebit/mining_pool/raw_client.py +1695 -0
- whitebit/mining_pool/types/__init__.py +69 -0
- whitebit/mining_pool/types/create_mining_account_response.py +20 -0
- whitebit/mining_pool/types/create_mining_account_response_data.py +31 -0
- whitebit/mining_pool/types/create_mining_watcher_link_request_live_until.py +5 -0
- whitebit/mining_pool/types/create_mining_watcher_link_request_permissions_item.py +7 -0
- whitebit/mining_pool/types/create_mining_watcher_link_response.py +20 -0
- whitebit/mining_pool/types/create_mining_watcher_link_response_data.py +24 -0
- whitebit/mining_pool/types/get_mining_accounts_response.py +20 -0
- whitebit/mining_pool/types/get_mining_accounts_response_data_item.py +31 -0
- whitebit/mining_pool/types/get_mining_hashrate_request_interval.py +5 -0
- whitebit/mining_pool/types/get_mining_hashrate_response.py +20 -0
- whitebit/mining_pool/types/get_mining_hashrate_response_data.py +21 -0
- whitebit/mining_pool/types/get_mining_hashrate_response_data_hashrate_item.py +20 -0
- whitebit/mining_pool/types/get_mining_miner_info_response.py +20 -0
- whitebit/mining_pool/types/get_mining_miner_info_response_data.py +25 -0
- whitebit/mining_pool/types/get_mining_miner_info_response_data_stratum_item.py +22 -0
- whitebit/mining_pool/types/get_mining_payout_destination_response.py +36 -0
- whitebit/mining_pool/types/get_mining_payout_destination_response_payout_destination.py +7 -0
- whitebit/mining_pool/types/get_mining_rewards_response.py +22 -0
- whitebit/mining_pool/types/get_mining_worker_hashrate_request_interval.py +5 -0
- whitebit/mining_pool/types/get_mining_worker_hashrate_response.py +20 -0
- whitebit/mining_pool/types/get_mining_worker_hashrate_response_data.py +20 -0
- whitebit/mining_pool/types/get_mining_worker_hashrate_response_data_hashrates_item.py +23 -0
- whitebit/mining_pool/types/get_mining_worker_names_response.py +22 -0
- whitebit/mining_pool/types/get_mining_worker_names_response_data.py +19 -0
- whitebit/mining_pool/types/list_mining_watcher_links_response.py +20 -0
- whitebit/mining_pool/types/list_mining_watcher_links_response_data_item.py +27 -0
- whitebit/mining_pool/types/set_mining_payout_destination_request_destination.py +7 -0
- whitebit/mining_pool/types/set_mining_payout_destination_response.py +27 -0
- whitebit/mining_pool/types/set_mining_payout_destination_response_payout_destination.py +7 -0
- whitebit/public_api_v4/__init__.py +37 -0
- whitebit/public_api_v4/client.py +1096 -0
- whitebit/public_api_v4/raw_client.py +1398 -0
- whitebit/public_api_v4/types/__init__.py +37 -0
- whitebit/public_api_v4/types/get_api_v4public_funding_history_market_response_item.py +52 -0
- whitebit/public_api_v4/types/get_api_v4public_futures_response.py +22 -0
- whitebit/public_api_v4/types/get_api_v4public_markets_response_item.py +110 -0
- whitebit/public_api_v4/types/get_api_v4public_markets_response_item_type.py +5 -0
- whitebit/public_api_v4/types/get_api_v4public_mining_pool_response.py +20 -0
- whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data.py +39 -0
- whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data_blocks_item.py +22 -0
- whitebit/public_api_v4/types/get_api_v4public_mining_pool_response_data_last7days_hash_rate_item.py +20 -0
- whitebit/public_api_v4/types/get_api_v4public_platform_status_response.py +22 -0
- whitebit/public_api_v4/types/get_api_v4public_ticker_response_value.py +56 -0
- whitebit/public_api_v4/types/get_api_v4public_time_response.py +22 -0
- whitebit/public_api_v4/types/get_api_v4public_trades_market_request_type.py +5 -0
- whitebit/public_api_v4/types/get_api_v4public_trades_market_response_item.py +57 -0
- whitebit/public_api_v4/types/get_api_v4public_trades_market_response_item_type.py +5 -0
- whitebit/raw_client.py +637 -0
- whitebit/spot_trading/__init__.py +47 -0
- whitebit/spot_trading/client.py +4143 -0
- whitebit/spot_trading/raw_client.py +5628 -0
- whitebit/spot_trading/types/__init__.py +45 -0
- whitebit/spot_trading/types/cancel_all_orders_request_type_item.py +5 -0
- whitebit/spot_trading/types/get_executed_order_history_response_value_item.py +62 -0
- whitebit/spot_trading/types/get_executed_order_history_response_value_item_side.py +5 -0
- whitebit/spot_trading/types/get_kill_switch_status_response_item.py +44 -0
- whitebit/spot_trading/types/get_kill_switch_status_response_item_types_item.py +5 -0
- whitebit/spot_trading/types/get_order_deals_response.py +33 -0
- whitebit/spot_trading/types/get_order_deals_response_records_item.py +80 -0
- whitebit/spot_trading/types/get_order_history_response_value_item.py +131 -0
- whitebit/spot_trading/types/get_order_history_response_value_item_side.py +5 -0
- whitebit/spot_trading/types/limit_order_request_side.py +5 -0
- whitebit/spot_trading/types/limit_order_request_stp.py +5 -0
- whitebit/spot_trading/types/set_kill_switch_request_types_item.py +5 -0
- whitebit/spot_trading/types/set_kill_switch_response.py +44 -0
- whitebit/spot_trading/types/set_kill_switch_response_types_item.py +5 -0
- whitebit/spot_trading/types/stop_limit_order_request_side.py +5 -0
- whitebit/spot_trading/types/stop_limit_order_request_stp.py +5 -0
- whitebit/spot_trading/types/stop_market_order_request_side.py +5 -0
- whitebit/spot_trading/types/stop_market_order_request_stp.py +5 -0
- whitebit/spot_trading/types/trade_account_balance_response_value.py +27 -0
- whitebit/sub_account/__init__.py +25 -0
- whitebit/sub_account/client.py +892 -0
- whitebit/sub_account/raw_client.py +1399 -0
- whitebit/sub_account/types/__init__.py +23 -0
- whitebit/sub_account/types/create_sub_account_request_permissions.py +29 -0
- whitebit/sub_account/types/edit_sub_account_request_permissions.py +29 -0
- whitebit/sub_account/types/get_sub_account_balances_response_value_item.py +21 -0
- whitebit/sub_account/types/get_sub_account_transfer_history_request_direction.py +5 -0
- whitebit/sub_account/types/get_sub_account_transfer_history_response.py +22 -0
- whitebit/sub_account/types/list_sub_accounts_response.py +22 -0
- whitebit/sub_account/types/sub_account_transfer_request_direction.py +5 -0
- whitebit/sub_account/types/sub_account_transfer_response.py +26 -0
- whitebit/sub_account_api_keys/__init__.py +19 -0
- whitebit/sub_account_api_keys/client.py +754 -0
- whitebit/sub_account_api_keys/raw_client.py +1183 -0
- whitebit/sub_account_api_keys/types/__init__.py +17 -0
- whitebit/sub_account_api_keys/types/create_sub_account_api_key_ip_address_response.py +19 -0
- whitebit/sub_account_api_keys/types/delete_sub_account_api_key_ip_address_response.py +19 -0
- whitebit/sub_account_api_keys/types/edit_sub_account_api_key_request_urls_item.py +20 -0
- whitebit/sub_account_api_keys/types/list_sub_account_api_key_ip_addresses_response.py +19 -0
- whitebit/sub_account_api_keys/types/list_sub_account_api_keys_response.py +22 -0
- whitebit/transfer/__init__.py +15 -0
- whitebit/transfer/client.py +220 -0
- whitebit/transfer/raw_client.py +276 -0
- whitebit/transfer/types/__init__.py +13 -0
- whitebit/transfer/types/transfer_between_balances_request_from.py +5 -0
- whitebit/transfer/types/transfer_between_balances_request_method.py +7 -0
- whitebit/transfer/types/transfer_between_balances_request_to.py +5 -0
- whitebit/types/__init__.py +311 -0
- whitebit/types/asset.py +106 -0
- whitebit/types/asset_limits.py +33 -0
- whitebit/types/asset_limits_deposit_value.py +20 -0
- whitebit/types/asset_limits_withdraw_value.py +20 -0
- whitebit/types/asset_memo.py +24 -0
- whitebit/types/asset_networks.py +36 -0
- whitebit/types/asset_providers.py +24 -0
- whitebit/types/authorize_request.py +32 -0
- whitebit/types/authorize_response.py +29 -0
- whitebit/types/authorize_response_result.py +22 -0
- whitebit/types/bad_request_error_body.py +20 -0
- whitebit/types/balance_margin_request.py +32 -0
- whitebit/types/balance_margin_response.py +33 -0
- whitebit/types/balance_margin_response_result_value.py +37 -0
- whitebit/types/balance_margin_subscribe.py +32 -0
- whitebit/types/balance_margin_update.py +33 -0
- whitebit/types/balance_margin_update_params_item.py +48 -0
- whitebit/types/balance_spot_request.py +32 -0
- whitebit/types/balance_spot_response.py +33 -0
- whitebit/types/balance_spot_response_result_value.py +27 -0
- whitebit/types/balance_spot_subscribe.py +32 -0
- whitebit/types/balance_spot_update.py +33 -0
- whitebit/types/balance_spot_update_params_item_value.py +27 -0
- whitebit/types/base_request.py +22 -0
- whitebit/types/base_response.py +24 -0
- whitebit/types/book_ticker_subscribe.py +29 -0
- whitebit/types/book_ticker_update.py +26 -0
- whitebit/types/book_ticker_update_data.py +5 -0
- whitebit/types/borrows_events_subscribe.py +32 -0
- whitebit/types/borrows_events_update.py +34 -0
- whitebit/types/borrows_subscribe.py +32 -0
- whitebit/types/borrows_update.py +30 -0
- whitebit/types/borrows_update_params.py +25 -0
- whitebit/types/borrows_update_params_records_item.py +47 -0
- whitebit/types/bulk_limit_order_response.py +7 -0
- whitebit/types/bulk_limit_order_response_item.py +22 -0
- whitebit/types/bulk_order_item.py +42 -0
- whitebit/types/bulk_order_item_side.py +5 -0
- whitebit/types/candle.py +5 -0
- whitebit/types/candles_request.py +36 -0
- whitebit/types/candles_response.py +26 -0
- whitebit/types/candles_subscribe.py +34 -0
- whitebit/types/candles_update.py +26 -0
- whitebit/types/code_history.py +47 -0
- whitebit/types/code_info.py +47 -0
- whitebit/types/convert_confirm_response.py +33 -0
- whitebit/types/convert_estimate_request_direction.py +5 -0
- whitebit/types/convert_estimate_response.py +56 -0
- whitebit/types/convert_history_response.py +34 -0
- whitebit/types/convert_history_response_records_item.py +45 -0
- whitebit/types/convert_history_response_records_item_path_item.py +23 -0
- whitebit/types/credit_line.py +28 -0
- whitebit/types/deals_request.py +35 -0
- whitebit/types/deals_response.py +29 -0
- whitebit/types/deals_response_result.py +30 -0
- whitebit/types/deals_response_result_records_item.py +82 -0
- whitebit/types/deals_subscribe.py +32 -0
- whitebit/types/deals_update.py +43 -0
- whitebit/types/depth_level.py +5 -0
- whitebit/types/depth_request.py +35 -0
- whitebit/types/depth_response.py +22 -0
- whitebit/types/depth_subscribe.py +32 -0
- whitebit/types/depth_update.py +31 -0
- whitebit/types/depth_update_data.py +40 -0
- whitebit/types/error.py +21 -0
- whitebit/types/error_inner.py +21 -0
- whitebit/types/error_response.py +32 -0
- whitebit/types/error_v4.py +25 -0
- whitebit/types/executed_order_object.py +133 -0
- whitebit/types/executed_order_object_position_side.py +5 -0
- whitebit/types/executed_order_object_stp.py +5 -0
- whitebit/types/fee_details.py +23 -0
- whitebit/types/fee_details_flex.py +21 -0
- whitebit/types/fee_info.py +49 -0
- whitebit/types/fee_info_deposit.py +63 -0
- whitebit/types/fee_info_withdraw.py +63 -0
- whitebit/types/fixed_plan.py +79 -0
- whitebit/types/flex_investment.py +67 -0
- whitebit/types/flex_investment_history.py +64 -0
- whitebit/types/flex_plan.py +50 -0
- whitebit/types/futures_market.py +117 -0
- whitebit/types/interest_payment.py +48 -0
- whitebit/types/investment.py +64 -0
- whitebit/types/lastprice_request.py +29 -0
- whitebit/types/lastprice_response.py +25 -0
- whitebit/types/lastprice_subscribe.py +29 -0
- whitebit/types/lastprice_update.py +30 -0
- whitebit/types/margin_positions_events_subscribe.py +34 -0
- whitebit/types/margin_positions_events_update.py +34 -0
- whitebit/types/market_order_request.py +51 -0
- whitebit/types/market_order_request_side.py +5 -0
- whitebit/types/market_order_request_stp.py +5 -0
- whitebit/types/market_request.py +34 -0
- whitebit/types/market_response.py +22 -0
- whitebit/types/market_statistics.py +57 -0
- whitebit/types/market_subscribe.py +25 -0
- whitebit/types/market_today_request.py +29 -0
- whitebit/types/market_today_response.py +22 -0
- whitebit/types/market_today_statistics.py +47 -0
- whitebit/types/market_today_subscribe.py +25 -0
- whitebit/types/market_today_update.py +30 -0
- whitebit/types/market_update.py +30 -0
- whitebit/types/mining_reward.py +62 -0
- whitebit/types/not_found_error_body.py +20 -0
- whitebit/types/order_book.py +33 -0
- whitebit/types/order_object.py +118 -0
- whitebit/types/order_object_position_side.py +5 -0
- whitebit/types/order_object_stp.py +5 -0
- whitebit/types/order_response.py +123 -0
- whitebit/types/orderbook_response.py +37 -0
- whitebit/types/orders_executed_request.py +35 -0
- whitebit/types/orders_executed_response.py +29 -0
- whitebit/types/orders_executed_response_result.py +30 -0
- whitebit/types/orders_executed_subscribe.py +34 -0
- whitebit/types/orders_executed_update.py +33 -0
- whitebit/types/orders_pending_request.py +32 -0
- whitebit/types/orders_pending_response.py +29 -0
- whitebit/types/orders_pending_response_result.py +35 -0
- whitebit/types/orders_pending_subscribe.py +32 -0
- whitebit/types/orders_pending_update.py +32 -0
- whitebit/types/ping_request.py +25 -0
- whitebit/types/ping_response.py +21 -0
- whitebit/types/ping_response_result.py +5 -0
- whitebit/types/positions_subscribe.py +32 -0
- whitebit/types/positions_update.py +30 -0
- whitebit/types/positions_update_params.py +25 -0
- whitebit/types/positions_update_params_records_item.py +99 -0
- whitebit/types/positions_update_params_records_item_liq_stage.py +5 -0
- whitebit/types/positions_update_params_records_item_position_side.py +5 -0
- whitebit/types/provider_fee_details.py +28 -0
- whitebit/types/sub_account.py +63 -0
- whitebit/types/sub_account_api_key.py +84 -0
- whitebit/types/sub_account_api_key_access_endpoints_item.py +27 -0
- whitebit/types/sub_account_api_key_list.py +39 -0
- whitebit/types/sub_account_api_key_list_access_endpoints_item.py +20 -0
- whitebit/types/sub_account_kyc.py +37 -0
- whitebit/types/sub_account_permissions.py +37 -0
- whitebit/types/sub_account_transfer.py +53 -0
- whitebit/types/subscription_response.py +29 -0
- whitebit/types/subscription_response_result.py +22 -0
- whitebit/types/time_request.py +25 -0
- whitebit/types/time_response.py +23 -0
- whitebit/types/trade.py +48 -0
- whitebit/types/trade_type.py +5 -0
- whitebit/types/trades_request.py +35 -0
- whitebit/types/trades_response.py +22 -0
- whitebit/types/trades_subscribe.py +28 -0
- whitebit/types/trades_update.py +30 -0
- whitebit/types/transaction_history.py +108 -0
- whitebit/types/transaction_history_confirmations.py +31 -0
- whitebit/types/unprocessable_entity_error_body.py +20 -0
- whitebit/types/unsubscribe_request.py +32 -0
- whitebit/withdraw/__init__.py +11 -0
- whitebit/withdraw/client.py +496 -0
- whitebit/withdraw/raw_client.py +634 -0
- whitebit/withdraw/types/__init__.py +9 -0
- whitebit/withdraw/types/create_withdraw_request_beneficiary.py +74 -0
- whitebit/withdraw/types/create_withdraw_request_travel_rule.py +52 -0
- whitebit/withdraw/types/create_withdraw_request_travel_rule_type.py +5 -0
- whitebit_python_sdk-1.1.0.dist-info/METADATA +155 -0
- whitebit_python_sdk-1.1.0.dist-info/RECORD +451 -0
- whitebit_python_sdk-1.1.0.dist-info/WHEEL +5 -0
- whitebit_python_sdk-1.1.0.dist-info/licenses/LICENSE +20 -0
- whitebit_python_sdk-1.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,754 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from ..types.sub_account_api_key import SubAccountApiKey
|
|
8
|
+
from .raw_client import AsyncRawSubAccountApiKeysClient, RawSubAccountApiKeysClient
|
|
9
|
+
from .types.create_sub_account_api_key_ip_address_response import CreateSubAccountApiKeyIpAddressResponse
|
|
10
|
+
from .types.delete_sub_account_api_key_ip_address_response import DeleteSubAccountApiKeyIpAddressResponse
|
|
11
|
+
from .types.edit_sub_account_api_key_request_urls_item import EditSubAccountApiKeyRequestUrlsItem
|
|
12
|
+
from .types.list_sub_account_api_key_ip_addresses_response import ListSubAccountApiKeyIpAddressesResponse
|
|
13
|
+
from .types.list_sub_account_api_keys_response import ListSubAccountApiKeysResponse
|
|
14
|
+
|
|
15
|
+
# this is used as the default value for optional parameters
|
|
16
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class SubAccountApiKeysClient:
|
|
20
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
21
|
+
self._raw_client = RawSubAccountApiKeysClient(client_wrapper=client_wrapper)
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def with_raw_response(self) -> RawSubAccountApiKeysClient:
|
|
25
|
+
"""
|
|
26
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
27
|
+
|
|
28
|
+
Returns
|
|
29
|
+
-------
|
|
30
|
+
RawSubAccountApiKeysClient
|
|
31
|
+
"""
|
|
32
|
+
return self._raw_client
|
|
33
|
+
|
|
34
|
+
def create_sub_account_api_key(
|
|
35
|
+
self,
|
|
36
|
+
*,
|
|
37
|
+
type: int,
|
|
38
|
+
sub_account_id: str,
|
|
39
|
+
title: typing.Optional[str] = OMIT,
|
|
40
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
41
|
+
) -> SubAccountApiKey:
|
|
42
|
+
"""
|
|
43
|
+
The endpoint creates a new API key for a [sub-account](/glossary#sub-account).
|
|
44
|
+
|
|
45
|
+
<Warning>
|
|
46
|
+
Rate limit: 1000 requests/10 sec.
|
|
47
|
+
</Warning>
|
|
48
|
+
|
|
49
|
+
<Note>
|
|
50
|
+
The API does not cache the response.
|
|
51
|
+
</Note>
|
|
52
|
+
|
|
53
|
+
Parameters
|
|
54
|
+
----------
|
|
55
|
+
type : int
|
|
56
|
+
Type of API key (1 - info and trading; 2 - info, trading, deposits, withdraws)
|
|
57
|
+
|
|
58
|
+
sub_account_id : str
|
|
59
|
+
ID of the sub-account to create the API key for
|
|
60
|
+
|
|
61
|
+
title : typing.Optional[str]
|
|
62
|
+
Custom title/name for the API key
|
|
63
|
+
|
|
64
|
+
request_options : typing.Optional[RequestOptions]
|
|
65
|
+
Request-specific configuration.
|
|
66
|
+
|
|
67
|
+
Returns
|
|
68
|
+
-------
|
|
69
|
+
SubAccountApiKey
|
|
70
|
+
API key created successfully
|
|
71
|
+
|
|
72
|
+
Examples
|
|
73
|
+
--------
|
|
74
|
+
from whitebit import WhitebitApi
|
|
75
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
76
|
+
client.sub_account_api_keys.create_sub_account_api_key(type=1, sub_account_id='8e667b4a-0b71-4988-8af5-9474dbfaeb51', )
|
|
77
|
+
"""
|
|
78
|
+
_response = self._raw_client.create_sub_account_api_key(
|
|
79
|
+
type=type, sub_account_id=sub_account_id, title=title, request_options=request_options
|
|
80
|
+
)
|
|
81
|
+
return _response.data
|
|
82
|
+
|
|
83
|
+
def edit_sub_account_api_key(
|
|
84
|
+
self,
|
|
85
|
+
*,
|
|
86
|
+
api_key_id: str,
|
|
87
|
+
title: str,
|
|
88
|
+
urls: typing.Sequence[EditSubAccountApiKeyRequestUrlsItem],
|
|
89
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
90
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
91
|
+
"""
|
|
92
|
+
The endpoint updates an existing [sub-account](/glossary#sub-account) API key.
|
|
93
|
+
|
|
94
|
+
<Warning>
|
|
95
|
+
Rate limit: 1000 requests/10 sec.
|
|
96
|
+
</Warning>
|
|
97
|
+
|
|
98
|
+
<Note>
|
|
99
|
+
The API does not cache the response.
|
|
100
|
+
</Note>
|
|
101
|
+
|
|
102
|
+
Parameters
|
|
103
|
+
----------
|
|
104
|
+
api_key_id : str
|
|
105
|
+
ID of the API key to update
|
|
106
|
+
|
|
107
|
+
title : str
|
|
108
|
+
New title for the API key
|
|
109
|
+
|
|
110
|
+
urls : typing.Sequence[EditSubAccountApiKeyRequestUrlsItem]
|
|
111
|
+
Array of URL objects for API key restrictions
|
|
112
|
+
|
|
113
|
+
request_options : typing.Optional[RequestOptions]
|
|
114
|
+
Request-specific configuration.
|
|
115
|
+
|
|
116
|
+
Returns
|
|
117
|
+
-------
|
|
118
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
119
|
+
API key updated successfully
|
|
120
|
+
|
|
121
|
+
Examples
|
|
122
|
+
--------
|
|
123
|
+
from whitebit import WhitebitApi
|
|
124
|
+
from whitebit.sub_account_api_keys import EditSubAccountApiKeyRequestUrlsItem
|
|
125
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
126
|
+
client.sub_account_api_keys.edit_sub_account_api_key(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', title='Trading Bot Key', urls=[EditSubAccountApiKeyRequestUrlsItem(url='/api/v4/main-account/withdraw', enable=False, ), EditSubAccountApiKeyRequestUrlsItem(url='/api/v4/main-account/balance', enable=True, )], )
|
|
127
|
+
"""
|
|
128
|
+
_response = self._raw_client.edit_sub_account_api_key(
|
|
129
|
+
api_key_id=api_key_id, title=title, urls=urls, request_options=request_options
|
|
130
|
+
)
|
|
131
|
+
return _response.data
|
|
132
|
+
|
|
133
|
+
def delete_sub_account_api_key(
|
|
134
|
+
self, *, api_key_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
135
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
136
|
+
"""
|
|
137
|
+
The endpoint deletes a [sub-account](/glossary#sub-account) API key.
|
|
138
|
+
|
|
139
|
+
<Warning>
|
|
140
|
+
Rate limit: 1000 requests/10 sec.
|
|
141
|
+
</Warning>
|
|
142
|
+
|
|
143
|
+
<Note>
|
|
144
|
+
The API does not cache the response.
|
|
145
|
+
</Note>
|
|
146
|
+
|
|
147
|
+
Parameters
|
|
148
|
+
----------
|
|
149
|
+
api_key_id : str
|
|
150
|
+
ID of the API key to delete
|
|
151
|
+
|
|
152
|
+
request_options : typing.Optional[RequestOptions]
|
|
153
|
+
Request-specific configuration.
|
|
154
|
+
|
|
155
|
+
Returns
|
|
156
|
+
-------
|
|
157
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
158
|
+
API key deleted successfully
|
|
159
|
+
|
|
160
|
+
Examples
|
|
161
|
+
--------
|
|
162
|
+
from whitebit import WhitebitApi
|
|
163
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
164
|
+
client.sub_account_api_keys.delete_sub_account_api_key(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', )
|
|
165
|
+
"""
|
|
166
|
+
_response = self._raw_client.delete_sub_account_api_key(api_key_id=api_key_id, request_options=request_options)
|
|
167
|
+
return _response.data
|
|
168
|
+
|
|
169
|
+
def list_sub_account_api_keys(
|
|
170
|
+
self,
|
|
171
|
+
*,
|
|
172
|
+
sub_account_id: typing.Optional[str] = OMIT,
|
|
173
|
+
limit: typing.Optional[int] = OMIT,
|
|
174
|
+
offset: typing.Optional[int] = OMIT,
|
|
175
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
176
|
+
) -> ListSubAccountApiKeysResponse:
|
|
177
|
+
"""
|
|
178
|
+
The endpoint retrieves a list of API keys for a [sub-account](/glossary#sub-account).
|
|
179
|
+
Note: For security reasons, the apiSecret field returns an empty string.
|
|
180
|
+
|
|
181
|
+
<Warning>
|
|
182
|
+
Rate limit: 1000 requests/10 sec.
|
|
183
|
+
</Warning>
|
|
184
|
+
|
|
185
|
+
<Note>
|
|
186
|
+
The API does not cache the response.
|
|
187
|
+
</Note>
|
|
188
|
+
|
|
189
|
+
Parameters
|
|
190
|
+
----------
|
|
191
|
+
sub_account_id : typing.Optional[str]
|
|
192
|
+
ID of the sub-account to list API keys for
|
|
193
|
+
|
|
194
|
+
limit : typing.Optional[int]
|
|
195
|
+
|
|
196
|
+
offset : typing.Optional[int]
|
|
197
|
+
|
|
198
|
+
request_options : typing.Optional[RequestOptions]
|
|
199
|
+
Request-specific configuration.
|
|
200
|
+
|
|
201
|
+
Returns
|
|
202
|
+
-------
|
|
203
|
+
ListSubAccountApiKeysResponse
|
|
204
|
+
Successful response
|
|
205
|
+
|
|
206
|
+
Examples
|
|
207
|
+
--------
|
|
208
|
+
from whitebit import WhitebitApi
|
|
209
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
210
|
+
client.sub_account_api_keys.list_sub_account_api_keys()
|
|
211
|
+
"""
|
|
212
|
+
_response = self._raw_client.list_sub_account_api_keys(
|
|
213
|
+
sub_account_id=sub_account_id, limit=limit, offset=offset, request_options=request_options
|
|
214
|
+
)
|
|
215
|
+
return _response.data
|
|
216
|
+
|
|
217
|
+
def reset_sub_account_api_key(
|
|
218
|
+
self, *, api_key_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
219
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
220
|
+
"""
|
|
221
|
+
The endpoint resets (regenerates) an existing [sub-account](/glossary#sub-account) API key.
|
|
222
|
+
|
|
223
|
+
<Warning>
|
|
224
|
+
Rate limit: 1000 requests/10 sec.
|
|
225
|
+
</Warning>
|
|
226
|
+
|
|
227
|
+
<Note>
|
|
228
|
+
The API does not cache the response.
|
|
229
|
+
</Note>
|
|
230
|
+
|
|
231
|
+
Parameters
|
|
232
|
+
----------
|
|
233
|
+
api_key_id : str
|
|
234
|
+
ID of the API key to reset
|
|
235
|
+
|
|
236
|
+
request_options : typing.Optional[RequestOptions]
|
|
237
|
+
Request-specific configuration.
|
|
238
|
+
|
|
239
|
+
Returns
|
|
240
|
+
-------
|
|
241
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
242
|
+
API key reset successfully
|
|
243
|
+
|
|
244
|
+
Examples
|
|
245
|
+
--------
|
|
246
|
+
from whitebit import WhitebitApi
|
|
247
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
248
|
+
client.sub_account_api_keys.reset_sub_account_api_key(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', )
|
|
249
|
+
"""
|
|
250
|
+
_response = self._raw_client.reset_sub_account_api_key(api_key_id=api_key_id, request_options=request_options)
|
|
251
|
+
return _response.data
|
|
252
|
+
|
|
253
|
+
def list_sub_account_api_key_ip_addresses(
|
|
254
|
+
self, *, api_key_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
255
|
+
) -> ListSubAccountApiKeyIpAddressesResponse:
|
|
256
|
+
"""
|
|
257
|
+
The endpoint retrieves the list of IP addresses allowed for a [sub-account](/glossary#sub-account) API key.
|
|
258
|
+
|
|
259
|
+
<Warning>
|
|
260
|
+
Rate limit: 1000 requests/10 sec.
|
|
261
|
+
</Warning>
|
|
262
|
+
|
|
263
|
+
<Note>
|
|
264
|
+
The API does not cache the response.
|
|
265
|
+
</Note>
|
|
266
|
+
|
|
267
|
+
Parameters
|
|
268
|
+
----------
|
|
269
|
+
api_key_id : str
|
|
270
|
+
ID of the API key to list IP addresses for
|
|
271
|
+
|
|
272
|
+
request_options : typing.Optional[RequestOptions]
|
|
273
|
+
Request-specific configuration.
|
|
274
|
+
|
|
275
|
+
Returns
|
|
276
|
+
-------
|
|
277
|
+
ListSubAccountApiKeyIpAddressesResponse
|
|
278
|
+
Successful response
|
|
279
|
+
|
|
280
|
+
Examples
|
|
281
|
+
--------
|
|
282
|
+
from whitebit import WhitebitApi
|
|
283
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
284
|
+
client.sub_account_api_keys.list_sub_account_api_key_ip_addresses(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', )
|
|
285
|
+
"""
|
|
286
|
+
_response = self._raw_client.list_sub_account_api_key_ip_addresses(
|
|
287
|
+
api_key_id=api_key_id, request_options=request_options
|
|
288
|
+
)
|
|
289
|
+
return _response.data
|
|
290
|
+
|
|
291
|
+
def create_sub_account_api_key_ip_address(
|
|
292
|
+
self, *, api_key_id: str, ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
293
|
+
) -> CreateSubAccountApiKeyIpAddressResponse:
|
|
294
|
+
"""
|
|
295
|
+
The endpoint adds a new IP address to the allowed list for a [sub-account](/glossary#sub-account) API key.
|
|
296
|
+
|
|
297
|
+
<Warning>
|
|
298
|
+
Rate limit: 1000 requests/10 sec.
|
|
299
|
+
</Warning>
|
|
300
|
+
|
|
301
|
+
<Note>
|
|
302
|
+
The API does not cache the response.
|
|
303
|
+
</Note>
|
|
304
|
+
|
|
305
|
+
Parameters
|
|
306
|
+
----------
|
|
307
|
+
api_key_id : str
|
|
308
|
+
ID of the API key to add IP address to
|
|
309
|
+
|
|
310
|
+
ip : str
|
|
311
|
+
IP address to add to allowed list
|
|
312
|
+
|
|
313
|
+
request_options : typing.Optional[RequestOptions]
|
|
314
|
+
Request-specific configuration.
|
|
315
|
+
|
|
316
|
+
Returns
|
|
317
|
+
-------
|
|
318
|
+
CreateSubAccountApiKeyIpAddressResponse
|
|
319
|
+
IP address added successfully
|
|
320
|
+
|
|
321
|
+
Examples
|
|
322
|
+
--------
|
|
323
|
+
from whitebit import WhitebitApi
|
|
324
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
325
|
+
client.sub_account_api_keys.create_sub_account_api_key_ip_address(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', ip='192.168.1.100', )
|
|
326
|
+
"""
|
|
327
|
+
_response = self._raw_client.create_sub_account_api_key_ip_address(
|
|
328
|
+
api_key_id=api_key_id, ip=ip, request_options=request_options
|
|
329
|
+
)
|
|
330
|
+
return _response.data
|
|
331
|
+
|
|
332
|
+
def delete_sub_account_api_key_ip_address(
|
|
333
|
+
self, *, api_key_id: str, ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
334
|
+
) -> DeleteSubAccountApiKeyIpAddressResponse:
|
|
335
|
+
"""
|
|
336
|
+
The endpoint removes an IP address from the allowed list for a [sub-account](/glossary#sub-account) API key.
|
|
337
|
+
|
|
338
|
+
<Warning>
|
|
339
|
+
Rate limit: 1000 requests/10 sec.
|
|
340
|
+
</Warning>
|
|
341
|
+
|
|
342
|
+
<Note>
|
|
343
|
+
The API does not cache the response.
|
|
344
|
+
</Note>
|
|
345
|
+
|
|
346
|
+
Parameters
|
|
347
|
+
----------
|
|
348
|
+
api_key_id : str
|
|
349
|
+
ID of the API key to remove IP address from
|
|
350
|
+
|
|
351
|
+
ip : str
|
|
352
|
+
IP address to remove from allowed list
|
|
353
|
+
|
|
354
|
+
request_options : typing.Optional[RequestOptions]
|
|
355
|
+
Request-specific configuration.
|
|
356
|
+
|
|
357
|
+
Returns
|
|
358
|
+
-------
|
|
359
|
+
DeleteSubAccountApiKeyIpAddressResponse
|
|
360
|
+
IP address removed successfully
|
|
361
|
+
|
|
362
|
+
Examples
|
|
363
|
+
--------
|
|
364
|
+
from whitebit import WhitebitApi
|
|
365
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
366
|
+
client.sub_account_api_keys.delete_sub_account_api_key_ip_address(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', ip='192.168.1.100', )
|
|
367
|
+
"""
|
|
368
|
+
_response = self._raw_client.delete_sub_account_api_key_ip_address(
|
|
369
|
+
api_key_id=api_key_id, ip=ip, request_options=request_options
|
|
370
|
+
)
|
|
371
|
+
return _response.data
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
class AsyncSubAccountApiKeysClient:
|
|
375
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
376
|
+
self._raw_client = AsyncRawSubAccountApiKeysClient(client_wrapper=client_wrapper)
|
|
377
|
+
|
|
378
|
+
@property
|
|
379
|
+
def with_raw_response(self) -> AsyncRawSubAccountApiKeysClient:
|
|
380
|
+
"""
|
|
381
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
382
|
+
|
|
383
|
+
Returns
|
|
384
|
+
-------
|
|
385
|
+
AsyncRawSubAccountApiKeysClient
|
|
386
|
+
"""
|
|
387
|
+
return self._raw_client
|
|
388
|
+
|
|
389
|
+
async def create_sub_account_api_key(
|
|
390
|
+
self,
|
|
391
|
+
*,
|
|
392
|
+
type: int,
|
|
393
|
+
sub_account_id: str,
|
|
394
|
+
title: typing.Optional[str] = OMIT,
|
|
395
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
396
|
+
) -> SubAccountApiKey:
|
|
397
|
+
"""
|
|
398
|
+
The endpoint creates a new API key for a [sub-account](/glossary#sub-account).
|
|
399
|
+
|
|
400
|
+
<Warning>
|
|
401
|
+
Rate limit: 1000 requests/10 sec.
|
|
402
|
+
</Warning>
|
|
403
|
+
|
|
404
|
+
<Note>
|
|
405
|
+
The API does not cache the response.
|
|
406
|
+
</Note>
|
|
407
|
+
|
|
408
|
+
Parameters
|
|
409
|
+
----------
|
|
410
|
+
type : int
|
|
411
|
+
Type of API key (1 - info and trading; 2 - info, trading, deposits, withdraws)
|
|
412
|
+
|
|
413
|
+
sub_account_id : str
|
|
414
|
+
ID of the sub-account to create the API key for
|
|
415
|
+
|
|
416
|
+
title : typing.Optional[str]
|
|
417
|
+
Custom title/name for the API key
|
|
418
|
+
|
|
419
|
+
request_options : typing.Optional[RequestOptions]
|
|
420
|
+
Request-specific configuration.
|
|
421
|
+
|
|
422
|
+
Returns
|
|
423
|
+
-------
|
|
424
|
+
SubAccountApiKey
|
|
425
|
+
API key created successfully
|
|
426
|
+
|
|
427
|
+
Examples
|
|
428
|
+
--------
|
|
429
|
+
from whitebit import AsyncWhitebitApi
|
|
430
|
+
import asyncio
|
|
431
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
432
|
+
async def main() -> None:
|
|
433
|
+
await client.sub_account_api_keys.create_sub_account_api_key(type=1, sub_account_id='8e667b4a-0b71-4988-8af5-9474dbfaeb51', )
|
|
434
|
+
asyncio.run(main())
|
|
435
|
+
"""
|
|
436
|
+
_response = await self._raw_client.create_sub_account_api_key(
|
|
437
|
+
type=type, sub_account_id=sub_account_id, title=title, request_options=request_options
|
|
438
|
+
)
|
|
439
|
+
return _response.data
|
|
440
|
+
|
|
441
|
+
async def edit_sub_account_api_key(
|
|
442
|
+
self,
|
|
443
|
+
*,
|
|
444
|
+
api_key_id: str,
|
|
445
|
+
title: str,
|
|
446
|
+
urls: typing.Sequence[EditSubAccountApiKeyRequestUrlsItem],
|
|
447
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
448
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
449
|
+
"""
|
|
450
|
+
The endpoint updates an existing [sub-account](/glossary#sub-account) API key.
|
|
451
|
+
|
|
452
|
+
<Warning>
|
|
453
|
+
Rate limit: 1000 requests/10 sec.
|
|
454
|
+
</Warning>
|
|
455
|
+
|
|
456
|
+
<Note>
|
|
457
|
+
The API does not cache the response.
|
|
458
|
+
</Note>
|
|
459
|
+
|
|
460
|
+
Parameters
|
|
461
|
+
----------
|
|
462
|
+
api_key_id : str
|
|
463
|
+
ID of the API key to update
|
|
464
|
+
|
|
465
|
+
title : str
|
|
466
|
+
New title for the API key
|
|
467
|
+
|
|
468
|
+
urls : typing.Sequence[EditSubAccountApiKeyRequestUrlsItem]
|
|
469
|
+
Array of URL objects for API key restrictions
|
|
470
|
+
|
|
471
|
+
request_options : typing.Optional[RequestOptions]
|
|
472
|
+
Request-specific configuration.
|
|
473
|
+
|
|
474
|
+
Returns
|
|
475
|
+
-------
|
|
476
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
477
|
+
API key updated successfully
|
|
478
|
+
|
|
479
|
+
Examples
|
|
480
|
+
--------
|
|
481
|
+
from whitebit import AsyncWhitebitApi
|
|
482
|
+
from whitebit.sub_account_api_keys import EditSubAccountApiKeyRequestUrlsItem
|
|
483
|
+
import asyncio
|
|
484
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
485
|
+
async def main() -> None:
|
|
486
|
+
await client.sub_account_api_keys.edit_sub_account_api_key(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', title='Trading Bot Key', urls=[EditSubAccountApiKeyRequestUrlsItem(url='/api/v4/main-account/withdraw', enable=False, ), EditSubAccountApiKeyRequestUrlsItem(url='/api/v4/main-account/balance', enable=True, )], )
|
|
487
|
+
asyncio.run(main())
|
|
488
|
+
"""
|
|
489
|
+
_response = await self._raw_client.edit_sub_account_api_key(
|
|
490
|
+
api_key_id=api_key_id, title=title, urls=urls, request_options=request_options
|
|
491
|
+
)
|
|
492
|
+
return _response.data
|
|
493
|
+
|
|
494
|
+
async def delete_sub_account_api_key(
|
|
495
|
+
self, *, api_key_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
496
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
497
|
+
"""
|
|
498
|
+
The endpoint deletes a [sub-account](/glossary#sub-account) API key.
|
|
499
|
+
|
|
500
|
+
<Warning>
|
|
501
|
+
Rate limit: 1000 requests/10 sec.
|
|
502
|
+
</Warning>
|
|
503
|
+
|
|
504
|
+
<Note>
|
|
505
|
+
The API does not cache the response.
|
|
506
|
+
</Note>
|
|
507
|
+
|
|
508
|
+
Parameters
|
|
509
|
+
----------
|
|
510
|
+
api_key_id : str
|
|
511
|
+
ID of the API key to delete
|
|
512
|
+
|
|
513
|
+
request_options : typing.Optional[RequestOptions]
|
|
514
|
+
Request-specific configuration.
|
|
515
|
+
|
|
516
|
+
Returns
|
|
517
|
+
-------
|
|
518
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
519
|
+
API key deleted successfully
|
|
520
|
+
|
|
521
|
+
Examples
|
|
522
|
+
--------
|
|
523
|
+
from whitebit import AsyncWhitebitApi
|
|
524
|
+
import asyncio
|
|
525
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
526
|
+
async def main() -> None:
|
|
527
|
+
await client.sub_account_api_keys.delete_sub_account_api_key(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', )
|
|
528
|
+
asyncio.run(main())
|
|
529
|
+
"""
|
|
530
|
+
_response = await self._raw_client.delete_sub_account_api_key(
|
|
531
|
+
api_key_id=api_key_id, request_options=request_options
|
|
532
|
+
)
|
|
533
|
+
return _response.data
|
|
534
|
+
|
|
535
|
+
async def list_sub_account_api_keys(
|
|
536
|
+
self,
|
|
537
|
+
*,
|
|
538
|
+
sub_account_id: typing.Optional[str] = OMIT,
|
|
539
|
+
limit: typing.Optional[int] = OMIT,
|
|
540
|
+
offset: typing.Optional[int] = OMIT,
|
|
541
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
542
|
+
) -> ListSubAccountApiKeysResponse:
|
|
543
|
+
"""
|
|
544
|
+
The endpoint retrieves a list of API keys for a [sub-account](/glossary#sub-account).
|
|
545
|
+
Note: For security reasons, the apiSecret field returns an empty string.
|
|
546
|
+
|
|
547
|
+
<Warning>
|
|
548
|
+
Rate limit: 1000 requests/10 sec.
|
|
549
|
+
</Warning>
|
|
550
|
+
|
|
551
|
+
<Note>
|
|
552
|
+
The API does not cache the response.
|
|
553
|
+
</Note>
|
|
554
|
+
|
|
555
|
+
Parameters
|
|
556
|
+
----------
|
|
557
|
+
sub_account_id : typing.Optional[str]
|
|
558
|
+
ID of the sub-account to list API keys for
|
|
559
|
+
|
|
560
|
+
limit : typing.Optional[int]
|
|
561
|
+
|
|
562
|
+
offset : typing.Optional[int]
|
|
563
|
+
|
|
564
|
+
request_options : typing.Optional[RequestOptions]
|
|
565
|
+
Request-specific configuration.
|
|
566
|
+
|
|
567
|
+
Returns
|
|
568
|
+
-------
|
|
569
|
+
ListSubAccountApiKeysResponse
|
|
570
|
+
Successful response
|
|
571
|
+
|
|
572
|
+
Examples
|
|
573
|
+
--------
|
|
574
|
+
from whitebit import AsyncWhitebitApi
|
|
575
|
+
import asyncio
|
|
576
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
577
|
+
async def main() -> None:
|
|
578
|
+
await client.sub_account_api_keys.list_sub_account_api_keys()
|
|
579
|
+
asyncio.run(main())
|
|
580
|
+
"""
|
|
581
|
+
_response = await self._raw_client.list_sub_account_api_keys(
|
|
582
|
+
sub_account_id=sub_account_id, limit=limit, offset=offset, request_options=request_options
|
|
583
|
+
)
|
|
584
|
+
return _response.data
|
|
585
|
+
|
|
586
|
+
async def reset_sub_account_api_key(
|
|
587
|
+
self, *, api_key_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
588
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
589
|
+
"""
|
|
590
|
+
The endpoint resets (regenerates) an existing [sub-account](/glossary#sub-account) API key.
|
|
591
|
+
|
|
592
|
+
<Warning>
|
|
593
|
+
Rate limit: 1000 requests/10 sec.
|
|
594
|
+
</Warning>
|
|
595
|
+
|
|
596
|
+
<Note>
|
|
597
|
+
The API does not cache the response.
|
|
598
|
+
</Note>
|
|
599
|
+
|
|
600
|
+
Parameters
|
|
601
|
+
----------
|
|
602
|
+
api_key_id : str
|
|
603
|
+
ID of the API key to reset
|
|
604
|
+
|
|
605
|
+
request_options : typing.Optional[RequestOptions]
|
|
606
|
+
Request-specific configuration.
|
|
607
|
+
|
|
608
|
+
Returns
|
|
609
|
+
-------
|
|
610
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
611
|
+
API key reset successfully
|
|
612
|
+
|
|
613
|
+
Examples
|
|
614
|
+
--------
|
|
615
|
+
from whitebit import AsyncWhitebitApi
|
|
616
|
+
import asyncio
|
|
617
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
618
|
+
async def main() -> None:
|
|
619
|
+
await client.sub_account_api_keys.reset_sub_account_api_key(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', )
|
|
620
|
+
asyncio.run(main())
|
|
621
|
+
"""
|
|
622
|
+
_response = await self._raw_client.reset_sub_account_api_key(
|
|
623
|
+
api_key_id=api_key_id, request_options=request_options
|
|
624
|
+
)
|
|
625
|
+
return _response.data
|
|
626
|
+
|
|
627
|
+
async def list_sub_account_api_key_ip_addresses(
|
|
628
|
+
self, *, api_key_id: str, request_options: typing.Optional[RequestOptions] = None
|
|
629
|
+
) -> ListSubAccountApiKeyIpAddressesResponse:
|
|
630
|
+
"""
|
|
631
|
+
The endpoint retrieves the list of IP addresses allowed for a [sub-account](/glossary#sub-account) API key.
|
|
632
|
+
|
|
633
|
+
<Warning>
|
|
634
|
+
Rate limit: 1000 requests/10 sec.
|
|
635
|
+
</Warning>
|
|
636
|
+
|
|
637
|
+
<Note>
|
|
638
|
+
The API does not cache the response.
|
|
639
|
+
</Note>
|
|
640
|
+
|
|
641
|
+
Parameters
|
|
642
|
+
----------
|
|
643
|
+
api_key_id : str
|
|
644
|
+
ID of the API key to list IP addresses for
|
|
645
|
+
|
|
646
|
+
request_options : typing.Optional[RequestOptions]
|
|
647
|
+
Request-specific configuration.
|
|
648
|
+
|
|
649
|
+
Returns
|
|
650
|
+
-------
|
|
651
|
+
ListSubAccountApiKeyIpAddressesResponse
|
|
652
|
+
Successful response
|
|
653
|
+
|
|
654
|
+
Examples
|
|
655
|
+
--------
|
|
656
|
+
from whitebit import AsyncWhitebitApi
|
|
657
|
+
import asyncio
|
|
658
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
659
|
+
async def main() -> None:
|
|
660
|
+
await client.sub_account_api_keys.list_sub_account_api_key_ip_addresses(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', )
|
|
661
|
+
asyncio.run(main())
|
|
662
|
+
"""
|
|
663
|
+
_response = await self._raw_client.list_sub_account_api_key_ip_addresses(
|
|
664
|
+
api_key_id=api_key_id, request_options=request_options
|
|
665
|
+
)
|
|
666
|
+
return _response.data
|
|
667
|
+
|
|
668
|
+
async def create_sub_account_api_key_ip_address(
|
|
669
|
+
self, *, api_key_id: str, ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
670
|
+
) -> CreateSubAccountApiKeyIpAddressResponse:
|
|
671
|
+
"""
|
|
672
|
+
The endpoint adds a new IP address to the allowed list for a [sub-account](/glossary#sub-account) API key.
|
|
673
|
+
|
|
674
|
+
<Warning>
|
|
675
|
+
Rate limit: 1000 requests/10 sec.
|
|
676
|
+
</Warning>
|
|
677
|
+
|
|
678
|
+
<Note>
|
|
679
|
+
The API does not cache the response.
|
|
680
|
+
</Note>
|
|
681
|
+
|
|
682
|
+
Parameters
|
|
683
|
+
----------
|
|
684
|
+
api_key_id : str
|
|
685
|
+
ID of the API key to add IP address to
|
|
686
|
+
|
|
687
|
+
ip : str
|
|
688
|
+
IP address to add to allowed list
|
|
689
|
+
|
|
690
|
+
request_options : typing.Optional[RequestOptions]
|
|
691
|
+
Request-specific configuration.
|
|
692
|
+
|
|
693
|
+
Returns
|
|
694
|
+
-------
|
|
695
|
+
CreateSubAccountApiKeyIpAddressResponse
|
|
696
|
+
IP address added successfully
|
|
697
|
+
|
|
698
|
+
Examples
|
|
699
|
+
--------
|
|
700
|
+
from whitebit import AsyncWhitebitApi
|
|
701
|
+
import asyncio
|
|
702
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
703
|
+
async def main() -> None:
|
|
704
|
+
await client.sub_account_api_keys.create_sub_account_api_key_ip_address(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', ip='192.168.1.100', )
|
|
705
|
+
asyncio.run(main())
|
|
706
|
+
"""
|
|
707
|
+
_response = await self._raw_client.create_sub_account_api_key_ip_address(
|
|
708
|
+
api_key_id=api_key_id, ip=ip, request_options=request_options
|
|
709
|
+
)
|
|
710
|
+
return _response.data
|
|
711
|
+
|
|
712
|
+
async def delete_sub_account_api_key_ip_address(
|
|
713
|
+
self, *, api_key_id: str, ip: str, request_options: typing.Optional[RequestOptions] = None
|
|
714
|
+
) -> DeleteSubAccountApiKeyIpAddressResponse:
|
|
715
|
+
"""
|
|
716
|
+
The endpoint removes an IP address from the allowed list for a [sub-account](/glossary#sub-account) API key.
|
|
717
|
+
|
|
718
|
+
<Warning>
|
|
719
|
+
Rate limit: 1000 requests/10 sec.
|
|
720
|
+
</Warning>
|
|
721
|
+
|
|
722
|
+
<Note>
|
|
723
|
+
The API does not cache the response.
|
|
724
|
+
</Note>
|
|
725
|
+
|
|
726
|
+
Parameters
|
|
727
|
+
----------
|
|
728
|
+
api_key_id : str
|
|
729
|
+
ID of the API key to remove IP address from
|
|
730
|
+
|
|
731
|
+
ip : str
|
|
732
|
+
IP address to remove from allowed list
|
|
733
|
+
|
|
734
|
+
request_options : typing.Optional[RequestOptions]
|
|
735
|
+
Request-specific configuration.
|
|
736
|
+
|
|
737
|
+
Returns
|
|
738
|
+
-------
|
|
739
|
+
DeleteSubAccountApiKeyIpAddressResponse
|
|
740
|
+
IP address removed successfully
|
|
741
|
+
|
|
742
|
+
Examples
|
|
743
|
+
--------
|
|
744
|
+
from whitebit import AsyncWhitebitApi
|
|
745
|
+
import asyncio
|
|
746
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
747
|
+
async def main() -> None:
|
|
748
|
+
await client.sub_account_api_keys.delete_sub_account_api_key_ip_address(api_key_id='a1b2c3d4-e5f6-7890-abcd-ef1234567890', ip='192.168.1.100', )
|
|
749
|
+
asyncio.run(main())
|
|
750
|
+
"""
|
|
751
|
+
_response = await self._raw_client.delete_sub_account_api_key_ip_address(
|
|
752
|
+
api_key_id=api_key_id, ip=ip, request_options=request_options
|
|
753
|
+
)
|
|
754
|
+
return _response.data
|