https://github.com/casualcodersprojects/autostonksv0
Python-based stock trader
https://github.com/casualcodersprojects/autostonksv0
algorithms alpaca-markets alpaca-trading-api python stock-market stocks
Last synced: over 1 year ago
JSON representation
Python-based stock trader
- Host: GitHub
- URL: https://github.com/casualcodersprojects/autostonksv0
- Owner: CasualCodersProjects
- License: agpl-3.0
- Created: 2021-11-15T16:59:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-01T21:53:23.000Z (almost 4 years ago)
- Last Synced: 2025-01-17T12:36:41.796Z (over 1 year ago)
- Topics: algorithms, alpaca-markets, alpaca-trading-api, python, stock-market, stocks
- Language: Python
- Size: 395 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AutoStonks
## Getting started.
Requires [Python 3.8 or newer](https://www.python.org/downloads/) to be installed.
Dependency management is done via [Pipenv](https://pipenv.pypa.io/en/latest/). This can be installed via Pip.
```sh
pip install pipenv
```
### Cloning and installing dependencies
```sh
git clone https://github.com/CasualCodersProjects/autostonks
cd autostonks
pipenv install
pipenv shell
```
Now you development environment is set up.
### API Keys and .env file
To generate API keys, you need to [create an account on Alpaca](https://alpaca.markets/). You don't need to create a live account if you don't want to, you can just create a paper account to test development. Once you finish creating your account, you can open up the [Paper Dashboard](https://app.alpaca.markets/paper/dashboard/overview) before adding bank account and tax information so you can get to development without using money.
From the dashboard, you can generate API Keys and populate the .env file.
```sh
# .env
BASE_URL=https://paper-api.alpaca.markets
API_KEY=abcdefghijkl
API_SECRET=abcdefghijklmnopqrstuvwxyz1234567890
```
### Running the bot
The bot is written with Fire, which generates a command line tool from Python functions. The current usage is:
```sh
python stonks.py -h
```
This will print out help information.