client.Catalogs is a *catalogs.Manager. With Config.HydrateCatalogs: true (default via FromEnv), the client starts background hydration of spot config and deposit-withdraw config.
if err := client.WaitForCatalogs(ctx); err != nil {
// Hydration failed or the context was canceled. Do not treat the client as ready.
return err
}Fail-closed hydration
WaitForCatalogs returns when the background attempt finishes. Failed fetches, invalid catalog
scales/IDs, empty names, and duplicate/conflicting identities return an error (inspect CatalogsLastError()). A rejected refresh does not partially replace the previous valid snapshot.
Scale 0 is valid; use the lookup's ok value to distinguish it from an unavailable scale. Disable with HydrateCatalogs: false (then WaitForCatalogs returns immediately).Manual hydrate / lookups
spot, err := client.MarketData.GetSpotConfig(ctx)
if err != nil {
return err
}
if err := client.Catalogs.HydrateSpotConfig(spot.Raw); err != nil {
return err
}
dw, err := client.Zipper.GetDepositWithdrawConfig(ctx)
if err != nil {
return err
}
if err := client.Catalogs.HydrateZipperConfig(dw); err != nil {
return err
}
id := client.Catalogs.SymbolIDForSymbol("BTC-USDT")
scale, ok := client.Catalogs.BaseQuantityScaleForSymbol("BTC-USDT")
if id == nil || !ok {
return fmt.Errorf("BTC-USDT is not present in the hydrated catalog")
}
buckets := client.Catalogs.OrderbookPriceBucketsForSymbol("BTC-USDT")| Method | Notes |
|---|---|
HydrateSpotConfig / HydrateZipperConfig | Replace snapshots |
SymbolIDForSymbol | *uint32 |
BaseQuantityScaleForSymbol / โฆSymbolID | Returns (scale, ok); ok is false when unresolved |
OrderbookPriceBucketsForSymbol | []string |
LedgerIDForAsset / QuantityScaleForAsset | Zipper-backed |
PatchZipperSupply | Live supply patches |
There is no TS-style catalog.orders.validateSpotOrderDecimalInput helper. Invalid precision
typically fails at encode time (*ValidationError) or as an API error.
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). 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. Market overview List and subscribe to per-market stats with optional snapshot-then-stream merge. 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.