optimizing trade db handling to lower monthly cost

This commit is contained in:
Gert Wohlgemuth
2018-06-02 14:44:09 -07:00
parent cd462db993
commit 13b533820f
6 changed files with 161 additions and 90 deletions

View File

@@ -199,7 +199,31 @@ functions:
environment:
topic: ${self:custom.snsTopic}
strategyTable: ${self:custom.strategyTable}
BASE_URL: ${self:custom.customDomain.domainName}/${self:custom.customDomain.stage}
# submits a new trade to the system
trade:
memorySize: 128
handler: freqtrade/aws/trade.submit
events:
- http:
path: trade
method: post
cors: true
environment:
tradeTopic: ${self:custom.snsTradeTopic}
# stores the received message in the trade table
trade-store:
memorySize: 128
handler: freqtrade/aws/trade.store
events:
- sns: ${self:custom.snsTradeTopic}
environment:
tradeTable: ${self:custom.tradeTable}
#submits a new strategy to the system
submit_github:
@@ -232,9 +256,6 @@ functions:
tradeTable: ${self:custom.tradeTable}
strategyTable: ${self:custom.strategyTable}
# not more than 2 runners at any given time
reservedConcurrency: 2
# schedules all registered strategies on a daily base
schedule:
memorySize: 128