Even though I was extremely eager before the Bisq API was a thing, I’ve yet to actually start using it. Perhaps the technical issues are gone now (I’m unsure), but this warning makes me too scared to actually dare to use it:
"Never run an API Daemon and the Bisq desktop application on the same host at the same time.
The API daemon and the GUI share the same default wallet and connection ports. Beyond inevitable failures due to fighting over the wallet and ports, doing so will probably corrupt your wallet. Before starting the API daemon, make sure your GUI is shut down, and vice-versa. Please back up your mainnet wallet early and often with the GUI."
If this is so important, why have this scary warning in the documentation instead of simply having Bisq check whether the GUI is already running (or vice versa) and display a safe error message without actually starting? Why blindly start it and risk/guarantee corrupting data?!
Also, the public/hosted API really should include the “deposit BTC %” field, but it does not currently. It would really help if it did, since I don’t dare to use the actual API on my computer as long as Bisq will corrupt itself if I forget to close one or the other before starting the other.
In fact, thinking more about this: why can’t the “API” part run at the same time anyway? It should merely be automating what the user normally does manually in the GUI. It would really be a bad experience if I have to “close the API” every time I actually want to use the GUI Bisq, and then remember to start it back up again once I’m done GUI:ing… even if it doesn’t also risk corrupting data!
the api daemon and the bisq application will use the same data directory, and the same wallet also.
Using those at the same time, is the same thing as using the same bisq wallet across two different computers, the state of the wallet will get corrupted because one pc will use utxos in a way the other one is not aware of. Trades will fail, offers will become invalid, plus every other kind of different shenanigans… what you want (i.e. having a separate daemon manage your bisq GUI) is not what the API daemon does, image it as a bisq application on its own, just without the GUI
But this, in practice, means that nobody can use the API unless they do it dedicatedly, without ever using Bisq manually. This makes it practically useless for all my (and normal) purposes. Why was it done like that?
API daemon is meant to be used exactly like that, as a daemon, so no GUI, because you automate it with your preferred scripting language.
You can create your own “gui” if you parse the logs with your script, and return to screen relevant info like “trade taken”, “profit=x”, “offer posted”, “offer taken” and so on
I didn’t really say it was not reasonable, rather that in the original intents of the developers, API damon was meant as a “headless bisq”, your request is not bad in itself and you could, for example, open an issue at Issues · bisq-network/bisq · GitHub to add this feature request, that is, exposing API endpoints in the normal GUI Bisq, but if the developers deem worthy such a task is to be seen