Retrieving Listed Assets

Stash API offers an API endpoint for fetching the list of all the assets that are lent to Stash with a specific contract address.

You can call getAssets function under api object of the core class to make the API call. This function has following declaration, parameters and response:


async getAssets(contractAddress: string, availableForRental: boolean)


  • contractAddress: Address of the NFT contract which the queried assets belong to
  • availableForRental: A boolean value indicating whether all the assets or only the ones that are available for rental (Not currently rented by anyone) should be listed

Example Usage

const assets = stash.api.getAssets("0x0493kdffE92m34kS29lI1942EdaW21", false);

Sample Response