user8224: I am fetching assets stored in my wallet address. I want to seperate the fungible tokens and NFTs ,  on what basis I can differenciate both of them from data I am fetching from API (opencnft.io) like policy_id or fingerprint or any other factor which differenciates both of them?

user2248: The problem with the given approach of verifying the amount of tokens through the /assets/ endpoint like suggested is that it might guarantee you that it is an NFT currently, but it does not guarantee that it will always be an NFT.
For instance, it might be that the native script "owner" minted only one token currently, but he can still mint however many assets he wants in the future.
In order to actually enforce the policy is locked and guarantee that a specific token is an NFT an always will be, you will need to look at the policy of that script. To do that, block frost offers you the endpoint /script/{hash}/json
For example, in pre-prod, the endpoint https://cardano-preprod.blockfrost.io/api/v0/scripts/ee518da45e3ebe2858669e4eaf7c3c5a7f9be7733e47e0d48c596fd3/json will give you the output
{
    "json": {
        "type": "all",
        "scripts": [
            {
                "type": "sig",
                "keyHash": "87f96fd385bb6911a6f8eb47d97093ce2e3b5db2d884db7b238b0cec"
            },
            {
                "slot": 21561710,
                "type": "before"
            }
        ]
    }
}

Which tell us that this script is governed by two rules. First, it can only be minted by the user with the key 87f96fd385bb6911a6f8eb47d97093ce2e3b5db2d884db7b238b0cec, second that it cannot be minted after the slot 21561710. This second part is what is important for us. NFTs are only guaranteed to be NFTs forever if the this second argument is present and if our current slot is greater than whatever slot is in that script.

8224: <p>I am fetching assets stored in my wallet address. I want to seperate the fungible tokens and NFTs ,  on what basis I can differenciate both of them from data I am fetching from API (opencnft.io) like policy_id or fingerprint or any other factor which differenciates both of them?</p>
 2248: <p>The problem with the given approach of verifying the amount of tokens through <a href="https://docs.blockfrost.io/#tag/Cardano-Assets/paths/%7E1assets/get" rel="nofollow noreferrer">the /assets/ endpoint</a> like suggested is that it might guarantee you that it is an NFT currently, but it does not guarantee that it will always be an NFT.</p>
<p>For instance, it might be that the native script &quot;owner&quot; minted only one token currently, but he can still mint however many assets he wants in the future.</p>
<p>In order to actually enforce the policy is locked and guarantee that a specific token is an NFT an always will be, you will need to look at the policy of that script. To do that, block frost offers you the endpoint <code>/script/{hash}/json</code></p>
<p>For example, in pre-prod, the endpoint <code>https://cardano-preprod.blockfrost.io/api/v0/scripts/ee518da45e3ebe2858669e4eaf7c3c5a7f9be7733e47e0d48c596fd3/json</code> will give you the output</p>
<pre class="lang-json prettyprint-override"><code>{
    &quot;json&quot;: {
        &quot;type&quot;: &quot;all&quot;,
        &quot;scripts&quot;: [
            {
                &quot;type&quot;: &quot;sig&quot;,
                &quot;keyHash&quot;: &quot;87f96fd385bb6911a6f8eb47d97093ce2e3b5db2d884db7b238b0cec&quot;
            },
            {
                &quot;slot&quot;: 21561710,
                &quot;type&quot;: &quot;before&quot;
            }
        ]
    }
}
</code></pre>
<p>Which tell us that this script is governed by two rules. First, it can only be minted by the user with the key <code>87f96fd385bb6911a6f8eb47d97093ce2e3b5db2d884db7b238b0cec</code>, second that it cannot be minted after the slot <code>21561710</code>. This second part is what is important for us. NFTs are only guaranteed to be NFTs forever if the this second argument is present and if our current slot is greater than whatever slot is in that script.</p>
