xrpl-dev-portal icon indicating copy to clipboard operation
xrpl-dev-portal copied to clipboard

book_offers behavior is different from what doc describes

Open cindyyan317 opened this issue 1 year ago • 3 comments

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 avatar Mar 16 '23 08:03 cindyyan317

CC @godexsoft

cindyyan317 avatar Mar 16 '23 17:03 cindyyan317

@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

godexsoft avatar Sep 19 '23 20:09 godexsoft

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

intelliot avatar Sep 25 '23 05:09 intelliot