bisq
bisq copied to clipboard
API: Only getting SWAP offers (Python)
Description
When I perform the getOffers operation against the API, I am only able to recurve BTC <-> BSQ SWAP offers, while when trying other currencies I receive empty offer lists.
I am using Python with the example described here: https://bisq-network.github.io/slate/?python#rpc-method-getoffers
Version
1.9.2
Steps to reproduce
Execute above-referenced code using USD, EUR,... currency codes.
Expected behaviour
Getting available offers.
Actual behaviour
Getting empty offer list.
Device or machine
https://hub.docker.com/layers/python/library/python/3.10.5-bullseye/images/sha256-850b7f7626e5ca9822cc9ac36ce1f712930d8c87eb31b5937dba4037fe204034?context=explore
Thanks for opening your first issue here!
Be sure to follow the issue template. Your issue will be reviewed by a maintainer and labeled for further action.
Can you give me a cleaner URL?
Are you referring to the Python get_offers.py example ?
I do not think it is possible to receive BSQ swap offers using that example. I receive available offers to SELL BTC (for USD) offers, or an empty list if I have not set up a USD payment account / method matching any USD offers created with the same payment method.
Yep, I was referring to that example (I modified the url in the initial post).
From your comment I understand that as of now in order to check offers for a certain currency you need to add a payment method for that currency.
I did not see any references to that specific aspect in the documentation, so in case that it is not explained there, maybe it would be great to add that explanation or make it more visible.
Furthermore, maybe in future releases that restriction could be removed. I do not see the necessity of providing a payment method if you are using the API only for exploratory purposes.
I understand that as of now in order to check offers for a certain currency you need to add a payment method for that currency.
Yes, getoffers will return only offers you "can take", implying you need to have the same payment method / accounts set up for the offers you want to look at. And you are right: this restriction is not mentioned in RPC Method GetOffers doc. I need to fix that in several places.
Furthermore, maybe in future releases that restriction could be removed...
This deserves consideration.
@dainelli98 I created #6272 that includes an update to the protobuf file used to generate the API reference.
The getoffer, getoffers, and takeoffer rpc method descriptions have been updated in the reference, to warn about needing the matching payment methods on your API daemon.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because of inactivity. Feel free to reopen it if you think it is still relevant.