You are viewing a single comment's thread from:

RE: Steem for script kiddies: paginated get_account_history calls

in #steem3 years ago

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
Sort:  

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.

Loading...

Coin Marketplace

STEEM 0.09
TRX 0.32
JST 0.032
BTC 108689.49
ETH 3984.66
USDT 1.00
SBD 0.61