StreamNFT
Home
  • ๐Ÿ‘‹Taking NFT mainStream!
  • Introduction
    • ๐Ÿ‘จโ€๐Ÿ’ปStreamNFT Protocol
    • ๐ŸƒRoadmap
    • ๐Ÿ”Security Audit
  • StreamNFT PROTOCOL
    • ๐Ÿ”“Rent Protocol
    • ๐Ÿ’ฐLoan Protocol
      • How does a loan work?
    • ๐Ÿ’ฐUtility Protocol
      • How does it work?
    • ๐ŸŽฎWeb3 Gaming Services
      • Matchmaking
        • Token Gated Matchmaking
    • ยฎ๏ธERC-7066
      • Overview
  • UseCases : Case Studies
    • ๐ŸคNFT Rentals
    • ๐Ÿ’ŽEphemeral / Consumable NFTs
    • ๐Ÿ“NFT Mandates
    • ๐ŸŽ†Post-Mint Utility
    • ๐Ÿ’ผPartial Payment at Mint
  • For Developers
    • NFT Rental
    • API Reference
      • โš™๏ธUtility Integration
        • ๐Ÿ‘ฅClient
          • Register
          • Verify
          • Redeem Code
          • Get All Claimed Utility User
        • ๐Ÿ‘จโ€๐Ÿ’ปDeveloper
          • Get All Benefits By Collection
      • ๐Ÿ‘พRental Integration
        • User NFTs
        • Raw Transactions (Advanced)
      • ๐Ÿ’ฐLoan Integration
        • User Loans
        • Raw Transactions (Advanced)
      • ๐Ÿ›’Marketplace
    • SDK Reference
      • Utility Integration
      • Rental Integration
        • EVM
        • Solana
      • Loan Integration
        • EVM
        • Solana
      • Marketplace
    • On-Chain Reference
    • Wallet Provider Reference
      • ๐Ÿ”Rental
        • EVM
        • Solana
      • ๐Ÿ”Loan
        • EVM
        • Solana
    • โ›“๏ธSupported Chains
  • For Users
    • ๐Ÿ“šStep By Step Rent Tutorial
    • ๐Ÿ“šStep By Step Loan tutorial
    • ๐Ÿ“šStep by Step Utility Tutorial
      • Step by Step Utility Creation Tutorial
      • Step by step utility discover tutorial
    • ๐Ÿ’กHedera Token Association
    • ๐Ÿ”Privacy Policy
    • ๐Ÿ”‘Terms of Service
  • Community
    • ๐ŸŒWebsite
    • ๐Ÿ‘ฝDiscord
    • ๐ŸฆTwitter
Powered by GitBook
On this page

Was this helpful?

  1. For Developers
  2. API Reference
  3. Rental Integration

User NFTs

PreviousRental IntegrationNextRaw Transactions (Advanced)

Last updated 6 months ago

Was this helpful?

The Asset Manager API provides functionalities for managing asset managers in a blockchain-based ecosystem. Asset managers are entities responsible for managing various assets, such as digital tokens, NFTs (Non-Fungible Tokens), and other digital assets, on a blockchain network. These APIs allows users to retrieve information about asset managers based on their chain ID and contract address.

Endpoint:

  • Main Net Base URL:

  • Test Net Base URL:

1. Use StreamNFT Indexer (1 API Call to get all User NFTs)

2. Use External Indexer (2 API Call to get all User NFTs)

Query Parameters specific for rentals:

  • collection: Filter for token address of the NFT collection

  • rentee: Filter for assets rented by a wallet

  • state: Filter for all assets on Marketplace (STALE) or rented out (RENT)

  • onlyRentData : Output only rental data (NFT rentee, NFT owner, rental expiry, state)

Response:

  • Successful responses return an array of asset managers for provided token address with detailed information, such as the current rentee and the state of each asset.

Example: How to Integrate External Indexer

  • Get all rented collection NFTs by user wallet

let nfts= indexerCall(wallet.address) // indexer call to get nfts by wallet
nfts.push.apply(nfts, await getNFTs(chainId,wallet.address,tokenAddress));

async function getNFTs(chainId, address,tokenAddress){
    const nfts = await fetch(`https://indexer.streamnft.tech/assetManager/${chainId}?user=${walletAddress}&collection=${collectionAddress}`)
    .then(response => {
        if (!response.ok) {
        throw new Error(`HTTP error! Status: ${response.status}`);
        }
        return response.json();
    })
    .catch(error => {
        // Handle network errors or API response errors here
        console.error('Error:', error.message);
    });
    return nfts;
}
  • Get all rented NFTs by user wallet

let nfts= indexerCall(wallet.address) // indexer call to get nfts by wallet
nfts.push.apply(nfts, await getNFTs(chainId,wallet.address));

async function getNFTs(chainId, address){
    const nfts = await fetch(`https://indexer.streamnft.tech/assetManager/${chainId}?user=${walletAddress}`)
    .then(response => {
        if (!response.ok) {
        throw new Error(`HTTP error! Status: ${response.status}`);
        }
        return response.json();
    })
    .catch(error => {
        // Handle network errors or API response errors here
        console.error('Error:', error.message);
    });
    return nfts;
}
๐Ÿ‘พ
https://indexer.streamnft.tech/
https://stagingindexer.streamnft.tech/

Retrieve user's NFTs

get

This API endpoint retrieves all NFTs associated with a specific wallet address on a given blockchain network. It provides an option to include rented NFTs in the response based on a query parameter.

Path parameters
chainIdstringRequired

The chain ID to retrieve NFTs from

walletstringRequired

The wallet address to retrieve NFTs for

Query parameters
rentbooleanOptional

Filter to include rented NFTs (true or false)

Responses
200
A list of NFTs
application/json
500
Server error
get
GET /getNFTs/{chainId}/{wallet} HTTP/1.1
Host: devnfts.streamnft.tech
Accept: */*
{
  "result": [
    {
      "chainId": "text",
      "collection": "text",
      "collectionName": "text",
      "collectionImage": "text",
      "lastUpdated": "2025-05-21T00:35:24.826Z",
      "tokenType": "text",
      "tokenId": [
        {
          "tokenId": "text",
          "balance": "text",
          "name": "text",
          "description": "text",
          "image": "text",
          "attributes": [
            {
              "trait_type": "text",
              "value": "text"
            }
          ]
        }
      ]
    }
  ]
}
  • 1. Use StreamNFT Indexer (1 API Call to get all User NFTs)
  • GETRetrieve user's NFTs
  • 2. Use External Indexer (2 API Call to get all User NFTs)
  • GETGet Asset Manager by Chain ID
  • Example: How to Integrate External Indexer

Get Asset Manager by Chain ID

get
Path parameters
chainIdstringRequired

The ID of the blockchain chain

Example: 296
Query parameters
userstringOptional

NFT owner

providerstringOptional

Loan provided by

collectionstringOptional

The token address of the collection

Default: 0x00000000000000000000000000000000003a05ad
renteestringOptional

The current rentee of the asset manager

statestring ยท enumOptional

The state of the asset manager (Valid values: LOAN | RENT | STALE | PRE_LOAN)

Possible values:
Responses
200
Successful response
application/json
500
Internal server error
application/json
get
GET /assetManager/{chainId} HTTP/1.1
Host: stagingindexer.streamnft.tech
Accept: */*
[
  {
    "id": 1,
    "initializer": "text",
    "loan_pool_index": 1,
    "loan_offer_index": 1,
    "state": "text",
    "loan_expiry": 1,
    "provider": "text",
    "rate": 1,
    "validity_expiry": 1,
    "is_fixed": true,
    "fixed_minutes": 1,
    "rent_expiry": 1,
    "rentee": "text",
    "private_rental": true,
    "owner_share": 1,
    "whitelist": [
      "text"
    ],
    "metadata_uri": "text",
    "metadata_link": "text",
    "name": "text",
    "image": "text",
    "chain_id": "text",
    "contract_address": "text",
    "token_address": "text",
    "token_id": "text",
    "rental_type": "text",
    "profit": 1,
    "domint": true,
    "loan_amount": 1,
    "index": 1,
    "tx_hash": "text",
    "master_index": 1
  }
]