-
Notifications
You must be signed in to change notification settings - Fork 27
feat: complete typed Funding API #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
31 changes: 31 additions & 0 deletions
31
library/src/main/java/dev/andstuff/kraken/api/endpoint/funding/CancelWithdrawalEndpoint.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package dev.andstuff.kraken.api.endpoint.funding; | ||
|
|
||
| import com.fasterxml.jackson.core.type.TypeReference; | ||
|
|
||
| import dev.andstuff.kraken.api.endpoint.funding.params.CancelWithdrawalParams; | ||
| import dev.andstuff.kraken.api.endpoint.priv.PrivateEndpoint; | ||
|
|
||
| /** | ||
| * The private {@code WithdrawCancel} endpoint for cancel withdrawal. | ||
| */ | ||
| public class CancelWithdrawalEndpoint extends PrivateEndpoint<Boolean> { | ||
|
|
||
| /** | ||
| * Creates the {@code WithdrawCancel} endpoint using the required parameters. | ||
| * | ||
| * @param asset the asset sent to Kraken | ||
| * @param referenceId the referenceId sent to Kraken | ||
| */ | ||
| public CancelWithdrawalEndpoint(String asset, String referenceId) { | ||
| this(CancelWithdrawalParams.builder().asset(asset).referenceId(referenceId).build()); | ||
| } | ||
|
|
||
| /** | ||
| * Creates the {@code WithdrawCancel} endpoint. | ||
| * | ||
| * @param params the request parameters | ||
| */ | ||
| public CancelWithdrawalEndpoint(CancelWithdrawalParams params) { | ||
| super("WithdrawCancel", params, new TypeReference<>() {}); | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
library/src/main/java/dev/andstuff/kraken/api/endpoint/funding/DepositAddressesEndpoint.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| package dev.andstuff.kraken.api.endpoint.funding; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import com.fasterxml.jackson.core.type.TypeReference; | ||
|
|
||
| import dev.andstuff.kraken.api.endpoint.funding.params.DepositAddressesParams; | ||
| import dev.andstuff.kraken.api.endpoint.funding.response.DepositAddress; | ||
| import dev.andstuff.kraken.api.endpoint.priv.PrivateEndpoint; | ||
|
|
||
| /** | ||
| * The private {@code DepositAddresses} endpoint for deposit addresses. | ||
| */ | ||
| public class DepositAddressesEndpoint extends PrivateEndpoint<List<DepositAddress>> { | ||
|
|
||
| /** | ||
| * Creates the {@code DepositAddresses} endpoint using the required parameters. | ||
| * | ||
| * @param asset the asset sent to Kraken | ||
| * @param method the method sent to Kraken | ||
| */ | ||
| public DepositAddressesEndpoint(String asset, String method) { | ||
| this(DepositAddressesParams.builder().asset(asset).method(method).build()); | ||
| } | ||
|
|
||
| /** | ||
| * Creates the {@code DepositAddresses} endpoint. | ||
| * | ||
| * @param params the request parameters | ||
| */ | ||
| public DepositAddressesEndpoint(DepositAddressesParams params) { | ||
| super("DepositAddresses", params, new TypeReference<>() {}); | ||
| } | ||
| } |
33 changes: 33 additions & 0 deletions
33
library/src/main/java/dev/andstuff/kraken/api/endpoint/funding/DepositMethodsEndpoint.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| package dev.andstuff.kraken.api.endpoint.funding; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import com.fasterxml.jackson.core.type.TypeReference; | ||
|
|
||
| import dev.andstuff.kraken.api.endpoint.funding.params.DepositMethodsParams; | ||
| import dev.andstuff.kraken.api.endpoint.funding.response.DepositMethod; | ||
| import dev.andstuff.kraken.api.endpoint.priv.PrivateEndpoint; | ||
|
|
||
| /** | ||
| * The private {@code DepositMethods} endpoint for deposit methods. | ||
| */ | ||
| public class DepositMethodsEndpoint extends PrivateEndpoint<List<DepositMethod>> { | ||
|
|
||
| /** | ||
| * Creates the {@code DepositMethods} endpoint using the required parameters. | ||
| * | ||
| * @param asset the asset sent to Kraken | ||
| */ | ||
| public DepositMethodsEndpoint(String asset) { | ||
| this(DepositMethodsParams.builder().asset(asset).build()); | ||
| } | ||
|
|
||
| /** | ||
| * Creates the {@code DepositMethods} endpoint. | ||
| * | ||
| * @param params the request parameters | ||
| */ | ||
| public DepositMethodsEndpoint(DepositMethodsParams params) { | ||
| super("DepositMethods", params, new TypeReference<>() {}); | ||
| } | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anchoring here since it is the line this PR touches in AGENTS.md.
This PR adds
endpoint/funding/but the layout paragraph just below (line 22) is not updated for it. It still enumerates onlymarket/,account/,subaccount/,transparency/andearn/.#99 updated that same sentence to cover the authenticated Level3 endpoint living under
market/, so the two PRs touch it and will need a small manual merge anyway. Worth addingfunding/for deposits and withdrawals while you are in there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in acc0c06: the Layout section now documents funding/ as the private Funding (Legacy) domain for deposits, withdrawals and wallet transfers. It is a separate paragraph, so the Level3 wording change in #99 still merges cleanly. Verified all three updated snapshots together: 257 tests and the Javadoc build pass.