Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New plugin and API: grouped orders #639

Closed
abitmore opened this issue Feb 5, 2018 · 3 comments
Closed

New plugin and API: grouped orders #639

abitmore opened this issue Feb 5, 2018 · 3 comments

Comments

@abitmore
Copy link
Member

abitmore commented Feb 5, 2018

How about a new API that returns an order book that orders are grouped already? I think we can group the orders by percentage increase on price, we can say that a group of orders is a bucket, say 0.01% buckets, 0.1% buckets, 1% buckets and etc.

An order group (e.g. an ask order group) would have there attributes :

  • max_price: the greatest asking price in the group
  • min_price: the least asking price in the group
  • total_for_sale: the total amount of asset that is being sold

And perhaps one or more of these attributes are useful (to determine when to execute a new query, to subscribe to market order objects, to update user balance info and history, etc, although personally I think it's inefficient for UI to subscribe to order objects in busy markets in comparison to polling):

  • min_expiration: the earliest time that an order in the group may expire
  • id_array: a list of order object ID's
  • seller_array: a list of sellers, maybe sorted by whatever attribute and/or have duplicates removed

In order to implement this, the simplest way for the backend would be calculating on the fly which will use no extra RAM but every query uses CPU, the way with highest query performance is an plugin that has data pre-calculated with pre-defines buckets. Personally I prefer the latter, in this case we should define a default bucket list for both the UI and the backend, and more to discuss if we go in this direction.

We can add similar API's for force settlements and call orders later.

More info in bitshares/bitshares-ui#1106.

@tbone-bts
Copy link

It seems that it would make sense to include cumulative order totals with such an orderbook plugin for grouped orders.

sell_orderbook

@abitmore
Copy link
Member Author

abitmore commented Feb 7, 2018

@tbone-bts what you're saying is an UI feature. With the data provided by backend / API, UI can do that.

@abitmore abitmore self-assigned this Feb 11, 2018
@abitmore abitmore modified the milestones: Future Non-Consensus-Changing Release, 201803 Non-Consensus-Changing Release Feb 28, 2018
@abitmore
Copy link
Member Author

This has been done.

@abitmore abitmore removed their assignment Mar 25, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants