# 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
)

    def on_trade(self, trade: TradeData) -> None:
        """
        Trade event push.
        Trade event of a specific vt_symbol is also pushed.
        """
        self.on_event(EVENT_TRADE, trade)
        self.on_event(EVENT_TRADE + trade.vt_symbol, trade)

    def on_order(self, order: OrderData) -> None:
        """
        Order event push.
        Order event of a specific vt_orderid is also pushed.
        """
        self.on_event(EVENT_ORDER, order)
        self.on_event(EVENT_ORDER + order.vt_orderid, order)

    def on_position(self, position: PositionData) -> None:
        """
        Position event push.
        Position event of a specific vt_symbol is also pushed.
        """
        self.on_event(EVENT_POSITION, position)
        self.on_event(EVENT_POSITION + position.vt_symbol, position)

    def on_account(self, account: AccountData) -> None:
        """
        Account event push.
        Account event of a specific vt_accountid is also pushed.
        """

# 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
)


    def on_trade(self, trade: TradeData) -> None:
        """
        Trade event push.
        Trade event of a specific vt_symbol is also pushed.
        """
        self.on_event(EVENT_TRADE, trade)
        self.on_event(EVENT_TRADE + trade.vt_symbol, trade)

    def on_order(self, order: OrderData) -> None:
        """
        Order event push.
        Order event of a specific vt_orderid is also pushed.
        """
        self.on_event(EVENT_ORDER, order)
        self.on_event(EVENT_ORDER + order.vt_orderid, order)

    def on_position(self, position: PositionData) -> None:
        """
        Position event push.
        Position event of a specific vt_symbol is also pushed.
        """
        self.on_event(EVENT_POSITION, position)
        self.on_event(EVENT_POSITION + position.vt_symbol, position)

    def on_account(self, account: AccountData) -> None:
        """
        Account event push.
        Account event of a specific vt_accountid is also pushed.
        """

        self.on_event(EVENT_ACCOUNT, account)