New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

glassnode-api

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glassnode-api

Node.js client for the Glassnode API

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
5
66.67%
Maintainers
1
Weekly downloads
 
Created
Source

Glassnode API

A Node.js client for the Glassnode API.

Installation

yarn add glassnode-api

Usage

import { GlassnodeAPI } from 'glassnode-api';

// Create an instance with your API key
const api = new GlassnodeAPI({
  apiKey: 'YOUR_API_KEY',
  // Optional: Override the API URL
  // apiUrl: 'https://api.glassnode.com'
});

// Fetch asset metadata
async function getAssets() {
  try {
    const response = await api.getAssetMetadata();
    console.log(response.data);
  } catch (error) {
    console.error('Error fetching asset metadata:', error);
  }
}

// Fetch metric metadata
async function getMetrics() {
  try {
    const response = await api.getMetricMetadata();
    console.log(response.data);
  } catch (error) {
    console.error('Error fetching metric metadata:', error);
  }
}

Examples

Check the examples directory for usage examples. To run the examples:

  • Navigate to the examples directory
  • Create a .env file based on .env.example with your API key
  • Install dependencies with yarn install
  • Run an example with yarn ts-node metadata.ts

Development

# Install dependencies
yarn install

# Build the project
yarn build

# Run tests
yarn test

# Lint code
yarn lint

# Format code
yarn format

License

MIT

FAQs

Package last updated on 12 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts