Jump to content
Sign in to follow this  
rammican

getOrderbook options.limit oddity

Recommended Posts

I was just looking through this topic by tulo: https://www.xrpchat.com/topic/8223-rippleapi-orderbooks-order-is-by-string-quality/?tab=comments#comment-78458

and decided to reproduce the problem he was having. When I started playing around with limit option I noticed something odd. Looking up the XRP / CNY rKiCet8SdvWxPXnAgYarFUXMh1zCPz432Y book with the option.limit set to 1 would not always return a result for both the bid and ask. When I up the limit to 5 or 10 it always returned for both.

Any ideas on why this might be happening? 

I can think of a lot of use cases for wanting a limit of 1 since it should return the top bid and ask quality. This coupled with the string sorting brought up in tulo's post means that you need to return the entire orderbook, re-sort, then take the top quality to ensure that you are getting it. Seems like a lot of work.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...