xchainpy2-midgard-maya 2.16.0
Midgard Public API
Keywords: Swagger, Midgard Public API

# xchainpy2-midgard-maya
The Midgard Public API queries MAYAChain and prepares information about the network  to be readily available for public users. The API parses transaction event data from MAYAChain and stores them in a time-series database to make time-dependent queries easy. Midgard does not hold critical information. To interact with MAYAChain protocol, users should query MAYANode directly.

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 2.16.0
- Package version: 2.16.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

```sh
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:
```python
import xchainpy2_midgard_maya 
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import xchainpy2_midgard_maya
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import xchainpy2_midgard_maya
from xchainpy2_midgard_maya.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = xchainpy2_midgard_maya.SpecificationApi(xchainpy2_midgard_maya.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_maya.SpecificationApi(xchainpy2_midgard_maya.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**](docs/SpecificationApi.md#get_docs) | **GET** /v2/doc | Documentation
*SpecificationApi* | [**get_swagger**](docs/SpecificationApi.md#get_swagger) | **GET** /v2/swagger.json | Swagger File
*DefaultApi* | [**get_actions**](docs/DefaultApi.md#get_actions) | **GET** /v2/actions | Actions List
*DefaultApi* | [**get_affiliate_history**](docs/DefaultApi.md#get_affiliate_history) | **GET** /v2/history/affiliate | Affiliate History
*DefaultApi* | [**get_balance**](docs/DefaultApi.md#get_balance) | **GET** /v2/balance/{address} | Current balance for an address
*DefaultApi* | [**get_borrower_detail**](docs/DefaultApi.md#get_borrower_detail) | **GET** /v2/borrower/{address} | Borrower Details
*DefaultApi* | [**get_borrowers_addresses**](docs/DefaultApi.md#get_borrowers_addresses) | **GET** /v2/borrowers | Borrowers List
*DefaultApi* | [**get_cacao_pool_detail**](docs/DefaultApi.md#get_cacao_pool_detail) | **GET** /v2/cacaopool/{address} | CACAOPool Details
*DefaultApi* | [**get_cacao_pool_history**](docs/DefaultApi.md#get_cacao_pool_history) | **GET** /v2/history/cacaopool | CacaoPool total members and units History
*DefaultApi* | [**get_cacao_price_history**](docs/DefaultApi.md#get_cacao_price_history) | **GET** /v2/history/cacao | Cacao price history in USD
*DefaultApi* | [**get_churns**](docs/DefaultApi.md#get_churns) | **GET** /v2/churns | Churns List
*DefaultApi* | [**get_depth_history**](docs/DefaultApi.md#get_depth_history) | **GET** /v2/history/depths/{pool} | Depth and Price History
*DefaultApi* | [**get_earnings_history**](docs/DefaultApi.md#get_earnings_history) | **GET** /v2/history/earnings | Earnings History
*DefaultApi* | [**get_health**](docs/DefaultApi.md#get_health) | **GET** /v2/health | Health Info
*DefaultApi* | [**get_holders**](docs/DefaultApi.md#get_holders) | **GET** /v2/holders | Current top holders for an asset
*DefaultApi* | [**get_known_pools**](docs/DefaultApi.md#get_known_pools) | **GET** /v2/knownpools | Known Pools List
*DefaultApi* | [**get_liquidity_history**](docs/DefaultApi.md#get_liquidity_history) | **GET** /v2/history/liquidity_changes | Liquidity Changes History
*DefaultApi* | [**get_member_detail**](docs/DefaultApi.md#get_member_detail) | **GET** /v2/member/{address} | Member Details
*DefaultApi* | [**get_members_adresses**](docs/DefaultApi.md#get_members_adresses) | **GET** /v2/members | Members List
*DefaultApi* | [**get_network_data**](docs/DefaultApi.md#get_network_data) | **GET** /v2/network | Network Data
*DefaultApi* | [**get_nodes**](docs/DefaultApi.md#get_nodes) | **GET** /v2/nodes | Nodes List
*DefaultApi* | [**get_pool**](docs/DefaultApi.md#get_pool) | **GET** /v2/pool/{asset} | Details of a Pool
*DefaultApi* | [**get_pool_stats**](docs/DefaultApi.md#get_pool_stats) | **GET** /v2/pool/{asset}/stats | Pool Statistics
*DefaultApi* | [**get_pools**](docs/DefaultApi.md#get_pools) | **GET** /v2/pools | Pools List
*DefaultApi* | [**get_reserve_history**](docs/DefaultApi.md#get_reserve_history) | **GET** /v2/history/reserve | Reserve income and expenses over bucketed history
*DefaultApi* | [**get_saver_detail**](docs/DefaultApi.md#get_saver_detail) | **GET** /v2/saver/{address} | Saver Details
*DefaultApi* | [**get_savers_history**](docs/DefaultApi.md#get_savers_history) | **GET** /v2/history/savers/{pool} | Savers Units and Depth History
*DefaultApi* | [**get_stats**](docs/DefaultApi.md#get_stats) | **GET** /v2/stats | Global Stats
*DefaultApi* | [**get_swap_history**](docs/DefaultApi.md#get_swap_history) | **GET** /v2/history/swaps | Swaps History
*DefaultApi* | [**get_thor_name_detail**](docs/DefaultApi.md#get_thor_name_detail) | **GET** /v2/mayaname/lookup/{name} | THORName Details
*DefaultApi* | [**get_thor_names_by_address**](docs/DefaultApi.md#get_thor_names_by_address) | **GET** /v2/mayaname/rlookup/{address} | Gives a list of THORNames by reverse lookup
*DefaultApi* | [**get_thor_names_owner_by_address**](docs/DefaultApi.md#get_thor_names_owner_by_address) | **GET** /v2/mayaname/owner/{address} | THORName owner
*DefaultApi* | [**get_tvl_history**](docs/DefaultApi.md#get_tvl_history) | **GET** /v2/history/tvl | Total Value Locked History
*DefaultApi* | [**get_votes**](docs/DefaultApi.md#get_votes) | **GET** /v2/votes | Current Protocol Voting

## Documentation For Models

 - [Action](docs/Action.md)
 - [ActionMeta](docs/ActionMeta.md)
 - [AddLiquidityMetadata](docs/AddLiquidityMetadata.md)
 - [AffiliateHistory](docs/AffiliateHistory.md)
 - [AffiliateHistoryIntervals](docs/AffiliateHistoryIntervals.md)
 - [AffiliateHistoryItem](docs/AffiliateHistoryItem.md)
 - [AffiliateHistoryMeta](docs/AffiliateHistoryMeta.md)
 - [Balance](docs/Balance.md)
 - [BlockRewards](docs/BlockRewards.md)
 - [BondMetadata](docs/BondMetadata.md)
 - [BondMetrics](docs/BondMetrics.md)
 - [BorrowerDetails](docs/BorrowerDetails.md)
 - [BorrowerPool](docs/BorrowerPool.md)
 - [Borrowers](docs/Borrowers.md)
 - [CACAOPoolDetails](docs/CACAOPoolDetails.md)
 - [CACAOPoolHistory](docs/CACAOPoolHistory.md)
 - [CACAOPoolHistoryIntervals](docs/CACAOPoolHistoryIntervals.md)
 - [CACAOPoolHistoryItem](docs/CACAOPoolHistoryItem.md)
 - [CACAOPoolHistoryMeta](docs/CACAOPoolHistoryMeta.md)
 - [CACAOPoolProvider](docs/CACAOPoolProvider.md)
 - [CacaoPoolDepositMetadata](docs/CacaoPoolDepositMetadata.md)
 - [CacaoPoolWithdrawMetadata](docs/CacaoPoolWithdrawMetadata.md)
 - [CacaoPriceHistory](docs/CacaoPriceHistory.md)
 - [CacaoPriceIntervals](docs/CacaoPriceIntervals.md)
 - [CacaoPriceItem](docs/CacaoPriceItem.md)
 - [CacaoPriceMeta](docs/CacaoPriceMeta.md)
 - [ChurnItem](docs/ChurnItem.md)
 - [Churns](docs/Churns.md)
 - [Coin](docs/Coin.md)
 - [Coins](docs/Coins.md)
 - [DepthHistory](docs/DepthHistory.md)
 - [DepthHistoryIntervals](docs/DepthHistoryIntervals.md)
 - [DepthHistoryItem](docs/DepthHistoryItem.md)
 - [DepthHistoryItemPool](docs/DepthHistoryItemPool.md)
 - [DepthHistoryMeta](docs/DepthHistoryMeta.md)
 - [EarningsHistory](docs/EarningsHistory.md)
 - [EarningsHistoryIntervals](docs/EarningsHistoryIntervals.md)
 - [EarningsHistoryItem](docs/EarningsHistoryItem.md)
 - [EarningsHistoryItemPool](docs/EarningsHistoryItemPool.md)
 - [FailedMetadata](docs/FailedMetadata.md)
 - [GenesisInf](docs/GenesisInf.md)
 - [Health](docs/Health.md)
 - [HeightTS](docs/HeightTS.md)
 - [Holder](docs/Holder.md)
 - [Holders](docs/Holders.md)
 - [InlineResponse200](docs/InlineResponse200.md)
 - [ItemMayaname](docs/ItemMayaname.md)
 - [KnownPools](docs/KnownPools.md)
 - [LiquidityHistory](docs/LiquidityHistory.md)
 - [LiquidityHistoryIntervals](docs/LiquidityHistoryIntervals.md)
 - [LiquidityHistoryItem](docs/LiquidityHistoryItem.md)
 - [MemberDetails](docs/MemberDetails.md)
 - [MemberPool](docs/MemberPool.md)
 - [Members](docs/Members.md)
 - [Metadata](docs/Metadata.md)
 - [Network](docs/Network.md)
 - [NetworkFees](docs/NetworkFees.md)
 - [Node](docs/Node.md)
 - [Nodes](docs/Nodes.md)
 - [PoolDetail](docs/PoolDetail.md)
 - [PoolDetails](docs/PoolDetails.md)
 - [PoolStatsDetail](docs/PoolStatsDetail.md)
 - [RefundMetadata](docs/RefundMetadata.md)
 - [ReserveHistory](docs/ReserveHistory.md)
 - [ReserveIntervals](docs/ReserveIntervals.md)
 - [ReserveItem](docs/ReserveItem.md)
 - [ReserveMeta](docs/ReserveMeta.md)
 - [ReverseTHORNames](docs/ReverseTHORNames.md)
 - [SaverDetails](docs/SaverDetails.md)
 - [SaverPool](docs/SaverPool.md)
 - [SaversHistory](docs/SaversHistory.md)
 - [SaversHistoryIntervals](docs/SaversHistoryIntervals.md)
 - [SaversHistoryItem](docs/SaversHistoryItem.md)
 - [SaversHistoryMeta](docs/SaversHistoryMeta.md)
 - [SendMetadata](docs/SendMetadata.md)
 - [StatsData](docs/StatsData.md)
 - [StreamingSwapMeta](docs/StreamingSwapMeta.md)
 - [SwapHistory](docs/SwapHistory.md)
 - [SwapHistoryIntervals](docs/SwapHistoryIntervals.md)
 - [SwapHistoryItem](docs/SwapHistoryItem.md)
 - [SwapMetadata](docs/SwapMetadata.md)
 - [THORNameDetails](docs/THORNameDetails.md)
 - [THORNameEntry](docs/THORNameEntry.md)
 - [THORNameSubAffiliate](docs/THORNameSubAffiliate.md)
 - [TVLHistory](docs/TVLHistory.md)
 - [TVLHistoryIntervals](docs/TVLHistoryIntervals.md)
 - [TVLHistoryItem](docs/TVLHistoryItem.md)
 - [ThornameMetadata](docs/ThornameMetadata.md)
 - [Transaction](docs/Transaction.md)
 - [VoteItem](docs/VoteItem.md)
 - [VoteValue](docs/VoteValue.md)
 - [Votes](docs/Votes.md)
 - [WithdrawMetadata](docs/WithdrawMetadata.md)

## Documentation For Authorization

 All endpoints do not require authorization.


## Author

devs@mayaprotocol.com