Example #1
0
File: cpp.py Project: 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)
Example #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)
Example #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)