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,193 @@
|
|
|
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 .raw_client import AsyncRawMarketFeeClient, RawMarketFeeClient
|
|
8
|
+
from .types.get_all_market_fees_response import GetAllMarketFeesResponse
|
|
9
|
+
from .types.get_market_fee_response import GetMarketFeeResponse
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class MarketFeeClient:
|
|
13
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
14
|
+
self._raw_client = RawMarketFeeClient(client_wrapper=client_wrapper)
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def with_raw_response(self) -> RawMarketFeeClient:
|
|
18
|
+
"""
|
|
19
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
20
|
+
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
RawMarketFeeClient
|
|
24
|
+
"""
|
|
25
|
+
return self._raw_client
|
|
26
|
+
|
|
27
|
+
def get_all_market_fees(
|
|
28
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
29
|
+
) -> GetAllMarketFeesResponse:
|
|
30
|
+
"""
|
|
31
|
+
Returns maker and taker fees for all markets, including assigned custom fees.
|
|
32
|
+
|
|
33
|
+
The `maker` and `taker` fields represent default spot trading fees.
|
|
34
|
+
|
|
35
|
+
The `futures_maker` and `futures_taker` fields represent effective futures fees. The effective futures fee equals the lower value between the assigned custom fee and the default market fee.
|
|
36
|
+
|
|
37
|
+
The `custom_fee` object contains market-specific custom spot fees.
|
|
38
|
+
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
request_options : typing.Optional[RequestOptions]
|
|
42
|
+
Request-specific configuration.
|
|
43
|
+
|
|
44
|
+
Returns
|
|
45
|
+
-------
|
|
46
|
+
GetAllMarketFeesResponse
|
|
47
|
+
Successful response
|
|
48
|
+
|
|
49
|
+
Examples
|
|
50
|
+
--------
|
|
51
|
+
from whitebit import WhitebitApi
|
|
52
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
53
|
+
client.market_fee.get_all_market_fees()
|
|
54
|
+
"""
|
|
55
|
+
_response = self._raw_client.get_all_market_fees(request_options=request_options)
|
|
56
|
+
return _response.data
|
|
57
|
+
|
|
58
|
+
def get_market_fee(
|
|
59
|
+
self, *, market: str, request_options: typing.Optional[RequestOptions] = None
|
|
60
|
+
) -> GetMarketFeeResponse:
|
|
61
|
+
"""
|
|
62
|
+
Returns maker and taker fees for a specific market.
|
|
63
|
+
|
|
64
|
+
The `maker` and `taker` fields represent spot trading fees. The `futures_maker` and `futures_taker` fields represent futures trading fees.
|
|
65
|
+
|
|
66
|
+
The system calculates the effective futures fee as the lower value between the user-specific custom fee and the market-specific fee.
|
|
67
|
+
|
|
68
|
+
When the market fee is lower than the assigned custom fee, the system returns the market fee.
|
|
69
|
+
|
|
70
|
+
Example: If the custom futures taker fee equals `0.026` and the market fee equals `0.02`, the response returns `0.02`.
|
|
71
|
+
|
|
72
|
+
Parameters
|
|
73
|
+
----------
|
|
74
|
+
market : str
|
|
75
|
+
Market to query.
|
|
76
|
+
|
|
77
|
+
If the request includes the `market` parameter, the system returns fees for the specified market only.
|
|
78
|
+
|
|
79
|
+
When fee values are identical across markets, the response contains identical values regardless of the specified market.
|
|
80
|
+
|
|
81
|
+
Example: BTC_USDT
|
|
82
|
+
|
|
83
|
+
request_options : typing.Optional[RequestOptions]
|
|
84
|
+
Request-specific configuration.
|
|
85
|
+
|
|
86
|
+
Returns
|
|
87
|
+
-------
|
|
88
|
+
GetMarketFeeResponse
|
|
89
|
+
Successful response
|
|
90
|
+
|
|
91
|
+
Examples
|
|
92
|
+
--------
|
|
93
|
+
from whitebit import WhitebitApi
|
|
94
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
95
|
+
client.market_fee.get_market_fee(market='BTC_USDT', )
|
|
96
|
+
"""
|
|
97
|
+
_response = self._raw_client.get_market_fee(market=market, request_options=request_options)
|
|
98
|
+
return _response.data
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class AsyncMarketFeeClient:
|
|
102
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
103
|
+
self._raw_client = AsyncRawMarketFeeClient(client_wrapper=client_wrapper)
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def with_raw_response(self) -> AsyncRawMarketFeeClient:
|
|
107
|
+
"""
|
|
108
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
109
|
+
|
|
110
|
+
Returns
|
|
111
|
+
-------
|
|
112
|
+
AsyncRawMarketFeeClient
|
|
113
|
+
"""
|
|
114
|
+
return self._raw_client
|
|
115
|
+
|
|
116
|
+
async def get_all_market_fees(
|
|
117
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
118
|
+
) -> GetAllMarketFeesResponse:
|
|
119
|
+
"""
|
|
120
|
+
Returns maker and taker fees for all markets, including assigned custom fees.
|
|
121
|
+
|
|
122
|
+
The `maker` and `taker` fields represent default spot trading fees.
|
|
123
|
+
|
|
124
|
+
The `futures_maker` and `futures_taker` fields represent effective futures fees. The effective futures fee equals the lower value between the assigned custom fee and the default market fee.
|
|
125
|
+
|
|
126
|
+
The `custom_fee` object contains market-specific custom spot fees.
|
|
127
|
+
|
|
128
|
+
Parameters
|
|
129
|
+
----------
|
|
130
|
+
request_options : typing.Optional[RequestOptions]
|
|
131
|
+
Request-specific configuration.
|
|
132
|
+
|
|
133
|
+
Returns
|
|
134
|
+
-------
|
|
135
|
+
GetAllMarketFeesResponse
|
|
136
|
+
Successful response
|
|
137
|
+
|
|
138
|
+
Examples
|
|
139
|
+
--------
|
|
140
|
+
from whitebit import AsyncWhitebitApi
|
|
141
|
+
import asyncio
|
|
142
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
143
|
+
async def main() -> None:
|
|
144
|
+
await client.market_fee.get_all_market_fees()
|
|
145
|
+
asyncio.run(main())
|
|
146
|
+
"""
|
|
147
|
+
_response = await self._raw_client.get_all_market_fees(request_options=request_options)
|
|
148
|
+
return _response.data
|
|
149
|
+
|
|
150
|
+
async def get_market_fee(
|
|
151
|
+
self, *, market: str, request_options: typing.Optional[RequestOptions] = None
|
|
152
|
+
) -> GetMarketFeeResponse:
|
|
153
|
+
"""
|
|
154
|
+
Returns maker and taker fees for a specific market.
|
|
155
|
+
|
|
156
|
+
The `maker` and `taker` fields represent spot trading fees. The `futures_maker` and `futures_taker` fields represent futures trading fees.
|
|
157
|
+
|
|
158
|
+
The system calculates the effective futures fee as the lower value between the user-specific custom fee and the market-specific fee.
|
|
159
|
+
|
|
160
|
+
When the market fee is lower than the assigned custom fee, the system returns the market fee.
|
|
161
|
+
|
|
162
|
+
Example: If the custom futures taker fee equals `0.026` and the market fee equals `0.02`, the response returns `0.02`.
|
|
163
|
+
|
|
164
|
+
Parameters
|
|
165
|
+
----------
|
|
166
|
+
market : str
|
|
167
|
+
Market to query.
|
|
168
|
+
|
|
169
|
+
If the request includes the `market` parameter, the system returns fees for the specified market only.
|
|
170
|
+
|
|
171
|
+
When fee values are identical across markets, the response contains identical values regardless of the specified market.
|
|
172
|
+
|
|
173
|
+
Example: BTC_USDT
|
|
174
|
+
|
|
175
|
+
request_options : typing.Optional[RequestOptions]
|
|
176
|
+
Request-specific configuration.
|
|
177
|
+
|
|
178
|
+
Returns
|
|
179
|
+
-------
|
|
180
|
+
GetMarketFeeResponse
|
|
181
|
+
Successful response
|
|
182
|
+
|
|
183
|
+
Examples
|
|
184
|
+
--------
|
|
185
|
+
from whitebit import AsyncWhitebitApi
|
|
186
|
+
import asyncio
|
|
187
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
188
|
+
async def main() -> None:
|
|
189
|
+
await client.market_fee.get_market_fee(market='BTC_USDT', )
|
|
190
|
+
asyncio.run(main())
|
|
191
|
+
"""
|
|
192
|
+
_response = await self._raw_client.get_market_fee(market=market, request_options=request_options)
|
|
193
|
+
return _response.data
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from ..core.api_error import ApiError
|
|
7
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from ..core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
10
|
+
from ..core.request_options import RequestOptions
|
|
11
|
+
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
12
|
+
from .types.get_all_market_fees_response import GetAllMarketFeesResponse
|
|
13
|
+
from .types.get_market_fee_response import GetMarketFeeResponse
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RawMarketFeeClient:
|
|
17
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
18
|
+
self._client_wrapper = client_wrapper
|
|
19
|
+
|
|
20
|
+
def get_all_market_fees(
|
|
21
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
22
|
+
) -> HttpResponse[GetAllMarketFeesResponse]:
|
|
23
|
+
"""
|
|
24
|
+
Returns maker and taker fees for all markets, including assigned custom fees.
|
|
25
|
+
|
|
26
|
+
The `maker` and `taker` fields represent default spot trading fees.
|
|
27
|
+
|
|
28
|
+
The `futures_maker` and `futures_taker` fields represent effective futures fees. The effective futures fee equals the lower value between the assigned custom fee and the default market fee.
|
|
29
|
+
|
|
30
|
+
The `custom_fee` object contains market-specific custom spot fees.
|
|
31
|
+
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
request_options : typing.Optional[RequestOptions]
|
|
35
|
+
Request-specific configuration.
|
|
36
|
+
|
|
37
|
+
Returns
|
|
38
|
+
-------
|
|
39
|
+
HttpResponse[GetAllMarketFeesResponse]
|
|
40
|
+
Successful response
|
|
41
|
+
"""
|
|
42
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
43
|
+
"api/v4/market/fee",
|
|
44
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
45
|
+
method="GET",
|
|
46
|
+
request_options=request_options,
|
|
47
|
+
)
|
|
48
|
+
try:
|
|
49
|
+
if 200 <= _response.status_code < 300:
|
|
50
|
+
_data = typing.cast(
|
|
51
|
+
GetAllMarketFeesResponse,
|
|
52
|
+
parse_obj_as(
|
|
53
|
+
type_=GetAllMarketFeesResponse, # type: ignore
|
|
54
|
+
object_=_response.json(),
|
|
55
|
+
),
|
|
56
|
+
)
|
|
57
|
+
return HttpResponse(response=_response, data=_data)
|
|
58
|
+
if _response.status_code == 422:
|
|
59
|
+
raise UnprocessableEntityError(
|
|
60
|
+
headers=dict(_response.headers),
|
|
61
|
+
body=typing.cast(
|
|
62
|
+
typing.Optional[typing.Any],
|
|
63
|
+
parse_obj_as(
|
|
64
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
65
|
+
object_=_response.json(),
|
|
66
|
+
),
|
|
67
|
+
),
|
|
68
|
+
)
|
|
69
|
+
_response_json = _response.json()
|
|
70
|
+
except JSONDecodeError:
|
|
71
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
72
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
73
|
+
|
|
74
|
+
def get_market_fee(
|
|
75
|
+
self, *, market: str, request_options: typing.Optional[RequestOptions] = None
|
|
76
|
+
) -> HttpResponse[GetMarketFeeResponse]:
|
|
77
|
+
"""
|
|
78
|
+
Returns maker and taker fees for a specific market.
|
|
79
|
+
|
|
80
|
+
The `maker` and `taker` fields represent spot trading fees. The `futures_maker` and `futures_taker` fields represent futures trading fees.
|
|
81
|
+
|
|
82
|
+
The system calculates the effective futures fee as the lower value between the user-specific custom fee and the market-specific fee.
|
|
83
|
+
|
|
84
|
+
When the market fee is lower than the assigned custom fee, the system returns the market fee.
|
|
85
|
+
|
|
86
|
+
Example: If the custom futures taker fee equals `0.026` and the market fee equals `0.02`, the response returns `0.02`.
|
|
87
|
+
|
|
88
|
+
Parameters
|
|
89
|
+
----------
|
|
90
|
+
market : str
|
|
91
|
+
Market to query.
|
|
92
|
+
|
|
93
|
+
If the request includes the `market` parameter, the system returns fees for the specified market only.
|
|
94
|
+
|
|
95
|
+
When fee values are identical across markets, the response contains identical values regardless of the specified market.
|
|
96
|
+
|
|
97
|
+
Example: BTC_USDT
|
|
98
|
+
|
|
99
|
+
request_options : typing.Optional[RequestOptions]
|
|
100
|
+
Request-specific configuration.
|
|
101
|
+
|
|
102
|
+
Returns
|
|
103
|
+
-------
|
|
104
|
+
HttpResponse[GetMarketFeeResponse]
|
|
105
|
+
Successful response
|
|
106
|
+
"""
|
|
107
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
108
|
+
"api/v4/market/fee",
|
|
109
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
110
|
+
method="POST",
|
|
111
|
+
params={
|
|
112
|
+
"market": market,
|
|
113
|
+
},
|
|
114
|
+
request_options=request_options,
|
|
115
|
+
)
|
|
116
|
+
try:
|
|
117
|
+
if 200 <= _response.status_code < 300:
|
|
118
|
+
_data = typing.cast(
|
|
119
|
+
GetMarketFeeResponse,
|
|
120
|
+
parse_obj_as(
|
|
121
|
+
type_=GetMarketFeeResponse, # type: ignore
|
|
122
|
+
object_=_response.json(),
|
|
123
|
+
),
|
|
124
|
+
)
|
|
125
|
+
return HttpResponse(response=_response, data=_data)
|
|
126
|
+
if _response.status_code == 422:
|
|
127
|
+
raise UnprocessableEntityError(
|
|
128
|
+
headers=dict(_response.headers),
|
|
129
|
+
body=typing.cast(
|
|
130
|
+
typing.Optional[typing.Any],
|
|
131
|
+
parse_obj_as(
|
|
132
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
133
|
+
object_=_response.json(),
|
|
134
|
+
),
|
|
135
|
+
),
|
|
136
|
+
)
|
|
137
|
+
_response_json = _response.json()
|
|
138
|
+
except JSONDecodeError:
|
|
139
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
140
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class AsyncRawMarketFeeClient:
|
|
144
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
145
|
+
self._client_wrapper = client_wrapper
|
|
146
|
+
|
|
147
|
+
async def get_all_market_fees(
|
|
148
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
149
|
+
) -> AsyncHttpResponse[GetAllMarketFeesResponse]:
|
|
150
|
+
"""
|
|
151
|
+
Returns maker and taker fees for all markets, including assigned custom fees.
|
|
152
|
+
|
|
153
|
+
The `maker` and `taker` fields represent default spot trading fees.
|
|
154
|
+
|
|
155
|
+
The `futures_maker` and `futures_taker` fields represent effective futures fees. The effective futures fee equals the lower value between the assigned custom fee and the default market fee.
|
|
156
|
+
|
|
157
|
+
The `custom_fee` object contains market-specific custom spot fees.
|
|
158
|
+
|
|
159
|
+
Parameters
|
|
160
|
+
----------
|
|
161
|
+
request_options : typing.Optional[RequestOptions]
|
|
162
|
+
Request-specific configuration.
|
|
163
|
+
|
|
164
|
+
Returns
|
|
165
|
+
-------
|
|
166
|
+
AsyncHttpResponse[GetAllMarketFeesResponse]
|
|
167
|
+
Successful response
|
|
168
|
+
"""
|
|
169
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
170
|
+
"api/v4/market/fee",
|
|
171
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
172
|
+
method="GET",
|
|
173
|
+
request_options=request_options,
|
|
174
|
+
)
|
|
175
|
+
try:
|
|
176
|
+
if 200 <= _response.status_code < 300:
|
|
177
|
+
_data = typing.cast(
|
|
178
|
+
GetAllMarketFeesResponse,
|
|
179
|
+
parse_obj_as(
|
|
180
|
+
type_=GetAllMarketFeesResponse, # type: ignore
|
|
181
|
+
object_=_response.json(),
|
|
182
|
+
),
|
|
183
|
+
)
|
|
184
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
185
|
+
if _response.status_code == 422:
|
|
186
|
+
raise UnprocessableEntityError(
|
|
187
|
+
headers=dict(_response.headers),
|
|
188
|
+
body=typing.cast(
|
|
189
|
+
typing.Optional[typing.Any],
|
|
190
|
+
parse_obj_as(
|
|
191
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
192
|
+
object_=_response.json(),
|
|
193
|
+
),
|
|
194
|
+
),
|
|
195
|
+
)
|
|
196
|
+
_response_json = _response.json()
|
|
197
|
+
except JSONDecodeError:
|
|
198
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
199
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
200
|
+
|
|
201
|
+
async def get_market_fee(
|
|
202
|
+
self, *, market: str, request_options: typing.Optional[RequestOptions] = None
|
|
203
|
+
) -> AsyncHttpResponse[GetMarketFeeResponse]:
|
|
204
|
+
"""
|
|
205
|
+
Returns maker and taker fees for a specific market.
|
|
206
|
+
|
|
207
|
+
The `maker` and `taker` fields represent spot trading fees. The `futures_maker` and `futures_taker` fields represent futures trading fees.
|
|
208
|
+
|
|
209
|
+
The system calculates the effective futures fee as the lower value between the user-specific custom fee and the market-specific fee.
|
|
210
|
+
|
|
211
|
+
When the market fee is lower than the assigned custom fee, the system returns the market fee.
|
|
212
|
+
|
|
213
|
+
Example: If the custom futures taker fee equals `0.026` and the market fee equals `0.02`, the response returns `0.02`.
|
|
214
|
+
|
|
215
|
+
Parameters
|
|
216
|
+
----------
|
|
217
|
+
market : str
|
|
218
|
+
Market to query.
|
|
219
|
+
|
|
220
|
+
If the request includes the `market` parameter, the system returns fees for the specified market only.
|
|
221
|
+
|
|
222
|
+
When fee values are identical across markets, the response contains identical values regardless of the specified market.
|
|
223
|
+
|
|
224
|
+
Example: BTC_USDT
|
|
225
|
+
|
|
226
|
+
request_options : typing.Optional[RequestOptions]
|
|
227
|
+
Request-specific configuration.
|
|
228
|
+
|
|
229
|
+
Returns
|
|
230
|
+
-------
|
|
231
|
+
AsyncHttpResponse[GetMarketFeeResponse]
|
|
232
|
+
Successful response
|
|
233
|
+
"""
|
|
234
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
235
|
+
"api/v4/market/fee",
|
|
236
|
+
base_url=self._client_wrapper.get_environment().base,
|
|
237
|
+
method="POST",
|
|
238
|
+
params={
|
|
239
|
+
"market": market,
|
|
240
|
+
},
|
|
241
|
+
request_options=request_options,
|
|
242
|
+
)
|
|
243
|
+
try:
|
|
244
|
+
if 200 <= _response.status_code < 300:
|
|
245
|
+
_data = typing.cast(
|
|
246
|
+
GetMarketFeeResponse,
|
|
247
|
+
parse_obj_as(
|
|
248
|
+
type_=GetMarketFeeResponse, # type: ignore
|
|
249
|
+
object_=_response.json(),
|
|
250
|
+
),
|
|
251
|
+
)
|
|
252
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
253
|
+
if _response.status_code == 422:
|
|
254
|
+
raise UnprocessableEntityError(
|
|
255
|
+
headers=dict(_response.headers),
|
|
256
|
+
body=typing.cast(
|
|
257
|
+
typing.Optional[typing.Any],
|
|
258
|
+
parse_obj_as(
|
|
259
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
260
|
+
object_=_response.json(),
|
|
261
|
+
),
|
|
262
|
+
),
|
|
263
|
+
)
|
|
264
|
+
_response_json = _response.json()
|
|
265
|
+
except JSONDecodeError:
|
|
266
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
267
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .get_all_market_fees_response import GetAllMarketFeesResponse
|
|
6
|
+
from .get_market_fee_response import GetMarketFeeResponse
|
|
7
|
+
|
|
8
|
+
__all__ = ["GetAllMarketFeesResponse", "GetMarketFeeResponse"]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class GetAllMarketFeesResponse(UniversalBaseModel):
|
|
10
|
+
error: typing.Optional[str] = None
|
|
11
|
+
taker: typing.Optional[str] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Default taker fee percentage
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
maker: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Default maker fee percentage
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
futures_taker: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
Futures taker fee rate (default or custom if assigned)
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
futures_maker: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
Futures maker fee rate (default or custom if assigned)
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
custom_fee: typing.Optional[typing.Dict[str, typing.List[str]]] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
Custom fees for specific markets
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
if IS_PYDANTIC_V2:
|
|
37
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
38
|
+
else:
|
|
39
|
+
|
|
40
|
+
class Config:
|
|
41
|
+
frozen = True
|
|
42
|
+
smart_union = True
|
|
43
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class GetMarketFeeResponse(UniversalBaseModel):
|
|
10
|
+
error: typing.Optional[str] = None
|
|
11
|
+
taker: typing.Optional[str] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
Taker fee percentage
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
maker: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
Maker fee percentage
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
futures_taker: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
Effective futures taker fee rate for the specified market. The system returns the lower value between the custom fee (if assigned) and the default market fee.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
futures_maker: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
Effective futures maker fee rate for the specified market. The system returns the lower value between the custom fee (if assigned) and the default market fee.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
if IS_PYDANTIC_V2:
|
|
32
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
33
|
+
else:
|
|
34
|
+
|
|
35
|
+
class Config:
|
|
36
|
+
frozen = True
|
|
37
|
+
smart_union = True
|
|
38
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
# isort: skip_file
|
|
4
|
+
|
|
5
|
+
from .types import (
|
|
6
|
+
CreateMiningAccountResponse,
|
|
7
|
+
CreateMiningAccountResponseData,
|
|
8
|
+
CreateMiningWatcherLinkRequestLiveUntil,
|
|
9
|
+
CreateMiningWatcherLinkRequestPermissionsItem,
|
|
10
|
+
CreateMiningWatcherLinkResponse,
|
|
11
|
+
CreateMiningWatcherLinkResponseData,
|
|
12
|
+
GetMiningAccountsResponse,
|
|
13
|
+
GetMiningAccountsResponseDataItem,
|
|
14
|
+
GetMiningHashrateRequestInterval,
|
|
15
|
+
GetMiningHashrateResponse,
|
|
16
|
+
GetMiningHashrateResponseData,
|
|
17
|
+
GetMiningHashrateResponseDataHashrateItem,
|
|
18
|
+
GetMiningMinerInfoResponse,
|
|
19
|
+
GetMiningMinerInfoResponseData,
|
|
20
|
+
GetMiningMinerInfoResponseDataStratumItem,
|
|
21
|
+
GetMiningPayoutDestinationResponse,
|
|
22
|
+
GetMiningPayoutDestinationResponsePayoutDestination,
|
|
23
|
+
GetMiningRewardsResponse,
|
|
24
|
+
GetMiningWorkerHashrateRequestInterval,
|
|
25
|
+
GetMiningWorkerHashrateResponse,
|
|
26
|
+
GetMiningWorkerHashrateResponseData,
|
|
27
|
+
GetMiningWorkerHashrateResponseDataHashratesItem,
|
|
28
|
+
GetMiningWorkerNamesResponse,
|
|
29
|
+
GetMiningWorkerNamesResponseData,
|
|
30
|
+
ListMiningWatcherLinksResponse,
|
|
31
|
+
ListMiningWatcherLinksResponseDataItem,
|
|
32
|
+
SetMiningPayoutDestinationRequestDestination,
|
|
33
|
+
SetMiningPayoutDestinationResponse,
|
|
34
|
+
SetMiningPayoutDestinationResponsePayoutDestination,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"CreateMiningAccountResponse",
|
|
39
|
+
"CreateMiningAccountResponseData",
|
|
40
|
+
"CreateMiningWatcherLinkRequestLiveUntil",
|
|
41
|
+
"CreateMiningWatcherLinkRequestPermissionsItem",
|
|
42
|
+
"CreateMiningWatcherLinkResponse",
|
|
43
|
+
"CreateMiningWatcherLinkResponseData",
|
|
44
|
+
"GetMiningAccountsResponse",
|
|
45
|
+
"GetMiningAccountsResponseDataItem",
|
|
46
|
+
"GetMiningHashrateRequestInterval",
|
|
47
|
+
"GetMiningHashrateResponse",
|
|
48
|
+
"GetMiningHashrateResponseData",
|
|
49
|
+
"GetMiningHashrateResponseDataHashrateItem",
|
|
50
|
+
"GetMiningMinerInfoResponse",
|
|
51
|
+
"GetMiningMinerInfoResponseData",
|
|
52
|
+
"GetMiningMinerInfoResponseDataStratumItem",
|
|
53
|
+
"GetMiningPayoutDestinationResponse",
|
|
54
|
+
"GetMiningPayoutDestinationResponsePayoutDestination",
|
|
55
|
+
"GetMiningRewardsResponse",
|
|
56
|
+
"GetMiningWorkerHashrateRequestInterval",
|
|
57
|
+
"GetMiningWorkerHashrateResponse",
|
|
58
|
+
"GetMiningWorkerHashrateResponseData",
|
|
59
|
+
"GetMiningWorkerHashrateResponseDataHashratesItem",
|
|
60
|
+
"GetMiningWorkerNamesResponse",
|
|
61
|
+
"GetMiningWorkerNamesResponseData",
|
|
62
|
+
"ListMiningWatcherLinksResponse",
|
|
63
|
+
"ListMiningWatcherLinksResponseDataItem",
|
|
64
|
+
"SetMiningPayoutDestinationRequestDestination",
|
|
65
|
+
"SetMiningPayoutDestinationResponse",
|
|
66
|
+
"SetMiningPayoutDestinationResponsePayoutDestination",
|
|
67
|
+
]
|