# 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 NO.AI SDK, you must have it installed.

You can install NO.AI SDK using either **`npm`** or **`yarn`**. Use the following commands to install NO.AI 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 NO.AI 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.
