Open sschiessl-bcp opened 2 years ago
I think adding a new column is better. Thanks.
It seems the API does not return the owner of the orders: https://api.bitshares.ws/openexplorer/order_book?base=BTS"e=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"}]}
And it seems it's implemented with the get_order_book
database API which does not return the owners.
/**
* @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;
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 :-|
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?
About the API: https://github.com/cryptonomex/graphene/issues/503#issuecomment-170088270
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.
Awesome, thanks! Will include once available
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?