Add or remove a bid on an auction
Prerequisites
Bid on an auction using Ternoa-JS
import {
addBid,
initializeApi,
getKeyringFromSeed,
WaitUntil,
} from "ternoa-js";
const auctionBid = async () => {
try {
await initializeApi();
const keyring = await getKeyringFromSeed("//TernoaTestAccount");
const NFT_ID = // update with the nft id you want to bid on.
const bidAmount = // update with the amount to bid.
const res = await addBid(
NFT_ID,
bidAmount,
keyring,
WaitUntil.BlockInclusion
);
console.log(`Bid added to NFT ${res.nftId} for ${res.amountRounded}CAPS`);
} catch (e) {
console.error(e);
}
};The expected params
Response
Remove a bid using Ternoa-JS
The expected params
Response
Support
Last updated