You are viewing a single comment's thread from:
RE: Steem for script kiddies: paginated get_account_history calls
Good idea. It looks like the change took effect on steemitdev, too.
$ curl -s --data '{
"jsonrpc": "2.0",
"method": "account_history_api.get_account_history",
"params": {
"account": "social",
"start": -1,
"limit": 101
},
"id": 1
}' https://api.steemitdev.com | jq -S .error.message
"Account History request exceeded limit. The max limit is 100. Your limit is 101"
The script is working as before with both steemit and steemitdev when the limit is 100 or smaller. And limit = 100 maps to 101 results:
$ curl -s --data '{
"jsonrpc": "2.0",
"method": "account_history_api.get_account_history",
"params": {
"account": "'social'",
"start": -1,
"limit": 100
},
"id": 1
}' https://api.steemitdev.com | jq -S .result[][][0] | cat -n | tail -5
97 47427
98 47428
99 47429
100 47430
101 47431
I think it results from
"start": -1
. Maybe the most recent transaction is just appended. While start=0 leads to the correct number of records.