Fetch indian stock market data available on nse using this library
go get -u github.com/sanesource/nse-fetch
Takes a symbol (string) keyword, and returns instruments matching that keyword
Example
// Import package
import (
NSE "github.com/sanesource/nse-fetch"
)
// Usage
func main() {
response, err := NSE.FetchAutoComplete(symbol)
if err != nil {
// handle error here
}
// response -> { "data": ... }
}
Takes symbol (string), from (string) and to (string) and returns historical data for given symbol
Example
// Import package
import (
NSE "github.com/sanesource/nse-fetch"
)
// Usage
func main() {
response, err := NSE.FetchEquityHistorical(symbol, "23-05-2025", "23-05-2025")
if err != nil {
// handle error here
}
// response -> { "data": [...] }
}
Returns Nifty 50 index and its 50 constituents latest performance data
Example
// Import package
import (
NSE "github.com/sanesource/nse-fetch"
)
// Usage
func main() {
response, err := NSE.FetchNifty50Performance()
if err != nil {
// handle error here
}
// response -> { "data": [...] }
}
Currently WIP