coingecko-sdk
TODO: description
Usage
const {
getBasicCoingeckoHttp,
simpleTokenPrice,
} = require('@avalabs/core-coingecko-sdk');
const http = getBasicCoingeckoHttp();
simpleTokenPrice(http, {
assetPlatformId: 'avalanche',
tokenAddresses: [TOKEN_ADDRESS1, TOKEN_ADDRESS2],
marketCap: true,
});
CoinGecko Pro
Just pass in the API key and pro HTTP client in order to access the pro api.
const {
getProCoingeckoHttp,
simpleTokenPrice,
} = require('@avalabs/core-coingecko-sdk');
const http = getProCoingeckoHttp();
simpleTokenPrice(http, {
assetPlatformId: 'avalanche',
tokenAddresses: [TOKEN_ADDRESS1, TOKEN_ADDRESS2],
marketCap: true,
coingeckoProApiKey: COINGECKO_PRO_API_KEY,
});