Docs

nft_getAsset (Mythos NFT helper)

Retrieve Mythos NFT metadata, ownership, and marketplace pricing with standard Substrate RPC calls.

Mythos nodes do not expose a bespoke nft_getAsset RPC endpoint. Instead, combine the core Substrate methods state_getStorage and state_getKeysPaged (or higher level SDK calls) to read pallet_nfts storage and any marketplace listings. The examples below were captured on 3 Oct 2025 using the public endpoint https://api-mythos-archive.n.dwellir.com/YOUR_API_KEY.

Storage layout

Storage entryPurpose
Nfts::Item(collectionId, itemId)Owner, approvals, and deposit metadata for a specific NFT
Nfts::Collection(collectionId)Collection owner, minted counts, and attribute flags
Marketplace::Asks(collectionId, itemId)Active fixed-price listings (seller, price, expiry, escrow agent)

Example: collection 2783, item 21

The following request reads Nfts::Item(2783, 21)—an NFT owned by 0x6f5e2dee7182143c809c6606f5c50ffb0cc7f4dd. The storage key was generated with api.query.nfts.item.key(2783, 21).

Bash
curl https://api-mythos-archive.n.dwellir.com/YOUR_API_KEY   -H "Content-Type: application/json"   -d '{
    "jsonrpc": "2.0",
    "method": "state_getStorage",
    "params": [
      "0xe8d49389c2e23e152fdd6364daadd2cce6636c7091b616c035068763633f33e2001352fa0fbf816218e34d69e86c8929df0a0000000000000000000000000000000000000000000000000000000000000af23d6fc2fce072a34ac19d2a5553b615000000000000000000000000000000"
    ],
    "id": 11
  }'

Sample response

JSON
{
  "jsonrpc": "2.0",
  "id": 11,
  "result": "0x6f5e2dee7182143c809c6606f5c50ffb0cc7f4dd00b78aec3ecc939755abfe78aba306f2bf428da63700000000000000000000000000000000"
}

Decoding the SCALE payload as ItemDetails yields:

  • owner = 0x6f5e2dee7182143c809c6606f5c50ffb0cc7f4dd
  • deposit.account = 0xb78aec3ecc939755abfe78aba306f2bf428da637
  • deposit.amount = 0
  • approvals = []

JavaScript helper

TypeScript
import { ApiPromise, WsProvider } from '@polkadot/api';

async function loadItem(collectionId: number, itemId: number) {
  const api = await ApiPromise.create({ provider: new WsProvider('wss://api-mythos-archive.n.dwellir.com/YOUR_API_KEY') });
  const item = await api.query.nfts.item(collectionId, itemId);
  if (item.isNone) {
    throw new Error('Item not found');
  }
  const details = item.unwrap();
  console.log(`Owner: ${details.owner.toHex()}`);
  console.log(`Deposit account: ${details.deposit.account.toHex()}`);
}

loadItem(2783, 21).catch(console.error);

Joining marketplace data

Marketplace::Asks(2783, 21) contains the active listing for the same asset. The seller, price, and escrow agent are combined in a single SCALE payload.

Bash
curl https://api-mythos-archive.n.dwellir.com/YOUR_API_KEY   -H "Content-Type: application/json"   -d '{
    "jsonrpc": "2.0",
    "method": "state_getStorage",
    "params": [
      "0xb8f32c9f36429933d924999a1b87423f9be4002e98967383af7072a5f12bde48001352fa0fbf816218e34d69e86c8929df0a0000000000000000000000000000000000000000000000000000000000000af23d6fc2fce072a34ac19d2a5553b615000000000000000000000000000000"
    ],
    "id": 12
  }'

Sample response

JSON
{
  "jsonrpc": "2.0",
  "id": 12,
  "result": "0x6f5e2dee7182143c809c6606f5c50ffb0cc7f4dd000050efe2d6e41a1b0000000000000000d8c32cbb030000000058c51ff571cb030000000000000001dbe1638c2063432d6923e30d2f4406e2e91e767f"
}

Decoding yields:

  • seller = 0x6f5e2dee7182143c809c6606f5c50ffb0cc7f4dd
  • price = 500000000000000000000 plancks (0.500000000000000000 MYTH)
  • fee = 70000000000000000000 plancks (0.070000000000000000 MYTH)
  • expiration = 4102444800000 (Unix millis; effectively no expiry)
  • escrow_agent = 0xdbe1638c2063432d6923e30d2f4406e2e91e767f

Rust (dynamic API)

rust
use subxt::{dynamic::Value, OnlineClient, config::substrate::SubstrateConfig};

#[tokio::main]
async fn main() -> subxt::Result<()> {
    let api = OnlineClient::<SubstrateConfig>::from_url("wss://api-mythos-archive.n.dwellir.com/YOUR_API_KEY").await?;

    let item: Value = api
        .storage()
        .at(None)
        .await?
        .fetch(&Value::from_parts("Nfts", "Item", (2783u32, 21u128)))?
        .expect("item exists");
    println!("Item details: {item:?}");

    let ask: Value = api
        .storage()
        .at(None)
        .await?
        .fetch(&Value::from_parts("Marketplace", "Asks", (2783u32, 21u128)))?
        .expect("ask exists");
    println!("Listing: {ask:?}");

    Ok(())
}

Best practices

  • Cache decoded JSON in your asset or marketplace service; most fields only change on ownership transfers or new listings.
  • Use state_getKeysPaged on Nfts::Item to backfill entire collections without overloading the RPC node (e.g., batches of 256 keys).
  • Always confirm a listing exists before letting players buy—prices may be updated or removed between UI refreshes and submission time.