feat: complete typed Account Data API - #100
Open
nyg wants to merge 1 commit into
Open
Conversation
Support nullable credit results and JSON trade-volume requests while preserving decimal precision and public API documentation. Refs #82
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.
Completes the missing typed Account Data operations from #82: Balance, BalanceEx, CreditLines, TradeBalance, OpenOrders, ClosedOrders, QueryOrders, OrderAmends, TradesHistory, QueryTrades, OpenPositions, TradeVolume, GetApiKeyInfo, and ListWalletAccounts. Adds endpoint classes, parameter builders, response records, and public Javadoc following the existing library conventions.
Balances and quantities retain decimal precision, orders and trades expose pagination and optional counts, and wallet selection is sent in the Balance URL query. CreditLines handles successful null results. TradeVolume supports class-qualified pairs and full fee schedules through a JSON body; the default requester sends the endpoint’s content type and delegates response unwrapping so both cases work through the typed facade. The existing ledger and report methods remain available.
Validation: Java 25
clean packagepasses for both modules; 92 JUnit tests cover every added endpoint’s wire parameters, documented response fixtures, facade routing, missing credentials, null/error responses, enum fallback, fee schedules, and exact signed request bodies. The library Javadoc jar builds withdoclint=all,-missing. Tests use Mockito and AssertJ without API keys or network calls. The Account Data and Funding branches merge cleanly and pass all 173 tests together.This PR targets master independently of Market Data #99 and Funding #101. It uses the same test infrastructure as #99. Refs #82; the umbrella issue remains open for the other API groups.