You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Аbstract
Ability to paginate using after param having txs ordered ASC and not DESC.
Or in alternative a before param with txs ordered DESC.
Motivation and Purposes
I'd like to use the after param as a cursor to get recent txs. But in order to do that I should have txs returned ASC by timestamp and not DESC by timestamp. Or in alternative have a param like before.
Specification
Return txs before a given txid and not only after or in alternative give a way to list txs ASC by timestamp.
Backwards Compatibility
100% compatible
Examples and Implementation
Ark, Lisk and other coins already implement this.
The text was updated successfully, but these errors were encountered:
Hi @roccomuso, thanks for reaching out.
In order to get the most recent transactions, you can use an use the existing API. Suppose tx_id is the most recent transaction you've loaded "the last time". Loading transactions between tx_id and now can be achieved by repeatedly calling /transactions/address/{address}/limit/{limit} and changing after param to the last transaction's id until you get tx_id in the response, and then sorting the resulting list on the client side. This method might be a little less convenient than explicitly requesting transaction ordering, but it can still be used as a workaround.
We'll consider adding sort order parameter (or extending API in some other way) in some of the future releases.
It's a workaround that will require multiple calls (not so convenient for wallets having a lot of txs), I think would be easier to improve api server-side introducing a order param
Аbstract
Ability to paginate using
after
param having txs ordered ASC and not DESC.Or in alternative a
before
param with txs ordered DESC.Motivation and Purposes
I'd like to use the after param as a cursor to get recent txs. But in order to do that I should have txs returned ASC by timestamp and not DESC by timestamp. Or in alternative have a param like before.
Specification
Return txs before a given txid and not only after or in alternative give a way to list txs ASC by timestamp.
Backwards Compatibility
100% compatible
Examples and Implementation
Ark, Lisk and other coins already implement this.
The text was updated successfully, but these errors were encountered: