Skip to main content

venrate

Venrate is a library to get the exchange rate from currency A to currency B from different platforms like BCV.

venrate logo

Requeriments

  • python3 >= 3.9
  • requests >= 2.32.3
  • dataclasses and typing (standard libraries)

Installation

You can install venrate from Pypi

pip install venrate

Using venrate.

Exchange rate from 'Bolivares' to 'US Dollars' in all platforms.

# importing venrate and creating object.
from venrate import Venrate
venrate = Venrate() 

for p_name, platform in venrate.platforms.items():
    currency_from = platform.currency_from
    currency_to = platform.currency_to

    rate = venrate.get_rate(
            p_name,
            currency_from,
            currency_to,
            use_last_response=False,
            timeout=10,                 # This is a requests.request option
            verify=True                 # This is a requests.request option
            )

    print(f"{p_name} rate from '{currency_from}' to '{currency_to}' is"
            " " f"'{rate}'")

Exchange rate from 'Bolivares' to 'US Dollars' using BCV.

# importing venrate and creating object
from venrate import Venrate
venrate = Venrate()

platform_name = 'BcV' # Name is case insensitive
bcv_rate = venrate.get_rate(
            platform_name,
            use_last_response=False,
            timeout=10,
            verify=False            # Lately BCV it's giving SSL errors
            )

print(bcv_rate)

# Successfull requests.Response are saved, so you can use it later.
bcv_rate = venrate.get_rate(
            platform_name,
            use_last_response=True,
            timeout=10,
            verify=False            # Lately BCV it's giving SSL errors
            )

print(bcv_rate)

Default currency names that platforms uses

# importing venrate and creating object
from venrate import Venrate
venrate = Venrate()

for p_name, platform in venrate.platforms.items():
    currency_from = platform.currency_from
    currency_to = platform.currency_to
    print(p_name, currency_from, currency_to)

# Why know this?
# Platforms could have different naming for currencies
# Binance for example uses USDT
# MonitorDolar, BCV and Yadio uses USD

📓 Notes

  • It's still a very premature library, it lacks:

    • Documentation
    • Tests
    • More platforms
    • More methods or new idea of superclass that results useful to use.
  • There are platforms like MonitorDolar that only does BS to USD so if you try using different currencies or different ordering it will throw the same rate.

Supported platforms

Name Image
Binance
BCV
MonitorDolar
Yadio

Made by 🔗 Sivefunc

Licensed under 🔗 GPLv3

Metadata

Release files for venrate 1.0.4

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

Source distribution (sdist)

Source distribution for venrate 1.0.4
File Size Uploaded Provenance
venrate-1.0.4.tar.gz 20.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for venrate 1.0.4
File Interpreter ABI Platform
venrate-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 43.1 kB

Release files / venrate-1.0.4.tar.gz

Download URL venrate-1.0.4.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1f1be3cbe0a4fdc1507d31ca974ed320af0324ae151403ceece3009e65868a52
BLAKE2b-256 checksum
How to use checksums
cd1952980e92e402bfe5556956838554ac79a0de161fe54c31581e8284572f36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.2

Release files / venrate-1.0.4-py3-none-any.whl

Download URL venrate-1.0.4-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f206c36c9e39f86c509cd3a1620318373430f6418a25ad4a5d2433dc7fab31f6
BLAKE2b-256 checksum
How to use checksums
6409ac272b2858f8ea0c9bc23b0e653490f4d036a7d6040888d90316f146cd73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.2

Security for venrate 1.0.4

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.

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files No provenance

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