I’m building an automatic export for Lbank using their API. The reason why I’m doing it is that:
- it takes a long time to get a CSV from lbank support
- current implementation in Koinly is broken, and honestly I don’t see this being solved anytime soon due to the terrible quality of the Lbank API. I suspect it is just not possible to do.
My issues it that Lbank API reports trades as several transactions. I’m not sure if I should merge them together by order id, or leave them as separates trade. It doesn’t change much in Koinly, but I’m concerned about French regulations, because you need to keep track of to the price you buy the tokens.
Should I use merged transactions from a same order ID:
Amount=30 COIN, Total=300USD, Order Id = ABCD, Fee = 3 USD
Or leave them separated :
Amount=10 COIN, Total=100USD, Order Id = ABCD, Trade Id = A, Fee = 1 USD
Amount=5 COIN, Total=50USD, Order Id = ABCD, Trade Id = B, Fee = 0.5 USD
Amount=15 COIN, Total=150USD, Order Id = ABCD, Trade Id = C, Fee = 1.5 USD
EDIT: another concern is that dividing them could lead to register too many transactions and make you pass as a “Pro Trader” for the government, with higher taxes due.
(If you are interested in my script, I might share it on github, reply to this post if you want it.Python skills will be required to use it).