Get NFTs (other blockchains)
Endpoint to retrieve all of a user's NFTs on any blockchain Mystic is live on other than Ethereum, Polygon and Goerli.
Get NFTs
GET
https://api.withmystic.xyz/otherchain-api/get-nfts
Receives a wallet address and chain Id and returns the respective wallet balance.
Query Parameters
Name
Type
Description
address*
String
Wallet address whose NFTs we want to get
chainId*
number
Id of the blockchain whose NFTs we want to get
Headers
Name
Type
Description
Bearer token*
String
Your API key
{
"ERC1155": [
{
"owner": "0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4",
"tokenId": "4",
"contract": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d",
"value": "1",
"__typename": "ERC1155EventTransfer",
"tokenMetadata": {
"name": "Empty Jar",
"image": "ipfs://bafybeicy4qvyimpwylli6nsz45kwvjuperbq44csfh3uafgfd62forgdoy",
"description": "A Jar without a purpose... yet...",
"attributes": [
{
"trait_type": "Type",
"value": "Game item"
},
{
"trait_type": "Chapter",
"value": "I"
}
]
},
"contractAddress": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d"
},
{
"owner": "0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4",
"tokenId": "0",
"contract": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d",
"value": "1",
"__typename": "ERC1155EventTransfer",
"tokenMetadata": {
"name": "Battery",
"image": "ipfs://bafybeihctrvskrowi747p4xzk7iwaknmrjxqhgqpyysvszaqf7id277kcq",
"description": "Despite the fact that it looks shabby, believe me, it still packs a punch.",
"attributes": [
{
"trait_type": "Type",
"value": "Game item"
},
{
"trait_type": "Chapter",
"value": "I"
}
]
},
"contractAddress": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d"
}
],
"ERC721": []
}
Example
Let's try retrieving a user's NFTs on the Manta Pacific blockchain. In this case, what we'd query the API with would be:
https://api.withmystic.xyz/otherchain-api/get-nfts?address=0xA0BC85720afB60BBda96458A87DCa21022e183ZL&chainId=169
And here we can find the response we would get from making this call (mock values):
{
"ERC1155": [
{
"owner": "0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4",
"tokenId": "4",
"contract": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d",
"value": "1",
"__typename": "ERC1155EventTransfer",
"tokenMetadata": {
"name": "Empty Jar",
"image": "ipfs://bafybeicy4qvyimpwylli6nsz45kwvjuperbq44csfh3uafgfd62forgdoy",
"description": "A Jar without a purpose... yet...",
"attributes": [
{
"trait_type": "Type",
"value": "Game item"
},
{
"trait_type": "Chapter",
"value": "I"
}
]
},
"contractAddress": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d"
},
{
"owner": "0xA79d4cCC70Cc3DD01f7D3a70ED5C7ca73de812C4",
"tokenId": "0",
"contract": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d",
"value": "1",
"__typename": "ERC1155EventTransfer",
"tokenMetadata": {
"name": "Battery",
"image": "ipfs://bafybeihctrvskrowi747p4xzk7iwaknmrjxqhgqpyysvszaqf7id277kcq",
"description": "Despite the fact that it looks shabby, believe me, it still packs a punch.",
"attributes": [
{
"trait_type": "Type",
"value": "Game item"
},
{
"trait_type": "Chapter",
"value": "I"
}
]
},
"contractAddress": "0xcc5b1e4e027beee0c19cd6b1f4713ae451978b4d"
}
],
"ERC721": []
}
Here is an example API call, for you to copy and modify:
https://api.withmystic.xyz/marketplace-api/get-nfts?address=string&chainId=number
Happy coding!
Last updated