Get transactions to an address
netman2048 opened this issue · 6 comments
I'm trying to extract what transactions have been sent to an address by using the tron.trx.get_transactions_related and tron.trx.get_transactions_to_address functions but when I do these, they error out.
tron.trx.get_transactions_to_address(addr)
2019-05-19 10:26:21,576 - DEBUG - Resetting dropped connection: api.trongrid.io
2019-05-19 10:26:22,138 - DEBUG - https://api.trongrid.io:443 "GET /walletextension/gettransactionstothis HTTP/1.1" 302 26
2019-05-19 10:26:22,246 - DEBUG - https://api.trongrid.io:443 "GET /404 HTTP/1.1" 404 43
Traceback (most recent call last):
File "", line 1, in
File "/root/tron_tx/lib/python3.6/site-packages/tronapi/trx.py", line 293, in get_transactions_to_address
return self.get_transactions_related(address, 'to', limit, offset)
File "/root/tron_tx/lib/python3.6/site-packages/tronapi/trx.py", line 275, in get_transactions_related
}, 'get')
File "/root/tron_tx/lib/python3.6/site-packages/tronapi/manager.py", line 122, in request
return self.solidity_node.request(url, json=params, method=method)
File "/root/tron_tx/lib/python3.6/site-packages/tronapi/providers/http.py", line 89, in request
**self.get_request_kwargs(),
File "/root/tron_tx/lib/python3.6/site-packages/tronapi/providers/http.py", line 126, in _request
raise exc_cls(response.status_code, text, json, kwargs.get('url'))
tronapi.exceptions.NotFoundError: (404, '{"error":{"code":404,"status":"Not Found"}}', {'error': {'code': 404, 'status': 'Not Found'}}, 'https://api.trongrid.io/walletextension/gettransactionstothis')
I believe the issue is that Trongrid doesn't support this API call from the research I've done. Do you know what other API providers exist to the Tron network?
Full node: https://super.guildchat.io/
Solidity node: https://solidity.guildchat.io/
Event server: https://api.trongrid.io/
Most likely this method is no longer supported. "gettransactionstothis "
Is there an alternate method you are aware of?
For local wallet "TRON" used "tronscan api"
https://github.com/iexbase/iex-wallet/blob/master/src/providers/tron/tron.ts#L547
https://github.com/iexbase/iex-wallet/blob/master/src/environments/prod.ts#L15
Using the tronscan api worked. Thanks!