XRPLF / xrpl-dev-portal

Source code for xrpl.org including developer documentation
https://xrpl.org
Other
525 stars 1.01k forks source link

book_offers behavior is different from what doc describes #1818

Open cindyyan317 opened 1 year ago

cindyyan317 commented 1 year ago

According to book_offers API describes: The response omits unfunded Offers https://xrpl.org/book_offers.html#possible-errors However it does list all the offers regardless the funding status. How to reproduce: Screenshot 2023-03-16 at 08 49 22

The related code change: https://github.com/XRPLF/rippled/commit/ce2cecf0464a17d54876523b43815bf5e355fcfa This diff removed the filter and added the comment "// Include all offers funded and unfunded".

Please confirm the expected behavior of this API. BTW if this API is supposed to return all the offers, the "taker" field is useless.

cindyyan317 commented 1 year ago

CC @godexsoft

godexsoft commented 12 months ago

@mDuo13 @intelliot This is one of the issues we need to solve before 2.0 release. Can you please help answer the questions Cindy had? Thanks

intelliot commented 11 months ago

I think the docs are wrong and unfunded offers are returned. To avoid breaking users, the existing behavior should be maintained for api_version: 1. If we decide that it's better for users to omit unfunded offers (and I have no idea whether that's the case), that change should only occur with a future api_version (e.g. 2 or 3, whatever the next version is at the time the change is implemented).