NFTs

NFTs the latest buzz in the crypto world and Unmarshal is there to support with the data needs around NFTs as well.

NFT assets By address

The NFT Assets API allows retrieval of all non-fungible ERC-721 and ERC-1155 NFT assets held by an address with offset-based pagination.

For solana pagination and contract address filtering is not supported at the moment.

Filters:

  • Get Nft assets of an address for a specified contract: Contract Address Filtering, returns assets which belongs to the specified contract.(contract query parameter accepts any valid ERC721 or Erc1155 contract address)
    unmarshal.NFT
     .getAssets(Chain.ethereum, "demo.eth")
     .then(({data}) => console.log(data))
    
Request
Security:
path Parameters
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: demo.eth
chain
required
string
Enum: "ethereum" "bsc" "matic" "avalanche" "cronos" "velas" "klaytn" "solana" "fuse" "bsc-testnet" "matic-testnet"
Example: bsc
query Parameters
offset
string
Default: "0"

The offset to start with, this is returned in the previous response.

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
contract
string

Valid contract address

Responses
200
401
get/v3/{chain}/address/{address}/nft-assets
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v3/:chain/address/:address/nft-assets?offset=0&pageSize=5&contract=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "items_on_page": 14,
  • "next_offset": 16,
  • "nft_assets": [
    ]
}

Nft Transaction History by address

The NFT Transactions API allows you to retrieve a list of recent non-fungible token (NFT) transactions associated with a specific wallet address. The response is paginated to ensure efficient handling of large amounts of data, and the transactions are listed in a recent-first order to provide up-to-date information.

unmarshal.NFT
    .getTransactions(Chain.ethereum, "demo.eth")
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
chain
required
string
Enum: "ethereum" "bsc" "matic" "avalanche" "cronos" "velas" "klaytn" "fuse" "bsc-testnet" "matic-testnet"
Example: bsc
address
required
string
Default: "demo.eth"

Any valid address or ENS

Example: demo.eth
query Parameters
page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
Responses
200

Example response

401
get/v2/{chain}/address/{address}/nft-transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v2/:chain/address/:address/nft-transactions?page=1&pageSize=5&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "page": 1,
  • "total_pages": 1,
  • "items_on_page": 18,
  • "total_txs": 18,
  • "transactions": [
    ]
}

Nft Metadata by contract or specific token id

Returns metadata of all the nfts within a contract or one specific nft if token id is provided

unmarshal.NFT
    .getContractTokenDetails(Chain.ethereum, "contract address")
    .then(({data}) => console.log(data))
Request
Security:
path Parameters
chain
required
string
Enum: "ethereum" "bsc" "matic" "avalanche" "cronos" "velas" "klaytn" "fuse" "bsc-testnet" "matic-testnet"
Example: bsc
address
required
string

Any valid Nft Contract address

query Parameters
tokenId
string

Valid nft token Id of a requested nft contract

page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
Responses
200

Example response

401
get/v2/{chain}/address/{address}/details
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v2/:chain/address/:address/details?tokenId=string&page=1&pageSize=5&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "page": 1,
  • "total_pages": 1,
  • "items_on_page": 1,
  • "total_token_ids": 1,
  • "nft_token_details": [
    ]
}

Nft Transaction History by contract or specific token id

Get all contract transactions of an NFT, and filter them by token ID (optional)

Request
Security:
path Parameters
chain
required
string
Enum: "ethereum" "bsc" "matic" "avalanche" "cronos" "velas" "klaytn" "fuse" "bsc-testnet" "matic-testnet"
Example: bsc
address
required
string

Any valid Nft Contract address

query Parameters
tokenId
string

Valid nft token Id of a requested nft contract

page
number >= 1
Default: 1

Page you want to query

pageSize
number
Default: 25

Number of records to be fetched per page

Example: pageSize=5
Responses
200

Example response

401
get/v1/{chain}/contract/{address}/nft-transactions
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/contract/:address/nft-transactions?tokenId=string&page=1&pageSize=5&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "contract_address": "0x3a3e2aef7e44fd0bb3f0e2330c5b8f078816cbf6",
  • "token_id": "6470",
  • "transaction_hash": "0x550ab896bad15a82e2a0c3458f86929dd79b924732cfe875d5f6d192c5ee2c4b",
  • "block_number": 11703141,
  • "block_hash": "",
  • "transaction_idx": 0,
  • "log_idx": 512,
  • "sender": "0x0000000000000000000000000000000000000000",
  • "to": "0x6877654e79119a7f9a8182bb2389e797ca421d24"
}

List Nfts under a particular contract

This API returns all token Ids available for the specified contract

Request
Security:
path Parameters
chain
required
string
Enum: "ethereum" "bsc" "matic" "avalanche" "cronos" "velas" "klaytn" "fuse" "bsc-testnet" "matic-testnet"
Example: bsc
address
required
string

Any valid Nft Contract address

Responses
200

Example response

401
get/v1/{chain}/contract/{address}/tokenIds
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/contract/:address/tokenIds?auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "total_ids": 6,
  • "token_ids": [
    ]
}

Historical Nft holders by Nft

This api gives history of owners for a given NFT.

unmarshal.NFT
  .getNFTHolders(Chain.ethereum, "contract address", {tokenId: "tokenId"})
  .then(({data}) => console.log(data))
Request
Security:
path Parameters
address
required
string

Any valid Nft Contract address

chain
required
string
Enum: "ethereum" "bsc" "matic" "avalanche" "cronos" "velas" "klaytn" "fuse" "bsc-testnet" "matic-testnet"
Example: bsc
query Parameters
tokenId
required
string

Valid nft token Id of a requested nft contract

Responses
200

Example response

401
get/v1/{chain}/address/{address}/nftholders
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/:chain/address/:address/nftholders?tokenId=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
No sample

Nft Summary

This endpoint allows you to retrieve the total NFT count for a given wallet address across multiple chains.

Request
Security:
path Parameters
address
required
string

Any valid address or ENS

query Parameters
chain
string

list of chains for which count of NFTs required.

Responses
200

OK

get/v1/address/{address}/nft-summary
Request samples
curl -i -X GET \
  'https://api.unmarshal.com/v1/address/:address/nft-summary?chain=string&auth_key=YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "summary": [
    ]
}