<p>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 <a href="https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29" rel="nofollow">JSON-RPC interface</a>.  You can give it commands to send coins, check for incoming transactions, and so on.</p>

<p>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 <code>crond(8)</code>: 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.</p>

<p>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.</p>

CC BY-SA 3.0
2014-08-18T17:37:00.577Z
Ok that sounds good! Thank you for your answer!!
charlie_7521
CC BY-SA 3.0
2014-09-17T17:59:28.160Z
@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.
Nate Eldredge
CC BY-SA 3.0
2014-08-17T20:19:12.093Z
2014-08-17T20:19:12.093Z
Nate Eldredge
<p>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 $). </p>

<p>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. </p>

<p>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?</p>

<p>Thanks guys</p>

<transactions>
Transaction schedule
charlie_7521
# Transaction schedule

(Asked by: username_0 on 2014-08-17)

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

**Tags:** transactions


---

## 1 answers

### Answer by username_1 on 2014-08-17. Score: 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](https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29). 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.

> **Comments:**
> **username_0**: Ok that sounds good! Thank you for your answer!!  
> **username_1**: @username_0 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.  

---

