quickforex
Quick and easy access to foreign exchange rates. By default, this API uses exchangerate.host as backend.
Getting started
Using quickforex from a Python script
Get the last available rate for a single currency pair
from quickforex import CurrencyPair
import quickforex
quickforex.get_latest_rate("EUR/USD") # -> Decimal(1.16)
quickforex.get_latest_rate("EURUSD")
quickforex.get_latest_rate("EUR", "USD")
quickforex.get_latest_rate(("EUR", "USD"))
quickforex.get_latest_rate(CurrencyPair("EUR", "USD"))
Get the last available rate for multiple currency pairs
from quickforex import CurrencyPair
import quickforex
quickforex.get_latest_rate("EUR/USD", "EUR/GBP") # -> {CurrencyPair("EUR", "USD"): Decimal(1.16), CurrencyPair("EUR", "GBP"): Decimal(0.84)}
quickforex.get_latest_rate(["EUR/USD", "EUR/GBP"])
Get the historical rate for one or more currency pairs
from datetime import date
from quickforex import CurrencyPair
import quickforex
quickforex.get_historical_rate("BTC/USD", as_of=date(year=2021, month=1, day=1)) # -> Decimal(29388.20)
quickforex.get_historical_rates("EUR/USD", "EUR/GBP", as_of=date(year=2021, month=1, day=1)) # -> {CurrencyPair("EUR", "USD"): Decimal(1.21), CurrencyPair("EUR", "GBP"): Decimal(0.89)}
Get the rates for one or more currency pairs between two historical dates
from datetime import date
from quickforex import CurrencyPair
import quickforex
quickforex.get_rates_time_series(
"EURUSD", "EURGBP",
start_date=date(year=2020, month=1, day=1),
end_date=date(year=2021, month=1, day=1)
)
# -> {
# CurrencyPair("EUR", "USD"): {
# date(year=2020, month=1, day=1): Decimal(1.12),
# ...,
# date(year=2021, month=1, day=1): Decimal(1.21)
# },
# CurrencyPair("EUR", "GBP"): { ... }
# }
Using quickforex from the command line
Get the last available rate for one or more currency pairs
❯ quickforex latest EURUSD EURGBP
{
"EUR": {
"GBP": 0.846354,
"USD": 1.164798
}
}
Get the historical rate for one or more currency pairs
❯ quickforex history --date 2020-01-01 EURUSD EURGBP
{
"EUR": {
"GBP": 0.8462,
"USD": 1.1221
}
}
Get the rates for one or more currency pairs between two historical dates
❯ quickforex series --from 2020-01-01 --to 2020-12-31 EURGBP EURUSD GBPJPY
{
"EUR": {
"GBP": {
"2020-01-01": 0.8462,
"2020-01-02": 0.8466,
"2020-01-03": 0.8495,
...
"2020-12-30": 0.903111,
"2020-12-31": 0.892135
},
"USD": { ... }
},
"GBP": {"JPY": { ... }}
}
Metadata
Release files for quickforex 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quickforex-0.1.3.tar.gz | 15.0 kB | Without provenance | Details for quickforex-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quickforex-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for quickforex-0.1.3-py3-none-any.whl |
Total release size: 33.8 kB
Release files / quickforex-0.1.3.tar.gz
| Download URL | quickforex-0.1.3.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03f762387088421138adde05452b9421a258afac55574bcb398d99ea6a803473
|
|
BLAKE2b-256 checksum How to use checksums |
ef8d78c016025b89c6a86e2c8d720744637245211bcd09e0ceb94afd20c51871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Release files / quickforex-0.1.3-py3-none-any.whl
| Download URL | quickforex-0.1.3-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
06d2d29cb8c2f598190e3d0b31403d62cf7423e3b5754351cec0c523dd15a70b
|
|
BLAKE2b-256 checksum How to use checksums |
bc0ab68473a6a3800d7c12955ca5fdb67f9f216ed8875b6f1ff1f69527013ded
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
|
Security for quickforex 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.