currensees 1.1.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
==========

.. image:: https://badge.fury.io/py/currensees.svg
    :target: https://badge.fury.io/py/currensees
    :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

Or:

.. code-block:: bash

	$ easy_install currensees


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

.. code-block:: python

    from currensees.auth import Auth
    from currensees.currencies import Currencies
    from currensees.historical import Historical
    from currensees.convert import Convert
    from currensees.convert_all import ConvertAll
    from currensees.daily_average import DailyAverage
    from currensees.weekly_average import WeeklyAverage
    from currensees.monthly_average import MonthlyAverage
    from currensees.margins_spreads import MarginsSpreads
    from currensees.performances import Performances
    from currensees.signals import Signals

    # Authenticate and log in
    auth = Auth()
    username = "your_username"
    password = "your_password"

    result = auth.login(username, password)
    print("Login successful:", result)

    currencies = Currencies(auth.headers)
    result = currencies.get_currencies(username, "19", "04", "2023")
    print("Currencies:", result)

    uuid = "currency_uuid"
    result = currencies.get_currency(uuid, username, "19", "04", "2023")
    print("Currency:", result)

    historical = Historical(auth.headers)
    result = historical.get_historical(username, "2023_04_19", "19", "04", "2023")
    print("Historical data:", result)

    uuid = "historical_uuid"
    result = historical.get_historical_currency(uuid, username, "2023_04_19", "19", "04", "2023")
    print("Historical currency:", result)

    convert = Convert(auth.headers)
    result = convert.convert_currency(username, "2023_04_19", "GBP", "EUR", "500")
    print("Converted amount:", result)

    convert_all = ConvertAll(auth.headers)
    result = convert_all.convert_all_currencies(username, "GBP", 120, "2023_04_19")
    print("Converted amounts:", result)

    daily_average = DailyAverage(auth.headers)
    result = daily_average.get_daily_average("2023_04_19")
    print("Daily average:", result)

    weekly_average = WeeklyAverage(auth.headers)
    result = weekly_average.get_weekly_average("2023_04_03", "2023_04_07")
    print("Weekly average:", result)

    monthly_average = MonthlyAverage(auth.headers)
    result = monthly_average.get_monthly_average("2023", "04")
    print("Monthly average:", result)

    margins_spreads = MarginsSpreads(auth.headers)
    result = margins_spreads.get_margins_spreads(username, "19", "04", "2023")
    print("Margins and spreads:", result)

    uuid = "margins_spreads_uuid"
    result = margins_spreads.get_margins_spreads_currency(uuid, username, "19", "04", "2023")
    print("Margins and spreads for currency:", result)

    performances = Performances(auth.headers)
    result = performances.get_performances(username)
    print("Performances:", result)

    uuid = "performance_uuid"
    result = performances.get_performance(uuid, username)
    print("Performance:", result)

    signals = Signals(auth.headers)
    result = signals.get_signals(username)
    print("Signals:", result)

    uuid = "signal_uuid"
    result = signals.get_signal(uuid, username)
    print("Signal:", result)

Setting up 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/assets/license/BSD_3_Clause.txt


Copyright
----------

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

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