KomodoPlatform / komodo-defi-framework

This is the official Komodo DeFi Framework repository
https://komodoplatform.com/en/docs/komodo-defi-framework/
107 stars 94 forks source link

orderbook filtering #1609

Open smk762 opened 1 year ago

smk762 commented 1 year ago

As the size of orderbooks grow, the time taken to get a response and go through the book increases. Currently the legacy orderbook param only accepts base / rel as inputs. The v2 bestorders method has some additional params to request_by volume or number. It would be a great boost to UX if the orderbook request would allow some filtering. E.g.

cc: @cipig

himu007 commented 1 year ago

i like this idea. a way to filter the display with a minimum volume would be nice when the orderbook gets saturated with a lot of small orders. with min_volume, max_volume you can make whale version or minnow versions just with different min and max values. but min_volume is all that is needed as you can always match a smaller amount than an order has. when there are hundreds of small orders it becomes painful to have to scroll through them.

onur-ozkan commented 4 weeks ago

From here:

https://github.com/KomodoPlatform/komodo-defi-framework/blob/8de861dc8319cc3cce2ceafbbbcc8fa416a8810e/mm2src/mm2_main/src/lp_ordermatch.rs#L624-L628

I don't see a proper pagination mechanism, which we definitely need to implement. It's worth considering this while working on the issue.