How ankitlenka26/sbi-fx-ratekeeper works
Purpose and delivery model
SBI FX RateKeeper is a repository-backed data pipeline for preserving daily State Bank of India telegraphic-transfer reference FX rates and publishing them as Excel/Google Sheets-compatible CSV histories. It is not a web application; GitHub-hosted files are the consumer interface.
Key paths: README.md, csv_files/SBI_REFERENCE_RATES_USD.csv, csv_files/SBI_REFERENCE_RATES_EUR.csv.
Execution entry points
The Python scripts are the operational entry points: main.py is the primary rate-collection/processing program, while mksco.py appears to support acquisition from the Maneesh K. Singh & Co. archive source used for historical coverage. Execution outcomes are persisted directly into repository files rather than a database.
Key paths: main.py, mksco.py, requirements.txt.
Scheduled ingestion
A GitHub Actions workflow automates recurring downloads and repository updates. Its workflow-specific properties file likely supplies the scheduled job’s inputs or metadata. GitHub Actions is therefore the material runtime/infrastructure boundary between the source website and committed datasets.
Key paths: .github/workflows/daily-download.yml, .github/daily-download.properties.json.
External-source boundary
The pipeline depends on SBI-published daily rate-card PDFs as the authoritative input. SBI does not guarantee a document for every working day, so missing dates are an expected source-data condition rather than necessarily a pipeline failure. Historical reconstruction may use external archives, including Maneesh K. Singh & Co.; RBI and OANDA are documented alternatives but are not represented as repository integrations.
Key paths: main.py, mksco.py, README.md.
Raw evidence archive
Downloaded source artifacts are retained as immutable-looking PDF evidence, partitioned by year and month and named by publication date. This archive supports verification and allows published CSV values to be traced back to their original rate card. It is the largest persistent store and the raw-data boundary of the system.
Key paths: pdf_files/2020/1/2020-01-04.pdf, pdf_files/2024/12/2024-12-31.pdf, pdf_files/2026/7/2026-07-28.pdf.
Normalization and publication
The processing stage extracts the reference-rate range specified by SBI—₹10–20 lakh transactions—from each daily source and appends normalized records to one CSV per currency. The currency-specific CSV layout is the public contract: consumers query/download a single currency history rather than a combined dataset.
Key paths: main.py, csv_files/SBI_REFERENCE_RATES_USD.csv, csv_files/SBI_REFERENCE_RATES_JPY.csv.
Operational boundaries and observability
There is no database, service API, or separately deployed application in the tree. State is Git-tracked filesystem content: PDFs are provenance artifacts, CSVs are curated outputs, and log.txt is local/run-level operational output. Correctness depends on source document availability, PDF parsing stability, and preserving the per-currency CSV schema across automated commits.
Key paths: log.txt, pdf_files/, csv_files/.
Main entry points: main.py Primary collector · daily-download.yml GitHub Actions · mksco.py Archive acquisition · SBI_REFERENCE_RATES_USD.csv USD rate history
Components 14
Automation
Scheduled repository ingestion.
- GitHub Actions · Runs recurring downloads and commits updates.
.github/workflows/daily-download.yml - Workflow properties
.github/daily-download.properties.json
Collection pipeline
Acquisition and normalization programs.
- Primary collector · Downloads, parses, and publishes daily reference rates.
main.py - Archive acquisition · Acquires historical archive material.
mksco.py - ₹10–20 lakh extraction · Extracts SBI's specified reference-rate transaction range.
main.py
Git-tracked data
Repository files are the persistent state and publication surface.
- PDF evidence archive · Date-partitioned source PDFs retained for provenance.
- USD rate history
csv_files/SBI_REFERENCE_RATES_USD.csv - EUR rate history
csv_files/SBI_REFERENCE_RATES_EUR.csv - JPY rate history
csv_files/SBI_REFERENCE_RATES_JPY.csv - Run log
log.txt
Other components
- SBI rate-card PDFs · Daily documents can be absent on some working days.
- Maneesh K. Singh & Co. archive · Supports historical coverage reconstruction.
- GitHub repository · Committed CSV files are the public delivery mechanism.
- Repository documentation · Documents sources, coverage, and consumer usage.
README.md
Connections 16
- Workflow properties → GitHub Actions: configures job
- GitHub Actions → Primary collector: runs
- GitHub Actions → Archive acquisition: can run
- SBI rate-card PDFs → Primary collector: daily input
- Maneesh K. Singh & Co. archive → Archive acquisition: archive input
- Archive acquisition → PDF evidence archive: stores evidence
- Primary collector → PDF evidence archive: archives downloads
- Primary collector → ₹10–20 lakh extraction: parses rate cards
- ₹10–20 lakh extraction → USD rate history: appends USD records
- ₹10–20 lakh extraction → EUR rate history: appends EUR records
- ₹10–20 lakh extraction → JPY rate history: appends JPY records
- Primary collector → Run log: writes run output
- USD rate history → GitHub repository: published via commits
- EUR rate history → GitHub repository: published via commits
- JPY rate history → GitHub repository: published via commits
- Repository documentation → GitHub repository: documents dataset