# listNFT

## Description

The `listNFT` function is used to list a non-fungible token (NFT) for sale on a decentralized marketplace.&#x20;

It takes in various parameters, including the blockchain on which the NFT exists, the user's private key for that blockchain, the ID of the token, the price at which it is to be sold, the duration of any bidding period (if applicable), whether it is being listed for auction, and the address of the NFT contract.<br>

## Parameters

| Name              | Type    | Description                                                     |
| ----------------- | ------- | --------------------------------------------------------------- |
| `blockchain`      | string  | The blockchain on which the NFT exists.                         |
| `privateKey`      | string  | The private key of the user making the listing.                 |
| `tokenId`         | string  | The ID of the NFT to be listed.                                 |
| `price`           | string  | The price at which the NFT is to be listed.                     |
| `biddingDuration` | string  | The duration of any bidding period (if applicable), in seconds. |
| `forAuction`      | boolean | Whether the NFT is being listed for auction.                    |
| `nftAddress`      | string  | The address of the NFT contract.                                |

## Response

| Name      | Type   | Description                                                        |
| --------- | ------ | ------------------------------------------------------------------ |
| `code`    | number | The status code of the response (1 for success, 0 for failure).    |
| `receipt` | string | The transaction hash of the listing transaction on the blockchain. |
| `error`   | string | The error message if the operation fails.                          |

## Example Request and Response

### Prerequisites&#x20;

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 `listNFT` 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 () => {
    // list nft
    const contract = await nftMarketPlace.listNFT(
        'klay', 
        privateKey,
        "1",
        "1",
        "0",
        false,
        nftContract
    );
    // print result
    console.log(contract);
}
main()
```

### Response

```jsx
 
```

## Use Cases

* **Crypto Wallets:** The function can be used by crypto wallets to allow their users to list their NFTs for sale on decentralized marketplaces.
* **Online Marketplaces:** The function can be used by online marketplaces to create a decentralized marketplace for NFTs.
* **NFT Platforms:** The function can be used by NFT platforms to allow their users to sell their NFTs on third-party marketplaces.


---

# 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/listnft.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.
