Metadata-Version: 2.1
Name: pymatriz
Version: 0.1.3
Summary: Python connector for Primary DMA (Matriz) Rest and Websocket APIs.
Home-page: https://github.com/ggallohernandez/pymatriz
Author: Guillermo Gallo
Author-email: ggallohernandez@gmail.com
License: MIT License
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Software Development
Description-Content-Type: text/x-rst
Requires-Dist: requests (>=2.20.0)
Requires-Dist: simplejson (>=3.10.0)
Requires-Dist: enum34 (>=1.1.6)
Requires-Dist: websocket-client (>=0.54.0)
Requires-Dist: pandas (~=1.1.3)
Requires-Dist: lxml (~=4.5.2)

Primary DMA (Matriz) python connector
=====================================

Overview
--------
**pymatriz** is a python library that allows interactions with Primary DMA (Matriz) Rest and Websocket APIs.

Installing
----------
*pymatriz* is available at the `Python Package Index <https://pypi.org/project/pymatriz>`_ repository. Install and update using `pip <https://pip.pypa.io/en/stable/quickstart/>`_\ :

.. code-block::

   pip3 install pymatriz


API Credentials
---------------

Credentials provided by your broker which use Primary DMA (Matriz) platform.

Usage
~~~~~~~~~~~~~~~~~
.. code:: py

    import datetime

    from pymatriz.enums import MarketDataEntry, Market
    from pymatriz.client import MatrizAPIClient

    client = MatrizAPIClient(username="", password="")

    # Real-time message handling
    client.add_market_data_handler(lambda msg: print(msg))

    # Error handling
    client.set_exception_handler(lambda e: print(e))

    # Negotiate Auth Token and connects to websocket
    client.connect()

    # Rest API call + websocket subscription
    print(client.get_daily_history(["GGAL"], terms=[MarketDataEntry.TERM_48HS], market=Market.MERVAL, start_date=datetime.date(2020, 10, 5)))

    # Ends websocket connection
    client.close()

Disclaimer
----------

The library is built as a result of a reverse engineering process, so use it on your own behalf.

This library is provided 'as is' without warranty of any kind, either express or implied, including, but not limited to, the implied warranties of fitness for a purpose, or the warranty of non-infringement.


