From 07155801bb6e68e7368dcfdc6666b78e12232dfd Mon Sep 17 00:00:00 2001 From: Gert Date: Wed, 23 May 2018 20:57:08 -0700 Subject: [PATCH] fixed some bugs, improved the backtesting and strategy table. Possible now to specify which features we want to use in the backtesting api --- serverless.yml | 55 ++++++++++++-------------------------------------- 1 file changed, 13 insertions(+), 42 deletions(-) diff --git a/serverless.yml b/serverless.yml index c0bd7d1fb..6bf7aa341 100644 --- a/serverless.yml +++ b/serverless.yml @@ -188,59 +188,30 @@ functions: strategyTable: ${self:custom.strategyTable} - #TODO #backtests the strategy backtest: memorySize: 256 - handler: freqtrade/aws/backtesting_lambda.run + handler: freqtrade/aws/backtesting_lambda.backtest events: - sns: ${self:custom.snsTopic} environment: topic: ${self:custom.snsTopic} tradeTable: ${self:custom.tradeTable} - - #TODO - # schedules all registered strategies on a daily base - daily: - memorySize: 128 - handler: freqtrade/aws/backtesting_lambda.run - - events: - - sns: ${self:custom.snsTopic} - environment: - topic: ${self:custom.snsTopic} strategyTable: ${self:custom.strategyTable} -resources: - Resources: - ##################################################################### - # keeps track of all strategfies, associated to their user accounts - ##################################################################### - FreqStrategyTable: - Type: 'AWS::DynamoDB::Table' - DeletionPolicy: Retain + # schedules all registered strategies on a daily base + schedule: + memorySize: 128 + handler: freqtrade/aws/backtesting_lambda.cron - Properties: - AttributeDefinitions: - - - AttributeName: name - AttributeType: S - - - AttributeName: user - AttributeType: S + events: + - schedule: + rate: rate(10 minutes) + enabled: true - - KeySchema: - - - 'AttributeName': 'user' - 'KeyType': 'HASH' - - - 'AttributeName': 'name' - 'KeyType': 'RANGE' - - ProvisionedThroughput: - ReadCapacityUnits: 1 - WriteCapacityUnits: 1 - TableName: ${self:custom.strategyTable} + environment: + topic: ${self:custom.snsTopic} + tradeTable: ${self:custom.tradeTable} + strategyTable: ${self:custom.strategyTable}