# coding: utf-8

"""
Trading API

API for automated trading and exchange interface. This API is used to trade on the exchange and manage bots, API keys, orders, and more.

The version of the OpenAPI document: 2.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
"""  # noqa: E501

from asgiref.sync import async_to_sync
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union, Awaitable
from typing_extensions import Annotated

from pydantic import StrictBool
from crypticorn.trade.client.models.bot import Bot
from crypticorn.trade.client.models.bot_create import BotCreate
from crypticorn.trade.client.models.bot_update import BotUpdate
from crypticorn.trade.client.models.paginated_response_futures_trading_action import (
    PaginatedResponseFuturesTradingAction,
)
from crypticorn.trade.client.models.paginated_response_order import (
    PaginatedResponseOrder,
)
from crypticorn.trade.client.models.pn_l import PnL
from crypticorn.trade.client.models.vault_bot import VaultBot

from crypticorn.trade.client.api_client import ApiClient, RequestSerialized
from crypticorn.trade.client.api_response import ApiResponse
from crypticorn.trade.client.rest import RESTResponseType


class BotsApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None, is_sync: bool = False) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client
        self.is_sync = is_sync

    @validate_call
    def create_bot(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[Bot, Awaitable[Bot]]:
        """Create Bot"""
        if self.is_sync:
            return self._create_bot_sync(
                bot_create=bot_create,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._create_bot_async(
                bot_create=bot_create,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def create_bot_with_http_info(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[ApiResponse[Bot], Awaitable[ApiResponse[Bot]]]:
        """Create Bot with HTTP info"""
        if self.is_sync:
            return self._create_bot_sync_with_http_info(
                bot_create=bot_create,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._create_bot_async_with_http_info(
                bot_create=bot_create,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def create_bot_without_preload_content(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[RESTResponseType, Awaitable[RESTResponseType]]:
        """Create Bot without preloading content"""
        if self.is_sync:
            return self._create_bot_sync_without_preload_content(
                bot_create=bot_create,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._create_bot_async_without_preload_content(
                bot_create=bot_create,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    # Private async implementation methods
    @validate_call
    async def _create_bot_async(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Bot:
        """Create Bot

        Creates a new bot.

        :param bot_create: (required)
        :type bot_create: BotCreate
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._create_bot_serialize(
            bot_create=bot_create,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "201": "Bot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def _create_bot_async_with_http_info(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[Bot]:
        """Create Bot

        Creates a new bot.

        :param bot_create: (required)
        :type bot_create: BotCreate
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._create_bot_serialize(
            bot_create=bot_create,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "201": "Bot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data, response_types_map=_response_types_map
        )

    @validate_call
    async def _create_bot_async_without_preload_content(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Create Bot

        Creates a new bot.

        :param bot_create: (required)
        :type bot_create: BotCreate
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._create_bot_serialize(
            bot_create=bot_create,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "201": "Bot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data

    # Private sync implementation methods
    @validate_call
    def _create_bot_sync(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Bot:
        """Synchronous version of create_bot"""
        return async_to_sync(self._create_bot_async)(
            bot_create=bot_create,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _create_bot_sync_with_http_info(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[Bot]:
        """Synchronous version of create_bot_with_http_info"""
        return async_to_sync(self._create_bot_async_with_http_info)(
            bot_create=bot_create,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _create_bot_sync_without_preload_content(
        self,
        bot_create: BotCreate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Synchronous version of create_bot_without_preload_content"""
        return async_to_sync(self._create_bot_async_without_preload_content)(
            bot_create=bot_create,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _create_bot_serialize(
        self,
        bot_create,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if bot_create is not None:
            _body_params = bot_create

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params["Content-Type"] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ["application/json"]
            )
            if _default_content_type is not None:
                _header_params["Content-Type"] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]

        return self.api_client.param_serialize(
            method="POST",
            resource_path="/bots",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def get_bot(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[VaultBot, Awaitable[VaultBot]]:
        """Get Bot"""
        if self.is_sync:
            return self._get_bot_sync(
                id=id,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_async(
                id=id,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bot_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[ApiResponse[VaultBot], Awaitable[ApiResponse[VaultBot]]]:
        """Get Bot with HTTP info"""
        if self.is_sync:
            return self._get_bot_sync_with_http_info(
                id=id,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_async_with_http_info(
                id=id,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bot_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[RESTResponseType, Awaitable[RESTResponseType]]:
        """Get Bot without preloading content"""
        if self.is_sync:
            return self._get_bot_sync_without_preload_content(
                id=id,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_async_without_preload_content(
                id=id,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    # Private async implementation methods
    @validate_call
    async def _get_bot_async(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> VaultBot:
        """Get Bot

        Returns a bot.

        :param id: The ID of the bot (required)
        :type id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "VaultBot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def _get_bot_async_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[VaultBot]:
        """Get Bot

        Returns a bot.

        :param id: The ID of the bot (required)
        :type id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "VaultBot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data, response_types_map=_response_types_map
        )

    @validate_call
    async def _get_bot_async_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get Bot

        Returns a bot.

        :param id: The ID of the bot (required)
        :type id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "VaultBot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data

    # Private sync implementation methods
    @validate_call
    def _get_bot_sync(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> VaultBot:
        """Synchronous version of get_bot"""
        return async_to_sync(self._get_bot_async)(
            id=id,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bot_sync_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[VaultBot]:
        """Synchronous version of get_bot_with_http_info"""
        return async_to_sync(self._get_bot_async_with_http_info)(
            id=id,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bot_sync_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Synchronous version of get_bot_without_preload_content"""
        return async_to_sync(self._get_bot_async_without_preload_content)(
            id=id,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_bot_serialize(
        self,
        id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if id is not None:
            _path_params["id"] = id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/bots/{id}",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def get_bot_actions(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[
        PaginatedResponseFuturesTradingAction,
        Awaitable[PaginatedResponseFuturesTradingAction],
    ]:
        """Get Bot Actions"""
        if self.is_sync:
            return self._get_bot_actions_sync(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_actions_async(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bot_actions_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[
        ApiResponse[PaginatedResponseFuturesTradingAction],
        Awaitable[ApiResponse[PaginatedResponseFuturesTradingAction]],
    ]:
        """Get Bot Actions with HTTP info"""
        if self.is_sync:
            return self._get_bot_actions_sync_with_http_info(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_actions_async_with_http_info(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bot_actions_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[RESTResponseType, Awaitable[RESTResponseType]]:
        """Get Bot Actions without preloading content"""
        if self.is_sync:
            return self._get_bot_actions_sync_without_preload_content(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_actions_async_without_preload_content(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    # Private async implementation methods
    @validate_call
    async def _get_bot_actions_async(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseFuturesTradingAction:
        """Get Bot Actions

        Get all orders for a bot

        :param id: The ID of the bot (required)
        :type id: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param page: The current page number
        :type page: int
        :param page_size: The number of items per page. Default is 100, max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_actions_serialize(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseFuturesTradingAction",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def _get_bot_actions_async_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
        """Get Bot Actions

        Get all orders for a bot

        :param id: The ID of the bot (required)
        :type id: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param page: The current page number
        :type page: int
        :param page_size: The number of items per page. Default is 100, max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_actions_serialize(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseFuturesTradingAction",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data, response_types_map=_response_types_map
        )

    @validate_call
    async def _get_bot_actions_async_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get Bot Actions

        Get all orders for a bot

        :param id: The ID of the bot (required)
        :type id: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param page: The current page number
        :type page: int
        :param page_size: The number of items per page. Default is 100, max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_actions_serialize(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseFuturesTradingAction",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data

    # Private sync implementation methods
    @validate_call
    def _get_bot_actions_sync(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseFuturesTradingAction:
        """Synchronous version of get_bot_actions"""
        return async_to_sync(self._get_bot_actions_async)(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bot_actions_sync_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseFuturesTradingAction]:
        """Synchronous version of get_bot_actions_with_http_info"""
        return async_to_sync(self._get_bot_actions_async_with_http_info)(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bot_actions_sync_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Synchronous version of get_bot_actions_without_preload_content"""
        return async_to_sync(self._get_bot_actions_async_without_preload_content)(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_bot_actions_serialize(
        self,
        id,
        sort_order,
        sort_by,
        filter_by,
        filter_value,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if id is not None:
            _path_params["id"] = id
        # process the query parameters
        if sort_order is not None:
            _query_params.append(("sort_order", sort_order))

        if sort_by is not None:
            _query_params.append(("sort_by", sort_by))

        if filter_by is not None:
            _query_params.append(("filter_by", filter_by))

        if filter_value is not None:
            _query_params.append(("filter_value", filter_value))

        if page is not None:
            _query_params.append(("page", page))

        if page_size is not None:
            _query_params.append(("page_size", page_size))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/bots/{id}/actions",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def get_bot_orders(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[PaginatedResponseOrder, Awaitable[PaginatedResponseOrder]]:
        """Get Bot Orders"""
        if self.is_sync:
            return self._get_bot_orders_sync(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_orders_async(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bot_orders_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[
        ApiResponse[PaginatedResponseOrder],
        Awaitable[ApiResponse[PaginatedResponseOrder]],
    ]:
        """Get Bot Orders with HTTP info"""
        if self.is_sync:
            return self._get_bot_orders_sync_with_http_info(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_orders_async_with_http_info(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bot_orders_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[RESTResponseType, Awaitable[RESTResponseType]]:
        """Get Bot Orders without preloading content"""
        if self.is_sync:
            return self._get_bot_orders_sync_without_preload_content(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bot_orders_async_without_preload_content(
                id=id,
                sort_order=sort_order,
                sort_by=sort_by,
                filter_by=filter_by,
                filter_value=filter_value,
                page=page,
                page_size=page_size,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    # Private async implementation methods
    @validate_call
    async def _get_bot_orders_async(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseOrder:
        """Get Bot Orders

        Get all orders for a bot. Default sort is `created_at` and default order is `desc`.

        :param id: The ID of the bot (required)
        :type id: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param page: The current page number
        :type page: int
        :param page_size: The number of items per page. Default is 100, max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_orders_serialize(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseOrder",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def _get_bot_orders_async_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseOrder]:
        """Get Bot Orders

        Get all orders for a bot. Default sort is `created_at` and default order is `desc`.

        :param id: The ID of the bot (required)
        :type id: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param page: The current page number
        :type page: int
        :param page_size: The number of items per page. Default is 100, max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_orders_serialize(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseOrder",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data, response_types_map=_response_types_map
        )

    @validate_call
    async def _get_bot_orders_async_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get Bot Orders

        Get all orders for a bot. Default sort is `created_at` and default order is `desc`.

        :param id: The ID of the bot (required)
        :type id: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param page: The current page number
        :type page: int
        :param page_size: The number of items per page. Default is 100, max is 1000.
        :type page_size: int
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bot_orders_serialize(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "PaginatedResponseOrder",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data

    # Private sync implementation methods
    @validate_call
    def _get_bot_orders_sync(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PaginatedResponseOrder:
        """Synchronous version of get_bot_orders"""
        return async_to_sync(self._get_bot_orders_async)(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bot_orders_sync_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PaginatedResponseOrder]:
        """Synchronous version of get_bot_orders_with_http_info"""
        return async_to_sync(self._get_bot_orders_async_with_http_info)(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bot_orders_sync_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        page: Annotated[
            Optional[StrictInt], Field(description="The current page number")
        ] = None,
        page_size: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items per page. Default is 100, max is 1000."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Synchronous version of get_bot_orders_without_preload_content"""
        return async_to_sync(self._get_bot_orders_async_without_preload_content)(
            id=id,
            sort_order=sort_order,
            sort_by=sort_by,
            filter_by=filter_by,
            filter_value=filter_value,
            page=page,
            page_size=page_size,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_bot_orders_serialize(
        self,
        id,
        sort_order,
        sort_by,
        filter_by,
        filter_value,
        page,
        page_size,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if id is not None:
            _path_params["id"] = id
        # process the query parameters
        if sort_order is not None:
            _query_params.append(("sort_order", sort_order))

        if sort_by is not None:
            _query_params.append(("sort_by", sort_by))

        if filter_by is not None:
            _query_params.append(("filter_by", filter_by))

        if filter_value is not None:
            _query_params.append(("filter_value", filter_value))

        if page is not None:
            _query_params.append(("page", page))

        if page_size is not None:
            _query_params.append(("page_size", page_size))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/bots/{id}/orders",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def get_bots(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[List[VaultBot], Awaitable[List[VaultBot]]]:
        """Get Bots"""
        if self.is_sync:
            return self._get_bots_sync(
                filter_by=filter_by,
                filter_value=filter_value,
                sort_order=sort_order,
                sort_by=sort_by,
                include_deleted=include_deleted,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bots_async(
                filter_by=filter_by,
                filter_value=filter_value,
                sort_order=sort_order,
                sort_by=sort_by,
                include_deleted=include_deleted,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bots_with_http_info(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[ApiResponse[List[VaultBot]], Awaitable[ApiResponse[List[VaultBot]]]]:
        """Get Bots with HTTP info"""
        if self.is_sync:
            return self._get_bots_sync_with_http_info(
                filter_by=filter_by,
                filter_value=filter_value,
                sort_order=sort_order,
                sort_by=sort_by,
                include_deleted=include_deleted,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bots_async_with_http_info(
                filter_by=filter_by,
                filter_value=filter_value,
                sort_order=sort_order,
                sort_by=sort_by,
                include_deleted=include_deleted,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bots_without_preload_content(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[RESTResponseType, Awaitable[RESTResponseType]]:
        """Get Bots without preloading content"""
        if self.is_sync:
            return self._get_bots_sync_without_preload_content(
                filter_by=filter_by,
                filter_value=filter_value,
                sort_order=sort_order,
                sort_by=sort_by,
                include_deleted=include_deleted,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bots_async_without_preload_content(
                filter_by=filter_by,
                filter_value=filter_value,
                sort_order=sort_order,
                sort_by=sort_by,
                include_deleted=include_deleted,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    # Private async implementation methods
    @validate_call
    async def _get_bots_async(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> List[VaultBot]:
        """Get Bots

        Returns all bots. Default sort is by created_at, descending. Deleted bots are included by default.

        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param include_deleted: Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True.
        :type include_deleted: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bots_serialize(
            filter_by=filter_by,
            filter_value=filter_value,
            sort_order=sort_order,
            sort_by=sort_by,
            include_deleted=include_deleted,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "List[VaultBot]",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def _get_bots_async_with_http_info(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[List[VaultBot]]:
        """Get Bots

        Returns all bots. Default sort is by created_at, descending. Deleted bots are included by default.

        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param include_deleted: Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True.
        :type include_deleted: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bots_serialize(
            filter_by=filter_by,
            filter_value=filter_value,
            sort_order=sort_order,
            sort_by=sort_by,
            include_deleted=include_deleted,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "List[VaultBot]",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data, response_types_map=_response_types_map
        )

    @validate_call
    async def _get_bots_async_without_preload_content(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get Bots

        Returns all bots. Default sort is by created_at, descending. Deleted bots are included by default.

        :param filter_by: The field to filter by
        :type filter_by: str
        :param filter_value: The value to filter with
        :type filter_value: str
        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param include_deleted: Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True.
        :type include_deleted: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bots_serialize(
            filter_by=filter_by,
            filter_value=filter_value,
            sort_order=sort_order,
            sort_by=sort_by,
            include_deleted=include_deleted,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "List[VaultBot]",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data

    # Private sync implementation methods
    @validate_call
    def _get_bots_sync(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> List[VaultBot]:
        """Synchronous version of get_bots"""
        return async_to_sync(self._get_bots_async)(
            filter_by=filter_by,
            filter_value=filter_value,
            sort_order=sort_order,
            sort_by=sort_by,
            include_deleted=include_deleted,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bots_sync_with_http_info(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[List[VaultBot]]:
        """Synchronous version of get_bots_with_http_info"""
        return async_to_sync(self._get_bots_async_with_http_info)(
            filter_by=filter_by,
            filter_value=filter_value,
            sort_order=sort_order,
            sort_by=sort_by,
            include_deleted=include_deleted,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bots_sync_without_preload_content(
        self,
        filter_by: Annotated[
            Optional[StrictStr], Field(description="The field to filter by")
        ] = None,
        filter_value: Annotated[
            Optional[StrictStr], Field(description="The value to filter with")
        ] = None,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        include_deleted: Annotated[
            Optional[StrictBool],
            Field(
                description="Whether to include deleted bots. Filter by status takes precedence over this. Defaults to True."
            ),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Synchronous version of get_bots_without_preload_content"""
        return async_to_sync(self._get_bots_async_without_preload_content)(
            filter_by=filter_by,
            filter_value=filter_value,
            sort_order=sort_order,
            sort_by=sort_by,
            include_deleted=include_deleted,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_bots_serialize(
        self,
        filter_by,
        filter_value,
        sort_order,
        sort_by,
        include_deleted,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if filter_by is not None:
            _query_params.append(("filter_by", filter_by))

        if filter_value is not None:
            _query_params.append(("filter_value", filter_value))

        if sort_order is not None:
            _query_params.append(("sort_order", sort_order))

        if sort_by is not None:
            _query_params.append(("sort_by", sort_by))

        if include_deleted is not None:
            _query_params.append(("include_deleted", include_deleted))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/bots",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def get_bots_pnl(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[Dict[str, List[PnL]], Awaitable[Dict[str, List[PnL]]]]:
        """Get Bots Pnl"""
        if self.is_sync:
            return self._get_bots_pnl_sync(
                sort_order=sort_order,
                sort_by=sort_by,
                window=window,
                period=period,
                limit=limit,
                type=type,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bots_pnl_async(
                sort_order=sort_order,
                sort_by=sort_by,
                window=window,
                period=period,
                limit=limit,
                type=type,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bots_pnl_with_http_info(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[
        ApiResponse[Dict[str, List[PnL]]], Awaitable[ApiResponse[Dict[str, List[PnL]]]]
    ]:
        """Get Bots Pnl with HTTP info"""
        if self.is_sync:
            return self._get_bots_pnl_sync_with_http_info(
                sort_order=sort_order,
                sort_by=sort_by,
                window=window,
                period=period,
                limit=limit,
                type=type,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bots_pnl_async_with_http_info(
                sort_order=sort_order,
                sort_by=sort_by,
                window=window,
                period=period,
                limit=limit,
                type=type,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_bots_pnl_without_preload_content(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[RESTResponseType, Awaitable[RESTResponseType]]:
        """Get Bots Pnl without preloading content"""
        if self.is_sync:
            return self._get_bots_pnl_sync_without_preload_content(
                sort_order=sort_order,
                sort_by=sort_by,
                window=window,
                period=period,
                limit=limit,
                type=type,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_bots_pnl_async_without_preload_content(
                sort_order=sort_order,
                sort_by=sort_by,
                window=window,
                period=period,
                limit=limit,
                type=type,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    # Private async implementation methods
    @validate_call
    async def _get_bots_pnl_async(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Dict[str, List[PnL]]:
        """Get Bots Pnl

        Returns a dictionary of PnLs for multiple bots over time, sorted by `timestamp` ascending by default.  If more than 1000 per bot data points exist, PnLs are grouped by day.  For relative type, uses TWR-style cumulative percentage returns. For absolute type, uses traditional cumulative PnL calculation.

        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param window: Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range.
        :type window: str
        :param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
        :type period: int
        :param limit: The number of items to return. Defaults to None, meaning no limit.
        :type limit: int
        :param type: The type of PnL to return. Defaults to relative.
        :type type: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bots_pnl_serialize(
            sort_order=sort_order,
            sort_by=sort_by,
            window=window,
            period=period,
            limit=limit,
            type=type,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "Dict[str, List[PnL]]",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def _get_bots_pnl_async_with_http_info(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[Dict[str, List[PnL]]]:
        """Get Bots Pnl

        Returns a dictionary of PnLs for multiple bots over time, sorted by `timestamp` ascending by default.  If more than 1000 per bot data points exist, PnLs are grouped by day.  For relative type, uses TWR-style cumulative percentage returns. For absolute type, uses traditional cumulative PnL calculation.

        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param window: Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range.
        :type window: str
        :param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
        :type period: int
        :param limit: The number of items to return. Defaults to None, meaning no limit.
        :type limit: int
        :param type: The type of PnL to return. Defaults to relative.
        :type type: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bots_pnl_serialize(
            sort_order=sort_order,
            sort_by=sort_by,
            window=window,
            period=period,
            limit=limit,
            type=type,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "Dict[str, List[PnL]]",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data, response_types_map=_response_types_map
        )

    @validate_call
    async def _get_bots_pnl_async_without_preload_content(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Get Bots Pnl

        Returns a dictionary of PnLs for multiple bots over time, sorted by `timestamp` ascending by default.  If more than 1000 per bot data points exist, PnLs are grouped by day.  For relative type, uses TWR-style cumulative percentage returns. For absolute type, uses traditional cumulative PnL calculation.

        :param sort_order: The order to sort by
        :type sort_order: str
        :param sort_by: The field to sort by
        :type sort_by: str
        :param window: Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range.
        :type window: str
        :param period: The number of days to return the PnL for. Only used if `window` is `period`. Default is 30.
        :type period: int
        :param limit: The number of items to return. Defaults to None, meaning no limit.
        :type limit: int
        :param type: The type of PnL to return. Defaults to relative.
        :type type: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._get_bots_pnl_serialize(
            sort_order=sort_order,
            sort_by=sort_by,
            window=window,
            period=period,
            limit=limit,
            type=type,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "Dict[str, List[PnL]]",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data

    # Private sync implementation methods
    @validate_call
    def _get_bots_pnl_sync(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Dict[str, List[PnL]]:
        """Synchronous version of get_bots_pnl"""
        return async_to_sync(self._get_bots_pnl_async)(
            sort_order=sort_order,
            sort_by=sort_by,
            window=window,
            period=period,
            limit=limit,
            type=type,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bots_pnl_sync_with_http_info(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[Dict[str, List[PnL]]]:
        """Synchronous version of get_bots_pnl_with_http_info"""
        return async_to_sync(self._get_bots_pnl_async_with_http_info)(
            sort_order=sort_order,
            sort_by=sort_by,
            window=window,
            period=period,
            limit=limit,
            type=type,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_bots_pnl_sync_without_preload_content(
        self,
        sort_order: Annotated[
            Optional[StrictStr], Field(description="The order to sort by")
        ] = None,
        sort_by: Annotated[
            Optional[StrictStr], Field(description="The field to sort by")
        ] = None,
        window: Annotated[
            Optional[StrictStr],
            Field(
                description="Time window for PnL. Defaults to full (all time), or use period (last X days), month, quarter, or year for values since the start of that range."
            ),
        ] = None,
        period: Annotated[
            Optional[Annotated[int, Field(le=365, strict=True, ge=1)]],
            Field(
                description="The number of days to return the PnL for. Only used if `window` is `period`. Default is 30."
            ),
        ] = None,
        limit: Annotated[
            Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]],
            Field(
                description="The number of items to return. Defaults to None, meaning no limit."
            ),
        ] = None,
        type: Annotated[
            Optional[StrictStr],
            Field(description="The type of PnL to return. Defaults to relative."),
        ] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Synchronous version of get_bots_pnl_without_preload_content"""
        return async_to_sync(self._get_bots_pnl_async_without_preload_content)(
            sort_order=sort_order,
            sort_by=sort_by,
            window=window,
            period=period,
            limit=limit,
            type=type,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_bots_pnl_serialize(
        self,
        sort_order,
        sort_by,
        window,
        period,
        limit,
        type,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        # process the query parameters
        if sort_order is not None:
            _query_params.append(("sort_order", sort_order))

        if sort_by is not None:
            _query_params.append(("sort_by", sort_by))

        if window is not None:
            _query_params.append(("window", window))

        if period is not None:
            _query_params.append(("period", period))

        if limit is not None:
            _query_params.append(("limit", limit))

        if type is not None:
            _query_params.append(("type", type))

        # process the header parameters
        # process the form parameters
        # process the body parameter

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # authentication setting
        _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]

        return self.api_client.param_serialize(
            method="GET",
            resource_path="/bots/orders/pnl",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )

    @validate_call
    def update_bot(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[Bot, Awaitable[Bot]]:
        """Update Bot"""
        if self.is_sync:
            return self._update_bot_sync(
                id=id,
                bot_update=bot_update,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._update_bot_async(
                id=id,
                bot_update=bot_update,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def update_bot_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[ApiResponse[Bot], Awaitable[ApiResponse[Bot]]]:
        """Update Bot with HTTP info"""
        if self.is_sync:
            return self._update_bot_sync_with_http_info(
                id=id,
                bot_update=bot_update,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._update_bot_async_with_http_info(
                id=id,
                bot_update=bot_update,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def update_bot_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Union[RESTResponseType, Awaitable[RESTResponseType]]:
        """Update Bot without preloading content"""
        if self.is_sync:
            return self._update_bot_sync_without_preload_content(
                id=id,
                bot_update=bot_update,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._update_bot_async_without_preload_content(
                id=id,
                bot_update=bot_update,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    # Private async implementation methods
    @validate_call
    async def _update_bot_async(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Bot:
        """Update Bot

        Updates a bot.

        :param id: The ID of the bot (required)
        :type id: str
        :param bot_update: (required)
        :type bot_update: BotUpdate
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._update_bot_serialize(
            id=id,
            bot_update=bot_update,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "Bot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    async def _update_bot_async_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[Bot]:
        """Update Bot

        Updates a bot.

        :param id: The ID of the bot (required)
        :type id: str
        :param bot_update: (required)
        :type bot_update: BotUpdate
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._update_bot_serialize(
            id=id,
            bot_update=bot_update,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "Bot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        await response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data, response_types_map=_response_types_map
        )

    @validate_call
    async def _update_bot_async_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Update Bot

        Updates a bot.

        :param id: The ID of the bot (required)
        :type id: str
        :param bot_update: (required)
        :type bot_update: BotUpdate
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """  # noqa: E501

        _param = self._update_bot_serialize(
            id=id,
            bot_update=bot_update,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

        _response_types_map: Dict[str, Optional[str]] = {
            "200": "Bot",
        }

        response_data = await self.api_client.call_api(
            *_param, _request_timeout=_request_timeout
        )
        return response_data

    # Private sync implementation methods
    @validate_call
    def _update_bot_sync(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> Bot:
        """Synchronous version of update_bot"""
        return async_to_sync(self._update_bot_async)(
            id=id,
            bot_update=bot_update,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _update_bot_sync_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[Bot]:
        """Synchronous version of update_bot_with_http_info"""
        return async_to_sync(self._update_bot_async_with_http_info)(
            id=id,
            bot_update=bot_update,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _update_bot_sync_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The ID of the bot")],
        bot_update: BotUpdate,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
            ],
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """Synchronous version of update_bot_without_preload_content"""
        return async_to_sync(self._update_bot_async_without_preload_content)(
            id=id,
            bot_update=bot_update,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _update_bot_serialize(
        self,
        id,
        bot_update,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:
        _host = None

        _collection_formats: Dict[str, str] = {}

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if id is not None:
            _path_params["id"] = id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if bot_update is not None:
            _body_params = bot_update

        # set the HTTP header `Accept`
        if "Accept" not in _header_params:
            _header_params["Accept"] = self.api_client.select_header_accept(
                ["application/json"]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params["Content-Type"] = _content_type
        else:
            _default_content_type = self.api_client.select_header_content_type(
                ["application/json"]
            )
            if _default_content_type is not None:
                _header_params["Content-Type"] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]

        return self.api_client.param_serialize(
            method="PUT",
            resource_path="/bots/{id}",
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth,
        )
