The Most Powerful & Free Cryptocurrency API CoinGecko

updating a .gs to retrieve CoinMarketCap data following their transition to new API

Hi, I have been using the following simple .gs to pull CoinMarketCap prices but it is broken now with their migration to their new API. I believe the issue lies with "function getCoins()" but I'm not sure how to proceed given CoinMarketCap's guide here: https://coinmarketcap.com/api/documentation/v1/#section/Quick-Start-Guide
var queryString = Math.random();
var ss = SpreadsheetApp.getActiveSpreadsheet(); var ssRates = ss.getSheetByName('Rates'); if (ssRates === null) { ssRates = ss.insertSheet('Rates'); }
var targetCurrency = 'usd'
// Grabs all CoinMarketCap data if (typeof targetCurrency == 'undefined' || targetCurrency == '') {targetCurrency = 'usd'}; var coins = getCoins();
function getCryptoData() {
// Use the value in the 'id' field here: https://api.coinmarketcap.com/v1/ticke?limit=0 // If you're getting errors, you may be using the wrong 'id'
var myCoins = [ '0x', 'adelphoi', 'adx-net', 'aeternity', 'aion', 'aigang', 'airswap', 'appcoins', 'aeron', 'aragon', 'ardor', 'ark', 'aurora-dao', 'banyan-network', 'bitclave', 'bancor', 'basic-attention-token', 'binance-coin', 'bitcoin', 'bitcoin-cash', 'bitcoin-god', 'bitcoin-gold', 'bitcoin-interest', 'bitcoin-token', 'bitcoin-private', 'bitcoinx', 'bitcore', 'bitdegree', 'bitsend', 'bitshares', 'block-array', 'blockmason', 'bytecoin-bcn', 'c20', 'canyacoin', 'cardano', 'chatcoin', 'cheesecoin', 'cindicator', 'civic', 'cofound-it', 'counterparty', 'coss', 'cpchain', 'cybermiles', 'dash', 'datum', 'decred', 'digibyte', 'digixdao', 'district0x', 'dogecoin', 'dragonchain', 'edgeless', 'enjin-coin', 'eboostcoin', 'enjin-coin', 'eos', 'eosdac', 'ethereum-classic', 'ethereum', 'ethlend', 'everex', 'factom', 'filecoin', 'funfair', 'gas', 'gnosis-gno', 'golem-network-tokens', 'groestlcoin', 'guppy', 'havven', 'huobi-token', 'icon', 'iconomi', 'ignis', 'invictus-hyperion-fund', 'iostoken', 'iot-chain', 'iota', 'internet-of-people', 'ixledger', 'kucoin-shares', 'kyber-network', 'legolas-exchange', 'library-credit', 'litecoin', 'lightning-bitcoin', 'maker', 'medical-chain', 'mercury', 'metronome', 'monero', 'nano', 'neo', 'newton-coin-project', 'nexus', 'oax', 'omisego', 'omni', 'odyssey', 'origintrail', 'patientory', 'pivx', 'phore', 'polymath-network', 'power-ledger', 'qash', 'qtum', 'quantstamp', 'raiden-network-token', 'ravencoin', 'rchain', 'reddcoin', 'republic-protocol', 'rialto', 'ripio-credit-network', 'ripple', 'rise', 'rlc', 'salt', 'semux', 'siacoin', 'singulardtv', 'snovio', 'solaris', 'spreadcoin', 'steem', 'stellar', 'storj', 'stratis', 'streamr-datacoin', 'suncontract', 'syscoin', 'telcoin', 'tenx', 'tezos', 'theta-token', 'time-new-bank', 'tron', 'turtlecoin', 'ubiq', 'ultranote-coin', 'vechain', 'verge', 'veriumreserve', 'vertcoin', 'viacoin', 'vibe', 'viberate', 'vinchain', 'wabi', 'waves', 'wax', 'worldcore', 'zcash', 'zclassic', 'zcoin', 'zencash', ]
ssRates.getRange('A1').setValue("ID"); ssRates.getRange('B1').setValue("Symbol"); ssRates.getRange('C1').setValue("Price USD"); ssRates.getRange('D1').setValue("Price BTC");
var myCoinsObj = {}; var myCoinsCount = myCoins.length; for (var i = 0; i < myCoinsCount; i++) { var c = i+2; var n = 0; while (coins[n]['id'] !== myCoins[i]) { n++; }
myCoinsObj[coins[n]['id']] = coins[n]; ssRates.getRange('A'+(c).toString()).setValue(myCoinsObj[myCoins[i]]['id']); ssRates.getRange('B'+(c).toString()).setValue(myCoinsObj[myCoins[i]]['symbol']); ssRates.getRange('C'+(c).toString()).setValue(myCoinsObj[myCoins[i]]['price_usd']); ssRates.getRange('D'+(c).toString()).setValue(myCoinsObj[myCoins[i]]['price_btc']); 
}
// ================================= // // WALLET BALANCE CONFIGURATION // // =================================
// ===== Wallet Sheet Creator ======================================== // Uncomment the lines of code below // It will create the Wallets sheet for you // If using the Wallets sheet ALWAYS leave it uncommented // ===================================================================
//var ssWallets = activeSpreadsheet.getSheetByName('Wallets'); //if (ssWallets === null) {ssWallets = activeSpreadsheet.insertSheet('Wallets');}
// ===== BCH Wallet Balances ========================================= // Uncomment the lines of code below // Set the variable by pasting your Address inside of the ("") // Change getRange('A1') and getRange('B1') to match the row you want // ===================================================================
//var bchWallet = getBchBalance("Your BCH Address"); //ssWallets.getRange('A1').setValue("BCH Wallet"); //ssWallets.getRange('B1').setValue(bchWallet);
// ===== BTC Wallet Balances ========================================= // Uncomment the lines of code below // Set the variable by pasting your Address inside of the ("") // Change getRange('A2') and getRange('B2') to match the row you want // ===================================================================
//var btcWallet = getBtcBalance("Your BTC Address"); //ssWallets.getRange('A2').setValue("BTC Wallet"); //ssWallets.getRange('B2').setValue(btcWallet);
// ===== Ethereum Wallet Balances ==================================== // Create an account on Etherscan.io // Create an API key at https://etherscan.io/myapikey // Uncomment the lines of code below // Set the API key variable by pasting your API key inside of the ("") // Set the address variable by pasting your Address inside of the ("") // Change getRange('A3') and getRange('B3') to match the row you want // ===================================================================
//var ethApiKey = "Your Etherscan API Key"; //var ethWallet = getEthBalance(ethApiKey,"Your ETH Address"); //ssWallets.getRange('A3').setValue("ETH Wallet"); //ssWallets.getRange('B3').setValue(ethWallet);
// ===== DGB wallet balances ========================================= // Uncomment the lines of code below // Set the variable by pasting your Address inside of the ("") // Change getRange('A4') and getRange('B4') to match the row you want // ===================================================================
//var dgbWallet = getDgbBalance("Your DGB Address"); //ssWallets.getRange('A4').setValue("DGB Wallet"); //ssWallets.getRange('B4').setValue(dgbWallet);
// ===== LTC wallet balances ========================================= // Uncomment the lines of code below // Set the variable by pasting your Address inside of the ("") // Change getRange('A5') and getRange('B5') to match the row you want // ===================================================================
//var ltcWallet = getLtcBalance("Your LTC Address"); //ssWallets.getRange('A5').setValue("LTC Wallet"); //ssWallets.getRange('B5').setValue(ltcWallet);
// ===== VTC wallet balances ========================================= // Uncomment the lines of code below // Set the variable by pasting your Address inside of the ("") // Change getRange('A5') and getRange('B5') to match the row you want // ===================================================================
//var vtcWallet = getVtcBalance("Your VTC Address"); //ssWallets.getRange('A6').setValue("VTC Wallet"); //ssWallets.getRange('B6').setValue(vtcWallet); }
function onOpen() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var menubuttons = [ {name: "clearRates", functionName: "clearRates"},{name: "getCryptoData", functionName: "getCryptoData"}]; ss.addMenu("crypto", menubuttons); }
function clearRates() { var sheet = SpreadsheetApp.getActive().getSheetByName('Rates'); sheet.getRange('A1:D1000').clearContent(); }
function getCoins() {
var url = 'https://api.coinmarketcap.com/v1/ticke?limit=0&convert='+targetCurrency; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var json = response.getContentText(); var data = JSON.parse(json);
return data; }
function getBchBalance(bchAddress) {
var url = 'https://bitcoincash.blockexplorer.com/api/add'+bchAddress+'/balance'; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var balance = response.getContentText(); //Pause to not trigger API limit for multiple wallets Utilities.sleep(300);
return balance * Math.pow(10,-8); }
function getBtcBalance(btcAddress) {
var url = 'https://blockexplorer.com/api/add'+btcAddress+'/balance'; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var balance = response.getContentText(); //Pause to not trigger API limit for multiple wallets Utilities.sleep(300);
return balance * Math.pow(10,-8); }
function getEthBalance(ethApiKey,ethAddress) {
var url = 'https://api.etherscan.io/api?module=account&action=balance&address='+ethAddress+'&tag=latest&apikey='+ethApiKey; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var json = response.getContentText(); var obj = JSON.parse(json); var balance = obj.result; //Pause to not trigger API limit for multiple wallets Utilities.sleep(300);
return balance * Math.pow(10,-18); }
function getDgbBalance(dgbAddress) {
var url = 'https://chainz.cryptoid.info/dgb/api.dws?q=getbalance&a='+dgbAddress; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var balance = response.getContentText(); //Pause to not trigger API limit for multiple wallets Utilities.sleep(300);
return balance; }
function getLtcBalance(ltcAddress) {
var url = 'https://chainz.cryptoid.info/ltc/api.dws?q=getbalance&a='+ltcAddress; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var balance = response.getContentText(); //Pause to not trigger API limit for multiple wallets Utilities.sleep(300);
return balance; }
function getVtcBalance(vtcAddress) {
var url = 'http://explorer.vertcoin.info/ext/getbalance/'+vtcAddress; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var balance = response.getContentText(); //Pause to not trigger API limit for multiple wallets Utilities.sleep(300);
return balance; }
// USE AT YOUR OWN RISK function getRate(currencyId) {
if (typeof targetCurrency !== 'undefined') {conversionRate = 'usd'};
var url = 'https://api.coinmarketcap.com/v1/ticke' + currencyId + '/?convert=' + targetCurrency; var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var json = response.getContentText(); var data = JSON.parse(json); var obj = parseFloat(data[0]['price_' + targetCurrency]);
return obj; }
function getWebRate(currencyId) { //Example Output: // '=IMPORTXML("https://coinmarketcap.com/currencies/zeeyx?3908288283","//span[@id=\'quote_price\']")';
var coinScrape1 = '=IMPORTXML("https://coinmarketcap.com/currencies/'; var coinScrape2 = '","//span[@id=\'quote_price\']")';
return coinScrape1 + currencyId + '?' + queryString + coinScrape2; }
function getCurrencyConversion(currencyOne, currencyTwo) {
var url = 'https://api.fixer.io/latest?symbols='+currencyOne.toUpperCase()+','+currencyTwo.toUpperCase(); var response = UrlFetchApp.fetch(url, {'muteHttpExceptions': true}); var json = response.getContentText(); var data = JSON.parse(json);
return parseFloat(data['rates'][currencyTwo]); }
submitted by neekolas86 to GoogleAppsScript [link] [comments]

how to open Binance account to buy bitcoin or crypto - YouTube Binance’s DeFi index crashes 60% as Bitcoin overshadows ... Buying bitcoin: Binance or Coinbase?  Bitcoin Basics (86 ... BUY BITCOIN ON BINANCE.COM - YouTube how to open Binance exchange to buy bitcoin&cryptocurrency ... Ethereum Whale Sell Off - Bitcoin Price At $13,700 ... Get FREE BNB Binance Coin Record $816M in Bitcoin leaves Binance — Are whales ...

3D cryptocurrency models for download, files in 3ds, max, c4d, maya, blend, obj, fbx with low poly, animated, rigged, game, and VR options. Ako želimo “zaroniti” u DeFi, dobro je pogledati tradicionalne financijske sustave. Trgovanje se može dogoditi samo kada dvije strane imaju višak robe koja je potrebna drugoj strani, a prvobitno se trgovalo robom i uslugama, to se naziva trampa.Kako je gospodarstvo raslo, tako je rasla i potreba za posrednikom koji predstavlja određenu vrijednost, stoga je stvorena valuta. Bitcoin. 95 % obchodních objemů bitcoinu je falešných, říká Bitwise. Autor: JP. Datum: 29. 3. 2019. Rubrika: Bitcoin. Vložit komentář . Investiční společnost Bitwise upozornila na rozsáhlé manipulace obchodování s kryptoměnami. Bitwise se snaží získat povolení od národního regulátora v USA na obchodování s bitcoinovým ETF (echange traded fund). A protože ostatní ... Bitcoin za posledních několik týdnů nevykazuje žádné známky toho, že by se chtěl pohybovat jakýmkoliv směrem, ale poptávka po něm roste. Se zprávou přišel analytik Whalemaps, který se zaměřuje na data uložené na blockchainu. „Indikátor objemu ukazuje zdravou cenovou akci. Nesmíme zapomenout na to, že jsme úspěšně znovu otestovali několik podpor a trendových ... This menu is labelled with “Existing Currency” as you can see in following image. Supported currencies are Bitcoin, Ethereum, Ripple, Litecoin, Dash, Bitcoin Cash, Zcash, Monero, Bitcoin Gold, Ethereum Classic, Iota, Neo, EOS, Tron, Stellar, Cardano, BitcoinSV, Dogecoin, Binance Coin, Tether, Perfectmoney and Perfectmoney voucher. To see ... Binance coin BNB 3D coin bank bitcoin cash, available in MAX, OBJ, 3DS, FBX, ready for 3D animation and other 3D projects Cryptocurrency OBJ 3D models for download, files in obj with low poly, animated, rigged, game, and VR options. BINANCE:ADABTC Cardano / Bitcoin. Trend Analysis Harmonic Patterns Chart Patterns. 150 views. 5. 0. trendanalysis harmonicpatterns chartpattern. ADA YOU CAN BUY AT : 480 SAT TARGET : 520-530 SAT SL : 470 SAT . Comment: btc pump , not good for altcoin , stop trading altcoin Long . Comments. Post Comment . Community & tools. House rules Moderators People Pine Wizards Chat Brokers Stock Screener ... Bitcoin Gold / Bitcoin (BINANCE:BTGBTC) vijay24feb BINANCE:BTGBTC Bitcoin Gold / Bitcoin. Trend Analysis Chart Patterns Technical Indicators. 452 views. 4. 1. trendanalysis chartpattern indicator. BTGBTC Comment: 12% up BTGBTC PRICE Comment: Today 10% ABOVE up Comments . Post Comment ... Access CoinGecko data such as live pricing, trading volume, tickers, exchanges, historical data, coin info & images, developer & community stats, events, global markets, and CoinGecko Beam coins & exchanges status updates directly.. Use our API to power your applications at no cost! We would appreciate any link or mention of ‘Powered by CoinGecko API’ on your awesome application!

[index] [10849] [4039] [24087] [4589] [3117] [23880] [1997] [5964] [9894] [14777]

how to open Binance account to buy bitcoin or crypto - YouTube

Buy Bitcoin on: https://coincompass.com/binance https://coincompass.com/coinbase Should I buy bitcoin on Coinbase or Binance? A comprehensive, pragmatic & be... In todays video we discuss the bitcoin and ethereum price movements. We also go over a whale who has sold 4000 ETH on binance. Last but not least we go over ... Use a Crypto Faucet to get Free Binance Coin-BNB. Complete captcha every 15 minutes and claim your BNB. Here is a link for the BNB Faucet: https://topcoins.p... Bitcoin ( BTC ) resurgence is continuing to sap capital from the altcoin markets as other cryptocurrencies are struggling to catch up to BTC. The DeFi Compos... https://www.binance.com/en/register?ref=C8LPCV3S Hello everyone, Today I will show you how to buy Bitcoin. It is very simple. First you need to register on B... Binance saw its biggest Bitcoin ( BTC ) outflow in history on Nov. 3, according to data from CryptoQuant. A total of 58,861 BTC were withdrawn on a single da... how to open Binance exchange to buy bitcoin #cryptotradingexchange #binance # howtoopen Binance link: https://www.binancezh.pro/en/register?ref=XW91KRSO buyi... how to open Binance account to buy bitcoin or crypto binance link: https://www.binancezh.pro/en/register?ref=XW91KRSO buy crypto and bitcoin by binance excha...

http://binance-review.miningku.pw