gobist

package module
v0.0.0-...-1da0ad8 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 2 Imported by: 0

README

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))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bist

type Bist struct {
	// contains filtered or unexported fields
}

func New

func New() (*Bist, error)

func (*Bist) GetQuote

func (b *Bist) GetQuote(symbol string) (*internal.Quote, error)

func (*Bist) GetQuoteWithHistory

func (b *Bist) GetQuoteWithHistory(symbol string, date time.Time) (*internal.Quote, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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