1BITCOIN-CLI(1)                   User Commands                  BITCOIN-CLI(1)
2
3
4

NAME

6       bitcoin-cli - manual page for bitcoin-cli v25.1.0
7

SYNOPSIS

9       bitcoin-cli [options] <command> [params]  Send command to Bitcoin Core
10       bitcoin-cli [options] -named <command> [name=value]...  Send command to
11       Bitcoin Core (with named arguments)
12       bitcoin-cli [options] help                List commands
13       bitcoin-cli [options] help <command>      Get help for a command
14

DESCRIPTION

16       Bitcoin Core RPC client version v25.1.0
17

OPTIONS

19       -?
20
21              Print this help message and exit
22
23       -addrinfo
24
25              Get the number of addresses known to the node, per  network  and
26              total, after filtering for quality and recency. The total number
27              of addresses known to the node may be higher.
28
29       -color=<when>
30
31              Color setting for CLI output (default: auto). Valid values:  al‐
32              ways, auto (add color codes when standard output is connected to
33              a terminal and OS is not WIN32), never.
34
35       -conf=<file>
36
37              Specify configuration file. Relative paths will be  prefixed  by
38              datadir location. (default: bitcoin.conf)
39
40       -datadir=<dir>
41
42              Specify data directory
43
44       -generate
45
46              Generate blocks, equivalent to RPC getnewaddress followed by RPC
47              generatetoaddress. Optional  positional  integer  arguments  are
48              number of blocks to generate (default: 1) and maximum iterations
49              to try (default: 1000000), equivalent to  RPC  generatetoaddress
50              nblocks and maxtries arguments. Example: bitcoin-cli -generate 4
51              1000
52
53       -getinfo
54
55              Get general information from the remote server. Note that unlike
56              server-side  RPC  calls, the output of -getinfo is the result of
57              multiple non-atomic requests. Some entries  in  the  output  may
58              represent results from different states (e.g. wallet balance may
59              be as of a different block from the chain state reported)
60
61       -named
62
63              Pass named instead of positional arguments (default: false)
64
65       -netinfo
66
67              Get network peer connection information from the remote  server.
68              An  optional integer argument from 0 to 4 can be passed for dif‐
69              ferent peers listings (default: 0).  Pass  "help"  for  detailed
70              help documentation.
71
72       -rpcclienttimeout=<n>
73
74              Timeout  in  seconds  during HTTP requests, or 0 for no timeout.
75              (default: 900)
76
77       -rpcconnect=<ip>
78
79              Send commands to node running on <ip> (default: 127.0.0.1)
80
81       -rpccookiefile=<loc>
82
83              Location of the auth cookie. Relative paths will be prefixed  by
84              a net-specific datadir location. (default: data dir)
85
86       -rpcpassword=<pw>
87
88              Password for JSON-RPC connections
89
90       -rpcport=<port>
91
92              Connect  to  JSON-RPC  on <port> (default: 8332, testnet: 18332,
93              signet: 38332, regtest: 18443)
94
95       -rpcuser=<user>
96
97              Username for JSON-RPC connections
98
99       -rpcwait
100
101              Wait for RPC server to start
102
103       -rpcwaittimeout=<n>
104
105              Timeout in seconds to wait for the RPC server to start, or 0 for
106              no timeout. (default: 0)
107
108       -rpcwallet=<walletname>
109
110              Send  RPC for non-default wallet on RPC server (needs to exactly
111              match corresponding -wallet option  passed  to  bitcoind).  This
112              changes  the RPC endpoint used, e.g.  http://127.0.0.1:8332/wal‐
113              let/<walletname>
114
115       -stdin
116
117              Read extra arguments from standard input,  one  per  line  until
118              EOF/Ctrl-D   (recommended  for  sensitive  information  such  as
119              passphrases). When combined with -stdinrpcpass, the  first  line
120              from standard input is used for the RPC password.
121
122       -stdinrpcpass
123
124              Read  RPC  password  from  standard input as a single line. When
125              combined with -stdin, the first line from standard input is used
126              for the RPC password. When combined with -stdinwalletpassphrase,
127              -stdinrpcpass  consumes  the  first  line,   and   -stdinwallet‐
128              passphrase consumes the second.
129
130       -stdinwalletpassphrase
131
132              Read  wallet  passphrase  from  standard input as a single line.
133              When combined with -stdin, the first line from standard input is
134              used for the wallet passphrase.
135
136       -version
137
138              Print version and exit
139
140       Debugging/Testing options:
141
142       Chain selection options:
143
144       -chain=<chain>
145
146              Use  the  chain  <chain>  (default: main). Allowed values: main,
147              test, signet, regtest
148
149       -signet
150
151              Use the signet chain. Equivalent to -chain=signet. Note that the
152              network is defined by the -signetchallenge parameter
153
154       -signetchallenge
155
156              Blocks  must  satisfy  the  given  script to be considered valid
157              (only for signet networks; defaults to the global default signet
158              test network challenge)
159
160       -signetseednode
161
162              Specify  a  seed  node  for  the  signet  network,  in the host‐
163              name[:port] format, e.g.  sig.net:1234  (may  be  used  multiple
164              times to specify multiple seed nodes; defaults to the global de‐
165              fault signet test network seed node(s))
166
167       -testnet
168
169              Use the test chain. Equivalent to -chain=test.
170
172       Copyright (C) 2009-2023 The Bitcoin Core developers
173
174       Please contribute if you find Bitcoin Core useful. Visit  <https://bit
175       coincore.org/>  for further information about the software.  The source
176       code is available from <https://github.com/bitcoin/bitcoin>.
177
178       This is experimental software.  Distributed under the MIT software  li‐
179       cense, see the accompanying file COPYING or <https://opensource.org/li
180       censes/MIT>
181
182
183
184bitcoin-cli v25.1.0              October 2023                   BITCOIN-CLI(1)
Impressum