Author Topic: [API] Is there a direct way to get order book in wallet_api?  (Read 999 times)

0 Members and 1 Guest are viewing this topic.

Offline svk

Welcome to my world :(

There's a subscribe_to_market call also that will notify you of changes in a market.

I recommend looking at MarketsActions.js in graphene-ui/dl/src/actions where you can see the api calls being used, and MarketsStore.js for processing methods.
Worker: dev.bitsharesblocks

Offline botfund

  • Full Member
  • ***
  • Posts: 174
    • View Profile
  • BitShares: botfund
What I've found in wallet_api to get order book:
get_call_orders
get_limit_orders

It's really difficult for api caller to calculate an order book from the raw information and it will  be affected by market rule changes a lot. And we need to implement the same logic in all the program languages we want to use. Can we provide an api to get order book directly? Something like {asks:[{price:{}, amount:xxxx, optional order:{}}], bids:[{price:{}, amount:xxxx, optional order:{}}].