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

NFT assets API returns all NFT assets held by a address with pagination (offset based pagination). In this endpoint instead of navigating with page parameter we can navigate using offset, where the next offset is provided in the response.

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

NFT transactions API gives the list of transaction being made on given wallet address with pagination.

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 a specific nft if token id is given

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 the contract transactions of an nft, also filter all the transactions of a particular token Id of the contract (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 Endpoint 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
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
{
  • "contract_address": "0x06012c8cf97bead5deae237070f9587f8e7a266d",
  • "token_id": "1137603",
  • "actual_owner": "0xfC43f5F9dd45258b3AFf31Bdbe6561D97e8B71de",
  • "name": "cryptokitties",
  • "type": "721",
  • "price": "0.277582534582129187",
  • "animation_url": "",
  • "description": "CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.",
  • "creator": "0x09191d18729da57a83a9afc8ace0c8d7d104e118"
}

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