Skip to main content

core.classes.marketplace_auction

MarketplaceAuction Objects

class MarketplaceAuction(BaseContract[Marketplace])

get_listing

def get_listing(listing_id: int) -> AuctionListing

Get an auction listing from the marketplace by ID

Arguments:

  • listing_id: The ID of the listing to get

Returns:

The auction listing

get_winning_bid

def get_winning_bid(listing_id: int) -> Optional[Offer]

Get the winning bid on an auction listing

Arguments:

  • listing_id: The ID of the listing to get the winning bid for

Returns:

The winning bid

get_winner

def get_winner(listing_id) -> str

Get the winner of an auction that has already ended.

Arguments:

  • listing_id: The ID of the listing to get the winner for

Returns:

The winning bidder

create_listing

def create_listing(listing: NewAuctionListing) -> int

Create a new auction listing

Arguments:

  • listing: The listing to create

Returns:

The ID of the listing

buyout_listing

def buyout_listing(listing_id: int) -> TxReceipt

Buyout an auction listing

Arguments:

  • listing_id: The ID of the listing to buyout

Returns:

The transaction receipt

make_bid

def make_bid(listing_id: int, price_per_token: Price) -> TxReceipt

Make a bid on an auction listing

Arguments:

  • listing_id: The ID of the listing to bid on
  • price_per_token: The price per token to bid

Returns:

The transaction receipt

cancel_listing

def cancel_listing(listing_id: int) -> TxReceipt

Cancel an auction listing

Arguments:

  • listing_id: The ID of the listing to cancel

Returns:

The transaction receipt

update_listing

def update_listing(listing: AuctionListing) -> TxReceipt

Update a listing on the marketplace

Arguments:

  • listing: The listing to update

Returns:

The transaction receipt