client.Auth is the API-key identity surface. It exposes Me and the nested client.Auth.Profile realtime service.
me, err := client.Auth.Me(ctx)
if err != nil {
log.Fatal(err)
}
fmt.Println(me.AccountID, me.APIKeyID, me.Username)
fmt.Println(me.RootSmartAccountAddress)models.MeResult also has optional raw Session data. API-key callers should not depend on a
browser session being present.
The Account ID is sufficient identity for API-key auth. Username may be empty; do not reject the
identity or substitute "-" as though it were required.
Me().APIKeyID is the ak_... credential handle of the authenticated key, the same value
configured as POLYESTER_API_KEY_ID.
Profile identity stream
The Go SDK deliberately omits profile get/update/history methods. The API-key-safe operation is:
sub, err := client.Auth.Profile.SubscribeIdentity(ctx)
if err != nil { log.Fatal(err) }
defer sub.Close()
for identity := range sub.Messages() {
fmt.Println(identity.AccountID, identity.Username, identity.AvatarURL)
break
}Wallet login, JWT refresh, MFA enrollment, and account resolve are not wrapped. See Authentication and Limitations.
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). Balances List ledger balances and history, 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. Fees Read effective spot fee rates, reserve rates, the next scheduled change, and the fee breakdown with the Go FeeService. Guard signer Guard signer approval helpers. Heatmap L2 order book heatmap reads. Internal transfers Move trading balances between Polyester accounts without touching a chain. 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. 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. Withdrawals Trading withdraw intents to funding or external chain destinations (signed payload). Zipper Deposit/withdraw config and related Zipper reads.