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,651 @@
|
|
|
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.fixed_plan import FixedPlan
|
|
8
|
+
from .raw_client import AsyncRawCryptoLendingFixedClient, RawCryptoLendingFixedClient
|
|
9
|
+
from .types.create_fixed_investment_response import CreateFixedInvestmentResponse
|
|
10
|
+
from .types.get_fixed_investments_history_response import GetFixedInvestmentsHistoryResponse
|
|
11
|
+
from .types.get_interest_payment_history_response import GetInterestPaymentHistoryResponse
|
|
12
|
+
|
|
13
|
+
# this is used as the default value for optional parameters
|
|
14
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CryptoLendingFixedClient:
|
|
18
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
19
|
+
self._raw_client = RawCryptoLendingFixedClient(client_wrapper=client_wrapper)
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def with_raw_response(self) -> RawCryptoLendingFixedClient:
|
|
23
|
+
"""
|
|
24
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
25
|
+
|
|
26
|
+
Returns
|
|
27
|
+
-------
|
|
28
|
+
RawCryptoLendingFixedClient
|
|
29
|
+
"""
|
|
30
|
+
return self._raw_client
|
|
31
|
+
|
|
32
|
+
def get_fixed_plans(
|
|
33
|
+
self,
|
|
34
|
+
*,
|
|
35
|
+
request: str,
|
|
36
|
+
nonce: str,
|
|
37
|
+
ticker: typing.Optional[str] = OMIT,
|
|
38
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
39
|
+
) -> typing.List[FixedPlan]:
|
|
40
|
+
"""
|
|
41
|
+
The endpoint retrieves all active [plans](/glossary#crypto-lending).
|
|
42
|
+
|
|
43
|
+
<Note>
|
|
44
|
+
These endpoints are available only for B2B partner services. Fill the institutional services form to get permissions to use these endpoints.
|
|
45
|
+
</Note>
|
|
46
|
+
|
|
47
|
+
**Note:** When target currency is different from source currency, interest amount in target currency will be calculated using `interestRatio` value.
|
|
48
|
+
|
|
49
|
+
**Examples:**
|
|
50
|
+
- When source currency = USDT, target currency = BTC and interest ratio = 40000, interest is received in BTC and equals the USDT interest amount divided by the interest ratio (e.g. 0.000025 BTC per 1 USDT of interest).
|
|
51
|
+
- When source currency equals target currency, interest ratio equals 1.
|
|
52
|
+
|
|
53
|
+
<Warning>
|
|
54
|
+
Rate limit: 1000 requests/10 sec.
|
|
55
|
+
</Warning>
|
|
56
|
+
|
|
57
|
+
<Note>
|
|
58
|
+
The API does not cache the response.
|
|
59
|
+
</Note>
|
|
60
|
+
|
|
61
|
+
Parameters
|
|
62
|
+
----------
|
|
63
|
+
request : str
|
|
64
|
+
Request signature
|
|
65
|
+
|
|
66
|
+
nonce : str
|
|
67
|
+
Unique request identifier
|
|
68
|
+
|
|
69
|
+
ticker : typing.Optional[str]
|
|
70
|
+
[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker). Example: BTC
|
|
71
|
+
|
|
72
|
+
request_options : typing.Optional[RequestOptions]
|
|
73
|
+
Request-specific configuration.
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
-------
|
|
77
|
+
typing.List[FixedPlan]
|
|
78
|
+
Successful response
|
|
79
|
+
|
|
80
|
+
Examples
|
|
81
|
+
--------
|
|
82
|
+
from whitebit import WhitebitApi
|
|
83
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
84
|
+
client.crypto_lending_fixed.get_fixed_plans(ticker='USDT', request='{{request}}', nonce='{{nonce}}', )
|
|
85
|
+
"""
|
|
86
|
+
_response = self._raw_client.get_fixed_plans(
|
|
87
|
+
request=request, nonce=nonce, ticker=ticker, request_options=request_options
|
|
88
|
+
)
|
|
89
|
+
return _response.data
|
|
90
|
+
|
|
91
|
+
def create_fixed_investment(
|
|
92
|
+
self,
|
|
93
|
+
*,
|
|
94
|
+
plan_id: str,
|
|
95
|
+
amount: str,
|
|
96
|
+
request: str,
|
|
97
|
+
nonce: str,
|
|
98
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
99
|
+
) -> CreateFixedInvestmentResponse:
|
|
100
|
+
"""
|
|
101
|
+
The endpoint creates a new investment to the specified [invest plan](/glossary#crypto-lending).
|
|
102
|
+
|
|
103
|
+
<Warning>
|
|
104
|
+
Rate limit: 1000 requests/10 sec.
|
|
105
|
+
</Warning>
|
|
106
|
+
|
|
107
|
+
<Note>
|
|
108
|
+
The API does not cache the response.
|
|
109
|
+
</Note>
|
|
110
|
+
|
|
111
|
+
Parameters
|
|
112
|
+
----------
|
|
113
|
+
plan_id : str
|
|
114
|
+
[Invest plan](/glossary#crypto-lending) identifier
|
|
115
|
+
|
|
116
|
+
amount : str
|
|
117
|
+
Investment amount
|
|
118
|
+
|
|
119
|
+
request : str
|
|
120
|
+
Request signature
|
|
121
|
+
|
|
122
|
+
nonce : str
|
|
123
|
+
Unique request identifier
|
|
124
|
+
|
|
125
|
+
request_options : typing.Optional[RequestOptions]
|
|
126
|
+
Request-specific configuration.
|
|
127
|
+
|
|
128
|
+
Returns
|
|
129
|
+
-------
|
|
130
|
+
CreateFixedInvestmentResponse
|
|
131
|
+
Investment created successfully
|
|
132
|
+
|
|
133
|
+
Examples
|
|
134
|
+
--------
|
|
135
|
+
from whitebit import WhitebitApi
|
|
136
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
137
|
+
client.crypto_lending_fixed.create_fixed_investment(plan_id='8e667b4a-0b71-4988-8af5-9474dbfaeb51', amount='100', request='{{request}}', nonce='{{nonce}}', )
|
|
138
|
+
"""
|
|
139
|
+
_response = self._raw_client.create_fixed_investment(
|
|
140
|
+
plan_id=plan_id, amount=amount, request=request, nonce=nonce, request_options=request_options
|
|
141
|
+
)
|
|
142
|
+
return _response.data
|
|
143
|
+
|
|
144
|
+
def close_fixed_investment(
|
|
145
|
+
self, *, id: str, request: str, nonce: str, request_options: typing.Optional[RequestOptions] = None
|
|
146
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
147
|
+
"""
|
|
148
|
+
The endpoint closes active investment.
|
|
149
|
+
|
|
150
|
+
<Warning>
|
|
151
|
+
Rate limit: 1000 requests/10 sec.
|
|
152
|
+
</Warning>
|
|
153
|
+
|
|
154
|
+
<Note>
|
|
155
|
+
The API does not cache the response.
|
|
156
|
+
</Note>
|
|
157
|
+
|
|
158
|
+
Parameters
|
|
159
|
+
----------
|
|
160
|
+
id : str
|
|
161
|
+
Investment identifier
|
|
162
|
+
|
|
163
|
+
request : str
|
|
164
|
+
Request signature
|
|
165
|
+
|
|
166
|
+
nonce : str
|
|
167
|
+
Unique request identifier
|
|
168
|
+
|
|
169
|
+
request_options : typing.Optional[RequestOptions]
|
|
170
|
+
Request-specific configuration.
|
|
171
|
+
|
|
172
|
+
Returns
|
|
173
|
+
-------
|
|
174
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
175
|
+
Investment closed successfully
|
|
176
|
+
|
|
177
|
+
Examples
|
|
178
|
+
--------
|
|
179
|
+
from whitebit import WhitebitApi
|
|
180
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
181
|
+
client.crypto_lending_fixed.close_fixed_investment(id='0d7b66ff-1909-4938-ab7a-d16d9a64dcd5', request='{{request}}', nonce='{{nonce}}', )
|
|
182
|
+
"""
|
|
183
|
+
_response = self._raw_client.close_fixed_investment(
|
|
184
|
+
id=id, request=request, nonce=nonce, request_options=request_options
|
|
185
|
+
)
|
|
186
|
+
return _response.data
|
|
187
|
+
|
|
188
|
+
def get_fixed_investments_history(
|
|
189
|
+
self,
|
|
190
|
+
*,
|
|
191
|
+
request: str,
|
|
192
|
+
nonce: str,
|
|
193
|
+
id: typing.Optional[str] = OMIT,
|
|
194
|
+
ticker: typing.Optional[str] = OMIT,
|
|
195
|
+
status: typing.Optional[int] = OMIT,
|
|
196
|
+
limit: typing.Optional[int] = OMIT,
|
|
197
|
+
offset: typing.Optional[int] = OMIT,
|
|
198
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
199
|
+
) -> GetFixedInvestmentsHistoryResponse:
|
|
200
|
+
"""
|
|
201
|
+
The endpoint retrieves an investments history.
|
|
202
|
+
|
|
203
|
+
<Warning>
|
|
204
|
+
Rate limit: 1000 requests/10 sec.
|
|
205
|
+
</Warning>
|
|
206
|
+
|
|
207
|
+
<Note>
|
|
208
|
+
The API does not cache the response.
|
|
209
|
+
</Note>
|
|
210
|
+
|
|
211
|
+
Parameters
|
|
212
|
+
----------
|
|
213
|
+
request : str
|
|
214
|
+
Request signature
|
|
215
|
+
|
|
216
|
+
nonce : str
|
|
217
|
+
Unique request identifier
|
|
218
|
+
|
|
219
|
+
id : typing.Optional[str]
|
|
220
|
+
Investment identifier
|
|
221
|
+
|
|
222
|
+
ticker : typing.Optional[str]
|
|
223
|
+
[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker)
|
|
224
|
+
|
|
225
|
+
status : typing.Optional[int]
|
|
226
|
+
Investment status (1 - active, 2 - closed)
|
|
227
|
+
|
|
228
|
+
limit : typing.Optional[int]
|
|
229
|
+
LIMIT is a special clause used to limit records a particular query can return.
|
|
230
|
+
|
|
231
|
+
offset : typing.Optional[int]
|
|
232
|
+
Use the OFFSET clause to return entries starting from a particular line.
|
|
233
|
+
|
|
234
|
+
request_options : typing.Optional[RequestOptions]
|
|
235
|
+
Request-specific configuration.
|
|
236
|
+
|
|
237
|
+
Returns
|
|
238
|
+
-------
|
|
239
|
+
GetFixedInvestmentsHistoryResponse
|
|
240
|
+
Successful response
|
|
241
|
+
|
|
242
|
+
Examples
|
|
243
|
+
--------
|
|
244
|
+
from whitebit import WhitebitApi
|
|
245
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
246
|
+
client.crypto_lending_fixed.get_fixed_investments_history(id='0d7b66ff-1909-4938-ab7a-d16d9a64dcd5', ticker='USDT', status=1, request='{{request}}', nonce='{{nonce}}', )
|
|
247
|
+
"""
|
|
248
|
+
_response = self._raw_client.get_fixed_investments_history(
|
|
249
|
+
request=request,
|
|
250
|
+
nonce=nonce,
|
|
251
|
+
id=id,
|
|
252
|
+
ticker=ticker,
|
|
253
|
+
status=status,
|
|
254
|
+
limit=limit,
|
|
255
|
+
offset=offset,
|
|
256
|
+
request_options=request_options,
|
|
257
|
+
)
|
|
258
|
+
return _response.data
|
|
259
|
+
|
|
260
|
+
def get_interest_payment_history(
|
|
261
|
+
self,
|
|
262
|
+
*,
|
|
263
|
+
request: str,
|
|
264
|
+
nonce: str,
|
|
265
|
+
plan_id: typing.Optional[str] = OMIT,
|
|
266
|
+
ticker: typing.Optional[str] = OMIT,
|
|
267
|
+
limit: typing.Optional[int] = OMIT,
|
|
268
|
+
offset: typing.Optional[int] = OMIT,
|
|
269
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
270
|
+
) -> GetInterestPaymentHistoryResponse:
|
|
271
|
+
"""
|
|
272
|
+
The endpoint retrieves the history of interest payments.
|
|
273
|
+
|
|
274
|
+
<Warning>
|
|
275
|
+
Rate limit: 1000 requests/10 sec.
|
|
276
|
+
</Warning>
|
|
277
|
+
|
|
278
|
+
<Note>
|
|
279
|
+
The API does not cache the response.
|
|
280
|
+
</Note>
|
|
281
|
+
|
|
282
|
+
Parameters
|
|
283
|
+
----------
|
|
284
|
+
request : str
|
|
285
|
+
Request signature
|
|
286
|
+
|
|
287
|
+
nonce : str
|
|
288
|
+
Unique request identifier
|
|
289
|
+
|
|
290
|
+
plan_id : typing.Optional[str]
|
|
291
|
+
[Invest plan](/glossary#crypto-lending) identifier
|
|
292
|
+
|
|
293
|
+
ticker : typing.Optional[str]
|
|
294
|
+
[Invest plan](/glossary#crypto-lending) target currency's [ticker](/glossary#ticker)
|
|
295
|
+
|
|
296
|
+
limit : typing.Optional[int]
|
|
297
|
+
LIMIT is a special clause used to limit records a particular query can return.
|
|
298
|
+
|
|
299
|
+
offset : typing.Optional[int]
|
|
300
|
+
Use the OFFSET clause to return entries starting from a particular line.
|
|
301
|
+
|
|
302
|
+
request_options : typing.Optional[RequestOptions]
|
|
303
|
+
Request-specific configuration.
|
|
304
|
+
|
|
305
|
+
Returns
|
|
306
|
+
-------
|
|
307
|
+
GetInterestPaymentHistoryResponse
|
|
308
|
+
Successful response
|
|
309
|
+
|
|
310
|
+
Examples
|
|
311
|
+
--------
|
|
312
|
+
from whitebit import WhitebitApi
|
|
313
|
+
client = WhitebitApi(api_key="YOUR_API_KEY", )
|
|
314
|
+
client.crypto_lending_fixed.get_interest_payment_history(plan_id='8e667b4a-0b71-4988-8af5-9474dbfaeb51', ticker='USDT', request='{{request}}', nonce='{{nonce}}', )
|
|
315
|
+
"""
|
|
316
|
+
_response = self._raw_client.get_interest_payment_history(
|
|
317
|
+
request=request,
|
|
318
|
+
nonce=nonce,
|
|
319
|
+
plan_id=plan_id,
|
|
320
|
+
ticker=ticker,
|
|
321
|
+
limit=limit,
|
|
322
|
+
offset=offset,
|
|
323
|
+
request_options=request_options,
|
|
324
|
+
)
|
|
325
|
+
return _response.data
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
class AsyncCryptoLendingFixedClient:
|
|
329
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
330
|
+
self._raw_client = AsyncRawCryptoLendingFixedClient(client_wrapper=client_wrapper)
|
|
331
|
+
|
|
332
|
+
@property
|
|
333
|
+
def with_raw_response(self) -> AsyncRawCryptoLendingFixedClient:
|
|
334
|
+
"""
|
|
335
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
336
|
+
|
|
337
|
+
Returns
|
|
338
|
+
-------
|
|
339
|
+
AsyncRawCryptoLendingFixedClient
|
|
340
|
+
"""
|
|
341
|
+
return self._raw_client
|
|
342
|
+
|
|
343
|
+
async def get_fixed_plans(
|
|
344
|
+
self,
|
|
345
|
+
*,
|
|
346
|
+
request: str,
|
|
347
|
+
nonce: str,
|
|
348
|
+
ticker: typing.Optional[str] = OMIT,
|
|
349
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
350
|
+
) -> typing.List[FixedPlan]:
|
|
351
|
+
"""
|
|
352
|
+
The endpoint retrieves all active [plans](/glossary#crypto-lending).
|
|
353
|
+
|
|
354
|
+
<Note>
|
|
355
|
+
These endpoints are available only for B2B partner services. Fill the institutional services form to get permissions to use these endpoints.
|
|
356
|
+
</Note>
|
|
357
|
+
|
|
358
|
+
**Note:** When target currency is different from source currency, interest amount in target currency will be calculated using `interestRatio` value.
|
|
359
|
+
|
|
360
|
+
**Examples:**
|
|
361
|
+
- When source currency = USDT, target currency = BTC and interest ratio = 40000, interest is received in BTC and equals the USDT interest amount divided by the interest ratio (e.g. 0.000025 BTC per 1 USDT of interest).
|
|
362
|
+
- When source currency equals target currency, interest ratio equals 1.
|
|
363
|
+
|
|
364
|
+
<Warning>
|
|
365
|
+
Rate limit: 1000 requests/10 sec.
|
|
366
|
+
</Warning>
|
|
367
|
+
|
|
368
|
+
<Note>
|
|
369
|
+
The API does not cache the response.
|
|
370
|
+
</Note>
|
|
371
|
+
|
|
372
|
+
Parameters
|
|
373
|
+
----------
|
|
374
|
+
request : str
|
|
375
|
+
Request signature
|
|
376
|
+
|
|
377
|
+
nonce : str
|
|
378
|
+
Unique request identifier
|
|
379
|
+
|
|
380
|
+
ticker : typing.Optional[str]
|
|
381
|
+
[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker). Example: BTC
|
|
382
|
+
|
|
383
|
+
request_options : typing.Optional[RequestOptions]
|
|
384
|
+
Request-specific configuration.
|
|
385
|
+
|
|
386
|
+
Returns
|
|
387
|
+
-------
|
|
388
|
+
typing.List[FixedPlan]
|
|
389
|
+
Successful response
|
|
390
|
+
|
|
391
|
+
Examples
|
|
392
|
+
--------
|
|
393
|
+
from whitebit import AsyncWhitebitApi
|
|
394
|
+
import asyncio
|
|
395
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
396
|
+
async def main() -> None:
|
|
397
|
+
await client.crypto_lending_fixed.get_fixed_plans(ticker='USDT', request='{{request}}', nonce='{{nonce}}', )
|
|
398
|
+
asyncio.run(main())
|
|
399
|
+
"""
|
|
400
|
+
_response = await self._raw_client.get_fixed_plans(
|
|
401
|
+
request=request, nonce=nonce, ticker=ticker, request_options=request_options
|
|
402
|
+
)
|
|
403
|
+
return _response.data
|
|
404
|
+
|
|
405
|
+
async def create_fixed_investment(
|
|
406
|
+
self,
|
|
407
|
+
*,
|
|
408
|
+
plan_id: str,
|
|
409
|
+
amount: str,
|
|
410
|
+
request: str,
|
|
411
|
+
nonce: str,
|
|
412
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
413
|
+
) -> CreateFixedInvestmentResponse:
|
|
414
|
+
"""
|
|
415
|
+
The endpoint creates a new investment to the specified [invest plan](/glossary#crypto-lending).
|
|
416
|
+
|
|
417
|
+
<Warning>
|
|
418
|
+
Rate limit: 1000 requests/10 sec.
|
|
419
|
+
</Warning>
|
|
420
|
+
|
|
421
|
+
<Note>
|
|
422
|
+
The API does not cache the response.
|
|
423
|
+
</Note>
|
|
424
|
+
|
|
425
|
+
Parameters
|
|
426
|
+
----------
|
|
427
|
+
plan_id : str
|
|
428
|
+
[Invest plan](/glossary#crypto-lending) identifier
|
|
429
|
+
|
|
430
|
+
amount : str
|
|
431
|
+
Investment amount
|
|
432
|
+
|
|
433
|
+
request : str
|
|
434
|
+
Request signature
|
|
435
|
+
|
|
436
|
+
nonce : str
|
|
437
|
+
Unique request identifier
|
|
438
|
+
|
|
439
|
+
request_options : typing.Optional[RequestOptions]
|
|
440
|
+
Request-specific configuration.
|
|
441
|
+
|
|
442
|
+
Returns
|
|
443
|
+
-------
|
|
444
|
+
CreateFixedInvestmentResponse
|
|
445
|
+
Investment created successfully
|
|
446
|
+
|
|
447
|
+
Examples
|
|
448
|
+
--------
|
|
449
|
+
from whitebit import AsyncWhitebitApi
|
|
450
|
+
import asyncio
|
|
451
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
452
|
+
async def main() -> None:
|
|
453
|
+
await client.crypto_lending_fixed.create_fixed_investment(plan_id='8e667b4a-0b71-4988-8af5-9474dbfaeb51', amount='100', request='{{request}}', nonce='{{nonce}}', )
|
|
454
|
+
asyncio.run(main())
|
|
455
|
+
"""
|
|
456
|
+
_response = await self._raw_client.create_fixed_investment(
|
|
457
|
+
plan_id=plan_id, amount=amount, request=request, nonce=nonce, request_options=request_options
|
|
458
|
+
)
|
|
459
|
+
return _response.data
|
|
460
|
+
|
|
461
|
+
async def close_fixed_investment(
|
|
462
|
+
self, *, id: str, request: str, nonce: str, request_options: typing.Optional[RequestOptions] = None
|
|
463
|
+
) -> typing.Dict[str, typing.Optional[typing.Any]]:
|
|
464
|
+
"""
|
|
465
|
+
The endpoint closes active investment.
|
|
466
|
+
|
|
467
|
+
<Warning>
|
|
468
|
+
Rate limit: 1000 requests/10 sec.
|
|
469
|
+
</Warning>
|
|
470
|
+
|
|
471
|
+
<Note>
|
|
472
|
+
The API does not cache the response.
|
|
473
|
+
</Note>
|
|
474
|
+
|
|
475
|
+
Parameters
|
|
476
|
+
----------
|
|
477
|
+
id : str
|
|
478
|
+
Investment identifier
|
|
479
|
+
|
|
480
|
+
request : str
|
|
481
|
+
Request signature
|
|
482
|
+
|
|
483
|
+
nonce : str
|
|
484
|
+
Unique request identifier
|
|
485
|
+
|
|
486
|
+
request_options : typing.Optional[RequestOptions]
|
|
487
|
+
Request-specific configuration.
|
|
488
|
+
|
|
489
|
+
Returns
|
|
490
|
+
-------
|
|
491
|
+
typing.Dict[str, typing.Optional[typing.Any]]
|
|
492
|
+
Investment closed successfully
|
|
493
|
+
|
|
494
|
+
Examples
|
|
495
|
+
--------
|
|
496
|
+
from whitebit import AsyncWhitebitApi
|
|
497
|
+
import asyncio
|
|
498
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
499
|
+
async def main() -> None:
|
|
500
|
+
await client.crypto_lending_fixed.close_fixed_investment(id='0d7b66ff-1909-4938-ab7a-d16d9a64dcd5', request='{{request}}', nonce='{{nonce}}', )
|
|
501
|
+
asyncio.run(main())
|
|
502
|
+
"""
|
|
503
|
+
_response = await self._raw_client.close_fixed_investment(
|
|
504
|
+
id=id, request=request, nonce=nonce, request_options=request_options
|
|
505
|
+
)
|
|
506
|
+
return _response.data
|
|
507
|
+
|
|
508
|
+
async def get_fixed_investments_history(
|
|
509
|
+
self,
|
|
510
|
+
*,
|
|
511
|
+
request: str,
|
|
512
|
+
nonce: str,
|
|
513
|
+
id: typing.Optional[str] = OMIT,
|
|
514
|
+
ticker: typing.Optional[str] = OMIT,
|
|
515
|
+
status: typing.Optional[int] = OMIT,
|
|
516
|
+
limit: typing.Optional[int] = OMIT,
|
|
517
|
+
offset: typing.Optional[int] = OMIT,
|
|
518
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
519
|
+
) -> GetFixedInvestmentsHistoryResponse:
|
|
520
|
+
"""
|
|
521
|
+
The endpoint retrieves an investments history.
|
|
522
|
+
|
|
523
|
+
<Warning>
|
|
524
|
+
Rate limit: 1000 requests/10 sec.
|
|
525
|
+
</Warning>
|
|
526
|
+
|
|
527
|
+
<Note>
|
|
528
|
+
The API does not cache the response.
|
|
529
|
+
</Note>
|
|
530
|
+
|
|
531
|
+
Parameters
|
|
532
|
+
----------
|
|
533
|
+
request : str
|
|
534
|
+
Request signature
|
|
535
|
+
|
|
536
|
+
nonce : str
|
|
537
|
+
Unique request identifier
|
|
538
|
+
|
|
539
|
+
id : typing.Optional[str]
|
|
540
|
+
Investment identifier
|
|
541
|
+
|
|
542
|
+
ticker : typing.Optional[str]
|
|
543
|
+
[Invest plan](/glossary#crypto-lending) source currency's [ticker](/glossary#ticker)
|
|
544
|
+
|
|
545
|
+
status : typing.Optional[int]
|
|
546
|
+
Investment status (1 - active, 2 - closed)
|
|
547
|
+
|
|
548
|
+
limit : typing.Optional[int]
|
|
549
|
+
LIMIT is a special clause used to limit records a particular query can return.
|
|
550
|
+
|
|
551
|
+
offset : typing.Optional[int]
|
|
552
|
+
Use the OFFSET clause to return entries starting from a particular line.
|
|
553
|
+
|
|
554
|
+
request_options : typing.Optional[RequestOptions]
|
|
555
|
+
Request-specific configuration.
|
|
556
|
+
|
|
557
|
+
Returns
|
|
558
|
+
-------
|
|
559
|
+
GetFixedInvestmentsHistoryResponse
|
|
560
|
+
Successful response
|
|
561
|
+
|
|
562
|
+
Examples
|
|
563
|
+
--------
|
|
564
|
+
from whitebit import AsyncWhitebitApi
|
|
565
|
+
import asyncio
|
|
566
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
567
|
+
async def main() -> None:
|
|
568
|
+
await client.crypto_lending_fixed.get_fixed_investments_history(id='0d7b66ff-1909-4938-ab7a-d16d9a64dcd5', ticker='USDT', status=1, request='{{request}}', nonce='{{nonce}}', )
|
|
569
|
+
asyncio.run(main())
|
|
570
|
+
"""
|
|
571
|
+
_response = await self._raw_client.get_fixed_investments_history(
|
|
572
|
+
request=request,
|
|
573
|
+
nonce=nonce,
|
|
574
|
+
id=id,
|
|
575
|
+
ticker=ticker,
|
|
576
|
+
status=status,
|
|
577
|
+
limit=limit,
|
|
578
|
+
offset=offset,
|
|
579
|
+
request_options=request_options,
|
|
580
|
+
)
|
|
581
|
+
return _response.data
|
|
582
|
+
|
|
583
|
+
async def get_interest_payment_history(
|
|
584
|
+
self,
|
|
585
|
+
*,
|
|
586
|
+
request: str,
|
|
587
|
+
nonce: str,
|
|
588
|
+
plan_id: typing.Optional[str] = OMIT,
|
|
589
|
+
ticker: typing.Optional[str] = OMIT,
|
|
590
|
+
limit: typing.Optional[int] = OMIT,
|
|
591
|
+
offset: typing.Optional[int] = OMIT,
|
|
592
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
593
|
+
) -> GetInterestPaymentHistoryResponse:
|
|
594
|
+
"""
|
|
595
|
+
The endpoint retrieves the history of interest payments.
|
|
596
|
+
|
|
597
|
+
<Warning>
|
|
598
|
+
Rate limit: 1000 requests/10 sec.
|
|
599
|
+
</Warning>
|
|
600
|
+
|
|
601
|
+
<Note>
|
|
602
|
+
The API does not cache the response.
|
|
603
|
+
</Note>
|
|
604
|
+
|
|
605
|
+
Parameters
|
|
606
|
+
----------
|
|
607
|
+
request : str
|
|
608
|
+
Request signature
|
|
609
|
+
|
|
610
|
+
nonce : str
|
|
611
|
+
Unique request identifier
|
|
612
|
+
|
|
613
|
+
plan_id : typing.Optional[str]
|
|
614
|
+
[Invest plan](/glossary#crypto-lending) identifier
|
|
615
|
+
|
|
616
|
+
ticker : typing.Optional[str]
|
|
617
|
+
[Invest plan](/glossary#crypto-lending) target currency's [ticker](/glossary#ticker)
|
|
618
|
+
|
|
619
|
+
limit : typing.Optional[int]
|
|
620
|
+
LIMIT is a special clause used to limit records a particular query can return.
|
|
621
|
+
|
|
622
|
+
offset : typing.Optional[int]
|
|
623
|
+
Use the OFFSET clause to return entries starting from a particular line.
|
|
624
|
+
|
|
625
|
+
request_options : typing.Optional[RequestOptions]
|
|
626
|
+
Request-specific configuration.
|
|
627
|
+
|
|
628
|
+
Returns
|
|
629
|
+
-------
|
|
630
|
+
GetInterestPaymentHistoryResponse
|
|
631
|
+
Successful response
|
|
632
|
+
|
|
633
|
+
Examples
|
|
634
|
+
--------
|
|
635
|
+
from whitebit import AsyncWhitebitApi
|
|
636
|
+
import asyncio
|
|
637
|
+
client = AsyncWhitebitApi(api_key="YOUR_API_KEY", )
|
|
638
|
+
async def main() -> None:
|
|
639
|
+
await client.crypto_lending_fixed.get_interest_payment_history(plan_id='8e667b4a-0b71-4988-8af5-9474dbfaeb51', ticker='USDT', request='{{request}}', nonce='{{nonce}}', )
|
|
640
|
+
asyncio.run(main())
|
|
641
|
+
"""
|
|
642
|
+
_response = await self._raw_client.get_interest_payment_history(
|
|
643
|
+
request=request,
|
|
644
|
+
nonce=nonce,
|
|
645
|
+
plan_id=plan_id,
|
|
646
|
+
ticker=ticker,
|
|
647
|
+
limit=limit,
|
|
648
|
+
offset=offset,
|
|
649
|
+
request_options=request_options,
|
|
650
|
+
)
|
|
651
|
+
return _response.data
|