diff --git a/catalyst/examples/buy_btc.py b/catalyst/examples/buy_btc.py deleted file mode 100644 index e23b79b0..00000000 --- a/catalyst/examples/buy_btc.py +++ /dev/null @@ -1,10 +0,0 @@ -from catalyst.api import order, record, symbol - - -def initialize(context): - context.asset = symbol('btc_usd') - - -def handle_data(context, data): - order(context.asset, 1) - record(btc=data.current(context.asset, 'price')) diff --git a/catalyst/examples/buy_btc_simple.py b/catalyst/examples/buy_btc_simple.py index 78888715..ef64513b 100644 --- a/catalyst/examples/buy_btc_simple.py +++ b/catalyst/examples/buy_btc_simple.py @@ -1,3 +1,24 @@ +''' + This is a very simple example referenced in the beginner's tutorial: + https://enigmampc.github.io/catalyst/beginner-tutorial.html + + Run this example, by executing the following from your terminal: + catalyst run -f buy_btc_simple.py -x bitfinex --start 2016-1-1 --end 2017-9-30 -o buy_btc_simple_out.pickle + + If you want to run this code using another exchange, make sure that + the asset is available on that exchange. For example, if you were to run + it for exchange Poloniex, you would need to edit the following line: + + context.asset = symbol('btc_usdt') # note 'usdt' instead of 'usd' + + and specify exchange poloniex as follows: + + catalyst run -f buy_btc_simple.py -x poloniex --start 2016-1-1 --end 2017-9-30 -o buy_btc_simple_out.pickle + + To see which assets are available on each exchange, visit: + https://www.enigma.co/catalyst/status +''' + from catalyst.api import order, record, symbol def initialize(context):