Giter Club home page Giter Club logo

finance-go's Introduction

Piquette website

MIT license Website piquette.io Build Status

finance-go's People

Contributors

ackleymi avatar alai04 avatar jacks821 avatar joce avatar pallotron avatar pkaeding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

finance-go's Issues

Use Finnhub stock api as the new data source

Hi guys,

Big fan of Go and great project here. Just wondering if you guys are open to add https://finnhub.io/ as the new data source. Beside real-time market price (websocket supported), they also support a lot of other fundamental and alternative data for FREE.

I think this would benefit the community tremendously. With a free account, you can make 60 API requests/minute. Their documentation can be found here: https://finnhub.io/docs/api

Is there a way to subscribe to websocket?

Hello. First I want to say about the greatness of this library.

And the second: is there some way to get real-time updates of all stocks in the market ? Through websocket.

Thank you.

API rate limiting for forex?

Hi,

Are you aware of any kind of API rate limiting for forex and Yahoo API v7?
I want to retrieve every second the rates of several currency pairs.

Thanks,

feature: quote for date

It seems history is highly tied to the concept of a chart. It would be helpful to support fetching a Quote for a specific historical date (or time.Time or whatever...). Is this already supported in someway I can't see?

edit: for clarity, i'm just after market close price for a specific date, which seems like it /can/ be gleaned from chart.Get(), but not without a lot of rigamarole with Params & dates.

Clean up formatting

  • Remove stutter from GetHistoricalQuote
  • Run go fmt where needed
  • Ensure func comments are in golang canonical format

Missing some key statistics for Equities

There are some key statistics that are missing from the stocks/equities dataset:

  • Forward Annual Dividend Rate
  • Forward Annual Dividend Yield (can be calculated based on the rate above and the price, so this one is an optional nice to have)
  • 5 Year Average Dividend Yield
  • Payout Ratio
  • Ex-Dividend Date
  • Last Split Factor
  • Last Split Date

Any chance these missing statistics can be added?

quote.Get nil pointer dereferencing when asking quote of a inexistent symbol

Hi,

quote.Get of an inexistent symbol should return a non nil error.
This does not happen....
To repro ask for a quote from a un-existant symbol:

package main

import (
	"fmt"

	"github.com/piquette/finance-go/quote"
)

func main() {
	q, err := quote.Get("FOOAASDADSAS")
	if err != nil {
		panic(err)
	}
	fmt.Printf("RegulardMarketPrice: %# +v", q.RegularMarketPrice)
}

This will panic:

$ go run .
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x620b2e]

goroutine 1 [running]:
main.main()
        /home/pallotron/projects/example/ticker-quote.go:14 +0x2e
exit status 2
[Exit code 1 @ 10:12:01]

get.Quote should return an error in this case.

Only 1 candle for day interval

Hello,

I noticed when I'm asking for chart with Interval: datetime.OneDay I always got only 1 candle which is strange... :(

I tried this:
params := &chart.Params{
Symbol: "AAPL",
Interval: datetime.OneDay,
}
iter := chart.Get(params)
for iter.Next() {
b := iter.Bar()
fmt.Printf("%+v %s\n", b, datetime.FromUnix(b.Timestamp).Time().Format("02.01.2006 15:04:05"))
}

What I do wrong, please?

Regards,
Max

YFinance changed their api's (or their security)

Hi.
There seams to be an issue with the finance-go, since yFinance changed its encryption keys.
Apparantly they change their encryption keys every day or even sometimes more than once a day.
This has lead to finance-go not working for a while.
yFinance has the same issue:
ranaroussi/yfinance#1407

I just wanted to bring it to your attention. I have been very happy with this library, so thank you very much for your work.

PrevBar PrevBars methods?

Thank you for providing such great package!

When I try to use this package, it's very convenient to fetch data, and iterate data,
however, the Next() method in iter will drop all previous values. And mosts of TAs are based on previous values.

I think it will be more convenient to change Next() (or add NextBar, NextBars method) and keep values.
Also add PrevBar, PrevBars methods to get previous candle bars for technical analysis.

What do you think?
Thanks!

Support Yahoo Finance API Key

Yahoo finance API is rate limited, with higher limits available if you use an API key. Would be cool to be able to plug that in when querying.

Thanks for the great library!

P/E Ratio

Thanks for the library. This works like Charm.
Is there a way to pull the P/E ratio for the stock symbol?

Rounding in History

Here's a feature request:

Can we get a rounding capability when we pull history? I.e. if I pull symbol "MCD", I only need a quote like Open: 159.62 instead of 159.6200051825049032. Maybe "significance" variable in history.Params with constant similar to how you've done history.Interval ?

query all interface is error

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

// Success!
fmt.Println(q)

panic: Can't find quote for symbol: AAPL

goroutine 1 [running]:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.