AlgoTrading is a Golang-based API for retrieving stock market trading tools and data, powered by the Twelve Data API.
- Fetch stock prices, dividends, earnings, and end-of-day data.
- Modular setup to facilitate middleware and controller expansion.
- Clone the repository:
git clone https://github.com/alexmgriffiths/algotrading.git
- Install dependencies
go mod tidy
- Set up environment variables
Add your API key to the
.env.sample
file and rename the file to.env
```bash
go run ./cmd/main.go
The server listens on port 8090 by default.
- Get stock
/api/v1/stocks/SYMBOL
- Get stock EOD price
/api/v1/stocks/SYMBOL/eod
- Get stock dividends
/api/v1/stocks/SYMBOL/dividends
- Get stock splits
/api/v1/stocks/SYMBOL/splits
- Get stock earnings
/api/v1/stocks/SYMBOL/earnings