• 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

    const bid = await fetchAuctionBidV1(umi, bidPda);
    const auction = await fetchAuctionBucketV1(umi, auctionPda);
    const fillAmount = getBidFillAmount(bid, auction); // 50000n (partial fill)

    Parameters

    • auctionBucket: Pick<AuctionBucketV1Input, "clearingPriceBidNumber" | "clearingPriceAllocation">

      The auction bucket with clearing price info

    • bid: Pick<BidInput, "bidNumber" | "tokenQuantity">

      The bid with bid number and requested token quantity

    Returns bigint

Generated using TypeDoc