Bitcoin Forum

Bitcoin => Project Development => Topic started by: bitcoinindia2003 on June 10, 2017, 11:58:45 AM



Title: How to make personal RPC for bitcoin mining
Post by: bitcoinindia2003 on June 10, 2017, 11:58:45 AM
Hello Users,

I have just started an app for bitcoin trading and the wallet which I am using is block.io. I have made the mining fees as low in the system but then also I am not being able to get exact amount what to send to the miners. Please help to setup something which will help me to send custom mining fees and so I can charge the users. I got to know that in big companies setup there RPC and then they charge using that. Please help me to solve it.


Title: Re: How to make personal RPC for bitcoin mining
Post by: achow101 on June 10, 2017, 06:13:06 PM
Do not try to make the transaction fees extremely low. That will only result in your transactions being unconfirmed for a long time. Furthermore, you should not be trying to set a fixed amount. Fixed transaction fees are no longer a viable option with the current state of the network. You should always be using a fee rate (and not a fixed fee rate either) and dynamic transaction feess.


Title: Re: How to make personal RPC for bitcoin mining
Post by: bitcoinindia2003 on June 11, 2017, 03:45:36 AM
I have just made it low then also its charged a lot and not able to decide what to charge from users. I want to know the method or system RPC which all the companies are using to do the mining fees.


Title: Re: How to make personal RPC for bitcoin mining
Post by: cloverme on June 12, 2017, 01:43:33 PM
Hello Users,

I have just started an app for bitcoin trading and the wallet which I am using is block.io. I have made the mining fees as low in the system but then also I am not being able to get exact amount what to send to the miners. Please help to setup something which will help me to send custom mining fees and so I can charge the users. I got to know that in big companies setup there RPC and then they charge using that. Please help me to solve it.


You can get the recommended fee in two ways:
https://bitcoinfees.21.co/api

You can also call estimatefee from rpc:
https://bitcoin.org/en/developer-reference#estimatefee

Then you can set the fee via rpc (example):
settxfee 0.00320227


Don't ask how to calculate the bytes of a transaction, it's a fools errand that will send you into a downward spiral of doom and dispair where you have to do a create raw transaction and sign it, get the hex code in bytes. Many have been down this path from an RPC standpoint and you can't there. Maybe one day someone will create andultra useful rpc command of GetBytesFromSendToAddress but it's just a pipe dream  ;)