Skip to main content

Queries

Sample Queries

Below are some sample queries you can use to gather information from the Audius contracts.

You can build your own queries using a GraphQL Explorer and enter your endpoint to limit the data to exactly what you need.


User

Description: Get users balance of claimable stake and delegation information.

{
user(id: "0x8c860adb28ca8a33db5571536bfcf7d6522181e5") {
balance
totalClaimableAmount
claimableStakeAmount
claimableDelegationSentAmount
claimableDelegationReceivedAmount
stakeAmount
delegationSentAmount
delegationReceivedAmount
deployerCut
delegateTo(orderBy: claimableAmount, orderDirection: desc) {
amount
claimableAmount
toUser {
id
}
}
delegateFrom(orderBy: claimableAmount, orderDirection: desc) {
amount
claimableAmount
fromUser {
id
}
}
}
}

Audius Network

Description: Find minimum stake and maximum on delegation

{
audiusNetworks(first: 5) {
id
audiusTokenAddress
claimsManagerAddress
delegateManagerAddress
}
serviceTypes(first: 5) {
id
isValid
minStake
maxStake
}
}