From 3cbc940afea174453c0fa03c49d4515aa90f98d8 Mon Sep 17 00:00:00 2001 From: Dennis Dawson Date: Thu, 24 Mar 2022 16:44:32 -0700 Subject: [PATCH] Add doc for the nft_buy_offers method. Per TOK-57. --- .../nft-methods/nft_buy_offers.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 content/references/rippled-api/public-rippled-methods/nft-methods/nft_buy_offers.md diff --git a/content/references/rippled-api/public-rippled-methods/nft-methods/nft_buy_offers.md b/content/references/rippled-api/public-rippled-methods/nft-methods/nft_buy_offers.md new file mode 100644 index 0000000000..9e318aa611 --- /dev/null +++ b/content/references/rippled-api/public-rippled-methods/nft-methods/nft_buy_offers.md @@ -0,0 +1,111 @@ +--- +html: nft_buy_offers.html +parent: nft-methods.html +blurb: Get a list of all buy offers for a NFToken. +labels: + - Non-fungible Tokens, NFTs, NFTokens +--- +# account_nfts +[[Source]](https://github.com/ripple/rippled/blob/xls20/src/ripple/rpc/handlers/NFTOffers.cpp "Source") +{% include '_snippets/nfts-disclaimer.md' %} + +The `nft_buy_offers` method returns a list of buy offers for a `NFToken` object. + +## Request Format +An example of the request format: + + + +*WebSocket* + +```json +{ + "id": 1, + "command": "nft_buy_offers", + "params": [{ + "tokenid": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007" + }] +} +``` + +*JSON-RPC* + +```json +{ + "method": "nft_buy_offers", + "tokenid": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007" +} +``` + + + +[Try it! >](websocket-api-tool.html#nft_sell_offers) + +The request includes the following parameters: + +| Field | Type | Description | +|:----------------------|:---------------------------|:------------------------| +| `tokenid` | String | The unique identifier of a NFToken object. | +| +## Response Format +An example of a successful response: + + + +*WebSocket* + +```json +{ + "id": 7, + "result": { + "offers": [ + { + "amount": "8000", + "flags": 0, + "index": "9A4ACB71D49C8A4F1B079DE9D3CD289851E637B68BE7FDC383D01BE413B24C7A", + "owner": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm" + } + ], + "tokenid": "000800001FD350FC4A6133360827DE142E60E7522E4F4DF5409177A90000000E" + }, + "type": "response" +}``` + +*JSON-RPC* + +```json +{ + { + "id": 7, + "result": { + "offers": [ + { + "amount": "8000", + "flags": 0, + "index": "9A4ACB71D49C8A4F1B079DE9D3CD289851E637B68BE7FDC383D01BE413B24C7A", + "owner": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm" + } + ], + "tokenid": "000800001FD350FC4A6133360827DE142E60E7522E4F4DF5409177A90000000E" + }, + "type": "response" + } +} +``` + + + +The response follows the [standard format][], with a successful result containing the following fields: + +| `Field` | Type | Description | +|:---------------|:-----------------|:-----------------------------------------| +| `tokenid` | String | The NFToken associated with the sell offers | +| `offers` | Array | The list of sell offers for the NFToken | + +## Possible Errors + +* Any of the [universal error types][]. + + +{% include '_snippets/rippled_versions.md' %} +{% include '_snippets/rippled-api-links.md' %}