# Get account deploys

Get deploys by the caller account public key.

```
GET /accounts/{public_key}/deploys
```

## Query params

| Query param              | Description                                  |
| ------------------------ | -------------------------------------------- |
| `contract_package_hash`  | Contract package hash of the called contract |
| `contract_hash`          | Called contract hash                         |
| `contract_entrypoint_id` | Called entry point ID                        |
| `from_block_height`      | From block height range                      |
| `to_block_height`        | To block height range                        |

## Sorting

| Property    | Description               |
| ----------- | ------------------------- |
| `timestamp` | Sort deploys by timestamp |

Default sorting is `timestamp DESC`

## Optional properties

| Property              | Type                                                                                                                                                            | Description                                                                          |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| `account_info`        | [`AccountInfo`](/1.1.x/rest-api/account-info.md)                                                                                                                | Deploy caller `AccountInfo` entity.                                                  |
| `contract_package`    | [`ContractPackage`](/1.1.x/rest-api/contract-package.md)                                                                                                        | [`ContractPackage`](/1.1.x/rest-api/contract-package.md) called by deploy.           |
| `contract`            | [`Contract`](/1.1.x/rest-api/contract.md)                                                                                                                       | [`Contract`](/1.1.x/rest-api/contract.md) called by deploy.                          |
| `contract_entrypoint` | [`ContractEntrypoint`](/1.1.x/rest-api/contract-entry-point.md)                                                                                                 | [`ContractEntrypoint`](/1.1.x/rest-api/contract-entry-point.md) called by deploy.    |
| `rate`                | `float32`                                                                                                                                                       | CSPR rate for specified currency that was relevant at the moment of deploy creation. |
| `transfers`           | \[][`Transfer`](/1.1.x/rest-api/transfer.md)                                                                                                                    | List of `Transfer` entities.                                                         |
| `nft_token_actions`   | \[] [`NFTTokenAction`](https://github.com/make-software/casper-middleware/blob/documentation-1.1.x/docs/public/rest-api/deploy/non-fungible-token-action.md)    | List of `NFTTokenAction` entities.                                                   |
| `ft_token_actions`    | \[] [`Fungible token action`](https://github.com/make-software/casper-middleware/blob/documentation-1.1.x/docs/public/rest-api/deploy/fungible-token-action.md) | List of `Fungible token action` entities.                                            |

## Response

[`PaginatedResponse`](/1.1.x/documentation/overview/pagination.md)[`<Deploy>`](/1.1.x/rest-api/deploy.md)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/accounts/020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c/deploys' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "item_count": 20,
  "page_count": 2,
  "data": [
    {
      "args": {
        "amount": {
          "cl_type": "U512",
          "parsed": "2500000000"
        },
        "id": {
          "cl_type": {
            "Option": "U64"
          },
          "parsed": null
        },
        "target": {
          "cl_type": {
            "ByteArray": 32
          },
          "parsed": "bb9b87e33a64af8fda37ceab67609b79500e8d88a2f5364f321fdc2d6ec1f74d"
        }
      },
      "block_hash": "a87896eeafadc85a9adb4ee4dd6bb8bc5d4edf8b1695f2999916324041443b03",
      "block_height": 2175890,
      "caller_public_key": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c",
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "deploy_hash": "18be0ac6c551e3a80a27847004db4cf9614ac7104b6448c7be6418116c32569b",
      "entry_point_id": null,
      "error_message": null,
      "execution_type_id": 6,
      "payment_amount": "100000000",
      "status": "processed",
      "timestamp": "2023-11-03T14:33:27Z"
    },
    {
      "args": {
        "amount": {
          "cl_type": "U512",
          "parsed": "5000000000"
        },
        "id": {
          "cl_type": {
            "Option": "U64"
          },
          "parsed": 1684147006568
        },
        "target": {
          "cl_type": "PublicKey",
          "parsed": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c"
        }
      },
      "block_hash": "43ca28afa8ed3ee7ffbe97d3f47556663942e4fa7d8420f49b9f3a5e1eec6a6e",
      "block_height": 1724562,
      "caller_public_key": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c",
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "deploy_hash": "21945b6f126abc7de1e2d84a7161f101a7c19b22eb256dfa8e8b1d8886652ee6",
      "entry_point_id": null,
      "error_message": "ApiError::InvalidPurse [12]",
      "execution_type_id": 6,
      "payment_amount": "100000000",
      "status": "processed",
      "timestamp": "2023-05-15T10:36:59Z"
    },
    ...
    {
      "args": {
        "amount": {
          "cl_type": "U512",
          "parsed": "5000000000"
        },
        "id": {
          "cl_type": {
            "Option": "U64"
          },
          "parsed": 1684318398541
        },
        "target": {
          "cl_type": "PublicKey",
          "parsed": "0203286173807276184a856010020a78df0ddf617364936b6e15efb6c1bae2f228bb"
        }
      },
      "block_hash": "f073ab064a7545593d71a8af82021b004be3a23c7ad47c5b27a4287ab894c396",
      "block_height": 1729784,
      "caller_public_key": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c",
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "deploy_hash": "6799726d44a7fd492fb284333dac7133902e405b760bf9dfe38998f995eb7117",
      "entry_point_id": null,
      "error_message": null,
      "execution_type_id": 6,
      "payment_amount": "100000000",
      "status": "processed",
      "timestamp": "2023-05-17T10:13:46Z"
    }
  ]
}
```


---

# 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.1.x/rest-api/deploy/get-account-deploys.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.
