xchainpy2-midgard
The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses transaction event data from THORChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with THORChain protocol, users should query THORNode directly.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 2.34.0
- Package version: 2.34.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import xchainpy2_midgard
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import xchainpy2_midgard
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import xchainpy2_midgard
from xchainpy2_midgard.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = xchainpy2_midgard.SpecificationApi(xchainpy2_midgard.ApiClient(configuration))
try:
# Documentation
api_instance.get_docs()
except ApiException as e:
print("Exception when calling SpecificationApi->get_docs: %s\n" % e)
# create an instance of the API class
api_instance = xchainpy2_midgard.SpecificationApi(xchainpy2_midgard.ApiClient(configuration))
try:
# Swagger File
api_instance.get_swagger()
except ApiException as e:
print("Exception when calling SpecificationApi->get_swagger: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to /
| Class | Method | HTTP request | Description |
|---|---|---|---|
| SpecificationApi | get_docs | GET /v2/doc | Documentation |
| SpecificationApi | get_swagger | GET /v2/swagger.json | Swagger File |
| DefaultApi | get_actions | GET /v2/actions | Actions List |
| DefaultApi | get_affiliate_earning | GET /v2/history/affiliate/earnings | Affiliate Earnings History |
| DefaultApi | get_affiliate_history | GET /v2/history/affiliate | Affiliate earnings History |
| DefaultApi | get_affiliate_stats | GET /v2/history/affiliate/stats | Affiliate Volume Stats |
| DefaultApi | get_balance | GET /v2/balance/{address} | Current balance for an address |
| DefaultApi | get_bonders_details | GET /v2/bonds/{address} | Bonder Details |
| DefaultApi | get_borrower_detail | GET /v2/borrower/{address} | Borrower Details |
| DefaultApi | get_borrowers_addresses | GET /v2/borrowers | Borrowers List |
| DefaultApi | get_churns | GET /v2/churns | Churns List |
| DefaultApi | get_depth_history | GET /v2/history/depths/{pool} | Depth and Price History |
| DefaultApi | get_earnings_history | GET /v2/history/earnings | Earnings History |
| DefaultApi | get_health | GET /v2/health | Health Info |
| DefaultApi | get_holders | GET /v2/holders | Current top holders for an asset |
| DefaultApi | get_known_pools | GET /v2/knownpools | Known Pools List |
| DefaultApi | get_liquidity_history | GET /v2/history/liquidity_changes | Liquidity Changes History |
| DefaultApi | get_member_detail | GET /v2/member/{address} | Member Details |
| DefaultApi | get_members_adresses | GET /v2/members | Members List |
| DefaultApi | get_network_data | GET /v2/network | Network Data |
| DefaultApi | get_nodes | GET /v2/nodes | Nodes List |
| DefaultApi | get_pool | GET /v2/pool/{asset} | Details of a Pool |
| DefaultApi | get_pool_stats | GET /v2/pool/{asset}/stats | Pool Statistics |
| DefaultApi | get_pools | GET /v2/pools | Pools List |
| DefaultApi | get_reserve_history | GET /v2/history/reserve | Reserve income and expenses over bucketed history |
| DefaultApi | get_rune_pool_detail | GET /v2/runepool/{address} | RUNEPool Details |
| DefaultApi | get_rune_pool_history | GET /v2/history/runepool | RUNEPool total members and units History |
| DefaultApi | get_rune_price_history | GET /v2/history/rune | Rune price history in USD |
| DefaultApi | get_saver_detail | GET /v2/saver/{address} | Saver Details |
| DefaultApi | get_savers_history | GET /v2/history/savers/{pool} | Savers Units and Depth History |
| DefaultApi | get_stats | GET /v2/stats | Global Stats |
| DefaultApi | get_swap_history | GET /v2/history/swaps | Swaps History |
| DefaultApi | get_tcy_distribution | GET /v2/tcy/distribution/{address} | Tcy Distribution |
| DefaultApi | get_thor_name_detail | GET /v2/thorname/lookup/{name} | THORName Details |
| DefaultApi | get_thor_names_by_address | GET /v2/thorname/rlookup/{address} | Gives a list of THORNames by reverse lookup |
| DefaultApi | get_thor_names_owner_by_address | GET /v2/thorname/owner/{address} | THORName owner |
| DefaultApi | get_tvl_history | GET /v2/history/tvl | Total Value Locked History |
| DefaultApi | get_votes | GET /v2/votes | Current Protocol Voting |
Documentation For Models
- Action
- ActionMeta
- AddLiquidityMetadata
- AffiliateEarning
- AffiliateEarningInterval
- AffiliateEarningItem
- AffiliateHistory
- AffiliateHistoryIntervals
- AffiliateHistoryItem
- AffiliateHistoryMeta
- AffiliateStatItem
- AffiliateStats
- AffiliateStatsItem
- Balance
- BlockRewards
- BondMetadata
- BondMetrics
- BonderDetails
- BonderNode
- BorrowerDetails
- BorrowerPool
- Borrowers
- ChurnItem
- Churns
- Coin
- Coins
- ContractMetadata
- DepthHistory
- DepthHistoryIntervals
- DepthHistoryItem
- DepthHistoryItemPool
- DepthHistoryMeta
- EarningsHistory
- EarningsHistoryIntervals
- EarningsHistoryItem
- EarningsHistoryItemPool
- FailedMetadata
- GenesisInf
- Health
- HeightTS
- Holder
- Holders
- InlineResponse200
- ItemThorname
- KnownPools
- LimitSwapMetadata
- LiquidityHistory
- LiquidityHistoryIntervals
- LiquidityHistoryItem
- MemberDetails
- MemberPool
- Members
- Metadata
- Network
- NetworkFees
- Node
- Nodes
- PoolDetail
- PoolDetails
- PoolStatsDetail
- RUNEPoolDetails
- RUNEPoolHistory
- RUNEPoolHistoryIntervals
- RUNEPoolHistoryItem
- RUNEPoolHistoryMeta
- RUNEPoolProvider
- RebondMetadata
- RefundMetadata
- ReserveHistory
- ReserveIntervals
- ReserveItem
- ReserveMeta
- ReverseTHORNames
- RunePoolDepositMetadata
- RunePoolWithdrawMetadata
- RunePriceHistory
- RunePriceIntervals
- RunePriceItem
- RunePriceMeta
- SaverDetails
- SaverPool
- SaversHistory
- SaversHistoryIntervals
- SaversHistoryItem
- SaversHistoryMeta
- SendMetadata
- StatsData
- StreamingSwapMeta
- SwapHistory
- SwapHistoryIntervals
- SwapHistoryItem
- SwapMetadata
- TCYDistribution
- TCYDistributionItem
- THORNameDetails
- THORNameEntry
- TVLHistory
- TVLHistoryIntervals
- TVLHistoryItem
- TcyMetadata
- ThornameMetadata
- Transaction
- VoteItem
- VoteValue
- Votes
- WithdrawMetadata
Documentation For Authorization
All endpoints do not require authorization.
Author
Metadata
Release files for xchainpy2-midgard 2.34.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xchainpy2_midgard-2.34.0.tar.gz | 103.1 kB | Without provenance | Details for xchainpy2_midgard-2.34.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xchainpy2_midgard-2.34.0-py3-none-any.whl | Python 3 | none | any | Details for xchainpy2_midgard-2.34.0-py3-none-any.whl |
Total release size: 420.8 kB
Release files / xchainpy2_midgard-2.34.0.tar.gz
| Download URL | xchainpy2_midgard-2.34.0.tar.gz |
|---|---|
| Size | 103.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e84efb0b553c1148ec946bd361e7dc61661c2469dae1db8e5502dc02569b58b2
|
|
BLAKE2b-256 checksum How to use checksums |
5a9d117e24f69bb5700cde7979a0b916e5ba113def15f46a6a1f81fa1b75d390
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Release files / xchainpy2_midgard-2.34.0-py3-none-any.whl
| Download URL | xchainpy2_midgard-2.34.0-py3-none-any.whl |
|---|---|
| Size | 317.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d77d2570daafe5ac2d57eff4626dbca4542fb33ce62f9dde4fb0444abbe225bf
|
|
BLAKE2b-256 checksum How to use checksums |
fef2c8ab080daa3e43a69ca657304685b54621dad2221dc954487b45bc788ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.10
|
Security for xchainpy2-midgard 2.34.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.