Reference
buyListings
Buy/sweep listings from any marketplace.
const payload = await aptosTradingClient.buyListings({
listingIds: [listing1.id, listing2.id]
})
await signAndSendTransaction(payload)
-
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 payload = await aptosTradingClient.listNfts({
nfts: [
{
id: nft.id,
listPriceInOctas: 1000000000
}
],
})
await signAndSendTransaction(payload)
-
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 APT
unlistListing
Unlist a listing
const payload = await aptosTradingClient.unlistListing({
listingId: listing.id
})
await signAndSendTransaction(payload)
listing.id
: The uuid of a listing you want to unlist, coming from the NFT Data API listings
entity
placeNftBids
Place a bid on an individual NFT
const payload = await aptosTradingClient.placeNftBid({
nftId: nft.id,
bidAmountInOctas: 500000000
})
await signAndSendTransaction(payload)
-
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 APT
removeNftBid
Remove a bid from an individual NFT
const payload = await aptosTradingClient.removeNftBid({ bidId: bid.id })
await signAndSendTransaction(payload)
bid.id
: The uuid of a bid you want to remove, coming from the NFT Data API bids
entity where bid.type === "solo"
acceptNftBid
Accept a bid on an individual NFT
const payload = await aptosTradingClient.acceptNftBid({ bidId: bid.id })
await signAndSendTransaction(payload)
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 payload = await aptosTradingClient.placeCollectionBid({
collectionId: collection.id,
bidAmountInOctas: 14600000000,
numOfBids: 1
})
await signAndSendTransaction(payload)
-
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 APT -
numOfBids
: The number of bids at thebidAmount
price you want to create in the same transaction
removeCollectionBid
Remove a collection bid
const payload = await aptosTradingClient.removeCollectionBid({ bidId: bid.id })
await signAndSendTransaction(payload)
bid.id
: The uuid of a collection bid you want to remove, coming from the NFT Data APIbids
entity wherebid.type === "collection"
acceptCollectionBid
Accept a collection bid (Instant Sell)
const payload = await aptosTradingClient.acceptCollectionBid({
bidId: bid.id,
nftId: nft.id
})
await signAndSendTransaction(payload)
-
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 payload = await aptosTradingClient.transferNfts({
nftIds: [nft1.id, nft2.id],
recipientId: recipientWalletAddress,
})
await signAndSendTransaction(payload)
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
claimAcceptedBidNft
Claim a NFT that has been transferred to you from an accepted collection bid
const payload = await claimAcceptedBidNft({ nftId: nft.id })
await signAndSendTransaction(payload)
nft.id
: The uuid from a NFT you want to claim, coming from the NFT Data API nfts
entity, where nft.claimable === true
and the nft.claimable_reason === "accept-token-offer" || nft.claimable_reason === "accept-collection-offer"
.
claimTransferredNft
Claim a NFT that has been transferred to you from another address directly (a.k.a it is in your Inbox)
const payload = await claimTransferredNft({ nftId: nft.id })
await signAndSendTransaction(payload)
nft.id
: The uuid from a NFT you want to claim, coming from the NFT Data API nfts
entity, where nft.claimable
is true and the nft.claimable_reason === "transfer"
.