Skip to content

Watch

The watch mode provides a quick way to tail the latest events from the blockchain. It connects directly to a Cardano node using either node-to-client or node-to-node protocols. The output is sent into the terminal in a human-readable fashion.

The output is colorized by type of event and dynamically truncated to fit the width of the terminal. The speed of the output lines is throttled to facilitate visual inspection of each even, otherwise, all events for a block would be output simultaneously.

Usage

To start Oura in watch mode, use the following command from your terminal:

oura watch [OPTIONS] <socket>
  • <socket>: this a required argument that specifies how to connect to the cardano node. It can either be a tcp address (<host>:<port> syntax) or a file path pointing to the location of the unix socket.

Options

  • --bearer <bearer>: an option that specifies the type of bearer to use. Possible values are tcp and unix. If omitted, the value tcp is used as default.
  • --magic <magic>: the magic number of the network you’re connecting to. Possible values are mainnet, testnet, preview, preprod or a numeric value. If omitted, the value mainnet is used as default.
  • --since <slot>,<hash>: an option to specify from which point in the chain Oura should start reading from. The point is referenced by passing the slot of the block followed by a comma and the hash of the block (<slot>,<hash>). If omitted, Oura will start reading from the tail (tip) of the node.
  • --throttle: milliseconds to wait between output lines (for easier reading).
  • --wrap: indicates that long output text should break and continue in the following line. If omitted, lines will be truncated to fit in the available terminal width.

Examples

Watch Live Data From A Remote Relay Node

Terminal window
oura watch relays-new.cardano-mainnet.iohk.io:3001 --bearer tcp

Watch Live Data From A Local Node Via Unix Socket

Terminal window
oura watch /opt/cardano/cnode/sockets/node0.socket --bearer unix

Watch Live Data From The Tip Of A Local Testnet Node

Terminal window
oura watch /opt/cardano/cnode/sockets/node0.socket --bearer unix --magic testnet

Watch Data Starting At A Particular Block

Terminal window
oura watch relays-new.cardano-mainnet.iohk.io:3001 \
--bearer tcp \
--since 49159253,d034a2d0e4c3076f57368ed59319010c265718f0923057f8ff914a3b6bfd1314

Watch Live Data From the “Preview” testnet

Terminal window
oura watch preview-node.world.dev.cardano.org:30002 --bearer tcp --magic preview

Watch Live Data From the “Pre-Production” testnet

Terminal window
oura watch preprod-node.world.dev.cardano.org:30000 --bearer tcp --magic preprod