XRPLF / xrpl-dev-portal

Source code for xrpl.org including developer documentation
https://xrpl.org
Other
528 stars 1.02k forks source link

Clarification on multi-page responses (with marker) #1755

Open vporton opened 1 year ago

vporton commented 1 year ago

Consider for example account_channels method. Thanks to marker feature, it may be multipage.

It may also return ledger_index (for the case if input ledger version is a string such as validated, it indeed returns a number).

To clarify: When, for example using account_channels method with "ledger_index": "validated", and in similar cases, is it guaranteed that in multipage responses returned ledger_index is the same for all pages?

mDuo13 commented 1 year ago

It is not guaranteed, and this is why the example code showing best practices for markers and pagination uses "validated" for the first request, then saves the ledger index and uses that for subsequent requests.

It would be a good idea to point this out in the prose of that page though