diff --git a/freqtrade/aws/trade.py b/freqtrade/aws/trade.py index 40316a6d5..93e227d9f 100644 --- a/freqtrade/aws/trade.py +++ b/freqtrade/aws/trade.py @@ -1,3 +1,4 @@ +import datetime from time import sleep import boto3 @@ -21,7 +22,7 @@ def store(event, context): for x in data: print("storing data: {}".format(x)) - sleep(0.5) # throttle to not overwhelm the DB, lambda is cheaper than dynamo + sleep(0.5) # throttle to not overwhelm the DB, lambda is cheaper than dynamo get_trade_table().put_item(Item=x) @@ -35,6 +36,7 @@ def submit(event, context): print(event) data = json.loads(event['body']) + data['ttl'] = (datetime.datetime.today() + datetime.timedelta(days=1)).timestamp() client = boto3.client('sns') topic_arn = client.create_topic(Name=os.environ['tradeTopic'])['TopicArn']