def get_position(contract, date, DATA_PATH): # create a dictionary, where date is the key try: reader = SqliteReaderDce(get_day_db_path(DATA_PATH, contract, date)) raw = reader.read_tick() result = int(raw['Position'].tail(1)) except Exception: result = 0 return result
def get_position(contract, date, DATA_PATH): # create a dictionary, where date is the key try: reader = SqliteReaderDce(get_day_db_path(DATA_PATH, contract, date)) raw = reader.read_tick() result = int(raw['Position'].tail(1)) except Exception: result = 0 return result