binance-sdk-derivatives-trading-portfolio-margin 1.0.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.
Potentially problematic release.
This version of binance-sdk-derivatives-trading-portfolio-margin might be problematic. Click here for more details.
- CHANGELOG.md +5 -0
- README.md +293 -0
- binance_sdk_derivatives_trading_portfolio_margin/__init__.py +39 -0
- binance_sdk_derivatives_trading_portfolio_margin/derivatives_trading_portfolio_margin.py +68 -0
- binance_sdk_derivatives_trading_portfolio_margin/metadata.py +1 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/__init__.py +13 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/api/__init__.py +14 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/api/account_api.py +2096 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/api/market_data_api.py +62 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/api/trade_api.py +3557 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/api/user_data_streams_api.py +132 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/__init__.py +550 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/account_balance_response.py +145 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/account_balance_response1.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/account_balance_response1_inner.py +164 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/account_balance_response2.py +159 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/account_information_response.py +145 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/bnb_transfer_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_all_cm_open_conditional_orders_response.py +103 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_all_cm_open_orders_response.py +103 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_all_um_open_conditional_orders_response.py +103 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_all_um_open_orders_response.py +103 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_cm_conditional_order_response.py +161 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_cm_order_response.py +156 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_all_open_orders_on_a_symbol_response.py +83 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_all_open_orders_on_a_symbol_response_inner.py +215 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_all_open_orders_on_a_symbol_response_inner_order_reports_inner.py +156 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_all_open_orders_on_a_symbol_response_inner_orders_inner.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_oco_orders_response.py +174 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_oco_orders_response_order_reports_inner.py +151 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_oco_orders_response_orders_inner.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_margin_account_order_response.py +145 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_um_conditional_order_response.py +172 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cancel_um_order_response.py +164 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/change_auto_repay_futures_status_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/change_cm_initial_leverage_response.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/change_cm_position_mode_response.py +103 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/change_um_initial_leverage_response.py +112 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/change_um_position_mode_response.py +103 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_account_trade_list_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_account_trade_list_response_inner.py +153 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_notional_and_leverage_brackets_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_notional_and_leverage_brackets_response_inner.py +129 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_notional_and_leverage_brackets_response_inner_brackets_inner.py +125 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_position_adl_quantile_estimation_response.py +83 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_position_adl_quantile_estimation_response_inner.py +122 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/cm_position_adl_quantile_estimation_response_inner_adl_quantile.py +112 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/enums.py +278 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/fund_auto_collection_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/fund_collection_by_asset_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_auto_repay_futures_status_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_cm_account_detail_response.py +142 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_cm_account_detail_response_assets_inner.py +135 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_cm_account_detail_response_positions_inner.py +147 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_cm_current_position_mode_response.py +104 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_cm_income_history_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_cm_income_history_response_inner.py +129 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_download_id_for_um_futures_order_history_response.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_download_id_for_um_futures_trade_history_response.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_download_id_for_um_futures_transaction_history_response.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_margin_borrow_loan_interest_history_response.py +127 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_margin_borrow_loan_interest_history_response_rows_inner.py +131 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_response.py +142 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_response_positions_inner.py +153 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_v2_response.py +142 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_v2_response_assets_inner.py +135 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_account_detail_v2_response_positions_inner.py +131 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_current_position_mode_response.py +104 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_bnb_burn_status_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_order_download_link_by_id_response.py +128 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_trade_download_link_by_id_response.py +128 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_futures_transaction_download_link_by_id_response.py +128 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_income_history_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_um_income_history_response_inner.py +129 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_user_commission_rate_for_cm_response.py +118 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/get_user_commission_rate_for_um_response.py +118 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_borrow_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_new_oco_response.py +182 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_new_oco_response_order_reports_inner.py +149 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_new_oco_response_orders_inner.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_repay_debt_response.py +122 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_repay_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_trade_list_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_account_trade_list_response_inner.py +138 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/margin_max_borrow_response.py +105 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/modify_cm_order_response.py +159 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/modify_um_order_response.py +167 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/new_cm_conditional_order_response.py +164 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/new_cm_order_response.py +156 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/new_margin_order_response.py +173 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/new_margin_order_response_fills_inner.py +117 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/new_um_conditional_order_response.py +172 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/new_um_order_response.py +164 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response.py +122 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response_indicators.py +154 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response_indicators_account_inner.py +124 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/portfolio_margin_um_trading_quantitative_rules_indicators_response_indicators_btcusdt_inner.py +134 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_cm_conditional_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_cm_conditional_orders_response_inner.py +167 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_cm_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_cm_orders_response_inner.py +159 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_current_cm_open_conditional_orders_response.py +83 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_current_cm_open_conditional_orders_response_inner.py +155 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_current_cm_open_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_current_um_open_conditional_orders_response.py +83 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_current_um_open_conditional_orders_response_inner.py +166 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_current_um_open_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_current_um_open_orders_response_inner.py +167 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_margin_account_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_margin_account_orders_response_inner.py +173 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_um_conditional_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_um_conditional_orders_response_inner.py +178 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_all_um_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_conditional_order_history_response.py +176 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner.py +138 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner_amendment.py +136 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner_amendment_orig_qty.py +105 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_modify_order_history_response_inner_amendment_price.py +105 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_order_response.py +159 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_position_information_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_cm_position_information_response_inner.py +142 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_current_cm_open_conditional_order_response.py +155 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_current_cm_open_order_response.py +159 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_current_margin_open_order_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_current_margin_open_order_response_inner.py +173 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_current_um_open_conditional_order_response.py +166 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_current_um_open_order_response.py +167 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_account_order_response.py +173 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_all_oco_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_all_oco_response_inner.py +152 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_all_oco_response_inner_orders_inner.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_oco_response.py +150 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_oco_response_orders_inner.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_open_oco_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_open_oco_response_inner.py +152 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_accounts_open_oco_response_inner_orders_inner.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_loan_record_response.py +125 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_loan_record_response_rows_inner.py +120 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_max_withdraw_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_repay_record_response.py +125 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_margin_repay_record_response_rows_inner.py +126 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_portfolio_margin_negative_balance_interest_history_response.py +83 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_portfolio_margin_negative_balance_interest_history_response_inner.py +122 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_um_conditional_order_history_response.py +181 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_um_modify_order_history_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_um_modify_order_history_response_inner.py +141 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_um_order_response.py +167 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_um_position_information_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_um_position_information_response_inner.py +144 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_user_negative_balance_auto_exchange_record_response.py +129 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_user_negative_balance_auto_exchange_record_response_rows_inner.py +131 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_user_negative_balance_auto_exchange_record_response_rows_inner_details_inner.py +120 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_user_rate_limit_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_user_rate_limit_response_inner.py +117 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_users_cm_force_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_users_cm_force_orders_response_inner.py +159 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_users_margin_force_orders_response.py +125 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_users_margin_force_orders_response_rows_inner.py +132 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_users_um_force_orders_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/query_users_um_force_orders_response_inner.py +156 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/repay_futures_negative_balance_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/start_user_data_stream_response.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/toggle_bnb_burn_on_um_futures_trade_response.py +103 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_account_trade_list_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_account_trade_list_response_inner.py +147 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_futures_account_configuration_response.py +133 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_futures_symbol_configuration_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_futures_symbol_configuration_response_inner.py +124 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_notional_and_leverage_brackets_response.py +81 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_notional_and_leverage_brackets_response_inner.py +131 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_notional_and_leverage_brackets_response_inner_brackets_inner.py +125 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_position_adl_quantile_estimation_response.py +83 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/models/um_position_adl_quantile_estimation_response_inner.py +122 -0
- binance_sdk_derivatives_trading_portfolio_margin/rest_api/rest_api.py +3837 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/__init__.py +13 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/__init__.py +38 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/account_config_update.py +118 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/account_config_update_ac.py +99 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/account_update.py +120 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/account_update_a.py +134 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/account_update_ab_inner.py +108 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/account_update_ap_inner.py +114 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/balanceupdate.py +110 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/conditional_order_trade_update.py +118 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/conditional_order_trade_update_so.py +164 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/enums.py +9 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/executionreport.py +227 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/liabilitychange.py +114 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/listenkeyexpired.py +98 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/openorderloss.py +118 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/openorderloss_o_inner.py +99 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/order_trade_update.py +120 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/order_trade_update_o.py +188 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/outboundaccountposition.py +125 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/outboundaccountposition_b_inner.py +102 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/risklevelchange.py +112 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/user_data_stream_events_response.py +386 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/streams/__init__.py +9 -0
- binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/websocket_streams.py +105 -0
- binance_sdk_derivatives_trading_portfolio_margin-1.0.0.dist-info/LICENCE +21 -0
- binance_sdk_derivatives_trading_portfolio_margin-1.0.0.dist-info/METADATA +321 -0
- binance_sdk_derivatives_trading_portfolio_margin-1.0.0.dist-info/RECORD +204 -0
- binance_sdk_derivatives_trading_portfolio_margin-1.0.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
5
|
+
|
|
6
|
+
OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
7
|
+
The version of the OpenAPI document: 1.0.0
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from typing import Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Executionreport(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Executionreport
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
e: Optional[StrictInt] = Field(default=None, alias="E")
|
|
31
|
+
s: Optional[StrictStr] = None
|
|
32
|
+
c: Optional[StrictStr] = None
|
|
33
|
+
s: Optional[StrictStr] = Field(default=None, alias="S")
|
|
34
|
+
o: Optional[StrictStr] = None
|
|
35
|
+
f: Optional[StrictStr] = None
|
|
36
|
+
q: Optional[StrictStr] = None
|
|
37
|
+
p: Optional[StrictStr] = None
|
|
38
|
+
p: Optional[StrictStr] = Field(default=None, alias="P")
|
|
39
|
+
d: Optional[StrictInt] = None
|
|
40
|
+
f: Optional[StrictStr] = Field(default=None, alias="F")
|
|
41
|
+
g: Optional[StrictInt] = None
|
|
42
|
+
c: Optional[StrictStr] = Field(default=None, alias="C")
|
|
43
|
+
x: Optional[StrictStr] = None
|
|
44
|
+
x: Optional[StrictStr] = Field(default=None, alias="X")
|
|
45
|
+
r: Optional[StrictStr] = None
|
|
46
|
+
i: Optional[StrictInt] = None
|
|
47
|
+
l: Optional[StrictStr] = None
|
|
48
|
+
z: Optional[StrictStr] = None
|
|
49
|
+
l: Optional[StrictStr] = Field(default=None, alias="L")
|
|
50
|
+
n: Optional[StrictStr] = None
|
|
51
|
+
n: Optional[StrictStr] = Field(default=None, alias="N")
|
|
52
|
+
t: Optional[StrictInt] = Field(default=None, alias="T")
|
|
53
|
+
t: Optional[StrictInt] = None
|
|
54
|
+
v: Optional[StrictInt] = None
|
|
55
|
+
i: Optional[StrictInt] = Field(default=None, alias="I")
|
|
56
|
+
w: Optional[StrictBool] = None
|
|
57
|
+
m: Optional[StrictBool] = None
|
|
58
|
+
m: Optional[StrictBool] = Field(default=None, alias="M")
|
|
59
|
+
o: Optional[StrictInt] = Field(default=None, alias="O")
|
|
60
|
+
z: Optional[StrictStr] = Field(default=None, alias="Z")
|
|
61
|
+
y: Optional[StrictStr] = Field(default=None, alias="Y")
|
|
62
|
+
q: Optional[StrictStr] = Field(default=None, alias="Q")
|
|
63
|
+
d: Optional[StrictInt] = Field(default=None, alias="D")
|
|
64
|
+
j: Optional[StrictInt] = None
|
|
65
|
+
j: Optional[StrictInt] = Field(default=None, alias="J")
|
|
66
|
+
w: Optional[StrictInt] = Field(default=None, alias="W")
|
|
67
|
+
v: Optional[StrictStr] = Field(default=None, alias="V")
|
|
68
|
+
u: Optional[StrictInt] = None
|
|
69
|
+
u: Optional[StrictInt] = Field(default=None, alias="U")
|
|
70
|
+
a: Optional[StrictStr] = Field(default=None, alias="A")
|
|
71
|
+
b: Optional[StrictStr] = Field(default=None, alias="B")
|
|
72
|
+
additional_properties: Dict[str, Any] = {}
|
|
73
|
+
__properties: ClassVar[List[str]] = [
|
|
74
|
+
"E",
|
|
75
|
+
"s",
|
|
76
|
+
"c",
|
|
77
|
+
"S",
|
|
78
|
+
"o",
|
|
79
|
+
"f",
|
|
80
|
+
"q",
|
|
81
|
+
"p",
|
|
82
|
+
"P",
|
|
83
|
+
"d",
|
|
84
|
+
"F",
|
|
85
|
+
"g",
|
|
86
|
+
"C",
|
|
87
|
+
"x",
|
|
88
|
+
"X",
|
|
89
|
+
"r",
|
|
90
|
+
"i",
|
|
91
|
+
"l",
|
|
92
|
+
"z",
|
|
93
|
+
"L",
|
|
94
|
+
"n",
|
|
95
|
+
"N",
|
|
96
|
+
"T",
|
|
97
|
+
"t",
|
|
98
|
+
"v",
|
|
99
|
+
"I",
|
|
100
|
+
"w",
|
|
101
|
+
"m",
|
|
102
|
+
"M",
|
|
103
|
+
"O",
|
|
104
|
+
"Z",
|
|
105
|
+
"Y",
|
|
106
|
+
"Q",
|
|
107
|
+
"D",
|
|
108
|
+
"j",
|
|
109
|
+
"J",
|
|
110
|
+
"W",
|
|
111
|
+
"V",
|
|
112
|
+
"u",
|
|
113
|
+
"U",
|
|
114
|
+
"A",
|
|
115
|
+
"B",
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
model_config = ConfigDict(
|
|
119
|
+
populate_by_name=True,
|
|
120
|
+
validate_assignment=True,
|
|
121
|
+
protected_namespaces=(),
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
def to_str(self) -> str:
|
|
125
|
+
"""Returns the string representation of the model using alias"""
|
|
126
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
127
|
+
|
|
128
|
+
def to_json(self) -> str:
|
|
129
|
+
"""Returns the JSON representation of the model using alias"""
|
|
130
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
131
|
+
return json.dumps(self.to_dict())
|
|
132
|
+
|
|
133
|
+
@classmethod
|
|
134
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
135
|
+
"""Create an instance of Executionreport from a JSON string"""
|
|
136
|
+
return cls.from_dict(json.loads(json_str))
|
|
137
|
+
|
|
138
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
139
|
+
"""Return the dictionary representation of the model using alias.
|
|
140
|
+
|
|
141
|
+
This has the following differences from calling pydantic's
|
|
142
|
+
`self.model_dump(by_alias=True)`:
|
|
143
|
+
|
|
144
|
+
* `None` is only added to the output dict for nullable fields that
|
|
145
|
+
were set at model initialization. Other fields with value `None`
|
|
146
|
+
are ignored.
|
|
147
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
148
|
+
"""
|
|
149
|
+
excluded_fields: Set[str] = set(
|
|
150
|
+
[
|
|
151
|
+
"additional_properties",
|
|
152
|
+
]
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
_dict = self.model_dump(
|
|
156
|
+
by_alias=True,
|
|
157
|
+
exclude=excluded_fields,
|
|
158
|
+
exclude_none=True,
|
|
159
|
+
)
|
|
160
|
+
# puts key-value pairs in additional_properties in the top level
|
|
161
|
+
if self.additional_properties is not None:
|
|
162
|
+
for _key, _value in self.additional_properties.items():
|
|
163
|
+
_dict[_key] = _value
|
|
164
|
+
|
|
165
|
+
return _dict
|
|
166
|
+
|
|
167
|
+
@classmethod
|
|
168
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
169
|
+
"""Create an instance of Executionreport from a dict"""
|
|
170
|
+
if obj is None:
|
|
171
|
+
return None
|
|
172
|
+
|
|
173
|
+
if not isinstance(obj, dict):
|
|
174
|
+
return cls.model_validate(obj)
|
|
175
|
+
|
|
176
|
+
_obj = cls.model_validate(
|
|
177
|
+
{
|
|
178
|
+
"E": obj.get("E"),
|
|
179
|
+
"s": obj.get("s"),
|
|
180
|
+
"c": obj.get("c"),
|
|
181
|
+
"S": obj.get("S"),
|
|
182
|
+
"o": obj.get("o"),
|
|
183
|
+
"f": obj.get("f"),
|
|
184
|
+
"q": obj.get("q"),
|
|
185
|
+
"p": obj.get("p"),
|
|
186
|
+
"P": obj.get("P"),
|
|
187
|
+
"d": obj.get("d"),
|
|
188
|
+
"F": obj.get("F"),
|
|
189
|
+
"g": obj.get("g"),
|
|
190
|
+
"C": obj.get("C"),
|
|
191
|
+
"x": obj.get("x"),
|
|
192
|
+
"X": obj.get("X"),
|
|
193
|
+
"r": obj.get("r"),
|
|
194
|
+
"i": obj.get("i"),
|
|
195
|
+
"l": obj.get("l"),
|
|
196
|
+
"z": obj.get("z"),
|
|
197
|
+
"L": obj.get("L"),
|
|
198
|
+
"n": obj.get("n"),
|
|
199
|
+
"N": obj.get("N"),
|
|
200
|
+
"T": obj.get("T"),
|
|
201
|
+
"t": obj.get("t"),
|
|
202
|
+
"v": obj.get("v"),
|
|
203
|
+
"I": obj.get("I"),
|
|
204
|
+
"w": obj.get("w"),
|
|
205
|
+
"m": obj.get("m"),
|
|
206
|
+
"M": obj.get("M"),
|
|
207
|
+
"O": obj.get("O"),
|
|
208
|
+
"Z": obj.get("Z"),
|
|
209
|
+
"Y": obj.get("Y"),
|
|
210
|
+
"Q": obj.get("Q"),
|
|
211
|
+
"D": obj.get("D"),
|
|
212
|
+
"j": obj.get("j"),
|
|
213
|
+
"J": obj.get("J"),
|
|
214
|
+
"W": obj.get("W"),
|
|
215
|
+
"V": obj.get("V"),
|
|
216
|
+
"u": obj.get("u"),
|
|
217
|
+
"U": obj.get("U"),
|
|
218
|
+
"A": obj.get("A"),
|
|
219
|
+
"B": obj.get("B"),
|
|
220
|
+
}
|
|
221
|
+
)
|
|
222
|
+
# store additional fields in additional_properties
|
|
223
|
+
for _key in obj.keys():
|
|
224
|
+
if _key not in cls.__properties:
|
|
225
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
226
|
+
|
|
227
|
+
return _obj
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
5
|
+
|
|
6
|
+
OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
7
|
+
The version of the OpenAPI document: 1.0.0
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from typing import Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Liabilitychange(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Liabilitychange
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
e: Optional[StrictInt] = Field(default=None, alias="E")
|
|
31
|
+
a: Optional[StrictStr] = None
|
|
32
|
+
t: Optional[StrictStr] = None
|
|
33
|
+
t: Optional[StrictInt] = Field(default=None, alias="T")
|
|
34
|
+
p: Optional[StrictStr] = None
|
|
35
|
+
i: Optional[StrictStr] = None
|
|
36
|
+
l: Optional[StrictStr] = None
|
|
37
|
+
additional_properties: Dict[str, Any] = {}
|
|
38
|
+
__properties: ClassVar[List[str]] = ["E", "a", "t", "T", "p", "i", "l"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of Liabilitychange from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set(
|
|
72
|
+
[
|
|
73
|
+
"additional_properties",
|
|
74
|
+
]
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
_dict = self.model_dump(
|
|
78
|
+
by_alias=True,
|
|
79
|
+
exclude=excluded_fields,
|
|
80
|
+
exclude_none=True,
|
|
81
|
+
)
|
|
82
|
+
# puts key-value pairs in additional_properties in the top level
|
|
83
|
+
if self.additional_properties is not None:
|
|
84
|
+
for _key, _value in self.additional_properties.items():
|
|
85
|
+
_dict[_key] = _value
|
|
86
|
+
|
|
87
|
+
return _dict
|
|
88
|
+
|
|
89
|
+
@classmethod
|
|
90
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
+
"""Create an instance of Liabilitychange from a dict"""
|
|
92
|
+
if obj is None:
|
|
93
|
+
return None
|
|
94
|
+
|
|
95
|
+
if not isinstance(obj, dict):
|
|
96
|
+
return cls.model_validate(obj)
|
|
97
|
+
|
|
98
|
+
_obj = cls.model_validate(
|
|
99
|
+
{
|
|
100
|
+
"E": obj.get("E"),
|
|
101
|
+
"a": obj.get("a"),
|
|
102
|
+
"t": obj.get("t"),
|
|
103
|
+
"T": obj.get("T"),
|
|
104
|
+
"p": obj.get("p"),
|
|
105
|
+
"i": obj.get("i"),
|
|
106
|
+
"l": obj.get("l"),
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
# store additional fields in additional_properties
|
|
110
|
+
for _key in obj.keys():
|
|
111
|
+
if _key not in cls.__properties:
|
|
112
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
113
|
+
|
|
114
|
+
return _obj
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
5
|
+
|
|
6
|
+
OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
7
|
+
The version of the OpenAPI document: 1.0.0
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from typing import Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class Listenkeyexpired(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Listenkeyexpired
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
e: Optional[StrictInt] = Field(default=None, alias="E")
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["E"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of Listenkeyexpired from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set(
|
|
66
|
+
[
|
|
67
|
+
"additional_properties",
|
|
68
|
+
]
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
|
77
|
+
if self.additional_properties is not None:
|
|
78
|
+
for _key, _value in self.additional_properties.items():
|
|
79
|
+
_dict[_key] = _value
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of Listenkeyexpired from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({"E": obj.get("E")})
|
|
93
|
+
# store additional fields in additional_properties
|
|
94
|
+
for _key in obj.keys():
|
|
95
|
+
if _key not in cls.__properties:
|
|
96
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
97
|
+
|
|
98
|
+
return _obj
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
5
|
+
|
|
6
|
+
OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
7
|
+
The version of the OpenAPI document: 1.0.0
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from binance_sdk_derivatives_trading_portfolio_margin.websocket_streams.models.openorderloss_o_inner import (
|
|
22
|
+
OpenorderlossOInner,
|
|
23
|
+
)
|
|
24
|
+
from typing import Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Openorderloss(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
Openorderloss
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
|
|
33
|
+
e: Optional[StrictInt] = Field(default=None, alias="E")
|
|
34
|
+
o: Optional[List[OpenorderlossOInner]] = Field(default=None, alias="O")
|
|
35
|
+
additional_properties: Dict[str, Any] = {}
|
|
36
|
+
__properties: ClassVar[List[str]] = ["E", "O"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of Openorderloss from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set(
|
|
70
|
+
[
|
|
71
|
+
"additional_properties",
|
|
72
|
+
]
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of each item in o (list)
|
|
81
|
+
_items = []
|
|
82
|
+
if self.o:
|
|
83
|
+
for _item_o in self.o:
|
|
84
|
+
if _item_o:
|
|
85
|
+
_items.append(_item_o.to_dict())
|
|
86
|
+
_dict["O"] = _items
|
|
87
|
+
# puts key-value pairs in additional_properties in the top level
|
|
88
|
+
if self.additional_properties is not None:
|
|
89
|
+
for _key, _value in self.additional_properties.items():
|
|
90
|
+
_dict[_key] = _value
|
|
91
|
+
|
|
92
|
+
return _dict
|
|
93
|
+
|
|
94
|
+
@classmethod
|
|
95
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
96
|
+
"""Create an instance of Openorderloss from a dict"""
|
|
97
|
+
if obj is None:
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
if not isinstance(obj, dict):
|
|
101
|
+
return cls.model_validate(obj)
|
|
102
|
+
|
|
103
|
+
_obj = cls.model_validate(
|
|
104
|
+
{
|
|
105
|
+
"E": obj.get("E"),
|
|
106
|
+
"O": (
|
|
107
|
+
[OpenorderlossOInner.from_dict(_item) for _item in obj["O"]]
|
|
108
|
+
if obj.get("O") is not None
|
|
109
|
+
else None
|
|
110
|
+
),
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
# store additional fields in additional_properties
|
|
114
|
+
for _key in obj.keys():
|
|
115
|
+
if _key not in cls.__properties:
|
|
116
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
117
|
+
|
|
118
|
+
return _obj
|
binance_sdk_derivatives_trading_portfolio_margin/websocket_streams/models/openorderloss_o_inner.py
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
5
|
+
|
|
6
|
+
OpenAPI Specification for the Binance Derivatives Trading Portfolio Margin WebSocket Market Streams
|
|
7
|
+
The version of the OpenAPI document: 1.0.0
|
|
8
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
+
|
|
10
|
+
Do not edit the class manually.
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
import pprint
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
import json
|
|
18
|
+
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
20
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
+
from typing import Set
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class OpenorderlossOInner(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
OpenorderlossOInner
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
a: Optional[StrictStr] = None
|
|
31
|
+
o: Optional[StrictStr] = None
|
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
|
33
|
+
__properties: ClassVar[List[str]] = ["a", "o"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of OpenorderlossOInner from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set(
|
|
67
|
+
[
|
|
68
|
+
"additional_properties",
|
|
69
|
+
]
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
# puts key-value pairs in additional_properties in the top level
|
|
78
|
+
if self.additional_properties is not None:
|
|
79
|
+
for _key, _value in self.additional_properties.items():
|
|
80
|
+
_dict[_key] = _value
|
|
81
|
+
|
|
82
|
+
return _dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
86
|
+
"""Create an instance of OpenorderlossOInner from a dict"""
|
|
87
|
+
if obj is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
if not isinstance(obj, dict):
|
|
91
|
+
return cls.model_validate(obj)
|
|
92
|
+
|
|
93
|
+
_obj = cls.model_validate({"a": obj.get("a"), "o": obj.get("o")})
|
|
94
|
+
# store additional fields in additional_properties
|
|
95
|
+
for _key in obj.keys():
|
|
96
|
+
if _key not in cls.__properties:
|
|
97
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
98
|
+
|
|
99
|
+
return _obj
|