Glassnode API
A Node.js client for the Glassnode API.
Installation
yarn add glassnode-api
Usage
import { GlassnodeAPI } from 'glassnode-api';
const api = new GlassnodeAPI({
apiKey: 'YOUR_API_KEY',
});
async function getAssets() {
try {
const response = await api.getAssetMetadata();
console.log(response.data);
} catch (error) {
console.error('Error fetching asset metadata:', error);
}
}
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
yarn install
yarn build
yarn test
yarn lint
yarn format
License
MIT