/getbalance
Get the balance or number of WETH in the requested public address. Currently available on Ethereum, Binance Smart Chain, Avalanche, Polygon, Cronos, Arbitrum, Fantom, Optimism, Base, and zkSync.
GET
https://api.expand.network/weth/getbalance
Query Parameters
Remote procedural call URL
The public address to get the balance of.
Sample Request Sample Response
Copy https://api.expand.network/weth/getbalance/?address=0x6Fb447Ae94F5180254D436A693907a1f57696900
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"balance" : "25690185796757697"
}
}
/historical/logs
Retrieves all the logs for WETH events specified in query in the given block range.
GET
https://api.expand.network/weth/historical/logs
Query Parameters
Starting block of the range.
by default latestBlock -100
Last block of the range.
by default its latestBlock
Sample Request Sample Response
Copy https://api.expand.network/weth/historical/logs?type=Deposit
Copy {
"status" : 200 ,
"msg" : "success" ,
"data" : {
"logs" : [
{
"address" : "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" ,
"topics" : [
"0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c" ,
"0x0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d"
] ,
"params" : {
"dst" : "0x7a250d5630b4cf539739df2c5dacb4c659f2488d" ,
"wad" : "100000000000000000"
} ,
"data" : "0x000000000000000000000000000000000000000000000000016345785d8a0000" ,
"blockNumber" : "17320569" ,
"blockHash" : "0xcbc13d3439e115dcb6203a45d82da137b7f546286224f29248192a7e428e29d6" ,
"timeStamp" : "1684828271" ,
"gasPrice" : "101893509354" ,
"gasUsed" : "142805" ,
"logIndex" : "0" ,
"transactionHash" : "0xa36d80f70960af4a7f67145670e589795edd3fda2c3334eb7c6fce962f06d99e" ,
"transactionIndex" : "4"
}
]
}
}
Last updated 18 hours ago