"""
Binance Wallet REST API

OpenAPI Specification for the Binance Wallet 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.
"""

from typing import Optional, Union
from requests import Session
from binance_common.configuration import ConfigurationRestAPI
from binance_common.errors import RequiredError
from binance_common.models import ApiResponse
from binance_common.signature import Signers
from binance_common.utils import send_request

from ..models import AssetDetailResponse
from ..models import AssetDividendRecordResponse
from ..models import DustConvertResponse
from ..models import DustConvertibleAssetsResponse
from ..models import DustTransferResponse
from ..models import DustlogResponse
from ..models import FundingWalletResponse
from ..models import GetAssetsThatCanBeConvertedIntoBnbResponse
from ..models import GetCloudMiningPaymentAndRefundHistoryResponse
from ..models import GetOpenSymbolListResponse
from ..models import QueryUserDelegationHistoryResponse
from ..models import QueryUserUniversalTransferHistoryResponse
from ..models import QueryUserWalletBalanceResponse
from ..models import ToggleBnbBurnOnSpotTradeAndMarginInterestResponse
from ..models import TradeFeeResponse
from ..models import UserAssetResponse
from ..models import UserUniversalTransferResponse


class AssetApi:
    """API Client for AssetApi endpoints."""

    def __init__(
        self,
        configuration: ConfigurationRestAPI = None,
        session: Session = None,
        signer: Signers = None,
    ) -> None:
        self._configuration = configuration
        self._session = session
        self._signer = signer

    def asset_detail(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[AssetDetailResponse]:
        """
                Asset Detail (USER_DATA)
                GET /sapi/v1/asset/assetDetail
                https://developers.binance.com/docs/wallet/asset/Asset-Detail

                Fetch details of assets supported on Binance.


        * Please get network and other deposit or withdraw details from ``GET /sapi/v1/capital/config/getall``.

        Weight: 1

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

                Returns:
                    ApiResponse[AssetDetailResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {"recv_window": recv_window}

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/assetDetail",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=AssetDetailResponse,
            is_signed=True,
            signer=self._signer,
        )

    def asset_dividend_record(
        self,
        asset: Optional[str] = None,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        limit: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[AssetDividendRecordResponse]:
        """
                Asset Dividend Record (USER_DATA)
                GET /sapi/v1/asset/assetDividend
                https://developers.binance.com/docs/wallet/asset/assets-divided-record

                Query asset dividend record.


        * There cannot be more than 180 days between parameter `startTime` and `endTime`.

        Weight: 10

                Args:
                    asset (Optional[str] = None): If asset is blank, then query all positive assets user have.
                    start_time (Optional[int] = None):
                    end_time (Optional[int] = None):
                    limit (Optional[int] = None): min 7, max 30, default 7
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[AssetDividendRecordResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {
            "asset": asset,
            "start_time": start_time,
            "end_time": end_time,
            "limit": limit,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/assetDividend",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=AssetDividendRecordResponse,
            is_signed=True,
            signer=self._signer,
        )

    def dust_convert(
        self,
        asset: Union[str, None],
        client_id: Optional[str] = None,
        target_asset: Optional[str] = None,
        third_party_client_id: Optional[str] = None,
        dust_quota_asset_to_target_asset_price: Optional[float] = None,
    ) -> ApiResponse[DustConvertResponse]:
        """
                Dust Convert (USER_DATA)
                POST /sapi/v1/asset/dust-convert/convert
                https://developers.binance.com/docs/wallet/asset/Dust-Convert

                Convert dust assets

        Weight: 10

                Args:
                    asset (Union[str, None]):
                    client_id (Optional[str] = None): A unique id for the request
                    target_asset (Optional[str] = None):
                    third_party_client_id (Optional[str] = None):
                    dust_quota_asset_to_target_asset_price (Optional[float] = None):

                Returns:
                    ApiResponse[DustConvertResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        if asset is None:
            raise RequiredError(
                field="asset", error_message="Missing required parameter 'asset'"
            )

        body = {}
        payload = {
            "asset": asset,
            "client_id": client_id,
            "target_asset": target_asset,
            "third_party_client_id": third_party_client_id,
            "dust_quota_asset_to_target_asset_price": dust_quota_asset_to_target_asset_price,
        }

        return send_request(
            self._session,
            self._configuration,
            method="POST",
            path="/sapi/v1/asset/dust-convert/convert",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=DustConvertResponse,
            is_signed=True,
            signer=self._signer,
        )

    def dust_convertible_assets(
        self,
        target_asset: Union[str, None],
        dust_quota_asset_to_target_asset_price: Optional[float] = None,
    ) -> ApiResponse[DustConvertibleAssetsResponse]:
        """
                Dust Convertible Assets (USER_DATA)
                POST /sapi/v1/asset/dust-convert/query-convertible-assets
                https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets

                Query dust convertible assets

        Weight: 1

                Args:
                    target_asset (Union[str, None]):
                    dust_quota_asset_to_target_asset_price (Optional[float] = None):

                Returns:
                    ApiResponse[DustConvertibleAssetsResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        if target_asset is None:
            raise RequiredError(
                field="target_asset",
                error_message="Missing required parameter 'target_asset'",
            )

        body = {}
        payload = {
            "target_asset": target_asset,
            "dust_quota_asset_to_target_asset_price": dust_quota_asset_to_target_asset_price,
        }

        return send_request(
            self._session,
            self._configuration,
            method="POST",
            path="/sapi/v1/asset/dust-convert/query-convertible-assets",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=DustConvertibleAssetsResponse,
            is_signed=True,
            signer=self._signer,
        )

    def dust_transfer(
        self,
        asset: Union[str, None],
        account_type: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[DustTransferResponse]:
        """
                Dust Transfer (USER_DATA)
                POST /sapi/v1/asset/dust
                https://developers.binance.com/docs/wallet/asset/Dust-Transfer

                Convert dust assets to BNB.

        * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.

        Weight: 10

                Args:
                    asset (Union[str, None]):
                    account_type (Optional[str] = None): `SPOT` or `MARGIN`,default `SPOT`
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[DustTransferResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        if asset is None:
            raise RequiredError(
                field="asset", error_message="Missing required parameter 'asset'"
            )

        body = {}
        payload = {
            "asset": asset,
            "account_type": account_type,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="POST",
            path="/sapi/v1/asset/dust",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=DustTransferResponse,
            is_signed=True,
            signer=self._signer,
        )

    def dustlog(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[DustlogResponse]:
        """
                DustLog(USER_DATA)
                GET /sapi/v1/asset/dribblet
                https://developers.binance.com/docs/wallet/asset/dust-log

                Dustlog

        * Only return last 100 records
        * Only return records after 2020/12/01

        Weight: 1

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

                Returns:
                    ApiResponse[DustlogResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {
            "start_time": start_time,
            "end_time": end_time,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/dribblet",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=DustlogResponse,
            is_signed=True,
            signer=self._signer,
        )

    def funding_wallet(
        self,
        asset: Optional[str] = None,
        need_btc_valuation: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[FundingWalletResponse]:
        """
                Funding Wallet (USER_DATA)
                POST /sapi/v1/asset/get-funding-asset
                https://developers.binance.com/docs/wallet/asset/Funding-Wallet

                Query Funding Wallet


        * Currently supports querying the following business assets：Binance Pay, Binance Card, Binance Gift Card, Stock Token

        Weight: 1

                Args:
                    asset (Optional[str] = None): If asset is blank, then query all positive assets user have.
                    need_btc_valuation (Optional[str] = None): true or false
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[FundingWalletResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {
            "asset": asset,
            "need_btc_valuation": need_btc_valuation,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="POST",
            path="/sapi/v1/asset/get-funding-asset",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=FundingWalletResponse,
            is_signed=True,
            signer=self._signer,
        )

    def get_assets_that_can_be_converted_into_bnb(
        self,
        account_type: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetAssetsThatCanBeConvertedIntoBnbResponse]:
        """
                Get Assets That Can Be Converted Into BNB (USER_DATA)
                POST /sapi/v1/asset/dust-btc
                https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb

                Get Assets That Can Be Converted Into BNB

        Weight: 1

                Args:
                    account_type (Optional[str] = None): `SPOT` or `MARGIN`,default `SPOT`
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[GetAssetsThatCanBeConvertedIntoBnbResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {"account_type": account_type, "recv_window": recv_window}

        return send_request(
            self._session,
            self._configuration,
            method="POST",
            path="/sapi/v1/asset/dust-btc",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=GetAssetsThatCanBeConvertedIntoBnbResponse,
            is_signed=True,
            signer=self._signer,
        )

    def get_cloud_mining_payment_and_refund_history(
        self,
        start_time: Union[int, None],
        end_time: Union[int, None],
        tran_id: Optional[int] = None,
        client_tran_id: Optional[str] = None,
        asset: Optional[str] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
    ) -> ApiResponse[GetCloudMiningPaymentAndRefundHistoryResponse]:
        """
                Get Cloud-Mining payment and refund history (USER_DATA)
                GET /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage
                https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history

                The query of Cloud-Mining payment and refund history

        * Just return the SUCCESS records of payment and refund.
        * For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS.

        Weight: 600

                Args:
                    start_time (Union[int, None]):
                    end_time (Union[int, None]):
                    tran_id (Optional[int] = None): The transaction id
                    client_tran_id (Optional[str] = None): The unique flag
                    asset (Optional[str] = None): If asset is blank, then query all positive assets user have.
                    current (Optional[int] = None): current page, default 1, the min value is 1
                    size (Optional[int] = None): page size, default 10, the max value is 100

                Returns:
                    ApiResponse[GetCloudMiningPaymentAndRefundHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        if start_time is None:
            raise RequiredError(
                field="start_time",
                error_message="Missing required parameter 'start_time'",
            )
        if end_time is None:
            raise RequiredError(
                field="end_time", error_message="Missing required parameter 'end_time'"
            )

        body = {}
        payload = {
            "start_time": start_time,
            "end_time": end_time,
            "tran_id": tran_id,
            "client_tran_id": client_tran_id,
            "asset": asset,
            "current": current,
            "size": size,
        }

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=GetCloudMiningPaymentAndRefundHistoryResponse,
            is_signed=True,
            signer=self._signer,
        )

    def get_open_symbol_list(
        self,
    ) -> ApiResponse[GetOpenSymbolListResponse]:
        """
                Get Open Symbol List (MARKET_DATA)
                GET /sapi/v1/spot/open-symbol-list
                https://developers.binance.com/docs/wallet/asset/open-symbol-list

                Get the list of symbols that are scheduled to be opened for trading in the market.

        Weight: 100

                Args:

                Returns:
                    ApiResponse[GetOpenSymbolListResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = None
        payload = None

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/spot/open-symbol-list",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=GetOpenSymbolListResponse,
        )

    def query_user_delegation_history(
        self,
        email: Union[str, None],
        start_time: Union[int, None],
        end_time: Union[int, None],
        type: Optional[str] = None,
        asset: Optional[str] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[QueryUserDelegationHistoryResponse]:
        """
                Query User Delegation History(For Master Account)(USER_DATA)
                GET /sapi/v1/asset/custody/transfer-history
                https://developers.binance.com/docs/wallet/asset/query-user-delegation

                Query User Delegation History

        * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint

        Weight: 60

                Args:
                    email (Union[str, None]):
                    start_time (Union[int, None]):
                    end_time (Union[int, None]):
                    type (Optional[str] = None): Delegate/Undelegate
                    asset (Optional[str] = None): If asset is blank, then query all positive assets user have.
                    current (Optional[int] = None): current page, default 1, the min value is 1
                    size (Optional[int] = None): page size, default 10, the max value is 100
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[QueryUserDelegationHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        if email is None:
            raise RequiredError(
                field="email", error_message="Missing required parameter 'email'"
            )
        if start_time is None:
            raise RequiredError(
                field="start_time",
                error_message="Missing required parameter 'start_time'",
            )
        if end_time is None:
            raise RequiredError(
                field="end_time", error_message="Missing required parameter 'end_time'"
            )

        body = {}
        payload = {
            "email": email,
            "start_time": start_time,
            "end_time": end_time,
            "type": type,
            "asset": asset,
            "current": current,
            "size": size,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/custody/transfer-history",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=QueryUserDelegationHistoryResponse,
            is_signed=True,
            signer=self._signer,
        )

    def query_user_universal_transfer_history(
        self,
        type: Union[str, None],
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        from_symbol: Optional[str] = None,
        to_symbol: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[QueryUserUniversalTransferHistoryResponse]:
        """
                Query User Universal Transfer History(USER_DATA)
                GET /sapi/v1/asset/transfer
                https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer

                Query User Universal Transfer History


        *  `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
        *  `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
        * Support query within the last 6 months only
        * If `startTime`and `endTime` not sent, return records of the last 7 days by default

        Weight: 1

                Args:
                    type (Union[str, None]):
                    start_time (Optional[int] = None):
                    end_time (Optional[int] = None):
                    current (Optional[int] = None): current page, default 1, the min value is 1
                    size (Optional[int] = None): page size, default 10, the max value is 100
                    from_symbol (Optional[str] = None):
                    to_symbol (Optional[str] = None):
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[QueryUserUniversalTransferHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        if type is None:
            raise RequiredError(
                field="type", error_message="Missing required parameter 'type'"
            )

        body = {}
        payload = {
            "type": type,
            "start_time": start_time,
            "end_time": end_time,
            "current": current,
            "size": size,
            "from_symbol": from_symbol,
            "to_symbol": to_symbol,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/transfer",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=QueryUserUniversalTransferHistoryResponse,
            is_signed=True,
            signer=self._signer,
        )

    def query_user_wallet_balance(
        self,
        quote_asset: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[QueryUserWalletBalanceResponse]:
        """
                Query User Wallet Balance (USER_DATA)
                GET /sapi/v1/asset/wallet/balance
                https://developers.binance.com/docs/wallet/asset/Query-User-Wallet-Balance

                Query User Wallet Balance

        Weight: 60

                Args:
                    quote_asset (Optional[str] = None): `USDT`, `ETH`, `USDC`, `BNB`, etc. default `BTC`
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[QueryUserWalletBalanceResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {"quote_asset": quote_asset, "recv_window": recv_window}

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/wallet/balance",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=QueryUserWalletBalanceResponse,
            is_signed=True,
            signer=self._signer,
        )

    def toggle_bnb_burn_on_spot_trade_and_margin_interest(
        self,
        spot_bnb_burn: Optional[str] = None,
        interest_bnb_burn: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[ToggleBnbBurnOnSpotTradeAndMarginInterestResponse]:
        """
                Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA)
                POST /sapi/v1/bnbBurn
                https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest

                Toggle BNB Burn On Spot Trade And Margin Interest

        * "spotBNBBurn" and "interestBNBBurn" should be sent at least one.

        Weight: 1(IP)

                Args:
                    spot_bnb_burn (Optional[str] = None): "true" or "false"; Determines whether to use BNB to pay for trading fees on SPOT
                    interest_bnb_burn (Optional[str] = None): "true" or "false"; Determines whether to use BNB to pay for margin loan's interest
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[ToggleBnbBurnOnSpotTradeAndMarginInterestResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {
            "spot_bnb_burn": spot_bnb_burn,
            "interest_bnb_burn": interest_bnb_burn,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="POST",
            path="/sapi/v1/bnbBurn",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=ToggleBnbBurnOnSpotTradeAndMarginInterestResponse,
            is_signed=True,
            signer=self._signer,
        )

    def trade_fee(
        self,
        symbol: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[TradeFeeResponse]:
        """
                Trade Fee (USER_DATA)
                GET /sapi/v1/asset/tradeFee
                https://developers.binance.com/docs/wallet/asset/Trade-Fee

                Fetch trade fee

        Weight: 1

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

                Returns:
                    ApiResponse[TradeFeeResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {"symbol": symbol, "recv_window": recv_window}

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/asset/tradeFee",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=TradeFeeResponse,
            is_signed=True,
            signer=self._signer,
        )

    def user_asset(
        self,
        asset: Optional[str] = None,
        need_btc_valuation: Optional[bool] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[UserAssetResponse]:
        """
                User Asset (USER_DATA)
                POST /sapi/v3/asset/getUserAsset
                https://developers.binance.com/docs/wallet/asset/user-assets

                Get user assets, just for positive data.

        * If asset is set, then return this asset, otherwise return all assets positive.
        * If needBtcValuation is set, then return btcValudation.

        Weight: 5

                Args:
                    asset (Optional[str] = None): If asset is blank, then query all positive assets user have.
                    need_btc_valuation (Optional[bool] = None): Whether need btc valuation or not.
                    recv_window (Optional[int] = None):

                Returns:
                    ApiResponse[UserAssetResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        body = {}
        payload = {
            "asset": asset,
            "need_btc_valuation": need_btc_valuation,
            "recv_window": recv_window,
        }

        return send_request(
            self._session,
            self._configuration,
            method="POST",
            path="/sapi/v3/asset/getUserAsset",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=UserAssetResponse,
            is_signed=True,
            signer=self._signer,
        )

    def user_universal_transfer(
        self,
        type: Union[str, None],
        asset: Union[str, None],
        amount: Union[float, None],
        from_symbol: Optional[str] = None,
        to_symbol: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[UserUniversalTransferResponse]:
        """
                User Universal Transfer (USER_DATA)
                POST /sapi/v1/asset/transfer
                https://developers.binance.com/docs/wallet/asset/User-Universal-Transfer

                user universal transfer

        *  `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
        *  `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
        * ENUM of transfer types:
        * MAIN_UMFUTURE   Spot account transfer to USDⓈ-M Futures account
        * MAIN_CMFUTURE   Spot account transfer to COIN-M Futures account
        * MAIN_MARGIN   Spot account transfer to Margin（cross）account
        * UMFUTURE_MAIN   USDⓈ-M Futures account transfer to Spot account
        * UMFUTURE_MARGIN   USDⓈ-M Futures account transfer to Margin（cross）account
        * CMFUTURE_MAIN   COIN-M Futures account transfer to Spot account
        * CMFUTURE_MARGIN   COIN-M Futures account transfer to Margin(cross) account
        * MARGIN_MAIN   Margin（cross）account transfer to Spot account
        * MARGIN_UMFUTURE   Margin（cross）account transfer to USDⓈ-M Futures
        * MARGIN_CMFUTURE   Margin（cross）account transfer to COIN-M Futures
        * ISOLATEDMARGIN_MARGIN   Isolated margin account transfer to Margin(cross) account
        * MARGIN_ISOLATEDMARGIN   Margin(cross) account transfer to Isolated margin account
        * ISOLATEDMARGIN_ISOLATEDMARGIN   Isolated margin account transfer to Isolated margin account
        * MAIN_FUNDING   Spot account transfer to Funding account
        * FUNDING_MAIN   Funding account transfer to Spot account
        * FUNDING_UMFUTURE   Funding account transfer to UMFUTURE account
        * UMFUTURE_FUNDING   UMFUTURE account transfer to Funding account
        * MARGIN_FUNDING   MARGIN account transfer to Funding account
        * FUNDING_MARGIN   Funding account transfer to Margin account
        * FUNDING_CMFUTURE   Funding account transfer to CMFUTURE account
        * CMFUTURE_FUNDING   CMFUTURE account transfer to Funding account
        * MAIN_OPTION  Spot account transfer to Options account
        * OPTION_MAIN  Options account transfer to Spot account
        * UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account
        * OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account
        * MARGIN_OPTION  Margin（cross）account transfer to Options account
        * OPTION_MARGIN  Options account transfer to Margin（cross）account
