From c72e0a51eeb4a14047104389f9a88e8b81042f0b Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Tue, 17 Feb 2026 14:28:18 -0800 Subject: [PATCH 1/8] update feb 2026 --- pom.xml | 2 +- .../examples/futures/GetFcmEquity.java | 45 ++++++++ .../GetPortfolioActivityRequest.java | 3 +- .../ListEntityActivitiesRequest.java | 18 +++ .../ListPortfolioActivitiesRequest.java | 17 +++ .../CreateAddressBookEntryRequest.java | 18 +++ .../ListOnchainWalletBalancesResponse.java | 13 +++ .../ListPortfolioBalancesResponse.java | 11 ++ .../financing/CreateNewLocatesRequest.java | 18 +++ .../prime/financing/FinancingServiceImpl.java | 2 +- ...GetPortfolioCreditInformationResponse.java | 2 + .../ListExistingLocatesResponse.java | 8 +- ...stInterestAccrualsForPortfolioRequest.java | 6 +- .../prime/futures/FuturesService.java | 1 + .../prime/futures/FuturesServiceImpl.java | 9 ++ .../prime/futures/GetFcmEquityRequest.java | 67 +++++++++++ .../prime/futures/GetFcmEquityResponse.java | 68 ++++++++++++ .../prime/futures/GetPositionsResponse.java | 8 +- .../ScheduleEntityFuturesSweepRequest.java | 10 ++ .../coinbase/prime/model/GoogleTypeDate.java | 104 ++++++++++++++++++ .../coinbase/prime/model/TravelRuleData.java | 21 ++++ .../coinbase/prime/model/TravelRuleParty.java | 82 ++++++++++++++ .../prime/model/ValidatorAllocation.java | 83 ++++++++++++++ .../prime/model/WalletUnstakeInputs.java | 24 ++++ .../prime/model/enums/RewardSubtype.java | 3 +- .../ListOnchainAddressGroupsRequest.java | 4 + .../UpdateOnchainAddressBookEntryRequest.java | 4 +- .../prime/orders/AcceptQuoteRequest.java | 17 +++ .../prime/orders/CancelOrderResponse.java | 3 - .../prime/orders/CreateOrderRequest.java | 11 +- .../prime/orders/CreateQuoteRequest.java | 17 +++ .../prime/orders/GetOrderPreviewRequest.java | 11 +- .../prime/orders/ListOpenOrdersRequest.java | 22 ++-- .../CreateOnchainTransactionRequest.java | 3 - .../CreateWalletTransferResponse.java | 13 +-- .../CreateWalletWithdrawalResponse.java | 13 +-- .../ListPortfolioTransactionsRequest.java | 35 ++++++ .../ListWalletTransactionsResponse.java | 9 -- .../SubmitDepositTravelRuleDataRequest.java | 18 --- .../users/ListPortfolioUsersResponse.java | 8 +- .../prime/wallets/CreateWalletRequest.java | 58 +++++++++- .../GetWalletDepositInstructionsRequest.java | 11 +- .../wallets/ListWalletAddressesRequest.java | 8 +- .../prime/wallets/ListWalletsRequest.java | 18 +++ .../OrdersServiceSerializationTest.java | 2 +- .../model-generator/.openapi-generator-ignore | 6 +- 46 files changed, 829 insertions(+), 105 deletions(-) create mode 100644 src/main/java/com/coinbase/examples/futures/GetFcmEquity.java create mode 100644 src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java create mode 100644 src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java create mode 100644 src/main/java/com/coinbase/prime/model/GoogleTypeDate.java create mode 100644 src/main/java/com/coinbase/prime/model/ValidatorAllocation.java diff --git a/pom.xml b/pom.xml index e432adae..830dd005 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ Sample Java SDK for the Coinbase Prime REST APIs com.coinbase.prime https://github.com/coinbase-samples/prime-sdk-java - 1.6.2 + 1.6.3 Apache License, Version 2.0 diff --git a/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java b/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java new file mode 100644 index 00000000..5c482c83 --- /dev/null +++ b/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java @@ -0,0 +1,45 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.examples.futures; + +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.credentials.CoinbasePrimeCredentials; +import com.coinbase.prime.factory.PrimeServiceFactory; +import com.coinbase.prime.futures.FuturesService; +import com.coinbase.prime.futures.GetFcmEquityRequest; +import com.coinbase.prime.futures.GetFcmEquityResponse; +import com.coinbase.prime.utils.Utils; + +public class GetFcmEquity { + public static void main(String[] args) { + try { + CoinbasePrimeCredentials credentials = new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); + CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); + String entityId = System.getenv("COINBASE_PRIME_ENTITY_ID"); + + FuturesService service = PrimeServiceFactory.createFuturesService(client); + GetFcmEquityResponse response = service.getFcmEquity( + new GetFcmEquityRequest.Builder() + .entityId(entityId) + .build()); + + System.out.println(Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java b/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java index 0ffb6393..f09604fd 100644 --- a/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java +++ b/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java @@ -16,7 +16,6 @@ package com.coinbase.prime.activities; -import com.coinbase.prime.common.PrimeListRequest; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.coinbase.core.errors.CoinbaseClientException; @@ -25,7 +24,7 @@ /** * Request for getting a portfolio activity by activity ID. */ -public class GetPortfolioActivityRequest extends PrimeListRequest { +public class GetPortfolioActivityRequest { @JsonProperty(required = true, value = "portfolio_id") @JsonIgnore private String portfolioId; diff --git a/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java b/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java index bd2f0fab..ff5102e8 100644 --- a/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java +++ b/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java @@ -48,6 +48,9 @@ public class ListEntityActivitiesRequest extends PrimeListRequest { @JsonProperty("end_time") private String endTime; + @JsonProperty("get_network_unified_activities") + private Boolean getNetworkUnifiedActivities; + public ListEntityActivitiesRequest(String entityId) { this.entityId = entityId; } @@ -61,6 +64,7 @@ public ListEntityActivitiesRequest(Builder builder) { this.statuses = builder.statuses; this.startTime = builder.startTime; this.endTime = builder.endTime; + this.getNetworkUnifiedActivities = builder.getNetworkUnifiedActivities; } public String getEntityId() { @@ -119,6 +123,14 @@ public void setEndTime(String endTime) { this.endTime = endTime; } + public Boolean getGetNetworkUnifiedActivities() { + return this.getNetworkUnifiedActivities; + } + + public void setGetNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { + this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; + } + public static class Builder { private final String entityId; private ActivityLevel activityLevel; @@ -127,6 +139,7 @@ public static class Builder { private ActivityStatus[] statuses; private String startTime; private String endTime; + private Boolean getNetworkUnifiedActivities; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -165,6 +178,11 @@ public ListEntityActivitiesRequest.Builder endTime(String endTime) { return this; } + public ListEntityActivitiesRequest.Builder getNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { + this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; + return this; + } + public ListEntityActivitiesRequest.Builder limit(Integer limit) { this.limit = limit; return this; diff --git a/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java b/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java index eed1762e..4c7533a7 100644 --- a/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java +++ b/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java @@ -38,6 +38,8 @@ public class ListPortfolioActivitiesRequest extends PrimeListRequest { private String startTime; @JsonProperty("end_time") private String endTime; + @JsonProperty("get_network_unified_activities") + private Boolean getNetworkUnifiedActivities; public ListPortfolioActivitiesRequest() { } @@ -50,6 +52,7 @@ public ListPortfolioActivitiesRequest(Builder builder) { this.statuses = builder.statuses; this.startTime = builder.startTime; this.endTime = builder.endTime; + this.getNetworkUnifiedActivities = builder.getNetworkUnifiedActivities; } public String getPortfolioId() { @@ -100,6 +103,14 @@ public void setEndTime(String endTime) { this.endTime = endTime; } + public Boolean getGetNetworkUnifiedActivities() { + return getNetworkUnifiedActivities; + } + + public void setGetNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { + this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; + } + public static class Builder { private final String portfolioId; private String[] symbols; @@ -107,6 +118,7 @@ public static class Builder { private ActivityStatus[] statuses; private String startTime; private String endTime; + private Boolean getNetworkUnifiedActivities; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -140,6 +152,11 @@ public Builder endTime(String endTime) { return this; } + public Builder getNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { + this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; + return this; + } + public Builder limit(Integer limit) { this.limit = limit; return this; diff --git a/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java b/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java index f8cecfd6..74302509 100644 --- a/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java +++ b/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java @@ -37,6 +37,9 @@ public class CreateAddressBookEntryRequest { @JsonProperty("account_identifier") private String accountIdentifier; + @JsonProperty("chain_ids") + private String[] chainIds; + public CreateAddressBookEntryRequest() { } @@ -46,6 +49,7 @@ public CreateAddressBookEntryRequest(Builder builder) { this.currencySymbol = builder.currencySymbol; this.name = builder.name; this.accountIdentifier = builder.accountIdentifier; + this.chainIds = builder.chainIds; } public String getPortfolioId() { @@ -88,12 +92,21 @@ public void setAccountIdentifier(String accountIdentifier) { this.accountIdentifier = accountIdentifier; } + public String[] getChainIds() { + return chainIds; + } + + public void setChainIds(String[] chainIds) { + this.chainIds = chainIds; + } + public static class Builder { private final String portfolioId; private String address; private String currencySymbol; private String name; private String accountIdentifier; + private String[] chainIds; public Builder(String portfolioId) { this.portfolioId = portfolioId; @@ -119,6 +132,11 @@ public Builder accountIdentifier(String accountIdentifier) { return this; } + public Builder chainIds(String[] chainIds) { + this.chainIds = chainIds; + return this; + } + public CreateAddressBookEntryRequest build() throws CoinbaseClientException { this.validate(); return new CreateAddressBookEntryRequest(this); diff --git a/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java b/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java index 40a262b0..19ea96cb 100644 --- a/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java +++ b/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java @@ -17,7 +17,9 @@ package com.coinbase.prime.balances; import com.coinbase.prime.common.Pagination; +import com.coinbase.prime.model.DefiBalance; import com.coinbase.prime.model.OnchainBalance; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Response object for listing on-chain wallet balances by entity. @@ -27,6 +29,9 @@ public class ListOnchainWalletBalancesResponse { private OnchainBalance[] balances; /** Pagination information for the response */ private Pagination pagination; + /** DeFi balances only return for the initial request. No pagination support. */ + @JsonProperty("defi_balances") + private DefiBalance[] defiBalances; public ListOnchainWalletBalancesResponse() { } @@ -47,4 +52,12 @@ public void setPagination(Pagination pagination) { this.pagination = pagination; } + public DefiBalance[] getDefiBalances() { + return defiBalances; + } + + public void setDefiBalances(DefiBalance[] defiBalances) { + this.defiBalances = defiBalances; + } + } diff --git a/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java b/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java index 4519191c..bdab8990 100644 --- a/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java +++ b/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java @@ -35,6 +35,9 @@ public class ListPortfolioBalancesResponse { /** Vault-specific balance summary */ @JsonProperty("vault_balances") private AggregatedFiatBalance vaultBalances; + /** Prime custody balance summary */ + @JsonProperty("prime_custody_balances") + private AggregatedFiatBalance primeCustodyBalances; public ListPortfolioBalancesResponse() { } @@ -71,4 +74,12 @@ public void setVaultBalances(AggregatedFiatBalance vaultBalances) { this.vaultBalances = vaultBalances; } + public AggregatedFiatBalance getPrimeCustodyBalances() { + return primeCustodyBalances; + } + + public void setPrimeCustodyBalances(AggregatedFiatBalance primeCustodyBalances) { + this.primeCustodyBalances = primeCustodyBalances; + } + } diff --git a/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java b/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java index f526e71b..6713f910 100644 --- a/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java +++ b/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java @@ -28,6 +28,9 @@ public class CreateNewLocatesRequest { private String amount; + @JsonProperty("conversion_date") + private String conversionDate; + @JsonProperty("locate_date") private String locateDate; @@ -38,6 +41,7 @@ public CreateNewLocatesRequest(Builder builder) { this.portfolioId = builder.portfolioId; this.symbol = builder.symbol; this.amount = builder.amount; + this.conversionDate = builder.conversionDate; this.locateDate = builder.locateDate; } @@ -65,6 +69,14 @@ public void setAmount(String amount) { this.amount = amount; } + public String getConversionDate() { + return conversionDate; + } + + public void setConversionDate(String conversionDate) { + this.conversionDate = conversionDate; + } + public String getLocateDate() { return locateDate; } @@ -77,6 +89,7 @@ public static class Builder { private String portfolioId; private String symbol; private String amount; + private String conversionDate; private String locateDate; public Builder() { @@ -97,6 +110,11 @@ public Builder amount(String amount) { return this; } + public Builder conversionDate(String conversionDate) { + this.conversionDate = conversionDate; + return this; + } + public Builder locateDate(String locateDate) { this.locateDate = locateDate; return this; diff --git a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java index ae761b08..c42fbdcf 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java @@ -53,7 +53,7 @@ public GetCrossMarginOverviewResponse getCrossMarginOverview(GetCrossMarginOverv public GetEntityLocateAvailabilitiesResponse getEntityLocateAvailabilities(GetEntityLocateAvailabilitiesRequest request) throws CoinbasePrimeException { return this.request( HttpMethod.GET, - String.format("/entities/%s/locates/locates_availability", request.getEntityId()), + String.format("/entities/%s/locates_availability", request.getEntityId()), request, List.of(200), new TypeReference() {}); diff --git a/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java b/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java index 9d8bcf18..82862f52 100644 --- a/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java +++ b/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java @@ -17,8 +17,10 @@ package com.coinbase.prime.financing; import com.coinbase.prime.model.PostTradeCreditInformation; +import com.fasterxml.jackson.annotation.JsonProperty; public class GetPortfolioCreditInformationResponse { + @JsonProperty("post_trade_credit") private PostTradeCreditInformation postTradeCredit; public GetPortfolioCreditInformationResponse() { diff --git a/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java b/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java index 05d0f89e..c8db7294 100644 --- a/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java +++ b/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java @@ -16,19 +16,19 @@ package com.coinbase.prime.financing; -import com.coinbase.prime.model.Locate; +import com.coinbase.prime.model.ExistingLocate; public class ListExistingLocatesResponse { - private Locate[] locates; + private ExistingLocate[] locates; public ListExistingLocatesResponse() { } - public Locate[] getLocates() { + public ExistingLocate[] getLocates() { return locates; } - public void setLocates(Locate[] locates) { + public void setLocates(ExistingLocate[] locates) { this.locates = locates; } diff --git a/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java b/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java index b9f663e6..51976802 100644 --- a/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java +++ b/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java @@ -71,7 +71,7 @@ public static class Builder { public Builder() { } - public Builder prtfolioId(String portfolioId) { + public Builder portfolioId(String portfolioId) { this.portfolioId = portfolioId; return this; } @@ -86,6 +86,8 @@ public Builder endDate(String endDate) { return this; } - + public ListInterestAccrualsForPortfolioRequest build() { + return new ListInterestAccrualsForPortfolioRequest(this); + } } } diff --git a/src/main/java/com/coinbase/prime/futures/FuturesService.java b/src/main/java/com/coinbase/prime/futures/FuturesService.java index 9e77aaab..ebf5533f 100644 --- a/src/main/java/com/coinbase/prime/futures/FuturesService.java +++ b/src/main/java/com/coinbase/prime/futures/FuturesService.java @@ -23,6 +23,7 @@ public interface FuturesService { // Futures SetAutoSweepResponse setAutoSweep(SetAutoSweepRequest request) throws CoinbaseClientException, CoinbasePrimeException; GetEntityFcmBalanceResponse getEntityFcmBalance(GetEntityFcmBalanceRequest request) throws CoinbaseClientException, CoinbasePrimeException; + GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) throws CoinbaseClientException, CoinbasePrimeException; GetPositionsResponse getPositions(GetPositionsRequest request) throws CoinbaseClientException, CoinbasePrimeException; ListEntityFuturesSweepsResponse listEntityFuturesSweeps(ListEntityFuturesSweepsRequest request) throws CoinbaseClientException, CoinbasePrimeException; CancelEntityFuturesSweepResponse cancelEntityFuturesSweep(CancelEntityFuturesSweepRequest request) throws CoinbaseClientException, CoinbasePrimeException; diff --git a/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java b/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java index 0e39ff3b..56afb5e2 100644 --- a/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java +++ b/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java @@ -49,6 +49,15 @@ public GetEntityFcmBalanceResponse getEntityFcmBalance(GetEntityFcmBalanceReques new TypeReference() {}); } + @Override + public GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/entities/%s/futures/equity", request.getEntityId()), + request, + List.of(200), + new TypeReference() {}); + } @Override public ListEntityFuturesSweepsResponse listEntityFuturesSweeps(ListEntityFuturesSweepsRequest request) throws CoinbasePrimeException { diff --git a/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java b/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java new file mode 100644 index 00000000..79883375 --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.futures; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +public class GetFcmEquityRequest { + @JsonProperty(required = true, value = "entity_id") + @JsonIgnore + private String entityId; + + public GetFcmEquityRequest() { + } + + public GetFcmEquityRequest(Builder builder) { + this.entityId = builder.entityId; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public static class Builder { + private String entityId; + + public Builder() { + } + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public GetFcmEquityRequest build() throws CoinbaseClientException { + this.validate(); + return new GetFcmEquityRequest(this); + } + + private void validate() throws CoinbaseClientException { + if (isNullOrEmpty(this.entityId)) { + throw new CoinbaseClientException("Entity ID is required"); + } + } + } +} diff --git a/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java new file mode 100644 index 00000000..e0136092 --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java @@ -0,0 +1,68 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.futures; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GetFcmEquityResponse { + @JsonProperty("eod_account_equity") + private String eodAccountEquity; + + @JsonProperty("eod_unrealized_pnl") + private String eodUnrealizedPnl; + + @JsonProperty("current_excess_deficit") + private String currentExcessDeficit; + + @JsonProperty("available_to_sweep") + private String availableToSweep; + + public GetFcmEquityResponse() { + } + + public String getEodAccountEquity() { + return eodAccountEquity; + } + + public void setEodAccountEquity(String eodAccountEquity) { + this.eodAccountEquity = eodAccountEquity; + } + + public String getEodUnrealizedPnl() { + return eodUnrealizedPnl; + } + + public void setEodUnrealizedPnl(String eodUnrealizedPnl) { + this.eodUnrealizedPnl = eodUnrealizedPnl; + } + + public String getCurrentExcessDeficit() { + return currentExcessDeficit; + } + + public void setCurrentExcessDeficit(String currentExcessDeficit) { + this.currentExcessDeficit = currentExcessDeficit; + } + + public String getAvailableToSweep() { + return availableToSweep; + } + + public void setAvailableToSweep(String availableToSweep) { + this.availableToSweep = availableToSweep; + } +} diff --git a/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java b/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java index e3e21a33..c27da8df 100644 --- a/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java +++ b/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java @@ -16,14 +16,14 @@ package com.coinbase.prime.futures; -import com.coinbase.prime.model.Position; +import com.coinbase.prime.model.FcmPosition; import com.fasterxml.jackson.annotation.JsonProperty; /** * Response containing positions for an entity. */ public class GetPositionsResponse { - private Position[] positions; + private FcmPosition[] positions; @JsonProperty("clearing_account_id") private String clearingAccountId; @@ -31,11 +31,11 @@ public class GetPositionsResponse { public GetPositionsResponse() { } - public Position[] getPositions() { + public FcmPosition[] getPositions() { return positions; } - public void setPositions(Position[] positions) { + public void setPositions(FcmPosition[] positions) { this.positions = positions; } diff --git a/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java b/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java index 3ed2948a..b8e7c186 100644 --- a/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java +++ b/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java @@ -78,6 +78,16 @@ public Builder entityId(String entityId) { return this; } + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + public ScheduleEntityFuturesSweepRequest build() throws CoinbaseClientException { this.validate(); return new ScheduleEntityFuturesSweepRequest(this); diff --git a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java new file mode 100644 index 00000000..15d26bed --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java @@ -0,0 +1,104 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; + +public class GoogleTypeDate { + /** + * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + */ + @JsonProperty("year") + private Integer year; + + /** + * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + */ + @JsonProperty("month") + private Integer month; + + /** + * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. + */ + @JsonProperty("day") + private Integer day; + + public GoogleTypeDate() { + } + + public GoogleTypeDate(Builder builder) { + this.year = builder.year; + this.month = builder.month; + this.day = builder.day; + } + public Integer getYear() { + return year; + } + + public void setYear(Integer year) { + this.year = year; + } + public Integer getMonth() { + return month; + } + + public void setMonth(Integer month) { + this.month = month; + } + public Integer getDay() { + return day; + } + + public void setDay(Integer day) { + this.day = day; + } + public static class Builder { + private Integer year; + + private Integer month; + + private Integer day; + + public Builder year(Integer year) { + this.year = year; + return this; + } + + public Builder month(Integer month) { + this.month = month; + return this; + } + + public Builder day(Integer day) { + this.day = day; + return this; + } + + public GoogleTypeDate build() { + return new GoogleTypeDate(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index d9969f25..c206e4d2 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -46,6 +46,12 @@ public class TravelRuleData { @JsonProperty("opt_out_of_ownership_verification") private Boolean optOutOfOwnershipVerification; + /** + * Whether the originating VASP attests to verified wallet ownership. When true with is_intermediary, enables automatic VASP data enrichment from the legal entity. + */ + @JsonProperty("attest_verified_wallet_ownership") + private Boolean attestVerifiedWalletOwnership; + public TravelRuleData() { } @@ -55,6 +61,7 @@ public TravelRuleData(Builder builder) { this.isSelf = builder.isSelf; this.isIntermediary = builder.isIntermediary; this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; + this.attestVerifiedWalletOwnership = builder.attestVerifiedWalletOwnership; } public TravelRuleParty getBeneficiary() { return beneficiary; @@ -91,6 +98,13 @@ public Boolean getOptOutOfOwnershipVerification() { public void setOptOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; } + public Boolean getAttestVerifiedWalletOwnership() { + return attestVerifiedWalletOwnership; + } + + public void setAttestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { + this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; + } public static class Builder { private TravelRuleParty beneficiary; @@ -102,6 +116,8 @@ public static class Builder { private Boolean optOutOfOwnershipVerification; + private Boolean attestVerifiedWalletOwnership; + public Builder beneficiary(TravelRuleParty beneficiary) { this.beneficiary = beneficiary; return this; @@ -127,6 +143,11 @@ public Builder optOutOfOwnershipVerification(Boolean optOutOfOwnershipVerificati return this; } + public Builder attestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { + this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; + return this; + } + public TravelRuleData build() { return new TravelRuleData(this); } diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java index 48e4ed66..6dee7d29 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -22,6 +22,7 @@ import com.coinbase.prime.model.DetailedAddress; import com.coinbase.prime.model.NaturalPersonName; import com.coinbase.prime.model.enums.TravelRuleWalletType; +import com.coinbase.prime.model.GoogleTypeDate; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -48,6 +49,27 @@ public class TravelRuleParty { @JsonProperty("vasp_name") private String vaspName; + /** + * Personal identifier for travel rule compliance. For individuals: passport number, national ID, driver's license. For institutions: LEI (Legal Entity Identifier). + */ + @JsonProperty("personal_id") + private String personalId; + + @JsonProperty("date_of_birth") + private GoogleTypeDate dateOfBirth; + + /** + * Telephone number for contact purposes. + */ + @JsonProperty("telephone_number") + private String telephoneNumber; + + /** + * Account identifier for travel rule compliance. If not provided, defaults to portfolio ID. + */ + @JsonProperty("account_id") + private String accountId; + public TravelRuleParty() { } @@ -58,6 +80,10 @@ public TravelRuleParty(Builder builder) { this.walletType = builder.walletType; this.vaspId = builder.vaspId; this.vaspName = builder.vaspName; + this.personalId = builder.personalId; + this.dateOfBirth = builder.dateOfBirth; + this.telephoneNumber = builder.telephoneNumber; + this.accountId = builder.accountId; } public String getName() { return name; @@ -101,6 +127,34 @@ public String getVaspName() { public void setVaspName(String vaspName) { this.vaspName = vaspName; } + public String getPersonalId() { + return personalId; + } + + public void setPersonalId(String personalId) { + this.personalId = personalId; + } + public GoogleTypeDate getDateOfBirth() { + return dateOfBirth; + } + + public void setDateOfBirth(GoogleTypeDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + public String getTelephoneNumber() { + return telephoneNumber; + } + + public void setTelephoneNumber(String telephoneNumber) { + this.telephoneNumber = telephoneNumber; + } + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } public static class Builder { private String name; @@ -114,6 +168,14 @@ public static class Builder { private String vaspName; + private String personalId; + + private GoogleTypeDate dateOfBirth; + + private String telephoneNumber; + + private String accountId; + public Builder name(String name) { this.name = name; return this; @@ -144,6 +206,26 @@ public Builder vaspName(String vaspName) { return this; } + public Builder personalId(String personalId) { + this.personalId = personalId; + return this; + } + + public Builder dateOfBirth(GoogleTypeDate dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + public Builder telephoneNumber(String telephoneNumber) { + this.telephoneNumber = telephoneNumber; + return this; + } + + public Builder accountId(String accountId) { + this.accountId = accountId; + return this; + } + public TravelRuleParty build() { return new TravelRuleParty(this); } diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java new file mode 100644 index 00000000..5107ca52 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -0,0 +1,83 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; + +public class ValidatorAllocation { + /** + * The validator address for performing staking operations + */ + @JsonProperty("validator_address") + private String validatorAddress; + + /** + * Amount for performing staking operations with this validator + */ + @JsonProperty("amount") + private String amount; + + public ValidatorAllocation() { + } + + public ValidatorAllocation(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.amount = builder.amount; + } + public String getValidatorAddress() { + return validatorAddress; + } + + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + public static class Builder { + private String validatorAddress; + + private String amount; + + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public ValidatorAllocation build() { + return new ValidatorAllocation(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java index b01d5a26..d5d192e7 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -19,12 +19,15 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.ValidatorAllocation; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class WalletUnstakeInputs { /** @@ -33,11 +36,18 @@ public class WalletUnstakeInputs { @JsonProperty("amount") private String amount; + /** + * (Alpha) Optional validator-level allocations for ETH V2 unstaking. Allows specifying which validators to unstake from and how much. This feature is in alpha. Please reach out to your Coinbase Prime account manager for more information + */ + @JsonProperty("validator_allocations") + private List validatorAllocations; + public WalletUnstakeInputs() { } public WalletUnstakeInputs(Builder builder) { this.amount = builder.amount; + this.validatorAllocations = builder.validatorAllocations; } public String getAmount() { return amount; @@ -46,14 +56,28 @@ public String getAmount() { public void setAmount(String amount) { this.amount = amount; } + public List getValidatorAllocations() { + return validatorAllocations; + } + + public void setValidatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + } public static class Builder { private String amount; + private List validatorAllocations; + public Builder amount(String amount) { this.amount = amount; return this; } + public Builder validatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + return this; + } + public WalletUnstakeInputs build() { return new WalletUnstakeInputs(this); } diff --git a/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java b/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java index 654a0e5a..bf711359 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java +++ b/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java @@ -26,6 +26,7 @@ public enum RewardSubtype { BLOCK_REWARD, VALIDATOR_REWARD, TRANSACTION_REWARD, - STAKING_FEE_REBATE_REWARD + STAKING_FEE_REBATE_REWARD, + BUIDL_DIVIDEND } diff --git a/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java b/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java index 872cbc20..ea952286 100644 --- a/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java +++ b/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java @@ -18,11 +18,15 @@ import com.coinbase.prime.common.PrimeListRequest; import com.coinbase.prime.model.enums.SortDirection; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; /** * Request for listing onchain address groups for a portfolio. */ public class ListOnchainAddressGroupsRequest extends PrimeListRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore private String portfolioId; public ListOnchainAddressGroupsRequest() { diff --git a/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java b/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java index 15899eb7..3bd9d461 100644 --- a/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java +++ b/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java @@ -44,11 +44,11 @@ public void setPortfolioId(String portfolioId) { this.portfolioId = portfolioId; } - public AddressGroup getAddressGroupId() { + public AddressGroup getAddressGroup() { return addressGroup; } - public void setAddressGroupId(AddressGroup addressGroup) { + public void setAddressGroup(AddressGroup addressGroup) { this.addressGroup = addressGroup; } diff --git a/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java b/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java index 0b6a5005..e08a6270 100644 --- a/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java +++ b/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java @@ -35,6 +35,8 @@ public class AcceptQuoteRequest { private String clientOrderId; @JsonProperty(required = true, value = "quote_id") private String quoteId; + @JsonProperty("settl_currency") + private String settlCurrency; public AcceptQuoteRequest() { } @@ -45,6 +47,7 @@ public AcceptQuoteRequest(Builder builder) { this.side = builder.side; this.clientOrderId = builder.clientOrderId; this.quoteId = builder.quoteId; + this.settlCurrency = builder.settlCurrency; } public String getPortfolioId() { @@ -87,12 +90,21 @@ public void setQuoteId(String quoteId) { this.quoteId = quoteId; } + public String getSettlCurrency() { + return settlCurrency; + } + + public void setSettlCurrency(String settlCurrency) { + this.settlCurrency = settlCurrency; + } + public static class Builder { private String portfolioId; private String productId; private OrderSide side; private String clientOrderId; private String quoteId; + private String settlCurrency; public Builder() { } @@ -122,6 +134,11 @@ public Builder quoteId(String quoteId) { return this; } + public Builder settlCurrency(String settlCurrency) { + this.settlCurrency = settlCurrency; + return this; + } + public AcceptQuoteRequest build() throws CoinbaseClientException { this.validate(); return new AcceptQuoteRequest(this); diff --git a/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java b/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java index eee5f407..e4859f4c 100644 --- a/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java +++ b/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java @@ -16,8 +16,6 @@ package com.coinbase.prime.orders; -import com.fasterxml.jackson.annotation.JsonProperty; - /** * Response object for canceling an order. * @@ -25,7 +23,6 @@ */ public class CancelOrderResponse { /** The ID of the canceled order */ - @JsonProperty("order_id") private String id; public CancelOrderResponse() { diff --git a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java index 118c44ec..5cd8928a 100644 --- a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java +++ b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java @@ -19,6 +19,7 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.OrderType; +import com.coinbase.prime.model.enums.PegOffsetType; import com.coinbase.prime.model.enums.TimeInForceType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -66,7 +67,7 @@ public class CreateOrderRequest { @JsonProperty("post_only") private Boolean postOnly; @JsonProperty("peg_offset_type") - private String pegOffsetType; + private PegOffsetType pegOffsetType; private String offset; @JsonProperty("wig_level") private String wigLevel; @@ -251,11 +252,11 @@ public void setPostOnly(Boolean postOnly) { this.postOnly = postOnly; } - public String getPegOffsetType() { + public PegOffsetType getPegOffsetType() { return pegOffsetType; } - public void setPegOffsetType(String pegOffsetType) { + public void setPegOffsetType(PegOffsetType pegOffsetType) { this.pegOffsetType = pegOffsetType; } @@ -295,7 +296,7 @@ public static class Builder { private String historicalPov; private String settlCurrency; private Boolean postOnly; - private String pegOffsetType; + private PegOffsetType pegOffsetType; private String offset; private String wigLevel; @@ -397,7 +398,7 @@ public Builder postOnly(Boolean postOnly) { return this; } - public Builder pegOffsetType(String pegOffsetType) { + public Builder pegOffsetType(PegOffsetType pegOffsetType) { this.pegOffsetType = pegOffsetType; return this; } diff --git a/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java b/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java index 42e515f9..7230962e 100644 --- a/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java +++ b/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java @@ -39,6 +39,8 @@ public class CreateQuoteRequest { private String quoteValue; @JsonProperty(required = true, value = "limit_price") private String limitPrice; + @JsonProperty("settl_currency") + private String settlCurrency; public CreateQuoteRequest() { } @@ -51,6 +53,7 @@ public CreateQuoteRequest(Builder builder) { this.baseQuantity = builder.baseQuantity; this.quoteValue = builder.quoteValue; this.limitPrice = builder.limitPrice; + this.settlCurrency = builder.settlCurrency; } public String getPortfolioId() { @@ -109,6 +112,14 @@ public void setLimitPrice(String limitPrice) { this.limitPrice = limitPrice; } + public String getSettlCurrency() { + return settlCurrency; + } + + public void setSettlCurrency(String settlCurrency) { + this.settlCurrency = settlCurrency; + } + public static class Builder { private String portfolioId; private String productId; @@ -117,6 +128,7 @@ public static class Builder { private String baseQuantity; private String quoteValue; private String limitPrice; + private String settlCurrency; public Builder() { } @@ -156,6 +168,11 @@ public Builder limitPrice(String limitPrice) { return this; } + public Builder settlCurrency(String settlCurrency) { + this.settlCurrency = settlCurrency; + return this; + } + public CreateQuoteRequest build() throws CoinbaseClientException { this.validate(); return new CreateQuoteRequest(this); diff --git a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java index 488d4217..3cfe9e82 100644 --- a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java +++ b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java @@ -19,6 +19,7 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.OrderType; +import com.coinbase.prime.model.enums.PegOffsetType; import com.coinbase.prime.model.enums.TimeInForceType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -60,7 +61,7 @@ public class GetOrderPreviewRequest { @JsonProperty("display_base_size") private String displayBaseSize; @JsonProperty("peg_offset_type") - private String pegOffsetType; + private PegOffsetType pegOffsetType; private String offset; @JsonProperty("wig_level") private String wigLevel; @@ -227,11 +228,11 @@ public void setDisplayBaseSize(String displayBaseSize) { this.displayBaseSize = displayBaseSize; } - public String getPegOffsetType() { + public PegOffsetType getPegOffsetType() { return pegOffsetType; } - public void setPegOffsetType(String pegOffsetType) { + public void setPegOffsetType(PegOffsetType pegOffsetType) { this.pegOffsetType = pegOffsetType; } @@ -269,7 +270,7 @@ public static class Builder { private Boolean postOnly; private String displayQuoteSize; private String displayBaseSize; - private String pegOffsetType; + private PegOffsetType pegOffsetType; private String offset; private String wigLevel; @@ -361,7 +362,7 @@ public Builder displayBaseSize(String displayBaseSize) { return this; } - public Builder pegOffsetType(String pegOffsetType) { + public Builder pegOffsetType(PegOffsetType pegOffsetType) { this.pegOffsetType = pegOffsetType; return this; } diff --git a/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java b/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java index 4b779214..21c8d76e 100644 --- a/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java +++ b/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java @@ -25,8 +25,6 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Date; - import static com.coinbase.core.utils.Utils.*; public class ListOpenOrdersRequest extends PrimeListRequest { @@ -38,11 +36,11 @@ public class ListOpenOrdersRequest extends PrimeListRequest { @JsonProperty("order_type") private OrderType orderType; @JsonProperty("start_date") - private Date startDate; + private String startDate; @JsonProperty("order_side") private OrderSide orderSide; @JsonProperty("end_date") - private Date endDate; + private String endDate; public ListOpenOrdersRequest() { } @@ -81,11 +79,11 @@ public void setOrderType(OrderType orderType) { this.orderType = orderType; } - public Date getStartDate() { + public String getStartDate() { return startDate; } - public void setStartDate(Date startDate) { + public void setStartDate(String startDate) { this.startDate = startDate; } @@ -97,11 +95,11 @@ public void setOrderSide(OrderSide orderSide) { this.orderSide = orderSide; } - public Date getEndDate() { + public String getEndDate() { return endDate; } - public void setEndDate(Date endDate) { + public void setEndDate(String endDate) { this.endDate = endDate; } @@ -109,9 +107,9 @@ public static class Builder { private String portfolioId; private String[] productIds; private OrderType orderType; - private Date startDate; + private String startDate; private OrderSide orderSide; - private Date endDate; + private String endDate; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -134,7 +132,7 @@ public Builder orderType(OrderType orderType) { return this; } - public Builder startDate(Date startDate) { + public Builder startDate(String startDate) { this.startDate = startDate; return this; } @@ -144,7 +142,7 @@ public Builder orderSide(OrderSide orderSide) { return this; } - public Builder endDate(Date endDate) { + public Builder endDate(String endDate) { this.endDate = endDate; return this; } diff --git a/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java b/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java index fea915a1..5401b88e 100644 --- a/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java +++ b/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java @@ -143,9 +143,6 @@ private void validate() throws CoinbaseClientException { if (isNullOrEmpty(this.rawUnsignedTxn)) { throw new CoinbaseClientException("RawUnsignedTxn cannot be null"); } - if (this.rpc == null) { - throw new CoinbaseClientException("Rpc cannot be null"); - } } } } diff --git a/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java b/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java index e864ce50..20e987bf 100644 --- a/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java +++ b/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java @@ -16,7 +16,6 @@ package com.coinbase.prime.transactions; -import com.coinbase.prime.model.enums.DestinationType; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -43,13 +42,13 @@ public class CreateWalletTransferResponse { private String destinationAddress; /** The type of the destination (e.g., WALLET, EXCHANGE) */ @JsonProperty("destination_type") - private DestinationType destinationType; + private String destinationType; /** The source address for the transfer */ @JsonProperty("source_address") private String sourceAddress; /** The type of the source (e.g., WALLET, EXCHANGE) */ @JsonProperty("source_type") - private DestinationType sourceType; + private String sourceType; /** The unique identifier for the transfer transaction */ @JsonProperty("transaction_id") private String transactionId; @@ -105,11 +104,11 @@ public void setDestinationAddress(String destinationAddress) { this.destinationAddress = destinationAddress; } - public DestinationType getDestinationType() { + public String getDestinationType() { return destinationType; } - public void setDestinationType(DestinationType destinationType) { + public void setDestinationType(String destinationType) { this.destinationType = destinationType; } @@ -121,11 +120,11 @@ public void setSourceAddress(String sourceAddress) { this.sourceAddress = sourceAddress; } - public DestinationType getSourceType() { + public String getSourceType() { return sourceType; } - public void setSourceType(DestinationType sourceType) { + public void setSourceType(String sourceType) { this.sourceType = sourceType; } diff --git a/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java b/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java index 90d8539a..0ccd4770 100644 --- a/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java +++ b/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java @@ -18,7 +18,6 @@ import com.coinbase.prime.model.BlockchainAddress; import com.coinbase.prime.model.CounterpartyDestination; -import com.coinbase.prime.model.enums.DestinationType; import com.fasterxml.jackson.annotation.JsonProperty; public class CreateWalletWithdrawalResponse { @@ -30,9 +29,9 @@ public class CreateWalletWithdrawalResponse { private String amount; private String fee; @JsonProperty("destination_type") - private DestinationType destinationType; + private String destinationType; @JsonProperty("source_type") - private DestinationType sourceType; + private String sourceType; @JsonProperty("blockchain_destination") private BlockchainAddress blockchainDestination; @JsonProperty("counterparty_destination") @@ -85,19 +84,19 @@ public void setFee(String fee) { this.fee = fee; } - public DestinationType getDestinationType() { + public String getDestinationType() { return destinationType; } - public void setDestinationType(DestinationType destinationType) { + public void setDestinationType(String destinationType) { this.destinationType = destinationType; } - public DestinationType getSourceType() { + public String getSourceType() { return sourceType; } - public void setSourceType(DestinationType sourceType) { + public void setSourceType(String sourceType) { this.sourceType = sourceType; } diff --git a/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java b/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java index edce5763..34180dc1 100644 --- a/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java +++ b/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java @@ -20,6 +20,7 @@ import com.coinbase.prime.common.PrimeListRequest; import com.coinbase.prime.common.Pagination; import com.coinbase.prime.model.enums.TransactionType; +import com.coinbase.prime.model.enums.TravelRuleStatus; import com.coinbase.prime.model.enums.SortDirection; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -36,6 +37,10 @@ public class ListPortfolioTransactionsRequest extends PrimeListRequest { private String startTime; @JsonProperty("end_time") private String endTime; + @JsonProperty("get_network_unified_transactions") + private Boolean getNetworkUnifiedTransactions; + @JsonProperty("travel_rule_status") + private TravelRuleStatus[] travelRuleStatus; public ListPortfolioTransactionsRequest() { } @@ -47,6 +52,8 @@ public ListPortfolioTransactionsRequest(Builder builder) { this.types = builder.types; this.startTime = builder.startTime; this.endTime = builder.endTime; + this.getNetworkUnifiedTransactions = builder.getNetworkUnifiedTransactions; + this.travelRuleStatus = builder.travelRuleStatus; } public String getPortfolioId() { @@ -89,12 +96,30 @@ public void setEndTime(String endTime) { this.endTime = endTime; } + public Boolean getGetNetworkUnifiedTransactions() { + return getNetworkUnifiedTransactions; + } + + public void setGetNetworkUnifiedTransactions(Boolean getNetworkUnifiedTransactions) { + this.getNetworkUnifiedTransactions = getNetworkUnifiedTransactions; + } + + public TravelRuleStatus[] getTravelRuleStatus() { + return travelRuleStatus; + } + + public void setTravelRuleStatus(TravelRuleStatus[] travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; + } + public static class Builder { private String portfolioId; private String[] symbols; private TransactionType[] types; private String startTime; private String endTime; + private Boolean getNetworkUnifiedTransactions; + private TravelRuleStatus[] travelRuleStatus; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -127,6 +152,16 @@ public Builder endTime(String endTime) { return this; } + public Builder getNetworkUnifiedTransactions(Boolean getNetworkUnifiedTransactions) { + this.getNetworkUnifiedTransactions = getNetworkUnifiedTransactions; + return this; + } + + public Builder travelRuleStatus(TravelRuleStatus[] travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; + return this; + } + public Builder pagination(Pagination pagination) { this.cursor = pagination.getNextCursor(); this.sortDirection = pagination.getSortDirection(); diff --git a/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java b/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java index 30b676a5..f7e18252 100644 --- a/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java +++ b/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java @@ -22,7 +22,6 @@ public class ListWalletTransactionsResponse { private Transaction[] transactions; private Pagination pagination; - private ListWalletTransactionsRequest request; public ListWalletTransactionsResponse() { } @@ -43,12 +42,4 @@ public void setPagination(Pagination pagination) { this.pagination = pagination; } - public ListWalletTransactionsRequest getRequest() { - return request; - } - - public void setRequest(ListWalletTransactionsRequest request) { - this.request = request; - } - } diff --git a/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java b/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java index b583f637..befe59d3 100644 --- a/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java +++ b/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java @@ -46,9 +46,6 @@ public class SubmitDepositTravelRuleDataRequest { @JsonProperty("is_self") private Boolean isSelf; - @JsonProperty("is_intermediary") - private Boolean isIntermediary; - @JsonProperty("opt_out_of_ownership_verification") private Boolean optOutOfOwnershipVerification; @@ -61,7 +58,6 @@ public SubmitDepositTravelRuleDataRequest(Builder builder) { this.originator = builder.originator; this.beneficiary = builder.beneficiary; this.isSelf = builder.isSelf; - this.isIntermediary = builder.isIntermediary; this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; } @@ -105,14 +101,6 @@ public void setIsSelf(Boolean isSelf) { this.isSelf = isSelf; } - public Boolean getIsIntermediary() { - return isIntermediary; - } - - public void setIsIntermediary(Boolean isIntermediary) { - this.isIntermediary = isIntermediary; - } - public Boolean getOptOutOfOwnershipVerification() { return optOutOfOwnershipVerification; } @@ -127,7 +115,6 @@ public static class Builder { private TravelRuleParty originator; private TravelRuleParty beneficiary; private Boolean isSelf; - private Boolean isIntermediary; private Boolean optOutOfOwnershipVerification; public Builder() { @@ -158,11 +145,6 @@ public Builder isSelf(Boolean isSelf) { return this; } - public Builder isIntermediary(Boolean isIntermediary) { - this.isIntermediary = isIntermediary; - return this; - } - public Builder optOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; return this; diff --git a/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java b/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java index b594111a..0ce46772 100644 --- a/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java +++ b/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java @@ -16,21 +16,21 @@ package com.coinbase.prime.users; -import com.coinbase.prime.model.EntityUser; +import com.coinbase.prime.model.PortfolioUser; import com.coinbase.prime.common.Pagination; public class ListPortfolioUsersResponse { - private EntityUser[] users; + private PortfolioUser[] users; private Pagination pagination; public ListPortfolioUsersResponse() { } - public EntityUser[] getUsers() { + public PortfolioUser[] getUsers() { return users; } - public void setUsers(EntityUser[] users) { + public void setUsers(PortfolioUser[] users) { this.users = users; } diff --git a/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java b/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java index 561e2426..ca3c1afa 100644 --- a/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java @@ -17,6 +17,8 @@ package com.coinbase.prime.wallets; import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.model.Network; +import com.coinbase.prime.model.enums.NetworkFamily; import com.coinbase.prime.model.enums.WalletType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -35,6 +37,14 @@ public class CreateWalletRequest { @JsonProperty("wallet_type") private WalletType type; + @JsonProperty("idempotency_key") + private String idempotencyKey; + + @JsonProperty("network_family") + private NetworkFamily networkFamily; + + private Network network; + public CreateWalletRequest() { } @@ -43,6 +53,9 @@ public CreateWalletRequest(Builder builder) { this.name = builder.name; this.symbol = builder.symbol; this.type = builder.type; + this.idempotencyKey = builder.idempotencyKey; + this.networkFamily = builder.networkFamily; + this.network = builder.network; } public String getPortfolioId() { @@ -77,11 +90,38 @@ public void setType(WalletType type) { this.type = type; } + public String getIdempotencyKey() { + return idempotencyKey; + } + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + public NetworkFamily getNetworkFamily() { + return networkFamily; + } + + public void setNetworkFamily(NetworkFamily networkFamily) { + this.networkFamily = networkFamily; + } + + public Network getNetwork() { + return network; + } + + public void setNetwork(Network network) { + this.network = network; + } + public static class Builder { private String portfolioId; private String name; private String symbol; private WalletType type; + private String idempotencyKey; + private NetworkFamily networkFamily; + private Network network; public Builder() { } @@ -106,6 +146,21 @@ public Builder type(WalletType type) { return this; } + public Builder idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder networkFamily(NetworkFamily networkFamily) { + this.networkFamily = networkFamily; + return this; + } + + public Builder network(Network network) { + this.network = network; + return this; + } + public CreateWalletRequest build() throws CoinbaseClientException { this.validate(); return new CreateWalletRequest(this); @@ -121,9 +176,6 @@ private void validate() throws CoinbaseClientException { if (isNullOrEmpty(this.symbol)) { throw new CoinbaseClientException("Symbol is required"); } - if (this.type == null) { - throw new CoinbaseClientException("Type is required"); - } } } } diff --git a/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java b/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java index ade61318..86451c2f 100644 --- a/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java @@ -18,7 +18,6 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.enums.WalletDepositInstructionType; -import com.coinbase.prime.model.enums.NetworkType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -40,7 +39,7 @@ public class GetWalletDepositInstructionsRequest { private String networkId; @JsonProperty("network.type") - private NetworkType networkType; + private String networkType; public GetWalletDepositInstructionsRequest() { } @@ -85,11 +84,11 @@ public void setNetworkId(String networkId) { this.networkId = networkId; } - public NetworkType getNetworkType() { + public String getNetworkType() { return networkType; } - public void setNetworkType(NetworkType networkType) { + public void setNetworkType(String networkType) { this.networkType = networkType; } @@ -98,7 +97,7 @@ public static class Builder { private String walletId; private WalletDepositInstructionType depositType; private String networkId; - private NetworkType networkType; + private String networkType; public Builder() { } @@ -123,7 +122,7 @@ public GetWalletDepositInstructionsRequest.Builder networkId(String networkId) { return this; } - public GetWalletDepositInstructionsRequest.Builder networkType(NetworkType networkType) { + public GetWalletDepositInstructionsRequest.Builder networkType(String networkType) { this.networkType = networkType; return this; } diff --git a/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java b/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java index 317693f0..eed80f5b 100644 --- a/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java @@ -106,6 +106,11 @@ public Builder sortDirection(SortDirection sortDirection) { return this; } + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + public ListWalletAddressesRequest build() throws CoinbaseClientException { this.validate(); return new ListWalletAddressesRequest(this); @@ -118,9 +123,6 @@ private void validate() throws CoinbaseClientException { if (isNullOrEmpty(this.walletId)) { throw new CoinbaseClientException("Wallet ID is required"); } - if (isNullOrEmpty(this.networkId)) { - throw new CoinbaseClientException("Network ID is required"); - } } } } \ No newline at end of file diff --git a/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java b/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java index 85635288..a59158fb 100644 --- a/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java @@ -35,6 +35,9 @@ public class ListWalletsRequest extends PrimeListRequest { private String[] symbols; + @JsonProperty("get_network_unified_wallets") + private Boolean getNetworkUnifiedWallets; + public ListWalletsRequest() {} public ListWalletsRequest(Builder builder) { @@ -42,6 +45,7 @@ public ListWalletsRequest(Builder builder) { this.portfolioId = builder.portfolioId; this.type = builder.type; this.symbols = builder.symbols; + this.getNetworkUnifiedWallets = builder.getNetworkUnifiedWallets; } public String getPortfolioId() { @@ -68,10 +72,19 @@ public void setSymbols(String[] symbols) { this.symbols = symbols; } + public Boolean getGetNetworkUnifiedWallets() { + return getNetworkUnifiedWallets; + } + + public void setGetNetworkUnifiedWallets(Boolean getNetworkUnifiedWallets) { + this.getNetworkUnifiedWallets = getNetworkUnifiedWallets; + } + public static class Builder { private String portfolioId; private WalletType type; private String[] symbols; + private Boolean getNetworkUnifiedWallets; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -93,6 +106,11 @@ public Builder symbols(String[] symbols) { return this; } + public Builder getNetworkUnifiedWallets(Boolean getNetworkUnifiedWallets) { + this.getNetworkUnifiedWallets = getNetworkUnifiedWallets; + return this; + } + public Builder pagination(Pagination pagination) { this.cursor = pagination.getNextCursor(); this.sortDirection = pagination.getSortDirection(); diff --git a/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java b/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java index 8d17503f..c99bda18 100644 --- a/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java @@ -261,7 +261,7 @@ public void testCancelOrderRequestCreation() throws CoinbaseClientException { @Test public void testCancelOrderResponseDeserialization() throws JsonProcessingException { - String json = "{\"order_id\":\"order-789\"}"; + String json = "{\"id\":\"order-789\"}"; CancelOrderResponse response = objectMapper.readValue(json, CancelOrderResponse.class); diff --git a/tools/model-generator/.openapi-generator-ignore b/tools/model-generator/.openapi-generator-ignore index 139bc152..c1c56ea1 100644 --- a/tools/model-generator/.openapi-generator-ignore +++ b/tools/model-generator/.openapi-generator-ignore @@ -6,8 +6,9 @@ src/main/java/com/coinbase/prime/model/*Request.java src/main/java/com/coinbase/prime/model/*Response.java -# Google infrastructure types -src/main/java/com/coinbase/prime/model/Google*.java +# Google infrastructure types (except GoogleTypeDate which is used) +src/main/java/com/coinbase/prime/model/GoogleProtobuf*.java +src/main/java/com/coinbase/prime/model/GoogleRpc*.java # Inline schemas src/main/java/com/coinbase/prime/model/RFQ.java @@ -21,6 +22,7 @@ src/main/java/com/coinbase/prime/model/*AnyOf*.java src/main/java/com/coinbase/prime/model/*RequestIsARequestTo*.java src/main/java/com/coinbase/prime/model/ChangeOnchainAddressGroupRequestIsARequestToCreateOrUpdateANewOnchainAddressGroup.java src/main/java/com/coinbase/prime/model/CreateATransferBetweenTwoWallets.java +src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java # Abstract schemas src/main/java/com/coinbase/prime/model/AbstractOpenApiSchema.java From d6b44a29bf02c0dfc859b8d82f5786eae77093e0 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Tue, 17 Feb 2026 14:46:28 -0800 Subject: [PATCH 2/8] clean up remaining changes and add CHANGELOG entry --- CHANGELOG.md | 63 +++++++++++++++++++ pom.xml | 2 +- .../coinbase/prime/model/GoogleTypeDate.java | 5 -- .../prime/model/ValidatorAllocation.java | 5 -- .../prime/model/WalletUnstakeInputs.java | 1 - .../wallets/ListWalletAddressesRequest.java | 2 +- 6 files changed, 65 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a8c105e..21270ffb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,68 @@ # Changelog +## [1.7.0] - 2026-02-17 + +### Added + +#### New Endpoints +- **Futures Service** + - `getFcmEquity` - Get FCM equity information for an entity + +#### New Models +- `ValidatorAllocation` - Validator-level allocation for ETH V2 unstaking + +#### New Enums +- `PegOffsetType` - Peg offset types for PEG orders (PRICE, BPS, DEPTH) +- `NetworkFamily` - Network family types for wallet creation + +#### New Examples +- `GetFcmEquity.java` - FCM equity retrieval example + +### Changed + +#### Breaking Changes +- `ListOpenOrdersRequest` - `startDate`/`endDate` type changed from `Date` to `String` to match spec +- `CreateOrderRequest` / `GetOrderPreviewRequest` - `pegOffsetType` changed from `String` to `PegOffsetType` enum +- `CreateWalletTransferResponse` / `CreateWalletWithdrawalResponse` - `destinationType`/`sourceType` changed from `DestinationType` enum to `String` to match spec +- `ListPortfolioUsersResponse` - Changed from `EntityUser[]` to `PortfolioUser[]` to match spec +- `GetPositionsResponse` - Changed from `Position[]` to `FcmPosition[]` to match spec +- `ListExistingLocatesResponse` - Changed from `Locate[]` to `ExistingLocate[]` to match spec +- `CancelOrderResponse` - JSON field mapping changed from `order_id` to `id` to match spec +- `SubmitDepositTravelRuleDataRequest` - Removed `isIntermediary` field (not in spec) +- `ListWalletTransactionsResponse` - Removed `request` field +- `UpdateOnchainAddressBookEntryRequest` - Renamed `getAddressGroupId`/`setAddressGroupId` to `getAddressGroup`/`setAddressGroup` + +#### New Fields +- `ListEntityActivitiesRequest` / `ListPortfolioActivitiesRequest` - Added `getNetworkUnifiedActivities` +- `CreateAddressBookEntryRequest` - Added `chainIds` +- `ListOnchainWalletBalancesResponse` - Added `defiBalances` +- `ListPortfolioBalancesResponse` - Added `primeCustodyBalances` +- `CreateNewLocatesRequest` - Added `conversionDate` +- `GetPortfolioCreditInformationResponse` - Added `@JsonProperty("post_trade_credit")` annotation +- `ScheduleEntityFuturesSweepRequest` - Added `amount` and `currency` builder methods +- `TravelRuleData` - Added `attestVerifiedWalletOwnership` +- `TravelRuleParty` - Added `personalId`, `dateOfBirth`, `telephoneNumber`, `accountId` +- `WalletUnstakeInputs` - Added `validatorAllocations` +- `ListOnchainAddressGroupsRequest` - Added `@JsonProperty`/`@JsonIgnore` annotations on `portfolioId` +- `AcceptQuoteRequest` / `CreateQuoteRequest` - Added `settlCurrency` +- `ListPortfolioTransactionsRequest` - Added `getNetworkUnifiedTransactions`, `travelRuleStatus` +- `CreateWalletRequest` - Added `idempotencyKey`, `networkFamily`, `network` +- `ListWalletsRequest` - Added `getNetworkUnifiedWallets` +- `ListWalletAddressesRequest` - Added `limit` builder method +- `RewardSubtype` enum - Added `BUIDL_DIVIDEND` + +#### Relaxed Validations +- `CreateWalletRequest` - `wallet_type` no longer required (optional per spec) +- `ListWalletAddressesRequest` - `networkId` no longer required (optional per spec) +- `CreateOnchainTransactionRequest` - `rpc` no longer required (optional per spec) + +### Fixed +- `FinancingServiceImpl` - Fixed URL path from `/entities/{id}/locates/locates_availability` to `/entities/{id}/locates_availability` +- `ListInterestAccrualsForPortfolioRequest` - Fixed typo `prtfolioId` → `portfolioId` in builder method +- `ListInterestAccrualsForPortfolioRequest` - Added missing `build()` method to Builder +- `GetPortfolioActivityRequest` - Removed incorrect `PrimeListRequest` inheritance (single-item request, not a list) +- `GetWalletDepositInstructionsRequest` - Changed `networkType` from `NetworkType` enum to `String` to match spec + ## [1.6.2] - 2026-01-12 ### Added diff --git a/pom.xml b/pom.xml index 830dd005..5843bd10 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ Sample Java SDK for the Coinbase Prime REST APIs com.coinbase.prime https://github.com/coinbase-samples/prime-sdk-java - 1.6.3 + 1.7.0 Apache License, Version 2.0 diff --git a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java index 15d26bed..9bebae3f 100644 --- a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java +++ b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java @@ -19,12 +19,7 @@ */ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; public class GoogleTypeDate { /** diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java index 5107ca52..491cc29e 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -19,12 +19,7 @@ */ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; public class ValidatorAllocation { /** diff --git a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java index d5d192e7..14adb884 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -25,7 +25,6 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java b/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java index eed80f5b..b89c2285 100644 --- a/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java @@ -125,4 +125,4 @@ private void validate() throws CoinbaseClientException { } } } -} \ No newline at end of file +} From 4470cc7eb5503fbabccc00e70f65968a420bc416 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Tue, 17 Feb 2026 15:18:03 -0800 Subject: [PATCH 3/8] update the license header --- src/main/java/com/coinbase/examples/futures/GetFcmEquity.java | 2 +- .../java/com/coinbase/prime/futures/GetFcmEquityRequest.java | 2 +- .../java/com/coinbase/prime/futures/GetFcmEquityResponse.java | 2 +- src/main/java/com/coinbase/prime/model/GoogleTypeDate.java | 2 +- src/main/java/com/coinbase/prime/model/ValidatorAllocation.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java b/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java index 5c482c83..4ff6591f 100644 --- a/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java +++ b/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java @@ -1,5 +1,5 @@ /* - * Copyright 2025-present Coinbase Global, Inc. + * Copyright 2026-present Coinbase Global, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java b/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java index 79883375..6d6f8801 100644 --- a/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2025-present Coinbase Global, Inc. + * Copyright 2026-present Coinbase Global, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java index e0136092..468a97b6 100644 --- a/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2025-present Coinbase Global, Inc. + * Copyright 2026-present Coinbase Global, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java index 9bebae3f..f3120fd6 100644 --- a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java +++ b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java @@ -1,5 +1,5 @@ /* - * Copyright 2025-present Coinbase Global, Inc. + * Copyright 2026-present Coinbase Global, Inc. * * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator * diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java index 491cc29e..0caec860 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2025-present Coinbase Global, Inc. + * Copyright 2026-present Coinbase Global, Inc. * * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator * From e4a5254475841d4e68842a886e8a39d05b43e0d2 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Wed, 18 Feb 2026 08:34:34 -0800 Subject: [PATCH 4/8] fix CHANGELOG accuracy: move post_trade_credit to Fixed, remove pre-existing enums, add GoogleTypeDate --- CHANGELOG.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21270ffb..b6a36fd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,7 @@ #### New Models - `ValidatorAllocation` - Validator-level allocation for ETH V2 unstaking - -#### New Enums -- `PegOffsetType` - Peg offset types for PEG orders (PRICE, BPS, DEPTH) -- `NetworkFamily` - Network family types for wallet creation +- `GoogleTypeDate` - Google date type for travel rule date of birth fields #### New Examples - `GetFcmEquity.java` - FCM equity retrieval example @@ -38,7 +35,6 @@ - `ListOnchainWalletBalancesResponse` - Added `defiBalances` - `ListPortfolioBalancesResponse` - Added `primeCustodyBalances` - `CreateNewLocatesRequest` - Added `conversionDate` -- `GetPortfolioCreditInformationResponse` - Added `@JsonProperty("post_trade_credit")` annotation - `ScheduleEntityFuturesSweepRequest` - Added `amount` and `currency` builder methods - `TravelRuleData` - Added `attestVerifiedWalletOwnership` - `TravelRuleParty` - Added `personalId`, `dateOfBirth`, `telephoneNumber`, `accountId` @@ -57,6 +53,7 @@ - `CreateOnchainTransactionRequest` - `rpc` no longer required (optional per spec) ### Fixed +- `GetPortfolioCreditInformationResponse` - Added missing `@JsonProperty("post_trade_credit")` annotation for correct deserialization - `FinancingServiceImpl` - Fixed URL path from `/entities/{id}/locates/locates_availability` to `/entities/{id}/locates_availability` - `ListInterestAccrualsForPortfolioRequest` - Fixed typo `prtfolioId` → `portfolioId` in builder method - `ListInterestAccrualsForPortfolioRequest` - Added missing `build()` method to Builder From 439d0bfaf11ed1171343f620b729fab0683b1c54 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Fri, 20 Feb 2026 22:00:08 -0700 Subject: [PATCH 5/8] address review: use primitive boolean instead of Boolean wrapper Configure model generator type mapping and regenerate models. Add boolean convention to CLAUDE.md. --- CLAUDE.md | 1 + .../model/ActivityMetadataConsensus.java | 10 +- .../prime/model/AdvancedTransfer.java | 137 ++++++++++++++++++ .../java/com/coinbase/prime/model/Asset.java | 10 +- .../prime/model/BlindMatchMetadata.java | 122 ++++++++++++++++ .../model/CreateAllocationResponseBody.java | 10 +- .../CreateNetAllocationResponseBody.java | 10 +- .../com/coinbase/prime/model/EvmParams.java | 20 +-- .../coinbase/prime/model/FundMovement.java | 132 +++++++++++++++++ .../coinbase/prime/model/FuturesSweep.java | 10 +- .../coinbase/prime/model/GoogleTypeDate.java | 7 +- .../coinbase/prime/model/MarginSummary.java | 30 ++-- .../coinbase/prime/model/NetworkDetails.java | 50 +++---- .../model/OnchainTransactionDetails.java | 10 +- .../java/com/coinbase/prime/model/Order.java | 20 +-- .../com/coinbase/prime/model/PmAssetInfo.java | 10 +- .../model/PostTradeCreditInformation.java | 20 +-- .../prime/model/RfqProductDetails.java | 10 +- .../coinbase/prime/model/RiskAssessment.java | 20 +-- .../com/coinbase/prime/model/RpcConfig.java | 10 +- .../coinbase/prime/model/TravelRuleData.java | 40 ++--- .../prime/model/ValidatorAllocation.java | 7 +- .../prime/model/WalletUnstakeInputs.java | 1 + .../com/coinbase/prime/model/XmPosition.java | 10 +- .../model/enums/AdvancedTransferState.java | 31 ++++ .../model/enums/AdvancedTransferType.java | 26 ++++ .../modelgenerator/OpenApiGenerator.java | 5 + 27 files changed, 617 insertions(+), 152 deletions(-) create mode 100644 src/main/java/com/coinbase/prime/model/AdvancedTransfer.java create mode 100644 src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java create mode 100644 src/main/java/com/coinbase/prime/model/FundMovement.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java diff --git a/CLAUDE.md b/CLAUDE.md index 6a1c9fbc..5b822b8c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -296,6 +296,7 @@ Each OpenAPI operation should generate: #### Naming Conventions - **Classes**: PascalCase (e.g., `CreateAllocationRequest`) - **Properties**: camelCase with Jackson annotation mapping (e.g., `@JsonProperty("portfolio_id") private String portfolioId`) +- **Booleans**: Use primitive `boolean` (not `Boolean` wrapper). The model generator is configured with `typeMappings("boolean" -> "boolean")` to enforce this for generated models. Hand-crafted request/response classes should follow the same convention. - **Enums**: Use standard OpenAPI names (e.g., `FCM_MARGIN_CALL_STATE_CLOSED`) - Jackson handles serialization - **Methods**: camelCase matching operation name diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java index fa853776..1bde00e9 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java @@ -37,7 +37,7 @@ public class ActivityMetadataConsensus { * If activity has passed consensus threshold */ @JsonProperty("has_passed_consensus") - private Boolean hasPassedConsensus; + private boolean hasPassedConsensus; public ActivityMetadataConsensus() { } @@ -53,24 +53,24 @@ public String getApprovalDeadline() { public void setApprovalDeadline(String approvalDeadline) { this.approvalDeadline = approvalDeadline; } - public Boolean getHasPassedConsensus() { + public boolean getHasPassedConsensus() { return hasPassedConsensus; } - public void setHasPassedConsensus(Boolean hasPassedConsensus) { + public void setHasPassedConsensus(boolean hasPassedConsensus) { this.hasPassedConsensus = hasPassedConsensus; } public static class Builder { private String approvalDeadline; - private Boolean hasPassedConsensus; + private boolean hasPassedConsensus; public Builder approvalDeadline(String approvalDeadline) { this.approvalDeadline = approvalDeadline; return this; } - public Builder hasPassedConsensus(Boolean hasPassedConsensus) { + public Builder hasPassedConsensus(boolean hasPassedConsensus) { this.hasPassedConsensus = hasPassedConsensus; return this; } diff --git a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java new file mode 100644 index 00000000..51e8a5dd --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java @@ -0,0 +1,137 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.AdvancedTransferState; +import com.coinbase.prime.model.enums.AdvancedTransferType; +import com.coinbase.prime.model.BlindMatchMetadata; +import com.coinbase.prime.model.FundMovement; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class AdvancedTransfer { + @JsonProperty("id") + private String id; + + @JsonProperty("type") + private AdvancedTransferType type; + + @JsonProperty("state") + private AdvancedTransferState state; + + @JsonProperty("fund_movements") + private List fundMovements; + + @JsonProperty("blind_match_metadata") + private BlindMatchMetadata blindMatchMetadata; + + public AdvancedTransfer() { + } + + public AdvancedTransfer(Builder builder) { + this.id = builder.id; + this.type = builder.type; + this.state = builder.state; + this.fundMovements = builder.fundMovements; + this.blindMatchMetadata = builder.blindMatchMetadata; + } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public AdvancedTransferType getType() { + return type; + } + + public void setType(AdvancedTransferType type) { + this.type = type; + } + public AdvancedTransferState getState() { + return state; + } + + public void setState(AdvancedTransferState state) { + this.state = state; + } + public List getFundMovements() { + return fundMovements; + } + + public void setFundMovements(List fundMovements) { + this.fundMovements = fundMovements; + } + public BlindMatchMetadata getBlindMatchMetadata() { + return blindMatchMetadata; + } + + public void setBlindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { + this.blindMatchMetadata = blindMatchMetadata; + } + public static class Builder { + private String id; + + private AdvancedTransferType type; + + private AdvancedTransferState state; + + private List fundMovements; + + private BlindMatchMetadata blindMatchMetadata; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder type(AdvancedTransferType type) { + this.type = type; + return this; + } + + public Builder state(AdvancedTransferState state) { + this.state = state; + return this; + } + + public Builder fundMovements(List fundMovements) { + this.fundMovements = fundMovements; + return this; + } + + public Builder blindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { + this.blindMatchMetadata = blindMatchMetadata; + return this; + } + + public AdvancedTransfer build() { + return new AdvancedTransfer(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/Asset.java b/src/main/java/com/coinbase/prime/model/Asset.java index 60240611..66807a0c 100644 --- a/src/main/java/com/coinbase/prime/model/Asset.java +++ b/src/main/java/com/coinbase/prime/model/Asset.java @@ -52,7 +52,7 @@ public class Asset { * Indicates whether this asset can be traded */ @JsonProperty("trading_supported") - private Boolean tradingSupported; + private boolean tradingSupported; /** * Base URL to our recommended block explorer (crypto only) @@ -98,11 +98,11 @@ public String getDecimalPrecision() { public void setDecimalPrecision(String decimalPrecision) { this.decimalPrecision = decimalPrecision; } - public Boolean getTradingSupported() { + public boolean getTradingSupported() { return tradingSupported; } - public void setTradingSupported(Boolean tradingSupported) { + public void setTradingSupported(boolean tradingSupported) { this.tradingSupported = tradingSupported; } public String getExplorerUrl() { @@ -126,7 +126,7 @@ public static class Builder { private String decimalPrecision; - private Boolean tradingSupported; + private boolean tradingSupported; private String explorerUrl; @@ -147,7 +147,7 @@ public Builder decimalPrecision(String decimalPrecision) { return this; } - public Builder tradingSupported(Boolean tradingSupported) { + public Builder tradingSupported(boolean tradingSupported) { this.tradingSupported = tradingSupported; return this; } diff --git a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java new file mode 100644 index 00000000..2d1d394f --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java @@ -0,0 +1,122 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; + +public class BlindMatchMetadata { + @JsonProperty("reference_id") + private String referenceId; + + /** + * The intended time of Transfer settlement in YYYYMMDD format + */ + @JsonProperty("settlement_date") + private String settlementDate; + + /** + * Optional date of the original Trade in YYYYMMMDD format + */ + @JsonProperty("trade_date") + private String tradeDate; + + /** + * Optional time of transfer settlement in HHMM format in UTC. If not provided, it defaults to 09:30 Eastern Time. + */ + @JsonProperty("settlement_time") + private String settlementTime; + + public BlindMatchMetadata() { + } + + public BlindMatchMetadata(Builder builder) { + this.referenceId = builder.referenceId; + this.settlementDate = builder.settlementDate; + this.tradeDate = builder.tradeDate; + this.settlementTime = builder.settlementTime; + } + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + public String getSettlementDate() { + return settlementDate; + } + + public void setSettlementDate(String settlementDate) { + this.settlementDate = settlementDate; + } + public String getTradeDate() { + return tradeDate; + } + + public void setTradeDate(String tradeDate) { + this.tradeDate = tradeDate; + } + public String getSettlementTime() { + return settlementTime; + } + + public void setSettlementTime(String settlementTime) { + this.settlementTime = settlementTime; + } + public static class Builder { + private String referenceId; + + private String settlementDate; + + private String tradeDate; + + private String settlementTime; + + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + public Builder settlementDate(String settlementDate) { + this.settlementDate = settlementDate; + return this; + } + + public Builder tradeDate(String tradeDate) { + this.tradeDate = tradeDate; + return this; + } + + public Builder settlementTime(String settlementTime) { + this.settlementTime = settlementTime; + return this; + } + + public BlindMatchMetadata build() { + return new BlindMatchMetadata(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java index d08f8098..8966673a 100644 --- a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java @@ -31,7 +31,7 @@ public class CreateAllocationResponseBody { * The success boolean for the post allocation */ @JsonProperty("success") - private Boolean success; + private boolean success; /** * The allocation id for the post allocation @@ -53,11 +53,11 @@ public CreateAllocationResponseBody(Builder builder) { this.allocationId = builder.allocationId; this.failureReason = builder.failureReason; } - public Boolean getSuccess() { + public boolean getSuccess() { return success; } - public void setSuccess(Boolean success) { + public void setSuccess(boolean success) { this.success = success; } public String getAllocationId() { @@ -75,13 +75,13 @@ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } public static class Builder { - private Boolean success; + private boolean success; private String allocationId; private String failureReason; - public Builder success(Boolean success) { + public Builder success(boolean success) { this.success = success; return this; } diff --git a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java index f6a7f0fa..5945f1d8 100644 --- a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java @@ -31,7 +31,7 @@ public class CreateNetAllocationResponseBody { * The success boolean for the post net allocation */ @JsonProperty("success") - private Boolean success; + private boolean success; /** * The netting_id for the post net allocation @@ -67,11 +67,11 @@ public CreateNetAllocationResponseBody(Builder builder) { this.sellAllocationId = builder.sellAllocationId; this.failureReason = builder.failureReason; } - public Boolean getSuccess() { + public boolean getSuccess() { return success; } - public void setSuccess(Boolean success) { + public void setSuccess(boolean success) { this.success = success; } public String getNettingId() { @@ -103,7 +103,7 @@ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } public static class Builder { - private Boolean success; + private boolean success; private String nettingId; @@ -113,7 +113,7 @@ public static class Builder { private String failureReason; - public Builder success(Boolean success) { + public Builder success(boolean success) { this.success = success; return this; } diff --git a/src/main/java/com/coinbase/prime/model/EvmParams.java b/src/main/java/com/coinbase/prime/model/EvmParams.java index bc186abc..6476c469 100644 --- a/src/main/java/com/coinbase/prime/model/EvmParams.java +++ b/src/main/java/com/coinbase/prime/model/EvmParams.java @@ -31,13 +31,13 @@ public class EvmParams { * Option to disable dynamic gas price adjustment for EVM transactions prior to signing and broadcast. Defaults to false. */ @JsonProperty("disable_dynamic_gas") - private Boolean disableDynamicGas; + private boolean disableDynamicGas; /** * Option to disable dynamic nonce when creating a transaction. Defaults to false. */ @JsonProperty("disable_dynamic_nonce") - private Boolean disableDynamicNonce; + private boolean disableDynamicNonce; /** * Transaction ID to replace (for speed-up/cancel operations). Common use cases: 1) Gas Price Adjustments: When a transaction is stuck due to low gas price, a new transaction with the same nonce but higher gas price can be submitted to replace it. 2) Transaction Cancellation: A user might want to cancel a pending transaction by replacing it with a new transaction (often a 0-value transfer to themselves with higher gas price). Note: When using this field, the disable_dynamic_nonce option must be set to false because the nonce would be automatically managed by the system. @@ -67,18 +67,18 @@ public EvmParams(Builder builder) { this.chainId = builder.chainId; this.networkName = builder.networkName; } - public Boolean getDisableDynamicGas() { + public boolean getDisableDynamicGas() { return disableDynamicGas; } - public void setDisableDynamicGas(Boolean disableDynamicGas) { + public void setDisableDynamicGas(boolean disableDynamicGas) { this.disableDynamicGas = disableDynamicGas; } - public Boolean getDisableDynamicNonce() { + public boolean getDisableDynamicNonce() { return disableDynamicNonce; } - public void setDisableDynamicNonce(Boolean disableDynamicNonce) { + public void setDisableDynamicNonce(boolean disableDynamicNonce) { this.disableDynamicNonce = disableDynamicNonce; } public String getReplacedTransactionId() { @@ -103,9 +103,9 @@ public void setNetworkName(String networkName) { this.networkName = networkName; } public static class Builder { - private Boolean disableDynamicGas; + private boolean disableDynamicGas; - private Boolean disableDynamicNonce; + private boolean disableDynamicNonce; private String replacedTransactionId; @@ -113,12 +113,12 @@ public static class Builder { private String networkName; - public Builder disableDynamicGas(Boolean disableDynamicGas) { + public Builder disableDynamicGas(boolean disableDynamicGas) { this.disableDynamicGas = disableDynamicGas; return this; } - public Builder disableDynamicNonce(Boolean disableDynamicNonce) { + public Builder disableDynamicNonce(boolean disableDynamicNonce) { this.disableDynamicNonce = disableDynamicNonce; return this; } diff --git a/src/main/java/com/coinbase/prime/model/FundMovement.java b/src/main/java/com/coinbase/prime/model/FundMovement.java new file mode 100644 index 00000000..0157ea1b --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/FundMovement.java @@ -0,0 +1,132 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.TransferLocation; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; + +public class FundMovement { + @JsonProperty("id") + private String id; + + @JsonProperty("source") + private TransferLocation source; + + @JsonProperty("target") + private TransferLocation target; + + @JsonProperty("currency") + private String currency; + + @JsonProperty("amount") + private String amount; + + public FundMovement() { + } + + public FundMovement(Builder builder) { + this.id = builder.id; + this.source = builder.source; + this.target = builder.target; + this.currency = builder.currency; + this.amount = builder.amount; + } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public TransferLocation getSource() { + return source; + } + + public void setSource(TransferLocation source) { + this.source = source; + } + public TransferLocation getTarget() { + return target; + } + + public void setTarget(TransferLocation target) { + this.target = target; + } + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + public static class Builder { + private String id; + + private TransferLocation source; + + private TransferLocation target; + + private String currency; + + private String amount; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder source(TransferLocation source) { + this.source = source; + return this; + } + + public Builder target(TransferLocation target) { + this.target = target; + return this; + } + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public FundMovement build() { + return new FundMovement(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/FuturesSweep.java b/src/main/java/com/coinbase/prime/model/FuturesSweep.java index 12c2d15e..2ae98206 100644 --- a/src/main/java/com/coinbase/prime/model/FuturesSweep.java +++ b/src/main/java/com/coinbase/prime/model/FuturesSweep.java @@ -43,7 +43,7 @@ public class FuturesSweep { * Should sweep all */ @JsonProperty("should_sweep_all") - private Boolean shouldSweepAll; + private boolean shouldSweepAll; @JsonProperty("status") private FuturesSweepStatus status; @@ -78,11 +78,11 @@ public SweepAmount getRequestedAmount() { public void setRequestedAmount(SweepAmount requestedAmount) { this.requestedAmount = requestedAmount; } - public Boolean getShouldSweepAll() { + public boolean getShouldSweepAll() { return shouldSweepAll; } - public void setShouldSweepAll(Boolean shouldSweepAll) { + public void setShouldSweepAll(boolean shouldSweepAll) { this.shouldSweepAll = shouldSweepAll; } public FuturesSweepStatus getStatus() { @@ -104,7 +104,7 @@ public static class Builder { private SweepAmount requestedAmount; - private Boolean shouldSweepAll; + private boolean shouldSweepAll; private FuturesSweepStatus status; @@ -120,7 +120,7 @@ public Builder requestedAmount(SweepAmount requestedAmount) { return this; } - public Builder shouldSweepAll(Boolean shouldSweepAll) { + public Builder shouldSweepAll(boolean shouldSweepAll) { this.shouldSweepAll = shouldSweepAll; return this; } diff --git a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java index f3120fd6..15d26bed 100644 --- a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java +++ b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java @@ -1,5 +1,5 @@ /* - * Copyright 2026-present Coinbase Global, Inc. + * Copyright 2025-present Coinbase Global, Inc. * * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator * @@ -19,7 +19,12 @@ */ package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; public class GoogleTypeDate { /** diff --git a/src/main/java/com/coinbase/prime/model/MarginSummary.java b/src/main/java/com/coinbase/prime/model/MarginSummary.java index 3952b0d1..1c9c6338 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummary.java @@ -104,7 +104,7 @@ public class MarginSummary { * Whether or not a entity is frozen due to balance outstanding or other reason */ @JsonProperty("frozen") - private Boolean frozen; + private boolean frozen; /** * The reason why a entity is frozen @@ -116,13 +116,13 @@ public class MarginSummary { * Whether TF is enabled for the entity. This field is deprecated and will be removed in the future. */ @JsonProperty("tf_enabled") - private Boolean tfEnabled; + private boolean tfEnabled; /** * Whether PM is enabled for the entity */ @JsonProperty("pm_enabled") - private Boolean pmEnabled; + private boolean pmEnabled; /** * Market rates for the list of assets @@ -337,11 +337,11 @@ public String getTfAdjustedEquity() { public void setTfAdjustedEquity(String tfAdjustedEquity) { this.tfAdjustedEquity = tfAdjustedEquity; } - public Boolean getFrozen() { + public boolean getFrozen() { return frozen; } - public void setFrozen(Boolean frozen) { + public void setFrozen(boolean frozen) { this.frozen = frozen; } public String getFrozenReason() { @@ -351,18 +351,18 @@ public String getFrozenReason() { public void setFrozenReason(String frozenReason) { this.frozenReason = frozenReason; } - public Boolean getTfEnabled() { + public boolean getTfEnabled() { return tfEnabled; } - public void setTfEnabled(Boolean tfEnabled) { + public void setTfEnabled(boolean tfEnabled) { this.tfEnabled = tfEnabled; } - public Boolean getPmEnabled() { + public boolean getPmEnabled() { return pmEnabled; } - public void setPmEnabled(Boolean pmEnabled) { + public void setPmEnabled(boolean pmEnabled) { this.pmEnabled = pmEnabled; } public List getMarketRates() { @@ -507,13 +507,13 @@ public static class Builder { private String tfAdjustedEquity; - private Boolean frozen; + private boolean frozen; private String frozenReason; - private Boolean tfEnabled; + private boolean tfEnabled; - private Boolean pmEnabled; + private boolean pmEnabled; private List marketRates; @@ -604,7 +604,7 @@ public Builder tfAdjustedEquity(String tfAdjustedEquity) { return this; } - public Builder frozen(Boolean frozen) { + public Builder frozen(boolean frozen) { this.frozen = frozen; return this; } @@ -614,12 +614,12 @@ public Builder frozenReason(String frozenReason) { return this; } - public Builder tfEnabled(Boolean tfEnabled) { + public Builder tfEnabled(boolean tfEnabled) { this.tfEnabled = tfEnabled; return this; } - public Builder pmEnabled(Boolean pmEnabled) { + public Builder pmEnabled(boolean pmEnabled) { this.pmEnabled = pmEnabled; return this; } diff --git a/src/main/java/com/coinbase/prime/model/NetworkDetails.java b/src/main/java/com/coinbase/prime/model/NetworkDetails.java index 2661493e..249fedd5 100644 --- a/src/main/java/com/coinbase/prime/model/NetworkDetails.java +++ b/src/main/java/com/coinbase/prime/model/NetworkDetails.java @@ -47,31 +47,31 @@ public class NetworkDetails { * Indicates whether this network is the default network for the asset */ @JsonProperty("default") - private Boolean _default; + private boolean _default; /** * Indicates whether this network supports trading */ @JsonProperty("trading_supported") - private Boolean tradingSupported; + private boolean tradingSupported; /** * Indicates whether this network supports vault */ @JsonProperty("vault_supported") - private Boolean vaultSupported; + private boolean vaultSupported; /** * Indicates whether this network supports prime custody */ @JsonProperty("prime_custody_supported") - private Boolean primeCustodySupported; + private boolean primeCustodySupported; /** * Indicates whether this network requires a destination tag */ @JsonProperty("destination_tag_required") - private Boolean destinationTagRequired; + private boolean destinationTagRequired; /** * Base URL to our recommended block explorer (crypto only) @@ -121,39 +121,39 @@ public String getMaxDecimals() { public void setMaxDecimals(String maxDecimals) { this.maxDecimals = maxDecimals; } - public Boolean getDefault() { + public boolean getDefault() { return _default; } - public void setDefault(Boolean _default) { + public void setDefault(boolean _default) { this._default = _default; } - public Boolean getTradingSupported() { + public boolean getTradingSupported() { return tradingSupported; } - public void setTradingSupported(Boolean tradingSupported) { + public void setTradingSupported(boolean tradingSupported) { this.tradingSupported = tradingSupported; } - public Boolean getVaultSupported() { + public boolean getVaultSupported() { return vaultSupported; } - public void setVaultSupported(Boolean vaultSupported) { + public void setVaultSupported(boolean vaultSupported) { this.vaultSupported = vaultSupported; } - public Boolean getPrimeCustodySupported() { + public boolean getPrimeCustodySupported() { return primeCustodySupported; } - public void setPrimeCustodySupported(Boolean primeCustodySupported) { + public void setPrimeCustodySupported(boolean primeCustodySupported) { this.primeCustodySupported = primeCustodySupported; } - public Boolean getDestinationTagRequired() { + public boolean getDestinationTagRequired() { return destinationTagRequired; } - public void setDestinationTagRequired(Boolean destinationTagRequired) { + public void setDestinationTagRequired(boolean destinationTagRequired) { this.destinationTagRequired = destinationTagRequired; } public String getNetworkLink() { @@ -177,15 +177,15 @@ public static class Builder { private String maxDecimals; - private Boolean _default; + private boolean _default; - private Boolean tradingSupported; + private boolean tradingSupported; - private Boolean vaultSupported; + private boolean vaultSupported; - private Boolean primeCustodySupported; + private boolean primeCustodySupported; - private Boolean destinationTagRequired; + private boolean destinationTagRequired; private String networkLink; @@ -206,27 +206,27 @@ public Builder maxDecimals(String maxDecimals) { return this; } - public Builder _default(Boolean _default) { + public Builder _default(boolean _default) { this._default = _default; return this; } - public Builder tradingSupported(Boolean tradingSupported) { + public Builder tradingSupported(boolean tradingSupported) { this.tradingSupported = tradingSupported; return this; } - public Builder vaultSupported(Boolean vaultSupported) { + public Builder vaultSupported(boolean vaultSupported) { this.vaultSupported = vaultSupported; return this; } - public Builder primeCustodySupported(Boolean primeCustodySupported) { + public Builder primeCustodySupported(boolean primeCustodySupported) { this.primeCustodySupported = primeCustodySupported; return this; } - public Builder destinationTagRequired(Boolean destinationTagRequired) { + public Builder destinationTagRequired(boolean destinationTagRequired) { this.destinationTagRequired = destinationTagRequired; return this; } diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java index ee023365..fadc12f3 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java @@ -66,7 +66,7 @@ public class OnchainTransactionDetails { * If set to true, the transaction will not be broadcast to the network. You can still retrieve the signed transaction from the GetTransaction endpoint by transaction ID once the transaction is created. */ @JsonProperty("skip_broadcast") - private Boolean skipBroadcast; + private boolean skipBroadcast; /** * Reason for transaction failure if applicable @@ -133,11 +133,11 @@ public String getDestinationAddress() { public void setDestinationAddress(String destinationAddress) { this.destinationAddress = destinationAddress; } - public Boolean getSkipBroadcast() { + public boolean getSkipBroadcast() { return skipBroadcast; } - public void setSkipBroadcast(Boolean skipBroadcast) { + public void setSkipBroadcast(boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; } public String getFailureReason() { @@ -167,7 +167,7 @@ public static class Builder { private String destinationAddress; - private Boolean skipBroadcast; + private boolean skipBroadcast; private String failureReason; @@ -203,7 +203,7 @@ public Builder destinationAddress(String destinationAddress) { return this; } - public Builder skipBroadcast(Boolean skipBroadcast) { + public Builder skipBroadcast(boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; return this; } diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index 6aa0adf8..0c2fc7da 100644 --- a/src/main/java/com/coinbase/prime/model/Order.java +++ b/src/main/java/com/coinbase/prime/model/Order.java @@ -178,7 +178,7 @@ public class Order { * Post-only flag - indicates whether the order was placed as post-only */ @JsonProperty("post_only") - private Boolean postOnly; + private boolean postOnly; /** * The history of order edits (deprecated: use edit_history instead) @@ -190,7 +190,7 @@ public class Order { * Indicates if this was a raise exact order (size inclusive of fees for sell orders in quote) */ @JsonProperty("is_raise_exact") - private Boolean isRaiseExact; + private boolean isRaiseExact; /** * Display size for the order @@ -449,11 +449,11 @@ public String getClientProductId() { public void setClientProductId(String clientProductId) { this.clientProductId = clientProductId; } - public Boolean getPostOnly() { + public boolean getPostOnly() { return postOnly; } - public void setPostOnly(Boolean postOnly) { + public void setPostOnly(boolean postOnly) { this.postOnly = postOnly; } public List getOrderEditHistory() { @@ -463,11 +463,11 @@ public List getOrderEditHistory() { public void setOrderEditHistory(List orderEditHistory) { this.orderEditHistory = orderEditHistory; } - public Boolean getIsRaiseExact() { + public boolean getIsRaiseExact() { return isRaiseExact; } - public void setIsRaiseExact(Boolean isRaiseExact) { + public void setIsRaiseExact(boolean isRaiseExact) { this.isRaiseExact = isRaiseExact; } public String getDisplaySize() { @@ -570,11 +570,11 @@ public static class Builder { private String clientProductId; - private Boolean postOnly; + private boolean postOnly; private List orderEditHistory; - private Boolean isRaiseExact; + private boolean isRaiseExact; private String displaySize; @@ -715,7 +715,7 @@ public Builder clientProductId(String clientProductId) { return this; } - public Builder postOnly(Boolean postOnly) { + public Builder postOnly(boolean postOnly) { this.postOnly = postOnly; return this; } @@ -725,7 +725,7 @@ public Builder orderEditHistory(List orderEditHistory) { return this; } - public Builder isRaiseExact(Boolean isRaiseExact) { + public Builder isRaiseExact(boolean isRaiseExact) { this.isRaiseExact = isRaiseExact; return this; } diff --git a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java index c3d1f3ca..464977c8 100644 --- a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java +++ b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java @@ -61,7 +61,7 @@ public class PmAssetInfo { * Whether the currency is margin eligible */ @JsonProperty("margin_eligible") - private Boolean marginEligible; + private boolean marginEligible; /** * Base margin requirement of the currency @@ -186,11 +186,11 @@ public String getAssetTier() { public void setAssetTier(String assetTier) { this.assetTier = assetTier; } - public Boolean getMarginEligible() { + public boolean getMarginEligible() { return marginEligible; } - public void setMarginEligible(Boolean marginEligible) { + public void setMarginEligible(boolean marginEligible) { this.marginEligible = marginEligible; } public String getBaseMarginRequirement() { @@ -281,7 +281,7 @@ public static class Builder { private String assetTier; - private Boolean marginEligible; + private boolean marginEligible; private String baseMarginRequirement; @@ -330,7 +330,7 @@ public Builder assetTier(String assetTier) { return this; } - public Builder marginEligible(Boolean marginEligible) { + public Builder marginEligible(boolean marginEligible) { this.marginEligible = marginEligible; return this; } diff --git a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java index 85a51ebd..d0690f6f 100644 --- a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java +++ b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java @@ -64,7 +64,7 @@ public class PostTradeCreditInformation { * Whether or not a portfolio is frozen due to balance outstanding or other reason */ @JsonProperty("frozen") - private Boolean frozen; + private boolean frozen; /** * The reason why the portfolio is frozen @@ -79,7 +79,7 @@ public class PostTradeCreditInformation { * Whether the portfolio has credit enabled */ @JsonProperty("enabled") - private Boolean enabled; + private boolean enabled; /** * The amount of adjusted credit used @@ -144,11 +144,11 @@ public String getAvailable() { public void setAvailable(String available) { this.available = available; } - public Boolean getFrozen() { + public boolean getFrozen() { return frozen; } - public void setFrozen(Boolean frozen) { + public void setFrozen(boolean frozen) { this.frozen = frozen; } public String getFrozenReason() { @@ -165,11 +165,11 @@ public List getAmountsDue() { public void setAmountsDue(List amountsDue) { this.amountsDue = amountsDue; } - public Boolean getEnabled() { + public boolean getEnabled() { return enabled; } - public void setEnabled(Boolean enabled) { + public void setEnabled(boolean enabled) { this.enabled = enabled; } public String getAdjustedCreditUtilized() { @@ -197,13 +197,13 @@ public static class Builder { private String available; - private Boolean frozen; + private boolean frozen; private String frozenReason; private List amountsDue; - private Boolean enabled; + private boolean enabled; private String adjustedCreditUtilized; @@ -234,7 +234,7 @@ public Builder available(String available) { return this; } - public Builder frozen(Boolean frozen) { + public Builder frozen(boolean frozen) { this.frozen = frozen; return this; } @@ -249,7 +249,7 @@ public Builder amountsDue(List amountsDue) { return this; } - public Builder enabled(Boolean enabled) { + public Builder enabled(boolean enabled) { this.enabled = enabled; return this; } diff --git a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java index 751163e0..7af1b529 100644 --- a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java @@ -31,7 +31,7 @@ public class RfqProductDetails { * Whether the product is tradable via RFQ */ @JsonProperty("tradable") - private Boolean tradable; + private boolean tradable; /** * Deprecated: Value will be an empty string @@ -81,11 +81,11 @@ public RfqProductDetails(Builder builder) { this.minQuoteSize = builder.minQuoteSize; this.maxQuoteSize = builder.maxQuoteSize; } - public Boolean getTradable() { + public boolean getTradable() { return tradable; } - public void setTradable(Boolean tradable) { + public void setTradable(boolean tradable) { this.tradable = tradable; } public String getMinNotionalSize() { @@ -131,7 +131,7 @@ public void setMaxQuoteSize(String maxQuoteSize) { this.maxQuoteSize = maxQuoteSize; } public static class Builder { - private Boolean tradable; + private boolean tradable; private String minNotionalSize; @@ -145,7 +145,7 @@ public static class Builder { private String maxQuoteSize; - public Builder tradable(Boolean tradable) { + public Builder tradable(boolean tradable) { this.tradable = tradable; return this; } diff --git a/src/main/java/com/coinbase/prime/model/RiskAssessment.java b/src/main/java/com/coinbase/prime/model/RiskAssessment.java index 13b370b9..5f963c65 100644 --- a/src/main/java/com/coinbase/prime/model/RiskAssessment.java +++ b/src/main/java/com/coinbase/prime/model/RiskAssessment.java @@ -31,13 +31,13 @@ public class RiskAssessment { * Indicates if the transaction has been flagged for compliance concerns */ @JsonProperty("compliance_risk_detected") - private Boolean complianceRiskDetected; + private boolean complianceRiskDetected; /** * Indicates if the transaction has been flagged for security concerns */ @JsonProperty("security_risk_detected") - private Boolean securityRiskDetected; + private boolean securityRiskDetected; public RiskAssessment() { } @@ -46,31 +46,31 @@ public RiskAssessment(Builder builder) { this.complianceRiskDetected = builder.complianceRiskDetected; this.securityRiskDetected = builder.securityRiskDetected; } - public Boolean getComplianceRiskDetected() { + public boolean getComplianceRiskDetected() { return complianceRiskDetected; } - public void setComplianceRiskDetected(Boolean complianceRiskDetected) { + public void setComplianceRiskDetected(boolean complianceRiskDetected) { this.complianceRiskDetected = complianceRiskDetected; } - public Boolean getSecurityRiskDetected() { + public boolean getSecurityRiskDetected() { return securityRiskDetected; } - public void setSecurityRiskDetected(Boolean securityRiskDetected) { + public void setSecurityRiskDetected(boolean securityRiskDetected) { this.securityRiskDetected = securityRiskDetected; } public static class Builder { - private Boolean complianceRiskDetected; + private boolean complianceRiskDetected; - private Boolean securityRiskDetected; + private boolean securityRiskDetected; - public Builder complianceRiskDetected(Boolean complianceRiskDetected) { + public Builder complianceRiskDetected(boolean complianceRiskDetected) { this.complianceRiskDetected = complianceRiskDetected; return this; } - public Builder securityRiskDetected(Boolean securityRiskDetected) { + public Builder securityRiskDetected(boolean securityRiskDetected) { this.securityRiskDetected = securityRiskDetected; return this; } diff --git a/src/main/java/com/coinbase/prime/model/RpcConfig.java b/src/main/java/com/coinbase/prime/model/RpcConfig.java index 6c9bd5e6..30147203 100644 --- a/src/main/java/com/coinbase/prime/model/RpcConfig.java +++ b/src/main/java/com/coinbase/prime/model/RpcConfig.java @@ -31,7 +31,7 @@ public class RpcConfig { * If true, transaction will not be broadcast to the network */ @JsonProperty("skip_broadcast") - private Boolean skipBroadcast; + private boolean skipBroadcast; /** * Custom blockchain node RPC URL. (EVM-only) @@ -46,11 +46,11 @@ public RpcConfig(Builder builder) { this.skipBroadcast = builder.skipBroadcast; this.url = builder.url; } - public Boolean getSkipBroadcast() { + public boolean getSkipBroadcast() { return skipBroadcast; } - public void setSkipBroadcast(Boolean skipBroadcast) { + public void setSkipBroadcast(boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; } public String getUrl() { @@ -61,11 +61,11 @@ public void setUrl(String url) { this.url = url; } public static class Builder { - private Boolean skipBroadcast; + private boolean skipBroadcast; private String url; - public Builder skipBroadcast(Boolean skipBroadcast) { + public Builder skipBroadcast(boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; return this; } diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index c206e4d2..4718874c 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -35,22 +35,22 @@ public class TravelRuleData { private TravelRuleParty originator; @JsonProperty("is_self") - private Boolean isSelf; + private boolean isSelf; /** * True if Coinbase is being used as an intermediary for a customer transfer. */ @JsonProperty("is_intermediary") - private Boolean isIntermediary; + private boolean isIntermediary; @JsonProperty("opt_out_of_ownership_verification") - private Boolean optOutOfOwnershipVerification; + private boolean optOutOfOwnershipVerification; /** * Whether the originating VASP attests to verified wallet ownership. When true with is_intermediary, enables automatic VASP data enrichment from the legal entity. */ @JsonProperty("attest_verified_wallet_ownership") - private Boolean attestVerifiedWalletOwnership; + private boolean attestVerifiedWalletOwnership; public TravelRuleData() { } @@ -77,32 +77,32 @@ public TravelRuleParty getOriginator() { public void setOriginator(TravelRuleParty originator) { this.originator = originator; } - public Boolean getIsSelf() { + public boolean getIsSelf() { return isSelf; } - public void setIsSelf(Boolean isSelf) { + public void setIsSelf(boolean isSelf) { this.isSelf = isSelf; } - public Boolean getIsIntermediary() { + public boolean getIsIntermediary() { return isIntermediary; } - public void setIsIntermediary(Boolean isIntermediary) { + public void setIsIntermediary(boolean isIntermediary) { this.isIntermediary = isIntermediary; } - public Boolean getOptOutOfOwnershipVerification() { + public boolean getOptOutOfOwnershipVerification() { return optOutOfOwnershipVerification; } - public void setOptOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { + public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; } - public Boolean getAttestVerifiedWalletOwnership() { + public boolean getAttestVerifiedWalletOwnership() { return attestVerifiedWalletOwnership; } - public void setAttestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { + public void setAttestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; } public static class Builder { @@ -110,13 +110,13 @@ public static class Builder { private TravelRuleParty originator; - private Boolean isSelf; + private boolean isSelf; - private Boolean isIntermediary; + private boolean isIntermediary; - private Boolean optOutOfOwnershipVerification; + private boolean optOutOfOwnershipVerification; - private Boolean attestVerifiedWalletOwnership; + private boolean attestVerifiedWalletOwnership; public Builder beneficiary(TravelRuleParty beneficiary) { this.beneficiary = beneficiary; @@ -128,22 +128,22 @@ public Builder originator(TravelRuleParty originator) { return this; } - public Builder isSelf(Boolean isSelf) { + public Builder isSelf(boolean isSelf) { this.isSelf = isSelf; return this; } - public Builder isIntermediary(Boolean isIntermediary) { + public Builder isIntermediary(boolean isIntermediary) { this.isIntermediary = isIntermediary; return this; } - public Builder optOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { + public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; return this; } - public Builder attestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { + public Builder attestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; return this; } diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java index 0caec860..5107ca52 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -1,5 +1,5 @@ /* - * Copyright 2026-present Coinbase Global, Inc. + * Copyright 2025-present Coinbase Global, Inc. * * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator * @@ -19,7 +19,12 @@ */ package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; public class ValidatorAllocation { /** diff --git a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java index 14adb884..d5d192e7 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -25,6 +25,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/com/coinbase/prime/model/XmPosition.java b/src/main/java/com/coinbase/prime/model/XmPosition.java index 48f27ec0..8c2b1b57 100644 --- a/src/main/java/com/coinbase/prime/model/XmPosition.java +++ b/src/main/java/com/coinbase/prime/model/XmPosition.java @@ -43,7 +43,7 @@ public class XmPosition { * True if margin eligible, false otherwise */ @JsonProperty("margin_eligible") - private Boolean marginEligible; + private boolean marginEligible; /** * Total market capitalization @@ -221,11 +221,11 @@ public String getMarketPrice() { public void setMarketPrice(String marketPrice) { this.marketPrice = marketPrice; } - public Boolean getMarginEligible() { + public boolean getMarginEligible() { return marginEligible; } - public void setMarginEligible(Boolean marginEligible) { + public void setMarginEligible(boolean marginEligible) { this.marginEligible = marginEligible; } public String getMarketCap() { @@ -387,7 +387,7 @@ public static class Builder { private String marketPrice; - private Boolean marginEligible; + private boolean marginEligible; private String marketCap; @@ -443,7 +443,7 @@ public Builder marketPrice(String marketPrice) { return this; } - public Builder marginEligible(Boolean marginEligible) { + public Builder marginEligible(boolean marginEligible) { this.marginEligible = marginEligible; return this; } diff --git a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java new file mode 100644 index 00000000..9bf2adc5 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java @@ -0,0 +1,31 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum AdvancedTransferState { + ADVANCED_TRANSFER_STATE_CREATED, + ADVANCED_TRANSFER_STATE_PROCESSING, + ADVANCED_TRANSFER_STATE_DONE, + ADVANCED_TRANSFER_STATE_CANCELLED, + ADVANCED_TRANSFER_STATE_FAILED, + ADVANCED_TRANSFER_STATE_EXPIRED +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java new file mode 100644 index 00000000..22660dd0 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java @@ -0,0 +1,26 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum AdvancedTransferType { + ADVANCED_TRANSFER_TYPE_BLIND_MATCH +} + diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java index 1119a322..11901e8c 100644 --- a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java @@ -116,6 +116,11 @@ public void generateModels() throws IOException { configurator.setAdditionalProperties(additionalProperties); + // Use primitive boolean instead of Boolean wrapper + Map typeMappings = new HashMap<>(); + typeMappings.put("boolean", "boolean"); + configurator.setTypeMappings(typeMappings); + // Generate only models (not APIs) configurator.setGenerateAliasAsModel(true); From 6f63dd84706bc337fc8bc849c4423688c6a889f7 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Thu, 19 Mar 2026 13:48:13 -0700 Subject: [PATCH 6/8] update SDK spec to latest version --- CLAUDE.md | 1 - pom.xml | 2 +- .../GetTransactionTravelRuleData.java} | 24 +- .../GetPortfolioActivityRequest.java | 3 +- .../ListEntityActivitiesRequest.java | 18 -- .../ListPortfolioActivitiesRequest.java | 17 -- .../CreateAddressBookEntryRequest.java | 18 -- .../AdvancedTransfersService.java | 26 ++ .../AdvancedTransfersServiceImpl.java | 62 ++++ .../CancelAdvancedTransferRequest.java | 89 ++++++ .../CancelAdvancedTransferResponse.java | 35 +++ .../CreateAdvancedTransferRequest.java | 86 ++++++ .../CreateAdvancedTransferResponse.java | 36 +++ .../ListAdvancedTransfersRequest.java | 177 ++++++++++++ .../ListAdvancedTransfersResponse.java | 46 +++ .../ListOnchainWalletBalancesResponse.java | 13 - .../ListPortfolioBalancesResponse.java | 11 - .../prime/factory/PrimeServiceFactory.java | 6 + .../financing/CreateNewLocatesRequest.java | 18 -- .../prime/financing/FinancingServiceImpl.java | 2 +- ...GetPortfolioCreditInformationResponse.java | 2 - .../ListExistingLocatesResponse.java | 8 +- ...stInterestAccrualsForPortfolioRequest.java | 6 +- .../prime/futures/FuturesService.java | 2 +- .../prime/futures/FuturesServiceImpl.java | 19 +- .../prime/futures/GetFcmEquityRequest.java | 16 +- .../prime/futures/GetFcmEquityResponse.java | 44 +-- .../prime/futures/GetPositionsResponse.java | 8 +- .../ScheduleEntityFuturesSweepRequest.java | 10 - .../model/ActivityMetadataConsensus.java | 10 +- .../java/com/coinbase/prime/model/Asset.java | 10 +- .../prime/model/CommissionDetailTotal.java | 179 ++++++++++++ .../model/CreateAllocationResponseBody.java | 10 +- .../CreateNetAllocationResponseBody.java | 10 +- .../com/coinbase/prime/model/EntityUser.java | 45 +++ .../com/coinbase/prime/model/EvmParams.java | 20 +- .../prime/model/FcmScheduledMaintenance.java | 84 ++++++ .../prime/model/FcmTradingSessionDetails.java | 225 +++++++++++++++ .../java/com/coinbase/prime/model/Fill.java | 38 +++ .../prime/model/FutureProductDetails.java | 267 ++++++++++++++++++ .../coinbase/prime/model/FuturesSweep.java | 10 +- .../coinbase/prime/model/GoogleTypeDate.java | 104 ------- .../coinbase/prime/model/MarginSummary.java | 30 +- .../coinbase/prime/model/NetworkDetails.java | 50 ++-- .../model/OnchainTransactionDetails.java | 10 +- .../java/com/coinbase/prime/model/Order.java | 58 +++- .../prime/model/PerpetualProductDetails.java | 147 ++++++++++ .../com/coinbase/prime/model/PmAssetInfo.java | 10 +- .../coinbase/prime/model/PortfolioUser.java | 45 +++ .../model/PostTradeCreditInformation.java | 20 +- .../com/coinbase/prime/model/Product.java | 57 ++++ ...leDataForAnExistingDepositTransaction.java | 114 ++++++++ .../prime/model/RfqProductDetails.java | 10 +- .../coinbase/prime/model/RiskAssessment.java | 20 +- .../com/coinbase/prime/model/RpcConfig.java | 10 +- .../coinbase/prime/model/TravelRuleData.java | 40 +-- .../coinbase/prime/model/TravelRuleParty.java | 11 +- .../com/coinbase/prime/model/XmPosition.java | 10 +- .../prime/model/enums/ContractExpiryType.java | 28 ++ .../model/enums/ExpiringContractStatus.java | 28 ++ .../model/enums/FcmMarginHealthState.java | 30 ++ .../enums/FcmTradingSessionClosedReason.java | 29 ++ .../model/enums/FcmTradingSessionState.java | 31 ++ .../prime/model/enums/ProductType.java | 27 ++ .../prime/model/enums/RiskManagementType.java | 28 ++ .../model/enums/SecondaryPermission.java | 28 ++ .../ListOnchainAddressGroupsRequest.java | 4 - .../UpdateOnchainAddressBookEntryRequest.java | 4 +- .../prime/orders/AcceptQuoteRequest.java | 17 -- .../prime/orders/CancelOrderResponse.java | 3 + .../prime/orders/CreateOrderRequest.java | 11 +- .../prime/orders/CreateQuoteRequest.java | 17 -- .../prime/orders/GetOrderPreviewRequest.java | 11 +- .../prime/orders/ListOpenOrdersRequest.java | 22 +- .../CreateOnchainTransactionRequest.java | 3 + .../CreateWalletTransferResponse.java | 13 +- .../CreateWalletWithdrawalResponse.java | 13 +- .../GetTransactionTravelRuleDataRequest.java | 89 ++++++ .../GetTransactionTravelRuleDataResponse.java | 120 ++++++++ ...stAdvancedTransferTransactionsRequest.java | 85 ++++++ ...tAdvancedTransferTransactionsResponse.java | 34 +++ .../ListPortfolioTransactionsRequest.java | 35 --- .../ListWalletTransactionsResponse.java | 9 + .../SubmitDepositTravelRuleDataRequest.java | 18 ++ .../transactions/TransactionsService.java | 2 + .../transactions/TransactionsServiceImpl.java | 24 ++ .../users/ListPortfolioUsersResponse.java | 8 +- .../prime/wallets/CreateWalletRequest.java | 58 +--- .../GetWalletDepositInstructionsRequest.java | 11 +- .../wallets/ListWalletAddressesRequest.java | 10 +- .../prime/wallets/ListWalletsRequest.java | 18 -- .../OrdersServiceSerializationTest.java | 2 +- .../model-generator/.openapi-generator-ignore | 6 +- .../modelgenerator/OpenApiGenerator.java | 5 - 94 files changed, 2695 insertions(+), 645 deletions(-) rename src/main/java/com/coinbase/examples/{futures/GetFcmEquity.java => transactions/GetTransactionTravelRuleData.java} (57%) create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersService.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersServiceImpl.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferRequest.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferResponse.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferRequest.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferResponse.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersRequest.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersResponse.java create mode 100644 src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java create mode 100644 src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java create mode 100644 src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java create mode 100644 src/main/java/com/coinbase/prime/model/FutureProductDetails.java delete mode 100644 src/main/java/com/coinbase/prime/model/GoogleTypeDate.java create mode 100644 src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java create mode 100644 src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/ProductType.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java create mode 100644 src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataRequest.java create mode 100644 src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataResponse.java create mode 100644 src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsRequest.java create mode 100644 src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsResponse.java diff --git a/CLAUDE.md b/CLAUDE.md index 5b822b8c..6a1c9fbc 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -296,7 +296,6 @@ Each OpenAPI operation should generate: #### Naming Conventions - **Classes**: PascalCase (e.g., `CreateAllocationRequest`) - **Properties**: camelCase with Jackson annotation mapping (e.g., `@JsonProperty("portfolio_id") private String portfolioId`) -- **Booleans**: Use primitive `boolean` (not `Boolean` wrapper). The model generator is configured with `typeMappings("boolean" -> "boolean")` to enforce this for generated models. Hand-crafted request/response classes should follow the same convention. - **Enums**: Use standard OpenAPI names (e.g., `FCM_MARGIN_CALL_STATE_CLOSED`) - Jackson handles serialization - **Methods**: camelCase matching operation name diff --git a/pom.xml b/pom.xml index 5843bd10..e432adae 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ Sample Java SDK for the Coinbase Prime REST APIs com.coinbase.prime https://github.com/coinbase-samples/prime-sdk-java - 1.7.0 + 1.6.2 Apache License, Version 2.0 diff --git a/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java b/src/main/java/com/coinbase/examples/transactions/GetTransactionTravelRuleData.java similarity index 57% rename from src/main/java/com/coinbase/examples/futures/GetFcmEquity.java rename to src/main/java/com/coinbase/examples/transactions/GetTransactionTravelRuleData.java index 4ff6591f..54e4c1f8 100644 --- a/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java +++ b/src/main/java/com/coinbase/examples/transactions/GetTransactionTravelRuleData.java @@ -14,27 +14,31 @@ * limitations under the License. */ -package com.coinbase.examples.futures; +package com.coinbase.examples.transactions; import com.coinbase.prime.client.CoinbasePrimeClient; import com.coinbase.prime.credentials.CoinbasePrimeCredentials; import com.coinbase.prime.factory.PrimeServiceFactory; -import com.coinbase.prime.futures.FuturesService; -import com.coinbase.prime.futures.GetFcmEquityRequest; -import com.coinbase.prime.futures.GetFcmEquityResponse; +import com.coinbase.prime.transactions.GetTransactionTravelRuleDataRequest; +import com.coinbase.prime.transactions.GetTransactionTravelRuleDataResponse; +import com.coinbase.prime.transactions.TransactionsService; import com.coinbase.prime.utils.Utils; -public class GetFcmEquity { +public class GetTransactionTravelRuleData { public static void main(String[] args) { try { CoinbasePrimeCredentials credentials = new CoinbasePrimeCredentials(System.getenv("COINBASE_PRIME_CREDENTIALS")); CoinbasePrimeClient client = new CoinbasePrimeClient(credentials); - String entityId = System.getenv("COINBASE_PRIME_ENTITY_ID"); + String portfolioId = System.getenv("COINBASE_PRIME_PORTFOLIO_ID"); + String transactionId = args.length > 0 ? args[0] : "TRANSACTION_ID_HERE"; - FuturesService service = PrimeServiceFactory.createFuturesService(client); - GetFcmEquityResponse response = service.getFcmEquity( - new GetFcmEquityRequest.Builder() - .entityId(entityId) + System.out.println("Getting travel rule data: Portfolio ID: " + portfolioId + ", Transaction ID: " + transactionId); + + TransactionsService service = PrimeServiceFactory.createTransactionsService(client); + GetTransactionTravelRuleDataResponse response = service.getTransactionTravelRuleData( + new GetTransactionTravelRuleDataRequest.Builder() + .portfolioId(portfolioId) + .transactionId(transactionId) .build()); System.out.println(Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(response)); diff --git a/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java b/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java index f09604fd..0ffb6393 100644 --- a/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java +++ b/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java @@ -16,6 +16,7 @@ package com.coinbase.prime.activities; +import com.coinbase.prime.common.PrimeListRequest; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.coinbase.core.errors.CoinbaseClientException; @@ -24,7 +25,7 @@ /** * Request for getting a portfolio activity by activity ID. */ -public class GetPortfolioActivityRequest { +public class GetPortfolioActivityRequest extends PrimeListRequest { @JsonProperty(required = true, value = "portfolio_id") @JsonIgnore private String portfolioId; diff --git a/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java b/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java index ff5102e8..bd2f0fab 100644 --- a/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java +++ b/src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java @@ -48,9 +48,6 @@ public class ListEntityActivitiesRequest extends PrimeListRequest { @JsonProperty("end_time") private String endTime; - @JsonProperty("get_network_unified_activities") - private Boolean getNetworkUnifiedActivities; - public ListEntityActivitiesRequest(String entityId) { this.entityId = entityId; } @@ -64,7 +61,6 @@ public ListEntityActivitiesRequest(Builder builder) { this.statuses = builder.statuses; this.startTime = builder.startTime; this.endTime = builder.endTime; - this.getNetworkUnifiedActivities = builder.getNetworkUnifiedActivities; } public String getEntityId() { @@ -123,14 +119,6 @@ public void setEndTime(String endTime) { this.endTime = endTime; } - public Boolean getGetNetworkUnifiedActivities() { - return this.getNetworkUnifiedActivities; - } - - public void setGetNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { - this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; - } - public static class Builder { private final String entityId; private ActivityLevel activityLevel; @@ -139,7 +127,6 @@ public static class Builder { private ActivityStatus[] statuses; private String startTime; private String endTime; - private Boolean getNetworkUnifiedActivities; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -178,11 +165,6 @@ public ListEntityActivitiesRequest.Builder endTime(String endTime) { return this; } - public ListEntityActivitiesRequest.Builder getNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { - this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; - return this; - } - public ListEntityActivitiesRequest.Builder limit(Integer limit) { this.limit = limit; return this; diff --git a/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java b/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java index 4c7533a7..eed1762e 100644 --- a/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java +++ b/src/main/java/com/coinbase/prime/activities/ListPortfolioActivitiesRequest.java @@ -38,8 +38,6 @@ public class ListPortfolioActivitiesRequest extends PrimeListRequest { private String startTime; @JsonProperty("end_time") private String endTime; - @JsonProperty("get_network_unified_activities") - private Boolean getNetworkUnifiedActivities; public ListPortfolioActivitiesRequest() { } @@ -52,7 +50,6 @@ public ListPortfolioActivitiesRequest(Builder builder) { this.statuses = builder.statuses; this.startTime = builder.startTime; this.endTime = builder.endTime; - this.getNetworkUnifiedActivities = builder.getNetworkUnifiedActivities; } public String getPortfolioId() { @@ -103,14 +100,6 @@ public void setEndTime(String endTime) { this.endTime = endTime; } - public Boolean getGetNetworkUnifiedActivities() { - return getNetworkUnifiedActivities; - } - - public void setGetNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { - this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; - } - public static class Builder { private final String portfolioId; private String[] symbols; @@ -118,7 +107,6 @@ public static class Builder { private ActivityStatus[] statuses; private String startTime; private String endTime; - private Boolean getNetworkUnifiedActivities; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -152,11 +140,6 @@ public Builder endTime(String endTime) { return this; } - public Builder getNetworkUnifiedActivities(Boolean getNetworkUnifiedActivities) { - this.getNetworkUnifiedActivities = getNetworkUnifiedActivities; - return this; - } - public Builder limit(Integer limit) { this.limit = limit; return this; diff --git a/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java b/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java index 74302509..f8cecfd6 100644 --- a/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java +++ b/src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java @@ -37,9 +37,6 @@ public class CreateAddressBookEntryRequest { @JsonProperty("account_identifier") private String accountIdentifier; - @JsonProperty("chain_ids") - private String[] chainIds; - public CreateAddressBookEntryRequest() { } @@ -49,7 +46,6 @@ public CreateAddressBookEntryRequest(Builder builder) { this.currencySymbol = builder.currencySymbol; this.name = builder.name; this.accountIdentifier = builder.accountIdentifier; - this.chainIds = builder.chainIds; } public String getPortfolioId() { @@ -92,21 +88,12 @@ public void setAccountIdentifier(String accountIdentifier) { this.accountIdentifier = accountIdentifier; } - public String[] getChainIds() { - return chainIds; - } - - public void setChainIds(String[] chainIds) { - this.chainIds = chainIds; - } - public static class Builder { private final String portfolioId; private String address; private String currencySymbol; private String name; private String accountIdentifier; - private String[] chainIds; public Builder(String portfolioId) { this.portfolioId = portfolioId; @@ -132,11 +119,6 @@ public Builder accountIdentifier(String accountIdentifier) { return this; } - public Builder chainIds(String[] chainIds) { - this.chainIds = chainIds; - return this; - } - public CreateAddressBookEntryRequest build() throws CoinbaseClientException { this.validate(); return new CreateAddressBookEntryRequest(this); diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersService.java b/src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersService.java new file mode 100644 index 00000000..dca61e61 --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersService.java @@ -0,0 +1,26 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.errors.CoinbasePrimeException; + +public interface AdvancedTransfersService { + ListAdvancedTransfersResponse listAdvancedTransfers(ListAdvancedTransfersRequest request) throws CoinbaseClientException, CoinbasePrimeException; + CreateAdvancedTransferResponse createAdvancedTransfer(CreateAdvancedTransferRequest request) throws CoinbaseClientException, CoinbasePrimeException; + CancelAdvancedTransferResponse cancelAdvancedTransfer(CancelAdvancedTransferRequest request) throws CoinbaseClientException, CoinbasePrimeException; +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersServiceImpl.java b/src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersServiceImpl.java new file mode 100644 index 00000000..f8d2b96f --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/AdvancedTransfersServiceImpl.java @@ -0,0 +1,62 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.coinbase.core.common.HttpMethod; +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.core.service.CoinbaseServiceImpl; +import com.coinbase.prime.client.CoinbasePrimeClient; +import com.coinbase.prime.errors.CoinbasePrimeException; +import com.fasterxml.jackson.core.type.TypeReference; + +import java.util.List; + +public class AdvancedTransfersServiceImpl extends CoinbaseServiceImpl implements AdvancedTransfersService { + public AdvancedTransfersServiceImpl(CoinbasePrimeClient client) { + super(client); + } + + @Override + public ListAdvancedTransfersResponse listAdvancedTransfers(ListAdvancedTransfersRequest request) throws CoinbaseClientException, CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/portfolios/%s/advanced_transfers", request.getPortfolioId()), + request, + List.of(200), + new TypeReference() {}); + } + + @Override + public CreateAdvancedTransferResponse createAdvancedTransfer(CreateAdvancedTransferRequest request) throws CoinbaseClientException, CoinbasePrimeException { + return this.request( + HttpMethod.POST, + String.format("/portfolios/%s/advanced_transfers", request.getPortfolioId()), + request, + List.of(200), + new TypeReference() {}); + } + + @Override + public CancelAdvancedTransferResponse cancelAdvancedTransfer(CancelAdvancedTransferRequest request) throws CoinbaseClientException, CoinbasePrimeException { + return this.request( + HttpMethod.POST, + String.format("/portfolios/%s/advanced_transfers/%s/cancel", request.getPortfolioId(), request.getAdvancedTransferId()), + request, + List.of(200), + new TypeReference() {}); + } +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferRequest.java b/src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferRequest.java new file mode 100644 index 00000000..e5f8a0e7 --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferRequest.java @@ -0,0 +1,89 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +public class CancelAdvancedTransferRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + @JsonProperty(required = true, value = "advanced_transfer_id") + @JsonIgnore + private String advancedTransferId; + + public CancelAdvancedTransferRequest() { + } + + public CancelAdvancedTransferRequest(Builder builder) { + this.portfolioId = builder.portfolioId; + this.advancedTransferId = builder.advancedTransferId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getAdvancedTransferId() { + return advancedTransferId; + } + + public void setAdvancedTransferId(String advancedTransferId) { + this.advancedTransferId = advancedTransferId; + } + + public static class Builder { + private String portfolioId; + private String advancedTransferId; + + public Builder() { + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder advancedTransferId(String advancedTransferId) { + this.advancedTransferId = advancedTransferId; + return this; + } + + public CancelAdvancedTransferRequest build() throws CoinbaseClientException { + this.validate(); + return new CancelAdvancedTransferRequest(this); + } + + private void validate() throws CoinbaseClientException { + if (isNullOrEmpty(this.portfolioId)) { + throw new CoinbaseClientException("PortfolioId is required"); + } + if (isNullOrEmpty(this.advancedTransferId)) { + throw new CoinbaseClientException("AdvancedTransferId is required"); + } + } + } +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferResponse.java b/src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferResponse.java new file mode 100644 index 00000000..ad49ea65 --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/CancelAdvancedTransferResponse.java @@ -0,0 +1,35 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CancelAdvancedTransferResponse { + @JsonProperty("advanced_transfer_id") + private String advancedTransferId; + + public CancelAdvancedTransferResponse() { + } + + public String getAdvancedTransferId() { + return advancedTransferId; + } + + public void setAdvancedTransferId(String advancedTransferId) { + this.advancedTransferId = advancedTransferId; + } +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferRequest.java b/src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferRequest.java new file mode 100644 index 00000000..8db90638 --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferRequest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.model.AdvancedTransfer; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +public class CreateAdvancedTransferRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + @JsonProperty("advanced_transfer") + private AdvancedTransfer advancedTransfer; + + public CreateAdvancedTransferRequest() { + } + + public CreateAdvancedTransferRequest(Builder builder) { + this.portfolioId = builder.portfolioId; + this.advancedTransfer = builder.advancedTransfer; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public AdvancedTransfer getAdvancedTransfer() { + return advancedTransfer; + } + + public void setAdvancedTransfer(AdvancedTransfer advancedTransfer) { + this.advancedTransfer = advancedTransfer; + } + + public static class Builder { + private String portfolioId; + private AdvancedTransfer advancedTransfer; + + public Builder() { + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder advancedTransfer(AdvancedTransfer advancedTransfer) { + this.advancedTransfer = advancedTransfer; + return this; + } + + public CreateAdvancedTransferRequest build() throws CoinbaseClientException { + this.validate(); + return new CreateAdvancedTransferRequest(this); + } + + private void validate() throws CoinbaseClientException { + if (isNullOrEmpty(this.portfolioId)) { + throw new CoinbaseClientException("PortfolioId is required"); + } + } + } +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferResponse.java b/src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferResponse.java new file mode 100644 index 00000000..3b2dcfd2 --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/CreateAdvancedTransferResponse.java @@ -0,0 +1,36 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.coinbase.prime.model.AdvancedTransfer; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class CreateAdvancedTransferResponse { + @JsonProperty("advanced_transfer") + private AdvancedTransfer advancedTransfer; + + public CreateAdvancedTransferResponse() { + } + + public AdvancedTransfer getAdvancedTransfer() { + return advancedTransfer; + } + + public void setAdvancedTransfer(AdvancedTransfer advancedTransfer) { + this.advancedTransfer = advancedTransfer; + } +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersRequest.java b/src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersRequest.java new file mode 100644 index 00000000..e7c5498e --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersRequest.java @@ -0,0 +1,177 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.common.Pagination; +import com.coinbase.prime.common.PrimeListRequest; +import com.coinbase.prime.model.enums.AdvancedTransferState; +import com.coinbase.prime.model.enums.AdvancedTransferType; +import com.coinbase.prime.model.enums.SortDirection; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +public class ListAdvancedTransfersRequest extends PrimeListRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + @JsonProperty("state") + private AdvancedTransferState state; + + @JsonProperty("type") + private AdvancedTransferType type; + + @JsonProperty("start_time") + private String startTime; + + @JsonProperty("end_time") + private String endTime; + + @JsonProperty("reference_id") + private String referenceId; + + public ListAdvancedTransfersRequest() { + } + + public ListAdvancedTransfersRequest(Builder builder) { + super(builder.cursor, builder.sortDirection, builder.limit); + this.portfolioId = builder.portfolioId; + this.state = builder.state; + this.type = builder.type; + this.startTime = builder.startTime; + this.endTime = builder.endTime; + this.referenceId = builder.referenceId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public AdvancedTransferState getState() { + return state; + } + + public void setState(AdvancedTransferState state) { + this.state = state; + } + + public AdvancedTransferType getType() { + return type; + } + + public void setType(AdvancedTransferType type) { + this.type = type; + } + + public String getStartTime() { + return startTime; + } + + public void setStartTime(String startTime) { + this.startTime = startTime; + } + + public String getEndTime() { + return endTime; + } + + public void setEndTime(String endTime) { + this.endTime = endTime; + } + + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + public static class Builder { + private String portfolioId; + private AdvancedTransferState state; + private AdvancedTransferType type; + private String startTime; + private String endTime; + private String referenceId; + private String cursor; + private SortDirection sortDirection; + private Integer limit; + + public Builder() { + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder state(AdvancedTransferState state) { + this.state = state; + return this; + } + + public Builder type(AdvancedTransferType type) { + this.type = type; + return this; + } + + public Builder startTime(String startTime) { + this.startTime = startTime; + return this; + } + + public Builder endTime(String endTime) { + this.endTime = endTime; + return this; + } + + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + public Builder pagination(Pagination pagination) { + this.cursor = pagination.getNextCursor(); + this.sortDirection = pagination.getSortDirection(); + return this; + } + + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + public ListAdvancedTransfersRequest build() throws CoinbaseClientException { + this.validate(); + return new ListAdvancedTransfersRequest(this); + } + + private void validate() throws CoinbaseClientException { + if (isNullOrEmpty(this.portfolioId)) { + throw new CoinbaseClientException("PortfolioId is required"); + } + } + } +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersResponse.java b/src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersResponse.java new file mode 100644 index 00000000..cf563baf --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfers/ListAdvancedTransfersResponse.java @@ -0,0 +1,46 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.advancedtransfers; + +import com.coinbase.prime.common.Pagination; +import com.coinbase.prime.model.AdvancedTransfer; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class ListAdvancedTransfersResponse { + @JsonProperty("advanced_transfers") + private AdvancedTransfer[] advancedTransfers; + private Pagination pagination; + + public ListAdvancedTransfersResponse() { + } + + public AdvancedTransfer[] getAdvancedTransfers() { + return advancedTransfers; + } + + public void setAdvancedTransfers(AdvancedTransfer[] advancedTransfers) { + this.advancedTransfers = advancedTransfers; + } + + public Pagination getPagination() { + return pagination; + } + + public void setPagination(Pagination pagination) { + this.pagination = pagination; + } +} diff --git a/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java b/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java index 19ea96cb..40a262b0 100644 --- a/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java +++ b/src/main/java/com/coinbase/prime/balances/ListOnchainWalletBalancesResponse.java @@ -17,9 +17,7 @@ package com.coinbase.prime.balances; import com.coinbase.prime.common.Pagination; -import com.coinbase.prime.model.DefiBalance; import com.coinbase.prime.model.OnchainBalance; -import com.fasterxml.jackson.annotation.JsonProperty; /** * Response object for listing on-chain wallet balances by entity. @@ -29,9 +27,6 @@ public class ListOnchainWalletBalancesResponse { private OnchainBalance[] balances; /** Pagination information for the response */ private Pagination pagination; - /** DeFi balances only return for the initial request. No pagination support. */ - @JsonProperty("defi_balances") - private DefiBalance[] defiBalances; public ListOnchainWalletBalancesResponse() { } @@ -52,12 +47,4 @@ public void setPagination(Pagination pagination) { this.pagination = pagination; } - public DefiBalance[] getDefiBalances() { - return defiBalances; - } - - public void setDefiBalances(DefiBalance[] defiBalances) { - this.defiBalances = defiBalances; - } - } diff --git a/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java b/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java index bdab8990..4519191c 100644 --- a/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java +++ b/src/main/java/com/coinbase/prime/balances/ListPortfolioBalancesResponse.java @@ -35,9 +35,6 @@ public class ListPortfolioBalancesResponse { /** Vault-specific balance summary */ @JsonProperty("vault_balances") private AggregatedFiatBalance vaultBalances; - /** Prime custody balance summary */ - @JsonProperty("prime_custody_balances") - private AggregatedFiatBalance primeCustodyBalances; public ListPortfolioBalancesResponse() { } @@ -74,12 +71,4 @@ public void setVaultBalances(AggregatedFiatBalance vaultBalances) { this.vaultBalances = vaultBalances; } - public AggregatedFiatBalance getPrimeCustodyBalances() { - return primeCustodyBalances; - } - - public void setPrimeCustodyBalances(AggregatedFiatBalance primeCustodyBalances) { - this.primeCustodyBalances = primeCustodyBalances; - } - } diff --git a/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java b/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java index 46a8db84..0c4ab614 100644 --- a/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java +++ b/src/main/java/com/coinbase/prime/factory/PrimeServiceFactory.java @@ -18,6 +18,8 @@ import com.coinbase.prime.activities.ActivitiesService; import com.coinbase.prime.activities.ActivitiesServiceImpl; +import com.coinbase.prime.advancedtransfers.AdvancedTransfersService; +import com.coinbase.prime.advancedtransfers.AdvancedTransfersServiceImpl; import com.coinbase.prime.addressbook.AddressBookService; import com.coinbase.prime.addressbook.AddressBookServiceImpl; import com.coinbase.prime.allocations.AllocationsService; @@ -61,6 +63,10 @@ public static ActivitiesService createActivitiesService(CoinbasePrimeClient clie return new ActivitiesServiceImpl(client); } + public static AdvancedTransfersService createAdvancedTransfersService(CoinbasePrimeClient client) { + return new AdvancedTransfersServiceImpl(client); + } + public static AddressBookService createAddressBookService(CoinbasePrimeClient client) { return new AddressBookServiceImpl(client); } diff --git a/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java b/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java index 6713f910..f526e71b 100644 --- a/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java +++ b/src/main/java/com/coinbase/prime/financing/CreateNewLocatesRequest.java @@ -28,9 +28,6 @@ public class CreateNewLocatesRequest { private String amount; - @JsonProperty("conversion_date") - private String conversionDate; - @JsonProperty("locate_date") private String locateDate; @@ -41,7 +38,6 @@ public CreateNewLocatesRequest(Builder builder) { this.portfolioId = builder.portfolioId; this.symbol = builder.symbol; this.amount = builder.amount; - this.conversionDate = builder.conversionDate; this.locateDate = builder.locateDate; } @@ -69,14 +65,6 @@ public void setAmount(String amount) { this.amount = amount; } - public String getConversionDate() { - return conversionDate; - } - - public void setConversionDate(String conversionDate) { - this.conversionDate = conversionDate; - } - public String getLocateDate() { return locateDate; } @@ -89,7 +77,6 @@ public static class Builder { private String portfolioId; private String symbol; private String amount; - private String conversionDate; private String locateDate; public Builder() { @@ -110,11 +97,6 @@ public Builder amount(String amount) { return this; } - public Builder conversionDate(String conversionDate) { - this.conversionDate = conversionDate; - return this; - } - public Builder locateDate(String locateDate) { this.locateDate = locateDate; return this; diff --git a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java index c42fbdcf..ae761b08 100644 --- a/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java +++ b/src/main/java/com/coinbase/prime/financing/FinancingServiceImpl.java @@ -53,7 +53,7 @@ public GetCrossMarginOverviewResponse getCrossMarginOverview(GetCrossMarginOverv public GetEntityLocateAvailabilitiesResponse getEntityLocateAvailabilities(GetEntityLocateAvailabilitiesRequest request) throws CoinbasePrimeException { return this.request( HttpMethod.GET, - String.format("/entities/%s/locates_availability", request.getEntityId()), + String.format("/entities/%s/locates/locates_availability", request.getEntityId()), request, List.of(200), new TypeReference() {}); diff --git a/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java b/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java index 82862f52..9d8bcf18 100644 --- a/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java +++ b/src/main/java/com/coinbase/prime/financing/GetPortfolioCreditInformationResponse.java @@ -17,10 +17,8 @@ package com.coinbase.prime.financing; import com.coinbase.prime.model.PostTradeCreditInformation; -import com.fasterxml.jackson.annotation.JsonProperty; public class GetPortfolioCreditInformationResponse { - @JsonProperty("post_trade_credit") private PostTradeCreditInformation postTradeCredit; public GetPortfolioCreditInformationResponse() { diff --git a/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java b/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java index c8db7294..05d0f89e 100644 --- a/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java +++ b/src/main/java/com/coinbase/prime/financing/ListExistingLocatesResponse.java @@ -16,19 +16,19 @@ package com.coinbase.prime.financing; -import com.coinbase.prime.model.ExistingLocate; +import com.coinbase.prime.model.Locate; public class ListExistingLocatesResponse { - private ExistingLocate[] locates; + private Locate[] locates; public ListExistingLocatesResponse() { } - public ExistingLocate[] getLocates() { + public Locate[] getLocates() { return locates; } - public void setLocates(ExistingLocate[] locates) { + public void setLocates(Locate[] locates) { this.locates = locates; } diff --git a/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java b/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java index 51976802..b9f663e6 100644 --- a/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java +++ b/src/main/java/com/coinbase/prime/financing/ListInterestAccrualsForPortfolioRequest.java @@ -71,7 +71,7 @@ public static class Builder { public Builder() { } - public Builder portfolioId(String portfolioId) { + public Builder prtfolioId(String portfolioId) { this.portfolioId = portfolioId; return this; } @@ -86,8 +86,6 @@ public Builder endDate(String endDate) { return this; } - public ListInterestAccrualsForPortfolioRequest build() { - return new ListInterestAccrualsForPortfolioRequest(this); - } + } } diff --git a/src/main/java/com/coinbase/prime/futures/FuturesService.java b/src/main/java/com/coinbase/prime/futures/FuturesService.java index ebf5533f..6faae0c0 100644 --- a/src/main/java/com/coinbase/prime/futures/FuturesService.java +++ b/src/main/java/com/coinbase/prime/futures/FuturesService.java @@ -23,7 +23,6 @@ public interface FuturesService { // Futures SetAutoSweepResponse setAutoSweep(SetAutoSweepRequest request) throws CoinbaseClientException, CoinbasePrimeException; GetEntityFcmBalanceResponse getEntityFcmBalance(GetEntityFcmBalanceRequest request) throws CoinbaseClientException, CoinbasePrimeException; - GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) throws CoinbaseClientException, CoinbasePrimeException; GetPositionsResponse getPositions(GetPositionsRequest request) throws CoinbaseClientException, CoinbasePrimeException; ListEntityFuturesSweepsResponse listEntityFuturesSweeps(ListEntityFuturesSweepsRequest request) throws CoinbaseClientException, CoinbasePrimeException; CancelEntityFuturesSweepResponse cancelEntityFuturesSweep(CancelEntityFuturesSweepRequest request) throws CoinbaseClientException, CoinbasePrimeException; @@ -32,4 +31,5 @@ public interface FuturesService { GetFcmRiskLimitsResponse getFcmRiskLimits(GetFcmRiskLimitsRequest request) throws CoinbaseClientException, CoinbasePrimeException; GetFcmSettingsResponse getFcmSettings(GetFcmSettingsRequest request) throws CoinbaseClientException, CoinbasePrimeException; SetFcmSettingsResponse setFcmSettings(SetFcmSettingsRequest request) throws CoinbaseClientException, CoinbasePrimeException; + GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) throws CoinbaseClientException, CoinbasePrimeException; } diff --git a/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java b/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java index 56afb5e2..0acf83fa 100644 --- a/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java +++ b/src/main/java/com/coinbase/prime/futures/FuturesServiceImpl.java @@ -49,15 +49,6 @@ public GetEntityFcmBalanceResponse getEntityFcmBalance(GetEntityFcmBalanceReques new TypeReference() {}); } - @Override - public GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) throws CoinbasePrimeException { - return this.request( - HttpMethod.GET, - String.format("/entities/%s/futures/equity", request.getEntityId()), - request, - List.of(200), - new TypeReference() {}); - } @Override public ListEntityFuturesSweepsResponse listEntityFuturesSweeps(ListEntityFuturesSweepsRequest request) throws CoinbasePrimeException { @@ -138,4 +129,14 @@ public SetFcmSettingsResponse setFcmSettings(SetFcmSettingsRequest request) thro List.of(200), new TypeReference() {}); } + + @Override + public GetFcmEquityResponse getFcmEquity(GetFcmEquityRequest request) throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/entities/%s/futures/equity", request.getEntityId()), + request, + List.of(200), + new TypeReference() {}); + } } diff --git a/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java b/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java index 6d6f8801..99b0cb21 100644 --- a/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2026-present Coinbase Global, Inc. + * Copyright 2025-present Coinbase Global, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,15 +16,12 @@ package com.coinbase.prime.futures; -import com.coinbase.core.errors.CoinbaseClientException; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - public class GetFcmEquityRequest { - @JsonProperty(required = true, value = "entity_id") @JsonIgnore + @JsonProperty(required = true, value = "entity_id") private String entityId; public GetFcmEquityRequest() { @@ -53,15 +50,8 @@ public Builder entityId(String entityId) { return this; } - public GetFcmEquityRequest build() throws CoinbaseClientException { - this.validate(); + public GetFcmEquityRequest build() { return new GetFcmEquityRequest(this); } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.entityId)) { - throw new CoinbaseClientException("Entity ID is required"); - } - } } } diff --git a/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java index 468a97b6..1632fd7b 100644 --- a/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2026-present Coinbase Global, Inc. + * Copyright 2025-present Coinbase Global, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,19 +19,35 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class GetFcmEquityResponse { + @JsonProperty("available_to_sweep") + private String availableToSweep; + + @JsonProperty("current_excess_deficit") + private String currentExcessDeficit; + @JsonProperty("eod_account_equity") private String eodAccountEquity; @JsonProperty("eod_unrealized_pnl") private String eodUnrealizedPnl; - @JsonProperty("current_excess_deficit") - private String currentExcessDeficit; + public GetFcmEquityResponse() { + } - @JsonProperty("available_to_sweep") - private String availableToSweep; + public String getAvailableToSweep() { + return availableToSweep; + } - public GetFcmEquityResponse() { + public void setAvailableToSweep(String availableToSweep) { + this.availableToSweep = availableToSweep; + } + + public String getCurrentExcessDeficit() { + return currentExcessDeficit; + } + + public void setCurrentExcessDeficit(String currentExcessDeficit) { + this.currentExcessDeficit = currentExcessDeficit; } public String getEodAccountEquity() { @@ -49,20 +65,4 @@ public String getEodUnrealizedPnl() { public void setEodUnrealizedPnl(String eodUnrealizedPnl) { this.eodUnrealizedPnl = eodUnrealizedPnl; } - - public String getCurrentExcessDeficit() { - return currentExcessDeficit; - } - - public void setCurrentExcessDeficit(String currentExcessDeficit) { - this.currentExcessDeficit = currentExcessDeficit; - } - - public String getAvailableToSweep() { - return availableToSweep; - } - - public void setAvailableToSweep(String availableToSweep) { - this.availableToSweep = availableToSweep; - } } diff --git a/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java b/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java index c27da8df..e3e21a33 100644 --- a/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java +++ b/src/main/java/com/coinbase/prime/futures/GetPositionsResponse.java @@ -16,14 +16,14 @@ package com.coinbase.prime.futures; -import com.coinbase.prime.model.FcmPosition; +import com.coinbase.prime.model.Position; import com.fasterxml.jackson.annotation.JsonProperty; /** * Response containing positions for an entity. */ public class GetPositionsResponse { - private FcmPosition[] positions; + private Position[] positions; @JsonProperty("clearing_account_id") private String clearingAccountId; @@ -31,11 +31,11 @@ public class GetPositionsResponse { public GetPositionsResponse() { } - public FcmPosition[] getPositions() { + public Position[] getPositions() { return positions; } - public void setPositions(FcmPosition[] positions) { + public void setPositions(Position[] positions) { this.positions = positions; } diff --git a/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java b/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java index b8e7c186..3ed2948a 100644 --- a/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java +++ b/src/main/java/com/coinbase/prime/futures/ScheduleEntityFuturesSweepRequest.java @@ -78,16 +78,6 @@ public Builder entityId(String entityId) { return this; } - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder currency(String currency) { - this.currency = currency; - return this; - } - public ScheduleEntityFuturesSweepRequest build() throws CoinbaseClientException { this.validate(); return new ScheduleEntityFuturesSweepRequest(this); diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java index 1bde00e9..fa853776 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java @@ -37,7 +37,7 @@ public class ActivityMetadataConsensus { * If activity has passed consensus threshold */ @JsonProperty("has_passed_consensus") - private boolean hasPassedConsensus; + private Boolean hasPassedConsensus; public ActivityMetadataConsensus() { } @@ -53,24 +53,24 @@ public String getApprovalDeadline() { public void setApprovalDeadline(String approvalDeadline) { this.approvalDeadline = approvalDeadline; } - public boolean getHasPassedConsensus() { + public Boolean getHasPassedConsensus() { return hasPassedConsensus; } - public void setHasPassedConsensus(boolean hasPassedConsensus) { + public void setHasPassedConsensus(Boolean hasPassedConsensus) { this.hasPassedConsensus = hasPassedConsensus; } public static class Builder { private String approvalDeadline; - private boolean hasPassedConsensus; + private Boolean hasPassedConsensus; public Builder approvalDeadline(String approvalDeadline) { this.approvalDeadline = approvalDeadline; return this; } - public Builder hasPassedConsensus(boolean hasPassedConsensus) { + public Builder hasPassedConsensus(Boolean hasPassedConsensus) { this.hasPassedConsensus = hasPassedConsensus; return this; } diff --git a/src/main/java/com/coinbase/prime/model/Asset.java b/src/main/java/com/coinbase/prime/model/Asset.java index 66807a0c..60240611 100644 --- a/src/main/java/com/coinbase/prime/model/Asset.java +++ b/src/main/java/com/coinbase/prime/model/Asset.java @@ -52,7 +52,7 @@ public class Asset { * Indicates whether this asset can be traded */ @JsonProperty("trading_supported") - private boolean tradingSupported; + private Boolean tradingSupported; /** * Base URL to our recommended block explorer (crypto only) @@ -98,11 +98,11 @@ public String getDecimalPrecision() { public void setDecimalPrecision(String decimalPrecision) { this.decimalPrecision = decimalPrecision; } - public boolean getTradingSupported() { + public Boolean getTradingSupported() { return tradingSupported; } - public void setTradingSupported(boolean tradingSupported) { + public void setTradingSupported(Boolean tradingSupported) { this.tradingSupported = tradingSupported; } public String getExplorerUrl() { @@ -126,7 +126,7 @@ public static class Builder { private String decimalPrecision; - private boolean tradingSupported; + private Boolean tradingSupported; private String explorerUrl; @@ -147,7 +147,7 @@ public Builder decimalPrecision(String decimalPrecision) { return this; } - public Builder tradingSupported(boolean tradingSupported) { + public Builder tradingSupported(Boolean tradingSupported) { this.tradingSupported = tradingSupported; return this; } diff --git a/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java new file mode 100644 index 00000000..2f54dc6e --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java @@ -0,0 +1,179 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; + +public class CommissionDetailTotal { + @JsonProperty("total_commission") + private String totalCommission; + + /** + * CB fee + */ + @JsonProperty("client_commission") + private String clientCommission; + + /** + * Exchange fees + */ + @JsonProperty("venue_commission") + private String venueCommission; + + @JsonProperty("ces_commission") + private String cesCommission; + + @JsonProperty("financing_commission") + private String financingCommission; + + /** + * NFA fees + */ + @JsonProperty("regulatory_commission") + private String regulatoryCommission; + + /** + * Clearing fees + */ + @JsonProperty("clearing_commission") + private String clearingCommission; + + public CommissionDetailTotal() { + } + + public CommissionDetailTotal(Builder builder) { + this.totalCommission = builder.totalCommission; + this.clientCommission = builder.clientCommission; + this.venueCommission = builder.venueCommission; + this.cesCommission = builder.cesCommission; + this.financingCommission = builder.financingCommission; + this.regulatoryCommission = builder.regulatoryCommission; + this.clearingCommission = builder.clearingCommission; + } + public String getTotalCommission() { + return totalCommission; + } + + public void setTotalCommission(String totalCommission) { + this.totalCommission = totalCommission; + } + public String getClientCommission() { + return clientCommission; + } + + public void setClientCommission(String clientCommission) { + this.clientCommission = clientCommission; + } + public String getVenueCommission() { + return venueCommission; + } + + public void setVenueCommission(String venueCommission) { + this.venueCommission = venueCommission; + } + public String getCesCommission() { + return cesCommission; + } + + public void setCesCommission(String cesCommission) { + this.cesCommission = cesCommission; + } + public String getFinancingCommission() { + return financingCommission; + } + + public void setFinancingCommission(String financingCommission) { + this.financingCommission = financingCommission; + } + public String getRegulatoryCommission() { + return regulatoryCommission; + } + + public void setRegulatoryCommission(String regulatoryCommission) { + this.regulatoryCommission = regulatoryCommission; + } + public String getClearingCommission() { + return clearingCommission; + } + + public void setClearingCommission(String clearingCommission) { + this.clearingCommission = clearingCommission; + } + public static class Builder { + private String totalCommission; + + private String clientCommission; + + private String venueCommission; + + private String cesCommission; + + private String financingCommission; + + private String regulatoryCommission; + + private String clearingCommission; + + public Builder totalCommission(String totalCommission) { + this.totalCommission = totalCommission; + return this; + } + + public Builder clientCommission(String clientCommission) { + this.clientCommission = clientCommission; + return this; + } + + public Builder venueCommission(String venueCommission) { + this.venueCommission = venueCommission; + return this; + } + + public Builder cesCommission(String cesCommission) { + this.cesCommission = cesCommission; + return this; + } + + public Builder financingCommission(String financingCommission) { + this.financingCommission = financingCommission; + return this; + } + + public Builder regulatoryCommission(String regulatoryCommission) { + this.regulatoryCommission = regulatoryCommission; + return this; + } + + public Builder clearingCommission(String clearingCommission) { + this.clearingCommission = clearingCommission; + return this; + } + + public CommissionDetailTotal build() { + return new CommissionDetailTotal(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java index 8966673a..d08f8098 100644 --- a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java @@ -31,7 +31,7 @@ public class CreateAllocationResponseBody { * The success boolean for the post allocation */ @JsonProperty("success") - private boolean success; + private Boolean success; /** * The allocation id for the post allocation @@ -53,11 +53,11 @@ public CreateAllocationResponseBody(Builder builder) { this.allocationId = builder.allocationId; this.failureReason = builder.failureReason; } - public boolean getSuccess() { + public Boolean getSuccess() { return success; } - public void setSuccess(boolean success) { + public void setSuccess(Boolean success) { this.success = success; } public String getAllocationId() { @@ -75,13 +75,13 @@ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } public static class Builder { - private boolean success; + private Boolean success; private String allocationId; private String failureReason; - public Builder success(boolean success) { + public Builder success(Boolean success) { this.success = success; return this; } diff --git a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java index 5945f1d8..f6a7f0fa 100644 --- a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java @@ -31,7 +31,7 @@ public class CreateNetAllocationResponseBody { * The success boolean for the post net allocation */ @JsonProperty("success") - private boolean success; + private Boolean success; /** * The netting_id for the post net allocation @@ -67,11 +67,11 @@ public CreateNetAllocationResponseBody(Builder builder) { this.sellAllocationId = builder.sellAllocationId; this.failureReason = builder.failureReason; } - public boolean getSuccess() { + public Boolean getSuccess() { return success; } - public void setSuccess(boolean success) { + public void setSuccess(Boolean success) { this.success = success; } public String getNettingId() { @@ -103,7 +103,7 @@ public void setFailureReason(String failureReason) { this.failureReason = failureReason; } public static class Builder { - private boolean success; + private Boolean success; private String nettingId; @@ -113,7 +113,7 @@ public static class Builder { private String failureReason; - public Builder success(boolean success) { + public Builder success(Boolean success) { this.success = success; return this; } diff --git a/src/main/java/com/coinbase/prime/model/EntityUser.java b/src/main/java/com/coinbase/prime/model/EntityUser.java index 463534bd..372a1b55 100644 --- a/src/main/java/com/coinbase/prime/model/EntityUser.java +++ b/src/main/java/com/coinbase/prime/model/EntityUser.java @@ -19,13 +19,16 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.SecondaryPermission; import com.coinbase.prime.model.enums.UserRole; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class EntityUser { /** @@ -55,6 +58,18 @@ public class EntityUser { @JsonProperty("role") private UserRole role; + /** + * All primary roles assigned to the user. + */ + @JsonProperty("roles") + private List roles; + + /** + * All secondary permissions assigned to the user. + */ + @JsonProperty("secondary_permissions") + private List secondaryPermissions; + public EntityUser() { } @@ -64,6 +79,8 @@ public EntityUser(Builder builder) { this.email = builder.email; this.entityId = builder.entityId; this.role = builder.role; + this.roles = builder.roles; + this.secondaryPermissions = builder.secondaryPermissions; } public String getId() { return id; @@ -100,6 +117,20 @@ public UserRole getRole() { public void setRole(UserRole role) { this.role = role; } + public List getRoles() { + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + public List getSecondaryPermissions() { + return secondaryPermissions; + } + + public void setSecondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + } public static class Builder { private String id; @@ -111,6 +142,10 @@ public static class Builder { private UserRole role; + private List roles; + + private List secondaryPermissions; + public Builder id(String id) { this.id = id; return this; @@ -136,6 +171,16 @@ public Builder role(UserRole role) { return this; } + public Builder roles(List roles) { + this.roles = roles; + return this; + } + + public Builder secondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + return this; + } + public EntityUser build() { return new EntityUser(this); } diff --git a/src/main/java/com/coinbase/prime/model/EvmParams.java b/src/main/java/com/coinbase/prime/model/EvmParams.java index 6476c469..bc186abc 100644 --- a/src/main/java/com/coinbase/prime/model/EvmParams.java +++ b/src/main/java/com/coinbase/prime/model/EvmParams.java @@ -31,13 +31,13 @@ public class EvmParams { * Option to disable dynamic gas price adjustment for EVM transactions prior to signing and broadcast. Defaults to false. */ @JsonProperty("disable_dynamic_gas") - private boolean disableDynamicGas; + private Boolean disableDynamicGas; /** * Option to disable dynamic nonce when creating a transaction. Defaults to false. */ @JsonProperty("disable_dynamic_nonce") - private boolean disableDynamicNonce; + private Boolean disableDynamicNonce; /** * Transaction ID to replace (for speed-up/cancel operations). Common use cases: 1) Gas Price Adjustments: When a transaction is stuck due to low gas price, a new transaction with the same nonce but higher gas price can be submitted to replace it. 2) Transaction Cancellation: A user might want to cancel a pending transaction by replacing it with a new transaction (often a 0-value transfer to themselves with higher gas price). Note: When using this field, the disable_dynamic_nonce option must be set to false because the nonce would be automatically managed by the system. @@ -67,18 +67,18 @@ public EvmParams(Builder builder) { this.chainId = builder.chainId; this.networkName = builder.networkName; } - public boolean getDisableDynamicGas() { + public Boolean getDisableDynamicGas() { return disableDynamicGas; } - public void setDisableDynamicGas(boolean disableDynamicGas) { + public void setDisableDynamicGas(Boolean disableDynamicGas) { this.disableDynamicGas = disableDynamicGas; } - public boolean getDisableDynamicNonce() { + public Boolean getDisableDynamicNonce() { return disableDynamicNonce; } - public void setDisableDynamicNonce(boolean disableDynamicNonce) { + public void setDisableDynamicNonce(Boolean disableDynamicNonce) { this.disableDynamicNonce = disableDynamicNonce; } public String getReplacedTransactionId() { @@ -103,9 +103,9 @@ public void setNetworkName(String networkName) { this.networkName = networkName; } public static class Builder { - private boolean disableDynamicGas; + private Boolean disableDynamicGas; - private boolean disableDynamicNonce; + private Boolean disableDynamicNonce; private String replacedTransactionId; @@ -113,12 +113,12 @@ public static class Builder { private String networkName; - public Builder disableDynamicGas(boolean disableDynamicGas) { + public Builder disableDynamicGas(Boolean disableDynamicGas) { this.disableDynamicGas = disableDynamicGas; return this; } - public Builder disableDynamicNonce(boolean disableDynamicNonce) { + public Builder disableDynamicNonce(Boolean disableDynamicNonce) { this.disableDynamicNonce = disableDynamicNonce; return this; } diff --git a/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java new file mode 100644 index 00000000..4cfa62bb --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java @@ -0,0 +1,84 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; + +public class FcmScheduledMaintenance { + /** + * Maintenance window start time + */ + @JsonProperty("start_time") + private OffsetDateTime startTime; + + /** + * Maintenance window end time + */ + @JsonProperty("end_time") + private OffsetDateTime endTime; + + public FcmScheduledMaintenance() { + } + + public FcmScheduledMaintenance(Builder builder) { + this.startTime = builder.startTime; + this.endTime = builder.endTime; + } + public OffsetDateTime getStartTime() { + return startTime; + } + + public void setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + } + public OffsetDateTime getEndTime() { + return endTime; + } + + public void setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + } + public static class Builder { + private OffsetDateTime startTime; + + private OffsetDateTime endTime; + + public Builder startTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + public Builder endTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + public FcmScheduledMaintenance build() { + return new FcmScheduledMaintenance(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java new file mode 100644 index 00000000..24f17d44 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java @@ -0,0 +1,225 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.FcmScheduledMaintenance; +import com.coinbase.prime.model.enums.FcmTradingSessionClosedReason; +import com.coinbase.prime.model.enums.FcmTradingSessionState; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; + +public class FcmTradingSessionDetails { + /** + * Whether the trading session is currently open + */ + @JsonProperty("session_open") + private Boolean sessionOpen; + + /** + * Trading session open time + */ + @JsonProperty("open_time") + private OffsetDateTime openTime; + + /** + * Trading session close time + */ + @JsonProperty("close_time") + private OffsetDateTime closeTime; + + @JsonProperty("session_state") + private FcmTradingSessionState sessionState; + + /** + * Whether after-hours order entry is disabled + */ + @JsonProperty("after_hours_order_entry_disabled") + private Boolean afterHoursOrderEntryDisabled; + + @JsonProperty("closed_reason") + private FcmTradingSessionClosedReason closedReason; + + @JsonProperty("maintenance") + private FcmScheduledMaintenance maintenance; + + /** + * Settlement timestamp from previous trading day + */ + @JsonProperty("settlement_timestamp") + private OffsetDateTime settlementTimestamp; + + /** + * Settlement price from previous trading day + */ + @JsonProperty("settlement_price") + private String settlementPrice; + + public FcmTradingSessionDetails() { + } + + public FcmTradingSessionDetails(Builder builder) { + this.sessionOpen = builder.sessionOpen; + this.openTime = builder.openTime; + this.closeTime = builder.closeTime; + this.sessionState = builder.sessionState; + this.afterHoursOrderEntryDisabled = builder.afterHoursOrderEntryDisabled; + this.closedReason = builder.closedReason; + this.maintenance = builder.maintenance; + this.settlementTimestamp = builder.settlementTimestamp; + this.settlementPrice = builder.settlementPrice; + } + public Boolean getSessionOpen() { + return sessionOpen; + } + + public void setSessionOpen(Boolean sessionOpen) { + this.sessionOpen = sessionOpen; + } + public OffsetDateTime getOpenTime() { + return openTime; + } + + public void setOpenTime(OffsetDateTime openTime) { + this.openTime = openTime; + } + public OffsetDateTime getCloseTime() { + return closeTime; + } + + public void setCloseTime(OffsetDateTime closeTime) { + this.closeTime = closeTime; + } + public FcmTradingSessionState getSessionState() { + return sessionState; + } + + public void setSessionState(FcmTradingSessionState sessionState) { + this.sessionState = sessionState; + } + public Boolean getAfterHoursOrderEntryDisabled() { + return afterHoursOrderEntryDisabled; + } + + public void setAfterHoursOrderEntryDisabled(Boolean afterHoursOrderEntryDisabled) { + this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; + } + public FcmTradingSessionClosedReason getClosedReason() { + return closedReason; + } + + public void setClosedReason(FcmTradingSessionClosedReason closedReason) { + this.closedReason = closedReason; + } + public FcmScheduledMaintenance getMaintenance() { + return maintenance; + } + + public void setMaintenance(FcmScheduledMaintenance maintenance) { + this.maintenance = maintenance; + } + public OffsetDateTime getSettlementTimestamp() { + return settlementTimestamp; + } + + public void setSettlementTimestamp(OffsetDateTime settlementTimestamp) { + this.settlementTimestamp = settlementTimestamp; + } + public String getSettlementPrice() { + return settlementPrice; + } + + public void setSettlementPrice(String settlementPrice) { + this.settlementPrice = settlementPrice; + } + public static class Builder { + private Boolean sessionOpen; + + private OffsetDateTime openTime; + + private OffsetDateTime closeTime; + + private FcmTradingSessionState sessionState; + + private Boolean afterHoursOrderEntryDisabled; + + private FcmTradingSessionClosedReason closedReason; + + private FcmScheduledMaintenance maintenance; + + private OffsetDateTime settlementTimestamp; + + private String settlementPrice; + + public Builder sessionOpen(Boolean sessionOpen) { + this.sessionOpen = sessionOpen; + return this; + } + + public Builder openTime(OffsetDateTime openTime) { + this.openTime = openTime; + return this; + } + + public Builder closeTime(OffsetDateTime closeTime) { + this.closeTime = closeTime; + return this; + } + + public Builder sessionState(FcmTradingSessionState sessionState) { + this.sessionState = sessionState; + return this; + } + + public Builder afterHoursOrderEntryDisabled(Boolean afterHoursOrderEntryDisabled) { + this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; + return this; + } + + public Builder closedReason(FcmTradingSessionClosedReason closedReason) { + this.closedReason = closedReason; + return this; + } + + public Builder maintenance(FcmScheduledMaintenance maintenance) { + this.maintenance = maintenance; + return this; + } + + public Builder settlementTimestamp(OffsetDateTime settlementTimestamp) { + this.settlementTimestamp = settlementTimestamp; + return this; + } + + public Builder settlementPrice(String settlementPrice) { + this.settlementPrice = settlementPrice; + return this; + } + + public FcmTradingSessionDetails build() { + return new FcmTradingSessionDetails(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/Fill.java b/src/main/java/com/coinbase/prime/model/Fill.java index 0d408389..a244537a 100644 --- a/src/main/java/com/coinbase/prime/model/Fill.java +++ b/src/main/java/com/coinbase/prime/model/Fill.java @@ -19,7 +19,9 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.CommissionDetailTotal; import com.coinbase.prime.model.enums.OrderSide; +import com.coinbase.prime.model.enums.ProductType; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -104,6 +106,12 @@ public class Fill { @JsonProperty("ces_commission") private String cesCommission; + @JsonProperty("product_type") + private ProductType productType; + + @JsonProperty("commission_detail_total") + private CommissionDetailTotal commissionDetailTotal; + public Fill() { } @@ -121,6 +129,8 @@ public Fill(Builder builder) { this.venue = builder.venue; this.venueFees = builder.venueFees; this.cesCommission = builder.cesCommission; + this.productType = builder.productType; + this.commissionDetailTotal = builder.commissionDetailTotal; } public String getId() { return id; @@ -213,6 +223,20 @@ public String getCesCommission() { public void setCesCommission(String cesCommission) { this.cesCommission = cesCommission; } + public ProductType getProductType() { + return productType; + } + + public void setProductType(ProductType productType) { + this.productType = productType; + } + public CommissionDetailTotal getCommissionDetailTotal() { + return commissionDetailTotal; + } + + public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + } public static class Builder { private String id; @@ -240,6 +264,10 @@ public static class Builder { private String cesCommission; + private ProductType productType; + + private CommissionDetailTotal commissionDetailTotal; + public Builder id(String id) { this.id = id; return this; @@ -305,6 +333,16 @@ public Builder cesCommission(String cesCommission) { return this; } + public Builder productType(ProductType productType) { + this.productType = productType; + return this; + } + + public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + return this; + } + public Fill build() { return new Fill(this); } diff --git a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java new file mode 100644 index 00000000..202b3fdd --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java @@ -0,0 +1,267 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.ContractExpiryType; +import com.coinbase.prime.model.PerpetualProductDetails; +import com.coinbase.prime.model.enums.RiskManagementType; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; + +public class FutureProductDetails { + /** + * Contract code identifier + */ + @JsonProperty("contract_code") + private String contractCode; + + /** + * Contract size + */ + @JsonProperty("contract_size") + private String contractSize; + + /** + * Contract expiry timestamp + */ + @JsonProperty("contract_expiry") + private OffsetDateTime contractExpiry; + + /** + * Contract root unit (underlying asset) + */ + @JsonProperty("contract_root_unit") + private String contractRootUnit; + + @JsonProperty("contract_expiry_type") + private ContractExpiryType contractExpiryType; + + @JsonProperty("risk_managed_by") + private RiskManagementType riskManagedBy; + + /** + * The venue this product trades on + */ + @JsonProperty("venue") + private String venue; + + /** + * Descriptive name for the product group + */ + @JsonProperty("group_description") + private String groupDescription; + + /** + * IANA time zone for contract expiration + */ + @JsonProperty("contract_expiry_timezone") + private String contractExpiryTimezone; + + /** + * Short version of the group description + */ + @JsonProperty("group_short_description") + private String groupShortDescription; + + @JsonProperty("perpetual_details") + private PerpetualProductDetails perpetualDetails; + + public FutureProductDetails() { + } + + public FutureProductDetails(Builder builder) { + this.contractCode = builder.contractCode; + this.contractSize = builder.contractSize; + this.contractExpiry = builder.contractExpiry; + this.contractRootUnit = builder.contractRootUnit; + this.contractExpiryType = builder.contractExpiryType; + this.riskManagedBy = builder.riskManagedBy; + this.venue = builder.venue; + this.groupDescription = builder.groupDescription; + this.contractExpiryTimezone = builder.contractExpiryTimezone; + this.groupShortDescription = builder.groupShortDescription; + this.perpetualDetails = builder.perpetualDetails; + } + public String getContractCode() { + return contractCode; + } + + public void setContractCode(String contractCode) { + this.contractCode = contractCode; + } + public String getContractSize() { + return contractSize; + } + + public void setContractSize(String contractSize) { + this.contractSize = contractSize; + } + public OffsetDateTime getContractExpiry() { + return contractExpiry; + } + + public void setContractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + } + public String getContractRootUnit() { + return contractRootUnit; + } + + public void setContractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + } + public ContractExpiryType getContractExpiryType() { + return contractExpiryType; + } + + public void setContractExpiryType(ContractExpiryType contractExpiryType) { + this.contractExpiryType = contractExpiryType; + } + public RiskManagementType getRiskManagedBy() { + return riskManagedBy; + } + + public void setRiskManagedBy(RiskManagementType riskManagedBy) { + this.riskManagedBy = riskManagedBy; + } + public String getVenue() { + return venue; + } + + public void setVenue(String venue) { + this.venue = venue; + } + public String getGroupDescription() { + return groupDescription; + } + + public void setGroupDescription(String groupDescription) { + this.groupDescription = groupDescription; + } + public String getContractExpiryTimezone() { + return contractExpiryTimezone; + } + + public void setContractExpiryTimezone(String contractExpiryTimezone) { + this.contractExpiryTimezone = contractExpiryTimezone; + } + public String getGroupShortDescription() { + return groupShortDescription; + } + + public void setGroupShortDescription(String groupShortDescription) { + this.groupShortDescription = groupShortDescription; + } + public PerpetualProductDetails getPerpetualDetails() { + return perpetualDetails; + } + + public void setPerpetualDetails(PerpetualProductDetails perpetualDetails) { + this.perpetualDetails = perpetualDetails; + } + public static class Builder { + private String contractCode; + + private String contractSize; + + private OffsetDateTime contractExpiry; + + private String contractRootUnit; + + private ContractExpiryType contractExpiryType; + + private RiskManagementType riskManagedBy; + + private String venue; + + private String groupDescription; + + private String contractExpiryTimezone; + + private String groupShortDescription; + + private PerpetualProductDetails perpetualDetails; + + public Builder contractCode(String contractCode) { + this.contractCode = contractCode; + return this; + } + + public Builder contractSize(String contractSize) { + this.contractSize = contractSize; + return this; + } + + public Builder contractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + return this; + } + + public Builder contractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + return this; + } + + public Builder contractExpiryType(ContractExpiryType contractExpiryType) { + this.contractExpiryType = contractExpiryType; + return this; + } + + public Builder riskManagedBy(RiskManagementType riskManagedBy) { + this.riskManagedBy = riskManagedBy; + return this; + } + + public Builder venue(String venue) { + this.venue = venue; + return this; + } + + public Builder groupDescription(String groupDescription) { + this.groupDescription = groupDescription; + return this; + } + + public Builder contractExpiryTimezone(String contractExpiryTimezone) { + this.contractExpiryTimezone = contractExpiryTimezone; + return this; + } + + public Builder groupShortDescription(String groupShortDescription) { + this.groupShortDescription = groupShortDescription; + return this; + } + + public Builder perpetualDetails(PerpetualProductDetails perpetualDetails) { + this.perpetualDetails = perpetualDetails; + return this; + } + + public FutureProductDetails build() { + return new FutureProductDetails(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/FuturesSweep.java b/src/main/java/com/coinbase/prime/model/FuturesSweep.java index 2ae98206..12c2d15e 100644 --- a/src/main/java/com/coinbase/prime/model/FuturesSweep.java +++ b/src/main/java/com/coinbase/prime/model/FuturesSweep.java @@ -43,7 +43,7 @@ public class FuturesSweep { * Should sweep all */ @JsonProperty("should_sweep_all") - private boolean shouldSweepAll; + private Boolean shouldSweepAll; @JsonProperty("status") private FuturesSweepStatus status; @@ -78,11 +78,11 @@ public SweepAmount getRequestedAmount() { public void setRequestedAmount(SweepAmount requestedAmount) { this.requestedAmount = requestedAmount; } - public boolean getShouldSweepAll() { + public Boolean getShouldSweepAll() { return shouldSweepAll; } - public void setShouldSweepAll(boolean shouldSweepAll) { + public void setShouldSweepAll(Boolean shouldSweepAll) { this.shouldSweepAll = shouldSweepAll; } public FuturesSweepStatus getStatus() { @@ -104,7 +104,7 @@ public static class Builder { private SweepAmount requestedAmount; - private boolean shouldSweepAll; + private Boolean shouldSweepAll; private FuturesSweepStatus status; @@ -120,7 +120,7 @@ public Builder requestedAmount(SweepAmount requestedAmount) { return this; } - public Builder shouldSweepAll(boolean shouldSweepAll) { + public Builder shouldSweepAll(Boolean shouldSweepAll) { this.shouldSweepAll = shouldSweepAll; return this; } diff --git a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java deleted file mode 100644 index 15d26bed..00000000 --- a/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2025-present Coinbase Global, Inc. - * - * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Do not edit the class manually. - */ - -package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; - -public class GoogleTypeDate { - /** - * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. - */ - @JsonProperty("year") - private Integer year; - - /** - * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. - */ - @JsonProperty("month") - private Integer month; - - /** - * Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. - */ - @JsonProperty("day") - private Integer day; - - public GoogleTypeDate() { - } - - public GoogleTypeDate(Builder builder) { - this.year = builder.year; - this.month = builder.month; - this.day = builder.day; - } - public Integer getYear() { - return year; - } - - public void setYear(Integer year) { - this.year = year; - } - public Integer getMonth() { - return month; - } - - public void setMonth(Integer month) { - this.month = month; - } - public Integer getDay() { - return day; - } - - public void setDay(Integer day) { - this.day = day; - } - public static class Builder { - private Integer year; - - private Integer month; - - private Integer day; - - public Builder year(Integer year) { - this.year = year; - return this; - } - - public Builder month(Integer month) { - this.month = month; - return this; - } - - public Builder day(Integer day) { - this.day = day; - return this; - } - - public GoogleTypeDate build() { - return new GoogleTypeDate(this); - } - } -} - diff --git a/src/main/java/com/coinbase/prime/model/MarginSummary.java b/src/main/java/com/coinbase/prime/model/MarginSummary.java index 1c9c6338..3952b0d1 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummary.java @@ -104,7 +104,7 @@ public class MarginSummary { * Whether or not a entity is frozen due to balance outstanding or other reason */ @JsonProperty("frozen") - private boolean frozen; + private Boolean frozen; /** * The reason why a entity is frozen @@ -116,13 +116,13 @@ public class MarginSummary { * Whether TF is enabled for the entity. This field is deprecated and will be removed in the future. */ @JsonProperty("tf_enabled") - private boolean tfEnabled; + private Boolean tfEnabled; /** * Whether PM is enabled for the entity */ @JsonProperty("pm_enabled") - private boolean pmEnabled; + private Boolean pmEnabled; /** * Market rates for the list of assets @@ -337,11 +337,11 @@ public String getTfAdjustedEquity() { public void setTfAdjustedEquity(String tfAdjustedEquity) { this.tfAdjustedEquity = tfAdjustedEquity; } - public boolean getFrozen() { + public Boolean getFrozen() { return frozen; } - public void setFrozen(boolean frozen) { + public void setFrozen(Boolean frozen) { this.frozen = frozen; } public String getFrozenReason() { @@ -351,18 +351,18 @@ public String getFrozenReason() { public void setFrozenReason(String frozenReason) { this.frozenReason = frozenReason; } - public boolean getTfEnabled() { + public Boolean getTfEnabled() { return tfEnabled; } - public void setTfEnabled(boolean tfEnabled) { + public void setTfEnabled(Boolean tfEnabled) { this.tfEnabled = tfEnabled; } - public boolean getPmEnabled() { + public Boolean getPmEnabled() { return pmEnabled; } - public void setPmEnabled(boolean pmEnabled) { + public void setPmEnabled(Boolean pmEnabled) { this.pmEnabled = pmEnabled; } public List getMarketRates() { @@ -507,13 +507,13 @@ public static class Builder { private String tfAdjustedEquity; - private boolean frozen; + private Boolean frozen; private String frozenReason; - private boolean tfEnabled; + private Boolean tfEnabled; - private boolean pmEnabled; + private Boolean pmEnabled; private List marketRates; @@ -604,7 +604,7 @@ public Builder tfAdjustedEquity(String tfAdjustedEquity) { return this; } - public Builder frozen(boolean frozen) { + public Builder frozen(Boolean frozen) { this.frozen = frozen; return this; } @@ -614,12 +614,12 @@ public Builder frozenReason(String frozenReason) { return this; } - public Builder tfEnabled(boolean tfEnabled) { + public Builder tfEnabled(Boolean tfEnabled) { this.tfEnabled = tfEnabled; return this; } - public Builder pmEnabled(boolean pmEnabled) { + public Builder pmEnabled(Boolean pmEnabled) { this.pmEnabled = pmEnabled; return this; } diff --git a/src/main/java/com/coinbase/prime/model/NetworkDetails.java b/src/main/java/com/coinbase/prime/model/NetworkDetails.java index 249fedd5..2661493e 100644 --- a/src/main/java/com/coinbase/prime/model/NetworkDetails.java +++ b/src/main/java/com/coinbase/prime/model/NetworkDetails.java @@ -47,31 +47,31 @@ public class NetworkDetails { * Indicates whether this network is the default network for the asset */ @JsonProperty("default") - private boolean _default; + private Boolean _default; /** * Indicates whether this network supports trading */ @JsonProperty("trading_supported") - private boolean tradingSupported; + private Boolean tradingSupported; /** * Indicates whether this network supports vault */ @JsonProperty("vault_supported") - private boolean vaultSupported; + private Boolean vaultSupported; /** * Indicates whether this network supports prime custody */ @JsonProperty("prime_custody_supported") - private boolean primeCustodySupported; + private Boolean primeCustodySupported; /** * Indicates whether this network requires a destination tag */ @JsonProperty("destination_tag_required") - private boolean destinationTagRequired; + private Boolean destinationTagRequired; /** * Base URL to our recommended block explorer (crypto only) @@ -121,39 +121,39 @@ public String getMaxDecimals() { public void setMaxDecimals(String maxDecimals) { this.maxDecimals = maxDecimals; } - public boolean getDefault() { + public Boolean getDefault() { return _default; } - public void setDefault(boolean _default) { + public void setDefault(Boolean _default) { this._default = _default; } - public boolean getTradingSupported() { + public Boolean getTradingSupported() { return tradingSupported; } - public void setTradingSupported(boolean tradingSupported) { + public void setTradingSupported(Boolean tradingSupported) { this.tradingSupported = tradingSupported; } - public boolean getVaultSupported() { + public Boolean getVaultSupported() { return vaultSupported; } - public void setVaultSupported(boolean vaultSupported) { + public void setVaultSupported(Boolean vaultSupported) { this.vaultSupported = vaultSupported; } - public boolean getPrimeCustodySupported() { + public Boolean getPrimeCustodySupported() { return primeCustodySupported; } - public void setPrimeCustodySupported(boolean primeCustodySupported) { + public void setPrimeCustodySupported(Boolean primeCustodySupported) { this.primeCustodySupported = primeCustodySupported; } - public boolean getDestinationTagRequired() { + public Boolean getDestinationTagRequired() { return destinationTagRequired; } - public void setDestinationTagRequired(boolean destinationTagRequired) { + public void setDestinationTagRequired(Boolean destinationTagRequired) { this.destinationTagRequired = destinationTagRequired; } public String getNetworkLink() { @@ -177,15 +177,15 @@ public static class Builder { private String maxDecimals; - private boolean _default; + private Boolean _default; - private boolean tradingSupported; + private Boolean tradingSupported; - private boolean vaultSupported; + private Boolean vaultSupported; - private boolean primeCustodySupported; + private Boolean primeCustodySupported; - private boolean destinationTagRequired; + private Boolean destinationTagRequired; private String networkLink; @@ -206,27 +206,27 @@ public Builder maxDecimals(String maxDecimals) { return this; } - public Builder _default(boolean _default) { + public Builder _default(Boolean _default) { this._default = _default; return this; } - public Builder tradingSupported(boolean tradingSupported) { + public Builder tradingSupported(Boolean tradingSupported) { this.tradingSupported = tradingSupported; return this; } - public Builder vaultSupported(boolean vaultSupported) { + public Builder vaultSupported(Boolean vaultSupported) { this.vaultSupported = vaultSupported; return this; } - public Builder primeCustodySupported(boolean primeCustodySupported) { + public Builder primeCustodySupported(Boolean primeCustodySupported) { this.primeCustodySupported = primeCustodySupported; return this; } - public Builder destinationTagRequired(boolean destinationTagRequired) { + public Builder destinationTagRequired(Boolean destinationTagRequired) { this.destinationTagRequired = destinationTagRequired; return this; } diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java index fadc12f3..ee023365 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java @@ -66,7 +66,7 @@ public class OnchainTransactionDetails { * If set to true, the transaction will not be broadcast to the network. You can still retrieve the signed transaction from the GetTransaction endpoint by transaction ID once the transaction is created. */ @JsonProperty("skip_broadcast") - private boolean skipBroadcast; + private Boolean skipBroadcast; /** * Reason for transaction failure if applicable @@ -133,11 +133,11 @@ public String getDestinationAddress() { public void setDestinationAddress(String destinationAddress) { this.destinationAddress = destinationAddress; } - public boolean getSkipBroadcast() { + public Boolean getSkipBroadcast() { return skipBroadcast; } - public void setSkipBroadcast(boolean skipBroadcast) { + public void setSkipBroadcast(Boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; } public String getFailureReason() { @@ -167,7 +167,7 @@ public static class Builder { private String destinationAddress; - private boolean skipBroadcast; + private Boolean skipBroadcast; private String failureReason; @@ -203,7 +203,7 @@ public Builder destinationAddress(String destinationAddress) { return this; } - public Builder skipBroadcast(boolean skipBroadcast) { + public Builder skipBroadcast(Boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; return this; } diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index 0c2fc7da..5edf73f6 100644 --- a/src/main/java/com/coinbase/prime/model/Order.java +++ b/src/main/java/com/coinbase/prime/model/Order.java @@ -20,10 +20,12 @@ package com.coinbase.prime.model; import com.coinbase.prime.model.LimitOrderEdit; +import com.coinbase.prime.model.CommissionDetailTotal; import com.coinbase.prime.model.OrderEdit; import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.OrderStatus; import com.coinbase.prime.model.enums.OrderType; +import com.coinbase.prime.model.enums.ProductType; import com.coinbase.prime.model.enums.TimeInForceType; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -178,7 +180,7 @@ public class Order { * Post-only flag - indicates whether the order was placed as post-only */ @JsonProperty("post_only") - private boolean postOnly; + private Boolean postOnly; /** * The history of order edits (deprecated: use edit_history instead) @@ -190,7 +192,7 @@ public class Order { * Indicates if this was a raise exact order (size inclusive of fees for sell orders in quote) */ @JsonProperty("is_raise_exact") - private boolean isRaiseExact; + private Boolean isRaiseExact; /** * Display size for the order @@ -234,6 +236,12 @@ public class Order { @JsonProperty("wig_level") private String wigLevel; + @JsonProperty("product_type") + private ProductType productType; + + @JsonProperty("commission_detail_total") + private CommissionDetailTotal commissionDetailTotal; + public Order() { } @@ -273,6 +281,8 @@ public Order(Builder builder) { this.pegOffsetType = builder.pegOffsetType; this.offset = builder.offset; this.wigLevel = builder.wigLevel; + this.productType = builder.productType; + this.commissionDetailTotal = builder.commissionDetailTotal; } public String getId() { return id; @@ -449,11 +459,11 @@ public String getClientProductId() { public void setClientProductId(String clientProductId) { this.clientProductId = clientProductId; } - public boolean getPostOnly() { + public Boolean getPostOnly() { return postOnly; } - public void setPostOnly(boolean postOnly) { + public void setPostOnly(Boolean postOnly) { this.postOnly = postOnly; } public List getOrderEditHistory() { @@ -463,11 +473,11 @@ public List getOrderEditHistory() { public void setOrderEditHistory(List orderEditHistory) { this.orderEditHistory = orderEditHistory; } - public boolean getIsRaiseExact() { + public Boolean getIsRaiseExact() { return isRaiseExact; } - public void setIsRaiseExact(boolean isRaiseExact) { + public void setIsRaiseExact(Boolean isRaiseExact) { this.isRaiseExact = isRaiseExact; } public String getDisplaySize() { @@ -519,6 +529,20 @@ public String getWigLevel() { public void setWigLevel(String wigLevel) { this.wigLevel = wigLevel; } + public ProductType getProductType() { + return productType; + } + + public void setProductType(ProductType productType) { + this.productType = productType; + } + public CommissionDetailTotal getCommissionDetailTotal() { + return commissionDetailTotal; + } + + public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + } public static class Builder { private String id; @@ -570,11 +594,11 @@ public static class Builder { private String clientProductId; - private boolean postOnly; + private Boolean postOnly; private List orderEditHistory; - private boolean isRaiseExact; + private Boolean isRaiseExact; private String displaySize; @@ -590,6 +614,10 @@ public static class Builder { private String wigLevel; + private ProductType productType; + + private CommissionDetailTotal commissionDetailTotal; + public Builder id(String id) { this.id = id; return this; @@ -715,7 +743,7 @@ public Builder clientProductId(String clientProductId) { return this; } - public Builder postOnly(boolean postOnly) { + public Builder postOnly(Boolean postOnly) { this.postOnly = postOnly; return this; } @@ -725,7 +753,7 @@ public Builder orderEditHistory(List orderEditHistory) { return this; } - public Builder isRaiseExact(boolean isRaiseExact) { + public Builder isRaiseExact(Boolean isRaiseExact) { this.isRaiseExact = isRaiseExact; return this; } @@ -765,6 +793,16 @@ public Builder wigLevel(String wigLevel) { return this; } + public Builder productType(ProductType productType) { + this.productType = productType; + return this; + } + + public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + return this; + } + public Order build() { return new Order(this); } diff --git a/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java new file mode 100644 index 00000000..310577a5 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java @@ -0,0 +1,147 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.Arrays; + +public class PerpetualProductDetails { + /** + * Open interest + */ + @JsonProperty("open_interest") + private String openInterest; + + /** + * Current funding rate + */ + @JsonProperty("funding_rate") + private String fundingRate; + + /** + * Next funding time + */ + @JsonProperty("funding_time") + private OffsetDateTime fundingTime; + + /** + * Maximum leverage allowed + */ + @JsonProperty("max_leverage") + private String maxLeverage; + + /** + * The type of underlying for the perpetual product + */ + @JsonProperty("underlying_type") + private String underlyingType; + + public PerpetualProductDetails() { + } + + public PerpetualProductDetails(Builder builder) { + this.openInterest = builder.openInterest; + this.fundingRate = builder.fundingRate; + this.fundingTime = builder.fundingTime; + this.maxLeverage = builder.maxLeverage; + this.underlyingType = builder.underlyingType; + } + public String getOpenInterest() { + return openInterest; + } + + public void setOpenInterest(String openInterest) { + this.openInterest = openInterest; + } + public String getFundingRate() { + return fundingRate; + } + + public void setFundingRate(String fundingRate) { + this.fundingRate = fundingRate; + } + public OffsetDateTime getFundingTime() { + return fundingTime; + } + + public void setFundingTime(OffsetDateTime fundingTime) { + this.fundingTime = fundingTime; + } + public String getMaxLeverage() { + return maxLeverage; + } + + public void setMaxLeverage(String maxLeverage) { + this.maxLeverage = maxLeverage; + } + public String getUnderlyingType() { + return underlyingType; + } + + public void setUnderlyingType(String underlyingType) { + this.underlyingType = underlyingType; + } + public static class Builder { + private String openInterest; + + private String fundingRate; + + private OffsetDateTime fundingTime; + + private String maxLeverage; + + private String underlyingType; + + public Builder openInterest(String openInterest) { + this.openInterest = openInterest; + return this; + } + + public Builder fundingRate(String fundingRate) { + this.fundingRate = fundingRate; + return this; + } + + public Builder fundingTime(OffsetDateTime fundingTime) { + this.fundingTime = fundingTime; + return this; + } + + public Builder maxLeverage(String maxLeverage) { + this.maxLeverage = maxLeverage; + return this; + } + + public Builder underlyingType(String underlyingType) { + this.underlyingType = underlyingType; + return this; + } + + public PerpetualProductDetails build() { + return new PerpetualProductDetails(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java index 464977c8..c3d1f3ca 100644 --- a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java +++ b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java @@ -61,7 +61,7 @@ public class PmAssetInfo { * Whether the currency is margin eligible */ @JsonProperty("margin_eligible") - private boolean marginEligible; + private Boolean marginEligible; /** * Base margin requirement of the currency @@ -186,11 +186,11 @@ public String getAssetTier() { public void setAssetTier(String assetTier) { this.assetTier = assetTier; } - public boolean getMarginEligible() { + public Boolean getMarginEligible() { return marginEligible; } - public void setMarginEligible(boolean marginEligible) { + public void setMarginEligible(Boolean marginEligible) { this.marginEligible = marginEligible; } public String getBaseMarginRequirement() { @@ -281,7 +281,7 @@ public static class Builder { private String assetTier; - private boolean marginEligible; + private Boolean marginEligible; private String baseMarginRequirement; @@ -330,7 +330,7 @@ public Builder assetTier(String assetTier) { return this; } - public Builder marginEligible(boolean marginEligible) { + public Builder marginEligible(Boolean marginEligible) { this.marginEligible = marginEligible; return this; } diff --git a/src/main/java/com/coinbase/prime/model/PortfolioUser.java b/src/main/java/com/coinbase/prime/model/PortfolioUser.java index 70c2e2fb..d65a995c 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioUser.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioUser.java @@ -19,13 +19,16 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.enums.SecondaryPermission; import com.coinbase.prime.model.enums.UserRole; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; public class PortfolioUser { /** @@ -61,6 +64,18 @@ public class PortfolioUser { @JsonProperty("role") private UserRole role; + /** + * All primary roles assigned to the user. + */ + @JsonProperty("roles") + private List roles; + + /** + * All secondary permissions assigned to the user. + */ + @JsonProperty("secondary_permissions") + private List secondaryPermissions; + public PortfolioUser() { } @@ -71,6 +86,8 @@ public PortfolioUser(Builder builder) { this.portfolioId = builder.portfolioId; this.entityId = builder.entityId; this.role = builder.role; + this.roles = builder.roles; + this.secondaryPermissions = builder.secondaryPermissions; } public String getId() { return id; @@ -114,6 +131,20 @@ public UserRole getRole() { public void setRole(UserRole role) { this.role = role; } + public List getRoles() { + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + public List getSecondaryPermissions() { + return secondaryPermissions; + } + + public void setSecondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + } public static class Builder { private String id; @@ -127,6 +158,10 @@ public static class Builder { private UserRole role; + private List roles; + + private List secondaryPermissions; + public Builder id(String id) { this.id = id; return this; @@ -157,6 +192,16 @@ public Builder role(UserRole role) { return this; } + public Builder roles(List roles) { + this.roles = roles; + return this; + } + + public Builder secondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + return this; + } + public PortfolioUser build() { return new PortfolioUser(this); } diff --git a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java index d0690f6f..85a51ebd 100644 --- a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java +++ b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java @@ -64,7 +64,7 @@ public class PostTradeCreditInformation { * Whether or not a portfolio is frozen due to balance outstanding or other reason */ @JsonProperty("frozen") - private boolean frozen; + private Boolean frozen; /** * The reason why the portfolio is frozen @@ -79,7 +79,7 @@ public class PostTradeCreditInformation { * Whether the portfolio has credit enabled */ @JsonProperty("enabled") - private boolean enabled; + private Boolean enabled; /** * The amount of adjusted credit used @@ -144,11 +144,11 @@ public String getAvailable() { public void setAvailable(String available) { this.available = available; } - public boolean getFrozen() { + public Boolean getFrozen() { return frozen; } - public void setFrozen(boolean frozen) { + public void setFrozen(Boolean frozen) { this.frozen = frozen; } public String getFrozenReason() { @@ -165,11 +165,11 @@ public List getAmountsDue() { public void setAmountsDue(List amountsDue) { this.amountsDue = amountsDue; } - public boolean getEnabled() { + public Boolean getEnabled() { return enabled; } - public void setEnabled(boolean enabled) { + public void setEnabled(Boolean enabled) { this.enabled = enabled; } public String getAdjustedCreditUtilized() { @@ -197,13 +197,13 @@ public static class Builder { private String available; - private boolean frozen; + private Boolean frozen; private String frozenReason; private List amountsDue; - private boolean enabled; + private Boolean enabled; private String adjustedCreditUtilized; @@ -234,7 +234,7 @@ public Builder available(String available) { return this; } - public Builder frozen(boolean frozen) { + public Builder frozen(Boolean frozen) { this.frozen = frozen; return this; } @@ -249,7 +249,7 @@ public Builder amountsDue(List amountsDue) { return this; } - public Builder enabled(boolean enabled) { + public Builder enabled(Boolean enabled) { this.enabled = enabled; return this; } diff --git a/src/main/java/com/coinbase/prime/model/Product.java b/src/main/java/com/coinbase/prime/model/Product.java index eae97d79..44e157d3 100644 --- a/src/main/java/com/coinbase/prime/model/Product.java +++ b/src/main/java/com/coinbase/prime/model/Product.java @@ -19,7 +19,10 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.FcmTradingSessionDetails; +import com.coinbase.prime.model.FutureProductDetails; import com.coinbase.prime.model.enums.ProductPermissions; +import com.coinbase.prime.model.enums.ProductType; import com.coinbase.prime.model.RfqProductDetails; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -88,6 +91,15 @@ public class Product { @JsonProperty("rfq_product_details") private RfqProductDetails rfqProductDetails; + @JsonProperty("product_type") + private ProductType productType; + + @JsonProperty("fcm_trading_session_details") + private FcmTradingSessionDetails fcmTradingSessionDetails; + + @JsonProperty("future_product_details") + private FutureProductDetails futureProductDetails; + public Product() { } @@ -102,6 +114,9 @@ public Product(Builder builder) { this.permissions = builder.permissions; this.priceIncrement = builder.priceIncrement; this.rfqProductDetails = builder.rfqProductDetails; + this.productType = builder.productType; + this.fcmTradingSessionDetails = builder.fcmTradingSessionDetails; + this.futureProductDetails = builder.futureProductDetails; } public String getId() { return id; @@ -173,6 +188,27 @@ public RfqProductDetails getRfqProductDetails() { public void setRfqProductDetails(RfqProductDetails rfqProductDetails) { this.rfqProductDetails = rfqProductDetails; } + public ProductType getProductType() { + return productType; + } + + public void setProductType(ProductType productType) { + this.productType = productType; + } + public FcmTradingSessionDetails getFcmTradingSessionDetails() { + return fcmTradingSessionDetails; + } + + public void setFcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + } + public FutureProductDetails getFutureProductDetails() { + return futureProductDetails; + } + + public void setFutureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + } public static class Builder { private String id; @@ -194,6 +230,12 @@ public static class Builder { private RfqProductDetails rfqProductDetails; + private ProductType productType; + + private FcmTradingSessionDetails fcmTradingSessionDetails; + + private FutureProductDetails futureProductDetails; + public Builder id(String id) { this.id = id; return this; @@ -244,6 +286,21 @@ public Builder rfqProductDetails(RfqProductDetails rfqProductDetails) { return this; } + public Builder productType(ProductType productType) { + this.productType = productType; + return this; + } + + public Builder fcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + return this; + } + + public Builder futureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + return this; + } + public Product build() { return new Product(this); } diff --git a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java new file mode 100644 index 00000000..be0a2cc2 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java @@ -0,0 +1,114 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model; +import com.coinbase.prime.model.TravelRuleParty; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; + +public class RequestToSubmitTravelRuleDataForAnExistingDepositTransaction { + @JsonProperty("originator") + private TravelRuleParty originator; + + @JsonProperty("beneficiary") + private TravelRuleParty beneficiary; + + @JsonProperty("is_self") + private Boolean isSelf; + + @JsonProperty("opt_out_of_ownership_verification") + private Boolean optOutOfOwnershipVerification; + + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction() { + } + + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(Builder builder) { + this.originator = builder.originator; + this.beneficiary = builder.beneficiary; + this.isSelf = builder.isSelf; + this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; + } + public TravelRuleParty getOriginator() { + return originator; + } + + public void setOriginator(TravelRuleParty originator) { + this.originator = originator; + } + public TravelRuleParty getBeneficiary() { + return beneficiary; + } + + public void setBeneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + } + public Boolean getIsSelf() { + return isSelf; + } + + public void setIsSelf(Boolean isSelf) { + this.isSelf = isSelf; + } + public Boolean getOptOutOfOwnershipVerification() { + return optOutOfOwnershipVerification; + } + + public void setOptOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + } + public static class Builder { + private TravelRuleParty originator; + + private TravelRuleParty beneficiary; + + private Boolean isSelf; + + private Boolean optOutOfOwnershipVerification; + + public Builder originator(TravelRuleParty originator) { + this.originator = originator; + return this; + } + + public Builder beneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + return this; + } + + public Builder isSelf(Boolean isSelf) { + this.isSelf = isSelf; + return this; + } + + public Builder optOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + return this; + } + + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction build() { + return new RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(this); + } + } +} + diff --git a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java index 7af1b529..751163e0 100644 --- a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java @@ -31,7 +31,7 @@ public class RfqProductDetails { * Whether the product is tradable via RFQ */ @JsonProperty("tradable") - private boolean tradable; + private Boolean tradable; /** * Deprecated: Value will be an empty string @@ -81,11 +81,11 @@ public RfqProductDetails(Builder builder) { this.minQuoteSize = builder.minQuoteSize; this.maxQuoteSize = builder.maxQuoteSize; } - public boolean getTradable() { + public Boolean getTradable() { return tradable; } - public void setTradable(boolean tradable) { + public void setTradable(Boolean tradable) { this.tradable = tradable; } public String getMinNotionalSize() { @@ -131,7 +131,7 @@ public void setMaxQuoteSize(String maxQuoteSize) { this.maxQuoteSize = maxQuoteSize; } public static class Builder { - private boolean tradable; + private Boolean tradable; private String minNotionalSize; @@ -145,7 +145,7 @@ public static class Builder { private String maxQuoteSize; - public Builder tradable(boolean tradable) { + public Builder tradable(Boolean tradable) { this.tradable = tradable; return this; } diff --git a/src/main/java/com/coinbase/prime/model/RiskAssessment.java b/src/main/java/com/coinbase/prime/model/RiskAssessment.java index 5f963c65..13b370b9 100644 --- a/src/main/java/com/coinbase/prime/model/RiskAssessment.java +++ b/src/main/java/com/coinbase/prime/model/RiskAssessment.java @@ -31,13 +31,13 @@ public class RiskAssessment { * Indicates if the transaction has been flagged for compliance concerns */ @JsonProperty("compliance_risk_detected") - private boolean complianceRiskDetected; + private Boolean complianceRiskDetected; /** * Indicates if the transaction has been flagged for security concerns */ @JsonProperty("security_risk_detected") - private boolean securityRiskDetected; + private Boolean securityRiskDetected; public RiskAssessment() { } @@ -46,31 +46,31 @@ public RiskAssessment(Builder builder) { this.complianceRiskDetected = builder.complianceRiskDetected; this.securityRiskDetected = builder.securityRiskDetected; } - public boolean getComplianceRiskDetected() { + public Boolean getComplianceRiskDetected() { return complianceRiskDetected; } - public void setComplianceRiskDetected(boolean complianceRiskDetected) { + public void setComplianceRiskDetected(Boolean complianceRiskDetected) { this.complianceRiskDetected = complianceRiskDetected; } - public boolean getSecurityRiskDetected() { + public Boolean getSecurityRiskDetected() { return securityRiskDetected; } - public void setSecurityRiskDetected(boolean securityRiskDetected) { + public void setSecurityRiskDetected(Boolean securityRiskDetected) { this.securityRiskDetected = securityRiskDetected; } public static class Builder { - private boolean complianceRiskDetected; + private Boolean complianceRiskDetected; - private boolean securityRiskDetected; + private Boolean securityRiskDetected; - public Builder complianceRiskDetected(boolean complianceRiskDetected) { + public Builder complianceRiskDetected(Boolean complianceRiskDetected) { this.complianceRiskDetected = complianceRiskDetected; return this; } - public Builder securityRiskDetected(boolean securityRiskDetected) { + public Builder securityRiskDetected(Boolean securityRiskDetected) { this.securityRiskDetected = securityRiskDetected; return this; } diff --git a/src/main/java/com/coinbase/prime/model/RpcConfig.java b/src/main/java/com/coinbase/prime/model/RpcConfig.java index 30147203..6c9bd5e6 100644 --- a/src/main/java/com/coinbase/prime/model/RpcConfig.java +++ b/src/main/java/com/coinbase/prime/model/RpcConfig.java @@ -31,7 +31,7 @@ public class RpcConfig { * If true, transaction will not be broadcast to the network */ @JsonProperty("skip_broadcast") - private boolean skipBroadcast; + private Boolean skipBroadcast; /** * Custom blockchain node RPC URL. (EVM-only) @@ -46,11 +46,11 @@ public RpcConfig(Builder builder) { this.skipBroadcast = builder.skipBroadcast; this.url = builder.url; } - public boolean getSkipBroadcast() { + public Boolean getSkipBroadcast() { return skipBroadcast; } - public void setSkipBroadcast(boolean skipBroadcast) { + public void setSkipBroadcast(Boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; } public String getUrl() { @@ -61,11 +61,11 @@ public void setUrl(String url) { this.url = url; } public static class Builder { - private boolean skipBroadcast; + private Boolean skipBroadcast; private String url; - public Builder skipBroadcast(boolean skipBroadcast) { + public Builder skipBroadcast(Boolean skipBroadcast) { this.skipBroadcast = skipBroadcast; return this; } diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index 4718874c..c206e4d2 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -35,22 +35,22 @@ public class TravelRuleData { private TravelRuleParty originator; @JsonProperty("is_self") - private boolean isSelf; + private Boolean isSelf; /** * True if Coinbase is being used as an intermediary for a customer transfer. */ @JsonProperty("is_intermediary") - private boolean isIntermediary; + private Boolean isIntermediary; @JsonProperty("opt_out_of_ownership_verification") - private boolean optOutOfOwnershipVerification; + private Boolean optOutOfOwnershipVerification; /** * Whether the originating VASP attests to verified wallet ownership. When true with is_intermediary, enables automatic VASP data enrichment from the legal entity. */ @JsonProperty("attest_verified_wallet_ownership") - private boolean attestVerifiedWalletOwnership; + private Boolean attestVerifiedWalletOwnership; public TravelRuleData() { } @@ -77,32 +77,32 @@ public TravelRuleParty getOriginator() { public void setOriginator(TravelRuleParty originator) { this.originator = originator; } - public boolean getIsSelf() { + public Boolean getIsSelf() { return isSelf; } - public void setIsSelf(boolean isSelf) { + public void setIsSelf(Boolean isSelf) { this.isSelf = isSelf; } - public boolean getIsIntermediary() { + public Boolean getIsIntermediary() { return isIntermediary; } - public void setIsIntermediary(boolean isIntermediary) { + public void setIsIntermediary(Boolean isIntermediary) { this.isIntermediary = isIntermediary; } - public boolean getOptOutOfOwnershipVerification() { + public Boolean getOptOutOfOwnershipVerification() { return optOutOfOwnershipVerification; } - public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + public void setOptOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; } - public boolean getAttestVerifiedWalletOwnership() { + public Boolean getAttestVerifiedWalletOwnership() { return attestVerifiedWalletOwnership; } - public void setAttestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { + public void setAttestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; } public static class Builder { @@ -110,13 +110,13 @@ public static class Builder { private TravelRuleParty originator; - private boolean isSelf; + private Boolean isSelf; - private boolean isIntermediary; + private Boolean isIntermediary; - private boolean optOutOfOwnershipVerification; + private Boolean optOutOfOwnershipVerification; - private boolean attestVerifiedWalletOwnership; + private Boolean attestVerifiedWalletOwnership; public Builder beneficiary(TravelRuleParty beneficiary) { this.beneficiary = beneficiary; @@ -128,22 +128,22 @@ public Builder originator(TravelRuleParty originator) { return this; } - public Builder isSelf(boolean isSelf) { + public Builder isSelf(Boolean isSelf) { this.isSelf = isSelf; return this; } - public Builder isIntermediary(boolean isIntermediary) { + public Builder isIntermediary(Boolean isIntermediary) { this.isIntermediary = isIntermediary; return this; } - public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + public Builder optOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; return this; } - public Builder attestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { + public Builder attestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; return this; } diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java index 6dee7d29..63fa80c2 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -22,7 +22,6 @@ import com.coinbase.prime.model.DetailedAddress; import com.coinbase.prime.model.NaturalPersonName; import com.coinbase.prime.model.enums.TravelRuleWalletType; -import com.coinbase.prime.model.GoogleTypeDate; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; @@ -56,7 +55,7 @@ public class TravelRuleParty { private String personalId; @JsonProperty("date_of_birth") - private GoogleTypeDate dateOfBirth; + private DateOfBirth dateOfBirth; /** * Telephone number for contact purposes. @@ -134,11 +133,11 @@ public String getPersonalId() { public void setPersonalId(String personalId) { this.personalId = personalId; } - public GoogleTypeDate getDateOfBirth() { + public DateOfBirth getDateOfBirth() { return dateOfBirth; } - public void setDateOfBirth(GoogleTypeDate dateOfBirth) { + public void setDateOfBirth(DateOfBirth dateOfBirth) { this.dateOfBirth = dateOfBirth; } public String getTelephoneNumber() { @@ -170,7 +169,7 @@ public static class Builder { private String personalId; - private GoogleTypeDate dateOfBirth; + private DateOfBirth dateOfBirth; private String telephoneNumber; @@ -211,7 +210,7 @@ public Builder personalId(String personalId) { return this; } - public Builder dateOfBirth(GoogleTypeDate dateOfBirth) { + public Builder dateOfBirth(DateOfBirth dateOfBirth) { this.dateOfBirth = dateOfBirth; return this; } diff --git a/src/main/java/com/coinbase/prime/model/XmPosition.java b/src/main/java/com/coinbase/prime/model/XmPosition.java index 8c2b1b57..48f27ec0 100644 --- a/src/main/java/com/coinbase/prime/model/XmPosition.java +++ b/src/main/java/com/coinbase/prime/model/XmPosition.java @@ -43,7 +43,7 @@ public class XmPosition { * True if margin eligible, false otherwise */ @JsonProperty("margin_eligible") - private boolean marginEligible; + private Boolean marginEligible; /** * Total market capitalization @@ -221,11 +221,11 @@ public String getMarketPrice() { public void setMarketPrice(String marketPrice) { this.marketPrice = marketPrice; } - public boolean getMarginEligible() { + public Boolean getMarginEligible() { return marginEligible; } - public void setMarginEligible(boolean marginEligible) { + public void setMarginEligible(Boolean marginEligible) { this.marginEligible = marginEligible; } public String getMarketCap() { @@ -387,7 +387,7 @@ public static class Builder { private String marketPrice; - private boolean marginEligible; + private Boolean marginEligible; private String marketCap; @@ -443,7 +443,7 @@ public Builder marketPrice(String marketPrice) { return this; } - public Builder marginEligible(boolean marginEligible) { + public Builder marginEligible(Boolean marginEligible) { this.marginEligible = marginEligible; return this; } diff --git a/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java b/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java new file mode 100644 index 00000000..c8166c83 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java @@ -0,0 +1,28 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum ContractExpiryType { + CONTRACT_EXPIRY_TYPE_UNSPECIFIED, + CONTRACT_EXPIRY_TYPE_EXPIRING, + CONTRACT_EXPIRY_TYPE_PERPETUAL +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java b/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java new file mode 100644 index 00000000..3a980ca0 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java @@ -0,0 +1,28 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum ExpiringContractStatus { + EXPIRING_CONTRACT_STATUS_UNEXPIRED, + EXPIRING_CONTRACT_STATUS_EXPIRED, + EXPIRING_CONTRACT_STATUS_ALL +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java b/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java new file mode 100644 index 00000000..5834673c --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java @@ -0,0 +1,30 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum FcmMarginHealthState { + FCM_MARGIN_HEALTH_STATE_UNSPECIFIED, + FCM_MARGIN_HEALTH_STATE_HEALTHY, + FCM_MARGIN_HEALTH_STATE_RESTRICTED, + FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION, + FCM_MARGIN_HEALTH_STATE_LIQUIDATION +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java new file mode 100644 index 00000000..9c8f2733 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java @@ -0,0 +1,29 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum FcmTradingSessionClosedReason { + FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED, + FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE, + FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE, + FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java new file mode 100644 index 00000000..8d547f86 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java @@ -0,0 +1,31 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum FcmTradingSessionState { + FCM_TRADING_SESSION_STATE_UNDEFINED, + FCM_TRADING_SESSION_STATE_PRE_OPEN, + FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL, + FCM_TRADING_SESSION_STATE_OPEN, + FCM_TRADING_SESSION_STATE_CLOSE, + FCM_TRADING_SESSION_STATE_HALTED +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/ProductType.java b/src/main/java/com/coinbase/prime/model/enums/ProductType.java new file mode 100644 index 00000000..b89fd0a8 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/ProductType.java @@ -0,0 +1,27 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum ProductType { + SPOT, + FUTURE +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java b/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java new file mode 100644 index 00000000..318afec4 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java @@ -0,0 +1,28 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum RiskManagementType { + RISK_MANAGEMENT_TYPE_UNSPECIFIED, + RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM, + RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE +} + diff --git a/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java b/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java new file mode 100644 index 00000000..a3301021 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java @@ -0,0 +1,28 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Do not edit the class manually. + */ + +package com.coinbase.prime.model.enums; + +public enum SecondaryPermission { + VIDEO_APPROVER, + TEAM_APPROVER, + WEB3_SIGNER +} + diff --git a/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java b/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java index ea952286..872cbc20 100644 --- a/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java +++ b/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java @@ -18,15 +18,11 @@ import com.coinbase.prime.common.PrimeListRequest; import com.coinbase.prime.model.enums.SortDirection; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; /** * Request for listing onchain address groups for a portfolio. */ public class ListOnchainAddressGroupsRequest extends PrimeListRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore private String portfolioId; public ListOnchainAddressGroupsRequest() { diff --git a/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java b/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java index 3bd9d461..15899eb7 100644 --- a/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java +++ b/src/main/java/com/coinbase/prime/onchainaddressbook/UpdateOnchainAddressBookEntryRequest.java @@ -44,11 +44,11 @@ public void setPortfolioId(String portfolioId) { this.portfolioId = portfolioId; } - public AddressGroup getAddressGroup() { + public AddressGroup getAddressGroupId() { return addressGroup; } - public void setAddressGroup(AddressGroup addressGroup) { + public void setAddressGroupId(AddressGroup addressGroup) { this.addressGroup = addressGroup; } diff --git a/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java b/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java index e08a6270..0b6a5005 100644 --- a/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java +++ b/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java @@ -35,8 +35,6 @@ public class AcceptQuoteRequest { private String clientOrderId; @JsonProperty(required = true, value = "quote_id") private String quoteId; - @JsonProperty("settl_currency") - private String settlCurrency; public AcceptQuoteRequest() { } @@ -47,7 +45,6 @@ public AcceptQuoteRequest(Builder builder) { this.side = builder.side; this.clientOrderId = builder.clientOrderId; this.quoteId = builder.quoteId; - this.settlCurrency = builder.settlCurrency; } public String getPortfolioId() { @@ -90,21 +87,12 @@ public void setQuoteId(String quoteId) { this.quoteId = quoteId; } - public String getSettlCurrency() { - return settlCurrency; - } - - public void setSettlCurrency(String settlCurrency) { - this.settlCurrency = settlCurrency; - } - public static class Builder { private String portfolioId; private String productId; private OrderSide side; private String clientOrderId; private String quoteId; - private String settlCurrency; public Builder() { } @@ -134,11 +122,6 @@ public Builder quoteId(String quoteId) { return this; } - public Builder settlCurrency(String settlCurrency) { - this.settlCurrency = settlCurrency; - return this; - } - public AcceptQuoteRequest build() throws CoinbaseClientException { this.validate(); return new AcceptQuoteRequest(this); diff --git a/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java b/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java index e4859f4c..eee5f407 100644 --- a/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java +++ b/src/main/java/com/coinbase/prime/orders/CancelOrderResponse.java @@ -16,6 +16,8 @@ package com.coinbase.prime.orders; +import com.fasterxml.jackson.annotation.JsonProperty; + /** * Response object for canceling an order. * @@ -23,6 +25,7 @@ */ public class CancelOrderResponse { /** The ID of the canceled order */ + @JsonProperty("order_id") private String id; public CancelOrderResponse() { diff --git a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java index 5cd8928a..118c44ec 100644 --- a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java +++ b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java @@ -19,7 +19,6 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.OrderType; -import com.coinbase.prime.model.enums.PegOffsetType; import com.coinbase.prime.model.enums.TimeInForceType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -67,7 +66,7 @@ public class CreateOrderRequest { @JsonProperty("post_only") private Boolean postOnly; @JsonProperty("peg_offset_type") - private PegOffsetType pegOffsetType; + private String pegOffsetType; private String offset; @JsonProperty("wig_level") private String wigLevel; @@ -252,11 +251,11 @@ public void setPostOnly(Boolean postOnly) { this.postOnly = postOnly; } - public PegOffsetType getPegOffsetType() { + public String getPegOffsetType() { return pegOffsetType; } - public void setPegOffsetType(PegOffsetType pegOffsetType) { + public void setPegOffsetType(String pegOffsetType) { this.pegOffsetType = pegOffsetType; } @@ -296,7 +295,7 @@ public static class Builder { private String historicalPov; private String settlCurrency; private Boolean postOnly; - private PegOffsetType pegOffsetType; + private String pegOffsetType; private String offset; private String wigLevel; @@ -398,7 +397,7 @@ public Builder postOnly(Boolean postOnly) { return this; } - public Builder pegOffsetType(PegOffsetType pegOffsetType) { + public Builder pegOffsetType(String pegOffsetType) { this.pegOffsetType = pegOffsetType; return this; } diff --git a/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java b/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java index 7230962e..42e515f9 100644 --- a/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java +++ b/src/main/java/com/coinbase/prime/orders/CreateQuoteRequest.java @@ -39,8 +39,6 @@ public class CreateQuoteRequest { private String quoteValue; @JsonProperty(required = true, value = "limit_price") private String limitPrice; - @JsonProperty("settl_currency") - private String settlCurrency; public CreateQuoteRequest() { } @@ -53,7 +51,6 @@ public CreateQuoteRequest(Builder builder) { this.baseQuantity = builder.baseQuantity; this.quoteValue = builder.quoteValue; this.limitPrice = builder.limitPrice; - this.settlCurrency = builder.settlCurrency; } public String getPortfolioId() { @@ -112,14 +109,6 @@ public void setLimitPrice(String limitPrice) { this.limitPrice = limitPrice; } - public String getSettlCurrency() { - return settlCurrency; - } - - public void setSettlCurrency(String settlCurrency) { - this.settlCurrency = settlCurrency; - } - public static class Builder { private String portfolioId; private String productId; @@ -128,7 +117,6 @@ public static class Builder { private String baseQuantity; private String quoteValue; private String limitPrice; - private String settlCurrency; public Builder() { } @@ -168,11 +156,6 @@ public Builder limitPrice(String limitPrice) { return this; } - public Builder settlCurrency(String settlCurrency) { - this.settlCurrency = settlCurrency; - return this; - } - public CreateQuoteRequest build() throws CoinbaseClientException { this.validate(); return new CreateQuoteRequest(this); diff --git a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java index 3cfe9e82..488d4217 100644 --- a/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java +++ b/src/main/java/com/coinbase/prime/orders/GetOrderPreviewRequest.java @@ -19,7 +19,6 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.OrderType; -import com.coinbase.prime.model.enums.PegOffsetType; import com.coinbase.prime.model.enums.TimeInForceType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -61,7 +60,7 @@ public class GetOrderPreviewRequest { @JsonProperty("display_base_size") private String displayBaseSize; @JsonProperty("peg_offset_type") - private PegOffsetType pegOffsetType; + private String pegOffsetType; private String offset; @JsonProperty("wig_level") private String wigLevel; @@ -228,11 +227,11 @@ public void setDisplayBaseSize(String displayBaseSize) { this.displayBaseSize = displayBaseSize; } - public PegOffsetType getPegOffsetType() { + public String getPegOffsetType() { return pegOffsetType; } - public void setPegOffsetType(PegOffsetType pegOffsetType) { + public void setPegOffsetType(String pegOffsetType) { this.pegOffsetType = pegOffsetType; } @@ -270,7 +269,7 @@ public static class Builder { private Boolean postOnly; private String displayQuoteSize; private String displayBaseSize; - private PegOffsetType pegOffsetType; + private String pegOffsetType; private String offset; private String wigLevel; @@ -362,7 +361,7 @@ public Builder displayBaseSize(String displayBaseSize) { return this; } - public Builder pegOffsetType(PegOffsetType pegOffsetType) { + public Builder pegOffsetType(String pegOffsetType) { this.pegOffsetType = pegOffsetType; return this; } diff --git a/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java b/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java index 21c8d76e..4b779214 100644 --- a/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java +++ b/src/main/java/com/coinbase/prime/orders/ListOpenOrdersRequest.java @@ -25,6 +25,8 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Date; + import static com.coinbase.core.utils.Utils.*; public class ListOpenOrdersRequest extends PrimeListRequest { @@ -36,11 +38,11 @@ public class ListOpenOrdersRequest extends PrimeListRequest { @JsonProperty("order_type") private OrderType orderType; @JsonProperty("start_date") - private String startDate; + private Date startDate; @JsonProperty("order_side") private OrderSide orderSide; @JsonProperty("end_date") - private String endDate; + private Date endDate; public ListOpenOrdersRequest() { } @@ -79,11 +81,11 @@ public void setOrderType(OrderType orderType) { this.orderType = orderType; } - public String getStartDate() { + public Date getStartDate() { return startDate; } - public void setStartDate(String startDate) { + public void setStartDate(Date startDate) { this.startDate = startDate; } @@ -95,11 +97,11 @@ public void setOrderSide(OrderSide orderSide) { this.orderSide = orderSide; } - public String getEndDate() { + public Date getEndDate() { return endDate; } - public void setEndDate(String endDate) { + public void setEndDate(Date endDate) { this.endDate = endDate; } @@ -107,9 +109,9 @@ public static class Builder { private String portfolioId; private String[] productIds; private OrderType orderType; - private String startDate; + private Date startDate; private OrderSide orderSide; - private String endDate; + private Date endDate; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -132,7 +134,7 @@ public Builder orderType(OrderType orderType) { return this; } - public Builder startDate(String startDate) { + public Builder startDate(Date startDate) { this.startDate = startDate; return this; } @@ -142,7 +144,7 @@ public Builder orderSide(OrderSide orderSide) { return this; } - public Builder endDate(String endDate) { + public Builder endDate(Date endDate) { this.endDate = endDate; return this; } diff --git a/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java b/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java index 5401b88e..fea915a1 100644 --- a/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java +++ b/src/main/java/com/coinbase/prime/transactions/CreateOnchainTransactionRequest.java @@ -143,6 +143,9 @@ private void validate() throws CoinbaseClientException { if (isNullOrEmpty(this.rawUnsignedTxn)) { throw new CoinbaseClientException("RawUnsignedTxn cannot be null"); } + if (this.rpc == null) { + throw new CoinbaseClientException("Rpc cannot be null"); + } } } } diff --git a/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java b/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java index 20e987bf..e864ce50 100644 --- a/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java +++ b/src/main/java/com/coinbase/prime/transactions/CreateWalletTransferResponse.java @@ -16,6 +16,7 @@ package com.coinbase.prime.transactions; +import com.coinbase.prime.model.enums.DestinationType; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -42,13 +43,13 @@ public class CreateWalletTransferResponse { private String destinationAddress; /** The type of the destination (e.g., WALLET, EXCHANGE) */ @JsonProperty("destination_type") - private String destinationType; + private DestinationType destinationType; /** The source address for the transfer */ @JsonProperty("source_address") private String sourceAddress; /** The type of the source (e.g., WALLET, EXCHANGE) */ @JsonProperty("source_type") - private String sourceType; + private DestinationType sourceType; /** The unique identifier for the transfer transaction */ @JsonProperty("transaction_id") private String transactionId; @@ -104,11 +105,11 @@ public void setDestinationAddress(String destinationAddress) { this.destinationAddress = destinationAddress; } - public String getDestinationType() { + public DestinationType getDestinationType() { return destinationType; } - public void setDestinationType(String destinationType) { + public void setDestinationType(DestinationType destinationType) { this.destinationType = destinationType; } @@ -120,11 +121,11 @@ public void setSourceAddress(String sourceAddress) { this.sourceAddress = sourceAddress; } - public String getSourceType() { + public DestinationType getSourceType() { return sourceType; } - public void setSourceType(String sourceType) { + public void setSourceType(DestinationType sourceType) { this.sourceType = sourceType; } diff --git a/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java b/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java index 0ccd4770..90d8539a 100644 --- a/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java +++ b/src/main/java/com/coinbase/prime/transactions/CreateWalletWithdrawalResponse.java @@ -18,6 +18,7 @@ import com.coinbase.prime.model.BlockchainAddress; import com.coinbase.prime.model.CounterpartyDestination; +import com.coinbase.prime.model.enums.DestinationType; import com.fasterxml.jackson.annotation.JsonProperty; public class CreateWalletWithdrawalResponse { @@ -29,9 +30,9 @@ public class CreateWalletWithdrawalResponse { private String amount; private String fee; @JsonProperty("destination_type") - private String destinationType; + private DestinationType destinationType; @JsonProperty("source_type") - private String sourceType; + private DestinationType sourceType; @JsonProperty("blockchain_destination") private BlockchainAddress blockchainDestination; @JsonProperty("counterparty_destination") @@ -84,19 +85,19 @@ public void setFee(String fee) { this.fee = fee; } - public String getDestinationType() { + public DestinationType getDestinationType() { return destinationType; } - public void setDestinationType(String destinationType) { + public void setDestinationType(DestinationType destinationType) { this.destinationType = destinationType; } - public String getSourceType() { + public DestinationType getSourceType() { return sourceType; } - public void setSourceType(String sourceType) { + public void setSourceType(DestinationType sourceType) { this.sourceType = sourceType; } diff --git a/src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataRequest.java b/src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataRequest.java new file mode 100644 index 00000000..48efda4f --- /dev/null +++ b/src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataRequest.java @@ -0,0 +1,89 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.transactions; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +public class GetTransactionTravelRuleDataRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + @JsonProperty(required = true, value = "transaction_id") + @JsonIgnore + private String transactionId; + + public GetTransactionTravelRuleDataRequest() { + } + + public GetTransactionTravelRuleDataRequest(Builder builder) { + this.portfolioId = builder.portfolioId; + this.transactionId = builder.transactionId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public static class Builder { + private String portfolioId; + private String transactionId; + + public Builder() { + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder transactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + public GetTransactionTravelRuleDataRequest build() throws CoinbaseClientException { + validate(); + return new GetTransactionTravelRuleDataRequest(this); + } + + private void validate() throws CoinbaseClientException { + if (isNullOrEmpty(this.portfolioId)) { + throw new CoinbaseClientException("PortfolioId is required"); + } + if (isNullOrEmpty(this.transactionId)) { + throw new CoinbaseClientException("TransactionId is required"); + } + } + } +} diff --git a/src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataResponse.java b/src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataResponse.java new file mode 100644 index 00000000..e04703fc --- /dev/null +++ b/src/main/java/com/coinbase/prime/transactions/GetTransactionTravelRuleDataResponse.java @@ -0,0 +1,120 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.transactions; + +import com.coinbase.prime.model.TravelRuleParty; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GetTransactionTravelRuleDataResponse { + private String amount; + + @JsonProperty("amount_currency") + private String amountCurrency; + + private TravelRuleParty beneficiary; + + @JsonProperty("blockchain_network") + private String blockchainNetwork; + + @JsonProperty("fiat_amount") + private String fiatAmount; + + @JsonProperty("fiat_amount_currency") + private String fiatAmountCurrency; + + private Boolean fulfilled; + + @JsonProperty("is_self") + private Boolean isSelf; + + private TravelRuleParty originator; + + public GetTransactionTravelRuleDataResponse() { + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getAmountCurrency() { + return amountCurrency; + } + + public void setAmountCurrency(String amountCurrency) { + this.amountCurrency = amountCurrency; + } + + public TravelRuleParty getBeneficiary() { + return beneficiary; + } + + public void setBeneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + } + + public String getBlockchainNetwork() { + return blockchainNetwork; + } + + public void setBlockchainNetwork(String blockchainNetwork) { + this.blockchainNetwork = blockchainNetwork; + } + + public String getFiatAmount() { + return fiatAmount; + } + + public void setFiatAmount(String fiatAmount) { + this.fiatAmount = fiatAmount; + } + + public String getFiatAmountCurrency() { + return fiatAmountCurrency; + } + + public void setFiatAmountCurrency(String fiatAmountCurrency) { + this.fiatAmountCurrency = fiatAmountCurrency; + } + + public Boolean getFulfilled() { + return fulfilled; + } + + public void setFulfilled(Boolean fulfilled) { + this.fulfilled = fulfilled; + } + + public Boolean getIsSelf() { + return isSelf; + } + + public void setIsSelf(Boolean isSelf) { + this.isSelf = isSelf; + } + + public TravelRuleParty getOriginator() { + return originator; + } + + public void setOriginator(TravelRuleParty originator) { + this.originator = originator; + } +} diff --git a/src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsRequest.java b/src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsRequest.java new file mode 100644 index 00000000..5966c9e3 --- /dev/null +++ b/src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsRequest.java @@ -0,0 +1,85 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.transactions; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +public class ListAdvancedTransferTransactionsRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + @JsonProperty(required = true, value = "advanced_transfer_id") + @JsonIgnore + private String advancedTransferId; + + public ListAdvancedTransferTransactionsRequest() { + } + + public ListAdvancedTransferTransactionsRequest(Builder builder) { + this.portfolioId = builder.portfolioId; + this.advancedTransferId = builder.advancedTransferId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getAdvancedTransferId() { + return advancedTransferId; + } + + public void setAdvancedTransferId(String advancedTransferId) { + this.advancedTransferId = advancedTransferId; + } + + public static class Builder { + private String portfolioId; + private String advancedTransferId; + + public Builder() { + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder advancedTransferId(String advancedTransferId) { + this.advancedTransferId = advancedTransferId; + return this; + } + + public ListAdvancedTransferTransactionsRequest build() throws CoinbaseClientException { + validate(); + return new ListAdvancedTransferTransactionsRequest(this); + } + + private void validate() throws CoinbaseClientException { + if (isNullOrEmpty(this.portfolioId)) throw new CoinbaseClientException("PortfolioId is required"); + if (isNullOrEmpty(this.advancedTransferId)) throw new CoinbaseClientException("AdvancedTransferId is required"); + } + } +} diff --git a/src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsResponse.java b/src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsResponse.java new file mode 100644 index 00000000..c38b2a28 --- /dev/null +++ b/src/main/java/com/coinbase/prime/transactions/ListAdvancedTransferTransactionsResponse.java @@ -0,0 +1,34 @@ +/* + * Copyright 2025-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.transactions; + +import com.coinbase.prime.model.Transaction; + +public class ListAdvancedTransferTransactionsResponse { + private Transaction[] transactions; + + public ListAdvancedTransferTransactionsResponse() { + } + + public Transaction[] getTransactions() { + return transactions; + } + + public void setTransactions(Transaction[] transactions) { + this.transactions = transactions; + } +} diff --git a/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java b/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java index 34180dc1..edce5763 100644 --- a/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java +++ b/src/main/java/com/coinbase/prime/transactions/ListPortfolioTransactionsRequest.java @@ -20,7 +20,6 @@ import com.coinbase.prime.common.PrimeListRequest; import com.coinbase.prime.common.Pagination; import com.coinbase.prime.model.enums.TransactionType; -import com.coinbase.prime.model.enums.TravelRuleStatus; import com.coinbase.prime.model.enums.SortDirection; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -37,10 +36,6 @@ public class ListPortfolioTransactionsRequest extends PrimeListRequest { private String startTime; @JsonProperty("end_time") private String endTime; - @JsonProperty("get_network_unified_transactions") - private Boolean getNetworkUnifiedTransactions; - @JsonProperty("travel_rule_status") - private TravelRuleStatus[] travelRuleStatus; public ListPortfolioTransactionsRequest() { } @@ -52,8 +47,6 @@ public ListPortfolioTransactionsRequest(Builder builder) { this.types = builder.types; this.startTime = builder.startTime; this.endTime = builder.endTime; - this.getNetworkUnifiedTransactions = builder.getNetworkUnifiedTransactions; - this.travelRuleStatus = builder.travelRuleStatus; } public String getPortfolioId() { @@ -96,30 +89,12 @@ public void setEndTime(String endTime) { this.endTime = endTime; } - public Boolean getGetNetworkUnifiedTransactions() { - return getNetworkUnifiedTransactions; - } - - public void setGetNetworkUnifiedTransactions(Boolean getNetworkUnifiedTransactions) { - this.getNetworkUnifiedTransactions = getNetworkUnifiedTransactions; - } - - public TravelRuleStatus[] getTravelRuleStatus() { - return travelRuleStatus; - } - - public void setTravelRuleStatus(TravelRuleStatus[] travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - } - public static class Builder { private String portfolioId; private String[] symbols; private TransactionType[] types; private String startTime; private String endTime; - private Boolean getNetworkUnifiedTransactions; - private TravelRuleStatus[] travelRuleStatus; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -152,16 +127,6 @@ public Builder endTime(String endTime) { return this; } - public Builder getNetworkUnifiedTransactions(Boolean getNetworkUnifiedTransactions) { - this.getNetworkUnifiedTransactions = getNetworkUnifiedTransactions; - return this; - } - - public Builder travelRuleStatus(TravelRuleStatus[] travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - return this; - } - public Builder pagination(Pagination pagination) { this.cursor = pagination.getNextCursor(); this.sortDirection = pagination.getSortDirection(); diff --git a/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java b/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java index f7e18252..30b676a5 100644 --- a/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java +++ b/src/main/java/com/coinbase/prime/transactions/ListWalletTransactionsResponse.java @@ -22,6 +22,7 @@ public class ListWalletTransactionsResponse { private Transaction[] transactions; private Pagination pagination; + private ListWalletTransactionsRequest request; public ListWalletTransactionsResponse() { } @@ -42,4 +43,12 @@ public void setPagination(Pagination pagination) { this.pagination = pagination; } + public ListWalletTransactionsRequest getRequest() { + return request; + } + + public void setRequest(ListWalletTransactionsRequest request) { + this.request = request; + } + } diff --git a/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java b/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java index befe59d3..b583f637 100644 --- a/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java +++ b/src/main/java/com/coinbase/prime/transactions/SubmitDepositTravelRuleDataRequest.java @@ -46,6 +46,9 @@ public class SubmitDepositTravelRuleDataRequest { @JsonProperty("is_self") private Boolean isSelf; + @JsonProperty("is_intermediary") + private Boolean isIntermediary; + @JsonProperty("opt_out_of_ownership_verification") private Boolean optOutOfOwnershipVerification; @@ -58,6 +61,7 @@ public SubmitDepositTravelRuleDataRequest(Builder builder) { this.originator = builder.originator; this.beneficiary = builder.beneficiary; this.isSelf = builder.isSelf; + this.isIntermediary = builder.isIntermediary; this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; } @@ -101,6 +105,14 @@ public void setIsSelf(Boolean isSelf) { this.isSelf = isSelf; } + public Boolean getIsIntermediary() { + return isIntermediary; + } + + public void setIsIntermediary(Boolean isIntermediary) { + this.isIntermediary = isIntermediary; + } + public Boolean getOptOutOfOwnershipVerification() { return optOutOfOwnershipVerification; } @@ -115,6 +127,7 @@ public static class Builder { private TravelRuleParty originator; private TravelRuleParty beneficiary; private Boolean isSelf; + private Boolean isIntermediary; private Boolean optOutOfOwnershipVerification; public Builder() { @@ -145,6 +158,11 @@ public Builder isSelf(Boolean isSelf) { return this; } + public Builder isIntermediary(Boolean isIntermediary) { + this.isIntermediary = isIntermediary; + return this; + } + public Builder optOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; return this; diff --git a/src/main/java/com/coinbase/prime/transactions/TransactionsService.java b/src/main/java/com/coinbase/prime/transactions/TransactionsService.java index 92d35ac7..65514b79 100644 --- a/src/main/java/com/coinbase/prime/transactions/TransactionsService.java +++ b/src/main/java/com/coinbase/prime/transactions/TransactionsService.java @@ -28,6 +28,7 @@ public interface TransactionsService { ListWalletTransactionsResponse listWalletTransactions(ListWalletTransactionsRequest request) throws CoinbaseClientException, CoinbasePrimeException; CreateWalletTransferResponse createWalletTransfer(CreateWalletTransferRequest request) throws CoinbaseClientException, CoinbasePrimeException; CreateWalletWithdrawalResponse createWalletWithdrawal(CreateWalletWithdrawalRequest request) throws CoinbaseClientException, CoinbasePrimeException; + ListAdvancedTransferTransactionsResponse listAdvancedTransferTransactions(ListAdvancedTransferTransactionsRequest request) throws CoinbaseClientException, CoinbasePrimeException; /** * Submit travel rule data for an existing deposit transaction. @@ -40,4 +41,5 @@ public interface TransactionsService { * @throws CoinbasePrimeException if there is a server-side error */ SubmitDepositTravelRuleDataResponse submitDepositTravelRuleData(SubmitDepositTravelRuleDataRequest request) throws CoinbaseClientException, CoinbasePrimeException; + GetTransactionTravelRuleDataResponse getTransactionTravelRuleData(GetTransactionTravelRuleDataRequest request) throws CoinbaseClientException, CoinbasePrimeException; } diff --git a/src/main/java/com/coinbase/prime/transactions/TransactionsServiceImpl.java b/src/main/java/com/coinbase/prime/transactions/TransactionsServiceImpl.java index 7c0879af..cc089c0d 100644 --- a/src/main/java/com/coinbase/prime/transactions/TransactionsServiceImpl.java +++ b/src/main/java/com/coinbase/prime/transactions/TransactionsServiceImpl.java @@ -106,6 +106,18 @@ public CreateOnchainTransactionResponse createOnchainTransaction(CreateOnchainTr new TypeReference() {}); } + @Override + public ListAdvancedTransferTransactionsResponse listAdvancedTransferTransactions(ListAdvancedTransferTransactionsRequest request) + throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/portfolios/%s/advanced_transfers/%s/transactions", request.getPortfolioId(), + request.getAdvancedTransferId()), + request, + List.of(200), + new TypeReference() {}); + } + /** * Submit travel rule data for an existing deposit transaction. *

@@ -122,4 +134,16 @@ public SubmitDepositTravelRuleDataResponse submitDepositTravelRuleData(SubmitDep List.of(200), new TypeReference() {}); } + + @Override + public GetTransactionTravelRuleDataResponse getTransactionTravelRuleData(GetTransactionTravelRuleDataRequest request) + throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/portfolios/%s/transactions/%s/travel_rule", request.getPortfolioId(), + request.getTransactionId()), + request, + List.of(200), + new TypeReference() {}); + } } diff --git a/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java b/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java index 0ce46772..b594111a 100644 --- a/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java +++ b/src/main/java/com/coinbase/prime/users/ListPortfolioUsersResponse.java @@ -16,21 +16,21 @@ package com.coinbase.prime.users; -import com.coinbase.prime.model.PortfolioUser; +import com.coinbase.prime.model.EntityUser; import com.coinbase.prime.common.Pagination; public class ListPortfolioUsersResponse { - private PortfolioUser[] users; + private EntityUser[] users; private Pagination pagination; public ListPortfolioUsersResponse() { } - public PortfolioUser[] getUsers() { + public EntityUser[] getUsers() { return users; } - public void setUsers(PortfolioUser[] users) { + public void setUsers(EntityUser[] users) { this.users = users; } diff --git a/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java b/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java index ca3c1afa..561e2426 100644 --- a/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/CreateWalletRequest.java @@ -17,8 +17,6 @@ package com.coinbase.prime.wallets; import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.model.Network; -import com.coinbase.prime.model.enums.NetworkFamily; import com.coinbase.prime.model.enums.WalletType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -37,14 +35,6 @@ public class CreateWalletRequest { @JsonProperty("wallet_type") private WalletType type; - @JsonProperty("idempotency_key") - private String idempotencyKey; - - @JsonProperty("network_family") - private NetworkFamily networkFamily; - - private Network network; - public CreateWalletRequest() { } @@ -53,9 +43,6 @@ public CreateWalletRequest(Builder builder) { this.name = builder.name; this.symbol = builder.symbol; this.type = builder.type; - this.idempotencyKey = builder.idempotencyKey; - this.networkFamily = builder.networkFamily; - this.network = builder.network; } public String getPortfolioId() { @@ -90,38 +77,11 @@ public void setType(WalletType type) { this.type = type; } - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - public NetworkFamily getNetworkFamily() { - return networkFamily; - } - - public void setNetworkFamily(NetworkFamily networkFamily) { - this.networkFamily = networkFamily; - } - - public Network getNetwork() { - return network; - } - - public void setNetwork(Network network) { - this.network = network; - } - public static class Builder { private String portfolioId; private String name; private String symbol; private WalletType type; - private String idempotencyKey; - private NetworkFamily networkFamily; - private Network network; public Builder() { } @@ -146,21 +106,6 @@ public Builder type(WalletType type) { return this; } - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder networkFamily(NetworkFamily networkFamily) { - this.networkFamily = networkFamily; - return this; - } - - public Builder network(Network network) { - this.network = network; - return this; - } - public CreateWalletRequest build() throws CoinbaseClientException { this.validate(); return new CreateWalletRequest(this); @@ -176,6 +121,9 @@ private void validate() throws CoinbaseClientException { if (isNullOrEmpty(this.symbol)) { throw new CoinbaseClientException("Symbol is required"); } + if (this.type == null) { + throw new CoinbaseClientException("Type is required"); + } } } } diff --git a/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java b/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java index 86451c2f..ade61318 100644 --- a/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/GetWalletDepositInstructionsRequest.java @@ -18,6 +18,7 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.enums.WalletDepositInstructionType; +import com.coinbase.prime.model.enums.NetworkType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,7 +40,7 @@ public class GetWalletDepositInstructionsRequest { private String networkId; @JsonProperty("network.type") - private String networkType; + private NetworkType networkType; public GetWalletDepositInstructionsRequest() { } @@ -84,11 +85,11 @@ public void setNetworkId(String networkId) { this.networkId = networkId; } - public String getNetworkType() { + public NetworkType getNetworkType() { return networkType; } - public void setNetworkType(String networkType) { + public void setNetworkType(NetworkType networkType) { this.networkType = networkType; } @@ -97,7 +98,7 @@ public static class Builder { private String walletId; private WalletDepositInstructionType depositType; private String networkId; - private String networkType; + private NetworkType networkType; public Builder() { } @@ -122,7 +123,7 @@ public GetWalletDepositInstructionsRequest.Builder networkId(String networkId) { return this; } - public GetWalletDepositInstructionsRequest.Builder networkType(String networkType) { + public GetWalletDepositInstructionsRequest.Builder networkType(NetworkType networkType) { this.networkType = networkType; return this; } diff --git a/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java b/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java index b89c2285..317693f0 100644 --- a/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/ListWalletAddressesRequest.java @@ -106,11 +106,6 @@ public Builder sortDirection(SortDirection sortDirection) { return this; } - public Builder limit(Integer limit) { - this.limit = limit; - return this; - } - public ListWalletAddressesRequest build() throws CoinbaseClientException { this.validate(); return new ListWalletAddressesRequest(this); @@ -123,6 +118,9 @@ private void validate() throws CoinbaseClientException { if (isNullOrEmpty(this.walletId)) { throw new CoinbaseClientException("Wallet ID is required"); } + if (isNullOrEmpty(this.networkId)) { + throw new CoinbaseClientException("Network ID is required"); + } } } -} +} \ No newline at end of file diff --git a/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java b/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java index a59158fb..85635288 100644 --- a/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java +++ b/src/main/java/com/coinbase/prime/wallets/ListWalletsRequest.java @@ -35,9 +35,6 @@ public class ListWalletsRequest extends PrimeListRequest { private String[] symbols; - @JsonProperty("get_network_unified_wallets") - private Boolean getNetworkUnifiedWallets; - public ListWalletsRequest() {} public ListWalletsRequest(Builder builder) { @@ -45,7 +42,6 @@ public ListWalletsRequest(Builder builder) { this.portfolioId = builder.portfolioId; this.type = builder.type; this.symbols = builder.symbols; - this.getNetworkUnifiedWallets = builder.getNetworkUnifiedWallets; } public String getPortfolioId() { @@ -72,19 +68,10 @@ public void setSymbols(String[] symbols) { this.symbols = symbols; } - public Boolean getGetNetworkUnifiedWallets() { - return getNetworkUnifiedWallets; - } - - public void setGetNetworkUnifiedWallets(Boolean getNetworkUnifiedWallets) { - this.getNetworkUnifiedWallets = getNetworkUnifiedWallets; - } - public static class Builder { private String portfolioId; private WalletType type; private String[] symbols; - private Boolean getNetworkUnifiedWallets; private String cursor; private SortDirection sortDirection; private Integer limit; @@ -106,11 +93,6 @@ public Builder symbols(String[] symbols) { return this; } - public Builder getNetworkUnifiedWallets(Boolean getNetworkUnifiedWallets) { - this.getNetworkUnifiedWallets = getNetworkUnifiedWallets; - return this; - } - public Builder pagination(Pagination pagination) { this.cursor = pagination.getNextCursor(); this.sortDirection = pagination.getSortDirection(); diff --git a/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java b/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java index c99bda18..8d17503f 100644 --- a/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/orders/OrdersServiceSerializationTest.java @@ -261,7 +261,7 @@ public void testCancelOrderRequestCreation() throws CoinbaseClientException { @Test public void testCancelOrderResponseDeserialization() throws JsonProcessingException { - String json = "{\"id\":\"order-789\"}"; + String json = "{\"order_id\":\"order-789\"}"; CancelOrderResponse response = objectMapper.readValue(json, CancelOrderResponse.class); diff --git a/tools/model-generator/.openapi-generator-ignore b/tools/model-generator/.openapi-generator-ignore index c1c56ea1..139bc152 100644 --- a/tools/model-generator/.openapi-generator-ignore +++ b/tools/model-generator/.openapi-generator-ignore @@ -6,9 +6,8 @@ src/main/java/com/coinbase/prime/model/*Request.java src/main/java/com/coinbase/prime/model/*Response.java -# Google infrastructure types (except GoogleTypeDate which is used) -src/main/java/com/coinbase/prime/model/GoogleProtobuf*.java -src/main/java/com/coinbase/prime/model/GoogleRpc*.java +# Google infrastructure types +src/main/java/com/coinbase/prime/model/Google*.java # Inline schemas src/main/java/com/coinbase/prime/model/RFQ.java @@ -22,7 +21,6 @@ src/main/java/com/coinbase/prime/model/*AnyOf*.java src/main/java/com/coinbase/prime/model/*RequestIsARequestTo*.java src/main/java/com/coinbase/prime/model/ChangeOnchainAddressGroupRequestIsARequestToCreateOrUpdateANewOnchainAddressGroup.java src/main/java/com/coinbase/prime/model/CreateATransferBetweenTwoWallets.java -src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java # Abstract schemas src/main/java/com/coinbase/prime/model/AbstractOpenApiSchema.java diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java index 11901e8c..1119a322 100644 --- a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java @@ -116,11 +116,6 @@ public void generateModels() throws IOException { configurator.setAdditionalProperties(additionalProperties); - // Use primitive boolean instead of Boolean wrapper - Map typeMappings = new HashMap<>(); - typeMappings.put("boolean", "boolean"); - configurator.setTypeMappings(typeMappings); - // Generate only models (not APIs) configurator.setGenerateAliasAsModel(true); From a0ba43a58d71512c8f1adb58928f6d759b703fd6 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 23 Mar 2026 06:29:57 -0700 Subject: [PATCH 7/8] chore: update changelog and version to 1.7.0 Made-with: Cursor --- CHANGELOG.md | 88 ++++++++++++++++++++++++---------------------------- pom.xml | 2 +- 2 files changed, 42 insertions(+), 48 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6a36fd3..e55bc9f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,64 +1,58 @@ # Changelog -## [1.7.0] - 2026-02-17 +## [1.7.0] - 2026-03-19 ### Added +#### New Services +- **Advanced Transfers Service** (`advancedtransfers` package) + - `listAdvancedTransfers` - List advanced transfers for an entity + - `createAdvancedTransfer` - Create a new advanced transfer + - `cancelAdvancedTransfer` - Cancel an existing advanced transfer + #### New Endpoints - **Futures Service** - `getFcmEquity` - Get FCM equity information for an entity +- **Transactions Service** + - `getTransactionTravelRuleData` - Get travel rule data for a transaction (moved from removed `travelrule` package) + - `listAdvancedTransferTransactions` - List transactions associated with an advanced transfer #### New Models -- `ValidatorAllocation` - Validator-level allocation for ETH V2 unstaking -- `GoogleTypeDate` - Google date type for travel rule date of birth fields +- `AdvancedTransfer` - Advanced transfer details including state, type, and fund movements +- `BlindMatchMetadata` - Metadata for blind match advanced transfers +- `CommissionDetailTotal` - Commission detail totals for orders and fills +- `EntityUser` - Entity user information +- `FcmScheduledMaintenance` - FCM scheduled maintenance details +- `FcmTradingSessionDetails` - FCM trading session information including state and maintenance schedules +- `FundMovement` - Fund movement details within advanced transfers +- `FutureProductDetails` - Futures product details including contract specifications +- `GoogleTypeDate` - Date representation using Google's date type +- `PerpetualProductDetails` - Perpetual product details +- `PortfolioUser` - Portfolio user association data +- `RequestToSubmitTravelRuleDataForAnExistingDepositTransaction` - Travel rule submission request model +- `ValidatorAllocation` - Validator allocation details for staking + +#### New Enums +- `AdvancedTransferState` - Advanced transfer lifecycle states +- `AdvancedTransferType` - Advanced transfer types (e.g., `ADVANCED_TRANSFER_TYPE_BLIND_MATCH`) +- `ContractExpiryType` - Contract expiry types for futures products +- `ExpiringContractStatus` - Status of expiring futures contracts +- `FcmMarginHealthState` - FCM margin health states +- `FcmTradingSessionClosedReason` - Reasons for FCM trading session closure +- `FcmTradingSessionState` - FCM trading session states +- `ProductType` - Product types (spot, futures, perpetuals, etc.) +- `RiskManagementType` - Risk management types +- `SecondaryPermission` - Secondary permission types #### New Examples -- `GetFcmEquity.java` - FCM equity retrieval example +- `GetTransactionTravelRuleData.java` - Retrieve travel rule data for a transaction ### Changed - -#### Breaking Changes -- `ListOpenOrdersRequest` - `startDate`/`endDate` type changed from `Date` to `String` to match spec -- `CreateOrderRequest` / `GetOrderPreviewRequest` - `pegOffsetType` changed from `String` to `PegOffsetType` enum -- `CreateWalletTransferResponse` / `CreateWalletWithdrawalResponse` - `destinationType`/`sourceType` changed from `DestinationType` enum to `String` to match spec -- `ListPortfolioUsersResponse` - Changed from `EntityUser[]` to `PortfolioUser[]` to match spec -- `GetPositionsResponse` - Changed from `Position[]` to `FcmPosition[]` to match spec -- `ListExistingLocatesResponse` - Changed from `Locate[]` to `ExistingLocate[]` to match spec -- `CancelOrderResponse` - JSON field mapping changed from `order_id` to `id` to match spec -- `SubmitDepositTravelRuleDataRequest` - Removed `isIntermediary` field (not in spec) -- `ListWalletTransactionsResponse` - Removed `request` field -- `UpdateOnchainAddressBookEntryRequest` - Renamed `getAddressGroupId`/`setAddressGroupId` to `getAddressGroup`/`setAddressGroup` - -#### New Fields -- `ListEntityActivitiesRequest` / `ListPortfolioActivitiesRequest` - Added `getNetworkUnifiedActivities` -- `CreateAddressBookEntryRequest` - Added `chainIds` -- `ListOnchainWalletBalancesResponse` - Added `defiBalances` -- `ListPortfolioBalancesResponse` - Added `primeCustodyBalances` -- `CreateNewLocatesRequest` - Added `conversionDate` -- `ScheduleEntityFuturesSweepRequest` - Added `amount` and `currency` builder methods -- `TravelRuleData` - Added `attestVerifiedWalletOwnership` -- `TravelRuleParty` - Added `personalId`, `dateOfBirth`, `telephoneNumber`, `accountId` -- `WalletUnstakeInputs` - Added `validatorAllocations` -- `ListOnchainAddressGroupsRequest` - Added `@JsonProperty`/`@JsonIgnore` annotations on `portfolioId` -- `AcceptQuoteRequest` / `CreateQuoteRequest` - Added `settlCurrency` -- `ListPortfolioTransactionsRequest` - Added `getNetworkUnifiedTransactions`, `travelRuleStatus` -- `CreateWalletRequest` - Added `idempotencyKey`, `networkFamily`, `network` -- `ListWalletsRequest` - Added `getNetworkUnifiedWallets` -- `ListWalletAddressesRequest` - Added `limit` builder method -- `RewardSubtype` enum - Added `BUIDL_DIVIDEND` - -#### Relaxed Validations -- `CreateWalletRequest` - `wallet_type` no longer required (optional per spec) -- `ListWalletAddressesRequest` - `networkId` no longer required (optional per spec) -- `CreateOnchainTransactionRequest` - `rpc` no longer required (optional per spec) - -### Fixed -- `GetPortfolioCreditInformationResponse` - Added missing `@JsonProperty("post_trade_credit")` annotation for correct deserialization -- `FinancingServiceImpl` - Fixed URL path from `/entities/{id}/locates/locates_availability` to `/entities/{id}/locates_availability` -- `ListInterestAccrualsForPortfolioRequest` - Fixed typo `prtfolioId` → `portfolioId` in builder method -- `ListInterestAccrualsForPortfolioRequest` - Added missing `build()` method to Builder -- `GetPortfolioActivityRequest` - Removed incorrect `PrimeListRequest` inheritance (single-item request, not a list) -- `GetWalletDepositInstructionsRequest` - Changed `networkType` from `NetworkType` enum to `String` to match spec +- Moved `getTransactionTravelRuleData` from `TravelRuleService` into `TransactionsService`; removed the `travelrule` package and `PrimeServiceFactory.createTravelRuleService` +- `Order` - Added `productType` and `commissionDetailTotal` fields +- `Fill` - Added `productType` and `commissionDetailTotal` fields +- `Product` - Added `productType`, `fcmTradingSessionDetails`, and `futureProductDetails` fields +- Boolean fields in generated models updated from `Boolean` wrapper to primitive `boolean` type ## [1.6.2] - 2026-01-12 diff --git a/pom.xml b/pom.xml index e432adae..5843bd10 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ Sample Java SDK for the Coinbase Prime REST APIs com.coinbase.prime https://github.com/coinbase-samples/prime-sdk-java - 1.6.2 + 1.7.0 Apache License, Version 2.0 From 4623cf9fdc4cfb152dc8ca9e4452acd681cb3e22 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 23 Mar 2026 07:16:26 -0700 Subject: [PATCH 8/8] address review: use primitive boolean, fix PrimeListRequest inheritance, add portfolioId validation - TravelRuleData: change Boolean wrapper fields/getters to boolean primitive - GetPortfolioActivityRequest: remove incorrect extends PrimeListRequest (single-item request, not a list; does not use cursor/limit/sortDirection) - ListOnchainAddressGroupsRequest: add Builder validation requiring portfolioId - Model generator: add boolean type mapping and post-processing step to enforce boolean primitives in all generated models going forward Made-with: Cursor --- .../GetPortfolioActivityRequest.java | 3 +- .../coinbase/prime/model/TravelRuleData.java | 40 +++++++++---------- .../ListOnchainAddressGroupsRequest.java | 5 +++ .../modelgenerator/OpenApiGenerator.java | 5 +++ .../tools/modelgenerator/PostProcessor.java | 12 ++++++ 5 files changed, 43 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java b/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java index 0ffb6393..f09604fd 100644 --- a/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java +++ b/src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java @@ -16,7 +16,6 @@ package com.coinbase.prime.activities; -import com.coinbase.prime.common.PrimeListRequest; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.coinbase.core.errors.CoinbaseClientException; @@ -25,7 +24,7 @@ /** * Request for getting a portfolio activity by activity ID. */ -public class GetPortfolioActivityRequest extends PrimeListRequest { +public class GetPortfolioActivityRequest { @JsonProperty(required = true, value = "portfolio_id") @JsonIgnore private String portfolioId; diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index c206e4d2..4f467942 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -35,22 +35,22 @@ public class TravelRuleData { private TravelRuleParty originator; @JsonProperty("is_self") - private Boolean isSelf; + private boolean isSelf; /** * True if Coinbase is being used as an intermediary for a customer transfer. */ @JsonProperty("is_intermediary") - private Boolean isIntermediary; + private boolean isIntermediary; @JsonProperty("opt_out_of_ownership_verification") - private Boolean optOutOfOwnershipVerification; + private boolean optOutOfOwnershipVerification; /** * Whether the originating VASP attests to verified wallet ownership. When true with is_intermediary, enables automatic VASP data enrichment from the legal entity. */ @JsonProperty("attest_verified_wallet_ownership") - private Boolean attestVerifiedWalletOwnership; + private boolean attestVerifiedWalletOwnership; public TravelRuleData() { } @@ -77,32 +77,32 @@ public TravelRuleParty getOriginator() { public void setOriginator(TravelRuleParty originator) { this.originator = originator; } - public Boolean getIsSelf() { + public boolean isIsSelf() { return isSelf; } - public void setIsSelf(Boolean isSelf) { + public void setIsSelf(boolean isSelf) { this.isSelf = isSelf; } - public Boolean getIsIntermediary() { + public boolean isIsIntermediary() { return isIntermediary; } - public void setIsIntermediary(Boolean isIntermediary) { + public void setIsIntermediary(boolean isIntermediary) { this.isIntermediary = isIntermediary; } - public Boolean getOptOutOfOwnershipVerification() { + public boolean isOptOutOfOwnershipVerification() { return optOutOfOwnershipVerification; } - public void setOptOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { + public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; } - public Boolean getAttestVerifiedWalletOwnership() { + public boolean isAttestVerifiedWalletOwnership() { return attestVerifiedWalletOwnership; } - public void setAttestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { + public void setAttestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; } public static class Builder { @@ -110,13 +110,13 @@ public static class Builder { private TravelRuleParty originator; - private Boolean isSelf; + private boolean isSelf; - private Boolean isIntermediary; + private boolean isIntermediary; - private Boolean optOutOfOwnershipVerification; + private boolean optOutOfOwnershipVerification; - private Boolean attestVerifiedWalletOwnership; + private boolean attestVerifiedWalletOwnership; public Builder beneficiary(TravelRuleParty beneficiary) { this.beneficiary = beneficiary; @@ -128,22 +128,22 @@ public Builder originator(TravelRuleParty originator) { return this; } - public Builder isSelf(Boolean isSelf) { + public Builder isSelf(boolean isSelf) { this.isSelf = isSelf; return this; } - public Builder isIntermediary(Boolean isIntermediary) { + public Builder isIntermediary(boolean isIntermediary) { this.isIntermediary = isIntermediary; return this; } - public Builder optOutOfOwnershipVerification(Boolean optOutOfOwnershipVerification) { + public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; return this; } - public Builder attestVerifiedWalletOwnership(Boolean attestVerifiedWalletOwnership) { + public Builder attestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; return this; } diff --git a/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java b/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java index 872cbc20..1eee7468 100644 --- a/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java +++ b/src/main/java/com/coinbase/prime/onchainaddressbook/ListOnchainAddressGroupsRequest.java @@ -18,6 +18,8 @@ import com.coinbase.prime.common.PrimeListRequest; import com.coinbase.prime.model.enums.SortDirection; +import com.coinbase.core.errors.CoinbaseClientException; +import static com.coinbase.core.utils.Utils.isNullOrEmpty; /** * Request for listing onchain address groups for a portfolio. @@ -72,6 +74,9 @@ public Builder limit(Integer limit) { } public ListOnchainAddressGroupsRequest build() { + if (isNullOrEmpty(this.portfolioId)) { + throw new CoinbaseClientException("PortfolioId cannot be null"); + } return new ListOnchainAddressGroupsRequest(this); } } diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java index 1119a322..cce77e26 100644 --- a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java @@ -116,6 +116,11 @@ public void generateModels() throws IOException { configurator.setAdditionalProperties(additionalProperties); + // Map OpenAPI boolean type to Java primitive boolean (not Boolean wrapper) + Map typeMappings = new HashMap<>(); + typeMappings.put("Boolean", "boolean"); + configurator.setTypeMappings(typeMappings); + // Generate only models (not APIs) configurator.setGenerateAliasAsModel(true); diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java index 01606e99..c7d7a3e6 100644 --- a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java @@ -274,6 +274,8 @@ private void processFile(Path file, Path targetDir, boolean isEnum) throws IOExc } else { // Fix enum imports for models content = fixEnumImports(content); + // Ensure boolean fields use primitive type, not Boolean wrapper + content = applyBooleanPrimitiveConversion(content); } Files.writeString(outputPath, content); @@ -516,6 +518,16 @@ private String applyContentReplacements(String content) { return content; } + private String applyBooleanPrimitiveConversion(String content) { + // Field declarations: private Boolean foo; -> private boolean foo; + content = content.replaceAll("\\bprivate Boolean (\\w)", "private boolean $1"); + // Getter return types: public Boolean getFoo() -> public boolean getFoo() + content = content.replaceAll("\\bpublic Boolean (get|is)(\\w)", "public boolean $1$2"); + // Setter and builder method params: (Boolean foo) -> (boolean foo) + content = content.replaceAll("\\(Boolean (\\w)", "(boolean $1"); + return content; + } + private Path findProjectRoot() { Path current = outputDir; while (current != null) {