diff --git a/docs/references/http-websocket-apis/public-api-methods/clio-methods/nft_history.md b/docs/references/http-websocket-apis/public-api-methods/clio-methods/nft_history.md index b579becda5..16d3b06718 100644 --- a/docs/references/http-websocket-apis/public-api-methods/clio-methods/nft_history.md +++ b/docs/references/http-websocket-apis/public-api-methods/clio-methods/nft_history.md @@ -8,7 +8,7 @@ labels: --- # nft_history -[[Source]](https://github.com/XRPLF/clio/blob/4a5cb962b6971872d150777881801ce27ae9ed1a/src/rpc/handlers/NFTHistory.cpp "Source") +[[Source]](https://github.com/XRPLF/clio/blob/develop/src/rpc/handlers/NFTHistory.cpp "Source") The `nft_history` command asks the Clio server for past transaction metadata for the [NFT](../../../../concepts/tokens/nfts/index.md) being queried. {% badge href="https://github.com/XRPLF/clio/releases/tag/1.1.0" %}New in: Clio v1.1.0{% /badge %} diff --git a/docs/references/http-websocket-apis/public-api-methods/clio-methods/nfts_by_issuer.md b/docs/references/http-websocket-apis/public-api-methods/clio-methods/nfts_by_issuer.md new file mode 100644 index 0000000000..0e0dcbe6d1 --- /dev/null +++ b/docs/references/http-websocket-apis/public-api-methods/clio-methods/nfts_by_issuer.md @@ -0,0 +1,95 @@ +--- +html: nfts_by_issuer.html +parent: clio-methods.html +seo: + description: Retrieve the history of ownership and transfers for the specified NFT using Clio server's `nft_history` API. +labels: + - Non-fungible Tokens, NFTs +--- +# nfts_by_issuer + +[[Source]](https://github.com/XRPLF/clio/blob/develop/src/rpc/handlers/NFTsByIssuer.cpp "Source") + +`nfts_by_issuer` returns a list of NFTokens that are issued by the specified account. It can optionally filter by taxon. {% badge href="https://github.com/XRPLF/clio/releases/tag/1.1.0" %}New in: Clio v2.1.0{% /badge %} + +## Request Format +An example of the request format: + +```json +{ + "method": "nfts_by_issuer", + "issuer": "rLaBCoaMQqXzHDmiGs2Qv2JA2bg3Yvzxyt" +} +``` + + + +The request contains the following parameters: + +| `Field` | Type | Description | +|:---------------|:--------|:-------------------------------| +| `issuer` | String | A unique identifier for the account, most commonly the account's address. | +| `marker` | Marker | _(Optional)_ Value from a previous paginated response. Resume retrieving data where that response left off. This value is NOT stable if there is a change in the server's range of available ledgers; meaning if you are querying the “validated” ledger it is possible that new NFTs are created during your paging. | +| `nft_taxon` | Integer | _(Optional)_ Use to filter NFTs issued by this issuer that have this taxon. | +| `ledger_hash` | String | _(Optional)_ Use to look for NFTs issued up to the provided ledger. If not provided, the server uses the current ledger. | +| `ledger_index` | String or Integer | _(Optional)_ Use to look for NFTs issued up to the provided ledger. If not provided, the server uses the current ledger. | +| `limit` | Integer | _(Optional)_ Limit the number of NFTs to retrieve. The server is not required to honor this value.| + + +**Note** If you do not specify a ledger version, Clio uses the latest validated ledger. + +## Response Format + +An example of a successful response: + +```json +{ + "result": { + "issuer": "rfXeQv31yWMrhhPxMHZRzQqhw5mQrcuici", + "limit": 50, + "ledger_index": 1534, + "nfts": [ + { + "nft_id": "00080000479C76BC5174816A938ABF667E67D851140BFE03F068FA97000005FB", + "ledger_index": 1533, + "owner": "rfXeQv31yWMrhhPxMHZRzQqhw5mQrcuici", + "is_burned": false, + "uri": "", + "flags": 8, + "transfer_fee": 0, + "issuer": "rfXeQv31yWMrhhPxMHZRzQqhw5mQrcuici", + "nft_taxon": 1, + "nft_serial": 1531 + } + ], + "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" + } + ] +} +``` + +The response follows the [standard format][], with a successful result containing the following fields: + +| `Field` | Type | Description | +|:-------------------|:---------------------------|:---------------------------| +| `issuer` | String | Issuer's account ID. | +| `nfts` | Array<Object> | A list of NFTs issued by the account. The order of the NFTs is not associated with the date the NFTs were minted. | +| `marker` | Marker | _(Optional)_ Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. If this field is not returned, you know that you no longer need to make calls to this API. | +| `limit` | Integer | The `limit`, as specified in the request. | +| `nft_taxon` | Integer | _(Optional)_ The `nft_taxon` as specified in the request. | + +The format of each NFT in the `nfts` array is the same as the response to an [`nft_info`](nft_info.md) request. + +For definitions of the fields returned in the `tx` object, see [Transaction Metadata](../../../protocol/transactions/metadata.md). + +Note:You might get back a response where the `nfts` field is empty but a marker is defined. You need to repeatedly request with the new markers until you receive a response that no longer has a marker. This can happen if you specify a specific ledger and there are tokens that were minted by the account after the specified ledger. + +{% raw-partial file="/docs/_snippets/common-links.md" /%} + diff --git a/docs/references/http-websocket-apis/public-api-methods/index.md b/docs/references/http-websocket-apis/public-api-methods/index.md index 79d4e71300..eb045d4604 100644 --- a/docs/references/http-websocket-apis/public-api-methods/index.md +++ b/docs/references/http-websocket-apis/public-api-methods/index.md @@ -101,6 +101,8 @@ Use these methods to retrieve information using Clio server APIs. * **[`server_info`](clio-methods/server_info-clio.md)** - Retrieve status of the Clio server. * **[`ledger`](clio-methods/ledger-clio.md)** - Get info about a ledger version using Clio server's `ledger` API. * **[`nft_info`](clio-methods/nft_info.md)** - Retrieve information about the specified NFT using Clio server's `nft_info` API. +* **[`nft_history`](clio-methods/nft_history.md)** - Retrieve the history of ownership and transfers for the specified NFT. +* **[`nfts_by_issuer`](clio-methods/nfts_by_issuer.md)** - Returns a list of NFTokens that are issued by the specified account. ## [Utility Methods](utility-methods/index.md) diff --git a/sidebars.yaml b/sidebars.yaml index b7ea09abd4..c6cfe4abe7 100644 --- a/sidebars.yaml +++ b/sidebars.yaml @@ -471,6 +471,7 @@ - page: docs/references/http-websocket-apis/public-api-methods/clio-methods/ledger-clio.md - page: docs/references/http-websocket-apis/public-api-methods/clio-methods/nft_history.md - page: docs/references/http-websocket-apis/public-api-methods/clio-methods/nft_info.md + - page: docs/references/http-websocket-apis/public-api-methods/clio-methods/nfts_by_issuer.md - page: docs/references/http-websocket-apis/public-api-methods/utility-methods/index.md expanded: false items: