/*
 * Binance Staking REST API
 *
 * OpenAPI Specification for the Binance Staking 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,
    eth_staking_api_client: EthStakingApiClient,
    on_chain_yields_api_client: OnChainYieldsApiClient,
    soft_staking_api_client: SoftStakingApiClient,
    sol_staking_api_client: SolStakingApiClient,
}

impl RestApi {
    pub fn new(configuration: ConfigurationRestApi) -> Self {
        let eth_staking_api_client = EthStakingApiClient::new(configuration.clone());
        let on_chain_yields_api_client = OnChainYieldsApiClient::new(configuration.clone());
        let soft_staking_api_client = SoftStakingApiClient::new(configuration.clone());
        let sol_staking_api_client = SolStakingApiClient::new(configuration.clone());

        Self {
            configuration,
            eth_staking_api_client,
            on_chain_yields_api_client,
            soft_staking_api_client,
            sol_staking_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
    }

    /// ETH Staking `account(USER_DATA)`
    ///
    /// ETH Staking account
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`EthStakingAccountParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::EthStakingAccountResponse>`] 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/staking/eth-staking/account/ETH-Staking-account).
    ///
    pub async fn eth_staking_account(
        &self,
        params: EthStakingAccountParams,
    ) -> anyhow::Result<RestApiResponse<models::EthStakingAccountResponse>> {
        self.eth_staking_api_client
            .eth_staking_account(params)
            .await
    }

    /// Get current ETH staking `quota(USER_DATA)`
    ///
    /// Get current ETH staking quota
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetCurrentEthStakingQuotaParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetCurrentEthStakingQuotaResponse>`] 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/staking/eth-staking/account/Get-current-ETH-staking-quota).
    ///
    pub async fn get_current_eth_staking_quota(
        &self,
        params: GetCurrentEthStakingQuotaParams,
    ) -> anyhow::Result<RestApiResponse<models::GetCurrentEthStakingQuotaResponse>> {
        self.eth_staking_api_client
            .get_current_eth_staking_quota(params)
            .await
    }

    /// Get ETH redemption `history(USER_DATA)`
    ///
    /// Get ETH redemption history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetEthRedemptionHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetEthRedemptionHistoryResponse>`] 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/staking/eth-staking/history/Get-ETH-redemption-history).
    ///
    pub async fn get_eth_redemption_history(
        &self,
        params: GetEthRedemptionHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetEthRedemptionHistoryResponse>> {
        self.eth_staking_api_client
            .get_eth_redemption_history(params)
            .await
    }

    /// Get ETH staking `history(USER_DATA)`
    ///
    /// Get ETH staking history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetEthStakingHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetEthStakingHistoryResponse>`] 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/staking/eth-staking/history/Get-ETH-staking-history).
    ///
    pub async fn get_eth_staking_history(
        &self,
        params: GetEthStakingHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetEthStakingHistoryResponse>> {
        self.eth_staking_api_client
            .get_eth_staking_history(params)
            .await
    }

    /// Get WBETH Rate `History(USER_DATA)`
    ///
    /// Get WBETH Rate History
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetWbethRateHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetWbethRateHistoryResponse>`] 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/staking/eth-staking/history/Get-BETH-Rate-History).
    ///
    pub async fn get_wbeth_rate_history(
        &self,
        params: GetWbethRateHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetWbethRateHistoryResponse>> {
        self.eth_staking_api_client
            .get_wbeth_rate_history(params)
            .await
    }

    /// Get WBETH rewards `history(USER_DATA)`
    ///
    /// Get WBETH rewards history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetWbethRewardsHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetWbethRewardsHistoryResponse>`] 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/staking/eth-staking/history/Get-WBETH-rewards-history).
    ///
    pub async fn get_wbeth_rewards_history(
        &self,
        params: GetWbethRewardsHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetWbethRewardsHistoryResponse>> {
        self.eth_staking_api_client
            .get_wbeth_rewards_history(params)
            .await
    }

    /// Get WBETH unwrap `history(USER_DATA)`
    ///
    /// Get WBETH unwrap history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetWbethUnwrapHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetWbethUnwrapHistoryResponse>`] 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/staking/eth-staking/history/Get-WBETH-unwrap-history).
    ///
    pub async fn get_wbeth_unwrap_history(
        &self,
        params: GetWbethUnwrapHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetWbethUnwrapHistoryResponse>> {
        self.eth_staking_api_client
            .get_wbeth_unwrap_history(params)
            .await
    }

    /// Get WBETH wrap `history(USER_DATA)`
    ///
    /// Get WBETH wrap history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetWbethWrapHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetWbethWrapHistoryResponse>`] 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/staking/eth-staking/history/Get-WBETH-wrap-history).
    ///
    pub async fn get_wbeth_wrap_history(
        &self,
        params: GetWbethWrapHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetWbethWrapHistoryResponse>> {
        self.eth_staking_api_client
            .get_wbeth_wrap_history(params)
            .await
    }

    /// Redeem ETH(TRADE)
    ///
    /// Redeem WBETH or BETH and get ETH
    ///
    /// * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`RedeemEthParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::RedeemEthResponse>`] 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/staking/eth-staking/staking/Redeem-ETH).
    ///
    pub async fn redeem_eth(
        &self,
        params: RedeemEthParams,
    ) -> anyhow::Result<RestApiResponse<models::RedeemEthResponse>> {
        self.eth_staking_api_client.redeem_eth(params).await
    }

    /// Subscribe ETH Staking(TRADE)
    ///
    /// Subscribe ETH Staking
    ///
    /// * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`SubscribeEthStakingParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SubscribeEthStakingResponse>`] 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/staking/eth-staking/staking/Subscribe-ETH-Staking).
    ///
    pub async fn subscribe_eth_staking(
        &self,
        params: SubscribeEthStakingParams,
    ) -> anyhow::Result<RestApiResponse<models::SubscribeEthStakingResponse>> {
        self.eth_staking_api_client
            .subscribe_eth_staking(params)
            .await
    }

    /// Wrap BETH(TRADE)
    ///
    /// Wrap BETH
    ///
    /// * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`WrapBethParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::WrapBethResponse>`] 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/staking/eth-staking/staking/Wrap-BETH).
    ///
    pub async fn wrap_beth(
        &self,
        params: WrapBethParams,
    ) -> anyhow::Result<RestApiResponse<models::WrapBethResponse>> {
        self.eth_staking_api_client.wrap_beth(params).await
    }

    /// Get On-chain Yields Locked Personal Left Quota (`USER_DATA`)
    ///
    /// Get On-chain Yields Locked Personal Left Quota
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOnChainYieldsLockedPersonalLeftQuotaParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetOnChainYieldsLockedPersonalLeftQuotaResponse>`] 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/staking/on-chain-yields/account/Get-Onchain-Locked-Personal-Left-Quota).
    ///
    pub async fn get_on_chain_yields_locked_personal_left_quota(
        &self,
        params: GetOnChainYieldsLockedPersonalLeftQuotaParams,
    ) -> anyhow::Result<RestApiResponse<models::GetOnChainYieldsLockedPersonalLeftQuotaResponse>>
    {
        self.on_chain_yields_api_client
            .get_on_chain_yields_locked_personal_left_quota(params)
            .await
    }

    /// Get On-chain Yields Locked Product List (`USER_DATA`)
    ///
    /// Get available On-chain Yields Locked product list
    ///
    /// * Get available On-chain Yields Locked product list
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOnChainYieldsLockedProductListParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetOnChainYieldsLockedProductListResponse>`] 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/staking/on-chain-yields/account/).
    ///
    pub async fn get_on_chain_yields_locked_product_list(
        &self,
        params: GetOnChainYieldsLockedProductListParams,
    ) -> anyhow::Result<RestApiResponse<models::GetOnChainYieldsLockedProductListResponse>> {
        self.on_chain_yields_api_client
            .get_on_chain_yields_locked_product_list(params)
            .await
    }

    /// Get On-chain Yields Locked Product Position (`USER_DATA`)
    ///
    /// Get On-chain Yields Locked Product Position
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOnChainYieldsLockedProductPositionParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetOnChainYieldsLockedProductPositionResponse>`] 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/staking/on-chain-yields/account/Get-Onchain-Locked-Product-Position).
    ///
    pub async fn get_on_chain_yields_locked_product_position(
        &self,
        params: GetOnChainYieldsLockedProductPositionParams,
    ) -> anyhow::Result<RestApiResponse<models::GetOnChainYieldsLockedProductPositionResponse>>
    {
        self.on_chain_yields_api_client
            .get_on_chain_yields_locked_product_position(params)
            .await
    }

    /// Get On-chain Yields Locked Redemption Record (`USER_DATA`)
    ///
    /// Get On-chain Yields Locked Redemption Record
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOnChainYieldsLockedRedemptionRecordParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetOnChainYieldsLockedRedemptionRecordResponse>`] 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/staking/on-chain-yields/history/Get-Onchain-Locked-Redemption-Record).
    ///
    pub async fn get_on_chain_yields_locked_redemption_record(
        &self,
        params: GetOnChainYieldsLockedRedemptionRecordParams,
    ) -> anyhow::Result<RestApiResponse<models::GetOnChainYieldsLockedRedemptionRecordResponse>>
    {
        self.on_chain_yields_api_client
            .get_on_chain_yields_locked_redemption_record(params)
            .await
    }

    /// Get On-chain Yields Locked Rewards History (`USER_DATA`)
    ///
    /// Get On-chain Yields Locked Rewards History
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOnChainYieldsLockedRewardsHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetOnChainYieldsLockedRewardsHistoryResponse>`] 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/staking/on-chain-yields/history/Get-Onchain-Locked-Rewards-History).
    ///
    pub async fn get_on_chain_yields_locked_rewards_history(
        &self,
        params: GetOnChainYieldsLockedRewardsHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetOnChainYieldsLockedRewardsHistoryResponse>> {
        self.on_chain_yields_api_client
            .get_on_chain_yields_locked_rewards_history(params)
            .await
    }

    /// Get On-chain Yields Locked Subscription Preview (`USER_DATA`)
    ///
    /// Get On-chain Yields Locked Subscription Preview
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOnChainYieldsLockedSubscriptionPreviewParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetOnChainYieldsLockedSubscriptionPreviewResponse>`] 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/staking/on-chain-yields/earn/).
    ///
    pub async fn get_on_chain_yields_locked_subscription_preview(
        &self,
        params: GetOnChainYieldsLockedSubscriptionPreviewParams,
    ) -> anyhow::Result<RestApiResponse<models::GetOnChainYieldsLockedSubscriptionPreviewResponse>>
    {
        self.on_chain_yields_api_client
            .get_on_chain_yields_locked_subscription_preview(params)
            .await
    }

    /// Get On-chain Yields Locked Subscription Record (`USER_DATA`)
    ///
    /// Get On-chain Yields Locked Subscription Record
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetOnChainYieldsLockedSubscriptionRecordParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetOnChainYieldsLockedSubscriptionRecordResponse>`] 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/staking/on-chain-yields/history/).
    ///
    pub async fn get_on_chain_yields_locked_subscription_record(
        &self,
        params: GetOnChainYieldsLockedSubscriptionRecordParams,
    ) -> anyhow::Result<RestApiResponse<models::GetOnChainYieldsLockedSubscriptionRecordResponse>>
    {
        self.on_chain_yields_api_client
            .get_on_chain_yields_locked_subscription_record(params)
            .await
    }

    /// On-chain Yields Account (`USER_DATA`)
    ///
    /// On-chain Yields Account query
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`OnChainYieldsAccountParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::OnChainYieldsAccountResponse>`] 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/staking/on-chain-yields/account/Onchain-Account).
    ///
    pub async fn on_chain_yields_account(
        &self,
        params: OnChainYieldsAccountParams,
    ) -> anyhow::Result<RestApiResponse<models::OnChainYieldsAccountResponse>> {
        self.on_chain_yields_api_client
            .on_chain_yields_account(params)
            .await
    }

    /// Redeem On-chain Yields Locked Product (TRADE)
    ///
    /// Redeem On-chain Yields Locked Product
    ///
    /// * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
    ///
    /// Weight: 1/3s per account
    ///
    /// # Arguments
    ///
    /// - `params`: [`RedeemOnChainYieldsLockedProductParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::RedeemOnChainYieldsLockedProductResponse>`] 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/staking/on-chain-yields/earn/Redeem-Onchain-Locked-Product).
    ///
    pub async fn redeem_on_chain_yields_locked_product(
        &self,
        params: RedeemOnChainYieldsLockedProductParams,
    ) -> anyhow::Result<RestApiResponse<models::RedeemOnChainYieldsLockedProductResponse>> {
        self.on_chain_yields_api_client
            .redeem_on_chain_yields_locked_product(params)
            .await
    }

    /// Set On-chain Yields Locked Auto `Subscribe(USER_DATA)`
    ///
    /// Set On-chain Yield locked auto subscribe
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`SetOnChainYieldsLockedAutoSubscribeParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SetOnChainYieldsLockedAutoSubscribeResponse>`] 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/staking/on-chain-yields/earn/Set-Onchain-Locked-Auto-Subscribe).
    ///
    pub async fn set_on_chain_yields_locked_auto_subscribe(
        &self,
        params: SetOnChainYieldsLockedAutoSubscribeParams,
    ) -> anyhow::Result<RestApiResponse<models::SetOnChainYieldsLockedAutoSubscribeResponse>> {
        self.on_chain_yields_api_client
            .set_on_chain_yields_locked_auto_subscribe(params)
            .await
    }

    /// Set On-chain Yields Locked Product Redeem `Option(USER_DATA)`
    ///
    /// Set On-chain Yields redeem option for Locked product
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`SetOnChainYieldsLockedProductRedeemOptionParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SetOnChainYieldsLockedProductRedeemOptionResponse>`] 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/staking/on-chain-yields/earn/Set-Onchain-Locked-Redeem-Option).
    ///
    pub async fn set_on_chain_yields_locked_product_redeem_option(
        &self,
        params: SetOnChainYieldsLockedProductRedeemOptionParams,
    ) -> anyhow::Result<RestApiResponse<models::SetOnChainYieldsLockedProductRedeemOptionResponse>>
    {
        self.on_chain_yields_api_client
            .set_on_chain_yields_locked_product_redeem_option(params)
            .await
    }

    /// Subscribe On-chain Yields Locked Product(TRADE)
    ///
    /// Subscribe On-chain Yields Locked Product
    ///
    /// * You need to open `Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
    ///
    /// Weight: 200
    ///
    /// # Arguments
    ///
    /// - `params`: [`SubscribeOnChainYieldsLockedProductParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SubscribeOnChainYieldsLockedProductResponse>`] 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/staking/on-chain-yields/earn/Subscribe-Onchain-Locked-Product).
    ///
    pub async fn subscribe_on_chain_yields_locked_product(
        &self,
        params: SubscribeOnChainYieldsLockedProductParams,
    ) -> anyhow::Result<RestApiResponse<models::SubscribeOnChainYieldsLockedProductResponse>> {
        self.on_chain_yields_api_client
            .subscribe_on_chain_yields_locked_product(params)
            .await
    }

    /// Get Soft Staking Product List (`USER_DATA`)
    ///
    /// Get the available Soft Staking product list.
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetSoftStakingProductListParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetSoftStakingProductListResponse>`] 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/staking/soft-staking/).
    ///
    pub async fn get_soft_staking_product_list(
        &self,
        params: GetSoftStakingProductListParams,
    ) -> anyhow::Result<RestApiResponse<models::GetSoftStakingProductListResponse>> {
        self.soft_staking_api_client
            .get_soft_staking_product_list(params)
            .await
    }

    /// Get Soft Staking Rewards `History(USER_DATA)`
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetSoftStakingRewardsHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetSoftStakingRewardsHistoryResponse>`] 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/staking/soft-staking/Get-Soft-Staking-Rewards-History).
    ///
    pub async fn get_soft_staking_rewards_history(
        &self,
        params: GetSoftStakingRewardsHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetSoftStakingRewardsHistoryResponse>> {
        self.soft_staking_api_client
            .get_soft_staking_rewards_history(params)
            .await
    }

    /// Set Soft Staking (`USER_DATA`)
    ///
    /// Enable or disable Soft Staking.
    ///
    /// Weight: 50
    ///
    /// # Arguments
    ///
    /// - `params`: [`SetSoftStakingParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SetSoftStakingResponse>`] 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/staking/soft-staking/Set-Soft-Staking).
    ///
    pub async fn set_soft_staking(
        &self,
        params: SetSoftStakingParams,
    ) -> anyhow::Result<RestApiResponse<models::SetSoftStakingResponse>> {
        self.soft_staking_api_client.set_soft_staking(params).await
    }

    /// Claim Boost Rewards(TRADE)
    ///
    /// Claim Boost APR Airdrop Rewards
    ///
    /// * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`ClaimBoostRewardsParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::ClaimBoostRewardsResponse>`] 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/staking/sol-staking/staking/Claim-Boost-Rewards).
    ///
    pub async fn claim_boost_rewards(
        &self,
        params: ClaimBoostRewardsParams,
    ) -> anyhow::Result<RestApiResponse<models::ClaimBoostRewardsResponse>> {
        self.sol_staking_api_client
            .claim_boost_rewards(params)
            .await
    }

    /// Get BNSOL Rate `History(USER_DATA)`
    ///
    /// Get BNSOL Rate History
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetBnsolRateHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetBnsolRateHistoryResponse>`] 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/staking/sol-staking/history/Get-BNSOL-Rate-History).
    ///
    pub async fn get_bnsol_rate_history(
        &self,
        params: GetBnsolRateHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetBnsolRateHistoryResponse>> {
        self.sol_staking_api_client
            .get_bnsol_rate_history(params)
            .await
    }

    /// Get BNSOL rewards `history(USER_DATA)`
    ///
    /// Get BNSOL rewards history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetBnsolRewardsHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetBnsolRewardsHistoryResponse>`] 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/staking/sol-staking/history/Get-BNSOL-rewards-history).
    ///
    pub async fn get_bnsol_rewards_history(
        &self,
        params: GetBnsolRewardsHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetBnsolRewardsHistoryResponse>> {
        self.sol_staking_api_client
            .get_bnsol_rewards_history(params)
            .await
    }

    /// Get Boost Rewards `History(USER_DATA)`
    ///
    /// Get Boost rewards history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetBoostRewardsHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetBoostRewardsHistoryResponse>`] 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/staking/sol-staking/history/Get-Boost-Rewards-History).
    ///
    pub async fn get_boost_rewards_history(
        &self,
        params: GetBoostRewardsHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetBoostRewardsHistoryResponse>> {
        self.sol_staking_api_client
            .get_boost_rewards_history(params)
            .await
    }

    /// Get SOL redemption `history(USER_DATA)`
    ///
    /// Get SOL redemption history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetSolRedemptionHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetSolRedemptionHistoryResponse>`] 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/staking/sol-staking/history/Get-SOL-redemption-history).
    ///
    pub async fn get_sol_redemption_history(
        &self,
        params: GetSolRedemptionHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetSolRedemptionHistoryResponse>> {
        self.sol_staking_api_client
            .get_sol_redemption_history(params)
            .await
    }

    /// Get SOL staking `history(USER_DATA)`
    ///
    /// Get SOL staking history
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetSolStakingHistoryParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetSolStakingHistoryResponse>`] 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/staking/sol-staking/history/Get-SOL-staking-history).
    ///
    pub async fn get_sol_staking_history(
        &self,
        params: GetSolStakingHistoryParams,
    ) -> anyhow::Result<RestApiResponse<models::GetSolStakingHistoryResponse>> {
        self.sol_staking_api_client
            .get_sol_staking_history(params)
            .await
    }

    /// Get SOL staking quota `details(USER_DATA)`
    ///
    /// Get SOL staking quota
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetSolStakingQuotaDetailsParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::GetSolStakingQuotaDetailsResponse>`] 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/staking/sol-staking/account/Get-SOL-staking-quota-details).
    ///
    pub async fn get_sol_staking_quota_details(
        &self,
        params: GetSolStakingQuotaDetailsParams,
    ) -> anyhow::Result<RestApiResponse<models::GetSolStakingQuotaDetailsResponse>> {
        self.sol_staking_api_client
            .get_sol_staking_quota_details(params)
            .await
    }

    /// Get Unclaimed `Rewards(USER_DATA)`
    ///
    /// Get Unclaimed rewards
    ///
    /// * The time between `startTime` and `endTime` cannot be longer than 3 months.
    /// * If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
    /// * If `startTime` is sent but `endTime` is not sent, the next 30 days' data beginning from `startTime` will be returned.
    /// * If `endTime` is sent but `startTime` is not sent, the 30 days' data before `endTime` will be returned.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`GetUnclaimedRewardsParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<Vec<models::GetUnclaimedRewardsResponseInner>>`] 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/staking/sol-staking/history/Get-Unclaimed-Rewards).
    ///
    pub async fn get_unclaimed_rewards(
        &self,
        params: GetUnclaimedRewardsParams,
    ) -> anyhow::Result<RestApiResponse<Vec<models::GetUnclaimedRewardsResponseInner>>> {
        self.sol_staking_api_client
            .get_unclaimed_rewards(params)
            .await
    }

    /// Redeem SOL(TRADE)
    ///
    /// Redeem BNSOL get SOL
    ///
    /// * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`RedeemSolParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::RedeemSolResponse>`] 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/staking/sol-staking/staking/Redeem-SOL).
    ///
    pub async fn redeem_sol(
        &self,
        params: RedeemSolParams,
    ) -> anyhow::Result<RestApiResponse<models::RedeemSolResponse>> {
        self.sol_staking_api_client.redeem_sol(params).await
    }

    /// SOL Staking `account(USER_DATA)`
    ///
    /// SOL Staking account
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`SolStakingAccountParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SolStakingAccountResponse>`] 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/staking/sol-staking/account/SOL-Staking-account).
    ///
    pub async fn sol_staking_account(
        &self,
        params: SolStakingAccountParams,
    ) -> anyhow::Result<RestApiResponse<models::SolStakingAccountResponse>> {
        self.sol_staking_api_client
            .sol_staking_account(params)
            .await
    }

    /// Subscribe SOL Staking(TRADE)
    ///
    /// Subscribe SOL Staking
    ///
    /// * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
    ///
    /// Weight: 150
    ///
    /// # Arguments
    ///
    /// - `params`: [`SubscribeSolStakingParams`]
    ///   The parameters for this operation.
    ///
    /// # Returns
    ///
    /// [`RestApiResponse<models::SubscribeSolStakingResponse>`] 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/staking/sol-staking/staking/Subscribe-SOL-Staking).
    ///
    pub async fn subscribe_sol_staking(
        &self,
        params: SubscribeSolStakingParams,
    ) -> anyhow::Result<RestApiResponse<models::SubscribeSolStakingResponse>> {
        self.sol_staking_api_client
            .subscribe_sol_staking(params)
            .await
    }
}
