Skip to main content

Managing tez

You can do many basic tez transactions with the Octez client. The examples below work with ordinary accounts; for multi-signature accounts, see Accounts.

note

Before sending transactions to contracts with the Octez client, make sure that your client is configured to use an RPC node for the network that you want to use. To verify the RPC node that you are using, run octez-client config show and look at the value in the endpoint field. You can set this value using the command octez-client config --endpoint <PUBLIC_NODE> update (see Public nodes for possible values).

Getting an account's balance

To get the balance of an account, pass its address or local alias to the Octez-client get balance for command, as in this example:

octez-client get balance for account1

You can also look up account balances on block explorers and other web sites.

Sending tez

To send tez from a source account to a target account, use the octez-client transfer command, as in this example:

octez-client transfer 42 from account1 to account2

However, if this is the very first time that anyone sends tez to this target account, you must add option --burn-cap 0.1 for storing this account on the blockchain.

You can use addresses or local aliases for the source and target accounts, but Octez must have the private key for the source account to sign the transaction.

Staking

You can delegate and stake with the staking web site as described in Staking, or you can stake tez with the Octez client, as in this example:

octez-client stake 1 for account1

Before you can stake, you must delegate your account. See Staking and Delegating accounts.

To unstake, pass the amount to unstake, as in this example:

octez-client unstake 1 for account1

Then when the delay has ended, finalize the unstake operation, as in this example:

octez-client finalize unstake for account1