Auctions
Hiro Auctions provides an open marketplace for users to trade items through competitive bidding within a set time frame. The system ensures fair participation by validating a user’s ability to afford bids, and guarantees reliable exchanges between the highest bidder and the seller at the end of each listing.
Auctions can also be used for direct trades by restricting a listing to specific players. You can limit who is allowed to bid on a listing, let bidders pay with inventory items in addition to currency. You can also configure an ‘immediate buyout’ auction that settles the moment a bidder meets the asking price.
An auction listing is essentially an item for sale with a series of bids. Key elements include:
- The end time of the listing.
- The current highest bid or starting bid.
- The minimum required bid for the next participant.
Listings can only be created for items in the seller’s Hiro Inventory.
Lifecycle #
Each auction progresses through a simple, linear process:
- Creating a Listing: The seller chooses an item from their inventory, and it is removed from their possession until the auction concludes. The seller can optionally restrict the listing to a set of allowed players, for example a guild, a friends list, or a single player.
- Bidding: Other users bid with currency, items, or both. Currency and items are escrowed at placement to guarantee the bidder can honor the bid at both placement and auction close. Users cannot bid on their own listings or on those where they are the current highest bidder. Bidders that are outbid get their currency and items back immediately, no waiting until the end of the auction.
- End of Auction: The listing concludes, and both the seller and winning bidder are notified to claim their rewards.
- The seller collects the winning bid amount in currency and items (minus fees).
- The bidder receives the item.
For a fixed-price listing configured with immediate_buyout, the auction settles inline as soon as a bidder meets the asking price exactly. The bidder receives the item immediately, and the seller claims the bid amount through the normal claim flow.
Restrict a listing to specific players #
By default an auction is public and any eligible player can find and bid on it. To restrict a listing, pass a list of allowed player IDs when creating it. Only those players can see, follow, and bid on the auction. Bids and follows from anyone not on the list are rejected. This supports a range of private auctions: a guild or team sale, a friends-only listing, or a one-to-one trade offered to a single player.
The allowed players are set per listing at creation time, not in the auction template, so the same auction configuration can back both public and restricted listings.
Restricting a listing controls who can access it, not how they learn about it. Notifying a targeted player is up to your game, for example through your own messaging or a Hiro notification. The targeted player can also discover the auctions directed at them at any time by calling the list auctions API with the allowed_only filter set to true, described in the next section.
Separate public and restricted listings #
Listing queries are scoped to the requesting player and are disjoint by intent:
- A standard listing query returns only public auctions.
- A directed query returns only auctions where the requesting player is on the allowed players list.
This lets a client show a player the public marketplace and the restricted auctions they’ve been invited to as two separate views, without leaking restricted listings to players who weren’t invited.
Bid with items #
Bidders can offer items from their inventory alongside or instead of currency. Item bids follow the same escrow guarantees as currency:
- Items are escrowed from the bidder’s inventory when the bid is placed.
- Items are returned to the bidder if they are outbid. If the previous bidder’s account was deleted before the refund, the items are forfeited.
- Items transfer to the seller when the auction is won.
Item requirements are counted by unit, not by item instance. A required count of three is satisfied by a single stack of three, or by three separate instances. The bid must match the required item counts exactly: supplying the wrong quantity or extra instances is rejected. When the seller claims a won auction, the escrowed items are returned in the claim result so the game can grant them.
The item requirement is fixed for the lifetime of the listing and does not change between bids. Competitors raise the currency portion of their bid, while the required items stay constant. Bid increments apply to currencies only.
Fixed-price auctions with instant buyout #
Set immediate_buyout on an auction condition to create a fixed-price listing. When a bidder submits a bid that matches the required amount exactly, in currency and/or items, the auction completes immediately instead of running to its end time. The bidder receives the item straight away, and the seller claims the bid amount through the normal claim flow. A bid that over-pays the asking amount is rejected, so bidders must match the price exactly.
Combined with an allowed players list, immediate_buyout gives you a fixed-price private sale: a restricted listing that settles the moment an invited player meets the price. Restrict it to a single player for a one-to-one trade, or to a group for a first-come fixed-price offer.
Customization Parameters: #
The following JSON represents the customization parameters you can use to configure the default user experience for the Auctions system.
| |
The JSON schema defines an auctions object which must contain an individual object for each auction you wish to define in the system. You can configure as few or as many auction types as needed for your desired gameplay.
| Property | Type | Description |
|---|---|---|
auctions | string:Auction | A map of all auctions. |
Each individual auction is keyed by name and may define the following:
Auction #
| Property | Type | Description |
|---|---|---|
items | []string | The list of items that are allowed to be sold in this type of auction. |
item_sets | []string | The list of item sets that are allowed to be sold in this type of auction. |
conditions | string:AuctionCondition | A set of configuration variants for the auction. |
Auction Condition #
| Property | Type | Description |
|---|---|---|
duration_sec | int64 | The duration of the auction. |
listing_cost | AuctionConditionCost | The cost to creating a listing. |
bid_start | AuctionConditionBid | The minimum amount of currency and/or items that is required to bid on a listing. |
immediate_buyout | bool | If true, the auction completes immediately when a bid exactly matches the required bid amount in currencies and/or items. Used for fixed-price direct trades. A bid that over-pays the required amount is rejected. |
bid_increment | AuctionConditionBidIncrement | The minimum difference between the current bid and the next bid amount, expressed as either a flat amount or a percentage based on current bid. If both a flat value and percentage are specified, both must be satisfied by any new bid for it to be allowed. |
extension_threshold_sec | int64 | If a bid is placed within this number of seconds from the listing ending, the listing is extended. |
extension_sec | int64 | The number of seconds to extend the listing by. This time is added to the original listing end time, not based on the time the bid was placed. |
extension_max_sec | int64 | The maximum number of seconds that the original listing end time can be extended by. |
fee | AuctionConditionFee | A flat and/or percentage-based fee paid by the seller when collecting the winning bid amount. If both a flat fee as well as a percentage are specified, the fee will be the minimum amount that satisfies both conditions. The successful bidder does not pay an additional fee when claiming their item at the end of the listing. |
Auction Condition Cost #
| Property | Type | Description |
|---|---|---|
currencies | string:int64 | A map of currency IDs and quantities to be paid. |
energies | string:int64 | A map of energy IDs and quantities to be paid. |
items | string:int64 | A map of item IDs and quantities to be paid. |
Auction Condition Bid #
| Property | Type | Description |
|---|---|---|
currencies | string:int64 | A map of currency IDs and quantities to be paid. |
item_counts | string:int64 | A map of item IDs and quantities the bidder must include in the bid. Items can be stackable or not: the bid is validated by total unit quantity, not by number of item instances, so a required count of N is met either by a single stackable instance of count N or by N separate instances. Item bids are escrowed when the bid is placed, refunded if the bidder is outbid, and transferred to the seller when the auction is won. |
Auction Condition Bid Increment #
| Property | Type | Description |
|---|---|---|
percentage | float64 | The minimum percentage increase of currencies required above the previous bid amount for a new bid to be allowed. Expressed as a fraction, e.g. 0.1 = 10%, 0.5 = 50%, 1.25 = 125% |
fixed | AuctionConditionBid | The minimum amount of currency required above the previous bid amount for a new bid to be allowed. Increments apply to currencies only. Item counts are fixed at listing time and are not incremented between bids. |
Auction Condition Fee #
| Property | Type | Description |
|---|---|---|
percentage | float64 | The percentage of the winning bid required to claim the winning bid. |
fixed | AuctionConditionBid | The flat amount of currency required to claim the winning bid. |
