📡

XRPレジャーのNFT API

2023/05/22に公開

XRPレジャーとは

XRPレジャーはBitcoinやEthereumなどと同じ分散型のパブリックブロックチェーンです。ビットコインの初期コントリビュータを含む3人の開発者により2012年に開発され、PoWやPoSとは異なる独自のコンセンサスアルゴリズムが用いられています。

XRPレジャーのNFT

2022年10月にXRPレジャーメインネットにてバリデータによるオンレジャーのガバナンス投票の結果、NFT機能が利用可能になりました。
NFTの発行や売買に必要となる手数料が低く(0.00001XRP=0.001円程度)、売買に伴うロイヤリティに強制力があることが大きな特徴です。

利用可能なNFT API

XRPL NFTの情報を取得するためのAPIはさまざまな方法が存在します。本記事ではそのうちのいくつかを紹介します。

利用可能なAPIには次のようなものが存在します。

  • XRPLのコアサーバであるrippledから直接取得
  • XRPLのAPIサーバであるClioから取得
  • サードパーティサービスのAPIから取得

rippledやClioから取得する場合は独自のサーバを利用することでレート制限などを回避することができますが、サードパーティAPIを利用する場合はレート制限などが存在することがあります。

rippledから直接取得

アカウントの保有するNFT一覧を取得

  • account_nfts

https://xrpl.org/ja/account_nfts.html

import { Client } from 'xrpl'
const client = new Client('wss://xrplcluster.com')

const response = await client.request({
  command: "account_nfts",
  account: "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
  ledger_index: "validated"
})
console.log(response)
レスポンス
response
{
  "result": {
    "account": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx",
    "account_nfts": [
      {
        "Flags": 1,
        "Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
        "NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE0875B974D9F00000004",
        "NFTokenTaxon": 0,
        "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
        "nft_serial": 4
      },
      {
        "Flags": 1,
        "Issuer": "rGJUF4PvVkMNxG6Bg6AKg3avhrtQyAffcm",
        "NFTokenID": "00010000A7CAD27B688D14BA1A9FA5366554D6ADCF9CE087727D1EA000000005",
        "NFTokenTaxon": 0,
        "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
        "nft_serial": 5
      }
    ],
    "ledger_hash": "7971093E67341E325251268A5B7CD665EF450B126F67DF8384D964DF834961E8",
    "ledger_index": 2380540,
    "validated": true
  },
  "status": "success",
  "type": "response"
}

指定NFTの購入オファー一覧を取得

  • nft_buy_offers

https://xrpl.org/ja/nft_buy_offers.html

import { Client } from 'xrpl'
const client = new Client('wss://xrplcluster.com')

const response = await client.request({
  command: "nft_buy_offers",
  nft_id: "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007",
  ledger_index: "validated"
})
console.log(response)
レスポンス
response
{
  "result": {
    "nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007",
    "offers": [
      {
        "amount": "1500",
        "flags": 0,
        "nft_offer_index": "3212D26DB00031889D4EF7D9129BB0FA673B5B40B1759564486C0F0946BA203F",
        "owner": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx"
      }
    ]
  },
  "status": "success",
  "type": "response"
}

指定NFTの売却オファー一覧を取得

  • nft_sell_offers

https://xrpl.org/ja/nft_sell_offers.html

import { Client } from 'xrpl'
const client = new Client('wss://xrplcluster.com')

const response = await client.request({
  command: "nft_sell_offers",
  nft_id: "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007",
  ledger_index: "validated"
})
console.log(response)
レスポンス
response
{
  "result": {
    "nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007",
    "offers": [
      {
        "amount": "1000",
        "flags": 1,
        "nft_offer_index": "9E28E366573187F8E5B85CE301F229E061A619EE5A589EF740088F8843BF10A1",
        "owner": "rLpSRZ1E8JHyNDZeHYsQs1R5cwDCB3uuZt"
      }
    ]
  },
  "status": "success",
  "type": "response"
}

Clioから取得

指定NFTの情報を取得

  • nft_info

https://xrpl.org/ja/nft_info.html

import { Client } from 'xrpl'
const client = new Client('<clio server url>')

const response = await client.request({
  command: "nft_info",
  nft_id: "00080000B4F4AFC5FBCBD76873F18006173D2193467D3EE70000099B00000000"
})
console.log(response)
レスポンス
response
{
  "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"
    }
  ]
}

指定NFTに関連するトランザクション一覧を取得

  • nft_history

https://xrpl.org/ja/nft_history.html

import { Client } from 'xrpl'
const client = new Client('<clio server url>')

const response = await client.request({
  command: "nft_history",
  nft_id: "00080000B4F4AFC5FBCBD76873F18006173D2193467D3EE70000099B00000000"
})
console.log(response)
レスポンス
response
{
  "type": "response",
  "result": {
    "ledger_index_min": 21377274,
    "ledger_index_max": 27876163,
    "transactions": [
      {
        "meta": {
          "AffectedNodes": [
            {
              "CreatedNode": {
                "LedgerEntryType": "NFTokenPage",
                "LedgerIndex": "97707A94B298B50334C39FB46E245D4744C0F5B5FFFFFFFFFFFFFFFFFFFFFFFF",
                "NewFields": {
                  "NFTokens": [
                    {
                      "NFToken": {
                        "NFTokenID": "0008271097707A94B298B50334C39FB46E245D4744C0F5B50000099B00000000",
                        "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469"
                      }
                    }
                  ]
                }
              }
            },
            {
              "ModifiedNode": {
                "FinalFields": {
                  "Account": "rNoj836fhDm1eXaHHefPKs7iDb4gwzS7nc",
                  "Balance": "999999988",
                  "Flags": 0,
                  "MintedNFTokens": 1,
                  "OwnerCount": 1,
                  "Sequence": 27876155
                },
                "LedgerEntryType": "AccountRoot",
                "LedgerIndex": "AC0A2AD29B67B5E6DA1C5DE696440F59BCD8DEA0A4CF7AFD683D1489AAB1ED24",
                "PreviousFields": {
                  "Balance": "1000000000",
                  "OwnerCount": 0,
                  "Sequence": 27876154
                },
                "PreviousTxnID": "B483F0F7100658380E42BCF1B15AD59B71C4082635AD53B78D08A5198BBB6939",
                "PreviousTxnLgrSeq": 27876154
              }
            }
          ],
          "TransactionIndex": 0,
          "TransactionResult": "tesSUCCESS"
        },
        "tx": {
          "Account": "rNoj836fhDm1eXaHHefPKs7iDb4gwzS7nc",
          "Fee": "12",
          "Flags": 8,
          "LastLedgerSequence": 27876176,
          "NFTokenTaxon": 0,
          "Sequence": 27876154,
          "SigningPubKey": "EDDC20C6791F9FB13AFDCE2C717BE8779DD451BB556243F1FDBAA3CD159D68A9F6",
          "TransactionType": "NFTokenMint",
          "TransferFee": 10000,
          "TxnSignature": "EF657AB47E86FDC112BA054D90587DFE64A61604D9EDABAA7B01B61B56433E3C2AC5BF5AD2E8F5D2A9EAC22778F289094AC383A3F172B2304157A533E0C79802",
          "URI": "697066733A2F2F62616679626569676479727A74357366703775646D37687537367568377932366E6634646675796C71616266336F636C67747179353566627A6469",
          "hash": "E0774E1B8628E397C6E88F67D4424E55E4C81324607B19318255310A6FBAA4A2",
          "ledger_index": 27876158,
          "date": 735167200
        },
        "validated": true
      }
    ],
    "nft_id": "0008271097707A94B298B50334C39FB46E245D4744C0F5B50000099B00000000",
    "validated": true
  },
  "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"
    }
  ]
}

XRP Ledger Services NFT API

xrpl.servicesが提供するNFT APIです

https://api.xrpldata.com/docs/static/index.html#/Funded Status/post_xls20_nfts_funded_offers

このAPIはレート制限が設定されており、一定以上のアクセスを必要とする場合は、有料プランを購入する必要があります。

NFTの全発行者一覧を取得

  • /xls20-nfts/all/issuers
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/all/issuers' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79851092,
    "ledger_hash": "34A3B64327553F5D4DA88737D994D8A672DC39711AD416C2AEAA107FC97A3576",
    "ledger_close": "2023-May-18 02:16:30.000000000 UTC",
    "ledger_close_ms": 737691390
  },
  "data": {
    "issuers": [
      "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
      "r3S24HUCKTVdphMCX8URkbZUPkXU6SfVgm",
      "rRVLLRSgfcuuDBA4GT7gfAmTXvovsvZCH",
      "rwtQVAqB7NWyTMnU8vD1DQPZiP2DYDFk9c",
      "rKEGKWH2wKCyY2GNDtkNRqXhnYEsXZM2dP",
      "rBLADEZyJhCtVS1vQm3UcvLac713KyGScN",
      ...
    ]
  }
}

アカウントの発行NFT一覧を取得

  • /xls20-nfts/issuer/{issuer}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/issuer/rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79851202,
    "ledger_hash": "1D452F293805A741A754D97EE2AF8AA6D2B0F37D782B9B384F6991CC71499CDB",
    "ledger_close": "2023-May-18 02:23:30.000000000 UTC",
    "ledger_close_ms": 737691810
  },
  "data": {
    "issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
    "nfts": [
      {
        "NFTokenID": "000813889418964705A72A064CEBEBFD8E7A04802B1A2F5F0000147500000000",
        "Issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
        "Owner": "raucmqwmgqDTmYzydVfXnRw4MMoF9Lv7Do",
        "Taxon": 7662,
        "TransferFee": 5000,
        "Flags": 8,
        "Sequence": 0,
        "URI": "697066733A2F2F62616679626569657A6C74376C646D66707164786670746966673534356C6E6472636F74726562717065376F6D7A34647173337273357A643761752F6D657461646174612E6A736F6E"
      },
      {
        "NFTokenID": "000813889418964705A72A064CEBEBFD8E7A04802B1A2F5F16E5C77200000001",
        "Issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
        "Owner": "raucmqwmgqDTmYzydVfXnRw4MMoF9Lv7Do",
        "Taxon": 7662,
        "TransferFee": 5000,
        "Flags": 8,
        "Sequence": 1,
        "URI": "697066733A2F2F626166796265696272696878797363727576666B6D367336713679326D7277767A65697A7279683678356D77377037336D64346466376D73626F692F6D657461646174612E6A736F6E"
      },
      ...
    ]
  }
}

アカウントの発行したNFTのTaxon一覧を取得

  • /xls20-nfts/taxon/{issuer}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/taxon/rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79851266,
    "ledger_hash": "C709AE63ED5BF6E3847BD60875FFAACA9CA72932445CA75FAEE3829CE50B0B27",
    "ledger_close": "2023-May-18 02:27:31.000000000 UTC",
    "ledger_close_ms": 737692051
  },
  "data": {
    "issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
    "taxons": [
      7662
    ]
  }
}

アカウントの発行したNFTのうちTaxonが一致するNFT一覧を取得

  • /xls20-nfts/issuer/{issuer}/taxon/{taxon}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/issuer/rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg/taxon/7662' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79851304,
    "ledger_hash": "F3FD1F4C6B8AFF3AD3709B5CC2CE225194218A53217DFAB5762A3799FBBAFF82",
    "ledger_close": "2023-May-18 02:30:00.000000000 UTC",
    "ledger_close_ms": 737692200
  },
  "data": {
    "issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
    "taxon": "7662",
    "nfts": [
      {
        "NFTokenID": "000813889418964705A72A064CEBEBFD8E7A04802B1A2F5F0000147500000000",
        "Issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
        "Owner": "raucmqwmgqDTmYzydVfXnRw4MMoF9Lv7Do",
        "Taxon": 7662,
        "TransferFee": 5000,
        "Flags": 8,
        "Sequence": 0,
        "URI": "697066733A2F2F62616679626569657A6C74376C646D66707164786670746966673534356C6E6472636F74726562717065376F6D7A34647173337273357A643761752F6D657461646174612E6A736F6E"
      },
      {
        "NFTokenID": "000813889418964705A72A064CEBEBFD8E7A04802B1A2F5F16E5C77200000001",
        "Issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
        "Owner": "raucmqwmgqDTmYzydVfXnRw4MMoF9Lv7Do",
        "Taxon": 7662,
        "TransferFee": 5000,
        "Flags": 8,
        "Sequence": 1,
        "URI": "697066733A2F2F626166796265696272696878797363727576666B6D367336713679326D7277767A65697A7279683678356D77377037336D64346466376D73626F692F6D657461646174612E6A736F6E"
      },
      {
        "NFTokenID": "000813889418964705A72A064CEBEBFD8E7A04802B1A2F5F2DCBB67300000002",
        "Issuer": "rNWhTjwvr42NjrBQ1DvGWRtVc6vwn7vXzg",
        "Owner": "raucmqwmgqDTmYzydVfXnRw4MMoF9Lv7Do",
        "Taxon": 7662,
        "TransferFee": 5000,
        "Flags": 8,
        "Sequence": 2,
        "URI": "697066733A2F2F626166796265696471776178796E64786571667A3779696B7269733432617A7174757167663562787935663470796732796E776C366775723377612F6D657461646174612E6A736F6E"
      },
      ...
    ]
  }
}

アカウントが保有するNFT一覧を取得

  • /xls20-nfts/owner/{owner}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/owner/rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79851353,
    "ledger_hash": "D13E6687E31EDB8CB664A7AD431E04DBDE6D00D83E8B574CB685455EBE69F714",
    "ledger_close": "2023-May-18 02:33:02.000000000 UTC",
    "ledger_close_ms": 737692382
  },
  "data": {
    "owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
    "nfts": [
      {
        "NFTokenID": "000A1EA4511569DD226DFBE9472AC240000FCA5F212289F4DE07D4DC0000008E",
        "Issuer": "r3PjP4q4U3WW6os3GAPBykzSNfdFiiHNFT",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Taxon": 1836985589,
        "TransferFee": 7844,
        "Flags": 10,
        "Sequence": 142,
        "URI": "697066733A2F2F6261666B726569686477756274717678376B676B6D326237767334756F7A376968763373733267676134736F747279646D7861726870776C693234"
      },
      {
        "NFTokenID": "000B1388046D18FE322220FB5538108533015D485EA2D12E00000A7C00000000",
        "Issuer": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Taxon": 999,
        "TransferFee": 5000,
        "Flags": 11,
        "Sequence": 0,
        "URI": "697066733A2F2F6261666B7265696334676C7377376E636A6864667378646566326775676775657567337664706F716477766175746866686875793234336C626771"
      },
      {
        "NFTokenID": "000A00004B50699E253C5098DEFE3A0872A79D129172F49623194AA40000020F",
        "Issuer": "rf1NrYAsv92UPDd8nyCG4A3bez7dhYE61r",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Taxon": 14,
        "TransferFee": 0,
        "Flags": 10,
        "Sequence": 527,
        "URI": "697066733A2F2F6261667962656966366A7465756D757A66746C36616C616A34377579356D7533766974646D6A78776D357874336E6C33367A6D79616D76657367692F31352E6A736F6E"
      },
      ...
    ]
  }
}

特定のNFTの情報を取得

  • /xls20-nfts/nft/{nftokenid}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/nft/000A1EA4511569DD226DFBE9472AC240000FCA5F212289F4DE07D4DC0000008E' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79851391,
    "ledger_hash": "AB41C72EDF26E24B23DB61B1B24C3BD60F86D412B0F15FAE35FF86E47AF9F116",
    "ledger_close": "2023-May-18 02:35:31.000000000 UTC",
    "ledger_close_ms": 737692531
  },
  "data": {
    "nftokenid": "000A1EA4511569DD226DFBE9472AC240000FCA5F212289F4DE07D4DC0000008E",
    "nft": {
      "NFTokenID": "000A1EA4511569DD226DFBE9472AC240000FCA5F212289F4DE07D4DC0000008E",
      "Issuer": "r3PjP4q4U3WW6os3GAPBykzSNfdFiiHNFT",
      "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
      "Taxon": 1836985589,
      "TransferFee": 7844,
      "Flags": 10,
      "Sequence": 142,
      "URI": "697066733A2F2F6261666B726569686477756274717678376B676B6D326237767334756F7A376968763373733267676134736F747279646D7861726870776C693234"
    }
  }
}

特定のURIを持つNFT一覧を取得

  • /xls20-nfts/uri
curl -X 'POST' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/uri' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "uri": "697066733A2F2F6261666B726569686477756274717678376B676B6D326237767334756F7A376968763373733267676134736F747279646D7861726870776C693234"
}'
レスポンス
{
  "info": {
    "ledger_index": 79851410,
    "ledger_hash": "BB296BFBF32C32BE1CD19E7AD3160CA184C5C65BD30E2A11AD1C9BABAE068E99",
    "ledger_close": "2023-May-18 02:36:42.000000000 UTC",
    "ledger_close_ms": 737692602
  },
  "data": {
    "uri": "697066733A2F2F6261666B726569686477756274717678376B676B6D326237767334756F7A376968763373733267676134736F747279646D7861726870776C693234",
    "nfts": [
      {
        "NFTokenID": "000A1EA4511569DD226DFBE9472AC240000FCA5F212289F4DE07D4DC0000008E",
        "Issuer": "r3PjP4q4U3WW6os3GAPBykzSNfdFiiHNFT",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Taxon": 1836985589,
        "TransferFee": 7844,
        "Flags": 10,
        "Sequence": 142,
        "URI": "697066733A2F2F6261666B726569686477756274717678376B676B6D326237767334756F7A376968763373733267676134736F747279646D7861726870776C693234"
      }
    ]
  }
}

特定のアカウントが発行したNFTに対するオファー一覧を取得

  • /xls20-nfts/offers/issuer/{issuer}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offers/issuer/rQztVDFtYH7uEdbFyDKubocDqvb9H2Zat' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79851982,
    "ledger_hash": "6989EFC77319C36A2048CB47F2A3395173ED7691CDC8BAA1BA559E33B31444A7",
    "ledger_close": "2023-May-18 03:13:51.000000000 UTC",
    "ledger_close_ms": 737694831
  },
  "data": {
    "issuer": "rQztVDFtYH7uEdbFyDKubocDqvb9H2Zat",
    "offers": [
      {
        "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143950000099A00000000",
        "NFTokenOwner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
        "buy": [],
        "sell": [
          {
            "Amount": "14000000",
            "Flags": 1,
            "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143950000099A00000000",
            "OfferID": "3B5D4EF4016717726D888CCCF0D341D5F4BA307367573585DA549D507AE23380",
            "Owner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
            "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
            "Expiration": null
          }
        ]
      },
      {
        "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC11439516E5DA9D00000001",
        "NFTokenOwner": "rpVWbaJUMvEPWkF3j9NVrcPoUyBGn3WyDo",
        "buy": [],
        "sell": [
          {
            "Amount": "10000000",
            "Flags": 1,
            "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC11439516E5DA9D00000001",
            "OfferID": "1D8C22CC9C185C4F5BC42DEEE6987FAF8C71B3501AFA12DF45C6B57493FB0741",
            "Owner": "rpVWbaJUMvEPWkF3j9NVrcPoUyBGn3WyDo",
            "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
            "Expiration": null
          }
        ]
      },
      {
        "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143952DCBAB9C00000002",
        "NFTokenOwner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
        "buy": [],
        "sell": [
          {
            "Amount": "25000000",
            "Flags": 1,
            "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143952DCBAB9C00000002",
            "OfferID": "A31B9C556D5F03DA7AA532ED4B48B8DDE7107B5A209BF54D7A7804E2443101FC",
            "Owner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
            "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
            "Expiration": null
          }
        ]
      },
      ...
    ]
  }
}

特定のアカウントが発行した特定のTaxonのNFTに対するオファー一覧を取得

  • /xls20-nfts/offers/issuer/{issuer}/taxon/{taxon}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offers/issuer/rQztVDFtYH7uEdbFyDKubocDqvb9H2Zat/taxon/1' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852209,
    "ledger_hash": "B07D69F46E8424BC8097F44C168AE349A049399A693458A5724F2748132757DF",
    "ledger_close": "2023-May-18 03:28:32.000000000 UTC",
    "ledger_close_ms": 737695712
  },
  "data": {
    "issuer": "rQztVDFtYH7uEdbFyDKubocDqvb9H2Zat",
    "taxon": "1",
    "offers": [
      {
        "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143950000099A00000000",
        "NFTokenOwner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
        "buy": [],
        "sell": [
          {
            "Amount": "14000000",
            "Flags": 1,
            "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143950000099A00000000",
            "OfferID": "3B5D4EF4016717726D888CCCF0D341D5F4BA307367573585DA549D507AE23380",
            "Owner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
            "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
            "Expiration": null
          }
        ]
      },
      {
        "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC11439516E5DA9D00000001",
        "NFTokenOwner": "rpVWbaJUMvEPWkF3j9NVrcPoUyBGn3WyDo",
        "buy": [],
        "sell": [
          {
            "Amount": "10000000",
            "Flags": 1,
            "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC11439516E5DA9D00000001",
            "OfferID": "1D8C22CC9C185C4F5BC42DEEE6987FAF8C71B3501AFA12DF45C6B57493FB0741",
            "Owner": "rpVWbaJUMvEPWkF3j9NVrcPoUyBGn3WyDo",
            "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
            "Expiration": null
          }
        ]
      },
      {
        "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143952DCBAB9C00000002",
        "NFTokenOwner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
        "buy": [],
        "sell": [
          {
            "Amount": "25000000",
            "Flags": 1,
            "NFTokenID": "00081F400489E3ABBC03C44F8A0F0ADC21456B79DC1143952DCBAB9C00000002",
            "OfferID": "A31B9C556D5F03DA7AA532ED4B48B8DDE7107B5A209BF54D7A7804E2443101FC",
            "Owner": "rEqtQj662PMqja6Cb3pyK5V6xi2RGbcFxD",
            "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
            "Expiration": null
          }
        ]
      },
      ...
    ]
  }
}

特定のアカウントが保有するNFTに対するオファー一覧を取得

  • /xls20-nfts/offers/nftowner/{nftowner}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offers/nftowner/rUQNndqMAbYu6LxzoKbRLLJKALKw5ppAKN' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852264,
    "ledger_hash": "4BC7E03A7980BFAA504C43A1F2CF6C2B323568E194FE3E0087AB267E08D35E04",
    "ledger_close": "2023-May-18 03:32:10.000000000 UTC",
    "ledger_close_ms": 737695930
  },
  "data": {
    "nftowner": "rUQNndqMAbYu6LxzoKbRLLJKALKw5ppAKN",
    "offers": [
      {
        "NFTokenID": "000822B0C144ED96F00D631BC7930AE66A59D6DE955ED844784AD180000001E6",
        "NFTokenOwner": "rUQNndqMAbYu6LxzoKbRLLJKALKw5ppAKN",
        "buy": [
          {
            "Amount": "10000000",
            "Flags": 0,
            "NFTokenID": "000822B0C144ED96F00D631BC7930AE66A59D6DE955ED844784AD180000001E6",
            "OfferID": "D3D6FA50B8C52FC97BA318FE674D3F5F70F2162DF402F9099BCDB50B18361DC4",
            "Owner": "rsZQRCc3bjJKhFt6ta6WPgctteeJ9j2PBn",
            "Destination": null,
            "Expiration": null
          }
        ],
        "sell": []
      },
      {
        "NFTokenID": "000822B0C144ED96F00D631BC7930AE66A59D6DE955ED844C1B453C40000002A",
        "NFTokenOwner": "rUQNndqMAbYu6LxzoKbRLLJKALKw5ppAKN",
        "buy": [
          {
            "Amount": {
              "currency": "7853504543544152000000000000000000000000",
              "issuer": "rh5jzTCdMRCVjQ7LT6zucjezC47KATkuvv",
              "value": "13"
            },
            "Flags": 0,
            "NFTokenID": "000822B0C144ED96F00D631BC7930AE66A59D6DE955ED844C1B453C40000002A",
            "OfferID": "D9B7E55DCD6508F03B532435A9AEFE8D61FF9EF38DC8EC740D7EE24F80344AA1",
            "Owner": "rBj3KjYzdkgKKi2UDrAmuRkufaotyJcUD1",
            "Destination": null,
            "Expiration": null
          }
        ],
        "sell": []
      },
      ...
    ]
  }
}

特定のアカウントが保有するオファー一覧を取得

  • /xls20-nfts/offers/offerowner/{offerowner}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offers/offerowner/rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852437,
    "ledger_hash": "0E5B4DE16F1485F5068620E8BFB077E48941BF6B5B122E68EF4F765102801934",
    "ledger_close": "2023-May-18 03:43:21.000000000 UTC",
    "ledger_close_ms": 737696601
  },
  "data": {
    "offerowner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
    "offers": [
      {
        "Amount": "0",
        "Flags": 1,
        "NFTokenID": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
        "OfferID": "345024EF8DCA132BD6EC4207DE0EA35C9E17AA893BDD543165027F671A41A042",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Destination": "rsENhQhpmYsgzqZBfZu6rqhW3y1J3jZ81t",
        "Expiration": null
      },
      {
        "Amount": "100000000",
        "Flags": 0,
        "NFTokenID": "00081388C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D56F2BB2C200000CE7",
        "OfferID": "520FD25B99592DCB891788FEFF098F18C1A76C272FC3CB3631CC1E386B4EB598",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
        "Expiration": 738475946
      }
    ]
  }
}

特定のアカウントに対するオファー一覧を取得

  • /xls20-nfts/offers/offerdestination/{offerdestination}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offers/offerdestination/rUQNndqMAbYu6LxzoKbRLLJKALKw5ppAKN' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852515,
    "ledger_hash": "A3C6714C1938413E3B0D603FBF8164D9DD98FBF4A962B0C4AA6258748321C344",
    "ledger_close": "2023-May-18 03:48:31.000000000 UTC",
    "ledger_close_ms": 737696911
  },
  "data": {
    "offerdestination": "rUQNndqMAbYu6LxzoKbRLLJKALKw5ppAKN",
    "offers": [
      {
        "Amount": "0",
        "Flags": 1,
        "NFTokenID": "00081AF4C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D5DE18860300001724",
        "OfferID": "A1B5838B95C53906D21186C1004075F2EF08094E9F5C54CF070A68B114D5F2D7",
        "Owner": "rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2",
        "Destination": "rUQNndqMAbYu6LxzoKbRLLJKALKw5ppAKN",
        "Expiration": null
      }
    ]
  }
}

特定のアカウントに関連するオファーの一覧を取得

  • /xls20-nfts/offers/all/account/{xrplaccount}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offers/all/account/rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852531,
    "ledger_hash": "90875EF556AB30F0452465351405DADAA256E295F2C4585D4FA835DA3CADCA01",
    "ledger_close": "2023-May-18 03:49:31.000000000 UTC",
    "ledger_close_ms": 737696971
  },
  "data": {
    "xrplaccount": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
    "offers_owned": [
      {
        "Amount": "0",
        "Flags": 1,
        "NFTokenID": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
        "OfferID": "345024EF8DCA132BD6EC4207DE0EA35C9E17AA893BDD543165027F671A41A042",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Destination": "rsENhQhpmYsgzqZBfZu6rqhW3y1J3jZ81t",
        "Expiration": null
      },
      {
        "Amount": "100000000",
        "Flags": 0,
        "NFTokenID": "00081388C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D56F2BB2C200000CE7",
        "OfferID": "520FD25B99592DCB891788FEFF098F18C1A76C272FC3CB3631CC1E386B4EB598",
        "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "Destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
        "Expiration": 738475946
      }
    ],
    "offers_for_own_nfts": [
      {
        "NFTokenID": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
        "NFTokenOwner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
        "buy": [],
        "sell": [
          {
            "Amount": "0",
            "Flags": 1,
            "NFTokenID": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
            "OfferID": "345024EF8DCA132BD6EC4207DE0EA35C9E17AA893BDD543165027F671A41A042",
            "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
            "Destination": "rsENhQhpmYsgzqZBfZu6rqhW3y1J3jZ81t",
            "Expiration": null
          }
        ]
      }
    ],
    "offers_as_destination": []
  }
}

特定のオファー情報を取得

  • /xls20-nfts/offer/id/{offerid}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offer/id/345024EF8DCA132BD6EC4207DE0EA35C9E17AA893BDD543165027F671A41A042' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852561,
    "ledger_hash": "8D84366F635506626865D16026A96201B3DE5B68C24248A38AF4F3CEB4BF2DC2",
    "ledger_close": "2023-May-18 03:51:30.000000000 UTC",
    "ledger_close_ms": 737697090
  },
  "data": {
    "offerid": "345024EF8DCA132BD6EC4207DE0EA35C9E17AA893BDD543165027F671A41A042",
    "offer": {
      "Amount": "0",
      "Flags": 1,
      "NFTokenID": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
      "OfferID": "345024EF8DCA132BD6EC4207DE0EA35C9E17AA893BDD543165027F671A41A042",
      "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
      "Destination": "rsENhQhpmYsgzqZBfZu6rqhW3y1J3jZ81t",
      "Expiration": null
    }
  }
}

特定のNFTのオファー一覧を取得

  • /xls20-nfts/offers/nft/{nftokenid}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/offers/nft/000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852579,
    "ledger_hash": "ECEC2997789210D0E766600B8845DB2084B169E8D3823F7A86DA8BDEA8AD9079",
    "ledger_close": "2023-May-18 03:52:40.000000000 UTC",
    "ledger_close_ms": 737697160
  },
  "data": {
    "nftokenid": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
    "offers": {
      "NFTokenID": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
      "NFTokenOwner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
      "buy": [],
      "sell": [
        {
          "Amount": "0",
          "Flags": 1,
          "NFTokenID": "000800000758C85CD9D3BAD65292943107DB88D5B646717FA4D4311000000077",
          "OfferID": "345024EF8DCA132BD6EC4207DE0EA35C9E17AA893BDD543165027F671A41A042",
          "Owner": "rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM",
          "Destination": "rsENhQhpmYsgzqZBfZu6rqhW3y1J3jZ81t",
          "Expiration": null
        }
      ]
    }
  }
}

特定の発行アカウントの統計データを取得

  • /xls20-nfts/stats/issuer/{issuer}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/stats/issuer/rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852716,
    "ledger_hash": "3565DAD29340DDC3F70C544060FC8090DED197DA5972550B3EDCCDD49A99A2C3",
    "ledger_close": "2023-May-18 04:01:31.000000000 UTC",
    "ledger_close_ms": 737697691
  },
  "data": {
    "issuer": "rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2",
    "collection_info": {
      "issuer": "rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2",
      "taxon": null,
      "nfts": 13178,
      "unique_owners": 1083,
      "nfts_for_sale": 1402,
      "buy_offers": 330,
      "sell_offers": 1449,
      "floor": [
        {
          "issuer": "XRP_in_drops",
          "currency": "XRP",
          "amount": 8000000
        }
      ],
      "open_market": {
        "nfts_for_sale": 24,
        "buy_offers": 0,
        "sell_offers": 24,
        "floor": [
          {
            "issuer": "XRP_in_drops",
            "currency": "XRP",
            "amount": 100000000
          }
        ]
      },
      "market_places": [
        {
          "mp_account": "rpZqTPC8GvrSvEfFsUuHkmPCg29GdQuXhC",
          "nfts_for_sale": 75,
          "buy_offers": 0,
          "sell_offers": 75,
          "floor": [
            {
              "issuer": "XRP_in_drops",
              "currency": "XRP",
              "amount": 50000000
            }
          ]
        },
        {
          "mp_account": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
          "nfts_for_sale": 1349,
          "buy_offers": 327,
          "sell_offers": 1350,
          "floor": [
            {
              "issuer": "XRP_in_drops",
              "currency": "XRP",
              "amount": 8000000
            }
          ]
        },
        {
          "mp_account": "rXMART8usFd5kABXCayoP6ZfB35b4v43t",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        },
        {
          "mp_account": "rPLe3RVbfa3HiSj9cLqWvu3Huxk9qrckW4",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        },
        {
          "mp_account": "rpwubYKzGGECiTVHjCmNQbCgeUrHGnMngE",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        },
        {
          "mp_account": "rDeizxSRo6JHjKnih9ivpPkyD2EgXQvhSB",
          "nfts_for_sale": 0,
          "buy_offers": 1,
          "sell_offers": 0,
          "floor": []
        }
      ]
    }
  }
}

特定の発行アカウントの特定Taxonの統計データを取得

  • /xls20-nfts/stats/issuer/{issuer}/taxon/{taxon}
curl -X 'GET' \
  'https://api.xrpldata.com/api/v1/xls20-nfts/stats/issuer/rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2/taxon/420' \
  -H 'accept: application/json'
レスポンス
{
  "info": {
    "ledger_index": 79852732,
    "ledger_hash": "5B9E77BDEE748222866F15BDCC1BFAFE9BCDFA98AE8BEAE6832DE7C15A22296C",
    "ledger_close": "2023-May-18 04:02:31.000000000 UTC",
    "ledger_close_ms": 737697751
  },
  "data": {
    "issuer": "rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2",
    "taxon": "420",
    "collection_info": {
      "issuer": "rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2",
      "taxon": "420",
      "nfts": 4405,
      "unique_owners": 401,
      "nfts_for_sale": 101,
      "buy_offers": 1,
      "sell_offers": 101,
      "floor": [
        {
          "issuer": "XRP_in_drops",
          "currency": "XRP",
          "amount": 8000000
        }
      ],
      "open_market": {
        "nfts_for_sale": 0,
        "buy_offers": 0,
        "sell_offers": 0,
        "floor": []
      },
      "market_places": [
        {
          "mp_account": "rpZqTPC8GvrSvEfFsUuHkmPCg29GdQuXhC",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        },
        {
          "mp_account": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
          "nfts_for_sale": 101,
          "buy_offers": 1,
          "sell_offers": 101,
          "floor": [
            {
              "issuer": "XRP_in_drops",
              "currency": "XRP",
              "amount": 8000000
            }
          ]
        },
        {
          "mp_account": "rXMART8usFd5kABXCayoP6ZfB35b4v43t",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        },
        {
          "mp_account": "rPLe3RVbfa3HiSj9cLqWvu3Huxk9qrckW4",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        },
        {
          "mp_account": "rpwubYKzGGECiTVHjCmNQbCgeUrHGnMngE",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        },
        {
          "mp_account": "rDeizxSRo6JHjKnih9ivpPkyD2EgXQvhSB",
          "nfts_for_sale": 0,
          "buy_offers": 0,
          "sell_offers": 0,
          "floor": []
        }
      ]
    }
  }
}

Bithomp API

Bithompが提供するNFT APIです

https://docs.bithomp.com/?shell#nft-xls-20

このAPIはレート制限が設定されており、一定以上のアクセスを必要とする場合は、有料プランを購入する必要があります。

特定のNFTの情報を取得

  • /nft/<nftID>
curl "https://bithomp.com/api/v2/nft/000861A8BB208DE9CB0384F2D46901203CA958EEA4C0AF286862C7F90000005E?sellOffers=true&buyOffers=true&uri=true&history=true"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
レスポンス
{
  "flags": {
    "burnable": false,
    "onlyXRP": false,
    "trustLine": false,
    "transferable": true
  },
  "issuer": "rwzGnXc31zAeSQiKgGqFiJJcALhy8TUqb8",
  "nftokenID": "000813886D8D6DAC402E0D27297E9485F4D7E1125D656678258B866100000018",
  "nftokenTaxon": 10194,
  "transferFee": 5000,
  "sequence": 24,
  "owner": "rpL8hpPgdep5MrWCFfWx2qupiAhtPrMcJu",
  "uri": "68747470733A2F2F626166796265696734676876366263666B6E746B793234616564667A6B757276366C746A6476736763623575736E77336A736965736D68706769652E697066732E7733732E6C696E6B2F6D657461646174612E6A736F6E",
  "issuedAt": 1666885020,
  "ownerChangedAt": 1666885052,
  "deletedAt": null,
  "history": [
    {
      "owner": "rXMART8usFd5kABXCayoP6ZfB35b4v43t",
      "changedAt": 1666885020,
      "ledgerIndex": 6860081,
      "txHash": "453C088321BA9AFCB59B1B7B79790E5ECF53EF969B95845C494604E26C51E848",
      "marketplace": "onxrp.com"
    },
    {
      "owner": "rpL8hpPgdep5MrWCFfWx2qupiAhtPrMcJu",
      "changedAt": 1666885052,
      "ledgerIndex": 6860093,
      "txHash": "103F0D35348C58D9E5301EED79906ED3CDBBD44EFFF65857BE8BFFD572F617A8",
      "marketplace": "xrpcafe.com"
    }
  ],
  "sellOffers": [
    {
      "amount": "850000000",
      "index": "B54B49719DC80B40D66E229FC02CC5DABF7D4496B395F87C369FA6235AA6B37E",
      "owner": "rGJn1uZxDX4ksxRPYuj2smP7ZshdwjeSTG",
      "destination": "rM3UEiJzg7nMorRhdED5savWDt1Gqb6TLw",
      "expiration": 1582437632,
      "createdAt": 1582437132
    },
    {
      "amount": {
        "currency": "534F4C4F00000000000000000000000000000000",
        "issuer": "rsoLo2S1kiGeCcn6hCUXVrCpGMWLrRrLZz",
        "value": "10000"
      },
      "offerIndex": "E992835C148C9EAA7A93EABDD397A84333F27F99DA386255378A3C16A8B0DEF3",
      "owner": "r9spUPhPBfB6kQeF6vPhwmtFwRhBh2JUCG",
      "expiration": null,
      "destination": null,
      "createdAt": 1670721431,
      "createdLedgerIndex": 76344438,
      "createdTxHash": "616CAAAC1C737C964C4A3B27DEAFE2F172D5A82FDD9342A1F5C677ACABC5AE7B"
    }
  ],
  "buyOffers": [
    {
      "amount": "935000000",
      "offerIndex": "3D47DA5CE9E4D9DB7D8D1FE78E9E1ECA19D8DE21A29C78FD95A856ADF2472674",
      "owner": "rN5wU5VpqfxZ5q9duP3EhP8rw8y9xR1TNL",
      "destination": "rM3UEiJzg7nMorRhdED5savWDt1Gqb6TLw",
      "expiration": 1582437632,
      "createdAt": 1582437132,
      "createdLedgerIndex": 76332437,
      "createdTxHash": "616CAAAC1C737C964C4A3B27DEAFE2F172D5A82FDD9342A1F5C677ACABC5AE7B"
    }
  ]
}

特定のNFTの取引高情報の取得

  • /nft-offer/<nftOfferID>
curl "https://bithomp.com/api/v2/nft-offer/3E8E975E0CFDF2EDE76E0925EB4393A1899061047DE1F46F0DEEA783F5F1A673"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
レスポンス
{
  "nftokenID": "00081B581189F5687DBB7516339D6CCB5593D96622AD82DFE9E08966000018B7",
  "offerIndex": "3E8E975E0CFDF2EDE76E0925EB4393A1899061047DE1F46F0DEEA783F5F1A673",
  "createdAt": 1671813891,
  "createdLedgerIndex": 76627086,
  "createdTxHash": "C78692F7CE2B6D207E12BAF28BBE7BAD4D5553FEFCAC81A49FA0D7F2B6295AFD",
  "account": "rDpLcKCi18ixgzJEseKbi2krRGTWZM69gX",
  "owner": "rDpLcKCi18ixgzJEseKbi2krRGTWZM69gX",
  "destination": "rpZqTPC8GvrSvEfFsUuHkmPCg29GdQuXhC",
  "expiration": 1672009200,
  "amount": "1800000000",
  "flags": {
    "sellToken": false
  },
  "canceledAt": 1672062241,
  "canceledLedgerIndex": 76690834,
  "canceledTxHash": "BE00F6A40D399D66E15C5698A9F583A47FA79D47DB9E7D5B158679C97E95C202",
  "nftoken": {
    "flags": {
      "burnable": false,
      "onlyXRP": false,
      "trustLine": false,
      "transferable": true
    },
    "issuer": "rpbjkoncKiv1LkPWShzZksqYPzKXmUhTW7",
    "nftokenID": "00081B581189F5687DBB7516339D6CCB5593D96622AD82DFE9E08966000018B7",
    "nftokenTaxon": 52,
    "transferFee": 7000,
    "sequence": 6327,
    "owner": "rhrvq8Bfn1NwQQDDProJY4F822DNbcQGj2",
    "ownerDetails": {
      "username": "XPUNKS",
      "service": "XPUNKS"
    },
    "uri": null,
    "issuedAt": 1671616340,
    "ownerChangedAt": 1672061721,
    "deletedAt": null,
    "url": "https://marketplace-api.onxrp.com/api/metadata/00081B581189F5687DBB7516339D6CCB5593D96622AD82DFE9E08966000018B7",
    "metadata": {
      "dna": "81165c5b185d49e57302b8bf936ba66ded1a195476f35fc74d2d8c8d638d0c1f",
      "name": "XPUNKS #5658",
      "description": "The XPUNK collection consists of 10,000 uniquely generated characters on a 24-by 24-pixel canvas. They are distinguished by their colourful traits and trademark X-mouth that represents their love for the XRPL.",
      "image": "ipfs://QmUdz7aunEkMKWjTKT71QiJeKRX3MQSDC1chDUcyhwuYQ1",
      "imageHash": "1591d36c09c3340569582379574b8e899b550daa0d7bfecfe648fba469aaa2ee",
      "edition": 2687,
      "date": 1667163549733,
      "attributes": [
        {
          "trait_type": "Face",
          "value": "Male 3"
        },
        {
          "trait_type": "Eye Characteristics",
          "value": "Fresh"
        },
        {
          "trait_type": "Eyes",
          "value": "Black Right"
        },
        {
          "trait_type": "Neck Wearable",
          "value": "No Attribute"
        },
        {
          "trait_type": "Hair & Hats",
          "value": "Bandana"
        },
        {
          "trait_type": "Facial Hair",
          "value": "Thick Beard Blonde"
        },
        {
          "trait_type": "Eye Wearables",
          "value": "Sunglasses in Hair Black"
        },
        {
          "trait_type": "Mouth Attribute",
          "value": "Pipe Old School"
        },
        {
          "trait_type": "Piercings",
          "value": "No Attribute"
        }
      ],
      "schema": "ipfs://QmNpi8rcXEkohca8iXu7zysKKSJYqCvBJn3xJwga8jXqWU",
      "nftType": "art.v0",
      "collection": {
        "name": "XPUNKS",
        "description": "The XPUNK collection consists of 10,000 uniquely generated characters on a 24-by-24-pixel canvas. They are distinguished by their colorful traits and trademark X-mouth that represents their love for the XRPL."
      }
    },
    "issuerDetails": {
      "username": "XPUNKS",
      "service": "XPUNKS"
    },
    "ownerDetails": {
      "username": null,
      "service": null
    }
  },
  "accountDetails": {
    "username": null,
    "service": null
  },
  "ownerDetails": {
    "username": null,
    "service": null
  },
  "destinationDetails": {
    "username": null,
    "service": null
  },
  "issuerDetails": {
    "username": "XPUNKS",
    "service": "XPUNKS"
  }
}

指定条件でのNFT一覧を取得

  • /nfts
curl "https://bithomp.com/api/v2/nfts?owner=rBeistBLWtUskF2YzzSwMSM2tgsK7ZD7ME"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
レスポンス
{
  "owner": "rBeistBLWtUskF2YzzSwMSM2tgsK7ZD7ME",
  "ownerDetails": {
    "username": "Zerpmon",
    "service": "Zerpmon"
  },
  "nfts": [
    {
      "flags": {
        "burnable": false,
        "onlyXRP": false,
        "trustLine": false,
        "transferable": true
      },
      "issuer": "rBeistBLWtUskF2YzzSwMSM2tgsK7ZD7ME",
      "nftokenID": "0008138874D997D20619837CF3C7E1050A785E9F9AC53D7E8542EAAC00000011",
      "nftokenTaxon": 0,
      "transferFee": 5000,
      "uri": "697066733A2F2F516D627169774D736D6B4C6971794473465A664D534D566465464A674D4139514A626D735131636F4D32564343452F382E6A736F6E",
      "url": "https://cloudflare-ipfs.com/ipfs/QmbqiwMsmkLiqyDsFZfMSMVdeFJgMA9QJbmsQ1coM2VCCE/8.json",
      "sequence": 17,
      "issuerDetails": {
        "username": "Zerpmon",
        "service": "Zerpmon"
      },
      "metadata": {
        "name": "Purrf",
        "description": "Zerpmon is an original collection of digital collectible creatures that live on the XRPL, with each one being a unique 1 of 1 art piece. The Zerpmon project is fueled by a passion for high-quality art and in-depth story telling. For more information on the vision of Zerpmon, visit www.zerpmon.world",
        "image": "ipfs://Qmf52STemfXu79ovVAdjRneb7kKdtYJNvzYjoxWubbu4Vx/8.png",
        "attributes": [
          {
            "trait_type": "Zerpdex Number",
            "value": "Zerpmon Collab #8"
          },
          {
            "trait_type": "Type",
            "value": "Fairy"
          },
          {
            "trait_type": "Evolution Stage",
            "value": "Collab"
          }
        ]
      }
    }
  ]
}

特定アカウントの指定条件におけるオファー一覧を取得

  • /nft-offers/<address>
curl "https://bithomp.com/api/v2/nft-offers/rDpLcKCi18ixgzJEseKbi2krRGTWZM69gX?list=counterOffers&offersValidate=true&nftoken=true"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
レスポンス
{
  "owner": "rDpLcKCi18ixgzJEseKbi2krRGTWZM69gX",
  "list": "offers",
  "ownerDetails": {
    "username": null,
    "service": null
  },
  "nftOffers": [
    {
      "nftokenID": "00081B581189F5687DBB7516339D6CCB5593D96622AD82DF41D3BA2E0000017F",
      "offerIndex": "84148E4C12F401F72767033BC13170AFC92B222B3D1365D1D59ED5A4193DD2C1",
      "createdAt": 1667359001,
      "createdLedgerIndex": 75471736,
      "createdTxHash": "899B95BD4D0F8D4DE80DAB145919D3FF55788CB9C25E25DB7B3755F7B6AA7293",
      "account": "rDbkpaT4jk5F17CqL11muJzzwhZtCStyg5",
      "owner": "rDbkpaT4jk5F17CqL11muJzzwhZtCStyg5",
      "destination": null,
      "expiration": null,
      "amount": "1500000000",
      "flags": {
        "sellToken": false
      },
      "nftoken": {
        "flags": {
          "burnable": false,
          "onlyXRP": false,
          "trustLine": false,
          "transferable": true
        },
        "issuer": "rpbjkoncKiv1LkPWShzZksqYPzKXmUhTW7",
        "nftokenID": "00081B581189F5687DBB7516339D6CCB5593D96622AD82DF41D3BA2E0000017F",
        "nftokenTaxon": 52,
        "transferFee": 7000,
        "sequence": 383,
        "owner": "rDpLcKCi18ixgzJEseKbi2krRGTWZM69gX",
        "uri": null,
        "issuedAt": 1667268851,
        "ownerChangedAt": 1667403840,
        "deletedAt": null,
        "url": "https://marketplace-api.onxrp.com/api/metadata/00081B581189F5687DBB7516339D6CCB5593D96622AD82DF41D3BA2E0000017F",
        "metadata": {
          "dna": "e48265739a191624244a717e9b233a11553d703af0e82739784f78f9d332a789",
          "name": "XPUNKS #383",
          "description": "The XPUNK collection consists of 10,000 uniquely generated characters on a 24-by 24-pixel canvas. They are distinguished by their colourful traits and trademark X-mouth that represents their love for the XRPL.",
          "image": "ipfs://QmdPgX2nHd91TYQ3uY8kyqNCciXxfqp3ATVrwWfiAfZiJo",
          "imageHash": "71db5411810b661b150ee05b7e19f12a3e0022b2a256f7a255679a5dce7ad487",
          "edition": 1482,
          "date": 1667163506360,
          "attributes": [
            {
              "trait_type": "Face",
              "value": "Male 4"
            },
            {
              "trait_type": "Eye Characteristics",
              "value": "Tired"
            },
            {
              "trait_type": "Eyes",
              "value": "Dark Brown Right"
            },
            {
              "trait_type": "Neck Wearable",
              "value": "Chain Gold"
            },
            {
              "trait_type": "Hair & Hats",
              "value": "Afro Hair Orange"
            },
            {
              "trait_type": "Facial Hair",
              "value": "No Attribute"
            },
            {
              "trait_type": "Eye Wearables",
              "value": "Clubmasters Vision Glasses"
            },
            {
              "trait_type": "Mouth Attribute",
              "value": "No Attribute"
            },
            {
              "trait_type": "Piercings",
              "value": "No Attribute"
            }
          ],
          "schema": "ipfs://QmNpi8rcXEkohca8iXu7zysKKSJYqCvBJn3xJwga8jXqWU",
          "nftType": "art.v0",
          "collection": {
            "name": "XPUNKS",
            "description": "The XPUNK collection consists of 10,000 uniquely generated characters on a 24-by-24-pixel canvas. They are distinguished by their colorful traits and trademark X-mouth that represents their love for the XRPL."
          }
        },
        "issuerDetails": {
          "username": "XPUNKS",
          "service": "XPUNKS"
        },
        "ownerDetails": {
          "username": null,
          "service": null
        }
      },
      "accountDetails": {
        "username": null,
        "service": null
      },
      "ownerDetails": {
        "username": null,
        "service": null
      },
      "valid": false,
      "validationErrors": [
        "Insufficient funds on the buyer account"
      ]
    }
  ]
}

特定のアカウントが発行したNFTの所有者一覧を取得

  • /nft-count/<address>
curl "https://bithomp.com/api/v2/nft-count/xpunks?list=owners"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
レスポンス
{
  "issuer": "rpbjkoncKiv1LkPWShzZksqYPzKXmUhTW7",
  "issuerDetails": {
    "username": "XPUNKS",
    "service": "XPUNKS"
  },
  "list": "owners",
  "totalNfts": 6726,
  "totalOwners": 1863,
  "owners": [
    {
      "owner": "rpbjkoncKiv1LkPWShzZksqYPzKXmUhTW7",
      "ownerDetails": {
        "username": "XPUNKS",
        "service": "XPUNKS"
      },
      "count": 500
    },
    {
      "owner": "rQUA5QBUAUzqa5gc2uCneHYyBhGUoSFxDx",
      "ownerDetails": {
        "username": null,
        "service": null
      },
      "count": 120
    }
  ]
}

指定条件でのNFTの販売情報一覧を取得

  • /nft-sales
curl "https://bithomp.com/api/v2/nft-sales?list=topSold&currency=xrp&convertCurrencies=usd,eur"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
レスポンス
{
  "list": "topSold",
  "saleType": "all",
  "period": "all",
  "currency": "xrp",
  "convertCurrencies": ["eur", "usd"],
  "total": {
    "primary": 41933,
    "secondary": 25587
  },
  "sales": [
    {
      "nftokenID": "00081388A47691FB124F91B5FF0F5246AED2B5275385689F27ED727F000015E3",
      "acceptedAt": "1673931131",
      "acceptedLedgerIndex": "77169958",
      "acceptedTxHash": "C6F7492A4E58BC2FB6190F7081BBC96231E10ED463EDAB301DBDD650C97DD5FB",
      "acceptedAccount": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
      "seller": "rnVp1xV43N7SgqtjHWCSM6EcSUYs7yWNku",
      "buyer": "rJ1GJjNauEafyQWo1o5ZYDuciGPjx6yTGD",
      "amount": "40000000000",
      "broker": true,
      "marketplace": "xrp.cafe",
      "saleType": "secondary",
      "amountInConvertCurrencies": {
        "eur": "14213.6",
        "usd": "15399.6"
      },
      "nftoken": {
        "flags": {
          "burnable": false,
          "onlyXRP": false,
          "trustLine": false,
          "transferable": true
        },
        "issuer": "rEzbi191M5AjrucxXKZWbR5QeyfpbedBcV",
        "nftokenID": "00081388A47691FB124F91B5FF0F5246AED2B5275385689F27ED727F000015E3",
        "nftokenTaxon": 1,
        "transferFee": 5000,
        "sequence": 5603,
        "owner": "rJ1GJjNauEafyQWo1o5ZYDuciGPjx6yTGD",
        "uri": "516D654834744E4D4C655233756F3774755453357768416E66734B4A737A4D4C6B676F7A44664C78676863385571",
        "nftSerial": 5603,
        "issuedAt": 1667651282,
        "ownerChangedAt": 1673931131,
        "deletedAt": null,
        "url": "https://cloudflare-ipfs.com/ipfs/QmeH4tNMLeR3uo7tuTS5whAnfsKJszMLkgozDfLxghc8Uq",
        "metadata": {
          "name": "Bored Apes XRP Club #5611",
          "description": "The Bored Apes XRP Club is a collection of 10,000 unique Bored Ape NFTs living on the XRP ledger.",
          "image": "QmdYwvVtjNFKRqHEWPChdkfM24Z1i34FmmC4uAjDdnJ7NF/5611.png",
          "edition": "5611",
          "date": 1667650922062,
          "creator": "Bored Apes XRP Club",
          "artist": "Bored Apes XRP Club",
          "attributes": [
            {
              "trait_type": "Background",
              "value": "Punk Blue"
            },
            {
              "trait_type": "Fur",
              "value": "Grey"
            },
            {
              "trait_type": "Clothes",
              "value": "Cowboy"
            },
            {
              "trait_type": "Mouth",
              "value": "Rainbow"
            },
            {
              "trait_type": "Eyes",
              "value": "Blindfold"
            }
          ],
          "external_link": "https://x-apes.com/",
          "category": "Collectables",
          "collection": {
            "name": "Bored Apes XRP Club",
            "family": "art"
          }
        },
        "issuerDetails": {
          "username": "BoredApesXRP",
          "service": "Bored Apes XRP Club"
        },
        "ownerDetails": {
          "username": null,
          "service": null
        }
      },
      "sellerDetails": {
        "username": null,
        "service": null
      },
      "buyerDetails": {
        "username": null,
        "service": null
      },
      "acceptedAccountDetails": {
        "username": null,
        "service": "xrp.cafe"
      }
    }
  ],
  "total": {
    "primary": 78600,
    "secondary": 54396
  }
}

指定条件でのNFTやアカウント、マーケットプレイスの取引高情報一覧を取得

  • /nft-volumes
curl "https://bithomp.com/api/v2/nft-volumes?list=issuers&currency=xrp"
  -H "x-bithomp-token: abcd-abcd-0000-abcd-0123abcdabcd"
レスポンス
{
  "list": "issuers",
  "period": "all",
  "saleType": "all",
  "marker": "753DF10F00000001",
  "volumes": [
    {
      "amount": "3183301846633",
      "sales": 1388,
      "issuer": "rpbjkoncKiv1LkPWShzZksqYPzKXmUhTW7",
      "issuerDetails": {
        "username": "XPUNKS",
        "service": "XPUNKS"
      },
      "buyers": 419,
      "tradedNfts": 1015,
      "totalOwners": 1872,
      "totalNfts": 6751,
      "floorPrice": {
        "open": {
          "amount": "2400000000"
        },
        "private": {
          "amount": "1150000000",
          "destination": "rpZqTPC8GvrSvEfFsUuHkmPCg29GdQuXhC",
          "destinationDetails": {
            "username": null,
            "service": "onXRP"
          }
        }
      }
    },
    {
      "amount": "1770531477817",
      "sales": 1582,
      "issuer": "rEzbi191M5AjrucxXKZWbR5QeyfpbedBcV",
      "issuerDetails": {
        "username": "BoredApesXRP",
        "service": "Bored Apes XRP Club"
      },
      "buyers": 368,
      "tradedNfts": 1358,
      "totalOwners": 1583,
      "totalNfts": 10064,
      "floorPrice": {
        "open": {
          "amount": "750000000"
        },
        "private": {
          "amount": "500000000",
          "destination": "rpx9JThQ2y37FaGeeJP7PXDUVEXY3PHZSC",
          "destinationDetails": {
            "username": null,
            "service": "xrp.cafe"
          }
        }
      }
    }
  ]
}

まとめ

XRPL NFTで利用可能なAPIを紹介しました。これらを用いることでNFTや発行者などの基本的な情報はもちろん、マーケットプレイス毎の取引高などの統計情報も取得することができます。

興味を持たれた方はXRP Ledger開発者のDiscordチャンネルへ是非お越しください!
日本語チャンネルもありますので、英語ができなくても大丈夫です!
https://xrpldevs.org

Discussion