Comments (1)
Interval is the bar frequency, one day will give you one bar per day.
package main
import (
"fmt"
"github.com/piquette/finance-go/chart"
"github.com/piquette/finance-go/datetime"
)
func main() {
params := &chart.Params{
Symbol: "AAPL",
Interval: datetime.OneMin,
}
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"))
}
}
will give you one bar per minute, over the last day. You can adjust the start/stop times with the
Start
and End
chart parameters respectively.
from finance-go.
Related Issues (16)
- Support Yahoo Finance API Key HOT 1
- Use Finnhub stock api as the new data source HOT 6
- Clean up formatting
- Getting a list of all stock tickers from a particular market HOT 1
- PrevBar PrevBars methods?
- API rate limiting for forex? HOT 2
- Is there a way to subscribe to websocket?
- quote.Get nil pointer dereferencing when asking quote of a inexistent symbol HOT 2
- Missing some key statistics for Equities HOT 1
- P/E Ratio HOT 1
- YFinance changed their api's (or their security) HOT 32
- error response recieved from upstream api HOT 11
- Rounding in History HOT 3
- Docs don't show how to use the forex.Quote HOT 2
- feature: quote for date HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from finance-go.