Why an empty XRPL escrow page can have a next page

An operator inventories escrows associated with an account. An empty array in the middle of the scan can be a valid response, even when the account has matching objects later in its directory.

Start a filtered directory scan

Use this WebSocket request with the account you are auditing. Record the validated ledger hash from the first page. The server scans the account directory and applies the type filter. The number of returned objects can fall below the requested limit at any point.

{"command":"account_objects","account":"r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59","ledger_index":"validated","type":"escrow","limit":10}

Stop when the marker disappears

If account_objects is empty and marker is present, send the marker unchanged in the next request. Specify the saved ledger_hash in place of ledger_index and keep the same account and filter. If a page returns two escrows and no marker, process both and finish. Inspect each escrow’s Account and Destination before classifying it as outgoing or incoming. Being listed under an address does not by itself establish who funded the escrow.

xrpl.org account_objects