Skip to content

feat: type system status advisories and close remaining Spot REST spec gaps - #108

Merged
nyg merged 1 commit into
masterfrom
nyg/spot-rest-followups
Sep 21, 2026
Merged

nyg merged 1 commit into
masterfrom
nyg/spot-rest-followups

Conversation

@nyg

@nyg nyg commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Closes the four spec gaps listed under "Not covered here" in #107, all checked against Kraken's Spot REST OpenAPI spec 1.1.0.

Changes

  • SystemStatus advisories. SystemStatus now carries upcomingMaintenance and emergency. Upcoming maintenance uses the same scheduledMaintenanceEvent schema as the MaintenanceSchedule endpoint, so it reuses MaintenanceSchedule.Event. Emergencies are typed as SystemStatus.Emergency, with IncidentStatus, Impact and forecast NextSteps, and share MaintenanceSchedule.Service for affected services. Kraken leaves both arrays out when no advisory is active, so the record replaces a missing array with an empty list rather than null.
  • Ledger rebase multiplier. LedgerInfoParams and LedgerEntriesParams accept a rebaseMultiplier, sent as rebase_multiplier like it is by TradesHistoryParams and QueryTradesParams. It is omitted when unset, so Kraken's rebased default still applies.
  • PostTrade without a symbol. PostTradeParams.symbol is now optional, as in the spec, and KrakenAPI.postTrade() returns the last 1000 trades of all pairs.
  • Exports served as application/octet-stream. The spec declares RetrieveExport as application/octet-stream, so DefaultKrakenRestRequester now hands that content type to processZipResponse too, alongside application/zip.

Compatibility

SystemStatus gains two record components, so code calling its constructor directly with a status and a timestamp no longer compiles. Code that only reads the response is unaffected. PostTradeParams.builder().build() no longer throws when the symbol is missing.

Tests

  • SystemStatusEndpointTest checks the documented emergencyInProgress and scheduledMaintenanceApproaching examples in full, empty lists when both arrays are absent, and unknown incident states, impacts, services and step types.
  • Ledger tests cover rebase_multiplier being sent when set and left out when not.
  • PostTrade tests cover a query with no symbol and a query with no parameter at all, plus routing of postTrade().
  • The requester export test runs for both application/zip and application/octet-stream.

mvnd -B clean package passes with 594 tests, and javadoc:jar passes with the release profile's doclint settings.

@nyg
nyg merged commit c30be2e into master Sep 21, 2026
1 check passed
@nyg
nyg deleted the nyg/spot-rest-followups branch September 21, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant