book
Checkout our new book! Hands on AI Trading with Python, QuantConnect, and AWS Learn More arrow

Download in Bulk

US Future Universe

Introduction

Download the US Future Universe dataset in bulk to get the full dataset without any selection bias. The bulk dataset packages contains the available Futures contracts, their daily prices, and open interest for every trading day.

The Future Universe dataset depends on the US Futures Security Master dataset because the US Futures Security Master dataset contains information on symbol changes of the contracts.

To use the CLI, you must be a member in an organization on a paid tier.

Download History

To unlock local access to the US Future Universe dataset, open the Pricing page of your organization and subscribe to the following data packages:

  • US Future Universe History by QuantConnect
  • US Futures Security Master by QuantConnect

You need billing permissions to change the organization's subscriptions.

After you subscribe to local access, to download the US Future Universe data, open a terminal in your organization workspace and then run:

$ lean data download --dataset "US Future Universe" --data-type "bulk" --start "20250403" --end "20250403"

To download the US Futures Security Master, run:

$ lean data download --dataset "US Futures Security Master"

Download Daily Updates

After you bulk download the US Future Universe dataset, new daily updates are available at 7 AM Eastern Time (ET) after each trading day. To unlock local access to the data updates, open the Pricing page of your organization and subscribe to the US Future Universe Updates by QuantConnect data package. You need billing permissions to change the organization's subscriptions.

After you subscribe to dataset updates, to update your local copy of the US Future Universe dataset, open a terminal in your organization workspace and then run:

$ lean data download --dataset "US Future Universe" --data-type "bulk" --start "20250403" --end "20250403"

Alternatively, instead of directly calling the lean data download command, you can place the following Python script in the data directory of your organization workspace and run it to update your data files.

import os
from datetime import datetime, time, timedelta
from pytz import timezone
from os.path import abspath, dirname
os.chdir(dirname(abspath(__file__)))

OVERWRITE = False

def __get_start_date() -> str:
    dir_name = f"future/cme/universes"
    files = [] if not os.path.exists(dir_name) else sorted(os.listdir(dir_name)) 
    return files[-1].split(".")[0] if files else '19980101'

def __get_end_date() -> str:
    now = datetime.now(timezone("US/Eastern"))
    if now.time() > time(7, 0):
        return (now - timedelta(1)).strftime("%Y%m%d")
    print('New data is available at 07:00 AM EST')
    return (now - timedelta(2)).strftime("%Y%m%d")

if __name__ == "__main__":
    start, end = __get_start_date(), __get_end_date()
    if start >= end:
        exit("Your data is already up to date.")
            
    command = f'lean data download --dataset "US Future Universe" --data-type "Bulk" --start {start} --end {end}'
    if OVERWRITE:
        command += " --overwrite"
    print(command)
    os.system(command)

The preceding script checks the date of the most recent US Future Universe data you have. If there is new data available, it downloads the new data files.

To update your local copy of the US Futures Security Master, run:

$ lean data download --dataset "US Futures Security Master"

Size and Format

The US Future Universe dataset is about 2 GB in size. We structure the data files so there is one file per Future per day. For an example, see the Data / future / cme / universes / es / 20200211.csv file in the LEAN repository.

Price

To view the prices of the datasets, see the Pricing tab of the US Future Universe and US Futures Security Master dataset listings.

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: