Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.44 KB

File metadata and controls

60 lines (40 loc) · 1.44 KB

Introduction

Python client for Midgard API

THORChain has several APIs - Midgard, THORNode, Cosmos RPC, CometBFT RPC. This python client focuses on interactions with Midgard API.

Built for Midgard Public API version 2.32.8.

API Docs

Warning

I needed this to use only one endpoint, so first release will be very much useless for anyone. I will continue working on this and covering all API endpoints in the future when I have more free time.

Progress

Below is the implementation status of the major sections of Midgard API in this Python client:

Section Implemented Notes
Health Info
Pools List

If you notice any discrepancy or want a section prioritized, please open an issue or PR.

Installation

Normal installation

pip install midgard-py

Development installation

git clone https://github.com/jpleorx/midgard-py.git
cd midgard-py
pip install --editable .

Usage

from midgard_py import MidgardAPI

api = MidgardAPI()

# Check that it's online
health = api.health()

# Get pools
pools = api.pools()

Links

In case you’d like to check my other work or contact me: