<p>Yes, you can use bitcoin-cli for address generation.</p>

<p>To learn more try:</p>

<blockquote>
  <p>bitcoin-cli help getnewaddress</p>
</blockquote>

<p>Also consider using some RESTful service running on your Bitcoind host.</p>

<p>For Node I can recommend <a href="https://www.npmjs.com/package/bitcoin-core" rel="nofollow noreferrer">https://www.npmjs.com/package/bitcoin-core</a></p>

CC BY-SA 4.0
2018-11-19T21:25:49.087Z
In order to keep my wallet anonymous I would want to create new account addresses.
Dor Bar
CC BY-SA 4.0
2018-11-20T09:23:18.430Z
yes that command exactly does it
Boris Ivanov
CC BY-SA 4.0
2018-11-21T10:53:56.743Z
But how should I attach the new address with any wallet on the network?

My wallet is on my computer and the API is on a remote server.

What I expect the API to do is to have the account address of my local wallet and assign the new Receiving-Address generated by the API to my wallet address.

Can I do that?
Dor Bar
CC BY-SA 4.0
2018-11-21T13:48:00.827Z
I guess its standard scenario: U have webservice which sell Pizza. 
1. User ordering Pizza which cost 1BTC. 2. API make notice they need new address. 3. Ur PC generates new address. 4. API takes this address and ask user to pay. 5. User pays. 6. Ur PC periodically checks ur accout to see incoming transaction on that particular address to 1BTC. 7 If in X minutes 1BTC coming Ur PC notify Ur API that "Transaction passed". 8. You notify Ur chef to start cooking Pizza
Boris Ivanov
CC BY-SA 4.0
2018-11-25T10:05:46.380Z
Between 2 and 3 there is so ting going on. Should be another peace of software that will trigger my wallet to create this new address automatically.
Dor Bar
CC BY-SA 4.0
2018-11-26T10:22:40.510Z
Step 3 is calling bitcoin-cli getnewaddress
to generate new bitcoin address
Boris Ivanov
CC BY-SA 4.0
2018-11-26T11:17:51.167Z
Who is running this command?
Dor Bar
CC BY-SA 4.0
2018-11-19T16:29:07.253Z
2018-11-21T14:49:38.263Z
2018-11-21T14:49:38.263Z
Boris Ivanov
<p>I want to create an API service that will trigger my local wallet to generate new account with receive address and return that address to a user.</p>

<p><strong>User</strong> => <strong>API</strong> => <strong>my_local_wallet</strong> => <strong>API</strong> => <strong>User</strong></p>

<p>The user will have this address and will be able to transfer Bitcoins into that address.</p>

<wallet><development><proxy>
Create a new receiving address in the behalf of another wallet?
Dor Bar
# Create a new receiving address in the behalf of another wallet?

(Asked by: username_0 on 2018-11-19)

I want to create an API service that will trigger my local wallet to generate new account with receive address and return that address to a user.

**User** => **API** => **my\_local\_wallet** => **API** => **User**

The user will have this address and will be able to transfer Bitcoins into that address.

**Tags:** wallet, development, proxy


---

## 1 answers

### Answer by username_1 on 2018-11-19. Score: 1

Yes, you can use bitcoin-cli for address generation.

To learn more try:

> bitcoin-cli help getnewaddress

Also consider using some RESTful service running on your Bitcoind host.

For Node I can recommend <https://www.npmjs.com/package/bitcoin-core>

> **Comments:**
> **username_0**: In order to keep my wallet anonymous I would want to create new account addresses.  
> **username_1**: yes that command exactly does it  
> **username_0**: But how should I attach the new address with any wallet on the network?  My wallet is on my computer and the API is on a remote server.  What I expect the API to do is to have the account address of my local wallet and assign the new Receiving-Address generated by the API to my wallet address.  Can I do that?  
> **username_1**: I guess its standard scenario: U have webservice which sell Pizza.  1. User ordering Pizza which cost 1BTC. 2. API make notice they need new address. 3. Ur PC generates new address. 4. API takes this address and ask user to pay. 5. User pays. 6. Ur PC periodically checks ur accout to see incoming transaction on that particular address to 1BTC. 7 If in X minutes 1BTC coming Ur PC notify Ur API that "Transaction passed". 8. You notify Ur chef to start cooking Pizza  
> **username_0**: Between 2 and 3 there is so ting going on. Should be another peace of software that will trigger my wallet to create this new address automatically.  
> **username_1**: Step 3 is calling bitcoin-cli getnewaddress to generate new bitcoin address  
> **username_0**: Who is running this command?  

---

