Skip to main content
0
C

Client Go

The official Go client library for the Massive REST and WebSocket API.

Rating

0.0

Votes

0

score

Downloads

0

total

Price

Free

API key required

Works With

Claude CodeCursorWindsurfVS CodeDeveloper tool

About

Massive (formerly Polygon.io) Go Client - WebSocket & RESTful APIs

The official Go client library for the Massive REST and WebSocket API. This client makes use of Go generics and thus requires Go 1.18. See the docs for more details on our API.

Note: Polygon.io has rebranded as Massive.com on Oct 30, 2025. Existing API keys, accounts, and integrations continue to work exactly as before. The only change in this SDK is that it now defaults to the new API base at api.massive.com, while api.polygon.io remains supported for an extended period.

For details, see our rebrand announcement blog post or open an issue / contact support@massive.com if you have questions.

Getting Started

This section guides you through setting up a simple project with massive.com/client-go.

First, make a new directory for your project and navigate into it:

bash
mkdir myproject && cd myproject

Next, initialize a new module for dependency management. This creates a go.mod file to track your dependencies:

bash
go mod init example

Then, create a main.go file. For quick start, you can find over 100+ example code snippets that demonstrate connecting to both the REST and WebSocket APIs.

Here's a working example that fetches daily aggregates for AAPL (with full pagination and trace support):

bash
cat > main.go "        "          <- windows

Then, run go mod tidy to automatically download and install the necessary dependencies. This command ensures your go.mod file reflects all dependencies used in your project:

bash
go mod tidy

Finally, execute your application:

bash
go run main.go

REST API Client

[![rest-docs][rest-doc-img]][rest-doc]

To get started, you'll need to import two main packages.

golang
import (
	"context"
	"fmt"
	"log"

	"github.com/massive-com/client-go/v3/rest"
	"github.com/massive-com/client-go/v3/rest/gen"
)

Next, create a new client with your API key.

go
c := rest.NewWithOptions("YOUR_API_KEY",
	rest.WithTrace(false),      // set true for full request/response logging
	rest.WithPagination(true),  // enables automatic pagination via iterator
)
ctx := context.Background()

Or create a client with a custom HTTP client implementation.

golang
hc := http.Client{} // some custom HTTP client
c := massive.NewWithClient("YOUR_API_KEY", hc)

Using the client

After creating the client, making calls to the Massive API is simple. Most endpoints now use the generated *WithResponse methods:

go
// Example with custom params (note the Sort field requirement)
params := &gen.GetStocksAggregatesParams{
	Adjusted: rest.Ptr(true),
	Sort:     "asc",
	Limit:    rest.Ptr(120),
}

Don't lose this

Three weeks from now, you'll want Client Go again. Will you remember where to find it?

Save it to your library and the next time you need Client Go, it’s one tap away — from any AI app you use. Group it into a bench with the rest of the team for that kind of task and you can pull the whole stack at once.

⚡ Pro tip for geeks: add a-gnt 🤵🏻‍♂️ as a custom connector in Claude or a custom GPT in ChatGPT — one click and your library is right there in the chat. Or, if you’re in an editor, install the a-gnt MCP server and say “use my [bench name]” in Claude Code, Cursor, VS Code, or Windsurf.

🤵🏻‍♂️

a-gnt's Take

Our honest review

This plugs directly into your AI and gives it new abilities it didn't have before. The official Go client library for the Massive REST and WebSocket API. Once connected, just ask your AI to use it. It's completely free and works across most major AI apps. This one just landed in the catalog — worth trying while it's fresh.

Tips for getting started

1

Tap "Get" above, pick your AI app, and follow the steps. Most installs take under 30 seconds.

2

Heads up: this needs an API key to work. You'll get one from the service's website (usually free). The setup guide tells you exactly where.

What's New

Version 1.0.06 days ago

Imported from GitHub

Ratings & Reviews

0.0

out of 5

0 ratings

No reviews yet. Be the first to share your experience.