# fmt: off

# mypy: ignore-errors

# Autogenerated from generate_sync_interface.py

# If you are here for function definitions, please refer to architect_py/async_client.py
# This file is so that the sync client has good type hinting
# It is not used for anything else
# For maintainers: ensure that the types in this file are correct for correct type hinting


from typing import Any, Union
from .graphql_client import *
from .async_client import *


class ClientProtocol:
    def cancel_all_orders(self) -> bool: ...
    def cancel_order(self, order_id: str) -> CancelFields: ...
    def core(self) -> GrpcClient: ...
    def discover_marketdata(self) -> Any: ...
    def get_account_history(self, account: str, from_inclusive: Optional[datetime] = None, to_exclusive: Optional[datetime] = None) -> Sequence[AccountSummaryFields]: ...
    def get_account_summaries(self, accounts: Optional[list[str]] = None, trader: Optional[str] = None) -> Sequence[AccountSummaryFields]: ...
    def get_account_summary(self, account: str) -> AccountSummaryFields: ...
    def get_all_open_orders(self) -> Sequence[OrderFields]: ...
    def get_cme_first_notice_date(self, symbol: str) -> Optional[date]: ...
    def get_cme_future_from_root_month_year(self, root: str, month: int, year: int) -> str: ...
    def get_cme_futures_series(self, series: str) -> list[tuple[date, str]]: ...
    def get_execution_info(self, symbol: Union[TradableProduct, str], execution_venue: str) -> Optional[ExecutionInfoFields]: ...
    def get_execution_infos(self, symbols: Optional[list[TradableProduct]], execution_venue: Optional[str] = None) -> Sequence[ExecutionInfoFields]: ...
    @staticmethod
    def get_expiration_from_CME_name(name: str) -> Optional[date]: ...
    def get_fills(self, from_inclusive: Optional[datetime] = None, to_exclusive: Optional[datetime] = None, venue: Optional[str] = None, account: Optional[str] = None, order_id: Optional[str] = None) -> GetFillsQueryFolioHistoricalFills: ...
    def get_futures_series(self, series_symbol: str) -> list[str]: ...
    def get_historical_candles(self, symbol: Union[TradableProduct, str], venue: str, candle_width: CandleWidth, start: datetime, end: datetime, *, as_dataframe: bool = False) -> Union[list[Candle], pd.DataFrame]: ...
    def get_historical_orders(self, order_ids: Optional[list[str]] = None, from_inclusive: Optional[datetime] = None, to_exclusive: Optional[datetime] = None, venue: Optional[str] = None, account: Optional[str] = None, parent_order_id: Optional[str] = None) -> Sequence[OrderFields]: ...
    def get_l1_book_snapshot(self, symbol: Union[TradableProduct, str], venue: str) -> L1BookSnapshot: ...
    def get_l1_book_snapshots(self, symbols: list[Union[TradableProduct, str]], venue: str) -> Sequence[L1BookSnapshot]: ...
    def get_l2_book_snapshot(self, symbol: Union[TradableProduct, str], venue: str) -> L2BookSnapshot: ...
    def get_market_snapshot(self, symbol: Union[TradableProduct, str], venue: str) -> L1BookSnapshot: ...
    def get_market_snapshots(self, symbols: list[Union[TradableProduct, str]], venue: str) -> Sequence[L1BookSnapshot]: ...
    def get_market_status(self, symbol: Union[TradableProduct, str], venue: str) -> MarketStatus: ...
    def get_open_orders(self, order_ids: Optional[list[str]] = None, venue: Optional[str] = None, account: Optional[str] = None, trader: Optional[str] = None, symbol: Optional[str] = None, parent_order_id: Optional[str] = None) -> Sequence[OrderFields]: ...
    def get_order(self, order_id: str) -> Optional[OrderFields]: ...
    def get_orders(self, order_ids: list[str]) -> list[Optional[OrderFields]]: ...
    def get_product_info(self, symbol: str) -> Optional[ProductInfoFields]: ...
    def get_product_infos(self, symbols: Optional[list[str]]) -> Sequence[ProductInfoFields]: ...
    def get_ticker(self, symbol: Union[TradableProduct, str], venue: str) -> Ticker: ...
    def hmart(self) -> GrpcClient: ...
    def list_accounts(self) -> Sequence[AccountWithPermissionsFields]: ...
    def list_symbols(self, *, marketdata: Optional[str] = None) -> list[str]: ...
    def marketdata(self, venue: str) -> GrpcClient: ...
    def orderflow(self, request_iterator: AsyncIterator) -> AsyncIterator: ...
    def place_limit_order(self, *, id: Optional[str] = None, symbol: Union[TradableProduct, str], execution_venue: Optional[str], odir: OrderDir, quantity: Decimal, limit_price: Decimal, order_type: OrderType = OrderType.LIMIT, time_in_force: TimeInForce = TimeInForce.DAY, good_til_date: Optional[datetime] = None, price_round_method: Optional[TickRoundMethod] = None, account: Optional[str] = None, trader: Optional[str] = None, post_only: bool = False, trigger_price: Optional[Decimal] = None) -> OrderFields: ...
    def refresh_jwt(self, force: bool = False) -> Any: ...
    def search_symbols(self, search_string: Optional[str] = None, execution_venue: Optional[str] = None, offset: int = 0, limit: int = 20) -> list[TradableProduct]: ...
    def send_market_pro_order(self, *, id: Optional[str] = None, symbol: Union[TradableProduct, str], execution_venue: str, odir: OrderDir, quantity: Decimal, time_in_force: TimeInForce = TimeInForce.DAY, account: Optional[str] = None, fraction_through_market: Decimal = Decimal('0.001')) -> OrderFields: ...
    def set_hmart(self, endpoint: str) -> Any: ...
    def set_jwt(self, jwt: Optional[str], jwt_expiration: Optional[datetime] = None) -> Any: ...
    def set_marketdata(self, venue: str, endpoint: str) -> Any: ...
    def who_am_i(self) -> tuple[str, str]: ...
