Categorygithub.com/alexmgriffiths/algotrading
module
0.0.0-20241117042430-e0fe0c525e3b
Repository: https://github.com/alexmgriffiths/algotrading.git
Documentation: pkg.go.dev

# README

AlgoTrading

AlgoTrading is a Golang-based API for retrieving stock market trading tools and data, powered by the Twelve Data API.

Features

  • Fetch stock prices, dividends, earnings, and end-of-day data.
  • Modular setup to facilitate middleware and controller expansion.

Installation

  1. Clone the repository:
    git clone https://github.com/alexmgriffiths/algotrading.git
    
  2. Install dependencies
    go mod tidy
    
  3. Set up environment variables Add your API key to the .env.sample file and rename the file to .env

Usage

Running the server

```bash
go run ./cmd/main.go

The server listens on port 8090 by default.

API Routes

  • 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

Examples

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author