Docs
NFT Trading SDK
Sui SDK
Reference

Reference

buyListings

Buy/sweep listings from any marketplace.

const transaction = await suiTradingClient.buyListings({
  listingIds: [listing1.id, listing2.id],
  walletAddress: connectedWalletId
})
 
await signAndSendTransaction({ transaction })
  • Pass in one or multiple NFTs

  • listing1.id, listing2.id: The uuids of listings you want to buy, coming from the NFT Data API listings entity

listNfts

List NFTs for sale. If the NFT is already listed, it will relist it.

const tx = await suiTradingClient.listNfts({
  nfts: [
    {
      id: nft.id,
      listPriceInMist: 50000000000
    },
  ],
  walletAddress: connectedWalletId
})
 
await signAndSendTransaction({ transaction })
  • Pass in one or multiple NFTs

  • nft.id: The uuid of a NFT you want to list, coming from the NFT Data API nfts entity

  • listPrice: The list price in Sui

unlistListings

Unlist listings

const tx = await suiTradingClient.unlistListings({
  listingIds: [listing.id],
  walletAddress: connectedWalletId
})
 
await signAndSendTransaction({ transaction })
  • Pass in one or multiple listing ids

  • listing.id: The uuid of a listing you want to unlist, coming from the NFT Data API listings entity

placeNftBids

Place bids on individual NFTs

const transaction = await suiTradingClient.placeNftBids({
  nfts: [
		{ 
			id: nft.id, 
			bidAmountInMist: 10000000000
		}
	],
  walletAddress: connectedWalletId
})
await signAndSendTransaction({ transaction })
  • Place bids on one or multiple NFTs

  • nft.id: The uuid of a NFT you want to place a bid on, coming from the NFT Data API nfts entity

  • bidAmount: The bid amount in Sui

removeNftBids

Remove bids from individual NFTs

const transaction = await suiTradingClient.removeNftBids({ bidIds: [bid.id] })
 
await signAndSendTransaction({ transaction })
  • Remove bids from one or multiple NFTs

  • bid.id: The uuid of a bid you want to remove, coming from the NFT Data API bids entity where bid.type === "solo"

acceptNftBids

Accept bids on individual NFTs

const transaction = await suiTradingClient.acceptNftBids({ bidIds: [bid.id] })
 
await signAndSendTransaction({ transaction })
  • Accept one or multiple bids

  • bid.id: The uuid of a bid you want to accept, coming from the NFT Data API bids entity where bid.type === "solo"

placeCollectionBid

Place a bid on a collection

const transaction = await suiTradingClient.placeCollectionBid({
  collectionId: collection.id,
  bidAmountInMist: 10000000000,
  numOfBids: 2,
  walletAddress: connectedWalletId
})
 
await signAndSendTransaction({ transaction })
  • collection.id: The uuid of a collection you want to place a bid on, coming from the NFT Data API collections entity

  • bidAmount: The bid amount in Sui

  • numOfBids: The number of bids at the bidAmount price you want to create in the same transaction

removeCollectionBid

Remove a collection bid

const transaction = await suiTradingClient.removeCollectionBid({ bidId: bid?.id })
 
await signAndSendTransaction({ transaction })

bid.id: The uuid of a collection bid you want to remove, coming from the NFT Data API bids entity where bid.type === "collection"

acceptCollectionBid

Accept a collection bid (Instant Sell)

const transaction = await suiTradingClient.acceptCollectionBid({
  bidId: bid.id,
  nftId: nft.id,
  walletAddress: connectedWalletId
})
 
await signAndSendTransaction({ transaction })
  • bid.id: The uuid of a collection bid you want to accept, coming from the NFT Data API bids entity where bid.type === "collection"

  • nftId: The NFT you are accepting the bid with

transferNfts

Transfer NFTs to a specified recipient wallet address

const transaction = await suiTradingClient.transferNfts({
  nftIds: [nft1.id, nft2.id],
  recipientAddress: recipientWalletAddress,
  walletAddress: connectedWalletId
})
 
await signAndSendTransaction({ transaction })
  • Transfer one or multiple NFTs

  • nft1.id and nft2.id: The uuids from NFTs you want to transfer, coming from the NFT Data API nfts entity

claimNfts

Claim NFTs that are claimable.

NFTs are claimable if the nft.claimable === true, and it means that either the NFT is under a “Trade Hold” *, is a NFT inside a kiosk that has been transferred to you, or an NFT has been transferred to you from an accepted collection bid.

const payload = await suiTradingClient.claimNfts({
  nftIds: [nft1.id, nft2.id],
  walletAddress: connectedWalletId
})
 
await signAndSendTransaction({ transaction })
  • Claim one or multiple NFTs

  • nft1.id and nft2.id: The uuids from NFTs you want to claim, coming from the NFT Data API nfts entity, where nft.claimable === true.

* “Trade Hold” Occurs in Origin Byte NFTs where the NFT was listed at a price lower than a current collection offer, which gets automatically accepted by the Origin Byte smart contract.