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

**URL:** <https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485>\
**Category:** Support\
**Created:** [March 30, 2022, 8:08pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485 "2022-03-30T20:08:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![SomeBisqUser](https://bisq.community/letter_avatar/somebisquser/32/5_5575768a8748004e209b776fc1b2916d.png) [@SomeBisqUser](https://bisq.community/u/SomeBisqUser)\
**Post date:** [March 30, 2022, 8:08pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/1 "2022-03-30T20:08:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pazza](https://bisq.community/user_avatar/bisq.community/pazza/32/2703_2.png) [@Pazza](https://bisq.community/u/Pazza)\
**Post date:** [April 2, 2022, 1:05am UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/2 "2022-04-02T01:05:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SomeBisqUser](https://bisq.community/letter_avatar/somebisquser/32/5_5575768a8748004e209b776fc1b2916d.png) [@SomeBisqUser](https://bisq.community/u/SomeBisqUser)\
**Post date:** [April 2, 2022, 6:28pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/3 "2022-04-02T18:28:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![w000000t](https://bisq.community/user_avatar/bisq.community/w000000t/32/3124_2.png) [@w000000t](https://bisq.community/u/w000000t)\
**Post date:** [April 3, 2022, 12:56pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/4 "2022-04-03T12:56:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SomeBisqUser](https://bisq.community/letter_avatar/somebisquser/32/5_5575768a8748004e209b776fc1b2916d.png) [@SomeBisqUser](https://bisq.community/u/SomeBisqUser)\
**Post date:** [April 3, 2022, 8:39pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/5 "2022-04-03T20:39:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![w000000t](https://bisq.community/user_avatar/bisq.community/w000000t/32/3124_2.png) [@w000000t](https://bisq.community/u/w000000t)\
**Post date:** [April 4, 2022, 2:39pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/6 "2022-04-04T14:39:35Z")

</div>

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](https://bisq.wiki/Data_directory#Default_locations), in the btc\_mainnet/db subfolder

---

<div class="post-metadata">

**Author:** ![xyzmaker123](https://bisq.community/letter_avatar/xyzmaker123/32/5_5575768a8748004e209b776fc1b2916d.png) [@xyzmaker123](https://bisq.community/u/xyzmaker123)\
**Post date:** [April 5, 2022, 9:44am UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/7 "2022-04-05T09:44:29Z")

</div>

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

- run daemon:

```auto
./bisq-daemon --apiPassword=xyz

```

- in separate console window run cli:

```auto
./bisq-cli --password=xyz gettrades --category=closed

```

---

<div class="post-metadata">

**Author:** ![SomeBisqUser](https://bisq.community/letter_avatar/somebisquser/32/5_5575768a8748004e209b776fc1b2916d.png) [@SomeBisqUser](https://bisq.community/u/SomeBisqUser)\
**Post date:** [April 10, 2022, 2:32pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/8 "2022-04-10T14:32:48Z")

</div>

No such files. Only `Bisq.exe`.

---

<div class="post-metadata">

**Author:** ![xyzmaker123](https://bisq.community/letter_avatar/xyzmaker123/32/5_5575768a8748004e209b776fc1b2916d.png) [@xyzmaker123](https://bisq.community/u/xyzmaker123)\
**Post date:** [April 11, 2022, 11:04am UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/9 "2022-04-11T11:04:02Z")

</div>

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

```auto
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:

> <https://github.com/bisq-network/bisq/pull/6122>
>
> The Bisq gradle build already creates distribution .tar files within the cli and… daemon subprojects' \`build/distributions\` directories. Instead of using additional gradle tasks to create runnable \`cli.jar\` and \`daemon.jar\` files, simple bash scripts arrange the .tar contents into .zip files containing runnable jars at the root level, and dependent jars in their \`lib\` directories.
> 
> The cli release zip file structure looks like this:
> \<pre\>
> $ tree .
> .
> ├── \[me 165543\] cli.jar
> └── \[me 4096\] lib
> ├── \[me 3120\] annotations-4.1.1.4.jar
> ├── \[me 230905\] checker-qual-3.8.0.jar
> ├── \[me 15994\] error\_prone\_annotations-2.9.0.jar
> ├── \[me 4617\] failureaccess-1.0.1.jar
> ├── \[me 254575\] grpc-api-1.42.1.jar
> ├── \[me 30595\] grpc-context-1.42.1.jar
> ├── \[me 686612\] grpc-core-1.42.1.jar
> ├── \[me 8185495\] grpc-netty-shaded-1.42.1.jar
> ├── \[me 5118\] grpc-protobuf-1.42.1.jar
> ├── \[me 7570\] grpc-protobuf-lite-1.42.1.jar
> ├── \[me 50385\] grpc-stub-1.42.1.jar
> ├── \[me 240255\] gson-2.8.6.jar
> ├── \[me 2874025\] guava-30.1.1-jre.jar
> ├── \[me 8781\] j2objc-annotations-1.3.jar
> ├── \[me 78146\] jopt-simple-5.0.4.jar
> ├── \[me 19936\] jsr305-3.0.2.jar
> ├── \[me 2199\] listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
> ├── \[me 309130\] logback-classic-1.1.11.jar
> ├── \[me 475477\] logback-core-1.1.11.jar
> ├── \[me 6385\] perfmark-api-0.23.0.jar
> ├── \[me 1681558\] protobuf-java-3.19.1.jar
> ├── \[me 1557780\] proto-google-common-protos-2.0.1.jar
> ├── \[me 4715421\] proto.jar
> └── \[me 41472\] slf4j-api-1.7.30.jar
> \</pre\>    
> To call getversion from cli.jar:
> \`$ java -jar cli.jar --password=becareful getversion\`
> 
> The daemon release tree structure would look the same (but more jars in the lib dir).
> 
> To run daemon.jar on mainnet:
> \`$ java -jar daemon.jar --apiPassword=becareful\`
> 
> TODO Sign release .zip files, add checksums, etc...
> 
> Based on \`master\`.

---

<div class="post-metadata">

**Author:** ![w000000t](https://bisq.community/user_avatar/bisq.community/w000000t/32/3124_2.png) [@w000000t](https://bisq.community/u/w000000t)\
**Post date:** [April 14, 2022, 8:03pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/10 "2022-04-14T20:03:12Z")

</div>

> [@xyzmaker123](#):
>
> You probably need to build daemon and cli from sources for now:
> 
> ```auto
> git clone git@github.com:bisq-network/bisq.git
> cd bisq
> ./gradlew build
> 
> ```
> 
> then you should see `bisq-daemon` and `bisq-cli` files.

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?

---

<div class="post-metadata">

**Author:** ![SomeBisqUser](https://bisq.community/letter_avatar/somebisquser/32/5_5575768a8748004e209b776fc1b2916d.png) [@SomeBisqUser](https://bisq.community/u/SomeBisqUser)\
**Post date:** [May 14, 2022, 9:08am UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/11 "2022-05-14T09:08:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![w000000t](https://bisq.community/user_avatar/bisq.community/w000000t/32/3124_2.png) [@w000000t](https://bisq.community/u/w000000t)\
**Post date:** [May 15, 2022, 5:07pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/12 "2022-05-15T17:07:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![SomeBisqUser](https://bisq.community/letter_avatar/somebisquser/32/5_5575768a8748004e209b776fc1b2916d.png) [@SomeBisqUser](https://bisq.community/u/SomeBisqUser)\
**Post date:** [May 16, 2022, 9:42am UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/13 "2022-05-16T09:42:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Droidus](https://bisq.community/letter_avatar/droidus/32/5_5575768a8748004e209b776fc1b2916d.png) [@Droidus](https://bisq.community/u/Droidus)\
**Post date:** [June 30, 2022, 4:07pm UTC](https://bisq.community/t/how-do-i-automate-the-csv-dumping-of-trade-history-from-bisq/11485/14 "2022-06-30T16:07:28Z")

</div>

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).
