> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peaq.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Status Callbacks

Receive status updates during submission/finalization.

```python theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
from peaq_robot import PeaqRobot
from peaq_robot.types import TxOptions, ConfirmationMode, TransactionStatusCallback
import asyncio

def on_status(s: TransactionStatusCallback):
    print(s.model_dump())

sdk = PeaqRobot()
res = sdk.store.add_data(
  "FINAL_CB", {"ok": True},
  tx_options=TxOptions(mode=ConfirmationMode.FINAL),
  on_status=on_status,
)
final_receipt = asyncio.run(res.finalize)
```

Possible `status`: `BROADCAST`, `IN_BLOCK`, `FINALIZED`.

Sample callback prints (abridged):

```text theme={"theme":{"light":"github-light-default","dark":"github-dark"}}
{'status': 'TransactionStatus.BROADCAST', 'hash': '0x3b7f...e1', 'total_confirmations': 0}
{'status': 'TransactionStatus.IN_BLOCK', 'hash': '0x3b7f...e1', 'total_confirmations': 1}
{'status': 'TransactionStatus.FINALIZED', 'hash': '0x3b7f...e1', 'total_confirmations': 10}
```
