
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
glassnode-api
Advanced tools
A TypeScript client for the Glassnode API, supporting both Node.js and browser environments.
# pnpm
pnpm add glassnode-api
# npm
npm install glassnode-api
# yarn
yarn add glassnode-api
<script src="https://unpkg.com/glassnode-api/dist/glassnode-api.umd.min.js"></script>
<script>
const api = new GlassnodeAPI.GlassnodeAPI({ apiKey: 'YOUR_API_KEY' });
</script>
<script type="module">
import { GlassnodeAPI } from 'https://unpkg.com/glassnode-api/dist/glassnode-api.esm.min.js';
const api = new GlassnodeAPI({ apiKey: 'YOUR_API_KEY' });
</script>
import { GlassnodeAPI } from 'glassnode-api';
const api = new GlassnodeAPI({
apiKey: 'YOUR_API_KEY',
// Optional: Override the API URL
// apiUrl: 'https://api.glassnode.com'
});
// Fetch asset metadata
const assets = await api.getAssetMetadata();
// Fetch metric metadata
const metric = await api.getMetricMetadata('/distribution/balance_exchanges', { a: 'BTC' });
// Get list of all available metrics
const metrics = await api.getMetricList();
// Call a metric directly
const data = await api.callMetric('/market/price_usd_close', { a: 'BTC', s: '1609459200' });
new GlassnodeAPI(config)| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your Glassnode API key |
apiUrl | string | No | API base URL (defaults to https://api.glassnode.com) |
| Method | Returns | Description |
|---|---|---|
getAssetMetadata() | Promise<AssetMetadataResponse> | Get metadata for all assets |
getMetricMetadata(path, params?) | Promise<MetricMetadataResponse> | Get metadata for a specific metric |
getMetricList() | Promise<MetricListResponse> | Get a list of all available metrics |
callMetric<T>(path, params?) | Promise<T> | Call a metric endpoint directly |
See the examples directory for detailed usage patterns.
cd examples
cp .env.example .env # add your API key
pnpm dlx ts-node metadata.validation.ts
# Install dependencies
pnpm install
# Build (Node.js + browser bundles)
pnpm run build && pnpm run build:browser
# Run tests
pnpm test
# Lint
pnpm run lint
# Format
pnpm run format
MIT
FAQs
Typescript client for the Glassnode API (Node.js and Browser)
We found that glassnode-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.