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 e432adae..5843bd10 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ Sample Java SDK for the Coinbase Prime REST APIs com.coinbase.prime https://github.com/coinbase-samples/prime-sdk-java - 1.6.2 + 1.7.0 Apache License, Version 2.0 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..4ff6591f --- /dev/null +++ b/src/main/java/com/coinbase/examples/futures/GetFcmEquity.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.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..6d6f8801 --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.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..468a97b6 --- /dev/null +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026-present Coinbase Global, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.coinbase.prime.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..f3120fd6 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/GoogleTypeDate.java @@ -0,0 +1,99 @@ +/* + * Copyright 2026-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.JsonProperty; + +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..0caec860 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -0,0 +1,78 @@ +/* + * Copyright 2026-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.JsonProperty; + +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..14adb884 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -19,12 +19,14 @@ */ 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.Arrays; +import java.util.List; public class WalletUnstakeInputs { /** @@ -33,11 +35,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 +55,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..b89c2285 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