I`m thinking about building a business with a friend of mine. The business would use bitcoin as its primer currency, because we expect most of the transactions to be rather small amounts of money (1 to 5 $).

I don`t really want to go into details about the idea, but our goal is to only operate as a middleman in the market. The transactions of our business would have to happen as follows: The user sends us a small fraction of a bitcoin and would define a time frame after which the money should get transferred to another user. From this amount we would take some % for us as profits.

The problem is, our idea would only work if there were a lot of users. And if we achieve this, it implies that we have too many transactions to handle them manually. So my question is, how can we automatically transfer the coins after a certain time, in a professional way? User a for example would define that he wants his money to get transferred to user b after 2 days and 1 hour. How can we do this transaction in an automated way. And how can we store the coins securely within this time? Do they have to be online the whole time, or could we have a better solution whit cold storage in some form? Any suggestions?

Thanks guys

1 Answer 1


The simplest way to send and receive bitcoins programatically is to run the standard bitcoind client and have your software talk to it via the JSON-RPC interface. You can give it commands to send coins, check for incoming transactions, and so on.

As for how to schedule transactions to be made at some future time: once you know how to make transactions via RPC, doing it at a scheduled future time is really just a general programming question and not within the scope of this site. The most obvious approach would be a similar algorithm to Unix's crond(8): have a queue of pending jobs in chronological order, and sleep until it's time to execute the next one. When a new job is scheduled, insert it at its proper place in the queue, and if it turns out to be first in the queue, recalculate the sleep time.

As for whether and how to use cold storage: that's something you'll have to determine. Keeping the temporarily held coins in cold storage will reduce the risk of them being stolen by an attacker, but also adds extra costs since you will need a trusted human employee to manually transfer coins back out of cold storage at appropriate intervals. You'll have to balance that against the risks and potential liabilities of having coins stolen.

  • Ok that sounds good! Thank you for your answer!! Aug 18, 2014 at 17:37
  • @charlie_7521 You're welcome. If my answer resolved your question, you can click the check-mark to mark it as "accepted". Otherwise, the system may consider that this question is not satisfactorily answered and will periodically bump it to the top of the front page. Sep 17, 2014 at 17:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.