systemtrading

command module
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 4 Imported by: 0

README

systemtrading

docker release Go Report Card

My first system trading application

Currently supporting brokerage

go package

https://pkg.go.dev/github.com/sunglim/systemtrading

Docker hub

https://hub.docker.com/r/limasdf/systemtrading

How to run

> go run main.go -koreainvestment_url=<your korea investment server URL> -koreainvestment_appkey=<your korea invesment app key> \
     -koreainvestment_appsecret=<your korea invesment app secret> -koreainvestment_account=<your account> -telegram_chat_id=<telegram chat id> -telegram_token=<telegram token>

Korea Investment API

/pkg/koreainvestment is a package to call Korea investment APIs. Some old codes still live in /order/koreainvestment, but new code should reside in pkg directory.

Ideally, I have a plan to make this package a fully generated code.

Strategry

A strategy matches to an trading algorithm.

BuyOneStockEveryDay stategry

As the name explains, this strategry buy aone stock every day.

More strategry will be introduced..

Logging system

By default, the logging system writes messages to standard output, and also to telegram as long as telegram configuration is set.

Sending log messages to telegram

The application requires a telegram bot token and chat ID. See BotFather to get a telegram token.

See go run ./src/main -h explains how to pass the token and chat id.

Metrics

http://<ip>:8080/metrics is exposed.

Development plan

Development plan

Research

  • Existing system trading applications

The system trading application should be

  • A moudle to receive current stock price

    • It should be pluggable, provide an interface so that any stockbrokerage can be integrated
  • A moudle to buy/sell

  • Strategry

    • When to sell, when to buy, when to hold
  • Monitoring

    • Provide informations like profits, loss.
  • Easy to simulate

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL