Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: StackGambler on March 21, 2019, 09:21:46 AM



Title: Is there a way to automatically forward received coins to multiple addresses?
Post by: StackGambler on March 21, 2019, 09:21:46 AM
I'm looking for a way to receive a single payment to one address, and have portions of it automatically forwarded to other predefined addresses.

For example:

I predefine 10% of my payments go to address A, 60% to address B and 30% to address C. Then, when someone sends 2 BTC to the main address, from the main address, 0.2 BTC automatically goes to address A, 1.2 BTC automatically goes to address B and 0.6 BTC automatically goes to address C.

Is this possible yet? If so, how would one execute this? Thank you.


Title: Re: Is there a way to automatically forward received coins to multiple addresses?
Post by: ETFbitcoin on March 21, 2019, 09:32:03 AM
AFAIK there aren't wallet with such feature,.

But if you use Electrum / Bitcoin Core and have small programming knowledge, you could create trigger which do what you want.


Title: Re: Is there a way to automatically forward received coins to multiple addresses?
Post by: HeRetiK on March 21, 2019, 09:32:33 AM
Your best bet is probably to run either a Bitcoin Core node or an Electrum instance and use their respective JSON-RPC APIs to create the logic you are looking for.

Here's the list of API calls for Electrum:
http://docs.electrum.org/en/latest/protocol.html

Here's the list of API calls for Bitcoin Core:
https://bitcoin.org/en/developer-reference#bitcoin-core-apis

For the latter here's a list of a few wrappers for various programming languages:
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC))


Title: Re: Is there a way to automatically forward received coins to multiple addresses?
Post by: StackGambler on March 21, 2019, 10:48:34 AM
Your best bet is probably to run either a Bitcoin Core node or an Electrum instance and use their respective JSON-RPC APIs to create the logic you are looking for.

Here's the list of API calls for Electrum:
http://docs.electrum.org/en/latest/protocol.html

Here's the list of API calls for Bitcoin Core:
https://bitcoin.org/en/developer-reference#bitcoin-core-apis

For the latter here's a list of a few wrappers for various programming languages:
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) (https://en.bitcoin.it/wiki/API_reference_(JSON-RPC))

Thanks! I do have a full node. Maybe I can pay someone to code it up. If someone is interested in coding this for me, they can PM me. I am also still wondering if there's an out-of-the-box solution for this.


Title: Re: Is there a way to automatically forward received coins to multiple addresses?
Post by: buwaytress on March 21, 2019, 01:03:17 PM
Never thought of it for individual use but am pretty sure some of the enterprise solutions have this. I've noticed how exchanges especially almost automatically seem to consolidate deposits. Practically, as soon as my deposits are confirmed on LBC, for example, they're whisked off out of my deposit address, no matter the amount. I assume there's some coding that automatically either consolidates smaller deposits, or uses large deposits to process batches of withdrawals, all triggered by amounts.

Not saying you should get those solutions, but pretty sure if you reached out to some of those wallet providers there's a route there.


Title: Re: Is there a way to automatically forward received coins to multiple addresses?
Post by: BitMaxz on March 21, 2019, 07:24:06 PM
Thanks! I do have a full node. Maybe I can pay someone to code it up. If someone is interested in coding this for me, they can PM me. I am also still wondering if there's an out-of-the-box solution for this.

Why not try this one Bitcoin-Autosend (https://github.com/hendo420/Bitcoin-Autosend)

It's a simple program that you can use to automate sending bitcoin to address you want and it seems you need a Linux Based OS and Python to make this thing work.

Another one is this one Auto-Send by Kaz Wesley (https://github.com/kazcw/autosend) I don't know how safe it is but it seems the developer is active on GitHub and I think you can request to him to help you about autosend bitcoin to multiple addresses.


Title: Re: Is there a way to automatically forward received coins to multiple addresses?
Post by: poordeveloper on March 21, 2019, 09:57:37 PM
The solution for this is integration with your address management system through a ZeroMQ instance, using the provided Bitcoin Core options:
Quote
ZeroMQ notification options:
-zmqpubhashblock=<address>   Enable publish hash block in <address>
-zmqpubhashtx=<address>   Enable publish hash transaction in <address>
-zmqpubrawblock=<address>   Enable publish raw block in <address>
-zmqpubrawtx=<address>   Enable publish raw transaction in <address>
This is part of the normal options you can use when running bitcoind or bitcoin-qt, available at https://en.bitcoin.it/wiki/Running_Bitcoin