# NFT API endpoints

The latest documentation for endpoints is always on the DevPortal: \
<https://partner.socios.com/devportal/apis/f59193f0-b4ea-4eb7-83f8-8b1f2858f181/test>

{% openapi src="/files/8sINXolbqj50hEwnOyj3" path="/user/nfts" method="get" %}
[NFT.json](https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2Fsk2wL96s6pcBscmiMgAX%2FNFT.json?alt=media\&token=b5e9cb25-8dc7-4753-8945-2d2178c4fa0c)
{% endopenapi %}

{% hint style="success" %}
:arrow\_down: **ALTERNATIVE: Retrieve User NFT Balance** :arrow\_down:\
The following code will allow you to check how many NFT from a specific collection a user holds.&#x20;
{% endhint %}

<pre class="language-javascript" data-overflow="wrap" data-line-numbers><code class="lang-javascript"><strong>import { abi as erc721ABI } from './ERC721ABI.json';
</strong>async function getNFTBalance() {
  const balance = await client.readContract({
    address: '0xYourNFTAddress', // Replace with the actual NFT contract address
    abi: erc721ABI, // ERC-721 ABI
    functionName: 'balanceOf', // Standard ERC-721 function to get balance
    args: ['0xUserWalletAddress'], // User's address whose NFT balance you want to check
  });
  return balance.toString();
}

// Example usage
getNFTBalance().then(console.log);

</code></pre>

{% openapi src="/files/8sINXolbqj50hEwnOyj3" path="/nft/{id}" method="get" %}
[NFT.json](https://31329255-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMDcaoJLMj5Y3jzFMTONF%2Fuploads%2Fsk2wL96s6pcBscmiMgAX%2FNFT.json?alt=media\&token=b5e9cb25-8dc7-4753-8945-2d2178c4fa0c)
{% endopenapi %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://connect.socios.com/partner-api/api-reference/nft-api/nft-api-endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
