Calculates the actual token amount a bid will receive.
Returns either the partial fill amount (if bid is at clearing price) or the full token quantity requested by the bid.
The actual number of tokens the bid will receive
const bid = await fetchAuctionBidV1(umi, bidPda);const auction = await fetchAuctionBucketV1(umi, auctionPda);const fillAmount = getBidFillAmount(bid, auction); // 50000n (partial fill)
The auction bucket with clearing price info
The bid with bid number and requested token quantity
Generated using TypeDoc
Calculates the actual token amount a bid will receive.
Returns either the partial fill amount (if bid is at clearing price) or the full token quantity requested by the bid.
Returns
The actual number of tokens the bid will receive
Example