Closed shortthefomo closed 12 months ago
That's a very good point! Yes, this will need addressing.
The easiest way to implement this, is to use the existing logic for unfunded offers; https://github.com/XRPL-Labs/XRPL-Orderbook-Reader/blob/master/src/parser/LiquidityParser.ts#L109
By simply saying: "if expired, unfunded amount equals offer amount" all existing logic will apply.
Will work on this later today.
if ('Expiration' in offer && offer.Expiration < this.ledgerEpoch()) { continue }
is what I do when iterating over the book orders.
Fixed & Published 0.4.0 :) Thank you!
Looks like you're not taking into account expired orders here.
Had a read through the parser and did not see any checks on the expiration of the order.
Market Makers commonly use the expired field on their orders.
This will change the results of the data quite some.