Skip to content

Commit 4c9b6de

Browse files
authored
Merge pull request piquette#9 from piquette/develop
Finalizes initial version.
2 parents 1cd0201 + 52e43ec commit 4c9b6de

24 files changed

Lines changed: 2471 additions & 394 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Changelog
2+
3+
## 1.0.0 - 2018-09-01
4+
* Initial version

Gopkg.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,72 +4,80 @@
44

55
## Summary
66

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

9-
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.
9+
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!
1010

11-
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!
11+
### Features
1212

13-
### Planned v1.0 features
13+
Description | Source
14+
--- | ---
15+
Quote(s) | Yahoo finance
16+
Equity quote(s) | Yahoo finance
17+
Index quote(s) | Yahoo finance
18+
Option quote(s) | Yahoo finance
19+
Forex pair quote(s) | Yahoo finance
20+
Cryptocurrency pair quote(s) | Yahoo finance
21+
Futures quote(s) | Yahoo finance
22+
ETF quote(s) | Yahoo finance
23+
Mutual fund quote(s) | Yahoo finance
24+
Historical quotes | Yahoo finance
25+
Options straddles | Yahoo finance
1426

15-
Replication of the current features of FlashBoys/go-finance.
27+
## Documentation
1628

17-
Status | Description | Source
18-
--- | --- | ---
19-
[x] | Quote(s) | Yahoo finance
20-
[x] | Equity quote(s) | Yahoo finance
21-
[x] | Index quote(s) | Yahoo finance
22-
[x] | Option quote(s) | Yahoo finance
23-
[x] | Forex pair quote(s) | Yahoo finance
24-
[x] | Cryptocurrency pair quote(s) | Yahoo finance
25-
[x] | Futures quote(s) | Yahoo finance
26-
[x] | ETF quote(s) | Yahoo finance
27-
[x] | Mutual fund quote(s) | Yahoo finance
28-
[x] | Historical quotes | Yahoo finance
29-
[x] | Options straddles | Yahoo finance
30-
[ ] | Options chains | Yahoo finance
31-
[ ] | Symbols list | BATS
29+
A neatly formatted detailed list of implementation instructions and examples will be available on the [piquette website][api-docs].
3230

33-
## Planned v1.0 documentation
34-
35-
A neatly formatted detailed list of implementation instructions and examples will be coming to the [piquette website][api-docs].
36-
37-
For details on all the functionality in this library, see the [GoDoc][godoc] documentation.
31+
For now, for details on all the functionality in this library, see the [GoDoc][godoc] documentation.
3832

3933
## Installation
4034

35+
It is best to use a dependency management tool, but if you want to retrieve it manually, use -
36+
4137
```sh
4238
go get github.com/piquette/finance-go
4339
```
4440

45-
## Usage examples
41+
## Usage example
4642

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

4945
### Quote
5046
```go
51-
quote, err := equity.Get("AAPL")
47+
q, err := quote.Get("AAPL")
48+
if err != nil {
49+
// Uh-oh.
50+
panic(err)
51+
}
52+
53+
// Success!
54+
fmt.Println(q)
55+
```
56+
57+
### Equity quote (more fields)
58+
```go
59+
q, err := equity.Get("AAPL")
5260
if err != nil {
5361
// Uh-oh.
5462
panic(err)
5563
}
5664

5765
// Success!
58-
fmt.Println(quote)
66+
fmt.Println(q)
5967
```
6068

61-
### Historical data
69+
### Historical quotes (OHLCV)
6270
```go
63-
params := &history.Params{
71+
params := &chart.Params{
6472
Symbol: "TWTR",
65-
Interval: history.OneHour,
73+
Interval: datetime.OneHour,
6674
}
67-
chart := history.Get(params)
75+
iter := chart.Get(params)
6876

69-
for chart.Next() {
70-
fmt.Println(chart.Bar())
77+
for iter.Next() {
78+
fmt.Println(iter.Bar())
7179
}
72-
if err := chart.Err(); err != nil {
80+
if err := iter.Err(); err != nil {
7381
fmt.Println(err)
7482
}
7583
```
@@ -126,6 +134,7 @@ pull request][pulls]. Also please email or tweet me as needed.
126134

127135
[godoc]: http://godoc.org/github.com/piquette/finance-go
128136
[issues]: https://github.com/piquette/finance-go/issues/new
137+
[qtrn]: https://github.com/piquette/qtrn
129138
[pulls]: https://github.com/piquette/finance-go/pulls
130139
[finance-mock]: https://github.com/piquette/finance-mock
131140
[stripe]: https://github.com/stripe/stripe-go

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.3
1+
1.0.0

vendor/github.com/davecgh/go-spew/LICENSE

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/davecgh/go-spew/spew/bypass.go

Lines changed: 90 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/davecgh/go-spew/spew/bypasssafe.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)