Does get_contract_events only provide 100 results?

from moralis import evm_api

api_key = "YOUR_API_KEY"

body = {
  "anonymous": false,
  "inputs": [
    {
      "indexed": true,
      "internalType": "address",
      "name": "from",
      "type": "address"
    },
    {
      "indexed": true,
      "internalType": "address",
      "name": "to",
      "type": "address"
    },
    {
      "indexed": false,
      "internalType": "uint256",
      "name": "amount",
      "type": "uint256"
    }
  ],
  "name": "Transfer",
  "type": "event"
}

params = {
  "chain": "eth",
  "from_block": 1,
  "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
  "address": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
}

result = evm_api.events.get_contract_events(
  api_key=api_key,
  body=body,
  params=params,
)

print(result)

Gets only 100 results with no cursor

you have limit and offset parameters

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.