Skip to main content

Unofficial Messari API client.

Project description

Messari

Python 3.6 Python 3.7 Python 3.8 License

Build


Unofficial Messari's Crypto Data API 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

Installation:

use pip to install:

pip install messari

Authentication:

Most endpoints are accessible without an API key.

Pass API key in object initialization if required.


Example usage:

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.
resp = messari.get_all_assets()

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

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

# Get basic metadata for an asset.
resp = 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'
resp = 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'
resp = 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'
resp = messari.get_asset_market_data(asset_key='btc', fields=fields)

# Lists all of the available timeseries metric IDs for assets.
resp = 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'
}
resp = 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'
resp = 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'
}
resp = 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'
resp = messari.get_all_news(fields=fields)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

messari-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

messari-1.0.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file messari-1.0.0.tar.gz.

File metadata

  • Download URL: messari-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

File hashes

Hashes for messari-1.0.0.tar.gz
Algorithm Hash digest
SHA256 77399b2443c008a5ece8f188290c1a26ba05d5fac14aa645969ed7a541b95c24
MD5 7bfa06e92c8cdb9ac7a62bcb3ade0bcb
BLAKE2b-256 fe9db37ed8975c0c97f0839df94e080da008ce682cdaaac6ea8f65f82776a5eb

See more details on using hashes here.

File details

Details for the file messari-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: messari-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

File hashes

Hashes for messari-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 30efc82bbd721a91d96b1727b1edde85682cb6fdb9803468a1e750879eacac5e
MD5 146de7f9bf04c867598d806ac680c48f
BLAKE2b-256 5f12d6fc9de4a6f70cc72fea82babd697218c92c7d97850c4b770cc23165b572

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page