# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from ..types.countries_list import CountriesList
from ..types.cursor_page_t_customized_historical_raw_tick import CursorPageTCustomizedHistoricalRawTick
from ..types.cursor_page_t_customized_news_out import CursorPageTCustomizedNewsOut
from ..types.cursor_page_t_customized_symbols_out_full_stocks import CursorPageTCustomizedSymbolsOutFullStocks
from ..types.historical_data_resolution import HistoricalDataResolution
from ..types.historical_ohlc_response import HistoricalOhlcResponse
from ..types.last_quote import LastQuote
from ..types.last_quotes import LastQuotes
from ..types.market_holiday_response import MarketHolidayResponse
from ..types.market_response import MarketResponse
from ..types.market_status_response import MarketStatusResponse
from ..types.stock_data_flat_response import StockDataFlatResponse
from ..types.trading_hours_response import TradingHoursResponse
from .raw_client import AsyncRawStocksClient, RawStocksClient


class StocksClient:
    def __init__(self, *, client_wrapper: SyncClientWrapper):
        self._raw_client = RawStocksClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> RawStocksClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawStocksClient
        """
        return self._raw_client

    def get_quotes(
        self,
        *,
        symbols: str,
        precision: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> LastQuotes:
        """
        Get the last quote tick for the provided symbols.

        Parameters
        ----------
        symbols : str
            Comma separated list of symbols.

        precision : typing.Optional[int]
            The decimal precision of the result.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        LastQuotes
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_quotes(
            symbols="symbols",
        )
        """
        _response = self._raw_client.get_quotes(symbols=symbols, precision=precision, request_options=request_options)
        return _response.data

    def get_quote(
        self,
        *,
        symbol: str,
        precision: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> LastQuote:
        """
        Get the last quote tick for the provided symbol.

        Parameters
        ----------
        symbol : str
            The symbol to get the quote for.

        precision : typing.Optional[int]
            The decimal precision of the result.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        LastQuote
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_quote(
            symbol="symbol",
        )
        """
        _response = self._raw_client.get_quote(symbol=symbol, precision=precision, request_options=request_options)
        return _response.data

    def get_symbols(
        self,
        *,
        size: typing.Optional[int] = None,
        mode: typing.Optional[str] = None,
        type: typing.Optional[str] = None,
        country: typing.Optional[str] = None,
        cursor: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CursorPageTCustomizedSymbolsOutFullStocks:
        """
        Get list of available symbols

        Parameters
        ----------
        size : typing.Optional[int]
            The number of items per page.

        mode : typing.Optional[str]
            The mode of the response.

        type : typing.Optional[str]
            Type of the instrument.

        country : typing.Optional[str]
            Country of the instrument.

        cursor : typing.Optional[str]
            Cursor for the next page

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CursorPageTCustomizedSymbolsOutFullStocks
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_symbols()
        """
        _response = self._raw_client.get_symbols(
            size=size, mode=mode, type=type, country=country, cursor=cursor, request_options=request_options
        )
        return _response.data

    def get_insights(
        self,
        *,
        cursor: typing.Optional[str] = None,
        size: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CursorPageTCustomizedNewsOut:
        """
        Get recent stocks insights.

        Parameters
        ----------
        cursor : typing.Optional[str]
            Cursor for the next page

        size : typing.Optional[int]
            The number of items per page.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CursorPageTCustomizedNewsOut
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_insights()
        """
        _response = self._raw_client.get_insights(cursor=cursor, size=size, request_options=request_options)
        return _response.data

    def stock_get_countries(self, *, request_options: typing.Optional[RequestOptions] = None) -> CountriesList:
        """
        Get list of available countries

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CountriesList
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.stock_get_countries()
        """
        _response = self._raw_client.stock_get_countries(request_options=request_options)
        return _response.data

    def get_markets(
        self, *, mic: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[MarketResponse]:
        """
        Get details about the markets available in this API.

        Parameters
        ----------
        mic : typing.Optional[str]
            Optional list of comma separated MIC codes for which market to show data for. All market will be included if MIC code is not specified.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[MarketResponse]
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_markets(
            mic="XNYS",
        )
        """
        _response = self._raw_client.get_markets(mic=mic, request_options=request_options)
        return _response.data

    def get_market_status(
        self, *, mic: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[MarketStatusResponse]:
        """
        Get the current status (open or closed) of a market. It takes holidays and half-days into account but does not factor in circuit breakers or halts.

        Parameters
        ----------
        mic : typing.Optional[str]
            Optional list of comma separated MIC codes for which market to show data for. All market will be included if MIC code is not specified.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[MarketStatusResponse]
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_market_status(
            mic="XNYS",
        )
        """
        _response = self._raw_client.get_market_status(mic=mic, request_options=request_options)
        return _response.data

    def get_trading_hours(
        self,
        *,
        start: dt.date,
        end: dt.date,
        mic: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[TradingHoursResponse]:
        """
        Get trading hours. It takes half-days into account.

        Parameters
        ----------
        start : dt.date
            Show holidays starting at this date.

        end : dt.date
            Show holidays until this date.

        mic : typing.Optional[str]
            Optional list of comma separated MIC codes for which market to show data for. All market will be included if MIC code is not specified.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[TradingHoursResponse]
            Successful Response

        Examples
        --------
        import datetime

        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_trading_hours(
            mic="XNAS",
            start=datetime.date.fromisoformat(
                "2025-01-01",
            ),
            end=datetime.date.fromisoformat(
                "2025-01-31",
            ),
        )
        """
        _response = self._raw_client.get_trading_hours(start=start, end=end, mic=mic, request_options=request_options)
        return _response.data

    def get_market_holidays(
        self,
        *,
        start: dt.date,
        end: dt.date,
        mic: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[MarketHolidayResponse]:
        """
        Get market holidays. It takes half-days into account.

        Parameters
        ----------
        start : dt.date
            Show holidays starting at this date.

        end : dt.date
            Show holidays until this date.

        mic : typing.Optional[str]
            Specify comma separated list of MIC codes for which market to show data for.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[MarketHolidayResponse]
            Successful Response

        Examples
        --------
        import datetime

        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_market_holidays(
            mic="XNYS",
            start=datetime.date.fromisoformat(
                "2026-02-20",
            ),
            end=datetime.date.fromisoformat(
                "2026-02-27",
            ),
        )
        """
        _response = self._raw_client.get_market_holidays(start=start, end=end, mic=mic, request_options=request_options)
        return _response.data

    def get_stock_data(
        self, symbol: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> StockDataFlatResponse:
        """
        Parameters
        ----------
        symbol : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        StockDataFlatResponse
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_stock_data(
            symbol="AAPL",
        )
        """
        _response = self._raw_client.get_stock_data(symbol, request_options=request_options)
        return _response.data

    def get_historical_ohlc(
        self,
        symbol: str,
        *,
        resolution: HistoricalDataResolution,
        start: int,
        end: int,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HistoricalOhlcResponse:
        """
        Get historical OHLC candles for a symbol in a selected resolution and time range.

        Parameters
        ----------
        symbol : str

        resolution : HistoricalDataResolution
            Resolution in seconds.

        start : int
            Unix timestamp (inclusive).

        end : int
            Unix timestamp (exclusive).

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HistoricalOhlcResponse
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_historical_ohlc(
            symbol="symbol",
            resolution="5",
            start=1,
            end=1,
        )
        """
        _response = self._raw_client.get_historical_ohlc(
            symbol, resolution=resolution, start=start, end=end, request_options=request_options
        )
        return _response.data

    def get_historical_ticks(
        self,
        symbol: str,
        *,
        start: int,
        end: int,
        cursor: typing.Optional[str] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CursorPageTCustomizedHistoricalRawTick:
        """
        Get raw historical ticks for a symbol in a selected time range using cursor pagination.

        Parameters
        ----------
        symbol : str

        start : int
            Unix timestamp (inclusive).

        end : int
            Unix timestamp (exclusive).

        cursor : typing.Optional[str]
            Cursor for the next page

        limit : typing.Optional[int]
            The number of ticks per page.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CursorPageTCustomizedHistoricalRawTick
            Successful Response

        Examples
        --------
        from tradewatch import TradewatchApi

        client = TradewatchApi(
            api_key="YOUR_API_KEY",
        )
        client.stocks.get_historical_ticks(
            symbol="symbol",
            start=1,
            end=1,
        )
        """
        _response = self._raw_client.get_historical_ticks(
            symbol, start=start, end=end, cursor=cursor, limit=limit, request_options=request_options
        )
        return _response.data


class AsyncStocksClient:
    def __init__(self, *, client_wrapper: AsyncClientWrapper):
        self._raw_client = AsyncRawStocksClient(client_wrapper=client_wrapper)

    @property
    def with_raw_response(self) -> AsyncRawStocksClient:
        """
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawStocksClient
        """
        return self._raw_client

    async def get_quotes(
        self,
        *,
        symbols: str,
        precision: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> LastQuotes:
        """
        Get the last quote tick for the provided symbols.

        Parameters
        ----------
        symbols : str
            Comma separated list of symbols.

        precision : typing.Optional[int]
            The decimal precision of the result.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        LastQuotes
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_quotes(
                symbols="symbols",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_quotes(
            symbols=symbols, precision=precision, request_options=request_options
        )
        return _response.data

    async def get_quote(
        self,
        *,
        symbol: str,
        precision: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> LastQuote:
        """
        Get the last quote tick for the provided symbol.

        Parameters
        ----------
        symbol : str
            The symbol to get the quote for.

        precision : typing.Optional[int]
            The decimal precision of the result.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        LastQuote
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_quote(
                symbol="symbol",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_quote(
            symbol=symbol, precision=precision, request_options=request_options
        )
        return _response.data

    async def get_symbols(
        self,
        *,
        size: typing.Optional[int] = None,
        mode: typing.Optional[str] = None,
        type: typing.Optional[str] = None,
        country: typing.Optional[str] = None,
        cursor: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CursorPageTCustomizedSymbolsOutFullStocks:
        """
        Get list of available symbols

        Parameters
        ----------
        size : typing.Optional[int]
            The number of items per page.

        mode : typing.Optional[str]
            The mode of the response.

        type : typing.Optional[str]
            Type of the instrument.

        country : typing.Optional[str]
            Country of the instrument.

        cursor : typing.Optional[str]
            Cursor for the next page

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CursorPageTCustomizedSymbolsOutFullStocks
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_symbols()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_symbols(
            size=size, mode=mode, type=type, country=country, cursor=cursor, request_options=request_options
        )
        return _response.data

    async def get_insights(
        self,
        *,
        cursor: typing.Optional[str] = None,
        size: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CursorPageTCustomizedNewsOut:
        """
        Get recent stocks insights.

        Parameters
        ----------
        cursor : typing.Optional[str]
            Cursor for the next page

        size : typing.Optional[int]
            The number of items per page.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CursorPageTCustomizedNewsOut
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_insights()


        asyncio.run(main())
        """
        _response = await self._raw_client.get_insights(cursor=cursor, size=size, request_options=request_options)
        return _response.data

    async def stock_get_countries(self, *, request_options: typing.Optional[RequestOptions] = None) -> CountriesList:
        """
        Get list of available countries

        Parameters
        ----------
        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CountriesList
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.stock_get_countries()


        asyncio.run(main())
        """
        _response = await self._raw_client.stock_get_countries(request_options=request_options)
        return _response.data

    async def get_markets(
        self, *, mic: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[MarketResponse]:
        """
        Get details about the markets available in this API.

        Parameters
        ----------
        mic : typing.Optional[str]
            Optional list of comma separated MIC codes for which market to show data for. All market will be included if MIC code is not specified.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[MarketResponse]
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_markets(
                mic="XNYS",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_markets(mic=mic, request_options=request_options)
        return _response.data

    async def get_market_status(
        self, *, mic: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
    ) -> typing.List[MarketStatusResponse]:
        """
        Get the current status (open or closed) of a market. It takes holidays and half-days into account but does not factor in circuit breakers or halts.

        Parameters
        ----------
        mic : typing.Optional[str]
            Optional list of comma separated MIC codes for which market to show data for. All market will be included if MIC code is not specified.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[MarketStatusResponse]
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_market_status(
                mic="XNYS",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_market_status(mic=mic, request_options=request_options)
        return _response.data

    async def get_trading_hours(
        self,
        *,
        start: dt.date,
        end: dt.date,
        mic: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[TradingHoursResponse]:
        """
        Get trading hours. It takes half-days into account.

        Parameters
        ----------
        start : dt.date
            Show holidays starting at this date.

        end : dt.date
            Show holidays until this date.

        mic : typing.Optional[str]
            Optional list of comma separated MIC codes for which market to show data for. All market will be included if MIC code is not specified.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[TradingHoursResponse]
            Successful Response

        Examples
        --------
        import asyncio
        import datetime

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_trading_hours(
                mic="XNAS",
                start=datetime.date.fromisoformat(
                    "2025-01-01",
                ),
                end=datetime.date.fromisoformat(
                    "2025-01-31",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_trading_hours(
            start=start, end=end, mic=mic, request_options=request_options
        )
        return _response.data

    async def get_market_holidays(
        self,
        *,
        start: dt.date,
        end: dt.date,
        mic: typing.Optional[str] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> typing.List[MarketHolidayResponse]:
        """
        Get market holidays. It takes half-days into account.

        Parameters
        ----------
        start : dt.date
            Show holidays starting at this date.

        end : dt.date
            Show holidays until this date.

        mic : typing.Optional[str]
            Specify comma separated list of MIC codes for which market to show data for.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        typing.List[MarketHolidayResponse]
            Successful Response

        Examples
        --------
        import asyncio
        import datetime

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_market_holidays(
                mic="XNYS",
                start=datetime.date.fromisoformat(
                    "2026-02-20",
                ),
                end=datetime.date.fromisoformat(
                    "2026-02-27",
                ),
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_market_holidays(
            start=start, end=end, mic=mic, request_options=request_options
        )
        return _response.data

    async def get_stock_data(
        self, symbol: str, *, request_options: typing.Optional[RequestOptions] = None
    ) -> StockDataFlatResponse:
        """
        Parameters
        ----------
        symbol : str

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        StockDataFlatResponse
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_stock_data(
                symbol="AAPL",
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_stock_data(symbol, request_options=request_options)
        return _response.data

    async def get_historical_ohlc(
        self,
        symbol: str,
        *,
        resolution: HistoricalDataResolution,
        start: int,
        end: int,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> HistoricalOhlcResponse:
        """
        Get historical OHLC candles for a symbol in a selected resolution and time range.

        Parameters
        ----------
        symbol : str

        resolution : HistoricalDataResolution
            Resolution in seconds.

        start : int
            Unix timestamp (inclusive).

        end : int
            Unix timestamp (exclusive).

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        HistoricalOhlcResponse
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_historical_ohlc(
                symbol="symbol",
                resolution="5",
                start=1,
                end=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_historical_ohlc(
            symbol, resolution=resolution, start=start, end=end, request_options=request_options
        )
        return _response.data

    async def get_historical_ticks(
        self,
        symbol: str,
        *,
        start: int,
        end: int,
        cursor: typing.Optional[str] = None,
        limit: typing.Optional[int] = None,
        request_options: typing.Optional[RequestOptions] = None,
    ) -> CursorPageTCustomizedHistoricalRawTick:
        """
        Get raw historical ticks for a symbol in a selected time range using cursor pagination.

        Parameters
        ----------
        symbol : str

        start : int
            Unix timestamp (inclusive).

        end : int
            Unix timestamp (exclusive).

        cursor : typing.Optional[str]
            Cursor for the next page

        limit : typing.Optional[int]
            The number of ticks per page.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        CursorPageTCustomizedHistoricalRawTick
            Successful Response

        Examples
        --------
        import asyncio

        from tradewatch import AsyncTradewatchApi

        client = AsyncTradewatchApi(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.stocks.get_historical_ticks(
                symbol="symbol",
                start=1,
                end=1,
            )


        asyncio.run(main())
        """
        _response = await self._raw_client.get_historical_ticks(
            symbol, start=start, end=end, cursor=cursor, limit=limit, request_options=request_options
        )
        return _response.data
