Wallet CLI
This document is a reference for Chia's wallet
CLI commands. The following wallet
commands are documented on their own dedicated pages:
Reference
add_token
Functionality: Add/Rename a CAT to the wallet by its asset ID
Usage: chia wallet add_token [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-wp | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-id | --asset-id | TEXT | True | The Asset ID of the coin you wish to add/rename (the treehash of the TAIL program) |
-n | --token-name | TEXT | False | The name you wish to designate to the token |
-f | --fingerprint | INTEGER | False | The wallet fingerprint you wish to add the token to |
-h | --help | None | False | Show a help message and exit |
Example
Add the Spacebucks token:
chia wallet add_token --asset-id a628c1c2c6fcb74d53746157e438e108eab5c0bb3e5c80ff9b1910b3e4832913 --token-name Spacebucks --fingerprint 2121994410
Response:
Successfully added Spacebucks with wallet id 3 on key 2121994410
coins:
Functionality: List, split, and combine your wallet's coins
list
Functionality: List coins in a wallet, with options for filtering
Usage: chia wallet coins list [OPTIONS]
Options:
Short Command | Long Command | Type | Required | Description |
---|---|---|---|---|
-p | --wallet-rpc-port | INTEGER | False | Set the port where the Wallet is hosting the RPC interface. See the rpc_port under wallet in config.yaml |
-f | --fingerprint | INTEGER | False | Set the fingerprint to specify which wallet to use |
-i | --id | INTEGER | False | Id of the wallet to use [default: 1] |
-u | --show-unconfirmed | BOOLEAN | False | Separately display unconfirmed coins [default: false] |
--min-amount | TEXT | False | Ignore coins worth less then this much (XCH or CAT units) | |
--max-amount | TEXT | False | Ignore coins worth more then this much (XCH or CAT units) | |
--exclude-coin | TEXT | False | Prevent this coin from being included (can be reused to exclude multiple coins) | |
--exclude-amount | TEXT | False | Exclude any coins with this amount from being included (can be reused to exclude multiple amounts) | |
--paginate | None | False | Prompt for each page of data. Defaults to enabled for interactive consoles, otherwise defaults to disabled | |
--no-paginate | None | False | Do not prompt for each page of data. Defaults to disabled for interactive consoles, otherwise defaults to enabled | |
-h | --help | None | False | Show a help message and exit |
By default, it you have more than 200 unspent coins worth less than one million mojos in your wallet, the dust filter will be activated. Any coins that have been filtered will not be listed. You can disable the dust filter by editing ~/.chia/mainnet/config/config.yaml
and changing the value of xch_spam_amount
to 0
. More info on the dust filter.
Example 1 will give a baseline:
Example 1
List all coins for a given fingerprint:
chia wallet coins list -f 590161281
In the response, note that pagination is enabled by default:
There are a total of 7 coins in wallet 1.
7 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Press q to quit, or c to continue
c
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
The following examples all use the same coin state that was obtained in Example 1:
Example 2: exclude small coins
Exclude coins smaller than 0.1 XCH:
chia wallet coins list -f 590161281 --min-amount 0.1
Response:
There are a total of 3 coins in wallet 1.
3 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Example 3: exclude large coins
Exclude coins larger than 0.00001 XCH. Note that there is one coin of exactly that value. It is included:
chia wallet coins list -f 590161281 --max-amount 0.00001
Response:
There are a total of 4 coins in wallet 1.
4 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Example 4: exclude specific coins
Use the --exclude-coin
flag multiple times to exclude individual coins:
chia wallet coins list -f 590161281 --exclude-coin 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35 --exclude-coin 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Response:
There are a total of 5 coins in wallet 1.
5 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Example 5: exclude specific amounts
Use the --exclude-amount
flag multiple times to exclude specific amounts. Note that if multiple coins have the same amount, they will all be excluded:
chia wallet coins list -f 590161281 --exclude-amount 0.0000001 --exclude-amount 0.241499799999
Response:
There are a total of 4 coins in wallet 1.
4 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639
Example 6: disable pagination
The --no-paginate
flag will cause all coins to be listed with no additional input from the user:
chia wallet coins list -f 590161281 --no-paginate
Response:
There are a total of 7 coins in wallet 1.
7 confirmed coins.
0 unconfirmed additions.
0 unconfirmed removals.
Confirmed coins:
Coin ID: 0xdd4e3bf8bd9f5079ca90315ed36fde77af0c04352a296b397bcdaff655ce3e35
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000010000000 (10000000 mojo), Confirmed in block: 2767623
Coin ID: 0xf3b39365c6740a06bae6fe0e94405c8a2679d4bccd1abb725d4338bbc8800156
Address: xch133pklxpat09ahykk6q56gyfa5kq09lzrh9p7jtwlq65l2njl2qpsz036vx Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2767579
Coin ID: 0x242e1c68d1cd5c151c77702006596efc65e733c1803c3aa5617203f39904db54
Address: xch1cdw9mgrzw9aa0rskg023wuf9pmqh87qakv4jwlenwxfddu88mqusg990d4 Amount: 0.241499799999 (241499799999 mojo), Confirmed in block: 2768188
Coin ID: 0x976c7291b6c946a425b57ae21b7f5c5fe1a5c122fa797d6fa598d8931541f833
Address: xch1m66vmtxm3xlerru7r49l7sfurphlusxywrkkl8q5a5mwvemwjawqq5ygjp Amount: 0.000000100000 (100000 mojo), Confirmed in block: 2768188
Coin ID: 0x2749503fb302b9654fc9f0dabd88787083ad341aaeee4a2bac113feb92ae59fc
Address: xch1q94gd4hd62ecx08d0kuagmp5cr8umrwtcvatfupmd7uyzhuf4c4sy2zd46 Amount: 0.000000099999 (99999 mojo), Confirmed in block: 2767579
Coin ID: 0x8ac5ff2d0ea13f61de631c7519581f030c3236710e5ea62c81a03182da4b7984
Address: xch1ju90mhn8nq7nnd25whap56ajf6eraxayw6qlk6f7sr0w3jf5d2ps9x0zzu Amount: 0.249979799998 (249979799998 mojo), Confirmed in block: 2767623
Coin ID: 0x1c51b470e3fc7f97e155fd72e464f2192426d35857d78777a2a9c08358252eeb
Address: xch15pmsqc28x3vgms4ma3z0x4t5qh9hkalqnay8fz9rmvph2lfh575qzerres Amount: 0.500000000000 (500000000000 mojo), Confirmed in block: 2735639