How do I automate the CSV-dumping of trade history from Bisq?

I want to automate this:

  1. Start Bisq.
  2. Click “Portfolio”.
  3. Click “History”.
  4. Click “Export to CSV”.
  5. Select file location.

Instead, I wish to do something like:

bisq.exe --export-trade-history-to-csv --output-file="C:\tmp\Bisq.csv"

You know, to automate it. I hate trying to remember manual tasks and doing them. It’s extremely stressful to my brain. (You can imagine what I think about the forced, manual Bisq updates…)

Before you tell me to “just use the API”, I’ve tried to read about it about a hundred times over years now, but the documentation seems to say nothing about how to actually use it. At least I can’t find any such information. It redirects around to some wiki.

Hi not sure how to achieve what you are requesting.

What is the use case for regular CSV dumping? Maybe there is another way to achieve your objectives.

It’s to enter my Bisq trades into my bookkeeping system automatically.

so you have a system in place where the CSV is passed to you bookkeeping system, and it automatically parses it, discarded old records that have been imported already? Not bad.

ClosedTrades is the file containing the history in your data directory, and as is it could be parsed in a dirty way by just intercepting the common cleartext beginning for each entry… there isn’t a feature that will let you output a CSV from that file from the commandline, you could ask for it on the github repo yet it is possible it will be put very back in queue, if accepted at all

I can’t find any such file anywhere.

And I cannot ask for anything on the GitHub repo because that site, like every other major one, refuses registration every single time I try, to the point where I’ve long since stopped wasting my time.

I remember having registered on Github with a simplelogin redirect email, from Tor… maybe things have changed in the last few months?

Also, the file would be in Bisq’s data directory, in the btc_mainnet/db subfolder

You can retrieve trade history with CLI. To achieve it:

  • run daemon:
./bisq-daemon --apiPassword=xyz
  • in separate console window run cli:
./bisq-cli --password=xyz gettrades --category=closed
2 Likes

No such files. Only Bisq.exe.

You probably need to build daemon and cli from sources for now:

git clone git@github.com:bisq-network/bisq.git
cd bisq
./gradlew build

then you should see bisq-daemon and bisq-cli files.

In nearest future (hope next release) daemon/cli jar executables will be published as a part of release files, more info in this pull request:

OP has Bisq.exe in their app folder, so I would think being on windows you cannot really use those commands? Or can you, but need to call them differently?

1 Like

While I appreciate that the latest version of Bisq now has this requested feature, there are two major issues with it:

  1. It’s a separate “distribution”, making it very cumbersome to deal with. Why isn’t it simply included in the actual “standard” Bisq?
  2. It apparently requires me to install Java, which I do not have on my system (at least not runable by “java”) and truly don’t want to infest my computer with ever again.

If Bisq’s GUI application actually uses Java, it must be some sort of embedded version which I cannot find anywhere on my machine.

Yes, Bisq desktop comes indeed with Java libraries streamlined, that is why you can just run it.

Well, where’s the executable? It surely isn’t PATHed to “java” on my system.

As already mentioned, on Windows you can probably try to parse this file if you have some scripting knowledge:

%appdata%\Bisq\btc_mainnet\db\ClosedTrades

In fact that’s what I’ll do too.
All the data from the desktop app’s HISTORY tab is there, except the total amount in fiat which you can calculate with the help of tradePrice (in BTC) and tradeAmount (in BTC).

How do y’all deal with BSQ trade fees? I also just posted about it here. My issue is that my bookkeeping software should be able to import the Bisq csv dumps (with me setting up a custom csv importer first). But then the FIAT trade fees need to be calculated… only how? Is there a place to get historical BSQ values?

Or maybe the trade fee can be approximated? I feel like it is roughly tracking some FIAT value, maybe USD or EUR? Whether the BTC price is higher or lower, the trade fee seems to be staying roughly stable. Or am I making this up (which is quite possible)?