Class AuthenticatedClient

java.lang.Object
com.qtsurfer.api.sdk.auth.AuthenticatedClient

public final class AuthenticatedClient extends Object
Authenticated SDK session.

Created by QTSurfer.authenticate(String) (or the overload that accepts an AuthOptions). Wraps the underlying api-client, owns a JWT (in memory by default, or in the provided TokenStore), and transparently re-exchanges the API key for a fresh JWT when a call returns 401.

Exposes the same workflow surface as QTSurfer: compile, backtest, exchanges, instruments, tickers, klines. Method semantics are unchanged — only the bearer token management differs.

Refresh policy: a 401 from any call routed through the generated api-client (prepare, execute, result polling, exchanges, instruments, tickers, klines) triggers exactly one POST /v1/auth/token exchange, then the original call is retried once; a second 401 is surfaced to the caller. The one exception is compile, which talks to its endpoint directly and does not participate in this retry — see compile(String, BacktestOptions).