mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-15 12:15:22 +08:00
11 lines
227 B
Python
11 lines
227 B
Python
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'))
|