DEV Community

Cover image for How to get XRP Ledger NFT data with curl (no API key)
xrpl.to
xrpl.to

Posted on

How to get XRP Ledger NFT data with curl (no API key)

NFTs on the XRP Ledger are part of the ledger itself: minting, listing, buying and selling are ledger transactions, with no smart contract in between. https://api.xrpl.to/v1 serves collections, floor prices, sales, owners and rarity ranks as plain JSON. You need no key and no account to start.

These were the most traded collections on 20 November 2026:

Collection Floor Volume, 24h Sales, 24h Owners
Fuzzyverse 290 XRP 24,428 XRP 59 571
Chroops 44 XRP 3,257 XRP 41 393
Fuzzybears 618 XRP 1,971 XRP 2 761
sraebyzzuF 749 XRP 1,523 XRP 1 356
Fuzzycards 589 Edition Booster Box Bundle 1,490 XRP 1,421 XRP 1 154

Below are four calls: the collection list behind that table, one collection's numbers, one NFT with its rarity rank, and floor price candles. Each one shows the request and the response it returned. You need curl and jq. The examples use Fuzzybears.

1. List the most traded collections

Request

curl -s "https://api.xrpl.to/v1/nft/collections?sort=vol24h&limit=5&lightweight=true&skip_metrics=true" \
  | jq '.collections[] | {name, slug, floor, vol24h, sales24h, owners, items}'
Enter fullscreen mode Exit fullscreen mode

Response

{
  "name": "Fuzzyverse",
  "slug": "fuzzyverse",
  "floor": 290,
  "vol24h": 24427.619422,
  "sales24h": 59,
  "owners": 571,
  "items": 5890
}
{
  "name": "Chroops",
  "slug": "chroops",
  "floor": 44,
  "vol24h": 3256.974552,
  "sales24h": 41,
  "owners": 393,
  "items": 4000
}
{
  "name": "Fuzzybears",
  "slug": "fuzzybears",
  "floor": 617.999,
  "vol24h": 1970.8266,
  "sales24h": 2,
  "owners": 761,
  "items": 3210
}
{
  "name": "sraebyzzuF",
  "slug": "sraebyzzuf",
  "floor": 749,
  "vol24h": 1522.81911,
  "sales24h": 1,
  "owners": 356,
  "items": 1220
}
{
  "name": "Fuzzycards 589 Edition Booster Box Bundle",
  "slug": "fuzzycards-589-edition-booster-box-bundle",
  "floor": 1490,
  "vol24h": 1420.69,
  "sales24h": 1,
  "owners": 154,
  "items": 433
}
Enter fullscreen mode Exit fullscreen mode
  • floor: the lowest price an NFT in the collection is listed for, in XRP
  • vol24h: sales over 24 hours, in XRP
  • owners: accounts that hold at least one NFT from the collection
  • items: NFTs in the collection

sort also takes volume, new and trendingScore. The slug is the collection's id in every other call.

2. Get one collection's numbers

Request

curl -s "https://api.xrpl.to/v1/nft/collections/fuzzybears/metrics" \
  | jq '.metrics | {floor, floor7dAgo, owners, items, listedCount, sales24h, vol24h, totalSales, topOffer}'
Enter fullscreen mode Exit fullscreen mode

Response

{
  "floor": 617.999,
  "floor7dAgo": 575,
  "owners": 761,
  "items": 3210,
  "listedCount": 450,
  "sales24h": 2,
  "vol24h": 1970.8266,
  "totalSales": 6209,
  "topOffer": {
    "issuer": "XRPL",
    "currency": "XRP",
    "amount": 5890,
    "nftid": "00080BB86C429EE66CE731CAA492445DFF564F9CB8A46A3023B55DDD05A84341",
    "buyer": "rpa399B7Fw5sAU5jRHbShhCs12XoJ8niYT"
  }
}
Enter fullscreen mode Exit fullscreen mode

listedCount is how many NFTs are for sale. totalSales counts every sale of the collection's NFTs. topOffer is the highest open bid on any NFT in the collection, with the NFT it is for and the account that made it.

3. Get one NFT and its rarity rank

An NFT's id is its 64-character NFTokenID.

Request

curl -s "https://api.xrpl.to/v1/nft/00080BB86C429EE66CE731CAA492445DFF564F9CB8A46A30EA72B1CB05A8492F" \
  | jq '{name, owner: .account, rarity_rank, traits: [.props[] | {type, value, count}]}'
Enter fullscreen mode Exit fullscreen mode

Response

{
  "name": "Fuzzybear #0",
  "owner": "rs8AJUQcw9gL4Q3QbY5Hyy6nBQVBmpZ1pB",
  "rarity_rank": 1,
  "traits": [
    {
      "type": "Aura",
      "value": "Clarity",
      "count": 1
    },
    {
      "type": "Background",
      "value": "321 321 321",
      "count": 1
    },
    {
      "type": "Eyes",
      "value": "Blind Conviction",
      "count": 1
    },
    {
      "type": "Fur",
      "value": "Golden Eye",
      "count": 1
    },
    {
      "type": "Mouth",
      "value": "Normal",
      "count": 566
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

rarity_rank is the NFT's place in its collection, where 1 is the rarest. count is how many NFTs in the collection have that trait: four of this bear's five traits belong to no other bear.

4. Get floor price candles

Request

curl -s "https://api.xrpl.to/v1/nft/collections/fuzzybears/ohlc?resolution=D&cb=3" \
  | jq -c '.ohlc[]'
Enter fullscreen mode Exit fullscreen mode

Response

[1794873600000,618,618,618,618,7292.57,3,{"nft":"00080BB86C429EE66CE731CAA492445DFF564F9CB8A46A30EE41BC3D05A841A1","cost":4063.56,"name":"Fuzzybear #374","thumb":"a87bd9a2f988b31cbeff716838e00b4fm"}]
[1794960000000,618,618,617.999,617.999,4422.22,5,{"nft":"00080BB86C429EE66CE731CAA492445DFF564F9CB8A46A3085B25F0C05A84372","cost":2060,"name":"Fuzzybear #1443","thumb":"ef1d5cfd5f30dc57ab6679ca68705dfem"}]
[1795046400000,617.999,617.999,617.999,617.999,1602.12,3,{"nft":"00080BB86C429EE66CE731CAA492445DFF564F9CB8A46A30E3CE27F205A84658","cost":711.12,"name":"Fuzzybear #1322","thumb":"0d4d7b3a42ac2c3f40843e7aa339c87cm"}]
[1795132800000,617.999,617.999,617.999,617.999,1259.7,1,{"nft":"00080BB86C429EE66CE731CAA492445DFF564F9CB8A46A308534C5B805A83E1E","cost":1259.7,"name":"Fuzzybear #1060","thumb":"176b168e7ecc481dc630653462332896m"}]
Enter fullscreen mode Exit fullscreen mode

Each row is [time, open, high, low, close, volume, sales, topSale]: the time in Unix milliseconds, the floor price in XRP, the volume in XRP, the number of sales, and the day's biggest sale. resolution takes 5, 15, 30, 60 or 240 minutes, D or W.

Limits and credit

Without a key you get 2 requests a second, 30 a minute and 333 a day. A free key from the dashboard raises this to 10 requests a second and 1 million credits a month.

If your app, site or bot shows this data, put a visible link to xrpl.to on the same screen:

<a href="https://xrpl.to" target="_blank" rel="noopener">Data by xrpl.to</a>
Enter fullscreen mode Exit fullscreen mode

Next

Top comments (0)