Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.alterscope.org/llms.txt

Use this file to discover all available pages before exploring further.

A first-party Go SDK is on the roadmap for the second half of 2026. Until then, the Alterscope API is plain HTTPS + JSON, so calling it from Go takes about thirty lines of net/http.

Calling the API from Go

Authenticate with a Bearer token and read the result from the { data, meta } envelope:
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
	"os"
)

func main() {
	req, _ := http.NewRequest("GET",
		"https://api.alterscope.org/v2/yield/opportunities?limit=1", nil)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("ALTERSCOPE_API_KEY"))

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	var body struct {
		Meta struct {
			Agentic struct {
				Freshness struct {
					Status string `json:"status"`
				} `json:"freshness"`
			} `json:"_agentic"`
		} `json:"meta"`
	}
	if err := json.NewDecoder(resp.Body).Decode(&body); err != nil {
		panic(err)
	}
	fmt.Println("freshness", body.Meta.Agentic.Freshness.Status)
}
The same pattern covers retries (wrap DefaultClient.Do) and a gorilla/websocket event stream. For the WebSocket and webhook details, see Realtime → WebSockets and Webhooks.

When to expect a first-party SDK

The Go SDK will be generated from the same OpenAPI spec that drives the TypeScript and Python SDKs, and will mirror their resource layout. Watch the changelog for the GA announcement.