sbi-tt-rates
Lookup historical SBI TT rates, with automatic fallback to the nearest prior trading day when a date has no published rate (weekends, holidays, no-publish days).
** Disclaimer:** This is an unofficial, community-maintained package. It is not affiliated with, endorsed by, or sourced directly from the State Bank of India. Data is pulled from a third-party open-source archive (see below), which itself scrapes publicly published SBI tt rate sheets, it is not a live or guaranteed-accurate feed. Rates may be missing, delayed, or wrong due to upstream parsing errors or gaps. Use at your own risk. Always cross-check against an official SBI source before relying on this for tax filings, compliance, or any financial decision.
Data source: sahilgupta/sbi-fx-ratekeeper (not affiliated with SBI or the upstream repo author this package is a thin, cached wrapper around that repo's published CSVs).
Install
pip install sbi-tt-rates
Usage
from sbi_tt_rates import get_rate
result = get_rate("2021-02-20", currency="USD", rate_type="tt_buy")
print(result)
# RateResult(requested_date='2021-02-20', actual_date='2021-02-18',
# exact_match=False, rate=72.3, rate_type='tt_buy')
inr_value = 10_000 * result.rate
rate_type:"tt_buy"or"tt_sell"exact_matchtells you whether the requested date had a published rate, or whether it fell back to the nearest prior trading day — useful to log if you're using this for tax/compliance purposes.- Data is cached locally (
~/.cache/sbi_tt_rates/), so repeated lookups don't re-download the CSV each call.
Currencies
AED AUD BDT BHD CAD CHF CNY DKK EUR GBP HKD IDR JPY KES KRW KWD LKR MYR NOK NZD OMR PKR QAR RUB SAR SEK SGD THB TRY USD ZAR SBI_REFERENCE_RATES_ on below GitHub repo.
Credits
https://github.com/sahilgupta/sbi-fx-ratekeeper
License
MIT
Contribution
Feel free to raise a PR, open a issue.
Metadata
Release files for sbi-tt-rates 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sbi_tt_rates-0.1.2.tar.gz | 17.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sbi_tt_rates-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 MB
Release files / sbi_tt_rates-0.1.2.tar.gz
| Download URL | sbi_tt_rates-0.1.2.tar.gz |
|---|---|
| Size | 17.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f55f298eb359aedf90288a03faae535fe24dbb4dfb834b4c1921860a99dfa2c
|
|
BLAKE2b-256 checksum How to use checksums |
b458c4ada52c317deab2f7c8e5b6b2937e03bd3bf747cf0dbccba340cf5414f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / sbi_tt_rates-0.1.2-py3-none-any.whl
| Download URL | sbi_tt_rates-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b957ec86f5a3acfaddc57b04525f197cc4b92efd99f3cc3e2d65b44d89747e1e
|
|
BLAKE2b-256 checksum How to use checksums |
b52141890d0f08c7154e029f8e519486b858891f1f0a6686322635138df8e932
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|