Skip to content

JPLeoRX/midgard-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Python client for Midgard API

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages