Skip to content

feat: add September Prime API endpoints and regenerate models - #6

Merged
cfluke-cb merged 7 commits into
mainfrom
cfluke/sep-update
Sep 2, 2026
Merged

feat: add September Prime API endpoints and regenerate models#6
cfluke-cb merged 7 commits into
mainfrom
cfluke/sep-update

Conversation

@cfluke-cb

Copy link
Copy Markdown
Contributor

Description

Syncs the Java SDK to the latest Coinbase Prime OpenAPI spec and exposes the new operations.

  • Regenerates models/enums with OpenAPI Generator 7.25.0.
  • Adds ApiKeyService.rotateApiKey (POST /api-keys/rotate).
  • Adds financing: conversion fees, XM liquidation get/list, entity and portfolio rewards rate (beta).
  • Adds futures: derivatives currency summary and derivative positions.
  • Adds isBuyExact on create-order and order-preview request/response types (generated Order already included it).
  • Bumps the SDK to 1.11.0 and updates CHANGELOG, README, examples, and tests.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Dependency update
  • Refactor / cleanup
  • Other (describe below)

OpenAPI Generator in tools/model-generator is bumped from 7.14.0 to 7.25.0.

Checklist

  • Tests included / updated
  • Changelog updated
  • Version bump if needed

Test plan

  • mvn -B test -DskipITs (unit/serialization tests)
  • make format with JDK 17 (google-java-format 1.24.0 does not run on JDK 24+)
  • Spotless CI / format workflow is green
  • Optional live examples with credentials: GetConversionFees, XM liquidations, rewards rate, derivatives endpoints
  • Do not run RotateApiKey against a production key unless rotation is intended

Made with Cursor

@cfluke-cb
cfluke-cb requested a review from a team as a code owner September 1, 2026 20:26
@cb-heimdall

cb-heimdall commented Sep 1, 2026

Copy link
Copy Markdown

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

cfluke-cb and others added 3 commits September 1, 2026 16:32
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
rcbgr
rcbgr previously requested changes Sep 1, 2026

@rcbgr rcbgr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a decrypt helper too?

encrypted_credentials is encrypted with HKDF-SHA256 + AES-256-GCM using your secret_key.

this would need to tie into the signer feature

* immediate expiry on approval. Cannot extend beyond the original key's expiry.
*/
@JsonProperty("duration_seconds")
private Long durationSeconds;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need a long? what's the max value?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is consistent where seconds is used elsewhere in sdk

@cb-heimdall
cb-heimdall dismissed rcbgr’s stale review September 1, 2026 21:04

Approved review 5082835055 from rcbgr is now dismissed due to new commit. Re-request for approval.

import com.fasterxml.jackson.annotation.JsonProperty;

/** XMLiquidatedAsset provides per-asset detail for a liquidation */
public class XMLiquidatedAsset {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be XmlLiquidationAsset?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same w/ all the Xml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its Cross Margin (XM) everywhere in docs

rcbgr
rcbgr previously approved these changes Sep 2, 2026
import com.fasterxml.jackson.annotation.JsonProperty;

/** XMLiquidatedAsset provides per-asset detail for a liquidation */
public class XMLiquidatedAsset {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same w/ all the Xml

*/
public CoinbasePrimeCredentials toPrimeCredentials() throws CoinbaseClientException {
if (Utils.isNullOrEmpty(serviceAccountId)) {
return new CoinbasePrimeCredentials(accessKey, passphrase, secretKey);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This secret key is encrypted?

@cfluke-cb
cfluke-cb requested a review from nmorgan-cb September 2, 2026 14:58
rcbgr
rcbgr previously approved these changes Sep 2, 2026
@cfluke-cb
cfluke-cb merged commit 6346f41 into main Sep 2, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants