
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
github.com/frostbreker/yahoo-finance-api
Advanced tools
If you love this project, please consider giving it a ⭐.
go get github.com/oscarli916/yahoo-finance-api
package main
import (
"fmt"
yfa "github.com/oscarli916/yahoo-finance-api"
)
func main() {
t := yfa.NewTicker("AAPL")
// get the latest PriceData
quote, err := t.Quote()
if err != nil {
fmt.Println("Error fetching quote:", err)
return
}
fmt.Println(quote.Close)
// history data
history, err := t.History(yfa.HistoryQuery{Range: "1d", Interval: "1m"})
if err != nil {
fmt.Println("Error fetching history:", err)
return
}
fmt.Println(history)
// option chain
e := t.ExpirationDates()
oc := t.OptionChainByExpiration(e[2])
fmt.Println(oc)
// Ticker Information
info, err := t.GetInfo()
if err != nil {
fmt.Println("GetInfo returned error:", err)
}
fmt.Println(info)
}
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.