Skip to content

PoulWalcker/coinoxr-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coinoxr-python

Unofficial Python SDK for the Open Exchange Rates API.
Provides Pythonic services for exchange rates, currency conversion, OHLC and usage endpoints.

⚠️ This project is not affiliated with Open Exchange Rates.


Installation

From source (development dependencies included):

pip install -e '.[dev]'

When published to PyPI:

pip install coinoxr-python

Quickstart

from sdk import CoinoxrClient

client = CoinoxrClient(app_id="your_api_key")

# List currencies
currencies = client.currencies.get()
print(currencies)

# Latest exchange rates
latest = client.rates.latest(base="USD", symbols=["EUR", "GBP"])
print(latest)

# Convert 100 USD to EUR
converted = client.converter.convert(100, "USD", "EUR")
print(converted)

Services

currencies

  • Endpoint: /currencies.json
  • Method: client.currencies.get()

rates

  • /latest.jsonclient.rates.latest(...)
  • /historical/{YYYY-MM-DD}.jsonclient.rates.historical(...)
  • /time-series.jsonclient.rates.time_series(...)

convert

  • Endpoint: /convert
  • Method: client.converter.convert(100, "USD", "EUR")

ohlc

  • Endpoint: /ohlc.json
  • Method:
    client.ohlc.ohlc(
        start="2025-01-01T00:00:00Z",
        period="daily",
        base="USD",
        symbols=["EUR","GBP"]
    )

usage

  • Endpoint: /usage.json
  • Method: client.usage.get()

Development

Run tests:

pytest -q

Lint and format:

ruff check .
black .

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages