Skip to content

Commit

Permalink
Modifies test runner, updates README.
Browse files Browse the repository at this point in the history
  • Loading branch information
ackleymi committed Jun 6, 2018
1 parent 42acbdd commit da3dc4f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build:
go build ./...

test:
go test -race ./...
go test -v ./...

vet:
go vet ./...
Expand Down
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ Status | Description | Source
--- | --- | ---
[x] | Equity quote(s) | Yahoo finance
[x] | Index quote(s) | Yahoo finance
[ ] | Option quote(s) | Yahoo finance
[x] | Option quote(s) | Yahoo finance
[x] | Forex pair quote(s) | Yahoo finance
[ ] | Futures quote(s) | Yahoo finance
[x] | Futures quote(s) | Yahoo finance
[x] | ETF quote(s) | Yahoo finance
[x] | Mutual fund quote(s) | Yahoo finance
[ ] | Historical quotes | Yahoo finance
[x] | Historical quotes | Yahoo finance
[ ] | Options chains | Yahoo finance
[ ] | Symbols list | BATS

Expand All @@ -39,10 +39,11 @@ For details on all the functionality in this library, see the [GoDoc][godoc] doc
go get github.com/piquette/finance-go
```

## Usage
## Usage examples

Library usage is meant to be very specific about the user's intentions.

### Quote
```go
quote, err := equity.Get("AAPL")
if err != nil {
Expand All @@ -54,6 +55,21 @@ if err != nil {
fmt.Println(quote)
```

### Historical data
```go
params := &history.Params{
Symbol: "TWTR",
Interval: history.OneHour,
}
chart := history.Get(params)

for chart.Next() {
fmt.Println(chart.Bar())
}
if err := chart.Err(); err != nil {
fmt.Println(err)
}
```

## Development

Expand Down

0 comments on commit da3dc4f

Please sign in to comment.