Create an NFT marketplace

2 credits per API call

Deploy an NFT marketplace smart contract on the blockchain. With a deployed marketplace smart contract, you and your customers can create new listings for assets such as non-fungible tokens and combinations of token types as described by the ERC-721 and ERC-1155 standards on the Ethereum blockchain or by the equivalent standards on the other blockchains. As the marketplace operator, you can set a fee as a percentage of the asset price that will be paid on top of the asset price.

The purchase process looks like the following:

  1. The seller creates a listing for an asset on the NFT marketplace. The listing can be offered for the native blockchain assets (for example, ETH, BSC, and so on) or for the fungible tokens of the blockchain.
  2. The seller allows the marketplace smart contract to transfer the asset that they are selling.
  3. A buyer buys the asset.
    • If the buyer wants to pay with the native blockchain assets, they make the purchase (the buyAssetFromListing() method is called against the marketplace smart contract) and send the required amount of the native assets to the marketplace smart contract.
    • If the buyer wants to pay with the fungible tokens:
      1. The buyer allows the marketplace smart contract to access their tokens and makes the purchase (the buyAssetFromListing() method is called against the marketplace smart contract).
      2. The marketplace smart contract deducts the required amount of tokens from the smart contract where the buyer holds the tokens.
  4. The marketplace smart contract transfers the asset to the buyer, transfers the asset price to the seller, and sends the fee to the marketplace fee recipient.

This API is supported for the following blockchains:

  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • Polygon
  • Solana (in alpha)

Signing a transaction
When deploying an NFT marketplace smart contract, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.

Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.

For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.

Language
Authorization
Header
Click Try It! to start a request and see the response here!