From c72e0a51eeb4a14047104389f9a88e8b81042f0b Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Tue, 17 Feb 2026 14:28:18 -0800 Subject: [PATCH 1/5] 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/5] 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/5] 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/5] 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/5] 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);