"""
Binance Derivatives Trading USDS Futures REST API

OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API
The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
"""

import requests
from typing import Optional, List, TypeVar, Union
from binance_common.configuration import ConfigurationRestAPI
from binance_common.models import ApiResponse
from binance_common.signature import Signers
from binance_common.utils import send_request
from .api.account_api import AccountApi
from .api.convert_api import ConvertApi
from .api.market_data_api import MarketDataApi
from .api.portfolio_margin_endpoints_api import PortfolioMarginEndpointsApi
from .api.trade_api import TradeApi
from .api.user_data_streams_api import UserDataStreamsApi

from .models import AccountInformationV2Response
from .models import AccountInformationV3Response
from .models import FuturesAccountBalanceV2Response
from .models import FuturesAccountBalanceV3Response
from .models import FuturesAccountConfigurationResponse
from .models import FuturesTradingQuantitativeRulesIndicatorsResponse
from .models import GetBnbBurnStatusResponse
from .models import GetCurrentMultiAssetsModeResponse
from .models import GetCurrentPositionModeResponse
from .models import GetDownloadIdForFuturesOrderHistoryResponse
from .models import GetDownloadIdForFuturesTradeHistoryResponse
from .models import GetDownloadIdForFuturesTransactionHistoryResponse
from .models import GetFuturesOrderHistoryDownloadLinkByIdResponse
from .models import GetFuturesTradeDownloadLinkByIdResponse
from .models import GetFuturesTransactionHistoryDownloadLinkByIdResponse
from .models import GetIncomeHistoryResponse
from .models import NotionalAndLeverageBracketsResponse
from .models import QueryUserRateLimitResponse
from .models import SymbolConfigurationResponse
from .models import ToggleBnbBurnOnFuturesTradeResponse
from .models import UserCommissionRateResponse
from .models import AcceptTheOfferedQuoteResponse
from .models import ListAllConvertPairsResponse
from .models import OrderStatusResponse
from .models import SendQuoteRequestResponse
from .models import AdlRiskResponse
from .models import BasisResponse
from .models import CheckServerTimeResponse
from .models import CompositeIndexSymbolInformationResponse
from .models import CompressedAggregateTradesListResponse
from .models import ContinuousContractKlineCandlestickDataResponse
from .models import ExchangeInformationResponse
from .models import GetFundingRateHistoryResponse
from .models import GetFundingRateInfoResponse
from .models import IndexPriceKlineCandlestickDataResponse
from .models import KlineCandlestickDataResponse
from .models import LongShortRatioResponse
from .models import MarkPriceResponse
from .models import MarkPriceKlineCandlestickDataResponse
from .models import MultiAssetsModeAssetIndexResponse
from .models import OldTradesLookupResponse
from .models import OpenInterestResponse
from .models import OpenInterestStatisticsResponse
from .models import OrderBookResponse
from .models import PremiumIndexKlineDataResponse
from .models import QuarterlyContractSettlementPriceResponse
from .models import QueryIndexPriceConstituentsResponse
from .models import QueryInsuranceFundBalanceSnapshotResponse
from .models import RecentTradesListResponse
from .models import RpiOrderBookResponse
from .models import SymbolOrderBookTickerResponse
from .models import SymbolPriceTickerResponse
from .models import SymbolPriceTickerV2Response
from .models import TakerBuySellVolumeResponse

from .models import Ticker24hrPriceChangeStatisticsResponse
from .models import TopTraderLongShortRatioAccountsResponse
from .models import TopTraderLongShortRatioPositionsResponse
from .models import TradingScheduleResponse
from .models import ClassicPortfolioMarginAccountInformationResponse
from .models import AccountTradeListResponse
from .models import AllOrdersResponse
from .models import AutoCancelAllOpenOrdersResponse
from .models import CancelAlgoOrderResponse
from .models import CancelAllAlgoOpenOrdersResponse
from .models import CancelAllOpenOrdersResponse
from .models import CancelMultipleOrdersResponse
from .models import CancelOrderResponse
from .models import ChangeInitialLeverageResponse
from .models import ChangeMarginTypeResponse
from .models import ChangeMultiAssetsModeResponse
from .models import ChangePositionModeResponse
from .models import CurrentAllAlgoOpenOrdersResponse
from .models import CurrentAllOpenOrdersResponse
from .models import FuturesTradfiPerpsContractResponse
from .models import GetOrderModifyHistoryResponse
from .models import GetPositionMarginChangeHistoryResponse
from .models import ModifyIsolatedPositionMarginResponse
from .models import ModifyMultipleOrdersResponse
from .models import ModifyOrderResponse
from .models import NewAlgoOrderResponse
from .models import NewOrderResponse
from .models import PlaceMultipleOrdersResponse
from .models import PositionAdlQuantileEstimationResponse
from .models import PositionInformationV2Response
from .models import PositionInformationV3Response
from .models import QueryAlgoOrderResponse
from .models import QueryAllAlgoOrdersResponse
from .models import QueryCurrentOpenOrderResponse
from .models import QueryOrderResponse
from .models import TestOrderResponse
from .models import UsersForceOrdersResponse

from .models import KeepaliveUserDataStreamResponse
from .models import StartUserDataStreamResponse


from .models import BasisContractTypeEnum
from .models import BasisPeriodEnum
from .models import ContinuousContractKlineCandlestickDataContractTypeEnum
from .models import ContinuousContractKlineCandlestickDataIntervalEnum
from .models import IndexPriceKlineCandlestickDataIntervalEnum
from .models import KlineCandlestickDataIntervalEnum
from .models import LongShortRatioPeriodEnum
from .models import MarkPriceKlineCandlestickDataIntervalEnum
from .models import OpenInterestStatisticsPeriodEnum
from .models import PremiumIndexKlineDataIntervalEnum
from .models import TakerBuySellVolumePeriodEnum
from .models import TopTraderLongShortRatioAccountsPeriodEnum
from .models import TopTraderLongShortRatioPositionsPeriodEnum
from .models import ChangeMarginTypeMarginTypeEnum
from .models import ModifyIsolatedPositionMarginPositionSideEnum
from .models import ModifyOrderSideEnum
from .models import ModifyOrderPriceMatchEnum
from .models import NewAlgoOrderSideEnum
from .models import NewAlgoOrderPositionSideEnum
from .models import NewAlgoOrderTimeInForceEnum
from .models import NewAlgoOrderWorkingTypeEnum
from .models import NewAlgoOrderPriceMatchEnum
from .models import NewAlgoOrderSelfTradePreventionModeEnum
from .models import NewOrderSideEnum
from .models import NewOrderPositionSideEnum
from .models import NewOrderTimeInForceEnum
from .models import NewOrderNewOrderRespTypeEnum
from .models import NewOrderPriceMatchEnum
from .models import NewOrderSelfTradePreventionModeEnum
from .models import TestOrderSideEnum
from .models import TestOrderPositionSideEnum
from .models import TestOrderTimeInForceEnum
from .models import TestOrderWorkingTypeEnum
from .models import TestOrderNewOrderRespTypeEnum
from .models import TestOrderPriceMatchEnum
from .models import TestOrderSelfTradePreventionModeEnum
from .models import UsersForceOrdersAutoCloseTypeEnum


from .models import ModifyMultipleOrdersBatchOrdersParameterInner
from .models import PlaceMultipleOrdersBatchOrdersParameterInner

T = TypeVar("T")


class DerivativesTradingUsdsFuturesRestAPI:
    def __init__(
        self,
        configuration: ConfigurationRestAPI,
    ) -> None:
        self.configuration = configuration
        self._session = requests.Session()
        self._signer = (
            Signers.get_signer(
                configuration.private_key, configuration.private_key_passphrase
            )
            if configuration.private_key is not None
            else None
        )

        self._accountApi = AccountApi(self.configuration, self._session, self._signer)
        self._convertApi = ConvertApi(self.configuration, self._session, self._signer)
        self._marketDataApi = MarketDataApi(
            self.configuration, self._session, self._signer
        )
        self._portfolioMarginEndpointsApi = PortfolioMarginEndpointsApi(
            self.configuration, self._session, self._signer
        )
        self._tradeApi = TradeApi(self.configuration, self._session, self._signer)
        self._userDataStreamsApi = UserDataStreamsApi(
            self.configuration, self._session, self._signer
        )

    def send_request(
        self,
        endpoint: str,
        method: str,
        query_params: Optional[dict] = None,
        body_params: Optional[dict] = None,
    ) -> ApiResponse[T]:
        """
        Sends an request to the Binance REST API.

        Args:
            endpoint (str): The API endpoint path to send the request to.
            method (str): The HTTP method to use for the request (e.g. "GET", "POST", "PUT", "DELETE").
            query_params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
            body_params (Optional[dict]): The request body as a dictionary, or None if no body is required.

        Returns:
            ApiResponse[T]: The API response, where T is the expected response type.
        """
        return send_request[T](
            self._session,
            self.configuration,
            method,
            endpoint,
            query_params,
            body_params,
        )

    def send_signed_request(
        self,
        endpoint: str,
        method: str,
        query_params: Optional[dict] = None,
        body_params: Optional[dict] = None,
    ) -> ApiResponse[T]:
        """
        Sends a signed request to the Binance REST API.

        Args:
            endpoint (str): The API endpoint path to send the request to.
            method (str): The HTTP method to use for the request (e.g. "GET", "POST", "PUT", "DELETE").
            query_params (Optional[dict]): The request payload as a dictionary, or None if no payload is required.
            body_params (Optional[dict]): The request body as a dictionary, or None if no body is required.

        Returns:
            ApiResponse[T]: The API response, where T is the expected response type.
        """
        return send_request[T](
            self._session,
            self.configuration,
            method,
            endpoint,
            query_params,
            body_params,
            is_signed=True,
            signer=self._signer,
        )

    def account_information_v2(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[AccountInformationV2Response]:
        """
                Account Information V2(USER_DATA)

                Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.

        Weight: 5

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[AccountInformationV2Response]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.account_information_v2(recv_window)

    def account_information_v3(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[AccountInformationV3Response]:
        """
                Account Information V3(USER_DATA)

                Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.

        Weight: 5

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[AccountInformationV3Response]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.account_information_v3(recv_window)

    def futures_account_balance_v2(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[FuturesAccountBalanceV2Response]:
        """
                Futures Account Balance V2 (USER_DATA)

                Query account balance info

        Weight: 5

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[FuturesAccountBalanceV2Response]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.futures_account_balance_v2(recv_window)

    def futures_account_balance_v3(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[FuturesAccountBalanceV3Response]:
        """
                Futures Account Balance V3 (USER_DATA)

                Query account balance info

        Weight: 5

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[FuturesAccountBalanceV3Response]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.futures_account_balance_v3(recv_window)

    def futures_account_configuration(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[FuturesAccountConfigurationResponse]:
        """
                Futures Account Configuration(USER_DATA)

                Query account configuration

        Weight: 5

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[FuturesAccountConfigurationResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.futures_account_configuration(recv_window)

    def futures_trading_quantitative_rules_indicators(
        self,
        symbol: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[FuturesTradingQuantitativeRulesIndicatorsResponse]:
        """
                Futures Trading Quantitative Rules Indicators (USER_DATA)

                Futures trading quantitative rules indicators, for more information on this, please refer to the [Futures Trading Quantitative Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272)

        Weight: - 1 for a single symbol
        - 10 when the symbol parameter is omitted

                Args:
                    symbol (Optional[str] = None):
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[FuturesTradingQuantitativeRulesIndicatorsResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.futures_trading_quantitative_rules_indicators(
            symbol, recv_window
        )

    def get_bnb_burn_status(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetBnbBurnStatusResponse]:
        """
                Get BNB Burn Status (USER_DATA)

                Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off )

        Weight: 30

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetBnbBurnStatusResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_bnb_burn_status(recv_window)

    def get_current_multi_assets_mode(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetCurrentMultiAssetsModeResponse]:
        """
                Get Current Multi-Assets Mode (USER_DATA)

                Get user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on ***Every symbol***

        Weight: 30

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetCurrentMultiAssetsModeResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_current_multi_assets_mode(recv_window)

    def get_current_position_mode(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetCurrentPositionModeResponse]:
        """
                Get Current Position Mode(USER_DATA)

                Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol***

        Weight: 30

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetCurrentPositionModeResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_current_position_mode(recv_window)

    def get_download_id_for_futures_order_history(
        self,
        start_time: Union[int, None],
        end_time: Union[int, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetDownloadIdForFuturesOrderHistoryResponse]:
        """
                Get Download Id For Futures Order History (USER_DATA)

                Get Download Id For Futures Order History

        * Request Limitation is 10 times per month, shared by front end download page and rest api
        * The time between `startTime` and `endTime` can not be longer than 1 year

        Weight: 1000

                Args:
                    start_time (Union[int, None]): Timestamp in ms
                    end_time (Union[int, None]): Timestamp in ms
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetDownloadIdForFuturesOrderHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_download_id_for_futures_order_history(
            start_time, end_time, recv_window
        )

    def get_download_id_for_futures_trade_history(
        self,
        start_time: Union[int, None],
        end_time: Union[int, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetDownloadIdForFuturesTradeHistoryResponse]:
        """
                Get Download Id For Futures Trade History (USER_DATA)

                Get download id for futures trade history

        * Request Limitation is 5 times per month, shared by front end download page and rest api
        * The time between `startTime` and `endTime` can not be longer than 1 year

        Weight: 1000

                Args:
                    start_time (Union[int, None]): Timestamp in ms
                    end_time (Union[int, None]): Timestamp in ms
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetDownloadIdForFuturesTradeHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_download_id_for_futures_trade_history(
            start_time, end_time, recv_window
        )

    def get_download_id_for_futures_transaction_history(
        self,
        start_time: Union[int, None],
        end_time: Union[int, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetDownloadIdForFuturesTransactionHistoryResponse]:
        """
                Get Download Id For Futures Transaction History(USER_DATA)

                Get download id for futures transaction history

        * Request Limitation is 5 times per month, shared by front end download page and rest api
        * The time between `startTime` and `endTime` can not be longer than 1 year

        Weight: 1000

                Args:
                    start_time (Union[int, None]): Timestamp in ms
                    end_time (Union[int, None]): Timestamp in ms
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetDownloadIdForFuturesTransactionHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_download_id_for_futures_transaction_history(
            start_time, end_time, recv_window
        )

    def get_futures_order_history_download_link_by_id(
        self,
        download_id: Union[str, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetFuturesOrderHistoryDownloadLinkByIdResponse]:
        """
                Get Futures Order History Download Link by Id (USER_DATA)

                Get futures order history download link by Id

        * Download link expiration: 24h

        Weight: 10

                Args:
                    download_id (Union[str, None]): get by download id api
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetFuturesOrderHistoryDownloadLinkByIdResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_futures_order_history_download_link_by_id(
            download_id, recv_window
        )

    def get_futures_trade_download_link_by_id(
        self,
        download_id: Union[str, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetFuturesTradeDownloadLinkByIdResponse]:
        """
                Get Futures Trade Download Link by Id(USER_DATA)

                Get futures trade download link by Id

        * Download link expiration: 24h

        Weight: 10

                Args:
                    download_id (Union[str, None]): get by download id api
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetFuturesTradeDownloadLinkByIdResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_futures_trade_download_link_by_id(
            download_id, recv_window
        )

    def get_futures_transaction_history_download_link_by_id(
        self,
        download_id: Union[str, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetFuturesTransactionHistoryDownloadLinkByIdResponse]:
        """
                Get Futures Transaction History Download Link by Id (USER_DATA)

                Get futures transaction history download link by Id

        * Download link expiration: 24h

        Weight: 10

                Args:
                    download_id (Union[str, None]): get by download id api
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetFuturesTransactionHistoryDownloadLinkByIdResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_futures_transaction_history_download_link_by_id(
            download_id, recv_window
        )

    def get_income_history(
        self,
        symbol: Optional[str] = None,
        income_type: Optional[str] = None,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        page: Optional[int] = None,
        limit: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetIncomeHistoryResponse]:
        """
                Get Income History (USER_DATA)

                Query income history

        * If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
        * If `incomeType ` is not sent, all kinds of flow will be returned
        * "trandId" is unique in the same incomeType for a user
        * Income history only contains data for the last three months

        Weight: 30

                Args:
                    symbol (Optional[str] = None):
                    income_type (Optional[str] = None): TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE, STRATEGY_UMFUTURES_TRANSFER，FEE_RETURN，BFUSD_REWARD
                    start_time (Optional[int] = None):
                    end_time (Optional[int] = None):
                    page (Optional[int] = None):
                    limit (Optional[int] = None): Default 100; max 1000
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetIncomeHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.get_income_history(
            symbol, income_type, start_time, end_time, page, limit, recv_window
        )

    def notional_and_leverage_brackets(
        self,
        symbol: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[NotionalAndLeverageBracketsResponse]:
        """
                Notional and Leverage Brackets (USER_DATA)

                Query user notional and leverage bracket on speicfic symbol

        Weight: 1

                Args:
                    symbol (Optional[str] = None):
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[NotionalAndLeverageBracketsResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.notional_and_leverage_brackets(symbol, recv_window)

    def query_user_rate_limit(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[QueryUserRateLimitResponse]:
        """
                Query User Rate Limit (USER_DATA)

                Query User Rate Limit

        Weight: 1

                Args:
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[QueryUserRateLimitResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.query_user_rate_limit(recv_window)

    def symbol_configuration(
        self,
        symbol: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SymbolConfigurationResponse]:
        """
                Symbol Configuration(USER_DATA)

                Get current account symbol configuration.

        Weight: 5

                Args:
                    symbol (Optional[str] = None):
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[SymbolConfigurationResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.symbol_configuration(symbol, recv_window)

    def toggle_bnb_burn_on_futures_trade(
        self,
        fee_burn: Union[str, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[ToggleBnbBurnOnFuturesTradeResponse]:
        """
                Toggle BNB Burn On Futures Trade (TRADE)

                Change user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) on ***EVERY symbol***

        Weight: 1

                Args:
                    fee_burn (Union[str, None]): "true": Fee Discount On; "false": Fee Discount Off
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[ToggleBnbBurnOnFuturesTradeResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.toggle_bnb_burn_on_futures_trade(fee_burn, recv_window)

    def user_commission_rate(
        self,
        symbol: Union[str, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[UserCommissionRateResponse]:
        """
                User Commission Rate (USER_DATA)

                Get User Commission Rate

        Weight: 20

                Args:
                    symbol (Union[str, None]):
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[UserCommissionRateResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._accountApi.user_commission_rate(symbol, recv_window)

    def accept_the_offered_quote(
        self,
        quote_id: Union[str, None],
        recv_window: Optional[int] = None,
    ) -> ApiResponse[AcceptTheOfferedQuoteResponse]:
        """
                Accept the offered quote (USER_DATA)

                Accept the offered quote by quote ID.

        Weight: 200(IP)

                Args:
                    quote_id (Union[str, None]):
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[AcceptTheOfferedQuoteResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._convertApi.accept_the_offered_quote(quote_id, recv_window)

    def list_all_convert_pairs(
        self,
        from_asset: Optional[str] = None,
        to_asset: Optional[str] = None,
    ) -> ApiResponse[ListAllConvertPairsResponse]:
        """
                List All Convert Pairs

                Query for all convertible token pairs and the tokens’ respective upper/lower limits

        * User needs to supply either or both of the input parameter
        * If not defined for both fromAsset and toAsset, only partial token pairs will be returned
        * Asset BNFCR is only available to convert for MICA region users.

        Weight: 20(IP)

                Args:
                    from_asset (Optional[str] = None): User spends coin
                    to_asset (Optional[str] = None): User receives coin

                Returns:
                    ApiResponse[ListAllConvertPairsResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._convertApi.list_all_convert_pairs(from_asset, to_asset)

    def order_status(
        self,
        order_id: Optional[str] = None,
        quote_id: Optional[str] = None,
    ) -> ApiResponse[OrderStatusResponse]:
        """
                Order status(USER_DATA)

                Query order status by order ID.

        Weight: 50(IP)

                Args:
                    order_id (Optional[str] = None): Either orderId or quoteId is required
                    quote_id (Optional[str] = None): Either orderId or quoteId is required

                Returns:
                    ApiResponse[OrderStatusResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._convertApi.order_status(order_id, quote_id)

    def send_quote_request(
        self,
        from_asset: Union[str, None],
        to_asset: Union[str, None],
        from_amount: Optional[float] = None,
        to_amount: Optional[float] = None,
        valid_time: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SendQuoteRequestResponse]:
        """
                Send Quote Request(USER_DATA)

                Request a quote for the requested token pairs

        * Either fromAmount or toAmount should be sent
        * `quoteId` will be returned only if you have enough funds to convert

        Weight: 50(IP)

                Args:
                    from_asset (Union[str, None]):
                    to_asset (Union[str, None]):
                    from_amount (Optional[float] = None): When specified, it is the amount you will be debited after the conversion
                    to_amount (Optional[float] = None): When specified, it is the amount you will be credited after the conversion
                    valid_time (Optional[str] = None): 10s, default 10s
                    recv_window (Optional[int] = None):

                Returns:
