> For the complete documentation index, see [llms.txt](https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/watch.md).

# watch

Poll the network's resource-pricing configuration on an interval and print a diff whenever something changes.

## Flags

```
Usage: soroban-cost-estimator watch [OPTIONS]

Options:
      --network <NETWORK>    Network to watch [default: testnet]
      --interval <INTERVAL>  Polling interval (e.g. "30m", "1h") [default: 1h]
  -h, --help                 Print help
```

## Behavior

* Polls **immediately**, then every `--interval`.
* Intervals accept `s`/`m`/`h`/`d` suffixes or bare seconds: `3600`, `3600s`, `30m`, `1h`, `1d`. Unparseable input falls back to one hour.
* Each poll fetches the config, diffs it against the previous snapshot, and prints the diff (only when something changed), plus the same stale-cache cross-reference as `config diff`.
* **SIGINT (Ctrl-C) and SIGTERM shut it down cleanly** (exit code 0): the in-flight poll is cancelled rather than writing a partial snapshot.

## Example

```bash
soroban-cost-estimator watch --network testnet --interval 30m
```

Actual output from a live run (stopped after the first poll with SIGTERM):

```
Watching testnet for config changes every 3600s... (Ctrl-C to stop)
Received stop signal — exiting cleanly.
```

(The interval prints in seconds: `--interval 1h` → `every 3600s`.)

## Example — poll every 10 minutes in CI

```bash
soroban-cost-estimator watch --network mainnet --interval 10m
```

Run under `systemd`, cron, or a CI job, `watch` gives you a prompt the moment the network's pricing model changes — and the diff output tells you exactly which pricing fields moved and which cached estimates are affected.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://soroban-cost-estimator.gitbook.io/soroban-cost_estimator-docs/watch.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
