currency-quote
Complete solution for extracting currency pair quotes data.
Stack
Quick Start
from currency_quote import ClientBuilder
# Single currency pair
client = ClientBuilder(currency_list="USD-BRL")
# Multiple currency pairs
client = ClientBuilder(currency_list=["USD-BRL", "EUR-BRL"])
# Get the latest quote
print(client.get_last_quote())
# Get historical quote for a specific date (YYYYMMDD)
print(client.get_history_quote(reference_date=20220101))
Last quote response
[
{
"currency_pair": "USD-BRL",
"currency_pair_name": "Dólar Americano/Real Brasileiro",
"base_currency_code": "USD",
"quote_currency_code": "BRL",
"quote_timestamp": 1727201744,
"bid_price": "5.4579",
"ask_price": "5.4589",
"quote_extracted_at": 1727201753
}
]
Historical quote response
[
{
"currency_pair": "USD-BRL",
"currency_pair_name": "Dólar Americano/Real Brasileiro",
"base_currency_code": "USD",
"quote_currency_code": "BRL",
"quote_timestamp": 1719440767,
"bid_price": 5.524,
"ask_price": 5.5245,
"quote_extracted_at": 1727201753
}
]
Architecture
This library follows Hexagonal Architecture (ports & adapters), decoupling core business logic from external data sources so any API can be swapped without touching domain code.
Highlights
| Feature | Description |
|---|---|
| Parameter Validation | Currency pairs are validated against the data source before any request |
| Retry Strategy | Configurable retry logic with exponential and linear backoff |
| Hexagonal Architecture | Core logic fully decoupled from external APIs |
| CI/CD | Automated testing, build, and PyPI publication pipelines |
| Code Quality | Black formatting + Pylint enforced on every commit |
Contributing
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
currency_quote-5.0.7.tar.gz
(8.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file currency_quote-5.0.7.tar.gz.
File metadata
- Download URL: currency_quote-5.0.7.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.6.1 CPython/3.9.25 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14c69cd17088e1cfff5ea461ccefc99752cd0515b5f269cc8b207fa803f8bfea
|
|
| MD5 |
9c6d68bca30bb3dc3d3e79d2152c44c3
|
|
| BLAKE2b-256 |
f34993945760a000ccfea77028a515f7117c2e92d7152f86b1035ab61af166be
|
File details
Details for the file currency_quote-5.0.7-py3-none-any.whl.
File metadata
- Download URL: currency_quote-5.0.7-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.6.1 CPython/3.9.25 Linux/6.17.0-1010-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0e68d66afc612844116bc04df4eb221e356fde7f4828d50f574010a7f30caf0
|
|
| MD5 |
895f48d2837fdbddf893c4920d575e8f
|
|
| BLAKE2b-256 |
5c51647858e150f650745117844b1e1a04851dea00067c6ec68791db31f4ce9e
|