# coding: utf-8

"""
Marketcap Service API

API for retrieving historical marketcap data, available exchanges, and indicators.

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

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

from typing import Any, Awaitable, Dict, List, Optional, Tuple, Union

from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
from typing_extensions import Annotated

from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
from crypticorn.metrics.client.api_response import ApiResponse
from crypticorn.metrics.client.models.exchange_availability import ExchangeAvailability
from crypticorn.metrics.client.models.exchange_mapping import ExchangeMapping
from crypticorn.metrics.client.models.internal_exchange import InternalExchange
from crypticorn.metrics.client.models.market_type import MarketType
from crypticorn.metrics.client.models.time_interval import TimeInterval
from crypticorn.metrics.client.models.trading_status import TradingStatus
from crypticorn.metrics.client.rest import RESTResponseType

# Import async_to_sync for sync methods
try:
    from asgiref.sync import async_to_sync

    _HAS_ASGIREF = True
except ImportError:
    _HAS_ASGIREF = False

    def async_to_sync(async_func):
        """Fallback decorator that raises an error if asgiref is not available."""

        def wrapper(*args, **kwargs):
            raise ImportError(
                "asgiref is required for sync methods. Install with: pip install asgiref"
            )

        return wrapper


class ExchangesApi:
    """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 get_available_exchanges(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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[ExchangeAvailability], Awaitable[List[ExchangeAvailability]]]:
        """Get Available Exchanges"""
        if self.is_sync:
            return self._get_available_exchanges_sync(
                market=market,
                symbol=symbol,
                interval=interval,
                start_timestamp=start_timestamp,
                end_timestamp=end_timestamp,
                quote_currency=quote_currency,
                status=status,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_available_exchanges_async(
                market=market,
                symbol=symbol,
                interval=interval,
                start_timestamp=start_timestamp,
                end_timestamp=end_timestamp,
                quote_currency=quote_currency,
                status=status,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_available_exchanges_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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[ExchangeAvailability]],
        Awaitable[ApiResponse[List[ExchangeAvailability]]],
    ]:
        """Get Available Exchanges with HTTP info"""
        if self.is_sync:
            return self._get_available_exchanges_sync_with_http_info(
                market=market,
                symbol=symbol,
                interval=interval,
                start_timestamp=start_timestamp,
                end_timestamp=end_timestamp,
                quote_currency=quote_currency,
                status=status,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_available_exchanges_async_with_http_info(
                market=market,
                symbol=symbol,
                interval=interval,
                start_timestamp=start_timestamp,
                end_timestamp=end_timestamp,
                quote_currency=quote_currency,
                status=status,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_available_exchanges_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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 Available Exchanges without preloading content"""
        if self.is_sync:
            return self._get_available_exchanges_sync_without_preload_content(
                market=market,
                symbol=symbol,
                interval=interval,
                start_timestamp=start_timestamp,
                end_timestamp=end_timestamp,
                quote_currency=quote_currency,
                status=status,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_available_exchanges_async_without_preload_content(
                market=market,
                symbol=symbol,
                interval=interval,
                start_timestamp=start_timestamp,
                end_timestamp=end_timestamp,
                quote_currency=quote_currency,
                status=status,
                _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_available_exchanges_async(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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[ExchangeAvailability]:
        """Get Available Exchanges

        Get available exchanges for a symbol with various filtering options.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :param symbol: Symbol to fetch available exchanges for (required)
        :type symbol: str
        :param interval: Interval for which to fetch available exchanges
        :type interval: TimeInterval
        :param start_timestamp: Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)
        :type start_timestamp: int
        :param end_timestamp: End timestamp for which to fetch available exchanges
        :type end_timestamp: int
        :param quote_currency: Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)
        :type quote_currency: str
        :param status: Trading pair status for which to fetch available exchanges
        :type status: TradingStatus
        :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_available_exchanges_serialize(
            market=market,
            symbol=symbol,
            interval=interval,
            start_timestamp=start_timestamp,
            end_timestamp=end_timestamp,
            quote_currency=quote_currency,
            status=status,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_available_exchanges_async_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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[ExchangeAvailability]]:
        """Get Available Exchanges

        Get available exchanges for a symbol with various filtering options.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :param symbol: Symbol to fetch available exchanges for (required)
        :type symbol: str
        :param interval: Interval for which to fetch available exchanges
        :type interval: TimeInterval
        :param start_timestamp: Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)
        :type start_timestamp: int
        :param end_timestamp: End timestamp for which to fetch available exchanges
        :type end_timestamp: int
        :param quote_currency: Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)
        :type quote_currency: str
        :param status: Trading pair status for which to fetch available exchanges
        :type status: TradingStatus
        :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_available_exchanges_serialize(
            market=market,
            symbol=symbol,
            interval=interval,
            start_timestamp=start_timestamp,
            end_timestamp=end_timestamp,
            quote_currency=quote_currency,
            status=status,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_available_exchanges_async_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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 Available Exchanges

        Get available exchanges for a symbol with various filtering options.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :param symbol: Symbol to fetch available exchanges for (required)
        :type symbol: str
        :param interval: Interval for which to fetch available exchanges
        :type interval: TimeInterval
        :param start_timestamp: Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)
        :type start_timestamp: int
        :param end_timestamp: End timestamp for which to fetch available exchanges
        :type end_timestamp: int
        :param quote_currency: Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)
        :type quote_currency: str
        :param status: Trading pair status for which to fetch available exchanges
        :type status: TradingStatus
        :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_available_exchanges_serialize(
            market=market,
            symbol=symbol,
            interval=interval,
            start_timestamp=start_timestamp,
            end_timestamp=end_timestamp,
            quote_currency=quote_currency,
            status=status,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

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

    # Private sync implementation methods
    @validate_call
    def _get_available_exchanges_sync(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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[ExchangeAvailability]:
        """Synchronous version of get_available_exchanges"""
        return async_to_sync(self._get_available_exchanges_async)(
            market=market,
            symbol=symbol,
            interval=interval,
            start_timestamp=start_timestamp,
            end_timestamp=end_timestamp,
            quote_currency=quote_currency,
            status=status,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_available_exchanges_sync_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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[ExchangeAvailability]]:
        """Synchronous version of get_available_exchanges_with_http_info"""
        return async_to_sync(self._get_available_exchanges_async_with_http_info)(
            market=market,
            symbol=symbol,
            interval=interval,
            start_timestamp=start_timestamp,
            end_timestamp=end_timestamp,
            quote_currency=quote_currency,
            status=status,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_available_exchanges_sync_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        symbol: Annotated[
            StrictStr, Field(description="Symbol to fetch available exchanges for")
        ],
        interval: Annotated[
            Optional[TimeInterval],
            Field(description="Interval for which to fetch available exchanges"),
        ] = None,
        start_timestamp: Annotated[
            Optional[StrictInt],
            Field(
                description="Start timestamp for which to fetch available exchanges (defaults to previous 7 day's closing)"
            ),
        ] = None,
        end_timestamp: Annotated[
            Optional[StrictInt],
            Field(description="End timestamp for which to fetch available exchanges"),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(
                description="Quote currency for which to fetch available exchanges (Use quote currencies endpoint to get available quote currencies)"
            ),
        ] = None,
        status: Annotated[
            Optional[TradingStatus],
            Field(
                description="Trading pair status for which to fetch available exchanges"
            ),
        ] = 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_available_exchanges_without_preload_content"""
        return async_to_sync(
            self._get_available_exchanges_async_without_preload_content
        )(
            market=market,
            symbol=symbol,
            interval=interval,
            start_timestamp=start_timestamp,
            end_timestamp=end_timestamp,
            quote_currency=quote_currency,
            status=status,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_available_exchanges_serialize(
        self,
        market,
        symbol,
        interval,
        start_timestamp,
        end_timestamp,
        quote_currency,
        status,
        _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 market is not None:

            _query_params.append(("market", market.value))

        if symbol is not None:

            _query_params.append(("symbol", symbol))

        if interval is not None:

            _query_params.append(("interval", interval.value))

        if start_timestamp is not None:

            _query_params.append(("start_timestamp", start_timestamp))

        if end_timestamp is not None:

            _query_params.append(("end_timestamp", end_timestamp))

        if quote_currency is not None:

            _query_params.append(("quote_currency", quote_currency))

        if status is not None:

            _query_params.append(("status", status.value))

        # 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="/exchanges/available",
            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_available_exchanges_for_market(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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[str], Awaitable[List[str]]]:
        """Get Exchange List"""
        if self.is_sync:
            return self._get_available_exchanges_for_market_sync(
                market=market,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_available_exchanges_for_market_async(
                market=market,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_available_exchanges_for_market_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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[str]], Awaitable[ApiResponse[List[str]]]]:
        """Get Exchange List with HTTP info"""
        if self.is_sync:
            return self._get_available_exchanges_for_market_sync_with_http_info(
                market=market,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_available_exchanges_for_market_async_with_http_info(
                market=market,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_available_exchanges_for_market_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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 Exchange List without preloading content"""
        if self.is_sync:
            return (
                self._get_available_exchanges_for_market_sync_without_preload_content(
                    market=market,
                    _request_timeout=_request_timeout,
                    _request_auth=_request_auth,
                    _content_type=_content_type,
                    _headers=_headers,
                    _host_index=_host_index,
                )
            )

        else:
            return (
                self._get_available_exchanges_for_market_async_without_preload_content(
                    market=market,
                    _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_available_exchanges_for_market_async(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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[str]:
        """Get Exchange List

        Get list of exchanges for a market.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :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_available_exchanges_for_market_serialize(
            market=market,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_available_exchanges_for_market_async_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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[str]]:
        """Get Exchange List

        Get list of exchanges for a market.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :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_available_exchanges_for_market_serialize(
            market=market,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_available_exchanges_for_market_async_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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 Exchange List

        Get list of exchanges for a market.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :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_available_exchanges_for_market_serialize(
            market=market,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

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

    # Private sync implementation methods
    @validate_call
    def _get_available_exchanges_for_market_sync(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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[str]:
        """Synchronous version of get_available_exchanges_for_market"""
        return async_to_sync(self._get_available_exchanges_for_market_async)(
            market=market,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_available_exchanges_for_market_sync_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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[str]]:
        """Synchronous version of get_available_exchanges_for_market_with_http_info"""
        return async_to_sync(
            self._get_available_exchanges_for_market_async_with_http_info
        )(
            market=market,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_available_exchanges_for_market_sync_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        _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_available_exchanges_for_market_without_preload_content"""
        return async_to_sync(
            self._get_available_exchanges_for_market_async_without_preload_content
        )(
            market=market,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_available_exchanges_for_market_serialize(
        self,
        market,
        _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 market is not None:

            _query_params.append(("market", market.value))

        # 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="/exchanges/list",
            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_exchange_mappings(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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[ExchangeMapping], Awaitable[List[ExchangeMapping]]]:
        """Get Exchange Mappings"""
        if self.is_sync:
            return self._get_exchange_mappings_sync(
                market=market,
                exchange=exchange,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_exchange_mappings_async(
                market=market,
                exchange=exchange,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_exchange_mappings_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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[ExchangeMapping]],
        Awaitable[ApiResponse[List[ExchangeMapping]]],
    ]:
        """Get Exchange Mappings with HTTP info"""
        if self.is_sync:
            return self._get_exchange_mappings_sync_with_http_info(
                market=market,
                exchange=exchange,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_exchange_mappings_async_with_http_info(
                market=market,
                exchange=exchange,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_exchange_mappings_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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 Exchange Mappings without preloading content"""
        if self.is_sync:
            return self._get_exchange_mappings_sync_without_preload_content(
                market=market,
                exchange=exchange,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_exchange_mappings_async_without_preload_content(
                market=market,
                exchange=exchange,
                _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_exchange_mappings_async(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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[ExchangeMapping]:
        """Get Exchange Mappings

        Get exchange mappings for a market with optional exchange name filter.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :param exchange: Exchange name for which to fetch exchange mappings
        :type exchange: InternalExchange
        :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_exchange_mappings_serialize(
            market=market,
            exchange=exchange,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_exchange_mappings_async_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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[ExchangeMapping]]:
        """Get Exchange Mappings

        Get exchange mappings for a market with optional exchange name filter.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :param exchange: Exchange name for which to fetch exchange mappings
        :type exchange: InternalExchange
        :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_exchange_mappings_serialize(
            market=market,
            exchange=exchange,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_exchange_mappings_async_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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 Exchange Mappings

        Get exchange mappings for a market with optional exchange name filter.

        :param market: Market type (spot or futures) (required)
        :type market: MarketType
        :param exchange: Exchange name for which to fetch exchange mappings
        :type exchange: InternalExchange
        :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_exchange_mappings_serialize(
            market=market,
            exchange=exchange,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

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

    # Private sync implementation methods
    @validate_call
    def _get_exchange_mappings_sync(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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[ExchangeMapping]:
        """Synchronous version of get_exchange_mappings"""
        return async_to_sync(self._get_exchange_mappings_async)(
            market=market,
            exchange=exchange,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_exchange_mappings_sync_with_http_info(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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[ExchangeMapping]]:
        """Synchronous version of get_exchange_mappings_with_http_info"""
        return async_to_sync(self._get_exchange_mappings_async_with_http_info)(
            market=market,
            exchange=exchange,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_exchange_mappings_sync_without_preload_content(
        self,
        market: Annotated[
            MarketType, Field(description="Market type (spot or futures)")
        ],
        exchange: Annotated[
            Optional[InternalExchange],
            Field(description="Exchange name for which to fetch exchange mappings"),
        ] = 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_exchange_mappings_without_preload_content"""
        return async_to_sync(self._get_exchange_mappings_async_without_preload_content)(
            market=market,
            exchange=exchange,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_exchange_mappings_serialize(
        self,
        market,
        exchange,
        _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 market is not None:

            _query_params.append(("market", market.value))

        if exchange is not None:

            _query_params.append(("exchange", exchange.value))

        # 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="/exchanges/mappings",
            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_exchange_mappings_for_pair(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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[ExchangeMapping], Awaitable[List[ExchangeMapping]]]:
        """Get Exchange Mappings For Pair"""
        if self.is_sync:
            return self._get_exchange_mappings_for_pair_sync(
                pair=pair,
                market=market,
                exchange=exchange,
                quote_currency=quote_currency,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_exchange_mappings_for_pair_async(
                pair=pair,
                market=market,
                exchange=exchange,
                quote_currency=quote_currency,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_exchange_mappings_for_pair_with_http_info(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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[ExchangeMapping]],
        Awaitable[ApiResponse[List[ExchangeMapping]]],
    ]:
        """Get Exchange Mappings For Pair with HTTP info"""
        if self.is_sync:
            return self._get_exchange_mappings_for_pair_sync_with_http_info(
                pair=pair,
                market=market,
                exchange=exchange,
                quote_currency=quote_currency,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_exchange_mappings_for_pair_async_with_http_info(
                pair=pair,
                market=market,
                exchange=exchange,
                quote_currency=quote_currency,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

    @validate_call
    def get_exchange_mappings_for_pair_without_preload_content(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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 Exchange Mappings For Pair without preloading content"""
        if self.is_sync:
            return self._get_exchange_mappings_for_pair_sync_without_preload_content(
                pair=pair,
                market=market,
                exchange=exchange,
                quote_currency=quote_currency,
                _request_timeout=_request_timeout,
                _request_auth=_request_auth,
                _content_type=_content_type,
                _headers=_headers,
                _host_index=_host_index,
            )

        else:
            return self._get_exchange_mappings_for_pair_async_without_preload_content(
                pair=pair,
                market=market,
                exchange=exchange,
                quote_currency=quote_currency,
                _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_exchange_mappings_for_pair_async(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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[ExchangeMapping]:
        """Get Exchange Mappings For Pair

        Get exchange mappings for a specific trading pair across all exchanges or a specific exchange. This endpoint finds the underlying symbol for a given pair and returns all perpetual contracts (excluding quarterly/dated contracts) with the specified quote currency.

        :param pair: Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT') (required)
        :type pair: str
        :param market: Market type (spot or futures). Defaults to futures.
        :type market: MarketType
        :param exchange: Optional exchange name to filter by. If not provided, returns all exchanges a match was found for.
        :type exchange: InternalExchange
        :param quote_currency: Quote currency to filter by. Defaults to USDT.
        :type quote_currency: 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_exchange_mappings_for_pair_serialize(
            pair=pair,
            market=market,
            exchange=exchange,
            quote_currency=quote_currency,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_exchange_mappings_for_pair_async_with_http_info(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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[ExchangeMapping]]:
        """Get Exchange Mappings For Pair

        Get exchange mappings for a specific trading pair across all exchanges or a specific exchange. This endpoint finds the underlying symbol for a given pair and returns all perpetual contracts (excluding quarterly/dated contracts) with the specified quote currency.

        :param pair: Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT') (required)
        :type pair: str
        :param market: Market type (spot or futures). Defaults to futures.
        :type market: MarketType
        :param exchange: Optional exchange name to filter by. If not provided, returns all exchanges a match was found for.
        :type exchange: InternalExchange
        :param quote_currency: Quote currency to filter by. Defaults to USDT.
        :type quote_currency: 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_exchange_mappings_for_pair_serialize(
            pair=pair,
            market=market,
            exchange=exchange,
            quote_currency=quote_currency,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

        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_exchange_mappings_for_pair_async_without_preload_content(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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 Exchange Mappings For Pair

        Get exchange mappings for a specific trading pair across all exchanges or a specific exchange. This endpoint finds the underlying symbol for a given pair and returns all perpetual contracts (excluding quarterly/dated contracts) with the specified quote currency.

        :param pair: Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT') (required)
        :type pair: str
        :param market: Market type (spot or futures). Defaults to futures.
        :type market: MarketType
        :param exchange: Optional exchange name to filter by. If not provided, returns all exchanges a match was found for.
        :type exchange: InternalExchange
        :param quote_currency: Quote currency to filter by. Defaults to USDT.
        :type quote_currency: 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_exchange_mappings_for_pair_serialize(
            pair=pair,
            market=market,
            exchange=exchange,
            quote_currency=quote_currency,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

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

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

    # Private sync implementation methods
    @validate_call
    def _get_exchange_mappings_for_pair_sync(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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[ExchangeMapping]:
        """Synchronous version of get_exchange_mappings_for_pair"""
        return async_to_sync(self._get_exchange_mappings_for_pair_async)(
            pair=pair,
            market=market,
            exchange=exchange,
            quote_currency=quote_currency,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_exchange_mappings_for_pair_sync_with_http_info(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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[ExchangeMapping]]:
        """Synchronous version of get_exchange_mappings_for_pair_with_http_info"""
        return async_to_sync(self._get_exchange_mappings_for_pair_async_with_http_info)(
            pair=pair,
            market=market,
            exchange=exchange,
            quote_currency=quote_currency,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    @validate_call
    def _get_exchange_mappings_for_pair_sync_without_preload_content(
        self,
        pair: Annotated[
            StrictStr,
            Field(
                description="Trading pair to find mappings for. Can be exchange specific (e.g., 'BTCUSDT', '1000SHIBUSDT') or a common format Symbol/QuoteCurrency (e.g., 'BTC/USDT')"
            ),
        ],
        market: Annotated[
            Optional[MarketType],
            Field(description="Market type (spot or futures). Defaults to futures."),
        ] = None,
        exchange: Annotated[
            Optional[InternalExchange],
            Field(
                description="Optional exchange name to filter by. If not provided, returns all exchanges a match was found for."
            ),
        ] = None,
        quote_currency: Annotated[
            Optional[StrictStr],
            Field(description="Quote currency to filter by. Defaults to USDT."),
        ] = 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_exchange_mappings_for_pair_without_preload_content"""
        return async_to_sync(
            self._get_exchange_mappings_for_pair_async_without_preload_content
        )(
            pair=pair,
            market=market,
            exchange=exchange,
            quote_currency=quote_currency,
            _request_timeout=_request_timeout,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index,
        )

    def _get_exchange_mappings_for_pair_serialize(
        self,
        pair,
        market,
        exchange,
        quote_currency,
        _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 pair is not None:

            _query_params.append(("pair", pair))

        if market is not None:

            _query_params.append(("market", market.value))

        if exchange is not None:

            _query_params.append(("exchange", exchange.value))

        if quote_currency is not None:

            _query_params.append(("quote_currency", quote_currency))

        # 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="/exchanges/pair-mappings",
            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,
        )
