Skip to content

Kraken Spot REST API coverage: 52 of 61 core endpoints typed #82

Description

@nyg

Summary

Coverage of the Kraken Spot REST API as of 2026-09-11, against Kraken’s OpenAPI spec (info.version: 1.1.0) and master at b4672b7.

52 of 61 core endpoints are typed (85.2%). The 9 Trading endpoints are enum-only. Funding (Beta) has 15 additional operations without typed or enum support.

Coverage per group

Market Data — 12/12 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
GET /public/Time Get Server Time serverTime() Public.TIME No SimpleExamples
GET /public/SystemStatus Get System Status systemStatus() Public.SYSTEM_STATUS No SimpleExamples
GET /public/MaintenanceSchedule Get Maintenance Schedule maintenanceSchedule() Public.MAINTENANCE_SCHEDULE Yes MarketDataExample
GET /public/Assets Get Asset Info assetInfo(List<String>); assetInfo(List<String>, String) Public.ASSETS No SimpleExamples — both overloads
GET /public/AssetPairs Get Tradable Asset Pairs assetPairs(); assetPairs(List<String>); assetPairs(List<String>, AssetPairParams.Info) Public.ASSET_PAIRS No SimpleExamples — list overloads; StakingRewardsSummaryExampleassetPairs()
GET /public/Ticker Get Ticker Information ticker(List<String>) Public.TICKER No StakingRewardsSummaryExampleticker(List); SimpleExamples — generic query
GET /public/OHLC Get OHLC Data ohlc(String); ohlc(OhlcParams) Public.OHLC Yes MarketDataExampleohlc(OhlcParams) only
GET /public/Depth Get Order Book orderBook(String); orderBook(OrderBookParams) Public.DEPTH Yes MarketDataExampleorderBook(OrderBookParams) only
POST /private/Level3 Query L3 Order Book level3OrderBook(String); level3OrderBook(Level3OrderBookParams) Private.LEVEL3 Yes None
GET /public/GroupedBook Get Grouped Order Book groupedOrderBook(String); groupedOrderBook(GroupedOrderBookParams) Public.GROUPED_BOOK Yes MarketDataExamplegroupedOrderBook(GroupedOrderBookParams) only
GET /public/Trades Get Recent Trades recentTrades(String); recentTrades(RecentTradesParams) Public.TRADES Yes MarketDataExamplerecentTrades(RecentTradesParams); SimpleExamples — raw query
GET /public/Spread Get Recent Spreads recentSpreads(String); recentSpreads(RecentSpreadsParams) Public.SPREAD Yes MarketDataExamplerecentSpreads(String) only

Account Data — 20/20 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
POST /private/Balance Get Account Balance accountBalance(); accountBalance(AccountBalanceParams) Private.BALANCE Yes README snippetaccountBalance(); SimpleExamples / EarnOverview use generic query(Private.BALANCE)
POST /private/BalanceEx Get Extended Balance extendedBalance(); extendedBalance(ExtendedBalanceParams) Private.BALANCE_EX Yes None
POST /private/CreditLines Get Credit Lines creditLines(); creditLines(CreditLinesParams) Private.CREDIT_LINES Yes None
POST /private/TradeBalance Get Trade Balance tradeBalance(); tradeBalance(TradeBalanceParams) Private.TRADE_BALANCE Yes None
POST /private/OpenOrders Get Open Orders openOrders(); openOrders(OpenOrdersParams) Private.OPEN_ORDERS Yes README snippet — params overload
POST /private/ClosedOrders Get Closed Orders closedOrders(); closedOrders(ClosedOrdersParams) Private.CLOSED_ORDERS Yes README snippet — params overload
POST /private/QueryOrders Query Orders Info queryOrders(QueryOrdersParams) Private.QUERY_ORDERS Yes None
POST /private/OrderAmends Get Order Amends orderAmends(); orderAmends(OrderAmendsParams) Private.ORDER_AMENDS Yes None
POST /private/TradesHistory Get Trades History tradesHistory(); tradesHistory(TradesHistoryParams) Private.TRADES_HISTORY Yes None
POST /private/QueryTrades Query Trades Info queryTrades(QueryTradesParams) Private.QUERY_TRADES Yes README snippet
POST /private/OpenPositions Get Open Positions openPositions(); openPositions(OpenPositionsParams) Private.OPEN_POSITIONS Yes None
POST /private/Ledgers Get Ledgers Info ledgerInfo(LedgerInfoParams) Private.LEDGERS No None
POST /private/QueryLedgers Query Ledgers ledgerEntries(LedgerEntriesParams) Private.QUERY_LEDGERS No None
POST /private/TradeVolume Get Trade Volume tradeVolume(); tradeVolume(TradeVolumeParams) Private.TRADE_VOLUME Yes README snippet — params overload
POST /private/AddExport Request Export Report requestReport(RequestReportParams) Private.ADD_EXPORT No ReportFetcher
POST /private/ExportStatus Get Export Report Status reportsStatuses(ReportType) Private.EXPORT_STATUS No ReportFetcher
POST /private/RetrieveExport Retrieve Data Export reportData(String) Private.RETRIEVE_EXPORT No ReportFetcher
POST /private/RemoveExport Delete Export Report deleteReport(String); cancelReport(String) Private.REMOVE_EXPORT No ReportFetcherdeleteReport(String) only; no cancelReport(String) example
POST /private/GetApiKeyInfo Get API Key Info apiKeyInfo(); apiKeyInfo(ApiKeyInfoParams) Private.GET_API_KEY_INFO Yes None
POST /private/ListWalletAccounts List Wallet Accounts walletAccounts(); walletAccounts(WalletAccountsParams) Private.LIST_WALLET_ACCOUNTS Yes None

Trading — 0/9 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
POST /private/AddOrder Add Order Private.ADD_ORDER SimpleExamplesquery(Private.ADD_ORDER, Map), validate=true
POST /private/AmendOrder Amend Order Private.AMEND_ORDER None
POST /private/CancelOrder Cancel Order Private.CANCEL_ORDER None
POST /private/CancelAll Cancel All Orders Private.CANCEL_ALL None
POST /private/CancelAllOrdersAfter Cancel All Orders After X Private.CANCEL_ALL_ORDERS_AFTER None
POST /private/GetWebSocketsToken Get Websockets Token Private.GET_WEBSOCKETS_TOKEN None
POST /private/AddOrderBatch Add Order Batch Private.ADD_ORDER_BATCH None
POST /private/CancelOrderBatch Cancel Order Batch Private.CANCEL_ORDER_BATCH None
POST /private/EditOrder Edit Order Private.EDIT_ORDER None

Funding — 10/10 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
POST /private/DepositMethods Get Deposit Methods depositMethods(DepositMethodsParams) Private.DEPOSIT_METHODS Yes README snippet
POST /private/DepositAddresses Get Deposit Addresses depositAddresses(DepositAddressesParams) Private.DEPOSIT_ADDRESSES Yes None
POST /private/DepositStatus Get Status of Recent Deposits depositStatus(); depositStatus(DepositStatusParams) Private.DEPOSIT_STATUS Yes README snippet — params overload
POST /private/WithdrawMethods Get Withdrawal Methods withdrawalMethods(); withdrawalMethods(WithdrawalMethodsParams) Private.WITHDRAW_METHODS Yes None
POST /private/WithdrawAddresses Get Withdrawal Addresses withdrawalAddresses(); withdrawalAddresses(WithdrawalAddressesParams) Private.WITHDRAW_ADDRESSES Yes None
POST /private/WithdrawInfo Get Withdrawal Information withdrawalInfo(WithdrawalInfoParams) Private.WITHDRAW_INFO Yes README snippet
POST /private/Withdraw Withdraw Funds withdraw(WithdrawParams) Private.WITHDRAW Yes None
POST /private/WithdrawStatus Get Status of Recent Withdrawals withdrawalStatus(); withdrawalStatus(WithdrawalStatusParams) Private.WITHDRAW_STATUS Yes None
POST /private/WithdrawCancel Request Withdrawal Cancellation cancelWithdrawal(CancelWithdrawalParams) Private.WITHDRAW_CANCEL Yes None
POST /private/WalletTransfer Request Wallet Transfer walletTransfer(WalletTransferParams) Private.WALLET_TRANSFER Yes None

Subaccounts — 2/2 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
POST /private/CreateSubaccount Create Subaccount createSubaccount(CreateSubaccountParams) Private.CREATE_SUB_ACCOUNT No None
POST /private/AccountTransfer Account Transfer accountTransfer(AccountTransferParams) Private.ACCOUNT_TRANSFER No None

Earn — 6/6 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
POST /private/Earn/Allocate Allocate Earn Funds earnAllocate(EarnAllocationParams) Private.EARN_ALLOCATE No None
POST /private/Earn/Deallocate Deallocate Earn Funds earnDeallocate(EarnAllocationParams) Private.EARN_DEALLOCATE No None
POST /private/Earn/AllocateStatus Get Allocation Status earnAllocateStatus(String) Private.EARN_ALLOCATE_STATUS No None
POST /private/Earn/DeallocateStatus Get Deallocation Status earnDeallocateStatus(String) Private.EARN_DEALLOCATE_STATUS No None
POST /private/Earn/Strategies List Earn Strategies earnStrategies(); earnStrategies(EarnStrategiesParams) Private.EARN_STRATEGIES No EarnOverviewearnStrategies() directly; params overload only through delegation
POST /private/Earn/Allocations List Earn Allocations earnAllocations(); earnAllocations(EarnAllocationsParams) Private.EARN_ALLOCATIONS No EarnOverviewearnAllocations() directly; params overload only through delegation

Transparency — 2/2 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
GET /public/PreTrade Pre-Trade Data preTrade(String) Public.PRE_TRADE No None
GET /public/PostTrade Post-Trade Data postTrade(String); postTrade(PostTradeParams) Public.POST_TRADE No None

Funding (Beta) — 0/15 typed

Endpoint Summary Typed method(s) Enum constant Unit tests Example / documentation
GET /funding/v1/fees/{method_id} Calculate Funding Fees None
PUT /funding/v1/deposit/address Claim Funding Deposit Address None
GET /funding/v1/addresses List Funding Addresses None
POST /funding/v1/addresses Create Funding Address None
GET /funding/v1/withdrawals List Funding Withdrawals None
POST /funding/v1/withdrawals Create Funding Withdrawal None
PUT /funding/v1/addresses/{id} Update Funding Address None
DELETE /funding/v1/addresses/{id} Delete Funding Address None
GET /funding/v1/assets/{direction} List Funding Assets None
GET /funding/v2/deposit/addresses List Funding Claimed Addresses (v2) None
GET /funding/v1/limits/deposit/{asset_class}/{asset} List Funding Deposit Limits None
GET /funding/v1/deposits List Funding Deposits None
GET /funding/v1/methods/{direction} List Funding Methods None
GET /funding/v1/networks List Funding Networks None
GET /funding/v1/limits/withdrawal/{asset_class}/{asset} List Funding Withdrawal Limits None

Generic methods

Method / component Automated coverage Example / documentation
query(PublicEndpoint<T>) Indirectly exercised by typed public facade tests; no dedicated external custom endpoint test README snippetMyOrderBookEndpoint
query(PrivateEndpoint<T>) Indirectly exercised by typed private facade tests, including missing credentials; no dedicated external custom endpoint test No executable custom private endpoint example
query(Public) No dedicated test None
query(Public, Map) No dedicated test SimpleExamplesPublic.TICKER
queryPrivate(String) / queryPrivate(String, Map) No dedicated test None
queryPublic(String) No dedicated test None
queryPublic(String, Map) No dedicated test SimpleExamplesTrades
query(Private) No dedicated test SimpleExamples and EarnOverviewPrivate.BALANCE
query(Private, Map) No dedicated test SimpleExamplesPrivate.ADD_ORDER, validation only
KrakenCredentials.sign(...) KrakenCredentialsTest — reference signatures for form and JSON bodies, path excludes query Exercised implicitly by private examples
DefaultKrakenRestRequester.execute(...) Account, Market, and Funding tests use a mocked HttpsURLConnection; selected production mapping/signing/error paths are covered Used by executable examples

The unit suite uses JUnit 5, Mockito, AssertJ, and JSON fixtures: 257 tests pass on Java 25. There are no automated tests using real HTTP connections or live Kraken calls. Executable examples and README snippets demonstrate usage; they do not replace unit tests.

Funding (Beta) support

The 15 Beta operations use the base URL https://api.kraken.com, /funding/v1/* or /funding/v2/* paths, path parameters, and multiple HTTP verbs. The current PublicEndpoint and PrivateEndpoint abstraction fixes /0/public GET and /0/private POST. The built-in requester/query extension path therefore does not support the Beta shape as-is; address base URL, path, verb, authentication, and response handling before implementing these operations.

Definition of done, per endpoint

  1. Params type covering every documented request field.
  2. Response record(s) with correct Jackson mapping, precision, optional values, and forward-compatible enums.
  3. Endpoint subclass wiring path, HTTP method, parameters, and response type.
  4. Method on KrakenAPI.
  5. Enum constant present and correctly named where supported by the query model.
  6. Unit tests for request construction, response mapping, relevant edge cases/errors, and facade overload routing.
  7. Runnable example or README snippet where useful; an example does not replace a test.

Sub-tasks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions