2

Taken from /r/MoneroSupport:

I'm having trouble exporting my wallet transaction history from monero-wallet-cli.exe into a usable format. I'm using Windows 7 and v0.10.3.1-release. "show_transfers" prints out all the info I need into the console, but I can't figure out a way to copy-paste it into a .txt file or output it in any other way.

I tried "show_transfers >> txns.txt" but got this error: "Error: Bad min_height parameter: >>"

I found this, which doesn't get me any further than I already am: How can I get a transaction history of sent and received transfers for my account?

Any help would be much appreciated, thanks.

sgp
  • 8,806
  • 6
  • 42
  • 113

2 Answers2

3

You can do this:

monero-wallet-cli --command "show_transfers" --wallet-file=/path/to/wallet --password 'password' >> my_txns.txt

The output is not CSV though.

Here is a bit of commandline hacking to make into CSV:

monero-wallet-cli --command "show_transfers" --wallet-file=/path/to/wallet --password 'password' | egrep '^ '| sed 's/^ //g'| sed 's/ \+/,/g' >> my_txns.csv

(only tested with a watch-only wallet)

Jonathan Cross
  • 623
  • 5
  • 19
  • I tried your code above with my information but keep getting the error below Error: usage: show_transfers [in|out|all|pending|failed] [<min_height> [<max_height>]] I have tried adding that information but cant seem to get it to work. Do you have any idea to fix that error? – Scott B Jun 13 '18 at 23:15
  • Error: usage: show_transfers [in|out|all|pending|failed] [<min_height> [<max_height>]] – Scott B Jun 13 '18 at 23:35
1

You can now do this with the export_transfers command in the CLI (0.13 and later):

https://github.com/monero-project/monero/pull/4236

sgp
  • 8,806
  • 6
  • 42
  • 113