Skip to content

Commit

Permalink
Merge pull request #9 from piquette/develop
Browse files Browse the repository at this point in the history
Finalizes initial version.
  • Loading branch information
ackleymi authored Sep 1, 2018
2 parents 1cd0201 + 52e43ec commit 4c9b6de
Show file tree
Hide file tree
Showing 24 changed files with 2,471 additions and 394 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

## 1.0.0 - 2018-09-01
* Initial version
12 changes: 6 additions & 6 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 44 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,80 @@

## Summary

Welcome to the greatest best new financial data api library implemented in go :sparkles:
This go package aims to provide a go application with access to current and historical financial markets data in streamlined, well-formatted structures.

Not production ready! This go package aims to provide a go application with access to financial markets data in streamlined, well-formatted structures. The real benchmark for success will be method signatures that a programmer from any background can understand on sight- put parameters in, get an error-resistant data structure as a result.
Check out the [qtrn cli application][qtrn], which is intended as a living example of this package. It prints quotes/options info in your favorite command-line in a few keystrokes!

Accomplishing this goal across several data sources (yfin, morningstar, FRED) etc, while also maximizing code structure flexibility for data source changes in the future is an undertaking that requires some consideration beforehand. So, this README will serve as a planned feature list and development roadmap until a v1 release is stable. Thanks for your patience!
### Features

### Planned v1.0 features
Description | Source
--- | ---
Quote(s) | Yahoo finance
Equity quote(s) | Yahoo finance
Index quote(s) | Yahoo finance
Option quote(s) | Yahoo finance
Forex pair quote(s) | Yahoo finance
Cryptocurrency pair quote(s) | Yahoo finance
Futures quote(s) | Yahoo finance
ETF quote(s) | Yahoo finance
Mutual fund quote(s) | Yahoo finance
Historical quotes | Yahoo finance
Options straddles | Yahoo finance

Replication of the current features of FlashBoys/go-finance.
## Documentation

Status | Description | Source
--- | --- | ---
[x] | Quote(s) | Yahoo finance
[x] | Equity quote(s) | Yahoo finance
[x] | Index quote(s) | Yahoo finance
[x] | Option quote(s) | Yahoo finance
[x] | Forex pair quote(s) | Yahoo finance
[x] | Cryptocurrency pair quote(s) | Yahoo finance
[x] | Futures quote(s) | Yahoo finance
[x] | ETF quote(s) | Yahoo finance
[x] | Mutual fund quote(s) | Yahoo finance
[x] | Historical quotes | Yahoo finance
[x] | Options straddles | Yahoo finance
[ ] | Options chains | Yahoo finance
[ ] | Symbols list | BATS
A neatly formatted detailed list of implementation instructions and examples will be available on the [piquette website][api-docs].

## Planned v1.0 documentation

A neatly formatted detailed list of implementation instructions and examples will be coming to the [piquette website][api-docs].

For details on all the functionality in this library, see the [GoDoc][godoc] documentation.
For now, for details on all the functionality in this library, see the [GoDoc][godoc] documentation.

## Installation

It is best to use a dependency management tool, but if you want to retrieve it manually, use -

```sh
go get github.com/piquette/finance-go
```

## Usage examples
## Usage example

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

### Quote
```go
quote, err := equity.Get("AAPL")
q, err := quote.Get("AAPL")
if err != nil {
// Uh-oh.
panic(err)
}

// Success!
fmt.Println(q)
```

### Equity quote (more fields)
```go
q, err := equity.Get("AAPL")
if err != nil {
// Uh-oh.
panic(err)
}

// Success!
fmt.Println(quote)
fmt.Println(q)
```

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

for chart.Next() {
fmt.Println(chart.Bar())
for iter.Next() {
fmt.Println(iter.Bar())
}
if err := chart.Err(); err != nil {
if err := iter.Err(); err != nil {
fmt.Println(err)
}
```
Expand Down Expand Up @@ -126,6 +134,7 @@ pull request][pulls]. Also please email or tweet me as needed.

[godoc]: http://godoc.org/github.com/piquette/finance-go
[issues]: https://github.com/piquette/finance-go/issues/new
[qtrn]: https://github.com/piquette/qtrn
[pulls]: https://github.com/piquette/finance-go/pulls
[finance-mock]: https://github.com/piquette/finance-mock
[stripe]: https://github.com/stripe/stripe-go
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.3
1.0.0
2 changes: 1 addition & 1 deletion vendor/github.com/davecgh/go-spew/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

187 changes: 90 additions & 97 deletions vendor/github.com/davecgh/go-spew/spew/bypass.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/github.com/davecgh/go-spew/spew/bypasssafe.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4c9b6de

Please sign in to comment.