Exemplo n.º 1
0
Arquivo: cpp.py Projeto: ynzheng/aat
def _make_cpp_trade(
    id: str,
    timestamp: datetime,
    maker_orders: List["Order"] = None,
    taker_order: Optional["Order"] = None,
) -> TradeCpp:
    """helper method to ensure all arguments are setup"""
    return TradeCpp(id, timestamp, maker_orders or deque(), taker_order)
Exemplo n.º 2
0
def _make_cpp_trade(id,
                    timestamp,
                    volume,
                    price,
                    side,
                    instrument,
                    exchange,
                    filled=0.0,
                    maker_orders=None,
                    taker_order=None):
    '''helper method to ensure all arguments are setup'''
    return TradeCpp(id, timestamp, volume, price, side, instrument, exchange,
                    filled, maker_orders or deque(), taker_order)
Exemplo n.º 3
0
def _make_cpp_trade(id, timestamp, maker_orders=None, taker_order=None):
    '''helper method to ensure all arguments are setup'''
    return TradeCpp(id, timestamp, maker_orders or deque(), taker_order)