<p><code>getinfo</code> has been deprecated as an RPC command, and the hyphenated version is provided as a bridge for legacy applications that have not yet moved to <code>getblockchaininfo</code> and <code>getnetworkinfo</code>.</p>

<p>For regular RPC commands, you do not need the hyphen, and can simply run them as <code>bitcoin-cli getblockchaininfo</code>.</p>

<p>The hyphenated parameters control the behaviour of bitcoin-cli itself, such as which <code>datadir</code> to connect to, or whether to use <code>named</code> parameters in the requests.</p>

CC BY-SA 4.0
2019-11-14T15:59:04.607Z
Thank you. At least there is a place on the internet, NOW,  for people to find this out, easily, cause I spent some time and found NOTHING that explained what you just did. :-) Thanks again.
Norman Bird
CC BY-SA 4.0
2019-11-14T15:38:04.357Z
2019-11-14T15:38:04.357Z
Raghav Sood
<p>So I have bitcoind -daemon running and it appears to be generating the blockchain. keeps saying </p>

<blockquote>
  <p>Potential stale tip detected, will try using extra outbound peer...</p>
</blockquote>

<p>The issue is I run bitcoin-cli commands and get the following error:</p>

<pre><code>$ bitcoin-cli -getnetworkinfo
Error parsing command line arguments: Invalid parameter -getnetworkinfo
</code></pre>

<p>same for many others. The only cli command that seems to work is :</p>

<pre><code>bitcoin-cli -getinfo
{
  "version": 180100,
  "protocolversion": 70015,
  "walletversion": 169900,
  "balance": 0.00000000,
  "blocks": 0,
  "timeoffset": 0,
  "connections": 0,
  "proxy": "",
  "difficulty": 1,
  "testnet": false,
  "keypoololdest": 1573696666,
  "keypoolsize": 1000,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}
</code></pre>

<p>according to the manual they should all work but many are saying invalid argument. I have searched and am shocked that there does not appear to be any info on why this is happening to some and not others. So here I am. </p>

CC BY-SA 4.0
2019-11-14T15:32:37.997Z
It seems like if I remove the - in front of SOME of the parameters, they then work. Even though the instructions on bitcoin.org say to use the hypen (-) for all of them. Is this not strange?
Norman Bird
<bitcoin-core><full-node>
I get invalid argument error when running bitcoin-cli -getnetworkinfo, and a few other parameters
Norman Bird
# I get invalid argument error when running bitcoin-cli -getnetworkinfo, and a few other parameters

(Asked by: username_0 on 2019-11-14)

So I have bitcoind -daemon running and it appears to be generating the blockchain. keeps saying

> Potential stale tip detected, will try using extra outbound peer...

The issue is I run bitcoin-cli commands and get the following error:

```
$ bitcoin-cli -getnetworkinfo
Error parsing command line arguments: Invalid parameter -getnetworkinfo

```

same for many others. The only cli command that seems to work is :

```
bitcoin-cli -getinfo
{
  "version": 180100,
  "protocolversion": 70015,
  "walletversion": 169900,
  "balance": 0.00000000,
  "blocks": 0,
  "timeoffset": 0,
  "connections": 0,
  "proxy": "",
  "difficulty": 1,
  "testnet": false,
  "keypoololdest": 1573696666,
  "keypoolsize": 1000,
  "paytxfee": 0.00000000,
  "relayfee": 0.00001000,
  "warnings": ""
}

```

according to the manual they should all work but many are saying invalid argument. I have searched and am shocked that there does not appear to be any info on why this is happening to some and not others. So here I am.

**Tags:** bitcoin-core, full-node

> **Comments:**
> **username_0**: It seems like if I remove the - in front of SOME of the parameters, they then work. Even though the instructions on bitcoin.org say to use the hypen (-) for all of them. Is this not strange?  

---

## 1 answers

### Answer by username_1 on 2019-11-14. Score: 2 | Accepted answer

`getinfo` has been deprecated as an RPC command, and the hyphenated version is provided as a bridge for legacy applications that have not yet moved to `getblockchaininfo` and `getnetworkinfo`.

For regular RPC commands, you do not need the hyphen, and can simply run them as `bitcoin-cli getblockchaininfo`.

The hyphenated parameters control the behaviour of bitcoin-cli itself, such as which `datadir` to connect to, or whether to use `named` parameters in the requests.

> **Comments:**
> **username_0**: Thank you. At least there is a place on the internet, NOW,  for people to find this out, easily, cause I spent some time and found NOTHING that explained what you just did. :-) Thanks again.  

---

