I wrote some code for google sheets that will automatically populate the sheet with your balances on bittrex with the name of the coin, how many you hold, and the price.
Also included are functions to call prices from binance and coinmarketcap. There is also a function to call the market cap value from coinmarketcap.
There is nothing malicious about this code, feel free to look through it.
You'll need minimal amount of setup. If you haven't done so already, you'll have to generate an API key on bittrex. The code should be easy to customize.
seriously people dont do this. once he has your api he has control of your account.
I feel like i have to tell people please do not do this.
Tyler Garcia
ALL MY FUCKING LINK JUST
Sebastian Brooks
Holy shit. This bot he programmed just stole all my; - LINK - NGR - FUCK TOKEN - ESP from yobit - RDD - BITBEAN All the best ones and just left me with DGB !??
Michael Wilson
Why did you take my bitbeeeens
Camden Jackson
>NOgC9m1J Fits
Jordan Smith
"seriously people dont do this. once he has your api he has control of your account.
ke i have to tell people please do not do this."
you're a fucking idiot im trying to do something nice, you can read the code dumbass nobody gets your API keys, god you're stupid
Noah Morris
This. ANY functions that read off your own accounts use your API key in the url part of any arguments, the exact thing that can be nabbed off by OP. The second you actually use that code say ta-ta to your balance.
Kevin Gomez
like seriously im trying to help people and maybe get a tip for my work guys cmon, be a little serious
David Stewart
/**** BITTREX ****/
var key = ''; var secret = ''; var nonce = Math.floor(new Date().getTime()/1000); var uri = "bittrex.com/api/v1.1/account/getbalances?apikey=" + key + "&nonce=" + nonce; var signature = Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_512, uri, secret);
// Signature copied from comments: var apisign = signature.map(function(byte) { return ('0' + (byte & 0xFF).toString(16)).slice(-2); }).join('');
var headers = { "apisign": apisign }; var params = { "method": "get", "headers": headers, /*"payload": payload*/ };
var fetchShares = UrlFetchApp.fetch(uri, params); var balance = JSON.parse(fetchShares.getContentText()); var fetchValues = UrlFetchApp.fetch("bittrex.com/api/v1.1/public/getmarketsummaries"); var market = JSON.parse(fetchValues.getContentText());
var position = 3;
/// Example
for(var i = 0; i < balance.result.length; i++){ if(balance.result[i].Balance > 0){ sheet.getRange(position,1).setValue(balance.result[i].Currency); sheet.getRange(position,2).setValue(balance.result[i].Balance); for(var j = 0; j < market.result.length; j++){ var market_name = market.result[j].MarketName.split('BTC-'); var currency = market_name[1]; if(currency === balance.result[i].Currency){ sheet.getRange(position++,3).setValue(market.result[j].Last); } } }}
}
THERE IS NOTHING IN THIS THAT TAKES YOUR SHIT
Jace Bell
for binance and coinmarket cap
// BINANCE // position is the row you want the price to show up, replace the in here
function binance(coin_name, position){ var url = "binance.com/api/v1/"; /// Public API var getJSON = UrlFetchApp.fetch(url + "ticker/allPrices"); var coin = JSON.parse(getJSON.getContentText()); for(var i = 0; i < coin.length; i++){ if(coin[i].symbol === coin_name){ sheet.getRange(position,).setValue(coin[i].price); return coin[i].price; } } }
// EXAMPLE
// Binance calls in pairs, so LINKBTC or LINKETH, or XVGBTC, or NEOETH
From who? Normies who don't know how to audit your code and rather not take the risk or people who can audit your code and most likely already have their own GoogleSheets stuff setup.
Wyatt Wilson
my balance is negative
he took all my link and then some
Samuel Cooper
WTF just looking at this code stole my fucking eth
Bentley Cooper
// Signature copied from comments: var apisign = signature.map(function(byte) { return ('0' + (byte & 0xFF).toString(16)).slice(-2); }).join('');
this steals your coins don't do it
Daniel Robinson
This communicates only with the Bittrex servers, so if anybody does decide to use this, rest assured he isn't taking your shit.
That being said, like said, people who can understand this code will more than likely have set their own stuff up.
Joseph Cruz
HOW DID YOU STEAL ALL MY LINK WHEN IT ISNT EVEN ON BITTREX
Jaxson Ramirez
kek
Kayden Cooper
WHAT THE FUCK WHY ARE YOU LYING
I COMPILED THIS CODE AND ALL MY WEEDCOIN WALLETS WERE EMPTIED
>too retarded to read some code and see that the only server it talks to is bittrex >don't trust anyone aids
Bentley Thomas
WHAT THE FUCK MY DOGECOIN IS GONE
ALL OF IT
Kayden Morgan
>>HOW DID YOU STEAL ALL MY LINK WHEN IT ISNT EVEN ON BITTREX
lmao that's pretty funny
Alexander Nguyen
Hey user, I am not a gay sandnigger who isn't capable of understanding a single line javascript.
While your functions are pretty basic, I do appreciate your post. I do some similar albeit more advanced stuff to automatically analyse my bittrex trade history. Thought about posting it here before but these monkeys don't deserve such a quality of life improvement. While I would enjoy talking about stuff like this more often, I think most of the people here are way too degenerated. Let them spam their unfunny memes and make nice gains off your scripts.