guneyin / gobist-broker

contains some useful tools for supported stock brokers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gobist-broker

  • Fetch/Import stock order: It's useful if you have several accounts and want to collect all orders in one place.

Supported Brokers

  • Garanti BBVA Yatırım
  • NCM Investment

Installation

$ go get github.com/guneyin/gobist-importer

Usage and Example

Create Importer

imp, err := importer.New(broker.Garanti, "garanti.csv")
if err != nil {
    log.Fatal(err)
}

Example

func main() {
    imp, err := importer.New(broker.Garanti, "garanti.csv")
    if err != nil {
        log.Fatal(err)
    }

    ts, err := imp.Import()
    if err != nil {
        log.Fatal(err)
    }

    for _, item := range ts.Items {
        fmt.Printf("%-10s %-35s %-5d %-10.2f %-15s\n", item.Symbol, item.Date, item.Quantity, item.Price, item.Type.String())
    }
}

About

contains some useful tools for supported stock brokers

License:MIT License


Languages

Language:Go 100.0%