guneyin / gobist

go library to fetch stock data for BIST

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gobist - GO library for BIST (Borsa Istanbul)

This project aims to provide some useful tools to fetch stock data for BIST via Yahoo Finance API

Installation

$ go get github.com/guneyin/gobist

Usage and Example

Create Client

bist, err := gobist.New()
if err != nil {
    log.Fatal(err)
}

Get Quote

q, err := bist.GetQuote("TUPRS")
if err != nil {
    log.Fatal(err)
}

Example

func main() {
    bist, err := gobist.New()
    if err != nil {
        log.Fatal(err)
    }

    q, err := bist.GetQuote("TUPRS")
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(fmt.Sprintf("symbol=%s name=%s price=%f", q.Symbol, q.Name, q.Price))
}

About

go library to fetch stock data for BIST

License:MIT License


Languages

Language:Go 97.6%Language:Shell 2.4%