Search…
Queries
The subgraph can be queried to retrieve important information about MasterChef, pools, pool histories, users, and more. This page will provide examples for common queries.
To try these queries and run your own visit the MasterChef subgraph sandbox.
MasterChef
All time Swipe rewards, total rewards in USD, all time pool count.
1
{
2
masterChef(id: "0x267748fe0db99863e1d5448ef5b9442230c24789") {
3
id
4
bonusMultiplier
5
bonusEndBlock
6
swipe
7
swipePerBlock
8
totalAllocPoint
9
poolCount
10
}
11
}
Copied!
Pool
Current Pool balance, all time swipe harvested, harvested Swipe in USD
1
{
2
pool(id: 2) {
3
id
4
pair
5
balance
6
entryUSD
7
exitUSD
8
swipeHarvested
9
swipeHarvestedUSD
10
block
11
slpBalance
12
slpAge
13
slpAgeRemoved
14
slpDeposited
15
slpWithdrawn
16
userCount
17
}
18
}
19
Copied!
Pool History
Snapshot of a pool state at every block generation time
1
{
2
poolHistory(id: "118682") {
3
id
4
entryUSD
5
exitUSD
6
swipeHarvested
7
swipeHarvestedUSD
8
block
9
slpBalance
10
slpAge
11
slpAgeRemoved
12
slpDeposited
13
slpWithdrawn
14
userCount
15
block
16
}
17
}
18
Copied!
History
Snapshot of the whole MasterChef pools at every event generation time
1
{
2
history(id: "0x267748fe0db99863e1d5448ef5b9442230c2478918682") {
3
id
4
block
5
slpBalance
6
slpAge
7
slpAgeRemoved
8
slpDeposited
9
slpWithdrawn
10
block
11
}
12
}
Copied!
User
User reward status in each pools
1
{
2
users(where: { address: "0x1d85ddeb7f73c33802d4e2545ee65a579781e0b6" }) {
3
id
4
address
5
amount
6
rewardDebt
7
entryUSD
8
exitUSD
9
swipeHarvested
10
swipeHarvestedUSD
11
}
12
}
Copied!
Last modified 7mo ago
Copy link