> For the complete documentation index, see [llms.txt](https://docs.protokol.com/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.protokol.com/developers/sdk/nft/api-endpoints/assets.md).

# Assets

## All Assets

## /assets

<mark style="color:blue;">`GET`</mark> `https://explorer.protokol.sh/api/nft/assets`&#x20;

Returns all Assets

#### Query Parameters

| Name      | Type    | Description                                                                 |
| --------- | ------- | --------------------------------------------------------------------------- |
| page      | integer | The number of page to be returned                                           |
| limit     | integer | The number of transaction per page                                          |
| orderBy   | string  | <p>Order by specific parameter (asc or desc)<br>Example: orderBy=id:asc</p> |
| transform | boolean | Transform to raw response                                                   |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 3,
    "pageCount": 1,
    "totalCount": 3,
    "next": null,
    "previous": null,
    "self": "/nft/assets?transform=true&page=1&limit=100",
    "first": "/nft/assets?transform=true&page=1&limit=100",
    "last": "/nft/assets?transform=true&page=1&limit=100"
  },
  "data": [
    {
      "id": "f811518958861d4c1e72943f646b1bd848f606e6cc9bd6300480e6a0b501cf47",
      "ownerPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "collectionId": "8643026a0997dc9fe74ce4aa11f522ecff651fa72ecf0127a0665fd52535bc1b",
      "attributes": {
        "name": "AREX ALPHA",
        "description": "THE AREX ALPHA IS THE NEXT EVOLUTIONARY STEP IN THE AREX HANDGUN FAMILY. IT IS A DIRECT DESCENDANT OF THE AREX ZERO 1 AND HAS INHERITED ITS TOUGHNESS AND RELIABILITY. LISTENING TO THE PRACTICAL SHOOTERS, AREX DESIGNED AND DEVELOPED A PISTOL THAT EXCELS IN COMPETITIVE PRACTICAL SHOOTING AS WELL AS IN TACTICAL SCENARIOS. WITH THE ELUSIVE AND ALL IMPORTANT SHOOTABILITY BEING AREXS PRIMARY GOAL, A STEEL FRAME WAS USED IN PLACE OF AN ALUMINUM ONE. A REENGINEERED GRIP RESULTS IN SHORTER TRIGGER REACH AND NOTABLY HIGHER HAND POSITION. AN UNDERCUT TRIGGER GUARD AND EXTENDED BEAVERTAIL COMPLETE THE ERGONOMIC TRANSFORMATION. THE LONG SLIDE HOUSES A FIVE INCH BARREL, PROVIDING A LONGER LINE OF SIGHT FOR FASTER AND MORE ACCURATE SHOTS. THE SLIDE HAS BEEN LIGHTENED SIGNIFICANTLY UTILIZING LIGHTENING CUTS TO ACCOMPLISH FASTER CYCLING.",
        "serialNumber": "6789897676898976",
        "caliber": "9 x 19 mm",
        "length": "226 mm // 8.9 inches",
        "height": "155 mm // 6.1 inches",
        "width": "42 mm // 1.65 inches",
        "barrelLength": "127 mm // 5.0 inches",
        "weight": "1202 g // 42.3 oz",
        "frameColors": "Nitrocarburized steel // Graphite black color // Blue // Red",
        "slide": "Nitrocarburized steel // Graphite black color",
        "slights": "Fiber optic front and fully adjustable black rear sight",
        "ipfsImageHash": "QmPbvs8G1jVaH6iHBUC2W1YnwY9AhzD98ydVqnhG9KMej1"
      },
      "timestamp": {
        "epoch": 143237168,
        "unix": 1633338368,
        "human": "2021-10-04T09:06:08.000Z"
      }
    },
    ...
  ]
}
```

{% endtab %}
{% endtabs %}

### Examples

{% tabs %}
{% tab title="Curl" %}

```
curl https://explorer.protokol.sh/api/nft/assets
```

{% endtab %}

{% tab title="Typescript" %}

```typescript
const response = connection.NFTBaseApi("assets").all();

>>> Promise<ApiResponseWithPagination<AssetsResource[]>>
```

{% endtab %}
{% endtabs %}

## Asset by id

## /assets/:id

<mark style="color:blue;">`GET`</mark> `https://explorer.protokol.sh/api/nft/assets/:id`   &#x20;

Returns asset by id

#### Path Parameters

| Name | Type   | Description                                 |
| ---- | ------ | ------------------------------------------- |
| id   | string | The identifier of the asset to be retrieved |

#### Query Parameters

| Name      | Type    | Description               |
| --------- | ------- | ------------------------- |
| transform | boolean | Transform to raw response |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": {
    "id": "f811518958861d4c1e72943f646b1bd848f606e6cc9bd6300480e6a0b501cf47",
    "ownerPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
    "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
    "collectionId": "8643026a0997dc9fe74ce4aa11f522ecff651fa72ecf0127a0665fd52535bc1b",
    "attributes": {
      "name": "AREX ALPHA",
      "description": "THE AREX ALPHA IS THE NEXT EVOLUTIONARY STEP IN THE AREX HANDGUN FAMILY. IT IS A DIRECT DESCENDANT OF THE AREX ZERO 1 AND HAS INHERITED ITS TOUGHNESS AND RELIABILITY. LISTENING TO THE PRACTICAL SHOOTERS, AREX DESIGNED AND DEVELOPED A PISTOL THAT EXCELS IN COMPETITIVE PRACTICAL SHOOTING AS WELL AS IN TACTICAL SCENARIOS. WITH THE ELUSIVE AND ALL IMPORTANT SHOOTABILITY BEING AREXS PRIMARY GOAL, A STEEL FRAME WAS USED IN PLACE OF AN ALUMINUM ONE. A REENGINEERED GRIP RESULTS IN SHORTER TRIGGER REACH AND NOTABLY HIGHER HAND POSITION. AN UNDERCUT TRIGGER GUARD AND EXTENDED BEAVERTAIL COMPLETE THE ERGONOMIC TRANSFORMATION. THE LONG SLIDE HOUSES A FIVE INCH BARREL, PROVIDING A LONGER LINE OF SIGHT FOR FASTER AND MORE ACCURATE SHOTS. THE SLIDE HAS BEEN LIGHTENED SIGNIFICANTLY UTILIZING LIGHTENING CUTS TO ACCOMPLISH FASTER CYCLING.",
      "serialNumber": "6789897676898976",
      "caliber": "9 x 19 mm",
      "length": "226 mm // 8.9 inches",
      "height": "155 mm // 6.1 inches",
      "width": "42 mm // 1.65 inches",
      "barrelLength": "127 mm // 5.0 inches",
      "weight": "1202 g // 42.3 oz",
      "frameColors": "Nitrocarburized steel // Graphite black color // Blue // Red",
      "slide": "Nitrocarburized steel // Graphite black color",
      "slights": "Fiber optic front and fully adjustable black rear sight",
      "ipfsImageHash": "QmPbvs8G1jVaH6iHBUC2W1YnwY9AhzD98ydVqnhG9KMej1"
    },
    "timestamp": {
      "epoch": 143237168,
      "unix": 1633338368,
      "human": "2021-10-04T09:06:08.000Z"
    }
  }
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Asset not found"
}
```

{% endtab %}

{% tab title="422 " %}

```javascript
tr
```

{% endtab %}
{% endtabs %}

### Examples

{% tabs %}
{% tab title="Curl" %}

```
curl https://explorer.protokol.sh/api/nft/assets/f811518958861d4c1e72943f646b1bd848f606e6cc9bd6300480e6a0b501cf47
```

{% endtab %}

{% tab title="Typescript" %}

```typescript
const response = connection.NFTBaseApi("assets").get("VALID_ID");

>>> Promise<ApiResponse<AssetsResource>>
```

{% endtab %}
{% endtabs %}

## Wallet Owning Asset

## /assets/:id/wallets

<mark style="color:blue;">`GET`</mark> `https://explorer.protokol.sh/api/nft/assets/:id/wallets`  &#x20;

Returns assets owner wallet

#### Path Parameters

| Name | Type   | Description                 |
| ---- | ------ | --------------------------- |
| id   | string | The identifier of the asset |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": {
    "address": "AbfQq8iRSf9TFQRzQWo33dHYU7HFMS17Zd",
    "publicKey": "02def27da9336e7fbf63131b8d7e5c9f45b296235db035f1f4242c507398f0f21d",
    "nft": {
      "collections": [],
      "assetsIds": [
        "aa4a880e053644fee1475616a874e6689c2dfdbca0fb0a3db5a3f091c6e07d80"
      ]
    }
  }
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Asset not found or it was burned"
}
```

{% endtab %}

{% tab title="422 " %}

```javascript
{
  "statusCode": 422,
  "error": "Unprocessable Entity",
  "message": "\"id\" length must be 64 characters long"
}
```

{% endtab %}
{% endtabs %}

### Examples

{% tabs %}
{% tab title="Curl" %}

```
curl https://explorer.protokol.sh/api/nft/assets/baab82791f89a7f0af9e806dd2c634c9064903e514d1053179ff03f6d3d40866/wallets
```

{% endtab %}

{% tab title="Typescript" %}

```typescript
const response = connection.NFTBaseApi("assets").wallet("VALID_ID");

>>> Promise<ApiResponse<AssetsWallet>>
```

{% endtab %}
{% endtabs %}

## Wallet Assets

## /assets/wallet/:id

<mark style="color:blue;">`GET`</mark> `https://explorer.protokol.sh/api/nft/assets/wallet/:id`&#x20;

Returns all assets a wallet owns.

#### Path Parameters

| Name | Type   | Description            |
| ---- | ------ | ---------------------- |
| id   | string | Public key of a wallet |

#### Query Parameters

| Name             | Type    | Description                                                                                       |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------- |
| page             | integer | The number of the page that will be returned                                                      |
| limit            | integer | The number of resources per page                                                                  |
| orderBy          | string  | <p>Order by specific parameter (asc or desc)<br>Example: orderBy=id:asc</p>                       |
| transform        | boolean | It returns modified or raw data                                                                   |
| inAuction        | boolean | Returns only assets in active auctions (not canceled or accepted trade auctions)                  |
| inExpiredAuction | boolean | Extends inAuction parameter, if true include assets included in expired auction, false by default |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "meta": {
    "totalCountIsEstimate": false,
    "count": 1,
    "pageCount": 1,
    "totalCount": 1,
    "next": null,
    "previous": null,
    "self": "/nft/assets/wallet/02def27da9336e7fbf63131b8d7e5c9f45b296235db035f1f4242c507398f0f21d?transform=true&inAuction=false&inExpiredAuction=false&page=1&limit=100",
    "first": "/nft/assets/wallet/02def27da9336e7fbf63131b8d7e5c9f45b296235db035f1f4242c507398f0f21d?transform=true&inAuction=false&inExpiredAuction=false&page=1&limit=100",
    "last": "/nft/assets/wallet/02def27da9336e7fbf63131b8d7e5c9f45b296235db035f1f4242c507398f0f21d?transform=true&inAuction=false&inExpiredAuction=false&page=1&limit=100"
  },
  "data": [
    {
      "id": "aa4a880e053644fee1475616a874e6689c2dfdbca0fb0a3db5a3f091c6e07d80",
      "ownerPublicKey": "02def27da9336e7fbf63131b8d7e5c9f45b296235db035f1f4242c507398f0f21d",
      "senderPublicKey": "02def27da9336e7fbf63131b8d7e5c9f45b296235db035f1f4242c507398f0f21d",
      "collectionId": "8643026a0997dc9fe74ce4aa11f522ecff651fa72ecf0127a0665fd52535bc1b",
      "attributes": {
        "name": "AREX ALPHA",
        "description": "THE AREX ALPHA IS THE NEXT EVOLUTIONARY STEP IN THE AREX HANDGUN FAMILY. IT IS A DIRECT DESCENDANT OF THE AREX ZERO 1 AND HAS INHERITED ITS TOUGHNESS AND RELIABILITY. LISTENING TO THE PRACTICAL SHOOTERS, AREX DESIGNED AND DEVELOPED A PISTOL THAT EXCELS IN COMPETITIVE PRACTICAL SHOOTING AS WELL AS IN TACTICAL SCENARIOS. WITH THE ELUSIVE AND ALL IMPORTANT SHOOTABILITY BEING AREXS PRIMARY GOAL, A STEEL FRAME WAS USED IN PLACE OF AN ALUMINUM ONE. A REENGINEERED GRIP RESULTS IN SHORTER TRIGGER REACH AND NOTABLY HIGHER HAND POSITION. AN UNDERCUT TRIGGER GUARD AND EXTENDED BEAVERTAIL COMPLETE THE ERGONOMIC TRANSFORMATION. THE LONG SLIDE HOUSES A FIVE INCH BARREL, PROVIDING A LONGER LINE OF SIGHT FOR FASTER AND MORE ACCURATE SHOTS. THE SLIDE HAS BEEN LIGHTENED SIGNIFICANTLY UTILIZING LIGHTENING CUTS TO ACCOMPLISH FASTER CYCLING.",
        "serialNumber": "6789897676898976",
        "caliber": "9 x 19 mm",
        "length": "226 mm // 8.9 inches",
        "height": "155 mm // 6.1 inches",
        "width": "42 mm // 1.65 inches",
        "barrelLength": "127 mm // 5.0 inches",
        "weight": "1202 g // 42.3 oz",
        "frameColors": "Nitrocarburized steel // Graphite black color // Blue // Red",
        "slide": "Nitrocarburized steel // Graphite black color",
        "slights": "Fiber optic front and fully adjustable black rear sight",
        "ipfsImageHash": "QmPbvs8G1jVaH6iHBUC2W1YnwY9AhzD98ydVqnhG9KMej1"
      },
      "timestamp": {
        "epoch": 143238280,
        "unix": 1633339480,
        "human": "2021-10-04T09:24:40.000Z"
      }
    }
  ]
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Wallet not found"
}
```

{% endtab %}

{% tab title="422 " %}

```javascript
{
  "statusCode": 422,
  "error": "Unprocessable Entity",
  "message": "\"id\" length must be 66 characters long"
}
```

{% endtab %}
{% endtabs %}

### Examples

{% tabs %}
{% tab title="Curl" %}

```
curl https://explorer.protokol.sh/api/nft/assets/wallet/03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37
```

{% endtab %}

{% tab title="Typescript" %}

```typescript
const response = connection.NFTBaseApi("assets").walletAssets("PUBLIC_KEY");

>>> Promise<ApiResponseWithPagination<AssetsResource[]>>
```

{% endtab %}
{% endtabs %}

## Search By Asset

## /assets/search

<mark style="color:green;">`POST`</mark> `https://explorer.protokol.sh/api/nft/assets/search`&#x20;

Search assets by their JSON attributes.

#### Query Parameters

| Name      | Type    | Description                                                                 |
| --------- | ------- | --------------------------------------------------------------------------- |
| page      | integer | The number of the page that will be returned                                |
| limit     | integer | The number of resources per page                                            |
| orderBy   | string  | <p>Order by specific parameter (asc or desc)<br>Example: orderBy=id:asc</p> |
| transform | boolean | It returns modified or raw data.                                            |

#### Request Body

| Name          | Type   | Description             |
| ------------- | ------ | ----------------------- |
| attributeName | object | Attribute to search by. |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 3,
    "pageCount": 1,
    "totalCount": 3,
    "next": null,
    "previous": null,
    "self": "/nft/assets/search?transform=true&page=1&limit=100",
    "first": "/nft/assets/search?transform=true&page=1&limit=100",
    "last": "/nft/assets/search?transform=true&page=1&limit=100"
  },
  "data": [
    {
      "id": "f811518958861d4c1e72943f646b1bd848f606e6cc9bd6300480e6a0b501cf47",
      "ownerPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "collectionId": "8643026a0997dc9fe74ce4aa11f522ecff651fa72ecf0127a0665fd52535bc1b",
      "attributes": {
        "name": "AREX ALPHA",
        "description": "THE AREX ALPHA IS THE NEXT EVOLUTIONARY STEP IN THE AREX HANDGUN FAMILY. IT IS A DIRECT DESCENDANT OF THE AREX ZERO 1 AND HAS INHERITED ITS TOUGHNESS AND RELIABILITY. LISTENING TO THE PRACTICAL SHOOTERS, AREX DESIGNED AND DEVELOPED A PISTOL THAT EXCELS IN COMPETITIVE PRACTICAL SHOOTING AS WELL AS IN TACTICAL SCENARIOS. WITH THE ELUSIVE AND ALL IMPORTANT SHOOTABILITY BEING AREXS PRIMARY GOAL, A STEEL FRAME WAS USED IN PLACE OF AN ALUMINUM ONE. A REENGINEERED GRIP RESULTS IN SHORTER TRIGGER REACH AND NOTABLY HIGHER HAND POSITION. AN UNDERCUT TRIGGER GUARD AND EXTENDED BEAVERTAIL COMPLETE THE ERGONOMIC TRANSFORMATION. THE LONG SLIDE HOUSES A FIVE INCH BARREL, PROVIDING A LONGER LINE OF SIGHT FOR FASTER AND MORE ACCURATE SHOTS. THE SLIDE HAS BEEN LIGHTENED SIGNIFICANTLY UTILIZING LIGHTENING CUTS TO ACCOMPLISH FASTER CYCLING.",
        "serialNumber": "6789897676898976",
        "caliber": "9 x 19 mm",
        "length": "226 mm // 8.9 inches",
        "height": "155 mm // 6.1 inches",
        "width": "42 mm // 1.65 inches",
        "barrelLength": "127 mm // 5.0 inches",
        "weight": "1202 g // 42.3 oz",
        "frameColors": "Nitrocarburized steel // Graphite black color // Blue // Red",
        "slide": "Nitrocarburized steel // Graphite black color",
        "slights": "Fiber optic front and fully adjustable black rear sight",
        "ipfsImageHash": "QmPbvs8G1jVaH6iHBUC2W1YnwY9AhzD98ydVqnhG9KMej1"
      },
      "timestamp": {
        "epoch": 143237168,
        "unix": 1633338368,
        "human": "2021-10-04T09:06:08.000Z"
      }
    },
    ...
  ]
}
```

{% endtab %}
{% endtabs %}

### Examples

{% tabs %}
{% tab title="Curl" %}

```bash
curl --request POST \
  --url https://explorer.protokol.sh/api/nft/assets/search \
  --header 'content-type: application/json' \
  --data '{
      "name": "AREX ALPHA"
}'
```

{% endtab %}

{% tab title="Typescript" %}

```typescript
const response = connection.NFTBaseApi("assets").searchByAsset({
    "VALID_JSON_OBJECT"
});

>>> Promise<ApiResponseWithPagination<AssetsResource[]>>
```

{% endtab %}
{% endtabs %}
