NoFace
September 10, 2023, 10:36am
1
I saw this Token Holders API | Streaming API (V2 API Docs)
its similar to what I need, I need to specify a range and get the token holders by the hour or day in that range.
I need to return the address and balance of each, making sure the data is organized by the range (assuming a holder can hold different positions at different times)
TY
Divya
September 12, 2023, 3:42pm
2
It’s the same query modified with date
range… Here’s an example (with date as sorting field)
query MyQuery {
EVM(dataset: combined, network: eth) {
BalanceUpdates(
orderBy: {descending: Block_Date}
limit: {count: 30}
where: {Currency: {SmartContract: {is: "0x5Af0D9827E0c53E4799BB226655A1de152A425a5"}}, Block: {Date: {after: "2023-02-01", before: "2023-02-05"}}}
) {
BalanceUpdate {
Address
}
Balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
Block {
Date
}
}
}
}
NoFace
September 17, 2023, 1:22pm
3
it doesnt work, cant run gives a silent error
NoFace
September 17, 2023, 1:28pm
4
works now changed the endpoint
NoFace
September 17, 2023, 1:37pm
5
would this work? is this retrieving all the wallets and their balances, on an hourly for that day?
query MyQuery {
EVM(dataset: combined, network: eth) {
BalanceUpdates(
orderBy: {descending: Block_Date}
limit: {count: 30}
where: {Currency: {SmartContract: {is: “0x5579699a6e1da7d924d3bfde38a427be5fc93812”}}, Block: {Date: {is: “2023-09-16”}}}
) {
BalanceUpdate {
Address
}
Balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: “0”})
Block {
Date(interval: {})
Time(interval: {count: 24})
}
}
}
}
NoFace
September 17, 2023, 5:41pm
6
Im afraid this only gives balanceupdates, what if I want a spanshot of balances?