client.MarketOverview returns one row per spot market (last price, 24h stats, and related
fields). Public, no authentication required.
Methods
| Method | Summary |
|---|---|
List | Overview rows (optional symbol filter). |
CreateSubscription | Snapshot-then-stream merged rows (preferred). |
Subscribe | Raw Centrifugo batches (Messages()). |
List(ctx, symbols, limit, pageToken, includeSparklines)
overview, err := client.MarketOverview.List(ctx, []string{"BTC-USDT"}, 50, "", false)
if err != nil { log.Fatal(err) }
for _, m := range overview.Markets {
fmt.Println(m.SymbolID, m.Symbol, m.LastPrice)
}The pageToken argument is accepted for signature parity; filtering is primarily via symbols and limit.
CreateSubscription(ctx, opts)
Managed books expose Updates() (slice of merged rows), not Messages().
import "github.com/Fabric-Labs/polyester-sdk-go/services"
sub, err := client.MarketOverview.CreateSubscription(ctx, services.MarketOverviewCreateSubscriptionOptions{
Symbols: []string{"BTC-USDT"},
Limit: 50,
OnEvent: func(rows []models.MarketOverviewEntry) {
for _, m := range rows {
fmt.Println(m.Symbol, m.LastPrice)
}
},
})
if err != nil { log.Fatal(err) }
defer sub.Close()
for rows := range sub.Updates() {
fmt.Println(len(rows))
break
}Subscribe(ctx)
Raw batches, consume with Messages(). Prefer CreateSubscription for dashboards.
Prefer CreateSubscription
Raw
Subscribe does not merge a REST snapshot for you.Related
Related Topics
Address book Saved destinations and whitelist views. API keys List, get, subscribe, and generate local API key material (no create on API-key SDKs). Auth Auth service helpers including nested profile access. Balances List ledger balances, history, holds, and subscribe to live updates with the Go BalancesService. Candles Read and stream public spot OHLCV candles via MarketData (Candles alias). Catalog Spot/Zipper catalog hydration via HydrateCatalogs and WaitForCatalogs, plus Manager lookups. Chain helpers On-chain Funding โ Trading and Funding withdraw helpers. Chain analytics Chain analytics read APIs. Client configuration Config fields, URLs, catalogs, wire format, and FromEnv behavior. Deposit Create and list per-account chain deposit addresses for funding your Polyester account. Errors Go SDK error types, sentinel ErrPolyester, MFA auth codes, and queue overflow. Guard signer Guard signer approval helpers. Heatmap L2 order book heatmap reads. Internal transfers Move trading balances between Polyester accounts without touching a chain. Layout Layout collaboration APIs (reference-only). Lifecycle Deposit/withdraw lifecycle flows and subscribe. Order book Depth snapshots and a stateful live order book that reconstructs the book for you. Orders Place, modify, cancel, batch, and stream spot orders with the Go OrdersService. Policies Realtime API-key and subaccount-policy updates. Polychart Polychart collaboration APIs (reference-only). Profile Profile identity reads and subscribe helpers. Public trades Public trade tape reads and subscribe via MarketData. Realtime Shared Centrifugo client, Messages() delivery, handshake-before-return, and fail-closed overflow. Social verification Social verification APIs (reference-only). Subaccounts Subaccount reads, members, invites, activity. User trades List and stream your private spot fills (not the public tape). Transfers Transfer history reads. Triggers Create, manage, pause/resume, and stream standalone trigger automations with the Go TriggersService. Whiteboard Whiteboard collaboration APIs (reference-only). Withdrawals Trading withdraw intents to funding or external chain destinations (signed payload). Zipper Deposit/withdraw config and related Zipper reads.