Releases: tigusigalpa/coinglass-go
Releases · tigusigalpa/coinglass-go
Release list
v1.1.0
[v1.1.0] - 2026-07-12
Added
- WebSocket API support for Coinglass's real-time streams, under the new
websocketsubpackage:websocket.Client/Client.Connect— connects towss://open-ws.coinglass.com/ws-api, authenticated with your
API key. Accessible from the main SDK viaclient.WSClient().Stream.Subscribe/Stream.Unsubscribe— subscribe to any number of channels over a single connection, with
the"ping"/"pong"heartbeat (every 20s) handled automatically.Stream.Messages()/Stream.Errors()— channels for consuming incoming data and connection/parse errors.- Channel helpers and typed decoders for every documented stream:
ChannelLiquidationOrders()+DecodeLiquidationOrders—
Liquidation OrderChannelSpotTrades(exchange, symbol, minVolumeUSD)+DecodeTrades—
Spot Trade OrderChannelFuturesTrades(exchange, symbol, minVolumeUSD)+DecodeTrades—
Futures Trade OrderChannelFuturesTicker(exchange, symbol)+DecodeFuturesTicker—
Futures Ticker Snapshot
- The WebSocket client is implemented entirely on the standard library (
net,crypto/tls,bufio) — no
third-party dependency (e.g.gorilla/websocket) was introduced, keeping the SDK dependency-free. - New runnable example:
examples/websocket. - Unit tests covering frame encoding/decoding, the WebSocket handshake accept-key computation, channel builders,
and message decoding (websocket/frame_test.go,websocket/models_test.go).
Documentation
- Added a "WebSocket API" section to the README with a usage example and a channel-helper reference table.
- Updated the Highlights section and Examples table to mention WebSocket support.
[v1.0.0] - Initial release
Added
- Go SDK for the Coinglass API v4, covering Futures, Spot, Options, ETF, and Indicator endpoints.
- Functional-option configuration (
WithBaseURL,WithHTTPClient,WithTimeout,WithRetry). - Automatic retry with exponential backoff for HTTP 429 responses, honoring
Retry-After. - Typed sentinel errors (
ErrUnauthorized,ErrNotFound,ErrRateLimited) and a detailedAPIError. - No third-party dependencies — standard library only.
v1.0.0
coinglass-go v1.0.0
First stable release of coinglass-go — a zero-dependency Go client for the Coinglass API v4.
Highlights
- Complete API coverage across five service groups: Futures, Spot, Options, ETF, and Indicators.
- Zero external dependencies — built entirely on the Go standard library (
net/http,encoding/json,context,time). - Idiomatic, typed API with functional-option configuration via
NewClient. - Context-first and concurrency-safe — every method accepts a
context.Context, and a singleClientcan be shared across goroutines. - Built-in resilience — automatic retry with exponential backoff on HTTP 429, honoring the
Retry-Afterheader when present. - Clear error model — sentinel errors (
ErrUnauthorized,ErrNotFound,ErrRateLimited) for common statuses, plus a detailed*APIError(status code, envelopecode/msg, raw body) for everything else.
What's included
- Futures (
client.Futures) — 23 endpoints: supported coins/pairs, markets, open interest, funding rate, long/short ratios, liquidations (history, heatmaps, maps), orderbook, taker buy/sell, and whale alerts. - Spot (
client.Spot) — supported coins, markets, price history, orderbook, and taker buy/sell. - Options (
client.Options) — max pain, info, exchange OI/volume history. - ETF (
client.ETF) — Bitcoin/Ethereum ETF lists and flows, net assets, and Grayscale holdings. - Indicators (
client.Indicators) — Fear & Greed index, RSI, futures basis, Coinbase premium, Bitcoin rainbow chart, Stock-to-Flow, and stablecoin market cap.
Configuration
NewClient(apiKey, ...opts)andNewClientFromEnv(...opts)(readsCOINGLASS_API_KEY).- Options:
WithBaseURL,WithHTTPClient,WithTimeout,WithRetry. - Pointer helpers for optional params:
IntPtr,StringPtr,BoolPtr,Int64Ptr,Float64Ptr.
Testing & examples
- Each service ships with its own
httptest-based test suite. - Runnable examples in
examples:basic,etf, andconcurrency.
Requirements
- Go 1.21+
- A Coinglass API key
Installation
go get github.com/tigusigalpa/coinglass-go@v1.0.0Full documentation: see the README.
License: MIT
Want me to also generate a matching CHANGELOG.md entry (Keep a Changelog format) or a shorter, condensed version of these notes?