# Get contract package NFT actions

Get contract package NFT actions by its hash

```
GET /contract-packages/{contract_package_hash}/nft-token-actions
```

## Query params

| Query param         | Description             |
| ------------------- | ----------------------- |
| `from_block_height` | From block height range |
| `to_block_height`   | To block height range   |

## Sorting

| Property    | Description                   |
| ----------- | ----------------------------- |
| `timestamp` | Sort NFT actions by timestamp |

Default sorting is `timestamp DESC`

## Optional properties

| Property           | Type                                                     | Description                                 |
| ------------------ | -------------------------------------------------------- | ------------------------------------------- |
| `contract_package` | [`ContractPackage`](/1.2.x/rest-api/contract-package.md) | NFT contract package                        |
| `deploy`           | [`Deploy`](/1.2.x/rest-api/deploy.md)                    | Deploy in which the token action occurred   |
| `from_public_key`  | `string(68)`                                             | Action source public key if it's an account |
| `to_public_key`    | `string(68)`                                             | Action target public key if it's an account |

## Response

[`PaginatedResponse`](/1.2.x/documentation/overview/pagination.md)[`<NFTTokenAction>`](/1.2.x/rest-api/fungible-token-action.md)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/contract-packages/542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89/nft-token-actions' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "data": [
    {
      "contract_package_hash": "542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89",
      "deploy_hash": "d7595a1d455676cdfa98b9f260895e6d40e89825117c641b77ab8a529686c0ab",
      "block_height": 149855,
      "from_hash": null,
      "from_type": null,
      "nft_action_id": 1,
      "timestamp": "2021-08-11T03:59:11Z",
      "to_hash": "3aec6cf365abef154d7517c6cf9f4017866095969fe17dba4ffff7eb07e03c0f",
      "to_type": 0,
      "token_id": "US-7000001-B2",
      "token_tracking_id": 1
    },
    {
      "contract_package_hash": "542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89",
      "deploy_hash": "8730b8c24d4b84ba2600f9405269142d5e3f3ef804a0d6dfa9ded95b43c2c5a3",
      "block_height": 149894,
      "from_hash": null,
      "from_type": null,
      "nft_action_id": 1,
      "timestamp": "2021-08-11T04:41:51Z",
      "to_hash": "855416b21473b4a36135a9c16acd2f26f23371bd67c3dd0c29371843ce85bbf9",
      "to_type": 0,
      "token_id": "US-7000001-X1",
      "token_tracking_id": 2
    },
    ...
    {
      "contract_package_hash": "542359cb825bbf2a10017db5cb31b8862df7a64784e39b947678164156050d89",
      "deploy_hash": "5980abe41db4ee28191ebe78ea16824e31ffb58e818d63bb4c94f745404a315a",
      "block_height": 150042,
      "from_hash": null,
      "from_type": null,
      "nft_action_id": 1,
      "timestamp": "2021-08-11T07:23:48Z",
      "to_hash": "3411d3b4d457af0309f3ee967d18ca53fdff749caa60314aeb47f2ff9f99c1c1",
      "to_type": 0,
      "token_id": "XTest9",
      "token_tracking_id": 8
    }
  ],
  "item_count": 35,
  "page_count": 4
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/1.2.x/rest-api/non-fungible-token-action/get-contract-package-token-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
