Links

eth_transfers

Get the history of transmission events for any address without scanning the entire chain.
Through eth_transfers, you can fetch all the transfer events. If you specify the account address and block number, the API will return all the transfer events of the account address at the block number you enter. If you only specify the account address but not the block number, the API will return all the latest transfer events for the account address.
Supported on Ethereum.

Parameters

Object - An object with the following fields (required):
  • accountAddress(hex string, optional) - the account address to filter for.
  • fromAddress(hex string, optional) - the sending address in the transaction.
  • toAddress(hex string, optional) - the receiving address in the transaction.
  • fromBlockNumber(integer number, optional) - the starting time range you want to fetch events over.
  • toBlockNumber(integer number, optional) - the ending time range you want to fetch events over.
  • txHash(hex string, optional) - the hash code for the transaction.
  • pageSize(integer number, optional, default 100) - max number of results to return per call.
  • pageIndex(integer number, optional, default 1) - page index.

Returns

Object - An object with the following fields:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(object) - an object with the following fields:
    • nextPageIndex(integer number) - next page (if exists, else blank).
    • total(integer number) - total of the response data count.
    • data(array of object, defined below) - response data, sorted in ascending order by block number.
  • Object schema:
    • blockNumber(integer number) - the block that the transaction was included in.
    • txHash(hex string) - the hash code for the transaction.
    • from(hex string) - from address of transfer.
    • to(hex string) - to address of transfer.
    • value(string) - transfer value (the unit is wei).
    • etherValue(string) - transfer value (the unit is ether).

Example

Request

curl
TypeScript
curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_transfers",
"params": {
"fromAddress":"0x9746c7e1ef2bd21ff3997fa467593a89cb852bd0",
"toAddress": "0xb0bf4a71f730782368ef660fe6d298f432f95450",
"pageSize": 3,
"pageIndex": 1
}
}'
import { BlockVisionProvider, BvNetwork } from 'blockvision.js'
// Optional parameters, but default to eth-mainnet and default api-key.
const bv = new BlockVisionProvider(BvNetwork.ETH_MAINNET)
// Access the BlockVision FT API
bv.getEthTransfers({}).then(console.log)

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"txHash": "0xbfdc56ead796f9bde17eb85c86e0146869acb00dab3a86a9fda9ffebbe00bc85",
"blockNumber": 715405,
"from": "0x9746c7e1ef2bd21FF3997fa467593a89cb852BD0",
"to": "0xB0bF4A71F730782368Ef660FE6D298F432F95450",
"value": "64800000000000000000",
"etherValue": "64.8"
},
{
"txHash": "0xcb1da6c8ee2ca9eb5d817983f186b6d0a3599218b298737ac07d64a1630d1323",
"blockNumber": 712110,
"from": "0x9746c7e1ef2bd21FF3997fa467593a89cb852BD0",
"to": "0xB0bF4A71F730782368Ef660FE6D298F432F95450",
"value": "95500000000000000000",
"etherValue": "95.5"
},
{
"txHash": "0x3a37d75f57b03fc021263f18695bba806f02ccde2ae703a3f10f716e0bc4201e",
"blockNumber": 708805,
"from": "0x9746c7e1ef2bd21FF3997fa467593a89cb852BD0",
"to": "0xB0bF4A71F730782368Ef660FE6D298F432F95450",
"value": "159000000000000000000",
"etherValue": "159"
},
{
"txHash": "0xa8cc5ed8a113db8c826865a5ebddbace99c39ba25da6bdeec98893d1d1f5d299",
"blockNumber": 705017,
"from": "0x9746c7e1ef2bd21FF3997fa467593a89cb852BD0",
"to": "0xB0bF4A71F730782368Ef660FE6D298F432F95450",
"value": "60000000000000000000",
"etherValue": "60"
}
],
"nextPageIndex": 2,
"total": 109
}
}