# getNFT

## Description

The `getNFT` function retrieves information about a specific NFT (Non-Fungible Token) from a marketplace smart contract deployed on a blockchain.&#x20;

The function requires a private key to authenticate the request and fetches the NFT details by calling the getNFT method of the marketplace contract.

## Parameters

| Parameter    | Type   | Description                                                  |
| ------------ | ------ | ------------------------------------------------------------ |
| `blockchain` | string | The name of the blockchain on which the NFT is deployed.     |
| `privateKey` | string | The private key of the wallet to authenticate the request.   |
| `tokenId`    | string | The ID of the NFT to retrieve.                               |
| `nftAddress` | string | The address of the NFT contract on the specified blockchain. |

## Response

| Field Name       | Type    | Description                                                                      |
| ---------------- | ------- | -------------------------------------------------------------------------------- |
| `code`           | number  | The response code indicating the success or failure of the request.              |
| `seller`         | string  | The address of the seller who listed the NFT for sale.                           |
| `nftContaddress` | string  | The address of the NFT contract on the specified blockchain.                     |
| `tokenid`        | string  | The ID of the NFT to retrieve.                                                   |
| `priceList`      | string  | The price at which the NFT is listed for sale.                                   |
| `highestbid`     | string  | The current highest bid on the NFT, if it's up for auction.                      |
| `highestbidder`  | string  | The address of the current highest bidder on the NFT.                            |
| `biddingend`     | string  | The date and time when the bidding for the NFT will end, if it's up for auction. |
| `islisted`       | boolean | Indicates if the NFT is currently listed for sale.                               |
| `issold`         | boolean | Indicates if the NFT has been sold.                                              |
| `forauction`     | boolean | Indicates if the NFT is up for auction.                                          |
| `error`          | string  | The error message in case of a failed request.                                   |

## Example Request and Response

### Prerequisites

Before making requests with Volary SDK, you must have it installed.

You can install Volary SDK using either **`npm`** or **`yarn`**. Use the following commands to install Volary SDK:

```jsx
npm install @nest25/evm-chains-lib
OR
yarn add @nest25/evm-chains-lib
```

### Request

Here is an example of how to make a `getNFT` request using the Volary SDK:

```jsx
const {NftMarketPlace} = require('@nest25/evm-chains-lib')
// create instance of SOULBOUND
const nftMarketPlace = new NftMarketPlace();
const privateKey = "your private key here"
// nft contract address
let nftContract = '0xaa223c2379daf21526925a07fe466fad7269103a';

const main = async () => {
    // get NFT
    const contract = await nftMarketPlace.getNFT(
        'klay',
        privateKey,
        '1',
        nftContract
    );
    // print NFT
    console.log(contract);
}
main()
```

### Response

```jsx
```

## Use Cases

* **Online Marketplaces:** The function can be used by online marketplaces to retrieve information about an NFT listed for sale by a user.
* **Cryptocurrency Wallets:** The function can be used by cryptocurrency wallets to display details of the NFTs owned by the user.
* **NFT Trading Platforms:** The function can be used by NFT trading platforms to display information about a specific NFT that users are interested in buying or selling.


---

# 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://docs.volary.io/sdks-guide/blockchain-sdks/evm-chains-sdk/nftmarketplace/getnft.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.
