How to use the hikyuu.gui.data.ImportPytdxToH5Task.ImportPytdxToH5 function in hikyuu

To help you get started, we’ve selected a few hikyuu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fasiondog / hikyuu / hikyuu / gui / data / UsePytdxImportToH5Thread.py View on Github external
cur_host += 1
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SZ', '5MIN',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1

        if self.config.getboolean('ktype', 'day', fallback=False):
            start_date = datetime.datetime.strptime(config['ktype']['day_start_date'], '%Y-%m-%d').date()
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SH', 'DAY',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SZ', 'DAY',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
github fasiondog / hikyuu / hikyuu / gui / data / UsePytdxImportToH5Thread.py View on Github external
)
            )
            cur_host += 1

        if self.config.getboolean('ktype', 'min', fallback=False):
            start_date = datetime.datetime.strptime(config['ktype']['min_start_date'], '%Y-%m-%d').date()
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SH', '1MIN', self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir, start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name,
                    'SZ', '1MIN', self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir, start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1

        if self.config.getboolean('ktype', 'time', fallback=False):
            today = datetime.date.today()
            time_start_date = datetime.datetime.strptime(config['ktype']['time_start_date'], '%Y-%m-%d').date()
            time_max_days = (today - time_start_date).days + 1
            self.tasks.append(ImportPytdxTimeToH5(self.queue, sqlite_file_name, 'SH',
                                                  self.quotations,
                                                  use_hosts[cur_host][0], use_hosts[cur_host][1],
                                                  dest_dir,
github fasiondog / hikyuu / hikyuu / gui / data / UsePytdxImportToH5Thread.py View on Github external
cur_host += 1

        if self.config.getboolean('ktype', 'min5', fallback=False):
            start_date = datetime.datetime.strptime(config['ktype']['min5_start_date'], '%Y-%m-%d').date()
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SH', '5MIN',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SZ', '5MIN',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1

        if self.config.getboolean('ktype', 'day', fallback=False):
            start_date = datetime.datetime.strptime(config['ktype']['day_start_date'], '%Y-%m-%d').date()
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SH', 'DAY',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
github fasiondog / hikyuu / hikyuu / gui / data / UsePytdxImportToH5Thread.py View on Github external
)
            )
            cur_host += 1
            self.tasks.append(
                ImportPytdxTransToH5(
                    self.queue, sqlite_file_name, 'SZ', self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir, trans_max_days
                )
            )
            cur_host += 1

        if self.config.getboolean('ktype', 'min', fallback=False):
            start_date = datetime.datetime.strptime(config['ktype']['min_start_date'], '%Y-%m-%d').date()
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SH', '1MIN', self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir, start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name,
                    'SZ', '1MIN', self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir, start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
github fasiondog / hikyuu / hikyuu / gui / data / UsePytdxImportToH5Thread.py View on Github external
cur_host += 1

        if self.config.getboolean('ktype', 'day', fallback=False):
            start_date = datetime.datetime.strptime(config['ktype']['day_start_date'], '%Y-%m-%d').date()
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SH', 'DAY',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SZ', 'DAY',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
github fasiondog / hikyuu / hikyuu / gui / data / UsePytdxImportToH5Thread.py View on Github external
self.quotations,
                                                  use_hosts[cur_host][0], use_hosts[cur_host][1],
                                                  dest_dir,
                                                  time_max_days))
            cur_host += 1
            self.tasks.append(ImportPytdxTimeToH5(self.queue, sqlite_file_name, 'SZ',
                                                  self.quotations,
                                                  use_hosts[cur_host][0], use_hosts[cur_host][1],
                                                  dest_dir,
                                                  time_max_days))
            cur_host += 1

        if self.config.getboolean('ktype', 'min5', fallback=False):
            start_date = datetime.datetime.strptime(config['ktype']['min5_start_date'], '%Y-%m-%d').date()
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SH', '5MIN',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )
            )
            cur_host += 1
            self.tasks.append(
                ImportPytdxToH5(
                    self.queue, sqlite_file_name, 'SZ', '5MIN',
                    self.quotations,
                    use_hosts[cur_host][0], use_hosts[cur_host][1],
                    dest_dir,
                    start_date.year * 100000000 + start_date.month * 1000000 + start_date.day * 10000
                )