Bitcoin Forum

Bitcoin => Project Development => Topic started by: weex on January 03, 2012, 11:28:37 PM



Title: BTCReporter - analyze your MtGox trading logs
Post by: weex on January 03, 2012, 11:28:37 PM
Brave travelers,

If you're like me, you have conducted more trades in Bitcoin than you can count. Sadly, you have no idea what all those trades add up to.

For this reason, I present to you a humble reporting script: BTCReporter

To use it, download your CSV files from MtGox, TradeHill, CampBX, or ExchB(copy-paste account History table to exchb.csv) and place them in a folder with this script. Run it to generate an improved CSV file with:

  * Net change in BTC, USD, and EUR 
  * Total fees in BTC, USD, and EUR.
  * Fees converted to fiat using each individual trade price to help with taxes.
  * Prices, fees, and quantities broken out into additional columns.

Supports BTC/USD/EUR with planned support for all currencies and any exchanges or services that are relevant to Bitcoin trading and exchange.

Requirements:

 * Perl
 * Text::CSV_XS (for CSV parsing)

You can get the script at github (https://github.com/weex/BTCReporter) or you can purchase support for it through Bitmit (http://bitmit.net/en/trade/i/186-btcreporter-analyze-your-mtgox-account-csv-logs). Otherwise, you can pm me for a payment address.

If anyone wants to send me example log files from other exchanges or services that are relevant to your Bitcoin holdings, I will attempt to incorporate them as time permits.

Of course this is in early stages so any feedback is appreciated.

Thank you,

David


Title: Re: BTCReporter - analyze your MtGox trading logs
Post by: runlinux on January 04, 2012, 12:09:42 AM
ok, totally checking this out.

will report back. I had a bot that i "think" worked well. never got around to checking in on it very well... lol


Title: Re: BTCReporter - analyze your MtGox trading logs
Post by: weex on January 05, 2012, 08:32:45 AM
Pushed a new version up that reads TradeHill logs as well and deals in a limited way with EUR.


Title: Re: BTCReporter - analyze your MtGox trading logs
Post by: weex on January 07, 2012, 10:56:45 PM
Thanks to everyone who is already supporting this development with logs or BTC.

I just pushed v0.6 that handles CampBX and ExchB (copy-pasta the history page) logs as well. Amounts are now listed as positive if you have more and negative if you have less. For example if overall you spent $1000 USD to get 100 BTC you'll see Net USD change of -1000 and Net BTC change of 100.

I'm still looking for more logs, specifically other currencies that people have traded on MtGox(besides USD) or Tradehill(besides USD or EUR) and any logs that show some odd stuff that isn't handled properly by the current script.

-weex


Title: Re: BTCReporter - analyze your MtGox trading logs
Post by: drlatino999 on January 08, 2012, 04:07:12 AM
Ran perl btcreporter.pl, output is Report.csv. The report only has column headings, where as the input - history_BTC.csv has 700 transactions. Somewhere around line 65 the script is stopping as no message is put out as indicated by
Code:
if ( !$nomtgox and -e 'history_BTC.csv' and -e 'history_USD.csv' ) {
  if( $verbose ) { print "Found MtGox CSV files\n"; }

I don't know if this is an isolated incident on Linux Mint 12 caused by myself, or a bug.


Title: Re: BTCReporter - analyze your MtGox trading logs
Post by: weex on January 08, 2012, 04:12:38 AM
Did you also have a history_USD.csv file in there? For MtGox both are required.

You can also pm me the first couple lines of your history_BTC.csv and I can make sure the format is what BTCReporter is expecting.


Title: Re: BTCReporter - analyze your MtGox trading logs
Post by: drlatino999 on January 08, 2012, 04:17:29 AM
Whom would have thought an "and" in a script would be important, I figured it was an issue on my part. Thanks