keybase / keybase-bot

exploration with the keybase chat API
264 stars 65 forks source link

wallet.history - paging? [question] #183

Open KINKCreative opened 4 years ago

KINKCreative commented 4 years ago

Hi there, I don't know where to look this up. The history returns ALL transactions? Can there be a limit passed to this? What happens with thousands and thousands of transactions - is there an efficient way to look for the most recent ones? (eg via Stellar API directly?)

Thanks!

nathanmsmith commented 4 years ago

I don't believe there's currently a way to only fetch the n most recent transactions via the Keybase api currently (cc @patrickxb to confirm/potentially file a ticket to support this?).

For now my best solution to deal with a wallet with a large amount of transactions would be to filter out only the requests you need from the response (I believe the response transactions are ordered from least recent first to most recent at the end; there's also a time property that may be useful) and query history as little as possible. We're currently working on support for keybase chat api-listen --wallet, which should help if you need real-time updates on transactions (#164).