-
Notifications
You must be signed in to change notification settings - Fork 214
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
orderbook not sorted properly #83
Comments
Hello and thanks for reporting! I'm not sure if I can follow, can you elaborate please what the error is and how it happens for you? Thank you in advance! |
if you open orderbook.js (examples) |
You raise a good point. In JavaScript just plain Arrays guarantee sorting order, the example does not provide a sorted orderbook and uses a hashmap like structure for fast inserts and deletes. It's easy to get the prices with I'm busy with some other fixes right now, but I opened #84 |
example:
'2734.4': { PRICE: 2734.4, COUNT: 2, AMOUNT: -10,5990971},
'2734.8': { PRICE: 2734.8, COUNT: 1, AMOUNT: -0,11},
'2734.3': { PRICE: 2734.3, COUNT: 1, AMOUNT: -4.260452},
'2736.9': { PRICE: 2736.9, COUNT: 1, AMOUNT: -0,01068},
same sort error on bids/asks
The text was updated successfully, but these errors were encountered: