The official Python client library for Glassnode's API – https://docs.glassnode.com

glassnode glassnode Last update: Sep 14, 2022

glassnode-api-python-client

NOTE: THIS REPO IS DEPRECATED AND NOT ACTIVELY MAINTAINED BY THE GLASSNODE TEAM.

Python client library for Glassnode's API – https://docs.glassnode.com/basic-api/api

Quick Start

API Key

You can get your API from your Glassnode account.

You can add you API key your environment variables by running:

export GLASSNODE_API_KEY=<YOUR-KEY>

Example Usage

Instantiate the Glassnode client:

from glassnode import GlassnodeClientgn = GlassnodeClient(api_key='YOUR-KEY')

If you added the API key to your environment variables you can leave the api_key argument empty.

Fetching a Metric

To fetch a metric run the client's get method:

sopr = gn.get(    'https://api.glassnode.com/v1/metrics/indicators/sopr',    a='BTC',    s='2020-01-01',    i='24h')

For a complete list of all available metric endpoints endpoints and query parameters please visit docs.glassnode.com.

Further Information

Tags:

Subscribe to our newsletter