Auctions
Queries
saleAuction
saleAuction
Returns a single Sale Auction according to its id
.
saleAuction(id: ID!): Auction
saleAuctions
saleAuctions
Returns multiple Sale Auctions according to the arguments passed.
saleAuctions(
skip: Int
first: Int
orderBy: AuctionOrderBy
orderDirection: OrderDirection
where: AuctionFilter
): [Auction]!
assistingAuction
assistingAuction
Returns a single Assisting Auction according to its id
.
assistingAuction(id: ID!): Auction
assistingAuctions
assistingAuctions
Returns multiple Assisting Auctions according to the arguments passed.
assistingAuctions(
skip: Int
first: Int
orderBy: AuctionOrderBy
orderDirection: OrderDirection
where: AuctionFilter
): [Auction]!
petAuction
petAuction
Returns a single Pet Auction according to its id
.
petAuction(id: ID!): PetAuction
petAuctions
petAuctions
Returns multiple Pet Auctions according to the arguments passed.
petAuctions(
skip: Int
first: Int
orderBy: AuctionOrderBy
orderDirection: OrderDirection
where: AuctionFilter
): [PetAuction]!
Object Types
Auction
Auction
The Auction
object type contains the following fields:
Basic Information
id
:ID
- the Auction ID. Crystalvale IDs are padded by10000000000000
(ten trillion), and Serendale (Klaytn) IDs are padded by20000000000000
(twenty trillion).seller
:Profile
- theProfile
of the Auction sellertokenId
:Hero
- theHero
being Sold/Rented
The tokenId
field will return current values for the Hero, not its historical values at the time of the Auction.
startingPrice
:String
- the price set at the start of the Auction in weiendingPrice
:String
- the price at the end of the Auction in weiduration
:Int
- the duration of the Auction in seconds; not currently in usestartedAt
:Int
- the Unix timestamp of the Auction startwinner
:Profile
- theProfile
of the Auction winner; will be pre-filled for Private Auctions, even whenopen
endedAt
:Int
- the Unix timestamp of the Auction endopen
:Boolean
- whether the Auction is open or notpurchasePrice
:String
- the price paid by thewinner
in wei
PetAuction
PetAuction
The PetAuction
object type contains the following fields:
Basic Information
id
:ID
- the Auction IDseller
:Profile
- theProfile
of the Auction sellertokenId
:Pet
- thePet
being SoldstartingPrice
:String
- the price set at the start of the Auction in weiendingPrice
:String
- the price at the end of the Auction in weiduration
:Int
- the duration of the Auction in seconds; not currently in usestartedAt
:Int
- the Unix timestamp of the Auction startwinner
:Profile
- theProfile
of the Auction winner; will be pre-filled for Private Auctions, even whenopen
endedAt
:Int
- the Unix timestamp of the Auction endopen
:Boolean
- whether the Auction is open or notpurchasePrice
:String
- the price paid by thewinner
in wei
Examples
Example 1
The first 100 open, non-private Sale Auctions sorted by lowest priced Hero:
{
saleAuctions(first: 100, orderBy: startingPrice, orderDirection: asc, where: {endedAt: null, winner: null}) {
id
startingPrice
open
tokenId {
id
mainClass
}
seller {
name
}
}
}
Example 2
The five most expensive Pet sales that were successfully completed:
{
petAuctions(first: 5, orderBy: purchasePrice, orderDirection: desc, where: {purchasePrice_not: null}) {
id
tokenId {
id
}
purchasePrice
winner {
name
}
}
}
Example 3
The entire Sale history (successful or not) of an individual Hero:
{
saleAuctions(where: {tokenId: 420}) {
id
startingPrice
purchasePrice
endedAt
seller {
name
}
winner {
name
}
}
}
Example 4
All successful Rentals (Assisting Auctions) purchased by an individual player:
{
assistingAuctions(where: {winner: "0x2E7669F61eA77F02445A015FBdcFe2DE47083E02"}) {
id
purchasePrice
endedAt
tokenId {
id
}
seller {
name
}
}
}
Last updated