Auctions #

Read more about the Auctions system in Hiro here.

Creating a New Auction #

To create a new auction, use the auctionsCreate function.

1
2
3
4
5
6
7
8
9
var request = Hiro.AuctionCreateRequest.new()
request.templateId = "template_auction_001";
request.conditionId = "condition_001";
request.instanceIds = {
    "item_instance_001": "1"
};

var auction = await hiro.auctionsCreate(session, request)
print(auction)

Placing a Bid on an Auction #

You can place a bid on an auction using the auctionsBid function.

1
2
3
4
5
6
7
8
9
var request = Hiro.AuctionBidRequest.new()
request.id = "auction_instance_123";
request.version = "1.0";
request.instanceIds = {
    "gold": "1000"
};

var auction = await hiro.auctionsBid(session, request)
print(auction)

Canceling an Auction #

If an auction needs to be canceled before it ends, the auctionsCancel method can be used.

1
2
3
4
5
var request = Hiro.AuctionsCancelRequest.new()
request.id = "auction_instance_123";

var auctionCancel = await hiro.auctionsCancel(session, request)
print(auctionCancel)

Claiming a Winning Bid #

Once an auction has ended, the winning bidder can claim their item using auctionsClaimBid.

1
2
3
4
5
var request = Hiro.AuctionClaimBidRequest.new()
request.id = "auction_instance_123";

var auctionClaimBid = await hiro.auctionsClaimBid(session, request)
print(auctionClaimBid)

Listing Available Auctions #

You can list the currently available auctions using the auctionsList function.

1
2
3
4
var request = Hiro.AuctionListRequest.new()

var auctionList = await hiro.auctionsList(session, request)
print(auctionList)