Price Endpoints Change

TL;DR

As part of our migration, we will change all price fields for Marketplace (TCOMP) and AMM (TAMM) to include creator royalties.

❗ This change will be on mainnet for TAMM on October 2nd and for Marketplace on November 2nd. ❗

For API calls, these changes will take affect on November 2nd.

So for specifying maxPrice fields for retrieving buy instructions, please add the expected creator royalties in.
Similarly for specifying minPrice fields for sell instructions, subtract the expected creator royalties.

For TAMM pools, please check out our new pricing helper functions for easier price calculation including royalties!


Affected Endpoints:

API

SDK

  • Marketplace: all buy and takeBid instructions - maxAmount / minAmount fields
  • TAMM: all buy and sellNft instructions - maxAmount / minPrice fields


More Detailed Examples

Marketplace
Buy
If an NFT is listed for 1 SOL, the maxPrice arg for API / SDK calls to buy that listing was previously just 1_000_000_000 (1 SOL in lamports). Now if the listing has enforced royalties of 5% or 500 BPS, you'd need to pass in 1_050_000_000, the maximum price you would end up paying including creator royalties.

Sell
If you want to sell your NFT into a bid with a specified bid price of 1 SOL, the minPrice arg for API / SDK calls to sell into that bid was previously just 1_000_000_000. Similarly to the buy example, if the listing has enforced royalties of 5% or 500 BPS, you'd need to pass in 950_000_000, the minimum price you would receive including creator royalties.

TAMM

All examples related to pools with poolType == NFT or poolType == Token are equivalent to the marketplace examples above.

For pools with poolType == Trade, prior to this change the specified price already included the market-making fee specified via mmFeeBps. Now, buy prices (maxPrice) need to be at least price + mmFee + creatorFee and sell prices (minPrice) need to be at most price - mmFee - creatorFee.