Skip to content

Commit

Permalink
docs: improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
azerpas committed Apr 20, 2024
1 parent 48fd1f3 commit cce8d2e
Showing 1 changed file with 48 additions and 4 deletions.
52 changes: 48 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,45 @@ This app aims to be a simple CLI powered by *[Bourso API](./src/bourso_api/)* to
The first goal of this project was creating an automated [DCA (Dollar Cost Average)](https://www.investopedia.com/terms/d/dollarcostaveraging.asp) solution to buy [ETFs (Exchange Traded Funds)](https://www.investopedia.com/terms/e/etf.asp) on a regular basis with your Bourso account.

[Follow these instructions](#dca-dollar-cost-averaging-investing) to setup your own automated DCA.
## Usage

- [Installation](#installation)
- [From releases](#from-releases)
- [Approve the app (MacOS)](#approve-the-app)
- [Verify your installation](#verify-your-installation)
- [From source](#from-source)
- [Usage](#usage)
- [Get your accounts](#get-your-accounts)
- [Place an order](#place-an-order)
- [Quote 🥷](#quote)
- [DCA](#dca-dollar-cost-averaging-investing)
- [Security](#security)
- [Disclaimer](#disclaimer)

(🥷 annoted commands require no login)

## Installation
### From releases
You can download the latest release [here](https://github.com/azerpas/bourso-api/releases).

Choose the right binary for your OS between:
- `bourso-cli-darwin.tar.gz` for MacOS
- `bourso-cli-linux.tar.gz` for Linux
- `bourso-cli.exe` for Windows

On MacOS, make sure to make the file is executable:
#### Approve the app (MacOS)

If you then get a `"bourso-cli" cannot be opened because the developer cannot be verified` error, go to `System Preferences > Security & Privacy > General` and click `Open Anyway`

If the above doesn't help you, make sure the file is executable:
```sh
chmod +x bourso-cli
# if it still says `Permission denied`, try
chown 777 bourso-cli
```
If you then get a `"bourso-cli" cannot be opened because the developer cannot be verified` error, go to `System Preferences > Security & Privacy > General` and click `Open Anyway`

⚠️ Signing in with a different IP address than the ones you usually use will trigger a security check from Bourso. You'll have to validate the connection from your phone. A [GitHub pull request](https://github.com/azerpas/bourso-api/pull/10) is open to handle this case.

### Verify your installation
#### Verify your installation
Bourso CLI embeds [SLSA](https://slsa.dev/) standard to verify the integrity of the binary. You can verify the signature of the binary by:
- Downloading the provenance generated by the release pipeline for your OS: https://github.com/azerpas/bourso-api/releases/latest
- Installing [slsa-verifier](https://github.com/slsa-framework/slsa-verifier?tab=readme-ov-file#installation)
Expand All @@ -42,6 +62,18 @@ Which should output:
Verifying artifact ~/bourso-cli: PASSED
```

### From source
Requires [>=Rust 1.77.2](https://www.rust-lang.org)
```sh
git clone git@github.com:azerpas/bourso-api.git
cd bourso-api
cargo build --release
# You can run any command from the built application, e.g:
./target/release/bourso-cli config
```

## Usage

### Configuration
Save your client ID with this config command:
```
Expand Down Expand Up @@ -83,6 +115,18 @@ You'll get something like this:

*Tip: You can get the ETF ID from the tracker URL, e.g. "AMUNDI MSCI WORLD UCITS ETF - EUR" url is https://www.boursorama.com/bourse/trackers/cours/1rTCW8/ (1rTCW8)*

### Quote
Quote an asset to retrieve its value over time, e.g:
```
➜ ~ ./bourso-cli quote --symbol 1rTCW8 average
INFO bourso_cli > Welcome to BoursoBank CLI 👋
INFO bourso_cli > ℹ️ - Version 0.1.6. Make sure you're running the latest version: https://github.com/azerpas/bourso-api
INFO bourso_cli > Fetching quotes...
INFO bourso_cli > Average quote: 494.5348136363637
```
Subcommands available: `highest`, `lowest`, `average`, `volume`, `last`

### DCA (Dollar Cost Averaging) investing

You can use this script to do DCA investing. For example, if you want to buy 1 share of the ETF "1rTCW8" (AMUNDI MSCI WORLD UCITS ETF - EUR) every month, you can use a cron job to run the script every month.
Expand Down

0 comments on commit cce8d2e

Please sign in to comment.