Marketplace

In this page we will cover most common tasks for interacting with Marketplace.

POST /marketplace/search/items

Item NFTs search

Request Body

NameTypeDescription

page

Int

Pagination page (with 12 items per page)

filters.exp_multiplier.min

Int

Min exp multiplier

filters.exp_multiplier.max

Int

Max exp multiplier

filters.wod_multiplier.max

Int

Min wod multiplier

filters.wod_multiplier.max

Int

Max wod multiplier

filters.is_auction

Boolean

Only auctions

filters.is_sale

Boolean

Only not auctions

filters.level.min

Int

filters.level.max

Int

filters.name

String

filters.durability.min

Int

filters.price.min

Int

filters.rarity

Int[]

eg. [ 1, 2, 3, 4, 5, 6 ]. Where 1 is common and 2 is artifact

filters.slot_key

String[]

Inserting like [ "fish", "rod" ] means to include fish and rods to the response. Inserting like [ "-fish" ] will return all items except fish.

filters.durability.max

Int

filters.price.max

Int

filters.not_for_sale

Boolean

Only items that are not for sale

sort.sort_by

String

For now only by "price"

sort.sort_dir

String

"ASC" or "DESC"

POST /marketplace/search/materials

Material NFTs search

Request Body

NameTypeDescription

page

Int

Pagination page (with 12 items per page)

filters.is_auction

Boolean

Only auctions

filters.is_sale

Boolean

Only not auctions

filters.name

String

filters.price.min

Int

filters.rarity

Int[]

eg. [ 1, 2, 3, 4, 5, 6 ]. Where 1 is common and 2 is artifact

filters.price.max

Int

filters.not_for_sale

Boolean

Only items that are not for sale

sort.sort_by

String

For now only by "price"

sort.sort_dir

String

"ASC" or "DESC"

Marketplace contract details:

Address: 0x9C591CE2108f3a15Be6A17457c29FB68f6b3b69B
ABI url: https://worldofdefish-contracts-prod.fra1.digitaloceanspaces.com/Marketplace.json

For those who want to connect his own contract with Marketplace here's solidity interface:

// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

interface IMarketplace {

  struct Order {
    uint token_id;
    address seller;
    uint64 created_at;
    bool auction;
    bool exists;
    bool successful;
    bool closed;
    uint48 price;
    uint64 lifetime;
    bytes3 nft_name;
  }

  struct Bet {
    uint order_id;
    address buyer;
    uint48 price;
    bool closed;
    bool successful;
  }

  function getOrder(uint _order_id) public view returns (Order memory);

  function getOrdersCount() public view returns (uint);
  
  // _nft_name possible values: 'itm' | 'mat' | 'box' | 'zon'
  function createOrder(uint _token_id, uint _price, bytes3 _nft_name) external;

  function closeOrder(uint _order_id) external;

  function buyOrder(uint _order_id) external;

  function getBet(uint _id) public view returns (Bet memory);

  function createAuction(uint _token_id, uint _price, uint _expire_at, bytes3 _nft_name) external;

  function placeBet(uint _order_id, uint _price) external;

  function updateBet(uint _bet_id, uint _price) external;

  function closeAuction(uint _order_id) public;

  function finishAuction(uint _order_id) external;

  function closeBet(uint _bet_id) public;
  
}

Last updated