feat: type system status advisories and close remaining Spot REST spec gaps - #108
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SystemStatusnow carriesupcomingMaintenanceandemergency. Upcoming maintenance uses the samescheduledMaintenanceEventschema as theMaintenanceScheduleendpoint, so it reusesMaintenanceSchedule.Event. Emergencies are typed asSystemStatus.Emergency, withIncidentStatus,Impactand forecastNextSteps, and shareMaintenanceSchedule.Servicefor affected services. Kraken leaves both arrays out when no advisory is active, so the record replaces a missing array with an empty list rather thannull.LedgerInfoParamsandLedgerEntriesParamsaccept arebaseMultiplier, sent asrebase_multiplierlike it is byTradesHistoryParamsandQueryTradesParams. It is omitted when unset, so Kraken'srebaseddefault still applies.PostTradeParams.symbolis now optional, as in the spec, andKrakenAPI.postTrade()returns the last 1000 trades of all pairs.application/octet-stream. The spec declaresRetrieveExportasapplication/octet-stream, soDefaultKrakenRestRequesternow hands that content type toprocessZipResponsetoo, alongsideapplication/zip.Compatibility
SystemStatusgains 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
SystemStatusEndpointTestchecks the documentedemergencyInProgressandscheduledMaintenanceApproachingexamples in full, empty lists when both arrays are absent, and unknown incident states, impacts, services and step types.rebase_multiplierbeing sent when set and left out when not.postTrade().application/zipandapplication/octet-stream.mvnd -B clean packagepasses with 594 tests, andjavadoc:jarpasses with the release profile'sdoclintsettings.