<pre><code>bitcoind getnewaddress [account]
</code></pre>

<p>Where <code>account</code> is the name you want the new address associated with. </p>

<p>Here is the <a href="https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list" rel="nofollow">API documentation.</a> </p>

CC BY-SA 3.0
2013-12-28T13:55:07.700Z
OK but getnewaddress does not take the private key as an argument. How do I create a new address using a selected private key?
user11286
CC BY-SA 3.0
2013-12-28T16:14:02.393Z
There is no method which accepts a private key as input. However what you can do is take an address from a specific key from your wallet and then if you call `getnewaddress` with that account, the new address will be associated with that private key.
Loourr
CC BY-SA 3.0
2013-12-29T15:09:27.563Z
what if I only have one account that uses all the private keys how do I associate a new address with a specific key then?
user11286
CC BY-SA 3.0
2013-12-29T18:14:40.053Z
you cant have an account associated with more then one key, however you can have as many accounts as you want associated with a given key.
Loourr
CC BY-SA 3.0
2013-12-30T08:07:06.457Z
but guys like blockchain.fino (which is a shared e-wallet) allows you to have a unique private key per user. I presume blockchain.info also only has one wallet on bitcoind with user accounts managed in a separate db. Thus if a user transfer funds from his account he uses his own private key to generate a unique address.
user11286
CC BY-SA 3.0
2013-12-30T16:42:48.780Z
You can use things like [pywallet](https://github.com/jackjack-jj/pywallet) to manage lots of different `wallet.dat` files. But the fact remains, a given account can only ever be associated with one `wallet.dat` file however each `wallet.dat` can have arbitrarily many accounts associated with it.
Loourr
CC BY-SA 3.0
2013-12-28T00:34:26.907Z
2013-12-28T00:34:26.907Z
Loourr
<p>If I have, say 20, priv/pub key pairs in my wallet which bitcoin API calls do I use to:</p>

<ol>
<li>Select a specific privpub key pair.</li>
<li>Generate a new bitcoin address (using the selected private key)</li>
</ol>

<api>
Which API call creates new bitcoin addresses
user11286
# Which API call creates new bitcoin addresses

(Asked by: username_0 on 2013-12-27)

If I have, say 20, priv/pub key pairs in my wallet which bitcoin API calls do I use to:

1. Select a specific privpub key pair.
2. Generate a new bitcoin address (using the selected private key)

**Tags:** api


---

## 1 answers

### Answer by username_1 on 2013-12-28. Score: 1

```
bitcoind getnewaddress [account]

```

Where `account` is the name you want the new address associated with.

Here is the [API documentation.](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list)

> **Comments:**
> **username_0**: OK but getnewaddress does not take the private key as an argument. How do I create a new address using a selected private key?  
> **username_1**: There is no method which accepts a private key as input. However what you can do is take an address from a specific key from your wallet and then if you call `getnewaddress` with that account, the new address will be associated with that private key.  
> **username_0**: what if I only have one account that uses all the private keys how do I associate a new address with a specific key then?  
> **username_1**: you cant have an account associated with more then one key, however you can have as many accounts as you want associated with a given key.  
> **username_0**: but guys like blockchain.fino (which is a shared e-wallet) allows you to have a unique private key per user. I presume blockchain.info also only has one wallet on bitcoind with user accounts managed in a separate db. Thus if a user transfer funds from his account he uses his own private key to generate a unique address.  
> **username_1**: You can use things like [pywallet](https://github.com/jackjack-jj/pywallet) to manage lots of different `wallet.dat` files. But the fact remains, a given account can only ever be associated with one `wallet.dat` file however each `wallet.dat` can have arbitrarily many accounts associated with it.  

---

