Files
xrpl-dev-portal/content/references/http-websocket-apis/public-api-methods/clio-methods/nft_info.md
Amarantha Kulkarni b70b3ae7e9 Clio v110 (#1464)
* Update response fields

* Fix typo

* initial draft for nft_info command

* update request and response formats

* Incorporate review feedback

* Updated source URL  and desc for is_burned

* Incorporate review feedback

* Incorporate additional review comments

* Incorporate peer edit comments

* Moving nft_info to new section

* Rename section to Clio methods

* Update dactyl-config.yml

Co-authored-by: Rome Reginelli <rome@ripple.com>

* Update content/references/http-websocket-apis/public-api-methods/clio-methods/nft_info.md

Co-authored-by: Rome Reginelli <rome@ripple.com>

* Update warning message location in the response as per code changes (#1462)

* Update warning level change in API response

* Move Clio APIs under one heading in the nav

* Update dactyl config file to group all Clio methods under one heading

* Fix file paths

* remove Clio from the nav title

* Add badge to note the version when this API was added

Co-authored-by: Rome Reginelli <rome@ripple.com>
2022-08-12 07:14:29 -07:00

5.8 KiB
Raw Blame History

html, parent, blurb, labels
html parent blurb labels
nft_info.html clio-methods.html Retrieve information about the specified NFT using Clio server's `nft_info` API.
Non-fungible Tokens, NFTs

nft_info

[Source]

The nft_info command asks the Clio server for information about the NFT being queried. New in: Clio v1.1.0

Request Format

An example of the request format:

WebSocket

{
  "id": 1,
  "command": "nft_info",
  "nft_id": "00080000B4F4AFC5FBCBD76873F18006173D2193467D3EE70000099B00000000"
}

JSON-RPC

{
    "method": "nft_info",
    "params": [
      {
          "nft_id": "00080000B4F4AFC5FBCBD76873F18006173D2193467D3EE70000099B00000000"
      }
    ]
}

The request contains the following parameters:

Field Type Description
nft_id String A unique identifier for the non-fungible token (NFT).
ledger_hash String (Optional) A 20-byte hex string for the ledger version to use. If you do not specify this field, it defaults to validated. (See [Specifying Ledgers][])
ledger_index String or Unsigned Integer (Optional) The [ledger index][] of the ledger to use, or a shortcut string to choose a ledger automatically. If you do not specify this field, it defaults to validated. Do not specify the ledger_index as closed or current; doing so forwards the request to the P2P rippled server and the nft_info API is not available on rippled. (See [Specifying Ledgers][])

Response Format

An example of a successful response:

WebSocket

{
  "id": 1,
  "result": {
    "nft_id": "00080000B4F4AFC5FBCBD76873F18006173D2193467D3EE70000099B00000000",
    "ledger_index": 270,
    "owner": "rG9gdNygQ6npA9JvDFWBoeXbiUcTYJnEnk",
    "is_burned": true,
    "flags": 8,
    "transfer_fee": 0,
    "issuer": "rHVokeuSnjPjz718qdb47bGXBBHNMP3KDQ",
    "nft_taxon": 0,
    "nft_sequence": 0,
    "validated": true
  },
  "status": "success",
  "type": "response",
  "warnings": [
    {
      "id": 2001,
      "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include ledger_index:current in your request"
    },
    {
      "id": 2002,
      "message": "This server may be out of date"
    }
  ]
}

JSON-RPC

{
  "result": {
    "nft_id": "00080000B4F4AFC5FBCBD76873F18006173D2193467D3EE70000099B00000000",
    "ledger_index": 269,
    "owner": "rG9gdNygQ6npA9JvDFWBoeXbiUcTYJnEnk",
    "is_burned": false,
    "flags": 8,
    "transfer_fee": 0,
    "issuer": "rHVokeuSnjPjz718qdb47bGXBBHNMP3KDQ",
    "nft_taxon": 0,
    "nft_sequence": 0,
    "uri": "https://xrpl.org",
    "validated": true,
    "status": "success"
  },
  "warnings": [
    {
      "id": 2001,
      "message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
    },
    {
      "id": 2002,
      "message": "This server may be out of date"
    }
  ]
}

The response follows the [standard format][], with a successful result containing an nft_info response object with some arrangement of the following fields:

Field Type Description
nft_id String A unique identifier for the non-fungible token (NFT).
ledger_index Integer The [ledger index][] of the most recent ledger version where the state of this NFT was modified, as in the NFT was minted (created), changed ownership (traded), or burned (destroyed). The information returned contains whatever happened most recently compared to the requested ledger.
owner String The account ID of this NFT's owner at this ledger index.
is_burned Boolean Returns true if the NFT is burned at this ledger, or false otherwise.
flags Integer The flag set of this NFT.
transfer_fee Integer The transfer fee of this NFT. See NFTokenMint Fields for more information on transfer fees.
issuer String The account ID which denotes the issuer of this NFT.
nft_taxon Integer The NFTs taxon.
nft_sequence Integer The NFTs sequence number.
uri String or null (Omitted if the NFT is burned at this ledger.). This field is null if the NFT is not burned at this ledger but does not have a URI. If the NFT is not burned at this ledger and it does have a URI, this field is a string containing the decoded URI of the NFT. NOTE: If you need to retrieve the URI of a burnt token, re-request nft_info for this token, specifying the ledger_index as the one previous to the index where this token was burned ({ledger_index-where-token-was-burned} - 1).

Possible Errors

  • Any of the [universal error types][].

{% include '_snippets/rippled-api-links.md' %} {% include '_snippets/rippled_versions.md' %}