Fetches information on a specific cryptocurrency market or group of markets via their CoinMarketCap ID E.g 1 for Bitcoin, 2 for Ethereum. To fetch multiple markets seperate each identifier with a comma.
const cmc = new CMC({ key: "YOUR_API_KEY" });
const info = await cmc.getQuotesByID("1,2");
console.log(info);
An object/objects with the following properties:
id - The CoinMarketCap ID of the cryptocurrency.
name - The name of the cryptocurrency.
symbol - The symbol of the cryptocurrency.
slug - The slug of the cryptocurrency.
num_market_pairs - The number of markets the cryptocurrency is listed on.
date_added - The date the cryptocurrency was added to CoinMarketCap.
tags - A list of tags associated with the cryptocurrency.
max_supply - The maximum supply of the cryptocurrency.
circulating_supply - The circulating supply of the cryptocurrency.
total_supply - The total supply of the cryptocurrency.
platform - The platform the cryptocurrency is built on.
cmc_rank - The CoinMarketCap rank of the cryptocurrency.
last_updated - The last time the cryptocurrency was updated.
quote - The quote information for the cryptocurrency.
quote.USD - The USD quote information for the cryptocurrency.
quote.USD.price - The USD price of the cryptocurrency.
quote.USD.volume_24h - The USD volume of the cryptocurrency in the last 24 hours.
quote.USD.percent_change_1h - The percent change of the cryptocurrency in the last hour.
quote.USD.percent_change_24h - The percent change of the cryptocurrency in the last 24 hours.
quote.USD.percent_change_7d - The percent change of the cryptocurrency in the last 7 days.
quote.USD.percent_change_30d - The percent change of the cryptocurrency in the last 30 days.
quote.USD.percent_change_60d - The percent change of the cryptocurrency in the last 60 days.
quote.USD.percent_change_90d - The percent change of the cryptocurrency in the last 90 days.
quote.USD.market_cap - The USD market cap of the cryptocurrency.
quote.USD.last_updated - The last time the cryptocurrency was updated.
The id of the cryptocurrency you want to get the quote for.
Fetches information on a specific cryptocurrency market or group of markets via their slug(name) E.g bitcoin, ethereum. To fetch multiple markets seperate each identifier with a comma.
const cmc = new CMC({ key: "YOUR_API_KEY" });
const info = await cmc.getQuotesBySlug("bitcoin,ethereum");
console.log(info);
An object/objects with the following properties:
id - The CoinMarketCap ID of the cryptocurrency.
name - The name of the cryptocurrency.
symbol - The symbol of the cryptocurrency.
slug - The slug of the cryptocurrency.
num_market_pairs - The number of markets the cryptocurrency is listed on.
date_added - The date the cryptocurrency was added to CoinMarketCap.
tags - A list of tags associated with the cryptocurrency.
max_supply - The maximum supply of the cryptocurrency.
circulating_supply - The circulating supply of the cryptocurrency.
total_supply - The total supply of the cryptocurrency.
platform - The platform the cryptocurrency is built on.
cmc_rank - The CoinMarketCap rank of the cryptocurrency.
last_updated - The last time the cryptocurrency was updated.
quote - The quote information for the cryptocurrency.
quote.USD - The USD quote information for the cryptocurrency.
quote.USD.price - The USD price of the cryptocurrency.
quote.USD.volume_24h - The USD volume of the cryptocurrency in the last 24 hours.
quote.USD.percent_change_1h - The percent change of the cryptocurrency in the last hour.
quote.USD.percent_change_24h - The percent change of the cryptocurrency in the last 24 hours.
quote.USD.percent_change_7d - The percent change of the cryptocurrency in the last 7 days.
quote.USD.percent_change_30d - The percent change of the cryptocurrency in the last 30 days.
quote.USD.percent_change_60d - The percent change of the cryptocurrency in the last 60 days.
quote.USD.percent_change_90d - The percent change of the cryptocurrency in the last 90 days.
quote.USD.market_cap - The USD market cap of the cryptocurrency.
quote.USD.last_updated - The last time the cryptocurrency was updated.
The slug of the cryptocurrency you want to get the quotes for.
Fetches information on a specific cryptocurrency market or group of markets via their symbol E.g BTC, ETH. To fetch multiple markets seperate each identifier with a comma.
const cmc = new CMC({ key: "YOUR_API_KEY" });
const info = await cmc.getQuotesBySymbol("BTC,ETH");
console.log(info);
An object/objects with the following properties:
id - The CoinMarketCap ID of the cryptocurrency.
name - The name of the cryptocurrency.
symbol - The symbol of the cryptocurrency.
slug - The slug of the cryptocurrency.
num_market_pairs - The number of markets the cryptocurrency is listed on.
date_added - The date the cryptocurrency was added to CoinMarketCap.
tags - A list of tags associated with the cryptocurrency.
max_supply - The maximum supply of the cryptocurrency.
circulating_supply - The circulating supply of the cryptocurrency.
total_supply - The total supply of the cryptocurrency.
platform - The platform the cryptocurrency is built on.
cmc_rank - The CoinMarketCap rank of the cryptocurrency.
last_updated - The last time the cryptocurrency was updated.
quote - The quote information for the cryptocurrency.
quote.USD - The USD quote information for the cryptocurrency.
quote.USD.price - The USD price of the cryptocurrency.
quote.USD.volume_24h - The USD volume of the cryptocurrency in the last 24 hours.
quote.USD.percent_change_1h - The percent change of the cryptocurrency in the last hour.
quote.USD.percent_change_24h - The percent change of the cryptocurrency in the last 24 hours.
quote.USD.percent_change_7d - The percent change of the cryptocurrency in the last 7 days.
quote.USD.percent_change_30d - The percent change of the cryptocurrency in the last 30 days.
quote.USD.percent_change_60d - The percent change of the cryptocurrency in the last 60 days.
quote.USD.percent_change_90d - The percent change of the cryptocurrency in the last 90 days.
quote.USD.market_cap - The USD market cap of the cryptocurrency.
quote.USD.last_updated - The last time the cryptocurrency was updated.
The symbol of the cryptocurrency you want to get quotes for.
Private
reqGenerated using TypeDoc
Classdesc
Class used to fetch cryptocurrency information from the CoinMarketCap API.
Param
Class Options (CoinMarketCap API Key)