rp2 icon indicating copy to clipboard operation
rp2 copied to clipboard

RP2 Ecosystem Brainstorming

Open h3rb opened this issue 2 years ago • 14 comments

Hi.

I could use something like this, but of course I use different exchanges and each has a different CSV output format for trades and orders.

I'd like to write a separate project rp2-conv that converts CSV and outputs the .ods and .json config file. I'll probably use Boilerplate but tack on each importer in the exchanges section.

At first I was hoping to add it to this project, but I think it's better if I keep it as a separate project. I plan to support Kraken, Bitmart, Binance.US, Coinbase and Coinbase Pro to start. I may try to support public wallet addresses for TrustWallet / PancakeSwap.

I'm wondering if you'd like to link it in your readme once things are going? Either way I'm interested in your project and hope to use it to help with my taxes this year.

I'm not sure how you write .ods, I see ods_parser.py though. I'd like to have it output the .ods but in the early versions it may just output a CSV that can be loaded into OpenOffice/LibreOffice and exported manually.

h3rb avatar Jan 13 '22 06:01 h3rb

I took a look through https://github.com/eprbell/rp2/blob/main/src/rp2/plugin/report/us/tax_report_us.py .. still not entirely sure. I see that an .ods is actually a .zip file containing specific structured xml et al. There is a library called pyexcel-ods which I think I can leverage to do this export. .. I guess you are using ezodf which is similar. pyexcel-ods3 works up to 3.8

h3rb avatar Jan 13 '22 06:01 h3rb

An importer for RP2 would be very useful and is sorely missing right now. I'd love to link your project from the RP2 README once it's in reasonable shape. I have started a similar project to download data from Coinbase and CoinbasePro via REST API, but I haven't uploaded it yet. It does download data but it doesn't yet generate a file for RP2. I will upload it so that perhaps we can merge whatever is useful into your project. As for ODS generation, RP2 uses pyexcel-ezodf, which is old, but reliable: examples of use are in abstract_odt_generator.py (in particular _initialize_output_file() and _fill_cell()). Thanks for reaching out!

eprbell avatar Jan 13 '22 07:01 eprbell

I just uploaded an initial version of a test that may be useful to you: https://github.com/eprbell/rp2/blob/main/tests/test_large_input.py

It generates a large ODS file (to test RP2 with large inputs): it's probably a decent boilerplate for ODS generation.

eprbell avatar Jan 13 '22 18:01 eprbell

Thanks. I've registered a shell project rp2-conv with pypi.org at https://pypi.org/project/rp2-conv/

Since I have to wait until March to finalize my taxes, I'll be working on this hoping to release in March.

I initially tried using CoinTracker, which costs me $161 for a "report", but the "report" appeared to claim I owed as much as I put in, even though I didn't sell anything, so I'm skeptical it's worth the money since it is still in Beta. This project (rp2) looks exciting and I hope to contribute at least in an ancillary manner.

Might I suggest PyInstaller support so that newbs to Python could use the software? Perhaps some sort of visualizer / GUI. Just an idea...

h3rb avatar Jan 14 '22 19:01 h3rb

Awesome! I look forward to it. As I mentioned, I have started something along the same lines, but I have no cycles to work on it properly, so your help here is gratefully received :) I'm also happy to collaborate with you, if I can: e.g. I can send you (or even better, just upload here) my classes to read directly from Coinbase and CoinbasePro via REST, if that's any help.

As for Cointracker and other commercial software: let's build a strong open-source, community-driven alternative to compete with them!

I have a few questions/comments on PyInstaller:

  • how to distribute the final installer? One thing I like about Pypi is that they also carry the distribution channel;
  • RP2 is a CLI tool and requires at least familiarity with the shell, so its users have to have at least a bit of technical skill: I wonder if a GUI installer would be overkill for them.

Thanks for the feedback and for volunteering to help!

eprbell avatar Jan 14 '22 20:01 eprbell

I just discovered this project today! Looks awesome. I find it hard to believe that there is currently no open source software that values privacy for tax tracking.

Anyway, I am a TypeScript/JavaScript developer, and with experience in Electron as well. If you want, we could build an Electron-based GUI that can be easily distributed so user can use the GUI and install it in their computer.

Exegetech avatar Jan 29 '22 21:01 Exegetech

Thanks! A GUI sounds like a great addition: I think it could be a separate project, similar to rp2-conv (see above in this thread). I would love to reference your GUI project from the RP2 documentation, once it's in reasonable shape. Thanks for offering to help!

eprbell avatar Jan 30 '22 01:01 eprbell

Thanks! A GUI sounds like a great addition: I think it could be a separate project, similar to rp2-conv (see above in this thread). I would love to reference your GUI project from the RP2 documentation, once it's in reasonable shape. Thanks for offering to help!

Indeed, first I would like to use it for myself and see what can be improved. Thanks for the great project!

Exegetech avatar Jan 30 '22 20:01 Exegetech

I finally managed to clean-up and upload my experimental data loader project. It's called DaLI and it has a plugin architecture for data loaders (both CSV and REST-based): check the developer documentation. It sorely needs more data loader plugins: if anybody feels like writing new plugin, just open a PR! Thanks.

eprbell avatar Mar 06 '22 06:03 eprbell

Hi, I just found this project referenced on reddit while searching for a crypto tax software solution. Thank you for sharing your work.

One possible enhancement might be to support a CSV file import with a file format similar to other crypto tax software.

I looked at three of the commercial solutions: BitCoin.tax, CryptoTaxCalculator, and Cointracking.info. Something they all have in common is a CSV import with triple currencies: Action, Base_Currency, Base_Amount, Quote_Currency, Quote_Amount, Fee_Currency, Fee_Amount

This approach is general enough to handle a variety of different trade types on centralized exchanges and decentralized exchanges. Selling one currency to buy another is the core trading primitive action. For users on centralized exchanges, the quote currency and fee currency are usually fiat.

I'm not sure if adding this capability is a heavy lift. It would simplify the transition for users who want to migrate to RP2 from one of the commercial services.

Is this idea feasible without making sweeping changes to the existing code base?

stevendavis avatar Mar 07 '22 03:03 stevendavis

Thanks for the comment! It's a good idea but I think it belongs in the DaLI project: it's a brand new data loader (I uploaded it yesterday), which reads from CSV files and / or REST API endpoints and generates input files for RP2. DaLI has a programmable plugin architecture and each data loader is a plugin (there's one for Coinbase, one for Trezor, etc.). So what you're describing could be another plugin. I already wrote a few plugins for DaLI , however since there are hundreds of CSV formats and REST services, I won't be able to support them all (especially ones I don't use personally). My hope is that DaLI will become a community-effort and that people will submit PRs for plugins. If anybody would like to work on a plugin, here's how to do it (it's relatively simple): https://github.com/eprbell/dali-rp2/blob/main/README.dev.md. In particular check the DaLI Internals and Plugin Development sections. Feedback, questions and comments are welcome!

eprbell avatar Mar 07 '22 03:03 eprbell

I added a few call-for-help issues in DaLI to request for plugins: https://github.com/eprbell/dali-rp2/issues. It's just a subset of what's needed but I hope it will attract some attention and coders.

eprbell avatar Mar 07 '22 21:03 eprbell

Sounds good. Thanks again for sharing your work. I need to get a better understanding of rp2 and dali by studying the docs and by using the software. These days I'm spending my spare time preparing taxes.

If I have questions about using rp2, where is the right place to ask those questions?

stevendavis avatar Mar 07 '22 22:03 stevendavis

Sure thing. The best way to ask questions or provide feedback is to open a RP2 issue or a DaLI one (if it's related to data loaders).

eprbell avatar Mar 07 '22 22:03 eprbell