
Show HN: Bitcoin a Day – Buy €5 worth of Bitcoin a day with cloud-scheduled task - orless
https://github.com/highsource/bitcoin-a-day
======
orless
I was interested in trying out the "Dollar Cost Averaging" investment
"strategy for Bitcoin. There were a couple implementations of that (for
instance [https://github.com/0x13a/bitcoin-trading-
dca](https://github.com/0x13a/bitcoin-trading-dca)), but mostly based on CRON
jobs.

I did not wanted to run this CRON job locally and I don't have free spare
server, so I was looking for a cheap way to schedule this purchase task in the
cloud.

My solution is an AWS Lambda which is triggered once a day via CloudWatch CRON
rule and buys €X worth of Bitcoin on Bitstamp.

~~~
eralpb
Upvoted because of the use of AWS Lambda instead of a cron job, I believe
Bitstamp offer such a feature as there is clearly demand for DCA :)

Coinbase already has, but with 1.5% fee!!

How do you make sure the transaction happens? What if my order doesn't get
executed, and then 5 of them executed next week then it's not DCA anymore.

~~~
orless
AWS Lambda appeared to be a nice method for task scheduling. In any case it is
very cheap I only get billed for like 400ms per day. Other services like KMS
came in quite handy as well - for instance to encrypt Bitstamp credentials in
the configuration.

Right, 1.5% fee is ridiculous. Bitstamp charges 0.25%, that is ca. 2 cent for
€5.

There are no guarantees that transaction will actually happen. But since the
order goes to the last ask price, it is very probable that it will. I run this
for a few days already, it always worked out so far. I also think that if the
order is not executed for 24 our, Bitstamp will automatically cancel it (not
quite sure, however).

