Exemplo n.º 1
0
def load_tick_data(
    symbol: str,
    exchange: Exchange,
    start: datetime,
    end: datetime
):
    """"""
    return database_manager.load_tick_data(
        symbol, exchange, start, end
    )
Exemplo n.º 2
0
    def load_tick(self, vt_symbol: str, days: int,
                  callback: Callable[[TickData], None]):
        """"""
        symbol, exchange = extract_vt_symbol(vt_symbol)
        end = datetime.now()
        start = end - timedelta(days)

        ticks = database_manager.load_tick_data(
            symbol=symbol,
            exchange=exchange,
            start=start,
            end=end,
        )

        for tick in ticks:
            callback(tick)
Exemplo n.º 3
0
def load_tick_data(spread: SpreadData, start: datetime, end: datetime):
    """"""
    return database_manager.load_tick_data(spread.name, Exchange.LOCAL, start,
                                           end)