Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gavincyi/crypto-account-reportor
Cryptocurrency account balance reporter based on aws managed services.
https://github.com/gavincyi/crypto-account-reportor
aws aws-dynamodb aws-lambda ccxt cryptocurrency exchange finance trading
Last synced: 30 days ago
JSON representation
Cryptocurrency account balance reporter based on aws managed services.
- Host: GitHub
- URL: https://github.com/gavincyi/crypto-account-reportor
- Owner: gavincyi
- Created: 2020-02-23T15:30:02.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-08T01:49:08.000Z (over 3 years ago)
- Last Synced: 2024-10-16T18:49:26.279Z (3 months ago)
- Topics: aws, aws-dynamodb, aws-lambda, ccxt, cryptocurrency, exchange, finance, trading
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# crypto-account-reportor
Crypto account report is a AWS SAM template project. Currently it supports to store the daily balance in each exchange in dynamodb.
## Requirement
- AWS SAM
- Docker (for testing)
## Installation
To build the app, run
```
sam build
```To local invoke the app, e.g. update balance function, run
```
sam local invode "UpdateBalanceFunction" -e events/event.json
```To deploy the app, run
```
sam deploy --guided
```## Preparation
The following commands requires running the commands with `awscli`. Please
refer to the installation [guide](https://github.com/aws/aws-cli) for the
package in the interactive machines.### Create table crypto-exchange-keys
```
aws dynamodb create-table \
--table-name crypto-exchange-keys \
--attribute-definitions AttributeName=name,AttributeType=S \
--key-schema AttributeName=name,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
```### Create table crypto-exchange-balance
```
aws dynamodb create-table \
--table-name crypto-exchange-balance \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
```### Insert exchange accounts
First you need to create the exchange API keys first. It is highly recommended to create a
**read-only** key for security.Then amend the file `crypto-exchange-keys.json` on the following values
* name: An unique name of the key
* exchange: The exchange name, e.g. bitfinex
* key: The exchange API key
* secret: The exchange API secret
* types: A list of account types. For example, `spot` in Binance.Then run the command to insert the exchange key.
```
aws dynamodb put-item --table-name crypto-exchange-keys --item file://crypto-exchange-keys.json
```