From 036f31c5a6d05117b1776540c19c8b708113b83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20G=C3=BCney?= Date: Fri, 25 Oct 2024 20:07:57 +0300 Subject: [PATCH] Update README.md --- README.md | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 513c442..8b51446 100644 --- a/README.md +++ b/README.md @@ -10,29 +10,13 @@ This project aims to provide some useful tools to fetch stock data for BIST via ## Usage and Example -### Create Client -```go -bist, err := gobist.New() -if err != nil { - log.Fatal(err) -} -``` - -### Get Quote -```go -q, err := bist.GetQuote([]string{"TUPRS"}) -if err != nil { - log.Fatal(err) -} -``` - ### Example ```go func main() { bist := gobist.New() - t, _ := time.Parse(time.DateOnly, "2024-09-25") - q, err := bist.GetQuoteWithHistory([]string{"TUPRS", "BIMAS", "VESBE", "THYAO"}, t) + dt, _ := time.Parse(time.DateOnly, "2024-09-25") + q, err := bist.GetQuoteWithHistory([]string{"TUPRS", "BIMAS", "VESBE", "THYAO"}, dt) if err != nil { log.Fatal(err) } @@ -41,4 +25,4 @@ func main() { fmt.Println(fmt.Sprintf("symbol=%s name=%s price=%f, history_price=%f, change=%f", item.Symbol, item.Name, item.Price, item.History.Price, item.History.Change.ByRatio)) } } -``` \ No newline at end of file +```