How to Automatically Track Your Shrimpy vs. HODL Balances and Send Trade Notifications To Your Phone

For the past few weeks I have been using an awesome new app called Shrimpy (check them out here on Medium here: ShrimpyApp) to manage my portfolio on Binance. The app provides users with automated portfolio rebalancing — for free, believe it or not! In the volatile world of cryptocurrency markets, this often translates to swing trading: buying high, and selling low.

So far I have been very impressed with its features, efficiency, and team. After I’ve had a little more experience with the app, collected some more data, and perhaps tried out its upcoming new features I will likely be posting a more in-depth review.

Meanwhile, I’ve created a couple of quick & dirty tools that could be useful to other Shrimpy users (or perhaps other Binance traders — although the tools are limited in their scope).

“Shrimpify” Google Sheet

The first tool I wanted after activating Shrimpy on my portfolio was a better way to track its progress. While I had faith that, statistically, my portfolio would make gains over time by using Shrimpy, there was no simple way to make sure this was happening, or to measure those gains.

I could note down my “before” balances and then compare after Shrimpy trades, but with around a dozen coins in my portfolio this would quickly become tedious.

I could also set up a Blockfolio or Cointrackr portfolio for my starting Binance balances to track what I would have without Shrimpy. But this still required logging into two websites and doing the math by hand every time I wanted a quick overview.

Instead I decided to set up an automated Google Sheet, using Google scripts to get data about my balances and current prices from the Binance API, in order to compare my Shrimpy balance with my would-have-been HODL balance.

If this sounds useful to you, feel free to use it. Here is a link to the public copy of the sheet; simply make a copy in your own Google Drive and enter your API keys in the top right corner.

(I recommend getting new view-only API keys from Binance, so that it’s impossible to use the keys to trade or withdraw — while I think I’m pretty trustworthy, to you I’m just a guy on the internet. Be safe. You can also view and audit the code that’s being used to access your data by going to Tools -> Script Editor from the Google Sheet.)

Click the button on the right to get your current balances and save them as your initial (HODL) balances, and then click the button in the middle whenever you want to update your current (Shrimpy) balances. The script will also grab current prices, add up your totals, and compare Shrimpy vs. HODL. The first time you try to run it, you will be asked to give the sheet and script various permissions. Do so, and then run again.

A couple of disclaimers: I am a fairly new coder, so there are likely some bugs I haven’t found yet. I know some people were having issues with USDT, but I believe that has now been solved. If you run into other problems, feel free to contact me.

Additionally, there is still some functionality missing. For example, the spreadsheet will get completely confused if you add or remove an asset from your Binance portfolio. There is a (tedious) workaround for this — again, contact me and I can walk you through it — but I hope to improve this problem in the future.

Android/iOS Trade Notifications

If you’re like me, you might be a little obsessed with checking your portfolio. This obsession was amplified after I began using Shrimpy. I have Shrimpy set to check for a potential rebalance hourly, so every hour I would wonder if Shrimpy had made any trades for me. I could log into Binance (or, now that they’ve added the useful ‘History’ tab, Shrimpy itself) to see my trade history, but that takes too much time out of my busy day.

Instead I thought of a method to send notifications to my phone whenever Shrimpy makes a trade for me. This way I don’t have to log into anything unless I need detailed data about my trades. I can see which assets were exchanged, as well as my current balance, at a glance, right from the notification, then dismiss it and get back to what I was doing.

Here’s how to set it up.

The first step is to make your copy of the Shrimpify Google Sheet update itself automatically. To do this, first open the script by going to Tools -> Script Editor from the sheet.

Next we want to add a time-based trigger telling the script to update. From the script, go to Edit -> Current project’s triggers.

Click on the text that says “No triggers set up. Click here to add one now.” Under Run, select updateBalances. Under Events, select Time-driven. The next two drop-down menus allow you to choose how often to update the script. Since I have Shrimpy set to rebalance my portfolio hourly, I chose ‘Every hour’. Your needs may vary. If you want near-immediate notifications you could set it to ‘Every 5 minutes’ (I don’t recommend ‘Every minute’ because Binance does have a rate limit on API requests). If you just want a morning report every day you could set it to ‘Day timer’, ‘8am to 9am’.

Once you’ve saved changes, the script auto-update should be live. Next, to get notifications of trade changes on my phone, I created custom IFTTT applets.

IFTTT (‘If This, Then That’) is a free service that allows you to create conditional statements between different web-connected services. You will have to sign up for an account and download the IFTTT app (Android | iOS) on your phone in order for this part to work.

Once you’ve done that you can log into the website (or use the app) to create the applets you need. You will need probably need to link the services as you go.

Create a new applet, and for the first step select Google Sheets.

Choose the last option, ‘Cell updated in spreadsheet’ and in the space provided, enter the URL for your saved copy of the Shrimpify Google Sheet, as well as the cell you want to monitor. For this example I chose cell F11 which should contain your current BTC balance. You can also choose any of the other F column cells to monitor other assets.

For the next step select Notifications and choose ‘Send a notification from the IFTTT app.’

Here you can customize the text you receive in the notification. IFTTT doesn’t know which asset is being traded, so I include that in the notification text as well as {{Value}} which tells me my new balance of that asset.

Make sure the applet is set to “On” and you should be good to go. Whenever the value of that cell changes (which happens whenever you make a trade using BTC) you will get an IFTTT notification.

Here’s an example of the notifications I receive with this method.

If you’d like, you can go ahead and add additional applets for each of your assets, which will ensure you know exactly which assets are being traded. Just make sure to monitor the correct cell, and put the name of the asset in the notification text.

Currently the notifications aren’t able to give you data about the specifics of the trade (e.g. buy vs. sell, what amount, what price). You can log into Shrimpy or Binance if you need that info, although I may try adding this feature to the spreadsheet in the future.

If this was helpful to you, I appreciate a follow or some applause. If you have any questions, problems, comments or criticism, feel free to comment here or contact me on Telegram @gypsyhymn. Good luck and happy Shrimpy-ing!

Finance | Blockchain | Travel