Every time a bid status changes, an event is generated. This API is designed to be polled at high frequency, in order to keep an external system in sync with accurate prices for any token.
There are multiple event types, which describe what caused the change in price:
new-order > new offer at a lower price
expiry > the previous best offer expired
sale > the previous best offer was filled
cancel > the previous best offer was canceled
balance-change > the best offer was invalidated due to no longer owning the NFT
approval-change > the best offer was invalidated due to revoked approval
revalidation > manual revalidation of orders (e.g. after a bug fixed)
reprice > price update for dynamic orders (e.g. dutch auctions)
bootstrap > initial loading of data, so that all tokens have a price associated
Some considerations to keep in mind
Selling a partial quantity of available 1155 tokens in a listing will generate a sale and will have a new quantity.
Due to the complex nature of monitoring off-chain liquidity across multiple marketplaces, including dealing with block re-orgs, events should be considered 'relative' to the perspective of the indexer, ie when they were discovered, rather than when they happened. A more deterministic historical record of price changes is in development, but in the meantime, this method is sufficent for keeping an external system in sync with the best available prices.
Click Try It! to start a request and see the response here!