Skip to main content

currency-quote

Complete solution for extracting currency pair quotes data.

PyPI - Status PyPI - Version PyPI - Downloads PyPI - Python Version

CI CD Codecov

Ask DeepWiki


Stack

Python  Poetry  pytest  GitHub Actions  CodeCov  pypi 


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.

Hexagonal Design


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

Metadata

Release files for currency-quote 5.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for currency-quote 5.0.7
File Size Uploaded
currency_quote-5.0.7.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for currency-quote 5.0.7
File Interpreter ABI Platform
currency_quote-5.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 20.9 kB

Release files / currency_quote-5.0.7.tar.gz

Download URL currency_quote-5.0.7.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
14c69cd17088e1cfff5ea461ccefc99752cd0515b5f269cc8b207fa803f8bfea
BLAKE2b-256 checksum
How to use checksums
f34993945760a000ccfea77028a515f7117c2e92d7152f86b1035ab61af166be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.25 Linux/6.17.0-1010-azure

Release files / currency_quote-5.0.7-py3-none-any.whl

Download URL currency_quote-5.0.7-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0e68d66afc612844116bc04df4eb221e356fde7f4828d50f574010a7f30caf0
BLAKE2b-256 checksum
How to use checksums
5c51647858e150f650745117844b1e1a04851dea00067c6ec68791db31f4ce9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.9.25 Linux/6.17.0-1010-azure

Release history Release notifications | RSS feed

This release

5.0.7 This release

2 release files

5.0.6

2 release files

5.0.5

2 release files

5.0.4

2 release files

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.2.8

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.1

2 release files

3.1.0

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page