APIAuction
Create New Auction Round
Create and configure new auction rounds with admin privileges
Create Auction Round
Initialize new auction rounds with custom parameters and avatar rewards
🔐
Admin Access Required
This mutation is accessible only to users with ADMIN privileges
Mutation
✨
createAuction
Create a new auction round with specified attributes
Schema
createAuction(
round: Int!
startedAt: Float!
duration: Float!
totalToken: Float!
minPrice: Float!
avatar: [AvatarSetInput]
token: Float
): AuctionParameters
roundRequiredType:
Int!Auction round number (unique value). Backend validates uniqueness.
startedAtRequiredType:
Float!Start time in milliseconds (Unix timestamp)
durationRequiredType:
Float!Duration of the round in milliseconds
totalTokenRequiredType:
Float!Total number of tokens assigned to this round
minPriceRequiredType:
Float!Minimum price per token in this round
avatarOptionalType:
[AvatarSetInput]List of avatar components included in the auction
tokenOptionalType:
FloatExtra tokens allocated for avatar matching users
Return Value
📦
Returns Auction Object
The mutation returns the newly created Auction object if successful
Example
💻
Usage Example
Creating a new 24-hour auction round
mutation {
createAuction(
round: 1
startedAt: 1625247600000.0
duration: 86400000.0 # 24 hours in milliseconds
totalToken: 1000.0
minPrice: 0.1
avatar: [
{ groupId: "heroes", compId: 201 }
{ groupId: "villains", compId: 301 }
]
token: 500.0
) {
id
round
startedAt
duration
totalToken
minPrice
avatar {
groupId
compId
}
token
status
}
}Status Logic
🚦
Automatic Status Assignment
Status is automatically set based on round conditions
1
No Existing Rounds
If there are no existing rounds, status is set to COUNTDOWN. When countdown reaches 0, round starts automatically.
2
Previous Round Started
If previous round status is STARTED, new round gets COUNTDOWN status.
3
All Other Cases
For all other scenarios, status is set to PENDING.
📝
Important Note
Round numbers must be unique. Backend validates this constraint automatically.