# Path: vnpy/trader/event.py
# EVENT_TICK = "eTick."
# 
# EVENT_ORDER = "eOrder."
# 
# EVENT_TRADE = "eTrade."
# 
# EVENT_POSITION = "ePosition."
# 
# EVENT_ACCOUNT = "eAccount."
# 
# EVENT_CONTRACT = "eContract."
# 
# EVENT_LOG = "eLog"
# 
# EVENT_QUOTE = "eQuote."
# 
# Path: vnpy/trader/object.py
# ACTIVE_STATUSES = set([Status.SUBMITTING, Status.NOTTRADED, Status.PARTTRADED])
# class BaseData:
# class TickData(BaseData):
# class BarData(BaseData):
# class OrderData(BaseData):
# class TradeData(BaseData):
# class PositionData(BaseData):
# class AccountData(BaseData):
# class LogData(BaseData):
# class ContractData(BaseData):
# class QuoteData(BaseData):
# class SubscribeRequest:
# class OrderRequest:
# class CancelRequest:
# class HistoryRequest:
# class QuoteRequest:
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def is_active(self) -> bool:
#     def create_cancel_request(self) -> "CancelRequest":
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def is_active(self) -> bool:
#     def create_cancel_request(self) -> "CancelRequest":
#     def __post_init__(self):
#     def __post_init__(self):
#     def create_order_data(self, orderid: str, gateway_name: str) -> OrderData:
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def create_quote_data(self, quoteid: str, gateway_name: str) -> QuoteData:


from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Callable
from copy import copy
from vnpy.event import Event, EventEngine
from .event import (
    EVENT_TICK,
    EVENT_ORDER,
    EVENT_TRADE,
    EVENT_POSITION,
    EVENT_ACCOUNT,
    EVENT_CONTRACT,
    EVENT_LOG,
    EVENT_QUOTE,
)
from .object import (
    TickData,
    OrderData,
    TradeData,
    PositionData,
    AccountData,
    ContractData,
    LogData,
    QuoteData,
    OrderRequest,
    CancelRequest,
    SubscribeRequest,
    HistoryRequest,
    QuoteRequest,
    Exchange,
    BarData
)
    @abstractmethod
    def connect(self, setting: dict) -> None:
        """
        Start gateway connection.

        to implement this method, you must:
        * connect to server if necessary
        * log connected if all necessary connection is established
        * do the following query and response corresponding on_xxxx and write_log
            * contracts : on_contract
            * account asset : on_account
            * account holding: on_position
            * orders of account: on_order
            * trades of account: on_trade
        * if any of query above is failed,  write log.

        future plan:
        response callback/change status instead of write_log

        """
        pass

    @abstractmethod
    def close(self) -> None:
        """
        Close gateway connection.
        """
        pass

    @abstractmethod

# Path: vnpy/trader/event.py
# EVENT_TICK = "eTick."
# 
# EVENT_ORDER = "eOrder."
# 
# EVENT_TRADE = "eTrade."
# 
# EVENT_POSITION = "ePosition."
# 
# EVENT_ACCOUNT = "eAccount."
# 
# EVENT_CONTRACT = "eContract."
# 
# EVENT_LOG = "eLog"
# 
# EVENT_QUOTE = "eQuote."
# 
# Path: vnpy/trader/object.py
# ACTIVE_STATUSES = set([Status.SUBMITTING, Status.NOTTRADED, Status.PARTTRADED])
# class BaseData:
# class TickData(BaseData):
# class BarData(BaseData):
# class OrderData(BaseData):
# class TradeData(BaseData):
# class PositionData(BaseData):
# class AccountData(BaseData):
# class LogData(BaseData):
# class ContractData(BaseData):
# class QuoteData(BaseData):
# class SubscribeRequest:
# class OrderRequest:
# class CancelRequest:
# class HistoryRequest:
# class QuoteRequest:
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def is_active(self) -> bool:
#     def create_cancel_request(self) -> "CancelRequest":
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def is_active(self) -> bool:
#     def create_cancel_request(self) -> "CancelRequest":
#     def __post_init__(self):
#     def __post_init__(self):
#     def create_order_data(self, orderid: str, gateway_name: str) -> OrderData:
#     def __post_init__(self):
#     def __post_init__(self):
#     def __post_init__(self):
#     def create_quote_data(self, quoteid: str, gateway_name: str) -> QuoteData:


# Path: vnpy/trader/gateway.py
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Callable
from copy import copy
from vnpy.event import Event, EventEngine
from .event import (
    EVENT_TICK,
    EVENT_ORDER,
    EVENT_TRADE,
    EVENT_POSITION,
    EVENT_ACCOUNT,
    EVENT_CONTRACT,
    EVENT_LOG,
    EVENT_QUOTE,
)
from .object import (
    TickData,
    OrderData,
    TradeData,
    PositionData,
    AccountData,
    ContractData,
    LogData,
    QuoteData,
    OrderRequest,
    CancelRequest,
    SubscribeRequest,
    HistoryRequest,
    QuoteRequest,
    Exchange,
    BarData
)

    @abstractmethod
    def connect(self, setting: dict) -> None:
        """
        Start gateway connection.

        to implement this method, you must:
        * connect to server if necessary
        * log connected if all necessary connection is established
        * do the following query and response corresponding on_xxxx and write_log
            * contracts : on_contract
            * account asset : on_account
            * account holding: on_position
            * orders of account: on_order
            * trades of account: on_trade
        * if any of query above is failed,  write log.

        future plan:
        response callback/change status instead of write_log

        """
        pass

    @abstractmethod
    def close(self) -> None:
        """
        Close gateway connection.
        """
        pass

    @abstractmethod

    def subscribe(self, req: SubscribeRequest) -> None: