Hi there,
I’m trying to get the token balance of a wallet on Ethereum > BSC. Unfortunately I cannot get a current balance, let alone a historic balance. Is this supported?
query MyQuery {
ethereum(network: bsc) {
address(address: {is: "0xbb19039871ed8bd20a0321555c46aae436f2de30"}) {
address
balances(
currency: {is: "0x2eba09fb8063aedba27424de9bf0dcb41567a943"}
height: {gteq: 9935446}
) {
currency {
name
address
}
}
balance
}
}
}
Balance result is 0, even though you can see this guy has some of that token;
Safu Token (SAFU) Token Tracker on BscScan shows the price of the Token $0.00, total supply 1,000,000,000,000,000, number of holders 4 and updated information of the token. The token tracker page also shows the analytics and historical data.
Thanks
sayon
August 17, 2021, 11:21am
2
The balance shown in the link (shown in the screenshot below)
comes when the GraphQL query is as follows
query MyQuery {
ethereum(network: bsc) {
address(address: {is: "0xbb19039871ed8bd20a0321555c46aae436f2de30"}) {
balances(
currency: {is: "0x7f3765b3f9095554fc5d10c3ef60e20d7c6840d5"}
height: {gteq: 9935446}
) {
value
currency {
name
symbol
address
}
}
}
}
}
The output/result of the above query is as follows
{
"ethereum": {
"address": [
{
"balances": [
{
"value": 474999999999999.94,
"currency": {
"name": "Safu Token",
"symbol": "SAFU",
"address": "0x7f3765b3f9095554fc5d10c3ef60e20d7c6840d5"
}
}
]
}
]
}
}
Ah, thanks @sayon . I had the wrong token address! duh