Displaying All Assets Assigned to the Game on the Metapro Market

In this section, you will familiarize yourself with the process of obtaining information about assets assigned to your game on the Metapro Market. By leveraging the dedicated NFT service and the corresponding API endpoints, you'll learn how to effectively integrate and manage assets associated with your project.

To display specific tokens, we need information about the contract on which the tokens were created (its address) and the IDs of the tokens assigned to our game. Once we have this information, we use the parameter tokens[contractAddress]=tokenId to retrieve the desired token(s). This process enables effective interaction and management of game-related assets through the Metapro Market's dedicated NFT service and API endpoints.

NFT Service: https://api.metaproprotocol.com/ms/nft/docs/#/

Returns tokens from an app that are owned by a specific User

GET ../v1/tokens

Query Parameters

NameTypeDescription

skip

number

limit

number

address

string

standard

string

protocol

string

network

string

categoryId

number

networks

array[string]

collections

array[string]

protocols

array[string]

sort

object

toknes

object

skipTokens

object

creationBlock

number

_tokenId

number

tagId

number

categoryIds

array[number]

tagIds

array[number]

asset_category

string

asset_subcategories

string

asset_tags

string

{
    "results": [
        {
            "_id": "63341a5e626025ac7c4511af",
            "address": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
            "createdBy": "0x62199ec934c1b4ae52dfa8064964f2332acbb0d5",
            "contractAddress": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
            "standard": "erc1155",
            "protocol": "metaprotocol",
            "network": "bnb-chain",
            "chainId": 56,
            "creationBlock": 21722028,
            "version": 0,
            "isListed": false,
            "isAsset": true,
            "createdAt": "2022-09-28T09:56:46.051Z",
            "__v": 0,
            "token": {
                "_id": "651182c89832b155f285337f",
                "_tokenId": 1248,
                "address": "0xa293d68684be29540838dc8a0222de0c43c6b5b4",
                "_quantity": 3954,
                "burn": false,
                "createdAt": "2023-09-25T12:53:28.021Z",
                "createdBy": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "creationBlock": 32051323,
                "description": "Yo, listen up, you savvy wanderer! Degen Youki's droppin' the bomb on your wardrobe with the **Degen Frenchie Shirt**. This ain't no run-of-the-mill shirt, nah, it's a total flex of your decentralized swagger.\n\nPicture this: you throw on the Degen Frenchie Shirt and instantly level up your style game. This ain't your grandma's fabric – it's like you're rockin' threads spun straight from the blockchain itself. Smooth as a token transfer, this shirt is gonna have you lookin' fly and feelin' like a true crypto maverick.\n\nSo, my friend, don't sleep on this. Grab your Degen Shirt, slap it on, and join me on this wild ride through the metaverse.\n\nIf you're lookin' to blast off to uncharted realms and dive into heart-pounding showdowns, you better be strappin' one of these bad boys to your digital hip. Trust me, it's the ticket to a wild ride you won't wanna miss!\n\nStay SAFU, stay Degen.",
                "extraFiles": [
                    "https://prdmetaassetfiles.blob.core.windows.net/7699177f-4e21-4d20-bec3-928d52254855/assets/7d87b09c-5e0b-416e-a845-976a4ec9a0a7.mp4",
                    "https://prdmetaassetfiles.blob.core.windows.net/7699177f-4e21-4d20-bec3-928d52254855/assets/decf1fd0-7c38-48d8-a8f1-18cbe1bd7f66.png"
                ],
                "favorites": 1,
                "image": "https://gateway.metaproprotocol.com/0x04e0/preview",
                "initialOwner": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "minifiedImage": "https://gateway.metaproprotocol.com/0x04e0/minified-preview",
                "owner": "0x832735f45299c8b6f7263e758cadba766459cd21",
                "properties": {},
                "tokenName": "Degen Youki 'Frenchie' Shirt",
                "transactionHash": "0xbf6b04d4ca62970af08155708398a3460c87711ff2c948390b68f8032b84514b",
                "updatedAt": "2023-09-29T07:40:47.519Z",
                "wishes": 1,
                "filesSpec": {
                    "item_experiance": [],
                    "common": {
                        "standard": [
                            {
                                "key": "asset_type",
                                "value": [
                                    "2D meta asset"
                                ],
                                "value_type": "string array"
                            },
                            {
                                "key": "asset_licence",
                                "value": "Royalty Free (RF)",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_restriction",
                                "value": "Public meta asset",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_tags",
                                "value": [
                                    "metapro",
                                    "gaming asset",
                                    "DY",
                                    "DegenYouki"
                                ],
                                "value_type": "string array"
                            },
                            {
                                "key": "asset_tag_ids",
                                "value": [
                                    21,
                                    17,
                                    155,
                                    154
                                ],
                                "value_type": "integer array"
                            },
                            {
                                "key": "asset_category",
                                "value": "Wearable",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_subcategories",
                                "value": [
                                    "Upper body clothes"
                                ],
                                "value_type": "string array"
                            },
                            {
                                "key": "asset_category_ids",
                                "value": [
                                    11,
                                    14
                                ],
                                "value_type": "integer array"
                            }
                        ],
                        "2d_spec": [
                            {
                                "key": "asset_height",
                                "value": 1200,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_width",
                                "value": 1200,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_layers",
                                "value": false,
                                "value_type": "boolean"
                            }
                        ],
                        "3d_spec": [
                            {
                                "key": "asset_geometry",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_polygons",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_vertices",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_materials",
                                "value": false,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_textures",
                                "value": false,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_uv_mapped",
                                "value": false,
                                "value_type": "boolean"
                            },
                            {
                                "key": "asset_animated",
                                "value": false,
                                "value_type": "boolean"
                            }
                        ],
                        "sound_spec": [
                            {
                                "key": "asset_bpm",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_sample_rate",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_bit_depth",
                                "value": 0,
                                "value_type": "integer"
                            },
                            {
                                "key": "asset_channels",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_duration",
                                "value": "",
                                "value_type": "string"
                            },
                            {
                                "key": "asset_isrc_code",
                                "value": "",
                                "value_type": "string"
                            }
                        ]
                    }
                }
            }
        }
    ],
    "count": 6
}
Example cURL
curl --location 'https://api.metaproprotocol.com/ms/nft/v1/tokens?sort%5Btoken.creationBlock%5D=desc&tokens%5B0xa293d68684be29540838dc8a0222de0c43c6b5b4%5D=1182&tokens%5B0xa293d68684be29540838dc8a0222de0c43c6b5b4%5D=1227&tokens%5B0xa293d68684be29540838dc8a0222de0c43c6b5b4%5D=1229&tokens%5B0xa293d68684be29540838dc8a0222de0c43c6b5b4%5D=1230&tokens%5B0xa293d68684be29540838dc8a0222de0c43c6b5b4%5D=1228&tokens%5B0xa293d68684be29540838dc8a0222de0c43c6b5b4%5D=1248&limit=20%0A'

For more information about the Endpoints from the NFT Service, use the documentation below

API

Last updated