https://github.com/zing-rsa/portfolio-tracker
An api designed to help track an asset portfolio over time
https://github.com/zing-rsa/portfolio-tracker
cryptocurrency deno
Last synced: 11 months ago
JSON representation
An api designed to help track an asset portfolio over time
- Host: GitHub
- URL: https://github.com/zing-rsa/portfolio-tracker
- Owner: zing-rsa
- Created: 2024-12-22T07:00:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-09T20:27:29.000Z (12 months ago)
- Last Synced: 2025-07-10T05:12:01.165Z (12 months ago)
- Topics: cryptocurrency, deno
- Language: TypeScript
- Homepage:
- Size: 182 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# portfolio tracker api
An api designed to track an asset portfolio over time. It allows you to maintain a list of transactions of arbitrary assets and produces analytics based on that list, like aggregates of the assets currently held, the historic price action of those assets, as well as the historic and current performance of the portfolio. I use this for my cryptocurrency portfolio but there is no hard link to crypto.
### future plans:
- import txns from exchange data
- export data for tax purposes
- wallet monitoring for automatic transaction imports
## getting started
#### requirements:
- deno
- docker (for postgres, otherwise use any db credentials and don't use `./run_local_db_docker.sh`)
1. Create a `.env` file in the project root based on `.env.example`
2. `deno run local`
3. `./scripts/seed_local_db.sh`
> default api key: 12345
## migrations
```sh
# create a local postgres db:
./run_local_db_docker.sh
# generate migration files based on `./drizzle/schema.ts`:
deno --env -A --node-modules-dir npm:drizzle-kit generate --name=migration_name
# add custom migration(empty migration file to fill out):
deno --env -A --node-modules-dir npm:drizzle-kit generate --custom --name=migration_name
# apply migrations db:
deno --env -A --node-modules-dir npm:drizzle-kit migrate
```
## deploying
Auto deploys to [Deno Deploy](https://deno.com/deploy) on push to master, via `.github/workflows/deploy.yml`