Bitcoin Forum
May 03, 2024, 04:01:39 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Automatically transfer btc to another address, possible?  (Read 167 times)
TheBeardedBaby (OP)
Legendary
*
Offline Offline

Activity: 2184
Merit: 3134


₿uy / $ell


View Profile
December 16, 2020, 11:03:55 PM
 #1

Tried to look for an answer but never found anything really clear.

Here is an example.
If I have 7 addresses and they randomly receive btc in a Bitcoin Core wallet and I want those coins as soon as they come into the wallet be sent to a one address on a hardware wallet is it possible to be done automatically in the moment the coins are received to be transferred to the other address?


"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714708899
Hero Member
*
Offline Offline

Posts: 1714708899

View Profile Personal Message (Offline)

Ignore
1714708899
Reply with quote  #2

1714708899
Report to moderator
1714708899
Hero Member
*
Offline Offline

Posts: 1714708899

View Profile Personal Message (Offline)

Ignore
1714708899
Reply with quote  #2

1714708899
Report to moderator
1714708899
Hero Member
*
Offline Offline

Posts: 1714708899

View Profile Personal Message (Offline)

Ignore
1714708899
Reply with quote  #2

1714708899
Report to moderator
DaveF
Legendary
*
Offline Offline

Activity: 3472
Merit: 6259


Crypto Swap Exchange


View Profile WWW
December 16, 2020, 11:19:00 PM
Merited by hugeblack (2), ranochigo (1), ABCbits (1), jackg (1), TheBeardedBaby (1), Heisenberg_Hunter (1)
 #2

There are a few linux scripts out there that will do it using the core reference client.
BUT, the biggest issue is figuring out the fees.
Think about it, if you get some BTC in now and just want to forward it out the core wallet is going to use 0.00082833 BTC/kB
If it's a small transaction you're going to eat up a lot of it.

Code:
bitcoind sendtoaddress WHERE_YOU_WANT_IT_TO_GO amount of  coin 

Will send all, you would have to do some math 1st to leave some for fees

Code:
 $bitcoind getbalance


Should get you your balance (it's been a while no idea it should work). And you can do some math from there.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
TheBeardedBaby (OP)
Legendary
*
Offline Offline

Activity: 2184
Merit: 3134


₿uy / $ell


View Profile
December 16, 2020, 11:25:36 PM
 #3

There are a few linux scripts out there that will do it using the core reference client.
BUT, the biggest issue is figuring out the fees.
Think about it, if you get some BTC in now and just want to forward it out the core wallet is going to use 0.00082833 BTC/kB
If it's a small transaction you're going to eat up a lot of it.

Code:
bitcoind sendtoaddress WHERE_YOU_WANT_IT_TO_GO amount of  coin 

Will send all, you would have to do some math 1st to leave some for fees

Code:
 $bitcoind getbalance


Should get you your balance (it's been a while no idea it should work). And you can do some math from there.

-Dave

Thanks a lot, yeah I read about the fees problem. As I said it was just an example of a way to have a automated system to save your coins in a cold storage if you have some random incomes.

I'll see when I'll get the time to test this.

ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
December 17, 2020, 04:44:27 AM
 #4

For the getbalance, remember to specify minconf=0.

Anyways, is there an issue with doing it after consolidating multiple UTXOs? Monitoring the addresses and consolidating it to the HW wallet introduces an additional step that eats into your fees and the resultant number of UTXOs remains the same.

What I'll do is that I'll set a threshold, ie. 0.1BTC and when I have that amount, I'll get the client to send the funds to the HW wallet. If you are afraid of the risks of being exposed while your funds are being sent to your hot wallet, having automatic transfers doesn't do too much to eliminate the risk of malware attacks anyways. If that's your concern, your focus would be likely to just try to change the addresses to the ones in the HW wallet.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
coinableS
Legendary
*
Offline Offline

Activity: 1442
Merit: 1179



View Profile WWW
December 17, 2020, 09:50:53 PM
 #5

Use walletnotify combined with JSON-RPC to move your funds upon receipt.

bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
December 18, 2020, 05:59:13 PM
 #6

Thanks a lot, yeah I read about the fees problem.

Do you roughly know how much you will get per transactions? Or when roughly the transactions will come in?

If so, you could create some simple logic to estimate the "perfect" fee for your current situation depending on the amount you received and the mempool.

This shouldn't be too tricky if you can roughly estimate how much you will receive.

ranochigo
Legendary
*
Offline Offline

Activity: 2954
Merit: 4165


View Profile
December 19, 2020, 04:32:25 AM
 #7

Do you roughly know how much you will get per transactions? Or when roughly the transactions will come in?

If so, you could create some simple logic to estimate the "perfect" fee for your current situation depending on the amount you received and the mempool.

This shouldn't be too tricky if you can roughly estimate how much you will receive.
I would think using a floating fee would be more appropriate for OP for which that can be specified in sendtoaddress, together with how conservative the fee rates should be. If it's a fixed fee rate, consolidating all the UTXOs would be better. The fees can also be deducted from the send amount, AFAIK so no math has to be done.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!