Reference
buyListings
Buy/sweep listings from any marketplace.
const transactionBlock = await suiTradingClient.buyListings({
listingIds: [listing1.id, listing2.id],
walletAddress: connectedWalletId
})
await signAndSendTransaction({ transactionBlock })
-
Pass in one or multiple NFTs
-
listing1.id
,listing2.id
: The uuids of listings you want to buy, coming from the NFT Data APIlistings
entity
listNfts
List NFTs for sale. If the NFT is already listed, it will relist it.
const txBlock = await suiTradingClient.listNfts({
nfts: [
{
id: nft.id,
listPriceInMist: 50000000000
},
],
walletAddress: connectedWalletId
})
await signAndSendTransaction({ transactionBlock })
-
Pass in one or multiple NFTs
-
nft.id
: The uuid of a NFT you want to list, coming from the NFT Data APInfts
entity -
listPrice
: The list price in Sui
unlistListings
Unlist listings
const txBlock = await suiTradingClient.unlistListings({
listingIds: [listing.id],
walletAddress: connectedWalletId
})
await signAndSendTransaction({ transactionBlock })
-
Pass in one or multiple listing ids
-
listing.id
: The uuid of a listing you want to unlist, coming from the NFT Data APIlistings
entity
placeNftBids
Place bids on individual NFTs
const transactionBlock = await suiTradingClient.placeNftBids({
nfts: [
{
id: nft.id,
bidAmountInMist: 10000000000
}
],
walletAddress: connectedWalletId
})
await signAndSendTransaction({ transactionBlock })
-
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 APInfts
entity -
bidAmount
: The bid amount in Sui
removeNftBids
Remove bids from individual NFTs
const transactionBlock = await suiTradingClient.removeNftBids({ bidIds: [bid.id] })
await signAndSendTransaction({ transactionBlock })
-
Remove bids from one or multiple NFTs
-
bid.id
: The uuid of a bid you want to remove, coming from the NFT Data APIbids
entity wherebid.type === "solo"
acceptNftBids
Accept bids on individual NFTs
const transactionBlock = await suiTradingClient.acceptNftBids({ bidIds: [bid.id] })
await signAndSendTransaction({ transactionBlock })
-
Accept one or multiple bids
-
bid.id
: The uuid of a bid you want to accept, coming from the NFT Data APIbids
entity wherebid.type === "solo"
placeCollectionBid
Place a bid on a collection
const transactionBlock = await suiTradingClient.placeCollectionBid({
collectionId: collection.id,
bidAmountInMist: 10000000000,
numOfBids: 2,
walletAddress: connectedWalletId
})
await signAndSendTransaction({ transactionBlock })
-
collection.id
: The uuid of a collection you want to place a bid on, coming from the NFT Data APIcollections
entity -
bidAmount
: The bid amount in Sui -
numOfBids
: The number of bids at thebidAmount
price you want to create in the same transaction
removeCollectionBid
Remove a collection bid
const transactionBlock = await suiTradingClient.removeCollectionBid({ bidId: bid?.id })
await signAndSendTransaction({ transactionBlock })
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 transactionBlock = await suiTradingClient.acceptCollectionBid({
bidId: bid.id,
nftId: nft.id,
walletAddress: connectedWalletId
})
await signAndSendTransaction({ transactionBlock })
-
bid.id
: The uuid of a collection bid you want to accept, coming from the NFT Data APIbids
entity wherebid.type === "collection"
-
nftId
: The NFT you are accepting the bid with
transferNfts
Transfer NFTs to a specified recipient wallet address
const transactionBlock = await suiTradingClient.transferNfts({
nftIds: [nft1.id, nft2.id],
recipientAddress: recipientWalletAddress,
walletAddress: connectedWalletId
})
await signAndSendTransaction({ transactionBlock })
-
Transfer one or multiple NFTs
-
nft1.id
andnft2.id
: The uuids from NFTs you want to transfer, coming from the NFT Data APInfts
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({ transactionBlock })
-
Claim one or multiple NFTs
-
nft1.id
andnft2.id
: The uuids from NFTs you want to claim, coming from the NFT Data APInfts
entity, wherenft.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.