Skip to main content

Querying

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

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

Latest Key Purchase

{
keyPurchases(orderBy: timestamp, orderDirection: desc, first: 5) {
lock
purchaser
}
}

Listing Locks

{
locks {
address
name
tokenAddress
}
}

Listing Locks by Manager

{
lockManagers(
where: { address: "0x33ab07dF7f09e793dDD1E9A25b079989a557119A" }
) {
lock {
address
name
expirationDuration
creationBlock
tokenAddress
price
}
}
}