Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new eps #4

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: [ 3.7, 3.8, 3.9, '3.10' ]

steps:
- uses: actions/checkout@v2
Expand Down
84 changes: 10 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# Messari

[![Python 3.5](https://img.shields.io/badge/python-3.5-blue.svg)](https://www.python.org/downloads/release/python-350/)
[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)](https://www.python.org/downloads/release/python-370/)
[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/)
[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/)

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

![Build](https://github.com/itzmestar/Messari/workflows/Build/badge.svg)


-------

### Unofficial [Messari's Crypto Data API](https://messari.io/) client in python
The library can be used for crypto prices, market data metrics, on-chain metrics, and qualitative information (asset profile).
For more information, see [Messari API Documentation](https://messari.io/api/docs)
For more information, see [Messari API Documentation](https://messari.io/api)

### Installation:
use pip to install:
Expand All @@ -26,9 +22,7 @@ pip install messari

### Authentication:

Most endpoints are accessible without an API key.

Pass API key in object initialization if required.
Pass API key in object initialization.

-----------

Expand All @@ -37,75 +31,17 @@ Pass API key in object initialization if required.
from messari import Messari

# initialize api client
# API Key is optional

messari = Messari(key='xxxxxxxxxxxxxxx')

# Get the paginated list of all assets and their metrics and profiles.
response = messari.get_all_assets()

# Use query parameters
query = {
'with-profiles': True,
'with-metrics': True,
'fields': 'id,slug,symbol,metrics/market_data/price_usd'
}
response = messari.get_all_assets(**query)

# set filter fields
fields='symbol,name,slug'

# Get basic metadata for an asset.
response = messari.get_asset(asset_key='btc', fields=fields)

# Get all of our qualitative information for an asset.
fields='symbol,name,profile/general/overview/project_details'
response = messari.get_asset_profile(asset_key='btc', fields=fields)

# Get all of our quantitative metrics for an asset.
fields = 'id,slug,symbol,market_data/price_usd,market_data/volume_last_24_hours'
response = messari.get_asset_metrics(asset_key='btc', fields=fields)

# Get the latest market data for an asset.
fields = 'id,slug,symbol,market_data/price_usd,market_data/volume_last_24_hours'
response = messari.get_asset_market_data(asset_key='btc', fields=fields)

# Lists all of the available timeseries metric IDs for assets.
response = messari.list_asset_timeseries_metric_ids()

# Retrieve historical timeseries data for an asset.
query_params = {
'start': '2020-01-01',
'end': '2020-02-01',
'interval': '1d',
'columns': 'open,close',
'order': 'ascending',
'format': 'json',
'timestamp-format': 'rfc3339'
}
response = messari.get_asset_timeseries(asset_key='bitcoin', metric_id='price', **query_params)

# Get the list of all exchanges and pairs that our WebSocket-based
# market real-time market data API supports.
fields = 'exchange_name,pair,last_trade_at'
response = messari.get_all_markets(fields=fields)

# Retrieve historical timeseries data for a market.
query_params = {
'start': '2020-01-01',
'end': '2020-03-01',
'interval': '1d',
'columns': 'open,close',
'order': 'ascending',
'format': 'json',
'timestamp-format': 'rfc3339'
}
response = messari.get_market_timeseries(market_key='binance-btc-usdt', metric_id='price', **query_params)

# Get the latest (paginated) news and analysis for all assets.
fields='title,content'
response = messari.get_all_news(fields=fields)

# Get the latest (paginated) news and analysis for all assets.
fields='title,content'
response = messari.get_news_for_asset(asset_key='btc', fields=fields)
```

-------
#### Donate & Help maintain the library

[![Paypal](qrcode.png)](https://www.paypal.com/ncp/payment/KLFNJN7SH39EN)

-------
2 changes: 1 addition & 1 deletion messari/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__title__ = 'messari'
__description__ = 'Unofficial Messari API client.'
__url__ = 'https://github.com/itzmestar/Messari'
__version__ = '1.0.1'
__version__ = '2.0.0'
__build__ = 0x010001
__author__ = 'Tarique Anwer'
__author_email__ = 'itzmetariq@gmail.com'
Expand Down
Loading
Loading