Skip to content

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

License

Notifications You must be signed in to change notification settings

ggallohernandez/pymatriz

Repository files navigation

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 repository. Install and update using pip:

pip install pymatriz

Also available in Anaconda repository. Install and update using conda:

conda install pymatriz

API Credentials

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

Usage

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages