Releases: QTSurfer/sdk-java
Releases · QTSurfer/sdk-java
0.5.0
Added
QTSurfer.auth(apikey)(plusauth()env-var overload andauth(apikey, AuthOptions)) — one-call helper that exchanges a long-lived API key for a short-lived JWT and returns anAuthenticatedClient. The returned session mirrors the existingQTSurfersurface (compile,backtest,exchanges,instruments,tickers,klines) but transparently refreshes the JWT once on a 401 before retrying.com.qtsurfer.api.sdk.auth.TokenStoreinterface (load/save/clear) and a defaultInMemoryTokenStore. Adopters can plug in a file, secret manager, or desktop keychain.AuthOptionsis the configuration record (base URL, token store, HTTP client, executor) — defaults tohttps://api.qtsurfer.com/v1and an in-memory store.QTSURFER_APIKEYenvironment variable: read byQTSurfer.auth(null, ...)/QTSurfer.auth()when no API key argument is passed.QTSAuthError(subclass ofQTSError) raised when no API key is available or the JWT exchange fails.
Changed
- Bumped
com.qtsurfer:api-client-javato0.3.1(addsAuthApi,AuthTokenResponse,AuthTokenError). DownloadFormat#wire()is nowpublicso the auth-session can pass the underlyingExchangeBinaryDownloads.Formatthrough.
0.4.1
Fixed
- Corrected JitPack dependency coordinate for : (JitPack uses the repo name as artifactId, not the pom artifactId).
v0.3.0
Added
- Exchange & instrument discovery:
QTSurfer#exchanges()→List<Exchange>— list all exchanges available on the platform.QTSurfer#instruments(String exchangeId)→List<InstrumentDetail>— list instruments for a given exchange, includingdataFrom/dataToavailability windows,lastPrice, andvolume24h.- Both methods wrap
net.qtsurfer.api.client.api.ExchangeApi(already generated inapi-client v0.1.2) and surface failures asQTSError.
v0.2.0
Added
- Domain objects (
Strategy,Backtest):QTSurfer#compile(...)returns a reusableStrategyhandle that can launch multiple backtests.Strategy#backtest(...)returns aBacktesthandle exposingid(),state(),progress()(aFlow.Publisher<BacktestProgress>),await(), andcancel().QTSurfer#backtest(request, options)shortcut now composescompile → backtest → awaitover the new objects.
- Hourly tickers/klines downloads:
QTSurfer#tickers(exchangeId, base, quote, hour[, format])andQTSurfer#klines(...)— stream one hour of raw tickers or klines asInputStream.DownloadFormatenum (LASTRAdefault,PARQUETfor on-the-fly conversion).QTSDownloadError(subclass ofQTSError) — surfaced when the download fails (HTTP 4xx/5xx, transport error).
Changed
api-clientdependency bumped tov0.1.2(addsExchangeBinaryDownloads).- Internal
Backtestworkflow class renamed toBacktestWorkflowto free the publicBacktestname for the new domain handle.
Removed
- Hardcoded staging URL from the integration test default;
QTSURFER_API_URLis now required alongsideJWT_API_TOKEN(the test skips when either is absent). - Javadoc and README examples use the public domain (
api.qtsurfer.com) instead of internal/staging URLs.
v0.1.0
net.qtsurfer:sdk@0.1.0
Initial release of the opinionated Java SDK for QTSurfer, built on top of net.qtsurfer:api-client.
Highlights
- QTSurfer facade with a fluent Builder (baseUrl, token, optional HttpClient / ExecutorService).
- QTSurfer.backtest(BacktestRequest, BacktestOptions) orchestrates compile → prepare → execute, returns a CompletableFuture.
- Async compile flow (X-Compile-Async: true) with Failsafe-driven polling, exponential backoff and per-stage timeouts.
- Best-effort server-side cancelExecution when the returned future is cancelled after the execute stage has started.
- QTSError hierarchy, StatusNormalizer for backend casing drift, SLF4J hook for logging.
- 21 unit tests + integration test on binance BTC/USDT with ForcedTradeStrategy.
JitPack: com.github.QTSurfer:sdk-java:v0.1.0
<repository><id>jitpack.io</id><url>https://jitpack.io</url></repository>
<dependency>
<groupId>com.github.QTSurfer</groupId>
<artifactId>sdk-java</artifactId>
<version>v0.1.0</version>
</dependency>