Skip to content

Commit ebfa4b1

Browse files
authored
Merge pull request #25 from coinbase-samples/endpoint-fix
Endpoint fix
2 parents 6537b5b + cc9e529 commit ebfa4b1

File tree

72 files changed

+913
-679
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+913
-679
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,6 @@ tmp/
2222
ai-docs/
2323

2424
# OpenAPI spec - fetch dynamically instead of committing
25-
apiSpec/*.yaml
25+
apiSpec/*.yaml
26+
27+
.java-version

CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# Changelog
22

3+
## [1.5.0] - 2025-10-28
4+
5+
### Added
6+
7+
#### Orders Service - Advanced Order Type Support
8+
- **CreateOrderRequest**: Added support for advanced order types
9+
- `settlCurrency` - Settlement currency for futures contracts
10+
- `postOnly` - Post-only flag for maker-only LIMIT orders
11+
- `pegOffsetType` - Peg offset type for PEG orders
12+
- `offset` - Offset value for PEG orders (0 = peg to best bid/offer)
13+
- `wigLevel` - WIG (Would if Good) level for pegged orders
14+
- **GetOrderPreviewRequest**: Added same advanced order fields as CreateOrderRequest plus:
15+
- `displayQuoteSize` - Maximum order size visible on venue books (quote currency) for iceberg orders
16+
- `displayBaseSize` - Maximum order size visible on venue books (base currency) for iceberg orders
17+
- **GetOrderPreviewResponse**: Added `isRaiseExact` field for raise exact order flag
18+
- **EditOrderRequest**: Added iceberg and stop order support
19+
- `displayQuoteSize` - Display size for iceberg orders
20+
- `displayBaseSize` - Display size for iceberg orders
21+
- `stopPrice` - Stop price at which order activates
22+
23+
#### Futures Service
24+
- **GetFcmRiskLimitsResponse**: Added comprehensive FCM margin and PnL fields
25+
- `cfmTotalMargin` - Total margin required for both positions and open orders
26+
- `cfmDeltaOte` - Open Trade Equity accrued during current trading session
27+
- `cfmUnsettledRealizedPnl` - Unsettled realized PNL for positions closed intraday
28+
- `cfmUnsettledAccruedFundingPnl` - Unsettled accrued funding PNL from last settlement
29+
30+
#### Transactions Service
31+
- **CreateConversionResponse**: Added `transactionId` field - UUID of the conversion transaction
32+
33+
#### Wallets Service
34+
- **CreateWalletResponse**: Added `networkFamily` field for wallet network family
35+
- **GetWalletDepositInstructionsResponse**: Added proper JSON property annotations
36+
- `@JsonProperty("crypto_instructions")` for crypto deposit instructions
37+
- `@JsonProperty("fiat_instructions")` for fiat deposit instructions
38+
39+
### Changed
40+
41+
#### Breaking Changes
42+
- **GetCrossMarginOverviewResponse** (Financing Service): Renamed field and methods for OpenAPI alignment
43+
- Field: `crossMarginOverview``overview`
44+
- JSON property: `"cross_margin_overview"``"overview"`
45+
- Getter: `getCrossMarginOverview()``getOverview()`
46+
- Setter: `setCrossMarginOverview()``setOverview()`
47+
48+
### Fixed
49+
- Aligned all Request/Response classes with OpenAPI specification v0.1
50+
- Fixed missing optional fields across 11 classes in 5 services
51+
- Added 26 fields total to match OpenAPI spec completely
52+
- Fixed JSON property mappings for proper snake_case to camelCase conversion
53+
- Fixed acronym casing in model classes (XM* → Xm*, FCM* → Fcm*) to match Java naming conventions
54+
- Fixed field naming consistency across Request/Response classes
55+
- Corrected method signatures and naming:
56+
- `getAllocationsByClientNettingId``listAllocationsByNettingId`
57+
- Updated corresponding request/response classes: `GetAllocationsByClientNettingIdRequest``ListAllocationsByNettingIdRequest`
58+
- Fixed activity type enum: `PrimeActivityType``CustodyActivityType`
59+
- Removed `nettingId` field from `CreateAllocationRequest` to align with API specification
60+
361
## [1.4.0] - 2025-10-15
462

563
### Added

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<description>Sample Java SDK for the Coinbase Prime REST APIs</description>
2222
<groupId>com.coinbase.prime</groupId>
2323
<url>https://github.com/coinbase-samples/prime-sdk-java</url>
24-
<version>1.4.0</version>
24+
<version>1.5.0</version>
2525
<licenses>
2626
<license>
2727
<name>Apache License, Version 2.0</name>

src/main/java/com/coinbase/prime/activities/ActivitiesServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public ListEntityActivitiesResponse listEntityActivities(ListEntityActivitiesReq
6363
public GetPortfolioActivityResponse getPortfolioActivity(GetPortfolioActivityRequest request) throws CoinbasePrimeException {
6464
return this.request(
6565
HttpMethod.GET,
66-
request.getPath(),
66+
String.format("/portfolios/%s/activities/%s", request.getPortfolioId(), request.getActivityId()),
6767
null,
6868
List.of(200),
6969
new TypeReference<GetPortfolioActivityResponse>() {});

src/main/java/com/coinbase/prime/activities/GetPortfolioActivityRequest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,19 @@
1717
package com.coinbase.prime.activities;
1818

1919
import com.coinbase.prime.common.PrimeListRequest;
20+
import com.fasterxml.jackson.annotation.JsonIgnore;
21+
import com.fasterxml.jackson.annotation.JsonProperty;
2022

2123
/**
2224
* Request for getting a portfolio activity by activity ID.
2325
*/
2426
public class GetPortfolioActivityRequest extends PrimeListRequest {
27+
@JsonProperty(required = true, value = "portfolio_id")
28+
@JsonIgnore
2529
private String portfolioId;
30+
31+
@JsonProperty(required = true, value = "activity_id")
32+
@JsonIgnore
2633
private String activityId;
2734

2835
public GetPortfolioActivityRequest() {
@@ -71,4 +78,4 @@ public GetPortfolioActivityRequest build() {
7178
return new GetPortfolioActivityRequest(this);
7279
}
7380
}
74-
}
81+
}

src/main/java/com/coinbase/prime/activities/ListEntityActivitiesRequest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,19 @@ public class ListEntityActivitiesRequest extends PrimeListRequest {
3232
@JsonProperty(required = true, value = "entity_id")
3333
@JsonIgnore
3434
private String entityId;
35+
3536
@JsonProperty("activity_level")
3637
private ActivityLevel activityLevel;
38+
3739
private String[] symbols;
40+
3841
private ActivityCategory[] categories;
42+
3943
private ActivityStatus[] statuses;
44+
4045
@JsonProperty("start_time")
4146
private String startTime;
47+
4248
@JsonProperty("end_time")
4349
private String endTime;
4450

src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryRequest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ public class CreateAddressBookEntryRequest {
2626
@JsonProperty(required = true, value = "portfolio_id")
2727
@JsonIgnore
2828
private String portfolioId;
29+
2930
private String address;
31+
3032
@JsonProperty("currency_symbol")
3133
private String currencySymbol;
34+
3235
private String name;
36+
3337
@JsonProperty("account_identifier")
3438
private String accountIdentifier;
3539

src/main/java/com/coinbase/prime/addressbook/CreateAddressBookEntryResponse.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,27 @@
1616

1717
package com.coinbase.prime.addressbook;
1818

19-
import com.coinbase.prime.model.enums.PrimeActivityType;
19+
import com.coinbase.prime.model.enums.CustodyActivityType;
2020
import com.fasterxml.jackson.annotation.JsonProperty;
2121

2222
public class CreateAddressBookEntryResponse {
2323
@JsonProperty("activity_type")
24-
private PrimeActivityType activityType;
24+
private CustodyActivityType activityType;
25+
2526
@JsonProperty("num_approvals_remaining")
2627
private Integer numApprovalsRemaining;
28+
2729
@JsonProperty("activity_id")
2830
private String activityId;
2931

3032
public CreateAddressBookEntryResponse() {
3133
}
3234

33-
public PrimeActivityType getActivityType() {
35+
public CustodyActivityType getActivityType() {
3436
return activityType;
3537
}
3638

37-
public void setActivityType(PrimeActivityType activityType) {
39+
public void setActivityType(CustodyActivityType activityType) {
3840
this.activityType = activityType;
3941
}
4042

src/main/java/com/coinbase/prime/addressbook/ListAddressBookRequest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ public class ListAddressBookRequest extends PrimeListRequest {
2929
@JsonProperty(required = true, value = "portfolio_id")
3030
@JsonIgnore
3131
private String portfolioId;
32+
3233
@JsonProperty("currency_symbol")
3334
private String currencySymbol;
35+
3436
private String search;
3537

3638
public ListAddressBookRequest() {

src/main/java/com/coinbase/prime/addressbook/ListAddressBookResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
public class ListAddressBookResponse {
2323
private AddressBookEntry[] addresses;
24+
2425
private Pagination pagination;
2526

2627
public ListAddressBookResponse() {

0 commit comments

Comments
 (0)