/*
 * Binance Wallet REST API
 *
 * OpenAPI Specification for the Binance Wallet REST API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

#![allow(unused_imports)]
use http::Method;
use serde::de::DeserializeOwned;
use serde_json::Value;
use std::collections::BTreeMap;

use crate::common::{config::ConfigurationRestApi, models::RestApiResponse, utils::send_request};

mod apis;
mod models;

pub use apis::*;
pub use models::*;

#[derive(Debug, Clone)]
pub struct RestApi {
    configuration: ConfigurationRestApi,
    account_api_client: AccountApiClient,
    asset_api_client: AssetApiClient,
    capital_api_client: CapitalApiClient,
    others_api_client: OthersApiClient,
    travel_rule_api_client: TravelRuleApiClient,
}

impl RestApi {
    pub fn new(configuration: ConfigurationRestApi) -> Self {
        let account_api_client = AccountApiClient::new(configuration.clone());
        let asset_api_client = AssetApiClient::new(configuration.clone());
        let capital_api_client = CapitalApiClient::new(configuration.clone());
        let others_api_client = OthersApiClient::new(configuration.clone());
        let travel_rule_api_client = TravelRuleApiClient::new(configuration.clone());

        Self {
            configuration,
            account_api_client,
            asset_api_client,
            capital_api_client,
            others_api_client,
            travel_rule_api_client,
        }
    }

    /// Send an unsigned request to the API
    ///
    /// # Arguments
    ///
    /// * `endpoint` - The API endpoint to send the request to
    /// * `method` - The HTTP method to use for the request
    /// * `query_params` - A map of query parameters to send with the request
    /// * `body_params` - A map of body parameters to send with the request
    ///
    /// # Returns
    ///
    /// A `RestApiResponse` containing the deserialized response data on success, or an error if the request fails
    ///
    /// # Errors
    ///
    /// Returns an `anyhow::Error` if the HTTP request fails or if parsing the response fails
    pub async fn send_request<R: DeserializeOwned + Send + 'static>(
        &self,
        endpoint: &str,
        method: Method,
        query_params: BTreeMap<String, Value>,
        body_params: BTreeMap<String, Value>,
    ) -> anyhow::Result<RestApiResponse<R>> {
        send_request::<R>(
            &self.configuration,
            endpoint,
            method,
            query_params,
            body_params,
            None,
            false,
        )
        .await
    }

    /// Send a signed request to the API
    ///
    /// # Arguments
    ///
    /// * `endpoint` - The API endpoint to send the request to
    /// * `method` - The HTTP method to use for the request
    /// * `query_params` - A map of query parameters to send with the request
    /// * `body_params` - A map of body parameters to send with the request
    ///
    /// # Returns
    ///
    /// A `RestApiResponse` containing the deserialized response data on success, or an error if the request fails
    ///
    /// # Errors
    ///
    /// Returns an `anyhow::Error` if the HTTP request fails or if parsing the response fails
    pub async fn send_signed_request<R: DeserializeOwned + Send + 'static>(
        &self,
        endpoint: &str,
        method: Method,
        query_params: BTreeMap<String, Value>,
        body_params: BTreeMap<String, Value>,
    ) -> anyhow::Result<RestApiResponse<R>> {
        send_request::<R>(
            &self.configuration,
            endpoint,
            method,
            query_params,
            body_params,
            None,
            true,
        )
        .await
    }

    /// Account API Trading Status (`USER_DATA`)
    ///
    /// Fetch account api trading status detail.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`AccountApiTradingStatusParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::AccountApiTradingStatusResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/account/Account-API-Trading-Status).
    ///
    pub async fn account_api_trading_status(
        &self,
        params: AccountApiTradingStatusParams,
    ) -> anyhow::Result<RestApiResponse<models::AccountApiTradingStatusResponse>> {
        self.account_api_client
            .account_api_trading_status(params)
            .await
    }

    /// Account info (`USER_DATA`)
    ///
    /// Fetch account info detail.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`AccountInfoParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::AccountInfoResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/account/Account-info).
    ///
    pub async fn account_info(
        &self,
        params: AccountInfoParams,
    ) -> anyhow::Result<RestApiResponse<models::AccountInfoResponse>> {
        self.account_api_client.account_info(params).await
    }

    /// Account Status (`USER_DATA`)
    ///
    /// Fetch account status detail.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`AccountStatusParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::AccountStatusResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/account/Account-Status).
    ///
    pub async fn account_status(
        &self,
        params: AccountStatusParams,
    ) -> anyhow::Result<RestApiResponse<models::AccountStatusResponse>> {
        self.account_api_client.account_status(params).await
    }

    /// Daily Account Snapshot (`USER_DATA`)
    ///
    /// Daily account snapshot
    ///
    /// * The query time period must be less then 30 days
    /// * Support query within the last one month only
    /// * If startTimeand endTime not sent, return records of the last 7 days by default
    ///
    /// Weight: 2400
    ///
    /// # Arguments
    ///
    /// - `params`: [`DailyAccountSnapshotParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::DailyAccountSnapshotResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/account/daily-account-snapshoot).
    ///
    pub async fn daily_account_snapshot(
        &self,
        params: DailyAccountSnapshotParams,
    ) -> anyhow::Result<RestApiResponse<models::DailyAccountSnapshotResponse>> {
        self.account_api_client.daily_account_snapshot(params).await
    }

    /// Disable Fast Withdraw Switch (`USER_DATA`)
    ///
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`DisableFastWithdrawSwitchParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Value>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/account/Disable-Fast-Withdraw-Switch).
    ///
    pub async fn disable_fast_withdraw_switch(
        &self,
        params: DisableFastWithdrawSwitchParams,
    ) -> anyhow::Result<RestApiResponse<Value>> {
        self.account_api_client
            .disable_fast_withdraw_switch(params)
            .await
    }

    /// Enable Fast Withdraw Switch (`USER_DATA`)
    ///
    /// Enable Fast Withdraw Switch (`USER_DATA`)
    ///
    /// * This request will enable fastwithdraw switch under your  account. <br></br>
    /// * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`EnableFastWithdrawSwitchParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Value>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/account/Enable-Fast-Withdraw-Switch).
    ///
    pub async fn enable_fast_withdraw_switch(
        &self,
        params: EnableFastWithdrawSwitchParams,
    ) -> anyhow::Result<RestApiResponse<Value>> {
        self.account_api_client
            .enable_fast_withdraw_switch(params)
            .await
    }

    /// Get API Key Permission (`USER_DATA`)
    ///
    /// Get API Key Permission
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetApiKeyPermissionParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetApiKeyPermissionResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/account/api-key-permission).
    ///
    pub async fn get_api_key_permission(
        &self,
        params: GetApiKeyPermissionParams,
    ) -> anyhow::Result<RestApiResponse<models::GetApiKeyPermissionResponse>> {
        self.account_api_client.get_api_key_permission(params).await
    }

    /// Asset Detail (`USER_DATA`)
    ///
    /// 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
    ///
    /// # Arguments
    ///
    /// - `params`: [`AssetDetailParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::AssetDetailResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Asset-Detail).
    ///
    pub async fn asset_detail(
        &self,
        params: AssetDetailParams,
    ) -> anyhow::Result<RestApiResponse<models::AssetDetailResponse>> {
        self.asset_api_client.asset_detail(params).await
    }

    /// Asset Dividend Record (`USER_DATA`)
    ///
    /// Query asset dividend record.
    ///
    ///
    /// * There cannot be more than 180 days between parameter `startTime` and `endTime`.
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`AssetDividendRecordParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::AssetDividendRecordResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/assets-divided-record).
    ///
    pub async fn asset_dividend_record(
        &self,
        params: AssetDividendRecordParams,
    ) -> anyhow::Result<RestApiResponse<models::AssetDividendRecordResponse>> {
        self.asset_api_client.asset_dividend_record(params).await
    }

    /// Dust Convert (`USER_DATA`)
    ///
    /// Convert dust assets
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`DustConvertParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::DustConvertResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Dust-Convert).
    ///
    pub async fn dust_convert(
        &self,
        params: DustConvertParams,
    ) -> anyhow::Result<RestApiResponse<models::DustConvertResponse>> {
        self.asset_api_client.dust_convert(params).await
    }

    /// Dust Convertible Assets (`USER_DATA`)
    ///
    /// Query dust convertible assets
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`DustConvertibleAssetsParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::DustConvertibleAssetsResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Dust-Convertible-Assets).
    ///
    pub async fn dust_convertible_assets(
        &self,
        params: DustConvertibleAssetsParams,
    ) -> anyhow::Result<RestApiResponse<models::DustConvertibleAssetsResponse>> {
        self.asset_api_client.dust_convertible_assets(params).await
    }

    /// Dust Transfer (`USER_DATA`)
    ///
    /// Convert dust assets to BNB.
    ///
    /// * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`DustTransferParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::DustTransferResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Dust-Transfer).
    ///
    pub async fn dust_transfer(
        &self,
        params: DustTransferParams,
    ) -> anyhow::Result<RestApiResponse<models::DustTransferResponse>> {
        self.asset_api_client.dust_transfer(params).await
    }

    /// `DustLog(USER_DATA)`
    ///
    /// Dustlog
    ///
    /// * Only return last 100 records
    /// * Only return records after 2020/12/01
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`DustlogParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::DustlogResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/dust-log).
    ///
    pub async fn dustlog(
        &self,
        params: DustlogParams,
    ) -> anyhow::Result<RestApiResponse<models::DustlogResponse>> {
        self.asset_api_client.dustlog(params).await
    }

    /// Funding Wallet (`USER_DATA`)
    ///
    /// Query Funding Wallet
    ///
    ///
    /// * Currently supports querying the following business assets：Binance Pay, Binance Card, Binance Gift Card, Stock Token
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`FundingWalletParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::FundingWalletResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Funding-Wallet).
    ///
    pub async fn funding_wallet(
        &self,
        params: FundingWalletParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::FundingWalletResponseInner>>> {
        self.asset_api_client.funding_wallet(params).await
    }

    /// Get Assets That Can Be Converted Into BNB (`USER_DATA`)
    ///
    /// Get Assets That Can Be Converted Into BNB
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetAssetsThatCanBeConvertedIntoBnbParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetAssetsThatCanBeConvertedIntoBnbResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb).
    ///
    pub async fn get_assets_that_can_be_converted_into_bnb(
        &self,
        params: GetAssetsThatCanBeConvertedIntoBnbParams,
    ) -> anyhow::Result<RestApiResponse<models::GetAssetsThatCanBeConvertedIntoBnbResponse>> {
        self.asset_api_client
            .get_assets_that_can_be_converted_into_bnb(params)
            .await
    }

    /// Get Cloud-Mining payment and refund history (`USER_DATA`)
    ///
    /// 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
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetCloudMiningPaymentAndRefundHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetCloudMiningPaymentAndRefundHistoryResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history).
    ///
    pub async fn get_cloud_mining_payment_and_refund_history(
        &self,
        params: GetCloudMiningPaymentAndRefundHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetCloudMiningPaymentAndRefundHistoryResponse>>
    {
        self.asset_api_client
            .get_cloud_mining_payment_and_refund_history(params)
            .await
    }

    /// Get Open Symbol List (`MARKET_DATA`)
    ///
    /// Get the list of symbols that are scheduled to be opened for trading in the market.
    ///
    /// Weight: 100
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOpenSymbolListParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::GetOpenSymbolListResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/open-symbol-list).
    ///
    pub async fn get_open_symbol_list(
        &self,
    ) -> anyhow::Result<RestApiResponse<Vec<models::GetOpenSymbolListResponseInner>>> {
        self.asset_api_client.get_open_symbol_list().await
    }

    /// Query User Delegation History(For Master `Account)(USER_DATA`)
    ///
    /// Query User Delegation History
    ///
    /// Weight: 60
    ///
    /// # Arguments
    ///
    /// - `params`: [`QueryUserDelegationHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::QueryUserDelegationHistoryResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/query-user-delegation).
    ///
    pub async fn query_user_delegation_history(
        &self,
        params: QueryUserDelegationHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::QueryUserDelegationHistoryResponse>> {
        self.asset_api_client
            .query_user_delegation_history(params)
            .await
    }

    /// Query User Universal Transfer `History(USER_DATA)`
    ///
    /// 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
    ///
    /// # Arguments
    ///
    /// - `params`: [`QueryUserUniversalTransferHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::QueryUserUniversalTransferHistoryResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer).
    ///
    pub async fn query_user_universal_transfer_history(
        &self,
        params: QueryUserUniversalTransferHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::QueryUserUniversalTransferHistoryResponse>> {
        self.asset_api_client
            .query_user_universal_transfer_history(params)
            .await
    }

    /// Query User Wallet Balance (`USER_DATA`)
    ///
    /// Query User Wallet Balance
    ///
    /// Weight: 60
    ///
    /// # Arguments
    ///
    /// - `params`: [`QueryUserWalletBalanceParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::QueryUserWalletBalanceResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Query-User-Wallet-Balance).
    ///
    pub async fn query_user_wallet_balance(
        &self,
        params: QueryUserWalletBalanceParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::QueryUserWalletBalanceResponseInner>>> {
        self.asset_api_client
            .query_user_wallet_balance(params)
            .await
    }

    /// Toggle BNB Burn On Spot Trade And Margin Interest (`USER_DATA`)
    ///
    /// Toggle BNB Burn On Spot Trade And Margin Interest
    ///
    /// * "spotBNBBurn" and "interestBNBBurn" should be sent at least one.
    ///
    /// Weight: 1(IP)
    ///
    /// # Arguments
    ///
    /// - `params`: [`ToggleBnbBurnOnSpotTradeAndMarginInterestParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::ToggleBnbBurnOnSpotTradeAndMarginInterestResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest).
    ///
    pub async fn toggle_bnb_burn_on_spot_trade_and_margin_interest(
        &self,
        params: ToggleBnbBurnOnSpotTradeAndMarginInterestParams,
    ) -> anyhow::Result<RestApiResponse<models::ToggleBnbBurnOnSpotTradeAndMarginInterestResponse>>
    {
        self.asset_api_client
            .toggle_bnb_burn_on_spot_trade_and_margin_interest(params)
            .await
    }

    /// Trade Fee (`USER_DATA`)
    ///
    /// Fetch trade fee
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`TradeFeeParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::TradeFeeResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/Trade-Fee).
    ///
    pub async fn trade_fee(
        &self,
        params: TradeFeeParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::TradeFeeResponseInner>>> {
        self.asset_api_client.trade_fee(params).await
    }

    /// User Asset (`USER_DATA`)
    ///
    /// 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
    ///
    /// # Arguments
    ///
    /// - `params`: [`UserAssetParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::UserAssetResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/user-assets).
    ///
    pub async fn user_asset(
        &self,
        params: UserAssetParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::UserAssetResponseInner>>> {
        self.asset_api_client.user_asset(params).await
    }

    /// User Universal Transfer (`USER_DATA`)
    ///
    /// 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
    /// * `FUNDING_OPTION`   Funding account transfer to Options account
    /// * `OPTION_FUNDING`   Options account transfer to Funding account
    /// * `MAIN_PORTFOLIO_MARGIN`  Spot account transfer to Portfolio Margin account
    /// * `PORTFOLIO_MARGIN_MAIN`  Portfolio Margin account transfer to Spot account
    ///
    /// Weight: 900
    ///
    /// # Arguments
    ///
    /// - `params`: [`UserUniversalTransferParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::UserUniversalTransferResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/asset/User-Universal-Transfer).
    ///
    pub async fn user_universal_transfer(
        &self,
        params: UserUniversalTransferParams,
    ) -> anyhow::Result<RestApiResponse<models::UserUniversalTransferResponse>> {
        self.asset_api_client.user_universal_transfer(params).await
    }

    /// All Coins' Information (`USER_DATA`)
    ///
    /// Get information of coins (available for deposit and withdraw) for user.
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`AllCoinsInformationParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::AllCoinsInformationResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/all-coins-info).
    ///
    pub async fn all_coins_information(
        &self,
        params: AllCoinsInformationParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::AllCoinsInformationResponseInner>>> {
        self.capital_api_client.all_coins_information(params).await
    }

    /// Deposit Address(supporting network) (`USER_DATA`)
    ///
    /// Fetch deposit address with network.
    ///
    /// * If `network` is not send, return with default network of the coin.
    /// * You can get `network` and `isDefault` in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
    /// * `amount` needs to be sent if using LIGHTNING network
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`DepositAddressParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::DepositAddressResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/deposite-address).
    ///
    pub async fn deposit_address(
        &self,
        params: DepositAddressParams,
    ) -> anyhow::Result<RestApiResponse<models::DepositAddressResponse>> {
        self.capital_api_client.deposit_address(params).await
    }

    /// Deposit History (supporting network) (`USER_DATA`)
    ///
    /// Fetch deposit history.
    ///
    ///
    /// * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
    /// * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must be less than 90 days.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`DepositHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::DepositHistoryResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/deposite-history).
    ///
    pub async fn deposit_history(
        &self,
        params: DepositHistoryParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::DepositHistoryResponseInner>>> {
        self.capital_api_client.deposit_history(params).await
    }

    /// Fetch deposit address list with `network(USER_DATA)`
    ///
    /// Fetch deposit address list with network.
    ///
    ///
    /// * If network is not send, return with default network of the coin.
    /// * You can get network and isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall`.
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`FetchDepositAddressListWithNetworkParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::FetchDepositAddressListWithNetworkResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/Fetch-deposit-address-list-with-network).
    ///
    pub async fn fetch_deposit_address_list_with_network(
        &self,
        params: FetchDepositAddressListWithNetworkParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::FetchDepositAddressListWithNetworkResponseInner>>>
    {
        self.capital_api_client
            .fetch_deposit_address_list_with_network(params)
            .await
    }

    /// Fetch withdraw address list (`USER_DATA`)
    ///
    /// Fetch withdraw address list
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`FetchWithdrawAddressListParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::FetchWithdrawAddressListResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/fetch-withdraw-address).
    ///
    pub async fn fetch_withdraw_address_list(
        &self,
    ) -> anyhow::Result<RestApiResponse<Vec<models::FetchWithdrawAddressListResponseInner>>> {
        self.capital_api_client.fetch_withdraw_address_list().await
    }

    /// Fetch withdraw quota (`USER_DATA`)
    ///
    /// Fetch withdraw quota
    ///
    /// Weight: 10
    ///
    /// # Arguments
    ///
    /// - `params`: [`FetchWithdrawQuotaParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::FetchWithdrawQuotaResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/Fetch-withdraw-quota).
    ///
    pub async fn fetch_withdraw_quota(
        &self,
    ) -> anyhow::Result<RestApiResponse<models::FetchWithdrawQuotaResponse>> {
        self.capital_api_client.fetch_withdraw_quota().await
    }

    /// One click arrival deposit apply (for expired address deposit) (`USER_DATA`)
    ///
    /// Apply deposit credit for expired address (One click arrival)
    ///
    /// * Params need to be in the POST body
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`OneClickArrivalDepositApplyParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::OneClickArrivalDepositApplyResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/one-click-arrival-deposite-apply).
    ///
    pub async fn one_click_arrival_deposit_apply(
        &self,
        params: OneClickArrivalDepositApplyParams,
    ) -> anyhow::Result<RestApiResponse<models::OneClickArrivalDepositApplyResponse>> {
        self.capital_api_client
            .one_click_arrival_deposit_apply(params)
            .await
    }

    /// `Withdraw(USER_DATA)`
    ///
    /// Submit a withdraw request.
    ///
    ///
    /// * If `network` not send, return with default network of the coin.
    /// * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
    /// * To check if travel rule is required, by using  `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
    ///
    /// Weight: 900
    ///
    /// # Arguments
    ///
    /// - `params`: [`WithdrawParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::WithdrawResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/Withdraw).
    ///
    pub async fn withdraw(
        &self,
        params: WithdrawParams,
    ) -> anyhow::Result<RestApiResponse<models::WithdrawResponse>> {
        self.capital_api_client.withdraw(params).await
    }

    /// Withdraw History (supporting network) (`USER_DATA`)
    ///
    /// Fetch withdraw history.
    ///
    /// * `network` may not be in the response for old withdraw.
    /// * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
    /// * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days.
    /// * If `withdrawOrderId` is sent, time between `startTime` and `endTime` must be less than 7 days.
    /// * If `withdrawOrderId` is sent, `startTime` and `endTime` are not sent, will return last 7 days records by default.
    /// * Maximum support `idList` number is 45.
    ///
    /// Weight: 18000
    /// Request limit: 10 requests per second
    ///
    /// # Arguments
    ///
    /// - `params`: [`WithdrawHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::WithdrawHistoryResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/capital/Withdraw-History).
    ///
    pub async fn withdraw_history(
        &self,
        params: WithdrawHistoryParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::WithdrawHistoryResponseInner>>> {
        self.capital_api_client.withdraw_history(params).await
    }

    /// Get symbols delist schedule for spot (`MARKET_DATA`)
    ///
    /// Get symbols delist schedule for spot
    ///
    /// Weight: 100
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetSymbolsDelistScheduleForSpotParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::GetSymbolsDelistScheduleForSpotResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/others/delist-schedule).
    ///
    pub async fn get_symbols_delist_schedule_for_spot(
        &self,
        params: GetSymbolsDelistScheduleForSpotParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::GetSymbolsDelistScheduleForSpotResponseInner>>>
    {
        self.others_api_client
            .get_symbols_delist_schedule_for_spot(params)
            .await
    }

    /// System Status (System)
    ///
    /// Fetch system status.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`SystemStatusParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SystemStatusResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/others/System-Status).
    ///
    pub async fn system_status(
        &self,
    ) -> anyhow::Result<RestApiResponse<models::SystemStatusResponse>> {
        self.others_api_client.system_status().await
    }

    /// Broker Withdraw (for brokers of local entities that require travel rule) (`USER_DATA`)
    ///
    /// Submit a withdrawal request for brokers of local entities that required travel rule.
    ///
    /// * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
    /// * You can get `network` in `networkList` of a coin in the response
    /// * Questionnaire is different for each local entity, please refer to
    /// * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
    ///
    /// Weight: 600
    ///
    /// # Arguments
    ///
    /// - `params`: [`BrokerWithdrawParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::BrokerWithdrawResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/Broker-Withdraw).
    ///
    pub async fn broker_withdraw(
        &self,
        params: BrokerWithdrawParams,
    ) -> anyhow::Result<RestApiResponse<models::BrokerWithdrawResponse>> {
        self.travel_rule_api_client.broker_withdraw(params).await
    }

    /// Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (`USER_DATA`)
    ///
    /// This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`CheckQuestionnaireRequirementsParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::CheckQuestionnaireRequirementsResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/questionnaire-requirements).
    ///
    pub async fn check_questionnaire_requirements(
        &self,
        params: CheckQuestionnaireRequirementsParams,
    ) -> anyhow::Result<RestApiResponse<models::CheckQuestionnaireRequirementsResponse>> {
        self.travel_rule_api_client
            .check_questionnaire_requirements(params)
            .await
    }

    /// Deposit History (for local entities that required travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Fetch deposit history for local entities that required travel rule.
    ///
    /// * Please notice the default `startTime` and `endTime` to make sure that time interval is within
    /// * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
    /// * Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`DepositHistoryTravelRuleParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::DepositHistoryTravelRuleResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History).
    ///
    pub async fn deposit_history_travel_rule(
        &self,
        params: DepositHistoryTravelRuleParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::DepositHistoryTravelRuleResponseInner>>> {
        self.travel_rule_api_client
            .deposit_history_travel_rule(params)
            .await
    }

    /// Deposit History V2 (for local entities that required travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Fetch deposit history for local entities that with required travel rule information.
    ///
    /// * Please notice the default `startTime` and `endTime` to make sure that time interval is within
    /// * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
    /// * Please, note that due to network-specific characteristics, the returned source address may be inaccurate. If multiple source addresses are found, only the first one will be returned.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`DepositHistoryV2Params`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::DepositHistoryV2ResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2).
    ///
    pub async fn deposit_history_v2(
        &self,
        params: DepositHistoryV2Params,
    ) -> anyhow::Result<RestApiResponse<Vec<models::DepositHistoryV2ResponseInner>>> {
        self.travel_rule_api_client.deposit_history_v2(params).await
    }

    /// Fetch address verification list (`USER_DATA`)
    ///
    /// Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`FetchAddressVerificationListParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::FetchAddressVerificationListResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/address-verification-list).
    ///
    pub async fn fetch_address_verification_list(
        &self,
        params: FetchAddressVerificationListParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::FetchAddressVerificationListResponseInner>>>
    {
        self.travel_rule_api_client
            .fetch_address_verification_list(params)
            .await
    }

    /// Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Submit questionnaire for brokers of local entities that require travel rule.
    /// The questionnaire is only applies to transactions from un-hosted wallets or VASPs that are not
    /// yet onboarded with GTR.
    ///
    /// * Questionnaire is different for each local entity, please refer
    /// * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
    ///
    /// Weight: 600
    ///
    /// # Arguments
    ///
    /// - `params`: [`SubmitDepositQuestionnaireParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SubmitDepositQuestionnaireResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info).
    ///
    pub async fn submit_deposit_questionnaire(
        &self,
        params: SubmitDepositQuestionnaireParams,
    ) -> anyhow::Result<RestApiResponse<models::SubmitDepositQuestionnaireResponse>> {
        self.travel_rule_api_client
            .submit_deposit_questionnaire(params)
            .await
    }

    /// Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Submit questionnaire for local entities that require travel rule.
    /// The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
    /// yet onboarded with GTR.
    ///
    /// * Questionnaire is different for each local entity, please refer
    /// * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
    ///
    /// Weight: 600
    ///
    /// # Arguments
    ///
    /// - `params`: [`SubmitDepositQuestionnaireTravelRuleParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SubmitDepositQuestionnaireTravelRuleResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info).
    ///
    pub async fn submit_deposit_questionnaire_travel_rule(
        &self,
        params: SubmitDepositQuestionnaireTravelRuleParams,
    ) -> anyhow::Result<RestApiResponse<models::SubmitDepositQuestionnaireTravelRuleResponse>> {
        self.travel_rule_api_client
            .submit_deposit_questionnaire_travel_rule(params)
            .await
    }

    /// Submit Deposit Questionnaire V2 (For local entities that require travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Submit questionnaire for local entities that require travel rule.
    /// The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
    /// yet onboarded with GTR.
    ///
    /// * Questionnaire is different for each local entity, please refer
    /// * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
    ///
    /// Weight: 600
    ///
    /// # Arguments
    ///
    /// - `params`: [`SubmitDepositQuestionnaireV2Params`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SubmitDepositQuestionnaireV2Response>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info-v2).
    ///
    pub async fn submit_deposit_questionnaire_v2(
        &self,
        params: SubmitDepositQuestionnaireV2Params,
    ) -> anyhow::Result<RestApiResponse<models::SubmitDepositQuestionnaireV2Response>> {
        self.travel_rule_api_client
            .submit_deposit_questionnaire_v2(params)
            .await
    }

    /// VASP list (for local entities that require travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Fetch the VASP list for local entities.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`VaspListParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::VaspListResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/onboarded-vasp-list).
    ///
    pub async fn vasp_list(
        &self,
        params: VaspListParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::VaspListResponseInner>>> {
        self.travel_rule_api_client.vasp_list(params).await
    }

    /// Withdraw History (for local entities that require travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Fetch withdraw history for local entities that required travel rule.
    ///
    /// * `network` may not be in the response for old withdraw.
    /// * Please notice the default `startTime` and `endTime` to make sure that time interval is within
    /// * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`WithdrawHistoryV1Params`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::WithdrawHistoryV2ResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History).
    ///
    pub async fn withdraw_history_v1(
        &self,
        params: WithdrawHistoryV1Params,
    ) -> anyhow::Result<RestApiResponse<Vec<models::WithdrawHistoryV2ResponseInner>>> {
        self.travel_rule_api_client
            .withdraw_history_v1(params)
            .await
    }

    /// Withdraw History V2 (for local entities that require travel rule) (supporting network) (`USER_DATA`)
    ///
    /// Fetch withdraw history for local entities that required travel rule.
    ///
    /// * `network` may not be in the response for old withdraw.
    /// * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
    /// * Please notice the default `startTime` and `endTime` to make sure that time interval is within
    /// * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
    /// * If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
    /// * If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
    /// * Maximum support trId,txId number is 45.
    /// * `WithdrawOrderId` only support 1.
    /// * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
    ///
    /// Weight: 1
    ///
    /// # Arguments
    ///
    /// - `params`: [`WithdrawHistoryV2Params`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::WithdrawHistoryV2ResponseInner>>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History-V2).
    ///
    pub async fn withdraw_history_v2(
        &self,
        params: WithdrawHistoryV2Params,
    ) -> anyhow::Result<RestApiResponse<Vec<models::WithdrawHistoryV2ResponseInner>>> {
        self.travel_rule_api_client
            .withdraw_history_v2(params)
            .await
    }

    /// Withdraw (for local entities that require travel rule) (`USER_DATA`)
    ///
    /// Submit a withdrawal request for local entities that required travel rule.
    ///
    /// * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
    /// * You can get `network` and `isDefault` in `networkList` of a coin in the response
    /// * Questionnaire is different for each local entity, please refer to
    /// * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
    ///
    /// Weight: 600
    ///
    /// # Arguments
    ///
    /// - `params`: [`WithdrawTravelRuleParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::WithdrawTravelRuleResponse>`] on success.
    ///
    /// # Errors
    ///
    /// This function will return an [`anyhow::Error`] if:
    /// - the HTTP request fails
    /// - any parameter is invalid
    /// - the response cannot be parsed
    /// - or one of the following occurs:
    ///   - `RequiredError`
    ///   - `ConnectorClientError`
    ///   - `UnauthorizedError`
    ///   - `ForbiddenError`
    ///   - `TooManyRequestsError`
    ///   - `RateLimitBanError`
    ///   - `ServerError`
    ///   - `NotFoundError`
    ///   - `NetworkError`
    ///   - `BadRequestError`
    ///
    ///
    /// For full API details, see the [Binance API Documentation](https://developers.binance.com/docs/wallet/travel-rule/Withdraw).
    ///
    pub async fn withdraw_travel_rule(
        &self,
        params: WithdrawTravelRuleParams,
    ) -> anyhow::Result<RestApiResponse<models::WithdrawTravelRuleResponse>> {
        self.travel_rule_api_client
            .withdraw_travel_rule(params)
            .await
    }
}
