# Contract package

The Contract package stream provides updates about newly added or updated contract packages

```
GET /contract-packages
```

## Optional properties

None

## Query params

| Property                | Type     | Description                               |
| ----------------------- | -------- | ----------------------------------------- |
| `contract_package_hash` | `string` | Comma-separated list of contract packages |
| `owner_public_key`      | `string` | Comma-separated list of public keys       |

## Events

| Event     | Description                                   |
| --------- | --------------------------------------------- |
| `created` | Notifies about a newly added contract package |
| `updated` | Notifies about a updated contract package     |

## Response

[`WebSocketMessage`](/1.2.x/streaming-api/reference.md#format)[`<ContractPackage>`](/1.2.x/rest-api/contract-package.md#properties)

## Example

```bash
wscat -c 'wss://streaming.testnet.cspr.cloud/contract-packages?owner_public_key=0199e3083d0ca3d840171433211dd21afa95d26cde75b09e756778b2d8b2b92262' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "data": {
    "contract_package_hash": "dd631e240a22c300b703b7999e2e979b2906b76ff37efbe8dc5c1dba09438615",
    "owner_public_key": "0199e3083d0ca3d840171433211dd21afa95d26cde75b09e756778b2d8b2b92262",
    "name": null,
    "description": null,
    "metadata": {},
    "latest_version_contract_type_id": null,
    "timestamp": "2022-05-05T16:23:14.532Z",
    "icon_url": null
  },
  "action": "created",
  "extra": {
    "deploy_hash": "71d954db5263876d74d8553f92ba12d5dd2f0df8ad030b0f5aa5687d87da696e"
  },
  "timestamp": "2024-02-26T12:26:56.628868033Z"
}
```


---

# 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/streaming-api/contract-package.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.
