<p>My first thought was to go to <a href="https://blockfrost.dev/" rel="nofollow noreferrer">https://blockfrost.dev/</a>. Here is their API documentation: <a href="https://docs.blockfrost.io/" rel="nofollow noreferrer">https://docs.blockfrost.io/</a>. You'll need an API key, but for limited use you can get one for free and test out your scenario.</p>
<p>You can initially get the <a href="https://docs.blockfrost.io/#tag/Cardano-Assets/paths/%7E1assets%7E1%7Basset%7D%7E1history/get" rel="nofollow noreferrer">asset history</a>.</p>
<pre><code>curl -H &quot;project_id: 123456&quot; https://cardano-mainnet.blockfrost.io/api/v0/assets/ad79da159614ff55130b3a28189fbe5c429c0dfc1c0aeaf94a1de95e4b6964646f7330373138/history
[{&quot;tx_hash&quot;:&quot;79b99a605b46603dbeefefab83bc72dfc241dafd1236504014732d6c3d3a5195&quot;,&quot;action&quot;:&quot;minted&quot;,&quot;amount&quot;:&quot;1&quot;}]
</code></pre>
<p>Grab the <a href="https://docs.blockfrost.io/#tag/Cardano-Transactions" rel="nofollow noreferrer">transaction hash(s)</a> and then run</p>
<pre><code>curl -H &quot;project_id: 123456&quot; https://cardano-mainnet.blockfrost.io/api/v0/txs/79b99a605b46603dbeefefab83bc72dfc241dafd1236504014732d6c3d3a5195
</code></pre>
<p>That will give you a lot of details you won't need, but you can look at output amount:</p>
<pre><code>    &quot;output_amount&quot;: [
        {
            &quot;unit&quot;: &quot;lovelace&quot;,
            &quot;quantity&quot;: &quot;19809463&quot;
        },
        {
            &quot;unit&quot;: &quot;ad79da159614ff55130b3a28189fbe5c429c0dfc1c0aeaf94a1de95e4b6964646f7330373138&quot;,
            &quot;quantity&quot;: &quot;1&quot;
        }
    ],
</code></pre>
<p>Here you can see that 19809463 lovelace (or 19.8094630 ADA) was spent on unit <code>...330373138</code>. This is the first transaction, so we might assume this was the purchase price. The same goes for the sold price. If you want the latest sold price, use the latest transaction hash from the /txs api call. Or loop over each to get the price history.</p>
<p>Use whichever language you want for the curl calls, and loop to process the transaction data. Here's a little javascript to grab the tx_hash.</p>
<pre><code>fetch('https://cardano-mainnet.blockfrost.io/api/v0/assets/ad79da159614ff55130b3a28189fbe5c429c0dfc1c0aeaf94a1de95e4b6964646f7330373138/history', {
   headers: {
      'project_id': '123456'
   }
})
   .then(response =&gt; response.text())
   .then(text =&gt; console.log(JSON.parse(text)[0].tx_hash))
</code></pre>

CC BY-SA 4.0
2023-03-08T00:27:12.087Z
2023-03-08T00:27:12.087Z
PREEB
<p>I am working on Cardano NFT tool kit, which basically shows the NFT's owned by a user. The tool kit shows the various information about NFT stored in wallet like (Buy Price, Sold Price, Rarity, Holding period, Floor price) apart from this some other data like (Policy Id, FingerPrint, Collection name, Asset name, Image IPFS link ). I have tried to get this data from <strong>Wallet address</strong> ...<strong>first</strong> using (<a href="https://cardano-mainnet.tangocrypto.com/%7Bapp_id%7D/v1/addresses/%7Baddress%7D/assets" rel="nofollow noreferrer">https://cardano-mainnet.tangocrypto.com/{app_id}/v1/addresses/{address}/assets</a>) which gives me policyId , fingerprint , asset name and these data from first API that i have got used in the all other API's. <strong>Second</strong> using (<a href="https://api.opencnft.io/1/asset/%7Basset%7D/tx" rel="nofollow noreferrer">https://api.opencnft.io/1/asset/{asset}/tx</a>), <strong>third</strong> using (<a href="https://api.opencnft.io/1/asset/%7Basset%7D" rel="nofollow noreferrer">https://api.opencnft.io/1/asset/{asset}</a>) and **fourth using (<a href="https://api.opencnft.io/1/policy/%7Bpolicy%7D/floor_price" rel="nofollow noreferrer">https://api.opencnft.io/1/policy/{policy}/floor_price</a>) which gives. But these all  process in taking too much time to fetch the data.</p>
<p><strong>So, is there any particular api which can give all these data or any solution for this?</strong></p>

<wallet><nft><cardano-api>
Which API can give the buy price and sold price of NFT of cardano blockchain?
# Which API can give the buy price and sold price of NFT of cardano blockchain?

(Asked by: username_0 on 2023-03-05)

I am working on Cardano NFT tool kit, which basically shows the NFT's owned by a user. The tool kit shows the various information about NFT stored in wallet like (Buy Price, Sold Price, Rarity, Holding period, Floor price) apart from this some other data like (Policy Id, FingerPrint, Collection name, Asset name, Image IPFS link ). I have tried to get this data from **Wallet address** ...**first** using ([https://cardano-mainnet.tangocrypto.com/{app\_id}/v1/addresses/{address}/assets](https://cardano-mainnet.tangocrypto.com/%7Bapp_id%7D/v1/addresses/%7Baddress%7D/assets)) which gives me policyId , fingerprint , asset name and these data from first API that i have got used in the all other API's. **Second** using ([https://api.opencnft.io/1/asset/{asset}/tx](https://api.opencnft.io/1/asset/%7Basset%7D/tx)), **third** using ([https://api.opencnft.io/1/asset/{asset}](https://api.opencnft.io/1/asset/%7Basset%7D)) and \*\*fourth using ([https://api.opencnft.io/1/policy/{policy}/floor\_price](https://api.opencnft.io/1/policy/%7Bpolicy%7D/floor_price)) which gives. But these all process in taking too much time to fetch the data.

**So, is there any particular api which can give all these data or any solution for this?**

**Tags:** wallet, nft, cardano-api

---

## 1 answers

### Answer by username_1 on 2023-03-08. Score: 2

My first thought was to go to https://blockfrost.dev/. Here is their API documentation: https://docs.blockfrost.io/. You'll need an API key, but for limited use you can get one for free and test out your scenario.
You can initially get the asset history.
curl -H "project_id: 123456" https://cardano-mainnet.blockfrost.io/api/v0/assets/ad79da159614ff55130b3a28189fbe5c429c0dfc1c0aeaf94a1de95e4b6964646f7330373138/history
[{"tx_hash":"79b99a605b46603dbeefefab83bc72dfc241dafd1236504014732d6c3d3a5195","action":"minted","amount":"1"}]

Grab the transaction hash(s) and then run
curl -H "project_id: 123456" https://cardano-mainnet.blockfrost.io/api/v0/txs/79b99a605b46603dbeefefab83bc72dfc241dafd1236504014732d6c3d3a5195

That will give you a lot of details you won't need, but you can look at output amount:
    "output_amount": [
        {
            "unit": "lovelace",
            "quantity": "19809463"
        },
        {
            "unit": "ad79da159614ff55130b3a28189fbe5c429c0dfc1c0aeaf94a1de95e4b6964646f7330373138",
            "quantity": "1"
        }
    ],

Here you can see that 19809463 lovelace (or 19.8094630 ADA) was spent on unit ...330373138. This is the first transaction, so we might assume this was the purchase price. The same goes for the sold price. If you want the latest sold price, use the latest transaction hash from the /txs api call. Or loop over each to get the price history.
Use whichever language you want for the curl calls, and loop to process the transaction data. Here's a little javascript to grab the tx_hash.
fetch('https://cardano-mainnet.blockfrost.io/api/v0/assets/ad79da159614ff55130b3a28189fbe5c429c0dfc1c0aeaf94a1de95e4b6964646f7330373138/history', {
   headers: {
      'project_id': '123456'
   }
})
   .then(response => response.text())
   .then(text => console.log(JSON.parse(text)[0].tx_hash))


---

