Get balance for a single address
Returns the balance of a given address.
Sample request
https://api.thespectre.io/api
?module=account
&action=balance
&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae
&tag=latest
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample response
{
"status": "1",
"message": "OK",
"result": "40891626854930000000000"
}
Get balance history for a single address
Returns the balance history of a given address.
Sample request
https://api.thespectre.io/api
?module=account
&action=balancehistory
&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae
&starttimestamp=1656010239
&endtimestamp=1656010242
&offset=0
&limit=10
&sort=desc
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address to check for balance |
| the starting timestamp of interval, default value is null |
| the ending timestamp of interval, default value is null |
| skips the offset records before beginning to return the records, default value is 0 |
| the number of records displayed per page, default value is 10000 |
| the sorting preference, use asc to sort by ascending and desc to sort by descending, default value is asc |
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "123",
"timeStamp": "1656020241",
"balance": "40126832366005123220000",
"balanceChange": "-764794488924876780000"
},
{
"blockNumber": "1",
"timeStamp": "1656010239",
"balance": "40891626854930000000000",
"balanceChange": "40891626854930000000000"
}
]
}
Get balance for multiple addresses in a single call
Returns the balance of the accounts from a list of addresses (maximum of 20 addresses per call).
Sample request
https://api.thespectre.io/api
?module=account
&action=balancemulti
&address=0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a,0x63a9975ba31b0b9626b34300f7f627147df1f526,0x198ef1ec325a96cc354c7266a038be8b5c558f67
&tag=latest
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the strings representing the addresses to check for balance, separated by , |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"account": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
"balance": "40891626854930000000000"
},
{
"account": "0x63a9975ba31b0b9626b34300f7f627147df1f526",
"balance": "332567136222827062478"
},
{
"account": "0x198ef1ec325a96cc354c7266a038be8b5c558f67",
"balance": "0"
}
]
}
Get various account counters for a single address
Returns the account counters of a given address.
Sample request
https://api.thespectre.io/api
?module=account
&action=counters
&address=0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae
&tag=latest
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address to check for counters |
| the string pre-defined block parameter, either earliest , pending or latest |
Sample response
{
"status": "1",
"message": "OK",
"result": {
"gasUsed": "4328265",
"transactionCount": {
"total": "900",
"incoming": "300",
"outgoing": "600"
},
"internalTransactionCount": {
"total": "1500",
"incoming": "700",
"outgoing": "800"
},
"tokenTransferCount": {
"total": "600",
"incoming": "200",
"outgoing": "400"
},
"producedBlockCount": "20",
"balanceChangesCount": "1200"
}
}
Get the total number of wallet addresses
Returns the total number of wallet addresses.
Sample request
https://api.thespectre.io/api
?module=account
&action=gettotalwalletcount
&apikey=YourApiKeyToken
Sample response
{
"status": "1",
"message": "OK",
"result": "264567"
}
Get a list of 'normal' transactions by address
Returns the list of transactions performed by an address.
Sample request
https://api.thespectre.io/api
?module=account
&action=txlist
&address=0x28c6c06298d514db089934071355e5743bf21d60
&startblock=18541319
&endblock=18541319
&direction=in
&offset=10
&limit=10
&sort=asc
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address to check for normal transactions |
| the integer block number to start searching for transactions, default value is 0 |
| the integer block number to stop searching for transactions, default value is 1000000000 |
| direction option in for incoming transactions, out for outgoing, default value is all |
| skips the offset records before beginning to return the records, default value is 0 |
| the number of records displayed per page, default value is 10000 |
| the sorting preference, use asc to sort by ascending and desc to sort by descending, default value is asc |
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"blockHash":"0x7d81377abfa115565cd537df1a5873fca616f531292ff000d24083265590aa06",
"blockNumber":"18541319",
"confirmations":"0",
"contractAddress":null,
"cumulativeGasUsed":"6769329",
"decoded":{
"method_call":"transfer(address _to, uint256 _value)",
"method_id":"0xa9059cbb",
"parameters":[
{
"name":"_to",
"type":"address",
"value":"0xdc58e6ad03fa3c21c2f68105af3954411d17ad8e"
},
{
"name":"_value",
"type":"uint256",
"value":"109246000000000000000"
}
]
},
"from":"0x28c6c06298d514db089934071355e5743bf21d60",
"functionName":"transfer(address _to, uint256 _value)",
"gas":"207128",
"gasPrice":"34235322240",
"gasUsed":"44422",
"hash":"0x4a92f997fa11357e7dbd07161844d3518bb1bdc980ba6cbc571fe0bf69dc07e3","input":"0xa9059cbb000000000000000000000000dc58e6ad03fa3c21c2f68105af3954411d17ad8e000000000000000000000000000000000000000000000005ec17c2309c530000",
"isError":"0",
"methodId":"0xa9059cbb",
"nonce":"8181556",
"receiptStatus":"1",
"revertReason":null,
"timeStamp":"1699616555",
"to":"0x767fe9edc9e0df98e07454847909b5e959d7ca0e",
"transactionIndex":"48",
"type":"2",
"value":"0"
}
]
}
Get a list of 'internal' transactions by address
Returns the list of internal transactions performed by an address.
Sample request
https://api.thespectre.io/api
?module=account
&action=txlistinternal
&address=0xe6f0742f01fbab90d76e87ac291be94ff2103363
&startblock=0
&endblock=99999999
&direction=all
&offset=10
&limit=10
&sort=asc
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address to check for internal transactions |
| the integer block number to start searching for transactions, default value is 0 |
| the integer block number to stop searching for transactions, default value is 1000000000 |
| direction option in for incoming transactions, out for outgoing, default value is all |
| skips the offset records before beginning to return the records, default value is 0 |
| the number of records displayed per page, default value is 10000 |
| the sorting preference, use asc to sort by ascending and desc to sort by descending, default value is asc |
Sample response
{
"status":"1",
"message":"OK",
"result": [
{
"blockNumber": "2535368",
"timeStamp": "1477837690",
"hash": "0x8a1a9989bda84f80143181a68bc137ecefa64d0d4ebde45dd94fc0cf49e70cb6",
"index": "0",
"transactionIndex": "0",
"from": "0x20d42f2e99a421147acf198d775395cac2e8b03d",
"to": null,
"value": "0",
"contractAddress": "0x2c1ba59d6f58433fb1eaee7d20b26ed83bda51a3",
"input": "0x",
"type": "create",
"callType": null,
"gas": "254791",
"gasUsed": "46750",
"traceId": "0",
"isError": "0",
"errCode": null
},
{
"blockNumber": "2535479",
"timeStamp": "1477839134",
"hash": "0x1a50f1dc0bc912745f7d09b988669f71d199719e2fb7592c2074ede9578032d0",
"index": "0",
"transactionIndex": "0",
"from": "0x2c1ba59d6f58433fb1eaee7d20b26ed83bda51a3",
"to": "0x20d42f2e99a421147acf198d775395cac2e8b03d",
"value": "100000000000000000",
"contractAddress": null,
"input": "0x",
"type": "call",
"callType": "call",
"gas": "235231",
"gasUsed": "0",
"traceId": "0",
"isError": "0",
"errCode": null
}
]
}
Get a list of 'ERC20 - Token Transfer Events' by Address
Returns the list of ERC-20 tokens transferred by an address, with optional filtering by token contract.
Sample request
https://api.thespectre.io/api
?module=account
&action=tokentx
&contractaddress=0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2
&address=0x4e83362442b8d1bec281594cea3050c8eb01311c
&startblock=0
&endblock=27025780
&offset=0
&limit=10
&sort=asc
&apikey=YourApiKeyToken
Usage:
ERC-20 transfers from an address, specify the address
parameter
ERC-20 transfers from a contract address, specify the contractaddress
parameter
ERC-20 transfers from an address filtered by a token contract, specify both address
and contractaddress
parameters
Request query parameters
Parameter | Description |
---|
| the string representing the token address |
| the string representing the contract address |
| the integer block number to start searching for transactions, default value is 0 |
| the integer block number to stop searching for transactions, default value is 1000000000 |
| skips the offset records before beginning to return the records, default value is 0 |
| the number of records displayed per page, default value is 10000 |
| the sorting preference, use asc to sort by ascending and desc to sort by descending, default value is asc |
Sample response
{
"status":"1",
"message":"OK",
"result":[
{
"blockNumber":"4730207",
"index": 0,
"timeStamp":"1513240363",
"hash":"0xe8c208398bd5ae8e4c237658580db56a2a94dfa0ca382c99b776fa6e7d31d5b4",
"nonce":"406",
"blockHash":"0x022c5e6a3d2487a8ccf8946a2ffb74938bf8e5c8a3f6d91b41c56378a96b5c37",
"from":"0x642ae78fafbb8032da552d619ad43f1d81e4dd7c",
"contractAddress":"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"to":"0x4e83362442b8d1bec281594cea3050c8eb01311c",
"value":"5901522149285533025181",
"tokenName":"Maker",
"tokenSymbol":"MKR",
"tokenDecimal":"18",
"tokenPriceUSD": "1123.78",
"transactionIndex":"81",
"gas":"940000",
"gasPrice":"32010000000",
"gasUsed":"77759",
"cumulativeGasUsed":"2523379",
"input":"deprecated",
"confirmations":"7968350"
},
{
"blockNumber":"4764973",
"index": 0,
"timeStamp":"1513764636",
"hash":"0x9c82e89b7f6a4405d11c361adb6d808d27bcd9db3b04b3fb3bc05d182bbc5d6f",
"nonce":"428",
"blockHash":"0x87a4d04a6d8fce7a149e9dc528b88dc0c781a87456910c42984bdc15930a2cac",
"from":"0x4e83362442b8d1bec281594cea3050c8eb01311c",
"contractAddress":"0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
"to":"0x69076e44a9c70a67d5b79d95795aba299083c275",
"value":"132520488141080",
"tokenName":"Maker",
"tokenSymbol":"MKR",
"tokenDecimal":"18",
"tokenPriceUSD": "1123.78",
"transactionIndex":"167",
"gas":"940000",
"gasPrice":"35828000000",
"gasUsed":"127593",
"cumulativeGasUsed":"6315818",
"input":"deprecated",
"confirmations":"7933584"
}
]
}
Get list of blocks mined by address
Returns the list of blocks mined by an address.
Sample request
https://api.thespectre.io/api
?module=account
&action=getminedblocks
&address=0x9dd134d14d1e65f84b706d6f205cd5b1cd03a46b
&offset=0
&limit=10
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address |
| skips the offset records before beginning to return the records, default value is 0 |
| the number of records displayed per page, default value is 10000 |
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"blockNumber": "3462296",
"timeStamp": "1491118514",
"blockReward": "5194770940000000000"
},
{
"blockNumber": "2691400",
"timeStamp": "1480072029",
"blockReward": "5086562212310617100"
}
]
}
Get beacon chain withdrawals by address and block range
Returns the beacon chain withdrawals made to an address.
Sample request
https://api.thespectre.io/api
?module=account
&action=txsBeaconWithdrawal
&address=0xB9D7934878B5FB9610B3fE8A5e441e8fad7E293f
&startblock=0
&endblock=99999999
&sort=desc
&offset=0
&limit=10
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address |
| the integer block number to start searching for transactions, default value is 0 |
| the integer block number to stop searching for transactions, default value is 1000000000 |
| skips the offset records before beginning to return the records, default value is 0 |
| the number of records displayed per page, default value is 10000 |
| the sorting preference, use asc to sort by ascending and desc to sort by descending, default value is asc |
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"withdrawalIndex": "13",
"validatorIndex": "117823",
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "3402931175",
"blockNumber": "17034877",
"timestamp": "1681338599"
},
{
"withdrawalIndex": "14",
"validatorIndex": "119023",
"address": "0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f",
"amount": "3244098967",
"blockNumber": "17034877",
"timestamp": "1681338599"
}
]
}
Get beacon chain withdrawal count by address and block range
Returns the beacon chain withdrawal count made to an address.
Sample request
https://api.thespectre.io/api
?module=account
&action=txsBeaconWithdrawalCount
&address=0xB9D7934878B5FB9610B3fE8A5e441e8fad7E293f
&startblock=0
&endblock=99999999
&apikey=YourApiKeyToken
Request query parameters
Parameter | Description |
---|
| the string representing the address |
| the integer block number to start searching for transactions, default value is 0 |
| the integer block number to stop searching for transactions, default value is 1000000000 |
Sample response
{
"status": "1",
"message": "OK",
"result": "34"
}