Accounts¶
-
class
ethextended.
account
¶
This class is the parent of all functions related to Ethereum addresses (accounts).
-
account.
address_autocomplete
(address)¶
- Uses
etherscan.io
API
Takes not completed address like 0x3f5CE5
, and returns a list of possible addresses with any transaction like ['0x3F5ce52A7ea4471a73b7aCA7bCcc9b03ea8449bE', '0x3f5...]
.
>>> ethextended.account.address_autocomplete("0x3f5CE5")
['0x3F5ce52A7ea4471a73b7aCA7bCcc9b03ea8449bE', '0x3f5cE530eF787ce64e277D84aa4546b520D62f9E', '0x3f5cE541912eb5cFE38b9e1F84c0E37504f89212', '0x3F5CE5cBbAdB3102f62051CF14c25630bF16c65D', '0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE']
- Uses
etherscan.io
API
Displays address tags, gathered from etherscan.io
.
Note
The first tag would be the main tag of the address. Others would be as additional.
>>> ethextended.account.address_tags("0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE")
['Binance', 'Exchange']
-
account.
address_label
(address)¶
- Uses
etherscan.io
API
Displays address label given by etherscan.io
.
>>> ethextended.account.address_label("0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE")
'Binance 1'
-
account.
transactions
(address)¶
- Uses
etherscan.io
API
Returns list of latest transactions (max. 10 000). Transactions sorted by new.
Warning
This method can take several seconds.
# Returns array with transactions
>>> transactions = ethextended.account.transactions("0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb")
# First transaction
>>> transactions[-1]
{
'blockNumber': '414116',
'timeStamp': '1445375797',
'hash': '0x9ae04758afbea7867023ee11c631f63657c88fa07ce5b1a7666229a891bc3460',
'nonce': '28',
'blockHash': '0xcfc5396f0b0ad784ce5318b829f36fd5b4db7161e49e5abda08f4bc1290c8c02',
'transactionIndex': '0',
'from': '0x70e3e34c0100b1e05700fa699183c82af7a25ba0',
'to': '0xd1220a0cf47c7b9be7a2e6ba89f429762e7b9adb',
'value': '10000000000000000000',
'gas': '121000',
'gasPrice': '50000000000',
'isError': '0',
'txreceipt_status': '',
'input': '0x',
'contractAddress': '',
'cumulativeGasUsed':
'21000',
'gasUsed':
'21000',
'confirmations': '8205501'
}