currensees-sdk 1.0.1
Python library for integrating with the Currency API.
License: BSD 3-Clause
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Keywords: currency,currency api,currensees,currensees sdk,rate,rates,exchange rates,moat,moatsystems,moat systems

currensees_sdk
==============

.. image:: https://badge.fury.io/py/currensees_sdk.svg
    :target: https://badge.fury.io/py/currensees_sdk
    :alt: Currency API Python Package Version

Python library for integrating with `Currency API`_ functionality.

.. _Currency API: https://moatsystems.com/currency-api/


Requirements
-------------

Python 2.7 and later.


Setup
------

You can install this package by using the pip tool and installing:

.. code-block:: bash

	$ pip install currensees_sdk

Or:

.. code-block:: bash

	$ easy_install currensees_sdk


Usage Example
-------------

.. code-block:: python

    from currensees_sdk.auth import CurrenseesAuth
    from currensees_sdk.convert import CurrenseesConvert
    from currensees_sdk.convert_all import CurrenseesConvertAll
    from currensees_sdk.currencies import CurrenseesCurrencies
    from currensees_sdk.historical import CurrenseesHistorical

    # Replace 'username' and 'password' with your actual credentials
    username = 'username'
    password = 'password'

    # Authenticate and log in
    auth_client = CurrenseesAuth(username, password)
    response = auth_client.login()

    # Use the base_url from the auth_client instance
    base_url = auth_client.base_url

    # Convert between two currencies
    convert_client = CurrenseesConvert(base_url)
    convert_response = convert_client.convert('2023_04_02', 'GBP', 'CAD', 500)
    print("Convert response:", convert_response)

    # Convert to all currencies
    convert_all_client = CurrenseesConvertAll(base_url)
    convert_all_response = convert_all_client.convert_all('GBP', 120, '2023_04_02')
    print("Convert All response:", convert_all_response)

    # Get all currencies
    currencies_client = CurrenseesCurrencies(base_url)
    currencies_response = currencies_client.get_currencies(username, '02', '04', '2023')
    print("Currencies response:", currencies_response)

    # Get currency by UUID
    # Replace '<uuid>' with a valid UUID for a currency
    uuid = '<uuid>'
    currency_by_uuid_response = currencies_client.get_currency_by_uuid(uuid, username, '02', '04', '2023')
    print("Currency by UUID response:", currency_by_uuid_response)

    # Get historical data
    historical_client = CurrenseesHistorical(base_url)
    historical_response = historical_client.get_historical_data(username, '2023_04_02', '02', '04', '2023')
    print("Historical response:", historical_response)

    # Get historical data by UUID
    # Replace '<uuid>' with a valid UUID for a currency
    uuid = '<uuid>'
    historical_data_by_uuid_response = historical_client.get_historical_data_by_uuid(uuid, username, '02', '04', '2023', '2023_04_02')
    print("Historical data by UUID response:", historical_data_by_uuid_response)


Setting up an Currency API Account
----------------------------------

Subscribe here for a `user account`_.

.. _user account: https://moatsystems.com/currency-api/


Using the Currency API
----------------------

You can read the `API documentation`_ to understand what's possible with the Currency API. If you need further assistance, don't hesitate to `contact us`_.

.. _API documentation: https://docs.currensees.com/
.. _contact us: https://moatsystems.com/contact/

License
--------

This project is licensed under the `BSD 3-Clause License`_.  

.. _BSD 3-Clause License: https://moatsystems.com/


Copyright
----------

Copyright |copy| 2023 `Moat Systems Limited`_. All Rights Reserved.

.. |copy| unicode:: 0xA9 .. copyright sign
.. _Moat Systems Limited: https://moatsystems.com/