Ethereum
Ethereum endpoints
Supported methods for Ethereum. Please note that to use these methods you must specify both the API token, eth
in this case, and the network on which you want to make the call. For example, if you want to know the balance of a Bitcoin Cash address in the main network, the corresponding endpoint is as follows: http://server/eth/mainnet/getAddressBalance
Return the balance of any address
Ethereum address
0x625ACaEdeF812d2842eFd2Fb0294682A868455bd
POST /getAddressBalance HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd"
}
Successful response
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"balance": {
"confirmed": "10000",
"unconfirmed": "0"
}
}
Return the balance of an array of addresses
Ethereum address
0x625ACaEdeF812d2842eFd2Fb0294682A868455bd
POST /getAddressesBalance HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"addresses": [
"0x625ACaEdeF812d2842eFd2Fb0294682A868455bd"
]
}
Successful response
[
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"balance": {
"confirmed": "10000",
"unconfirmed": "0"
}
}
]
Returns latest block hash and index
POST /getHeight HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
Successful response
{
"latestBlockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"latestBlockIndex": "1"
}
Returns True if blocks are syncing and returns False if theres no synchronization or is fully sychronize
POST /syncing HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
Successful response
{
"syncing": false,
"syncPercentage": "6.905658629231632%",
"currentBlockIndex": "1",
"latestBlockIndex": "1"
}
Broadcast a transaction to the network
The transaction hash in hex
0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675
POST /broadcastTransaction HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 105
{
"rawTransaction": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
Successful response
{
"broadcasted": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}
Generates and returns an estimate of how much gas is necessary to allow the transaction to complete
The transaction will not be added to the blockchain. Note that the estimate may be significantly more than the amount of gas actually used by the transaction, for a variety of reasons including EVM mechanics and node performance.
Ethereum transaction call
POST /estimateGas HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 263
{
"tx": {
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
}
Successful response
{
"estimatedGas": "7982291"
}
Returns the information of any block giving its hash
A string representing the hash (32 bytes) of a block
0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd
Verbosity mode. With 2 value, transactions inside the block are returned completly, otherwise, only transactions hash will be returned
2
Example: 2
Possible values: POST /getBlockByHash HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 94
{
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"verbose": 2
}
Successful response
{
"block": {
"number": "0x1",
"hash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"parentHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"nonce": "0x4db7a1c01d8a8072",
"miner": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"size": "0x41c7",
"mixHash": "0x3d1fdd16f15aeab72e7db1013b9f034ee33641d92f71c0736beab4e67d34c7a7",
"sha3Uncles": "0x8a562e7634774d3e3a36698ac4915e37fc84a2cd0044cb84fa5d80263d2af4f6",
"logsBloom": "0x4848112002a2020aaa0812180045840210020005281600c80104264300080008000491220144461026015300100000128005018401002090a824a4150015410020140400d808440106689b29d0280b1005200007480ca950b15b010908814e01911000054202a020b05880b914642a0000300003010044044082075290283516be82504082003008c4d8d14462a8800c2990c88002a030140180036c220205201860402001014040180002006860810ec0a1100a14144148408118608200060461821802c081000042d0810104a8004510020211c088200420822a082040e10104c00d010064004c122692020c408a1aa2348020445403814002c800888208b1",
"transactionsRoot": "0xf98631e290e88f58a46b7032f025969039aa9b5696498efc76baf436fa69b262",
"difficulty": "0x12ac11391a2f3872fcd",
"gasLimit": "0x79ccd3",
"gasUsed": "0x79ccd3",
"extraData": "0x737061726b706f6f6c2d636e2d6e6f64652d3132",
"timestamp": "0x5b541449",
"totalDifficulty": "0x12ac11391a2f3872fcd",
"stateRoot": "0xf5208fffa2ba5a3f3a2f64ebd5ca3d098978bedd75f335f56b705d8715ee2305",
"transactions": [
{
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
"nonce": "0x4db7a1c01d8a8072",
"r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
"s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
"v": "0x25",
"transactionIndex": "0x1"
}
],
"uncles": [
{
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
"nonce": "0x4db7a1c01d8a8072",
"r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
"s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
"v": "0x25",
"transactionIndex": "0x1"
}
]
}
}
Returns the information of any block giving its height
Ethereum block height. Supports the param latest to get the last block of the chain. The param can be in decimal or hexadecimal format
0x1
Verbosity mode. With 2 value, transactions inside the block are returned completly, otherwise, only transactions hash will be returned
2
Example: 2
Possible values: POST /getBlockByNumber HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 33
{
"blockNumber": "0x1",
"verbose": 2
}
{
"block": {
"number": "0x1",
"hash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"parentHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"nonce": "0x4db7a1c01d8a8072",
"miner": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"size": "0x41c7",
"mixHash": "0x3d1fdd16f15aeab72e7db1013b9f034ee33641d92f71c0736beab4e67d34c7a7",
"sha3Uncles": "0x8a562e7634774d3e3a36698ac4915e37fc84a2cd0044cb84fa5d80263d2af4f6",
"logsBloom": "0x4848112002a2020aaa0812180045840210020005281600c80104264300080008000491220144461026015300100000128005018401002090a824a4150015410020140400d808440106689b29d0280b1005200007480ca950b15b010908814e01911000054202a020b05880b914642a0000300003010044044082075290283516be82504082003008c4d8d14462a8800c2990c88002a030140180036c220205201860402001014040180002006860810ec0a1100a14144148408118608200060461821802c081000042d0810104a8004510020211c088200420822a082040e10104c00d010064004c122692020c408a1aa2348020445403814002c800888208b1",
"transactionsRoot": "0xf98631e290e88f58a46b7032f025969039aa9b5696498efc76baf436fa69b262",
"difficulty": "0x12ac11391a2f3872fcd",
"gasLimit": "0x79ccd3",
"gasUsed": "0x79ccd3",
"extraData": "0x737061726b706f6f6c2d636e2d6e6f64652d3132",
"timestamp": "0x5b541449",
"totalDifficulty": "0x12ac11391a2f3872fcd",
"stateRoot": "0xf5208fffa2ba5a3f3a2f64ebd5ca3d098978bedd75f335f56b705d8715ee2305",
"transactions": [
{
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
"nonce": "0x4db7a1c01d8a8072",
"r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
"s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
"v": "0x25",
"transactionIndex": "0x1"
}
],
"uncles": [
{
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
"nonce": "0x4db7a1c01d8a8072",
"r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
"s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
"v": "0x25",
"transactionIndex": "0x1"
}
]
}
}
Returns the number of success/pending transactions of any address
Ethereum address
0x625ACaEdeF812d2842eFd2Fb0294682A868455bd
True to get pending blocks
true
POST /getAddressTransactionCount HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 71
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"pending": true
}
{
"transactionCount": 0
}
Returns the number of success/pending transactions of an array of addresses
POST /getAddressesTransactionCount HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 87
{
"addresses": [
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"pending": true
}
]
}
{
"transactionCount": "0"
}
Returns the receipt of a transaction by transaction hash
Hash of the transaction
0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f
POST /getTransactionReceipt HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"txHash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f"
}
{
"transactionHash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"transactionIndex": "0x1",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"cumulativeGasUsed": "0x79ccd3",
"gasUsed": "0x79ccd3",
"contractAddress": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"logs": {
"removed": true,
"logIndex": "0x1",
"transactionIndex": "0x1",
"transactionHash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"data": "0x000000000000000000000000398137383b3d25c92898c656696e41950e47316b00000000000000000000000000000000000000000000000000000000000cee6100000000000000000000000000000000000000000000000000000000000ac3e100000000000000000000000000000000000000000000000000000000005baf35",
"topics": [
"0x241ea03ca20251805084d27d4440371c34a0b85ff108f6bb5611248f73818b80"
]
},
"logsBloom": "0x4848112002a2020aaa0812180045840210020005281600c80104264300080008000491220144461026015300100000128005018401002090a824a4150015410020140400d808440106689b29d0280b1005200007480ca950b15b010908814e01911000054202a020b05880b914642a0000300003010044044082075290283516be82504082003008c4d8d14462a8800c2990c88002a030140180036c220205201860402001014040180002006860810ec0a1100a14144148408118608200060461821802c081000042d0810104a8004510020211c088200420822a082040e10104c00d010064004c122692020c408a1aa2348020445403814002c800888208b1"
}
Returns the transaction info given its transaction hash
Hash of the transaction
0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f
POST /getTransaction HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"txHash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f"
}
{
"transaction": {
"txHash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"fee": "7982291",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "1",
"timestamp": "1653156295",
"inputs": [
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"amount": "1000000000000000000"
}
],
"outputs": [
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"amount": "1000000000000000000"
}
],
"data": {
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
"nonce": "0x4db7a1c01d8a8072",
"r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
"s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
"v": "0x25",
"transactionIndex": "0x1"
}
}
}
Returns the transactions info of an array of transactions hash
Hash of the transaction
0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f
POST /getTransactions HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 83
{
"txHashes": [
"0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f"
]
}
{
"transactions": [
{
"txHash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"fee": "7982291",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "1",
"timestamp": "1653156295",
"inputs": [
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"amount": "1000000000000000000"
}
],
"outputs": [
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"amount": "1000000000000000000"
}
],
"data": {
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"blockHash": "0x6403b287ab8bd587cd9e07c3d2ca62269f19dfb7c195892980f14d71fefa7cdd",
"blockNumber": "0x1",
"hash": "0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f",
"input": "0x6ea056a9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bd8d7fa6f8cc00",
"nonce": "0x4db7a1c01d8a8072",
"r": "0xd1556332df97e3bd911068651cfad6f975a30381f4ff3a55df7ab3512c78b9ec",
"s": "0x66b51cbb10cd1b2a09aaff137d9f6d4255bf73cb7702b666ebd5af502ffa4410",
"v": "0x25",
"transactionIndex": "0x1"
}
}
]
}
Executes a new message call immediately without creating a transaction on the block chain
latest
Possible values: [0-9]
POST /call HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 295
{
"transaction": {
"from": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"to": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"gas": "0x79ccd3",
"gasPrice": "7982291",
"value": "0x9184e72a",
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
},
"blockNumber": "latest"
}
{
"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
}
Get transaction history of an address
Ethereum address
0x625ACaEdeF812d2842eFd2Fb0294682A868455bd
POST /getAddressHistory HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 56
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd"
}
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"txHashes": [
"0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f"
]
}
Get transaction history of an array of addresses
Ethereum address
0x625ACaEdeF812d2842eFd2Fb0294682A868455bd
POST /getAddressesHistory HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"addresses": [
"0x625ACaEdeF812d2842eFd2Fb0294682A868455bd"
]
}
[
{
"address": "0x625ACaEdeF812d2842eFd2Fb0294682A868455bd",
"txHashes": [
"0x8784d99762bccd03b2086eabccee0d77f14d05463281e121a62abfebcf0d2d5f"
]
}
]
Returns the status of the transaction indexing process.
POST /indexing HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
{
"indexing": true,
"indexingPercentage": "6.905658629231632%",
"currentBlockIndex": "1",
"latestBlockIndex": "1"
}
Last updated