Documentation
¶
Overview ¶
Package useragent composes the User-Agent header sent on Korbit API requests (both REST and the WebSocket upgrade). The string identifies the CLI and its version, the host environment (OS name, OS/kernel version, CPU architecture, and locale), and the call context — which frontend and sub-context issued the call, so server-side traffic can be attributed to "a CLI command", "a monitor bot's API call", "the streaming socket", and so on.
Format:
korbit-cli/<version> (<os>[/<osver>]; <arch>[; <lang>]) ctx:<surface>[/<detail>]
e.g.
korbit-cli/1.2.3 (darwin/25.6.0; arm64; ko_KR) ctx:cli/order.place korbit-cli/1.2.3 (linux/6.1.0; amd64; en_US) ctx:monitor/botapi korbit-cli/1.2.3 (windows/10.0.22631; amd64) ctx:doctor
It is applied ONLY to Korbit requests. This package deliberately lives ABOVE the wire layer (internal/korbit): that package gathers no OS info and only carries the UserAgent seam, so callers compose the rich value here and inject it down. Nothing else (any future non-Korbit HTTP) should use this.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func For ¶
For returns the full User-Agent for a Korbit call attributed to the given surface (the frontend identity, e.g. "cli", "monitor", "doctor") and optional finer detail (e.g. the command key, or "botapi"). Both map straight onto the korbit.Origin{Surface,Detail} the caller already sets on the request.
Types ¶
This section is empty.