Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Market overview does not show order details #9

Open
sschiessl-bcp opened this issue Jun 29, 2022 · 7 comments
Open

Market overview does not show order details #9

sschiessl-bcp opened this issue Jun 29, 2022 · 7 comments

Comments

@sschiessl-bcp
Copy link
Contributor

See page https://blocksights.info/#/markets/XBTSX.USDT/BTS

Is it possible to give user links to the specific orders, or add optional columns that show the maker?

@abitmore
Copy link

I think adding a new column is better. Thanks.

@abitmore
Copy link

abitmore commented Jul 19, 2022

It seems the API does not return the owner of the orders: https://api.bitshares.ws/openexplorer/order_book?base=BTS&quote=XBTSX.USDT&limit=10 .

{"base":"BTS","quote":"XBTSX.USDT","bids":[{"price":"75.262190324355485951","quote":"0.532533","base":"40.07960"},{"price":"74.95094950949509495","quote":"1.111100","base":"83.27800"},...,{"price":"73.469534695346953469","quote":"1.111100","base":"81.63200"}],"asks":[{"price":"76.014488335403821384","quote":"0.524836","base":"39.89514"},...,{"price":"79.959815894891719773","quote":"44.789849","base":"3581.38808"}]}

@abitmore
Copy link

abitmore commented Jul 19, 2022

And it seems it's implemented with the get_order_book database API which does not return the owners.

https://github.com/bitshares/bitshares-core/blob/6.0.2/libraries/app/include/graphene/app/database_api.hpp#L583-L590

      /**
       * @brief Returns the order book for the market base:quote
       * @param base symbol name or ID of the base asset
       * @param quote symbol name or ID of the quote asset
       * @param limit depth of the order book to retrieve, for bids and asks each, capped at 50
       * @return Order book of the market
       */
      order_book get_order_book( const string& base, const string& quote, unsigned limit = 50 )const;

https://github.com/bitshares/bitshares-core/blob/6.0.2/libraries/app/include/graphene/app/api_objects.hpp#L82-L95

   struct order
   {
      string                     price;
      string                     quote;
      string                     base;
   };

   struct order_book
   {
     string                      base;
     string                      quote;
     vector< order >             bids;
     vector< order >             asks;
   };

So.. not very easy to fix :-|

@sschiessl-bcp
Copy link
Contributor Author

I was playing around with using get limit orders instead of orderbook.

About orderbook: Is it straightforward to give the API a flag that then includes owner in response?

@abitmore
Copy link

About the API: cryptonomex/graphene#503 (comment)

These changes add a higher level and easier to use API for accessing public market information. The additions are based on the API used by Poloniex. See https://poloniex.com/support/api/ Public API Methods.

Of course, a traditional CEX won't let users know which order is owned by which account. But we are not a CEX. All info is on chain. So perhaps we can extend the APIs to contain more info. Sure it is possible technically. To be "ease to use", perhaps we should return order IDs, order expiration time and account names, but not only account IDs - although it means much more database queries on the server side.

On the other hand, these changes were made in year 2016, the world of CEX's has changed a lot - Poloniex is not that large now. There are lots of things for us to catch up.

@abitmore
Copy link

See bitshares/bitshares-core#2638.

@sschiessl-bcp
Copy link
Contributor Author

See bitshares/bitshares-core#2638.

Awesome, thanks! Will include once available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants