You are building a stock watchlist in Go. Alongside prices, you want to see which tickers people discuss on Reddit, how they talk about them on X, and which companies attract news coverage.
We released Adanos Go SDK 1.0.0 for that work. You can query stock sentiment, inspect mentions and compare companies through typed Go methods. The SDK covers the API 1.54.0 contract, including 53 operations and 113 schemas, and uses the Go standard library without third-party dependencies.
Get your first stock trends
Use Go 1.26 or newer. Create a project and pin the release:
mkdir sentiment-watchlist
cd sentiment-watchlist
go mod init example.com/sentiment-watchlist
go get github.com/adanos-software/adanos-go-sdk@v1.0.0
Get an API key from Adanos, set ADANOS_API_KEY in your environment, and save this as main.go:
package main
import (
"context"
"fmt"
"log"
"os"
"time"
adanos "github.com/adanos-software/adanos-go-sdk"
)
func main() {
client, err := adanos.NewClient(adanos.Config{
APIKey: os.Getenv("ADANOS_API_KEY"),
})
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
stocks, err := client.Reddit().Trending(ctx, &adanos.TrendingOptions{
Limit: new(5),
})
if err != nil {
log.Fatal(err)
}
for _, stock := range stocks {
fmt.Printf("%s buzz=%.1f sentiment=%.2f\n",
stock.Ticker, stock.BuzzScore, stock.SentimentScore)
}
}
Run go run .. You get ticker, buzz and sentiment values from the API. The context gives the request a five-second deadline. The SDK defaults to https://api.adanos.com.
Query the source that fits your question
For a watchlist, you can query Reddit stock discussions and X sentiment, then inspect News coverage for the same ticker. You can query Polymarket stock activity or Reddit crypto sentiment through separate service clients.
Inside the same Go program, with client and ctx in scope, you can filter News trends by publisher:
news, err := client.News().Trending(ctx, &adanos.NewsTrendingOptions{
Source: new("Reuters"),
Limit: new(10),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(news)
Or compare two tickers on X:
comparison, err := client.X().Compare(ctx, []string{"AAPL", "MSFT"}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(comparison)
You can inspect mentions behind a trend, query supported date windows, and group stock trends by sector or country. Check the package documentation for the methods and response fields for each source. Each source has its own coverage and metrics. Keep those distinctions when you compare results.
Analyze a headline you supply
You can submit your own text through the sentiment endpoint. An optional target identifies the company you want to analyze:
analysis, err := client.Sentiment().Analyze(ctx,
"Goldman Sachs cuts Apple price target",
&adanos.SentimentAnalyzeOptions{Target: new("Apple")},
)
if err != nil {
log.Fatal(err)
}
fmt.Println(analysis)
Use this in a headline ingestion job or add sentiment analysis to a research dashboard. Keep the original text beside the response so you can review how the analysis relates to the headline.
Keep control of your requests
We kept the client close to Go's HTTP conventions. You pass context.Context to each method and can inject your own http.Client through adanos.Config.
Optional query fields use pointers. A nil field omits the parameter; new(0) sends zero and new(false) sends false. That distinction matters for pagination and the IncludeInherited filter on Reddit mentions. Go 1.26 supports the new(value) syntax in these examples.
For a failed API request, inspect *adanos.APIError with errors.As. You can read its status code, detail and response headers, including Retry-After when the server supplies it. You decide whether to retry and how long to wait. The SDK performs no automatic retries.
Build something you can inspect
A useful first project is a watchlist digest. Query trends, retain the timestamp and source with each result, and show changes between snapshots. Add a link to the underlying mentions so readers can inspect the discussion.
For a research dashboard, put Reddit and News results in separate panels. You can spot a ticker that attracts discussion and check whether publishers cover the same company. For crypto, use client.Crypto() to inspect token mentions and market sentiment.
You can use these observations as inputs to your own research. A sentiment score measures language in the covered data; it does not establish a future price move.
We maintain the SDK under the MIT license. Start with the pinned release, browse the Go documentation, and use the API reference for endpoint access and request limits. You can report bugs or propose examples in the GitHub repository.
Top comments (1)
good