Issue with Account History params
I am calling the get_account_history from the nodejs Steem package using
steem.api.getAccountHistory('user',-1,100)
which I expect to get back the first 100 items based on the API guide.
params: account(string), from(uint32_t), limit(uint32_t)
The result seems to return 294 which is the total account items. If I try to pass say 'name',290,200 via
steem.api.getAccountHistory('user',290,200)
I would expect to start at the 290th item and show the 5 from 290-294 but it returns the entire history again.
steem.api.getAccountHistory(username, 294, 4)
gives you items #290 to #294.limit
is the number of extra items returned preceding the item atfrom
. So,steem.api.getAccountHistory(username, 294, 0)
will give you just the item at 294.it seems, that in my case the api returns always the first entry (account create) no matter what from i set. except if i set from = -1 it returns the last entry. And it seem to return not more then 30 entries no matter if i set a limit greater then 30. so i have no chance to query all entries for a given account. Do others have the same problem?
with phyton api this seem to work now:
Also, if
from
is-1
, it will start at the latest item in the account history.Thank you for the clarfication. It seems this isn't documented and a very strange way of doing this since most API calls for history start at a value and return the future but this seem to be backwards. Doing some tests, my full history of an account is 309 ops.
Returns the two most recent ops.
Returns the first user op.
I think this can be closed as a bug and then moved to a documentation request on that method since it isn't really noted the from and limit goes backwards and not forwards.
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Hey @boxxa I am @utopian-io. I have just super-voted you at 12% Power!
Suggestions https://utopian.io/rules
-Your contribution is less informative than others in this category.
Achievements
-I am a bot...I need someone spotting my bugs!
-You have less than 250 followers. Just gave you a gift ;)
-This is your first accepted contribution here in Utopian. Welcome!
Up-vote this comment to grow my power and help Open Source contributions like this one.