"""
Binance Copy Trading REST API

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

Do not edit the class manually.
"""

from typing import Optional
from requests import Session
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 ..models import GetFuturesLeadTraderStatusResponse
from ..models import GetFuturesLeadTradingSymbolWhitelistResponse


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

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

    def get_futures_lead_trader_status(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetFuturesLeadTraderStatusResponse]:
        """
                Get Futures Lead Trader Status(TRADE)
                GET /sapi/v1/copyTrading/futures/userStatus
                https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status

                Get Futures Lead Trader Status
        Weight: 20

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

                Returns:
                    ApiResponse[GetFuturesLeadTraderStatusResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

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

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/copyTrading/futures/userStatus",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=GetFuturesLeadTraderStatusResponse,
            is_signed=True,
            signer=self._signer,
        )

    def get_futures_lead_trading_symbol_whitelist(
        self,
        recv_window: Optional[int] = None,
    ) -> ApiResponse[GetFuturesLeadTradingSymbolWhitelistResponse]:
        """
                Get Futures Lead Trading Symbol Whitelist(USER_DATA)
                GET /sapi/v1/copyTrading/futures/leadSymbol
                https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trading-Symbol-Whitelist

                Get Futures Lead Trading Symbol Whitelist
        Weight: 20

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

                Returns:
                    ApiResponse[GetFuturesLeadTradingSymbolWhitelistResponse]

                Raises:
                    RequiredError: If a required parameter is missing.

        """

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

        return send_request(
            self._session,
            self._configuration,
            method="GET",
            path="/sapi/v1/copyTrading/futures/leadSymbol",
            payload=payload,
            body=body,
            time_unit=self._configuration.time_unit,
            response_model=GetFuturesLeadTradingSymbolWhitelistResponse,
            is_signed=True,
            signer=self._signer,
        )
