I am using the
bitcoin-rpc and everytime i create an invoice from a PHP script, i create a new address. All is ok, i get the money after, i have a script that checks number of confirmations, then when i try to send my money back to another wallet i see 300 400 usd in fees
bitcoin-cli sendtoaddress "MY_BIG_WALLET" 0.1 "" "" true
When i look on blockchain i see that that everything were sent from every address that i have created
ADDRESS1 ... 0.06
ADDRESS2 ... 0.03
ADDRESS2 ... 0.078
... and so on
Fees are way to big ... How can i send everything from one big address and pay only 20$ usd fee [the default bitcoin fee, i see on some services, 5 usd]?
I believe i pay per vbyte ... but i want to send internally with low or no fees or something.
How big payment gateways like coingate/coinpayments/bitpay are doing this? They too create an adress for every transaction ...