Invertimo Binance Crypto Integration
Why track crypto transactions in invertimo?
Invertimo helps you track all transactions related to your investments as well as dividends and received income in one place. Crypto is becoming more and more mainstream and more investors have part of their portfolio in crypto assets.
Selling crypto is a taxable event in most countries, swapping tokens is usually treated similarly.
Because of that you need to be on top of your transactions and know what was your cost basis (total amount paid) of the tokens you sold. You need to make sure you track it in the correct currency, converting USD gain to your local currency is not the way to do it. Additionally, order of selling matters as well, even if you have the same token in multiple wallets or exchanges! Do yourself a favor and keep a solid record of your transactions!
Crypto can be an income producing asset and you need to track this income too. The income is usually produced by Savings products (similar to bank savings accounts) or through staking (helping secure the blockchain). Tracking the income can be especially challenging and you can read more about it in a section later on.
Binance is one of the biggest centralized exchange through which many people buy crypto.
It’s also the exchange I’ve been using personally, so I prioritized building the integration as I could be my own test rabbit.
Crypto Income & problem with daily interest
When you receive interest from your tokens two things happen:
- you receive income of the value of the tokens you get
- you receive the tokens with a cost basis of the income you just received
Let’s see it in an example, let’s say you stake a token DOT. It has a high interest rate and produces income daily.
On Monday you receive 0.02 DOT. The price per token is ~20 USD on that day. You are based in Europe and taxed in euros.
- You received 0.2 USD of income! 1 USD is 0.88 EUR at that day, so you had an income of 0.352 EUR. You don’t see it in your account balance, but instead:
- you have additional 0.02 DOT that if you sold next week you would have to pay capital gains on. Their cost basis was 0.352 EUR.
So that was for Monday, a couple days later the price might be completely different as crypto assets are quite volatile.
And guess what, currency exchange rates fluctuate a lot too!
And if you own multiple different tokens that have such daily interest, the amount of interest events and transactions quickly adds up! It can reach thousands in no time.
It happened to me in a couple of months.
Data sources in invertimo
To get the crypto prices and currency exchange rates, you need a reliable data source. Invertimo gets its market data from eodhistoricaldata.
If you trade tokens for fiat currency, the app uses how much fiat you paid as a price used in that specific transaction.
How it works
Once you export your binance transactions (instructions here), you
can upload a
.csv file to invertimo.
The binance parser under the hood will create all necessary transaction records and events.
You can see exactly what happened in the given import. The import can be successful, partially successful or fail completely (unlikely!).
Any transaction or account event that was created as a result of an import has an associated import record that stores information used for the creation of that transaction or event so you can inspect it.
One of the design principles of invertimo.com is that it prevents duplicate records. So there is no need to worry that something will be recorded multiple times even if you upload history files with overlapping transactions.
We will store in the database that the record was imported, but deduplicated.
Only SPOT account transactions are supported and only the following binance operations:
BINANCE_SUPPORTED_OPERATIONS = [ "POS savings interest", "Savings Interest", "ETH 2.0 Staking Rewards", "POS savings redemption", "POS savings purchase", "Savings Principal redemption", "Savings purchase", "Deposit", "Transaction Related", "ETH 2.0 Staking", "Withdrawal", ]
In other words:
- transferring money in and out of binance
- buying or selling crypto
- staking interest
- savings interest
I’m not sure how exhaustive this set is, but if you have more I should support, I would be happy to add it.
If you want a solution just for crypto taxes, there exist some solid alternatives! In particular I have been using koinly.io so far!
The problem is that it charges a lot if you have crypto income:
With my couple months of transactions, I would have to pay them almost 200 USD per year.
Invertimo is not perfect (under active development!), but it is open source and even though it won’t compute the taxes for you, it will help you track the transactions and income and that is more than a half of the battle.
The crypto support in invertimo is far from done. I am planning more UX improvements and better support for crypto transactions outside of the binance integration.
The journey is never over! If you enjoy this article, please follow me on twitter.