Molokai

command module
v0.0.0-...-d81bdb7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

README

Molokai

Molokai is a trading price alert tool.

Molokai fetches the lasted price data(only support CN market symbol for now) from tushare. Then a runner is used to see if it meet certain conditions. The common conditions are MinMax, MA.

If the runner outputs a result, then a reminder is automatically started. For example, the email reminder will send an email with result to the user.

In general, you will want Molokai to be executed daily by the cron service on Linux.

Build

    $ go build .

Usage

  1. Prepare the ~/.molokairc. It should be in yaml format

      # email from
      from:
        user: "<user@email.com>"
        password: "<password>"
      # smtp info
      smtp:
        smtp: "<smtp.email.com>"
        port: <smtp port>
    
  2. Runtime file. Here is an example

      # Molokai version
      version: v1
      # tushare token
      token: "<tushare token>"
      holdings:
        # symbol, one of 'ts_code', 'symbol', 'name' from tushare
        # only support CN Market now
      - symbol: "<symbol>"
        runners: 
          # runner name, eg. "MinMax", "MA"
        - name: "MinMax"
          # runner param
          param: {max: 30.00, min: 22.08}
      reminders:
        turnon: true
        to: "<to@email.com>"
    
  3. run

        $ Molokai <runtime.yaml>
    

About

Moloka’i Coffee refers to coffee grown on the Hawaii. It's a variety of Arabica coffee☕.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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