Skip to content

nfa-llc/quant-historical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gexbot Historical Data Downloader

This Python script queries the Gexbot API and downloads historical JSON data.

Overview

This script (main.py) is configured to query the Gexbot historical data endpoints. It will iterate through a user-defined list of tickers and data categories ("combos") for a specific date.

For each valid combination, the script requests a signed download URL, downloads the data directly, parses the JSON response, and prints a small preview.

Some historical responses may be gzip-compressed while others may already be plain JSON. The script checks the response bytes and only decompresses when the payload is actually gzip data.

Configuration

Before running, you must configure the script:

1. Set Your API Key

The script requires a valid Gexbot API key. You can set this in one of two ways:

  • (Recommended) As an environment variable named GEXBOT_API_KEY.

  • Alternatively, you can paste your key directly into the API_KEY variable in main.py:

    # main.py
    API_KEY = "YOUR_API_KEY_HERE"

2. Set Your User-Agent

The Gexbot API requires a User-Agent header. main.py intentionally defaults this value to an empty string so the script fails fast until you provide a client identifier.

# main.py
USER_AGENT = "AcmeQuantClient/1.0"

Use a value that identifies your application, script, or organization.

3. Set the Query Date

Change the DATE_TO_QUERY variable to the YYYY-MM-DD date you wish to retrieve.

# main.py
DATE_TO_QUERY = "2025-11-14"

4. Select Tickers and Categories

Edit the ACTIVE_TICKERS and ACTIVE_*_CATEGORIES lists in main.py by uncommenting the symbols and feeds you want to query.

Running

python main.py

If GEXBOT_API_KEY or USER_AGENT is missing, the script will print an error and exit before making API requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages