Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
How to monitor a price of NFT?

Is there any API to monitor prices of TON-based NFTs?


This question was imported from Telegram Chat: https://t.me/tondev/113208

  
  
Posted one year ago
Votes Newest

Answers


Yes, you can use tonapi.io for that:

const nftAddress = 'EQBFSbR4087JZ3Em7HQ3FfPz5-_q6T1UGmQqQGAcPuiFdGJ-'
fetch(`https://tonapi.io/v1/nft/getItems?addresses=${nftAddress}`)
  .then((data) => {
    return data.json()
  })
  .then((res) => {
    const nft_item = res.nft_items[0]
    const price = nft_item.sale.price.value / 10 ** 9 // it is necessary to divide by 10^9, because the value initially given in nanoTON's
    console.log(`${price} ${nft_item.sale.price.token_name}`)
  })
  
  
Posted one year ago
Edited one year ago
18K Views
1 Answer
one year ago
one year ago
Tags