Last active
December 7, 2025 20:58
-
-
Save leostera/07a75ddb6772f18777cf04b4222f2493 to your computer and use it in GitHub Desktop.
Download all Solana transactions for a specific day from solarchive.org
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from pathlib import Path | |
| from concurrent.futures import ThreadPoolExecutor | |
| day = "2025-11-01" | |
| index = requests.get(f"https://data.solarchive.org/txs/{day}/index.json").json() | |
| output_dir = Path(day) | |
| output_dir.mkdir(exist_ok=True) | |
| def download(file): | |
| data = requests.get(file["url"]).content | |
| (output_dir / file["name"]).write_bytes(data) | |
| print(f"✓ {file['name']} ({len(data) / 1e6:.1f} MB)") | |
| with ThreadPoolExecutor(max_workers=10) as executor: | |
| executor.map(download, index["files"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment