Endpoint | Description | Type |
return all collections | GET | |
return collection by :id | GET | |
return the schema of a collection | GET | |
return the wallet owning a collection | GET | |
search collections | POST | |
return the assets of a collection | GET |
Return all registered asset collection types.
GET /collections
Name | Type | Description | Required |
page | int | The number of the page that will be returned. | No |
limit | int | The number of resources per page. | No |
orderBy | string | Type by which should order resources. | No |
transform | boolean | If returns modified or raw data. | No |
curl https://api.protokol.com/api/nft/collections
{"meta": {"totalCountIsEstimate": true,"count": 1,"pageCount": 1,"totalCount": 1,"next": null,"previous": null,"self": "/nft/collections?page=1&limit=100&transform=true","first": "/nft/collections?page=1&limit=100&transform=true","last": "/nft/collections?page=1&limit=100&transform=true"},"data": [{"id": "bc045f0a977d368735030c7eadaa45de5581c1ffb2b0e9e93752c82579c516fe","senderPublicKey": "022f2978d57f95c021b9d4bf082b482738ce392bcf6bc213710e7a21504cfeb5a0","name": "FIFA-20-PLAYERS","description": "FIFA 2020 Players","maximumSupply": 10,"jsonSchema": {"properties": {"name": {"type": "string"},"pac": {"type": "number"},"sho": {"type": "number"},"pas": {"type": "number"},"dri": {"type": "number"},"def": {"type": "number"},"phy": {"type": "number"}}},"timestamp": {"epoch": 105746776,"unix": 1595847976,"human": "2020-07-27T11:06:16.000Z"}}]}
GET /collections/{id}
Name | Type | Description | Required |
id | string | The identifier of the collection to be retrieved. | Yes |
transform | boolean | If returns modified or raw data. | No |
curl https://api.protokol.com/api/nft/collections/a6ebed9672c970f4eeb4387321806e5eb478d9609b5d67401ecbb32fde759425
{"data": {"id": "8eeaf8899d5230b22e6979805e9a8865eb7093ccae028b46a972f80fd60c790b","senderPublicKey": "022f2978d57f95c021b9d4bf082b482738ce392bcf6bc213710e7a21504cfeb5a0","name": "FIFA-20-PLAYERS","description": "FIFA 2020 Players","maximumSupply": 1,"jsonSchema": {"properties": {"name": {"type": "string"},"pac": {"type": "number"},"sho": {"type": "number"},"pas": {"type": "number"},"dri": {"type": "number"},"def": {"type": "number"},"phy": {"type": "number"}}},"timestamp": {"epoch": 105746776,"unix": 1595847976,"human": "2020-07-27T11:06:16.000Z"}}}
Returns JSON schema registered by a collection.
GET /collections/{id}/schema
Name | Type | Description | Required |
id | string | The identifier of the collection to be retrieved. | Yes |
transform | boolean | If returns modified or raw data. | No |
curl https://api.protokol.com/api/nft/collections/a6ebed9672c970f4eeb4387321806e5eb478d9609b5d67401ecbb32fde759425/schema
{"data": {"id": "8eeaf8899d5230b22e6979805e9a8865eb7093ccae028b46a972f80fd60c790b","senderPublicKey": "022f2978d57f95c021b9d4bf082b482738ce392bcf6bc213710e7a21504cfeb5a0","properties": {"name": {"type": "string"},"pac": {"type": "number"},"sho": {"type": "number"},"pas": {"type": "number"},"dri": {"type": "number"},"def": {"type": "number"},"phy": {"type": "number"}},"timestamp": {"epoch": 105746776,"unix": 1595847976,"human": "2020-07-27T11:06:16.000Z"}}}
Returns owning wallet for the specified collection.
GET /collections/{id}/wallets
Name | Type | Description | Required |
id | string | The identifier of the collections wallet to be retrieved. | Yes |
curl https://api.protokol.com/api/nft/collections/a6ebed9672c970f4eeb4387321806e5eb478d9609b5d67401ecbb32fde759425/wallets
{"data": {"address": "AV6GP5qhhsZG6MHb4gShy22doUnVjEKHcN","publicKey": "022f2978d57f95c021b9d4bf082b482738ce392bcf6bc213710e7a21504cfeb5a0","nft": {"collections": {"18f7ba659b5c87737f5db131e15ad682e2e37fdf8259ec227b5bc9e5e9d9c28b": {"currentSupply": 1,"nftCollectionAsset": {"name": "FIFA-20-PLAYERS","description": "FIFA 2020 Players","maximumSupply": 100200,"jsonSchema": {"properties": {"name": {"type": "string"},"pac": {"type": "number"},"sho": {"type": "number"},"pas": {"type": "number"},"dri": {"type": "number"},"def": {"type": "number"},"phy": {"type": "number"}}}}}},"assetsIds": []}}}
Search collections by attributes.
POST /collections/search
Name | Type | Description | Required |
page | int | The number of the page that will be returned. | No |
limit | int | The number of resources per page. | No |
orderBy | string | Type by which should order resources. | No |
transform | boolean | If returns modified or raw data. | N |
Name | Type | Description | Required |
attributeName | object | Attribute to search by. | Yes |
curl --request POST \--url https://api.protokol.com/api/nft/collections/search \--header 'content-type: application/json' \--data '{"jsonSchema": {"properties": {"name": {"type":"string"}}}}'
{"meta": {"totalCountIsEstimate": true,"count": 1,"pageCount": 1,"totalCount": 1,"next": null,"previous": null,"self": "/nft/collections/search?page=1&limit=100&transform=true","first": "/nft/collections/search?page=1&limit=100&transform=true","last": "/nft/collections/search?page=1&limit=100&transform=true"},"data": [{"id": "6c456c5687b1ca1b9a89457bc26dc8a7223694084a8f89cf295fc688f5a3342b","senderPublicKey": "022f2978d57f95c021b9d4bf082b482738ce392bcf6bc213710e7a21504cfeb5a0","name": "FIFA-20-PLAYERS","description": "FIFA 2020 Players","maximumSupply": 1,"jsonSchema": {"properties": {"name": {"type": "string"},"pac": {"type": "number"},"sho": {"type": "number"},"pas": {"type": "number"},"dri": {"type": "number"},"def": {"type": "number"},"phy": {"type": "number"}}},"timestamp": {"epoch": 105740120,"unix": 1595841320,"human": "2020-07-27T09:15:20.000Z"}}]}
Return all created assets belonging to a specific collection.
GET /collections/{id}/assets
Name | Type | Description | Required |
page | int | The number of the page that will be returned. | No |
limit | int | The number of resources per page. | No |
orderBy | string | Type by which should order resources. | No |
transform | boolean | If returns modified or raw data. | No |
Name | Type | Description | Required |
id | string | The identifier of the collections id to return assets. | Yes |
curl https://api.protokol.com/api/nft/collections/a6ebed9672c970f4eeb4387321806e5eb478d9609b5d67401ecbb32fde759425/assets
{"meta": {"totalCountIsEstimate": true,"count": 1,"pageCount": 1,"totalCount": 1,"next": null,"previous": null,"self": "/nft/collections/6c456c5687b1ca1b9a89457bc26dc8a7223694084a8f89cf295fc688f5a3342b/assets?page=1&limit=100&transform=true","first": "/nft/collections/6c456c5687b1ca1b9a89457bc26dc8a7223694084a8f89cf295fc688f5a3342b/assets?page=1&limit=100&transform=true","last": "/nft/collections/6c456c5687b1ca1b9a89457bc26dc8a7223694084a8f89cf295fc688f5a3342b/assets?page=1&limit=100&transform=true"},"data": [{"id": "1eeef6bac21a47cc33f897ee1f4e3eb2357108e859c614acd1a99e0a1cc5a117","ownerPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37","senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37","collectionId": "6c456c5687b1ca1b9a89457bc26dc8a7223694084a8f89cf295fc688f5a3342b","attributes": {"name": "Antonio Caracciolo","pac": 90,"sho": 65,"pas": 23,"dri": 32,"def": 21,"phy": 12},"timestamp": {"epoch": 105740128,"unix": 1595841328,"human": "2020-07-27T09:15:28.000Z"}}]}