Listing offers without the GUI


I am not very much a GUI person and was looking for a quick way to check offers on Bisq that may be interesting to me. I sometimes connect remotely to a Bisq instance running in another country and desktop sharing can be painfully slow.

I wrote a Python script that prints the offers like the following:

If anyone has a use for it I can put it up publicly. What I’d really love to see is an API to take/make offers so I can script everything :).


Great job!
It would be awesome if we had a python command line client :smiley:
Maybe this could be a start of a new client one day!


Ah cool. Are you using the markets page and/or API?
We are working on APIs but still not completed.


Yep I’m using the API and API to get the fiat prices.


@danda might help…


My sad and ugly code in case it is useful to anyone heh:


In case someone is interested in quickly checking the same fiats/coins I am interested in, as well as removing offers > 5% away from market price, I have this running every 10 minutes at:


Very fine, great job!

Can you parameterize the distance to the market price in the url?


Not quite a parameter heh, but you can now get the maximum market distance offers by adding _N to the URL, such as:

Have fun!


Thanks, very nice! :+1:


I already ask for a lot, but it would be very interesting to include Bisq’s fees (%) in the information of each offer. it’s possible?


Hm, this doesn’t look like it is available in the API at Perhaps you only get it when connecting to the peer and taking the offer.


The calculation of fees is not in the API, it’s a formula, that’s here:

How much does it cost to trade on Bisq?

Trading fees are based on trade amount and distance to market price. Min. fee (MF) = 0.0002 BTC, default fee (DF) = 0.002 BTC, amount factor (AF) = 1/BTC, market price factor (MF) = square root of percent value (e.g. 1% -> 1, 9% 0 -> 3, 0.01% -> 0.1). Tradeing fee = max(MF, DF * amount * AF * MF). E.g. 0.002 BTC for 1 BTC trade at 1% market price distance.


Cool. Added it. May or may not be correct heh.


Good job, but something seems to go wrong, for example in this offer:

Payment method: CLEAR_X_CHANGE
Offer ID: 4526551
Amount in BTC: 0.30000000 - 0.30000000
Price for 1: 4630.49
Maximum: 1389.15
Fee: 6.39 - 6.39
Distance from market: 5.93%

fee= max(0.0002, 0.002 * amount * sqrt(abs(distance)))
fee = max(0.0002,0.002 * 0.3 * sqrt(5.93)) = 0.0014

I’d better check this formule Manfred, I can not find more information on calculating fees


Maker and taker have different default fee (for 1 BTC at 1%):
Maker: 0.002 BTC (0.2%)
Taker: 0.003 BTC (0.3%)


Maker fee = max(0.0002,0.002 * 0.3 * sqrt(5.93)) = 0.0014 0.14%
Taker fee = max(0.0002,0.003 * 0.3 * sqrt(5.93)) = 0.0022 0.22%

Is it correct for the example above?


Ah sorry forget to tell you that the taker does not has the factor with the sqrt of the market price distance. In your calculation the total % was not based on 1 BTC.

Maker fee = max(0.0002,0.002 * 0.3 * sqrt(5.93)) = 0.0014 -> 0.42% of trade amount
Taker fee = max(0.0002,0.003 * 0.3) = 0,0009 -> 0.27% of trade amount

With a 1 BTC trade at 1% distance:
Maker fee = max(0.0002,0.002 * 1 * sqrt(1)) = 0.002 -> 0.2% of trade amount
Taker fee = max(0.0002,0.003 * 1) = 0,003 -> 0.3% of trade amount

The Maker pays 1 times the mining fee (maker fee tx), the taker 3 times (taker fee tx, deposit tx and payout tx). That is because we use dynamic fees and at offer creation time the fee could not be estimated for the time when the deposit and payout is done (can take days or weeks), so we cannot split the tx fee payment as it was before 0.5. But as we want to incentivize makers with cheaper overall fees it is not a real issue.
Depending on the current tx fee and tx size it might be about
0.0003 BTC for one tx fee (150 sat/byte * 200 bytes).
So for the

With a 1 BTC trade at 1% distance and an average tx fee:
Maker fee + tx fee = max(0.0002,0.002 * 1 * sqrt(1)) + 0.0003 = 0.0023 -> 0.23% of trade amount
Taker fee + 3tx fee= max(0.0002,0.003 * 1) + 30.0003 = 0,0039 -> 0.39% of trade amount

Current tx fee you can see here: (atm 150 sat/byte).

When creating the offer you can see the fees when you rollover the “info” symbol at the summary screen before you do the payment.


Thank you. At least for me those calculations were not obvious. It would be nice to include them in the FAQ.

Ehem … Valankar could you update the script?:notes:


Yes I agree. The FAQ and webpage will get some updates soon…