"""
Binance Staking REST API

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

Do not edit the class manually.
"""

import requests
from typing import Optional, TypeVar
from binance_common.configuration import ConfigurationRestAPI
from binance_common.models import ApiResponse
from binance_common.signature import Signers
from binance_common.utils import send_request
from .api.eth_staking_api import EthStakingApi
from .api.on_chain_yields_api import OnChainYieldsApi
from .api.sol_staking_api import SolStakingApi

from .models import EthStakingAccountResponse
from .models import GetCurrentEthStakingQuotaResponse
from .models import GetEthRedemptionHistoryResponse
from .models import GetEthStakingHistoryResponse
from .models import GetWbethRateHistoryResponse
from .models import GetWbethRewardsHistoryResponse
from .models import GetWbethUnwrapHistoryResponse
from .models import GetWbethWrapHistoryResponse
from .models import RedeemEthResponse
from .models import SubscribeEthStakingResponse
from .models import WrapBethResponse
from .models import GetOnChainYieldsLockedPersonalLeftQuotaResponse
from .models import GetOnChainYieldsLockedProductListResponse
from .models import GetOnChainYieldsLockedProductPositionResponse
from .models import GetOnChainYieldsLockedRedemptionRecordResponse
from .models import GetOnChainYieldsLockedRewardsHistoryResponse
from .models import GetOnChainYieldsLockedSubscriptionPreviewResponse
from .models import GetOnChainYieldsLockedSubscriptionRecordResponse
from .models import OnChainYieldsAccountResponse
from .models import RedeemOnChainYieldsLockedProductResponse
from .models import SetOnChainYieldsLockedAutoSubscribeResponse
from .models import SetOnChainYieldsLockedProductRedeemOptionResponse
from .models import SubscribeOnChainYieldsLockedProductResponse
from .models import ClaimBoostRewardsResponse
from .models import GetBnsolRateHistoryResponse
from .models import GetBnsolRewardsHistoryResponse
from .models import GetBoostRewardsHistoryResponse
from .models import GetSolRedemptionHistoryResponse
from .models import GetSolStakingHistoryResponse
from .models import GetSolStakingQuotaDetailsResponse
from .models import GetUnclaimedRewardsResponse
from .models import RedeemSolResponse
from .models import SolStakingAccountResponse
from .models import SubscribeSolStakingResponse


T = TypeVar("T")


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

        self._ethStakingApi = EthStakingApi(
            self.configuration, self._session, self._signer
        )
        self._onChainYieldsApi = OnChainYieldsApi(
            self.configuration, self._session, self._signer
        )
        self._solStakingApi = SolStakingApi(
            self.configuration, self._session, self._signer
        )

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

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

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

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

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

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

    def eth_staking_account(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[EthStakingAccountResponse]:
        """
                ETH Staking account(USER_DATA)

                ETH Staking account

        Weight: 150

                Args:
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[EthStakingAccountResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.eth_staking_account(recv_window)

    def get_current_eth_staking_quota(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetCurrentEthStakingQuotaResponse]:
        """
                Get current ETH staking quota(USER_DATA)

                Get current ETH staking quota

        Weight: 150

                Args:
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetCurrentEthStakingQuotaResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.get_current_eth_staking_quota(recv_window)

    def get_eth_redemption_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetEthRedemptionHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetEthRedemptionHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.get_eth_redemption_history(
            start_time, end_time, current, size, recv_window
        )

    def get_eth_staking_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetEthStakingHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetEthStakingHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.get_eth_staking_history(
            start_time, end_time, current, size, recv_window
        )

    def get_wbeth_rate_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetWbethRateHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetWbethRateHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.get_wbeth_rate_history(
            start_time, end_time, current, size, recv_window
        )

    def get_wbeth_rewards_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetWbethRewardsHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetWbethRewardsHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.get_wbeth_rewards_history(
            start_time, end_time, current, size, recv_window
        )

    def get_wbeth_unwrap_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetWbethUnwrapHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetWbethUnwrapHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.get_wbeth_unwrap_history(
            start_time, end_time, current, size, recv_window
        )

    def get_wbeth_wrap_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetWbethWrapHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetWbethWrapHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.get_wbeth_wrap_history(
            start_time, end_time, current, size, recv_window
        )

    def redeem_eth(
        self,
        amount: float = None,
        asset: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[RedeemEthResponse]:
        """
                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

                Args:
                    amount (float): Amount in SOL.
                    asset (Optional[str]): WBETH or BETH, default to BETH
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[RedeemEthResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.redeem_eth(amount, asset, recv_window)

    def subscribe_eth_staking(
        self,
        amount: float = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SubscribeEthStakingResponse]:
        """
                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

                Args:
                    amount (float): Amount in SOL.
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[SubscribeEthStakingResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.subscribe_eth_staking(amount, recv_window)

    def wrap_beth(
        self,
        amount: float = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[WrapBethResponse]:
        """
                Wrap BETH(TRADE)

                Wrap BETH

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

        Weight: 150

                Args:
                    amount (float): Amount in SOL.
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[WrapBethResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._ethStakingApi.wrap_beth(amount, recv_window)

    def get_on_chain_yields_locked_personal_left_quota(
        self,
        project_id: str = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetOnChainYieldsLockedPersonalLeftQuotaResponse]:
        """
                Get On-chain Yields Locked Personal Left Quota (USER_DATA)

                Get On-chain Yields Locked Personal Left Quota

        Weight: 50

                Args:
                    project_id (str):
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetOnChainYieldsLockedPersonalLeftQuotaResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.get_on_chain_yields_locked_personal_left_quota(
            project_id, recv_window
        )

    def get_on_chain_yields_locked_product_list(
        self,
        asset: Optional[str] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetOnChainYieldsLockedProductListResponse]:
        """
                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

                Args:
                    asset (Optional[str]): WBETH or BETH, default to BETH
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetOnChainYieldsLockedProductListResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.get_on_chain_yields_locked_product_list(
            asset, current, size, recv_window
        )

    def get_on_chain_yields_locked_product_position(
        self,
        asset: Optional[str] = None,
        position_id: Optional[int] = None,
        project_id: Optional[str] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetOnChainYieldsLockedProductPositionResponse]:
        """
                Get On-chain Yields Locked Product Position (USER_DATA)

                Get On-chain Yields Locked Product Position

        Weight: 50

                Args:
                    asset (Optional[str]): WBETH or BETH, default to BETH
                    position_id (Optional[int]):
                    project_id (Optional[str]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetOnChainYieldsLockedProductPositionResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.get_on_chain_yields_locked_product_position(
            asset, position_id, project_id, current, size, recv_window
        )

    def get_on_chain_yields_locked_redemption_record(
        self,
        position_id: Optional[int] = None,
        redeem_id: Optional[str] = None,
        asset: Optional[str] = None,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetOnChainYieldsLockedRedemptionRecordResponse]:
        """
                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

                Args:
                    position_id (Optional[int]):
                    redeem_id (Optional[str]):
                    asset (Optional[str]): WBETH or BETH, default to BETH
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetOnChainYieldsLockedRedemptionRecordResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.get_on_chain_yields_locked_redemption_record(
            position_id,
            redeem_id,
            asset,
            start_time,
            end_time,
            current,
            size,
            recv_window,
        )

    def get_on_chain_yields_locked_rewards_history(
        self,
        position_id: Optional[str] = None,
        asset: Optional[str] = None,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetOnChainYieldsLockedRewardsHistoryResponse]:
        """
                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

                Args:
                    position_id (Optional[str]):
                    asset (Optional[str]): WBETH or BETH, default to BETH
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetOnChainYieldsLockedRewardsHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.get_on_chain_yields_locked_rewards_history(
            position_id, asset, start_time, end_time, current, size, recv_window
        )

    def get_on_chain_yields_locked_subscription_preview(
        self,
        project_id: str = None,
        amount: float = None,
        auto_subscribe: Optional[bool] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetOnChainYieldsLockedSubscriptionPreviewResponse]:
        """
                Get On-chain Yields Locked Subscription Preview (USER_DATA)

                Get On-chain Yields Locked Subscription Preview

        Weight: 50

                Args:
                    project_id (str):
                    amount (float): Amount in SOL.
                    auto_subscribe (Optional[bool]): true or false, default true.
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetOnChainYieldsLockedSubscriptionPreviewResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.get_on_chain_yields_locked_subscription_preview(
            project_id, amount, auto_subscribe, recv_window
        )

    def get_on_chain_yields_locked_subscription_record(
        self,
        purchase_id: Optional[str] = None,
        client_id: Optional[str] = None,
        asset: Optional[str] = None,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetOnChainYieldsLockedSubscriptionRecordResponse]:
        """
                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

                Args:
                    purchase_id (Optional[str]):
                    client_id (Optional[str]):
                    asset (Optional[str]): WBETH or BETH, default to BETH
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetOnChainYieldsLockedSubscriptionRecordResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.get_on_chain_yields_locked_subscription_record(
            purchase_id,
            client_id,
            asset,
            start_time,
            end_time,
            current,
            size,
            recv_window,
        )

    def on_chain_yields_account(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[OnChainYieldsAccountResponse]:
        """
                On-chain Yields Account (USER_DATA)

                On-chain Yields Account query

        Weight: 50

                Args:
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[OnChainYieldsAccountResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.on_chain_yields_account(recv_window)

    def redeem_on_chain_yields_locked_product(
        self,
        position_id: str = None,
        channel_id: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[RedeemOnChainYieldsLockedProductResponse]:
        """
                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

                Args:
                    position_id (str):
                    channel_id (Optional[str]):
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[RedeemOnChainYieldsLockedProductResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.redeem_on_chain_yields_locked_product(
            position_id, channel_id, recv_window
        )

    def set_on_chain_yields_locked_auto_subscribe(
        self,
        position_id: str = None,
        auto_subscribe: bool = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SetOnChainYieldsLockedAutoSubscribeResponse]:
        """
                Set On-chain Yields Locked Auto Subscribe(USER_DATA)

                Set On-chain Yield locked auto subscribe

        Weight: 50

                Args:
                    position_id (str):
                    auto_subscribe (bool): true or false
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[SetOnChainYieldsLockedAutoSubscribeResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.set_on_chain_yields_locked_auto_subscribe(
            position_id, auto_subscribe, recv_window
        )

    def set_on_chain_yields_locked_product_redeem_option(
        self,
        position_id: str = None,
        redeem_to: str = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SetOnChainYieldsLockedProductRedeemOptionResponse]:
        """
                Set On-chain Yields Locked Product Redeem Option(USER_DATA)

                Set On-chain Yields redeem option for Locked product

        Weight: 50

                Args:
                    position_id (str):
                    redeem_to (str): 'SPOT','FLEXIBLE'
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[SetOnChainYieldsLockedProductRedeemOptionResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.set_on_chain_yields_locked_product_redeem_option(
            position_id, redeem_to, recv_window
        )

    def subscribe_on_chain_yields_locked_product(
        self,
        project_id: str = None,
        amount: float = None,
        auto_subscribe: Optional[bool] = None,
        source_account: Optional[str] = None,
        redeem_to: Optional[str] = None,
        channel_id: Optional[str] = None,
        client_id: Optional[str] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SubscribeOnChainYieldsLockedProductResponse]:
        """
                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

                Args:
                    project_id (str):
                    amount (float): Amount in SOL.
                    auto_subscribe (Optional[bool]): true or false, default true.
                    source_account (Optional[str]): `SPOT`,`FUND`,`ALL`, default `SPOT`
                    redeem_to (Optional[str]): `SPOT`,`FLEXIBLE`, default `FLEXIBLE` Takes effect when Auto Subscribe is false
                    channel_id (Optional[str]):
                    client_id (Optional[str]):
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[SubscribeOnChainYieldsLockedProductResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._onChainYieldsApi.subscribe_on_chain_yields_locked_product(
            project_id,
            amount,
            auto_subscribe,
            source_account,
            redeem_to,
            channel_id,
            client_id,
            recv_window,
        )

    def claim_boost_rewards(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[ClaimBoostRewardsResponse]:
        """
                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

                Args:
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[ClaimBoostRewardsResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.claim_boost_rewards(recv_window)

    def get_bnsol_rate_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetBnsolRateHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetBnsolRateHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.get_bnsol_rate_history(
            start_time, end_time, current, size, recv_window
        )

    def get_bnsol_rewards_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetBnsolRewardsHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetBnsolRewardsHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.get_bnsol_rewards_history(
            start_time, end_time, current, size, recv_window
        )

    def get_boost_rewards_history(
        self,
        type: str = None,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetBoostRewardsHistoryResponse]:
        """
                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

                Args:
                    type (str): "CLAIM", "DISTRIBUTE", default "CLAIM"
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetBoostRewardsHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.get_boost_rewards_history(
            type, start_time, end_time, current, size, recv_window
        )

    def get_sol_redemption_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetSolRedemptionHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetSolRedemptionHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.get_sol_redemption_history(
            start_time, end_time, current, size, recv_window
        )

    def get_sol_staking_history(
        self,
        start_time: Optional[int] = None,
        end_time: Optional[int] = None,
        current: Optional[int] = None,
        size: Optional[int] = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetSolStakingHistoryResponse]:
        """
                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

                Args:
                    start_time (Optional[int]):
                    end_time (Optional[int]):
                    current (Optional[int]): Currently querying page. Start from 1. Default:1
                    size (Optional[int]): Default:10, Max:100
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetSolStakingHistoryResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.get_sol_staking_history(
            start_time, end_time, current, size, recv_window
        )

    def get_sol_staking_quota_details(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetSolStakingQuotaDetailsResponse]:
        """
                Get SOL staking quota details(USER_DATA)

                Get SOL staking quota

        Weight: 150

                Args:
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetSolStakingQuotaDetailsResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.get_sol_staking_quota_details(recv_window)

    def get_unclaimed_rewards(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetUnclaimedRewardsResponse]:
        """
                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

                Args:
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[GetUnclaimedRewardsResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.get_unclaimed_rewards(recv_window)

    def redeem_sol(
        self,
        amount: float = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[RedeemSolResponse]:
        """
                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

                Args:
                    amount (float): Amount in SOL.
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[RedeemSolResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.redeem_sol(amount, recv_window)

    def sol_staking_account(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SolStakingAccountResponse]:
        """
                SOL Staking account(USER_DATA)

                SOL Staking account

        Weight: 150

                Args:
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[SolStakingAccountResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.sol_staking_account(recv_window)

    def subscribe_sol_staking(
        self,
        amount: float = None,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[SubscribeSolStakingResponse]:
        """
                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

                Args:
                    amount (float): Amount in SOL.
                    recv_window (Optional[int]):

                Returns:
                    ApiResponse[SubscribeSolStakingResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

        return self._solStakingApi.subscribe_sol_staking(amount, recv_window)
