<p>The price of the asset is stored within the datum of the order itself by the jpg.store contract.</p>
<p>Let's take the transaction <code>8698d938588ca9a93663cb1a9e4478390f374873970ced6d46ae9c4e6ac88723</code> for example.</p>
<p>To find out more information about this order, we need to find out the <code>Datum</code> of the UTXO that has been spent.</p>
<pre><code>$ curl -s -H 'project_id: token' https://cardano-mainnet.blockfrost.io/api/v0/txs/8698d938588ca9a93663cb1a9e4478390f374873970ced6d46ae9c4e6ac88723/utxos | jq .inputs[].data_hash
null
&quot;e782c5dbe30c01d0dee590e474fa0a92c18fd4ff3f459fb74c8253e4c87ddddd&quot;
null
</code></pre>
<p>And here, you can the content of the datum.</p>
<pre><code>$ curl -s -H 'project_id: token' https://cardano-mainnet.blockfrost.io/api/v0/scripts/datum/e782c5dbe30c01d0dee590e474fa0a92c18fd4ff3f459fb74c8253e4c87ddddd | jq 
{
  &quot;json_value&quot;: {
    &quot;fields&quot;: [
      {
        &quot;bytes&quot;: &quot;bf5be2e0d7246b59b89f9ff57dfed904257985ecde6a20fc66cf7b26&quot;
      },
      {
        &quot;int&quot;: 680000000
      },
      {
        &quot;bytes&quot;: &quot;86ec26a91051e4d42df00b023202e177a0027dca4294a20a0326a116&quot;
      },
      {
        &quot;bytes&quot;: &quot;617175616661726d657231303534&quot;
      },
      {
        &quot;bytes&quot;: &quot;baaaa8b9a088f04386cb7119ccf686616fc15f81663f58f459d0bf67&quot;
      },
      {
        &quot;int&quot;: 50
      }
    ],
    &quot;constructor&quot;: 0
  }
}
</code></pre>
<p>As you can see, the second field value is the price.</p>
<p><a href="https://i.sstatic.net/M0yn3.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/M0yn3.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2023-01-29T11:23:42.617Z
Thank you for answering, I have tested this with a few transactions in which people have bought assets and I do find the correct price after adding up the values. Same thing for when an asset is listed or its price has changed, thank you very much.
Badro
CC BY-SA 4.0
2023-01-28T16:23:24.237Z
2023-01-28T16:23:24.237Z
Marek Mahut - StakeNuts
<p>I am trying to find the price of an asset from a transaction JSON object that I receive from a Blockfrost webhook in which I track transactions from and to JPG store, the object has all the information about a transaction and the UTxOs but none of them have the price of the asset/assets, is it possible to find it by using one of the properties?</p>

CC BY-SA 4.0
2023-01-26T14:27:04.470Z
What do you mean by transaction JSON object, how does it look, what kind of information do you have access about it? Also, where did that transaction come from? If it's from JPG store than they create transactions in such a way that is possible to know the price of an assets if it's from an unknown marketplace, then you can't know for sure, but you can make assumptions and end up with a value.
Mateus
CC BY-SA 4.0
2023-01-27T00:28:46.523Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
CC BY-SA 4.0
2023-01-27T08:10:48.860Z
@Mateus I am receiving this JSON object from a Blockfrost webhook that listens to transactions from and to the JPG store and I have read through the whole object but there is no price attached to an asset, that's why I asked if it is possible to retrieve that using one of the properties.
Badro
CC BY-SA 4.0
2023-01-27T11:52:00.447Z
@Badro I see, can you edit your question to include this information and maybe also what transaction information you have access to through the block frost web hook? I believe you will find the price in the datum, but I can try to make a more developed answer once you edit your question
Mateus
CC BY-SA 4.0
2023-01-27T19:26:08.123Z
I have edited it, let me know if it is better now or needs more information :)
Badro
<transaction><blockfrost><utxo><asset><json>
Is there a way to find the price of an asset from the JSON object of a transaction received from a Blockfrost webhook?
# Is there a way to find the price of an asset from the JSON object of a transaction received from a Blockfrost webhook?

(Asked by: username_0 on 2023-01-24)

I am trying to find the price of an asset from a transaction JSON object that I receive from a Blockfrost webhook in which I track transactions from and to JPG store, the object has all the information about a transaction and the UTxOs but none of them have the price of the asset/assets, is it possible to find it by using one of the properties?

**Tags:** transaction, blockfrost, utxo, asset, json
> **Comments:**
> **username_1**: What do you mean by transaction JSON object, how does it look, what kind of information do you have access about it? Also, where did that transaction come from? If it's from JPG store than they create transactions in such a way that is possible to know the price of an assets if it's from an unknown marketplace, then you can't know for sure, but you can make assumptions and end up with a value.  
> **username_2**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  
> **username_0**: @Mateus I am receiving this JSON object from a Blockfrost webhook that listens to transactions from and to the JPG store and I have read through the whole object but there is no price attached to an asset, that's why I asked if it is possible to retrieve that using one of the properties.  
> **username_1**: @Badro I see, can you edit your question to include this information and maybe also what transaction information you have access to through the block frost web hook? I believe you will find the price in the datum, but I can try to make a more developed answer once you edit your question  
> **username_0**: I have edited it, let me know if it is better now or needs more information :)  

---

## 1 answers

### Answer by username_3 on 2023-01-28. Score: 0 | Accepted answer

The price of the asset is stored within the datum of the order itself by the jpg.store contract.
Let's take the transaction 8698d938588ca9a93663cb1a9e4478390f374873970ced6d46ae9c4e6ac88723 for example.
To find out more information about this order, we need to find out the Datum of the UTXO that has been spent.
$ curl -s -H 'project_id: token' https://cardano-mainnet.blockfrost.io/api/v0/txs/8698d938588ca9a93663cb1a9e4478390f374873970ced6d46ae9c4e6ac88723/utxos | jq .inputs[].data_hash
null
"e782c5dbe30c01d0dee590e474fa0a92c18fd4ff3f459fb74c8253e4c87ddddd"
null

And here, you can the content of the datum.
$ curl -s -H 'project_id: token' https://cardano-mainnet.blockfrost.io/api/v0/scripts/datum/e782c5dbe30c01d0dee590e474fa0a92c18fd4ff3f459fb74c8253e4c87ddddd | jq 
{
  "json_value": {
    "fields": [
      {
        "bytes": "bf5be2e0d7246b59b89f9ff57dfed904257985ecde6a20fc66cf7b26"
      },
      {
        "int": 680000000
      },
      {
        "bytes": "86ec26a91051e4d42df00b023202e177a0027dca4294a20a0326a116"
      },
      {
        "bytes": "617175616661726d657231303534"
      },
      {
        "bytes": "baaaa8b9a088f04386cb7119ccf686616fc15f81663f58f459d0bf67"
      },
      {
        "int": 50
      }
    ],
    "constructor": 0
  }
}

As you can see, the second field value is the price.

> **Comments:**
> **username_0**: Thank you for answering, I have tested this with a few transactions in which people have bought assets and I do find the correct price after adding up the values. Same thing for when an asset is listed or its price has changed, thank you very much.  

---

