From a2cc57fec21887d008a8449cebf077fe4de0eddd Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 8 Jun 2026 18:32:51 -0400 Subject: [PATCH 1/8] feat(generator): restore OpenAPI-driven model generator Reintroduce tools/model-generator with OpenAPI Generator templates, spec fetch, and post-processing for model and enum output under src/main/java. Co-authored-by: Cursor --- .gitignore | 2 + .../model-generator/.openapi-generator-ignore | 29 + tools/model-generator/pom.xml | 139 ++++ .../modelgenerator/EnumJavadocEnhancer.java | 223 ++++++ .../modelgenerator/GeneratedFileHeader.java | 91 +++ .../coinbase/tools/modelgenerator/Main.java | 92 +++ .../modelgenerator/ModelJavadocEnhancer.java | 339 ++++++++ .../modelgenerator/OpenApiGenerator.java | 154 ++++ .../tools/modelgenerator/PostProcessor.java | 735 ++++++++++++++++++ .../tools/modelgenerator/SpecFetcher.java | 73 ++ .../templates/licenseInfo.mustache | 20 + .../model-generator/templates/model.mustache | 6 + .../templates/modelEnum.mustache | 8 + tools/model-generator/templates/pojo.mustache | 37 + 14 files changed, 1948 insertions(+) create mode 100644 tools/model-generator/.openapi-generator-ignore create mode 100644 tools/model-generator/pom.xml create mode 100644 tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/EnumJavadocEnhancer.java create mode 100644 tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/GeneratedFileHeader.java create mode 100644 tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/Main.java create mode 100644 tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/ModelJavadocEnhancer.java create mode 100644 tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java create mode 100644 tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java create mode 100644 tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/SpecFetcher.java create mode 100644 tools/model-generator/templates/licenseInfo.mustache create mode 100644 tools/model-generator/templates/model.mustache create mode 100644 tools/model-generator/templates/modelEnum.mustache create mode 100644 tools/model-generator/templates/pojo.mustache diff --git a/.gitignore b/.gitignore index bad3a7a..83fee5b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ dependency-reduced-pom.xml .classpath .project .settings +.factorypath +.metadata/ .claude/settings.local.json .envrc diff --git a/tools/model-generator/.openapi-generator-ignore b/tools/model-generator/.openapi-generator-ignore new file mode 100644 index 0000000..5637400 --- /dev/null +++ b/tools/model-generator/.openapi-generator-ignore @@ -0,0 +1,29 @@ +# OpenAPI Generator Ignore File +# This file specifies patterns for files that should not be generated +# See https://openapi-generator.tech/docs/customization#ignore-file-format + +# Request/Response models (service-specific, not in model package) +src/main/java/com/coinbase/prime/model/*Request.java +src/main/java/com/coinbase/prime/model/*Response.java + +# Google infrastructure types (google.type.Date is generated as GoogleTypeDate and renamed to DateOfBirth) +src/main/java/com/coinbase/prime/model/GoogleProtobufAny.java +src/main/java/com/coinbase/prime/model/GoogleRpcStatus.java + +# Inline schemas +src/main/java/com/coinbase/prime/model/RFQ.java + +# OpenAPI generator artifacts +src/main/java/com/coinbase/prime/model/*AllOf*.java +src/main/java/com/coinbase/prime/model/*OneOf*.java +src/main/java/com/coinbase/prime/model/*AnyOf*.java + +# Malformed class names from spec +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 + +# Abstract schemas +src/main/java/com/coinbase/prime/model/AbstractOpenApiSchema.java +src/main/java/com/coinbase/prime/model/ModelApiResponse.java + diff --git a/tools/model-generator/pom.xml b/tools/model-generator/pom.xml new file mode 100644 index 0000000..d0630c3 --- /dev/null +++ b/tools/model-generator/pom.xml @@ -0,0 +1,139 @@ + + + 4.0.0 + + com.coinbase.tools + model-generator + 1.0.0 + jar + + Coinbase Prime SDK Model Generator + Tool to generate Java models from OpenAPI specification + + + 11 + 11 + UTF-8 + 7.14.0 + 2.16.1 + 1.13.0 + 2.2 + + + + + + org.openapitools + openapi-generator + ${openapi.generator.version} + + + + + com.palantir.javapoet + javapoet + 0.7.0 + + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + ${jackson.version} + + + + + org.yaml + snakeyaml + ${snakeyaml.version} + + + + + commons-io + commons-io + 2.15.1 + + + + + org.slf4j + slf4j-api + 2.0.9 + + + org.slf4j + slf4j-simple + 2.0.9 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 11 + 11 + + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.1 + + + package + + shade + + + + + com.coinbase.tools.modelgenerator.Main + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 3.1.0 + + + + generate-models + + java + + + com.coinbase.tools.modelgenerator.Main + + + + + + + + + + generate + + clean package exec:java@generate-models + + + + diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/EnumJavadocEnhancer.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/EnumJavadocEnhancer.java new file mode 100644 index 0000000..758c922 --- /dev/null +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/EnumJavadocEnhancer.java @@ -0,0 +1,223 @@ +/* + * 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.tools.modelgenerator; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.yaml.snakeyaml.Yaml; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Applies enum class- and constant-level Javadoc from OpenAPI schema descriptions. + * Per-value docs are parsed from bullet lists ({@code - VALUE: description}) in the schema + * {@code description} field (the Prime public spec does not use {@code x-enum-descriptions}). + */ +public final class EnumJavadocEnhancer { + private static final Logger logger = LoggerFactory.getLogger(EnumJavadocEnhancer.class); + + private static final Pattern ENUM_CONSTANT_LINE = + Pattern.compile("^(\\s*)([A-Z][A-Z0-9_]*)(\\s*,?\\s*)$"); + + private final Map docsByJavaName; + + private EnumJavadocEnhancer(Map docsByJavaName) { + this.docsByJavaName = docsByJavaName; + } + + public static EnumJavadocEnhancer load(Path specPath) throws IOException { + Map docs = new LinkedHashMap<>(); + + try (InputStream in = Files.newInputStream(specPath)) { + Yaml yaml = new Yaml(); + @SuppressWarnings("unchecked") + Map root = yaml.load(in); + @SuppressWarnings("unchecked") + Map components = (Map) root.get("components"); + if (components == null) { + return new EnumJavadocEnhancer(docs); + } + @SuppressWarnings("unchecked") + Map schemas = (Map) components.get("schemas"); + if (schemas == null) { + return new EnumJavadocEnhancer(docs); + } + + for (Map.Entry entry : schemas.entrySet()) { + if (!(entry.getValue() instanceof Map)) { + continue; + } + @SuppressWarnings("unchecked") + Map schema = (Map) entry.getValue(); + if (!schema.containsKey("enum")) { + continue; + } + + String description = stringOrNull(schema.get("description")); + if (description == null) { + description = stringOrNull(schema.get("title")); + } + + String schemaKey = entry.getKey(); + String shortName = schemaShortKey(schemaKey); + String javaName = PostProcessor.stripSchemaNameToJavaType(shortName); + + EnumDoc enumDoc = new EnumDoc(description, parseEnumValueDescriptions(description)); + docs.put(javaName, enumDoc); + if (!shortName.equals(javaName)) { + docs.putIfAbsent(shortName, enumDoc); + } + } + } + + logger.info("Loaded enum Javadoc for {} schemas", docs.size()); + return new EnumJavadocEnhancer(docs); + } + + public String apply(String content, String className) { + EnumDoc doc = docsByJavaName.get(className); + if (doc == null) { + return content; + } + content = replaceClassJavadoc(content, className, doc.getClassDescription()); + return insertConstantJavadocs(content, doc.getValueDescriptions()); + } + + static Map parseEnumValueDescriptions(String description) { + if (description == null || description.isBlank()) { + return Collections.emptyMap(); + } + Map result = new LinkedHashMap<>(); + for (String line : description.split("\n")) { + String trimmed = line.strip(); + if (!trimmed.startsWith("- ")) { + continue; + } + String body = trimmed.substring(2).strip(); + int colon = body.indexOf(':'); + if (colon <= 0) { + continue; + } + String key = body.substring(0, colon).strip(); + String value = body.substring(colon + 1).strip(); + if (!key.isEmpty() && !value.isEmpty()) { + result.put(key, value); + } + } + return result; + } + + private static String schemaShortKey(String fullName) { + int dot = fullName.lastIndexOf('.'); + return dot >= 0 ? fullName.substring(dot + 1) : fullName; + } + + private static String stringOrNull(Object value) { + return value instanceof String ? (String) value : null; + } + + private String replaceClassJavadoc(String content, String className, String description) { + if (description == null || description.isBlank()) { + return content; + } + + Pattern decl = Pattern.compile("public enum " + Pattern.quote(className) + "\\s*\\{"); + Matcher matcher = decl.matcher(content); + if (!matcher.find()) { + return content; + } + + int declStart = matcher.start(); + String before = content.substring(0, declStart).replaceFirst("(?s)\\s*/\\*\\*.*?\\*/\\s*$", "\n"); + return before + formatClassJavadoc(description) + content.substring(declStart); + } + + private String insertConstantJavadocs(String content, Map valueDescriptions) { + if (valueDescriptions.isEmpty()) { + return content; + } + + String[] lines = content.split("\n", -1); + StringBuilder out = new StringBuilder(); + for (String line : lines) { + Matcher m = ENUM_CONSTANT_LINE.matcher(line); + if (m.matches()) { + String constant = m.group(2); + String desc = valueDescriptions.get(constant); + if (desc != null && !hasJavadocBefore(out.toString())) { + out.append(formatConstantJavadoc(desc, m.group(1))); + } + } + out.append(line).append('\n'); + } + return out.substring(0, out.length() - 1); + } + + private static boolean hasJavadocBefore(String text) { + return text.stripTrailing().endsWith("*/"); + } + + private static String formatClassJavadoc(String description) { + StringBuilder sb = new StringBuilder(); + sb.append("/**\n"); + for (String line : description.strip().split("\n")) { + String trimmed = line.strip(); + if (!trimmed.isEmpty()) { + sb.append(" * ").append(normalizeJavadoc(trimmed)).append('\n'); + } + } + sb.append(" */\n"); + return sb.toString(); + } + + private static String formatConstantJavadoc(String description, String indent) { + return indent + "/**\n" + + indent + " * " + normalizeJavadoc(description) + "\n" + + indent + " */\n"; + } + + private static String normalizeJavadoc(String text) { + return PostProcessor.decodeHtmlEntities(text.strip().replaceAll("\\s+", " ")); + } + + static final class EnumDoc { + private final String classDescription; + private final Map valueDescriptions; + + EnumDoc(String classDescription, Map valueDescriptions) { + this.classDescription = classDescription; + this.valueDescriptions = valueDescriptions; + } + + String getClassDescription() { + return classDescription; + } + + Map getValueDescriptions() { + return valueDescriptions; + } + } +} diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/GeneratedFileHeader.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/GeneratedFileHeader.java new file mode 100644 index 0000000..32fb0fe --- /dev/null +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/GeneratedFileHeader.java @@ -0,0 +1,91 @@ +/* + * 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.tools.modelgenerator; + +import java.io.IOException; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Year; +import java.util.Optional; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Copyright header handling for generated models — parity with prime-sdk-ts + * {@code getHeaderYear()} / {@code addGeneratedHeader()} in {@code apiSpec/generateTypes.js}. + * + *

The Mustache template uses a placeholder start year; this class preserves the year from an + * existing SDK file when regenerating, and uses the current calendar year for brand-new files. + */ +public final class GeneratedFileHeader { + private static final Pattern COPYRIGHT_YEAR = + Pattern.compile("Copyright (\\d{4})-present Coinbase Global, Inc\\."); + + private GeneratedFileHeader() {} + + /** + * @param outputFile final path under {@code src/main/java/.../model/} (or {@code enums/}) + */ + public static String resolveStartYear(Path outputFile) throws IOException { + if (Files.exists(outputFile)) { + Optional year = extractStartYear(Files.readString(outputFile)); + if (year.isPresent()) { + return year.get(); + } + } + + Path parent = outputFile.getParent(); + if (parent != null && Files.isDirectory(parent)) { + String fileName = outputFile.getFileName().toString(); + try (DirectoryStream stream = Files.newDirectoryStream(parent, "*.java")) { + for (Path candidate : stream) { + if (!candidate.getFileName().toString().equalsIgnoreCase(fileName)) { + continue; + } + Optional year = extractStartYear(Files.readString(candidate)); + if (year.isPresent()) { + return year.get(); + } + } + } + } + + return defaultStartYear(); + } + + /** Replaces the template placeholder year with {@code startYear}. */ + public static String applyStartYear(String generatedContent, String startYear) { + Matcher matcher = COPYRIGHT_YEAR.matcher(generatedContent); + if (!matcher.find()) { + return generatedContent; + } + return matcher.replaceFirst("Copyright " + startYear + "-present Coinbase Global, Inc."); + } + + static Optional extractStartYear(String fileContent) { + Matcher matcher = COPYRIGHT_YEAR.matcher(fileContent); + if (matcher.find()) { + return Optional.of(matcher.group(1)); + } + return Optional.empty(); + } + + static String defaultStartYear() { + return String.valueOf(Year.now().getValue()); + } +} diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/Main.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/Main.java new file mode 100644 index 0000000..e95d608 --- /dev/null +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/Main.java @@ -0,0 +1,92 @@ +/* + * 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.tools.modelgenerator; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.nio.file.Path; +import java.nio.file.Paths; + +public class Main { + private static final Logger logger = LoggerFactory.getLogger(Main.class); + + public static void main(String[] args) { + try { + logger.info("Coinbase Prime Java SDK Model Generator"); + logger.info("========================================"); + logger.info("Mode: FULL GENERATION (regenerates all models from OpenAPI spec)"); + logger.info(""); + + // Find project root + Path projectRoot = findProjectRoot(); + Path outputDir = projectRoot.resolve("src/main/java/com/coinbase/prime/model"); + Path enumsDir = outputDir.resolve("enums"); + Path tempDir = projectRoot.resolve("generated"); + + logger.info("Project Root: {}", projectRoot); + logger.info("Output Directory: {}", outputDir); + logger.info("Enums Directory: {}", enumsDir); + logger.info("Temp Directory: {}", tempDir); + + // Phase 0: Always fetch the latest spec into apiSpec/ (tracked in Git) + logger.info("\nPhase 0: Fetching latest OpenAPI spec..."); + Path specPath = SpecFetcher.fetch(projectRoot); + + // Phase 1: Generate raw models using OpenAPI Generator + logger.info("\nPhase 1: Generating raw models with OpenAPI Generator..."); + OpenApiGenerator generator = new OpenApiGenerator(specPath.toString(), tempDir); + generator.generateModels(); + + // Phase 2: Post-process models to match existing patterns + logger.info("\nPhase 2: Post-processing models..."); + PostProcessor postProcessor = new PostProcessor(tempDir, outputDir, enumsDir, specPath); + postProcessor.processModels(); + + logger.info("\nModel generation completed successfully!"); + logger.info("\nGenerated models are in: {}", outputDir); + logger.info("Generated enums are in: {}", enumsDir); + logger.info("\nNext steps:"); + logger.info("1. Review apiSpec/prime-public-spec.yaml and generated models"); + logger.info("2. Run: mvn spotless:apply && mvn test"); + logger.info("3. Commit spec + model changes together"); + + } catch (Exception e) { + logger.error("Error during model generation", e); + System.exit(1); + } + } + + private static Path findProjectRoot() { + Path current = Paths.get(System.getProperty("user.dir")); + while (current != null) { + if (current.resolve("pom.xml").toFile().exists() && + current.resolve("src/main/java/com/coinbase/prime").toFile().exists()) { + return current; + } + current = current.getParent(); + } + + // If we can't find it, check if we're in the tools directory + Path toolsPath = Paths.get(System.getProperty("user.dir")); + if (toolsPath.toString().contains("tools/model-generator")) { + return toolsPath.getParent().getParent(); + } + + throw new RuntimeException("Could not find project root (looking for pom.xml and src/main/java/com/coinbase/prime)"); + } +} \ No newline at end of file diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/ModelJavadocEnhancer.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/ModelJavadocEnhancer.java new file mode 100644 index 0000000..e245bf2 --- /dev/null +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/ModelJavadocEnhancer.java @@ -0,0 +1,339 @@ +/* + * 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.tools.modelgenerator; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.yaml.snakeyaml.Yaml; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Applies model class- and field-level Javadoc from OpenAPI schema {@code description} and + * {@code title} fields. The Prime public spec often uses {@code title} where {@code description} + * is absent; the stock Mustache template only emits property docs for {@code description}. + */ +public final class ModelJavadocEnhancer { + private static final Logger logger = LoggerFactory.getLogger(ModelJavadocEnhancer.class); + + private static final Pattern JSON_PROPERTY = + Pattern.compile("@JsonProperty\\(\"([^\"]+)\"\\)"); + private static final Pattern PRIVATE_FIELD = + Pattern.compile("private [\\w.<>,\\[\\]]+ (\\w+);"); + + private final Map docsByJavaName; + + private ModelJavadocEnhancer(Map docsByJavaName) { + this.docsByJavaName = docsByJavaName; + } + + public static ModelJavadocEnhancer load(Path specPath) throws IOException { + Map docs = new LinkedHashMap<>(); + + try (InputStream in = Files.newInputStream(specPath)) { + Yaml yaml = new Yaml(); + @SuppressWarnings("unchecked") + Map root = yaml.load(in); + @SuppressWarnings("unchecked") + Map components = (Map) root.get("components"); + if (components == null) { + return new ModelJavadocEnhancer(docs); + } + @SuppressWarnings("unchecked") + Map schemas = (Map) components.get("schemas"); + if (schemas == null) { + return new ModelJavadocEnhancer(docs); + } + + for (Map.Entry entry : schemas.entrySet()) { + if (!(entry.getValue() instanceof Map)) { + continue; + } + @SuppressWarnings("unchecked") + Map schema = (Map) entry.getValue(); + if (schema.containsKey("enum")) { + continue; + } + @SuppressWarnings("unchecked") + Map properties = (Map) schema.get("properties"); + if (properties == null || properties.isEmpty()) { + continue; + } + + String shortName = schemaShortKey(entry.getKey()); + String javaName = PostProcessor.deriveJavaModelName(shortName); + String classDescription = firstNonBlank( + stringOrNull(schema.get("description")), + stringOrNull(schema.get("title"))); + + Map fieldDocs = new LinkedHashMap<>(); + for (Map.Entry prop : properties.entrySet()) { + if (!(prop.getValue() instanceof Map)) { + continue; + } + @SuppressWarnings("unchecked") + Map propSchema = (Map) prop.getValue(); + String fieldDoc = resolvePropertyDoc(propSchema, schemas); + if (fieldDoc != null && !fieldDoc.isBlank()) { + fieldDocs.put(prop.getKey(), fieldDoc.strip()); + } + } + + if ((classDescription == null || classDescription.isBlank()) && fieldDocs.isEmpty()) { + continue; + } + + ModelDoc modelDoc = new ModelDoc(classDescription, fieldDocs); + docs.put(javaName, modelDoc); + if (!shortName.equals(javaName)) { + docs.putIfAbsent(shortName, modelDoc); + } + } + } + + logger.info("Loaded model Javadoc for {} schemas", docs.size()); + return new ModelJavadocEnhancer(docs); + } + + public String apply(String content, String className) { + ModelDoc doc = docsByJavaName.get(className); + if (doc == null) { + return content; + } + content = replaceClassJavadoc(content, className, doc.getClassDescription()); + return insertFieldJavadocs(content, doc.getFieldDocsByWireName()); + } + + private String replaceClassJavadoc(String content, String className, String description) { + if (description == null || description.isBlank()) { + return content; + } + + Pattern decl = Pattern.compile("public class " + Pattern.quote(className) + "\\s*\\{"); + Matcher matcher = decl.matcher(content); + if (!matcher.find()) { + return content; + } + + int declStart = matcher.start(); + String before = content.substring(0, declStart).replaceFirst("(?s)\\s*/\\*\\*.*?\\*/\\s*$", "\n"); + return before + formatClassJavadoc(description) + content.substring(declStart); + } + + private String insertFieldJavadocs(String content, Map fieldDocsByWireName) { + if (fieldDocsByWireName.isEmpty()) { + return content; + } + + String[] lines = content.split("\n", -1); + StringBuilder out = new StringBuilder(); + + for (int i = 0; i < lines.length; i++) { + String line = lines[i]; + String stripped = line.strip(); + String indent = leadingIndent(line); + + // Builder fields use 8-space indent in pojo.mustache; skip them. + if (indent.length() >= 8) { + out.append(line); + if (i < lines.length - 1) { + out.append('\n'); + } + continue; + } + + if (!hasJavadocOnPreviousLine(lines, i)) { + Matcher jsonProp = JSON_PROPERTY.matcher(stripped); + if (jsonProp.matches()) { + String doc = fieldDocsByWireName.get(jsonProp.group(1)); + if (doc != null) { + out.append(formatFieldJavadoc(doc, indent)); + } + } else { + Matcher field = PRIVATE_FIELD.matcher(stripped); + if (field.matches()) { + String prev = previousNonBlankLine(lines, i); + if (prev == null || !JSON_PROPERTY.matcher(prev).matches()) { + String javaField = field.group(1); + String doc = fieldDocsByWireName.get(javaField); + if (doc == null) { + doc = fieldDocsByWireName.get(snakeCase(javaField)); + } + if (doc != null) { + out.append(formatFieldJavadoc(doc, indent)); + } + } + } + } + } + + out.append(line); + if (i < lines.length - 1) { + out.append('\n'); + } + } + + return out.toString(); + } + + private static String resolvePropertyDoc(Map propSchema, Map schemas) { + String direct = firstNonBlank( + stringOrNull(propSchema.get("description")), + stringOrNull(propSchema.get("title"))); + if (direct != null) { + return direct; + } + String ref = stringOrNull(propSchema.get("$ref")); + if (ref == null) { + return null; + } + Map resolved = resolveRef(schemas, ref); + if (resolved == null) { + return null; + } + return firstNonBlank( + stringOrNull(resolved.get("description")), + stringOrNull(resolved.get("title"))); + } + + @SuppressWarnings("unchecked") + private static Map resolveRef(Map schemas, String ref) { + if (!ref.startsWith("#/components/schemas/")) { + return null; + } + String key = ref.substring("#/components/schemas/".length()); + Object schema = schemas.get(key); + return schema instanceof Map ? (Map) schema : null; + } + + private static boolean hasJavadocOnPreviousLine(String[] lines, int index) { + for (int j = index - 1; j >= 0; j--) { + String trimmed = lines[j].strip(); + if (trimmed.isEmpty()) { + continue; + } + if (trimmed.startsWith("/**") || trimmed.startsWith("*") || trimmed.endsWith("*/")) { + return true; + } + return false; + } + return false; + } + + private static String previousNonBlankLine(String[] lines, int index) { + for (int j = index - 1; j >= 0; j--) { + String trimmed = lines[j].strip(); + if (!trimmed.isEmpty()) { + return trimmed; + } + } + return null; + } + + private static String leadingIndent(String line) { + int i = 0; + while (i < line.length() && line.charAt(i) == ' ') { + i++; + } + return line.substring(0, i); + } + + private static String snakeCase(String javaField) { + return javaField.replaceAll("([a-z0-9])([A-Z])", "$1_$2").toLowerCase(); + } + + private static String schemaShortKey(String fullName) { + int dot = fullName.lastIndexOf('.'); + return dot >= 0 ? fullName.substring(dot + 1) : fullName; + } + + private static String stringOrNull(Object value) { + return value instanceof String ? (String) value : null; + } + + private static String firstNonBlank(String... values) { + for (String value : values) { + if (value != null && !value.isBlank()) { + return value.strip(); + } + } + return null; + } + + private static String formatClassJavadoc(String description) { + String stripped = description.strip(); + if (!stripped.contains("\n")) { + return "/** " + normalizeJavadocLine(stripped) + " */\n"; + } + StringBuilder sb = new StringBuilder(); + sb.append("/**\n"); + for (String line : stripped.split("\n")) { + String trimmed = line.strip(); + if (!trimmed.isEmpty()) { + sb.append(" * ").append(normalizeJavadocLine(trimmed)).append('\n'); + } + } + sb.append(" */\n"); + return sb.toString(); + } + + private static String formatFieldJavadoc(String description, String indent) { + String stripped = description.strip(); + if (!stripped.contains("\n")) { + return indent + "/** " + normalizeJavadocLine(stripped) + " */\n"; + } + StringBuilder sb = new StringBuilder(); + sb.append(indent).append("/**\n"); + for (String line : stripped.split("\n")) { + String trimmed = line.strip(); + if (!trimmed.isEmpty()) { + sb.append(indent).append(" * ").append(normalizeJavadocLine(trimmed)).append('\n'); + } + } + sb.append(indent).append(" */\n"); + return sb.toString(); + } + + private static String normalizeJavadocLine(String text) { + return PostProcessor.decodeHtmlEntities(text.strip()); + } + + static final class ModelDoc { + private final String classDescription; + private final Map fieldDocsByWireName; + + ModelDoc(String classDescription, Map fieldDocsByWireName) { + this.classDescription = classDescription; + this.fieldDocsByWireName = fieldDocsByWireName; + } + + String getClassDescription() { + return classDescription; + } + + Map getFieldDocsByWireName() { + return fieldDocsByWireName; + } + } +} 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 new file mode 100644 index 0000000..cce77e2 --- /dev/null +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/OpenApiGenerator.java @@ -0,0 +1,154 @@ +/* + * 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.tools.modelgenerator; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.apache.commons.io.FileUtils; +import org.openapitools.codegen.*; +import org.openapitools.codegen.config.CodegenConfigurator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.Map; + +public class OpenApiGenerator { + private static final Logger logger = LoggerFactory.getLogger(OpenApiGenerator.class); + + private final String specLocation; + private final Path outputDir; + private final ObjectMapper objectMapper = new ObjectMapper(); + + public OpenApiGenerator(String specLocation, Path outputDir) { + this.specLocation = specLocation; + this.outputDir = outputDir; + } + + public void generateModels() throws IOException { + Path rawOutputDir = outputDir.resolve("raw"); + + // Create output directory + rawOutputDir.toFile().mkdirs(); + + // Copy .openapi-generator-ignore file BEFORE cleaning + Path ignoreFile = findProjectRoot().resolve("tools/model-generator/.openapi-generator-ignore"); + if (ignoreFile.toFile().exists()) { + Path targetIgnoreFile = rawOutputDir.resolve(".openapi-generator-ignore"); + FileUtils.copyFile(ignoreFile.toFile(), targetIgnoreFile.toFile()); + logger.info("Copied .openapi-generator-ignore to: {}", targetIgnoreFile); + } else { + logger.warn(".openapi-generator-ignore not found at: {}", ignoreFile); + } + + // Clean output directory (but preserve .openapi-generator-ignore) + if (rawOutputDir.toFile().exists()) { + File ignoreFileInOutput = rawOutputDir.resolve(".openapi-generator-ignore").toFile(); + File[] files = rawOutputDir.toFile().listFiles(); + if (files != null) { + for (File file : files) { + if (!file.equals(ignoreFileInOutput)) { + if (file.isDirectory()) { + FileUtils.deleteDirectory(file); + } else { + file.delete(); + } + } + } + } + } + + // Configure OpenAPI Generator + CodegenConfigurator configurator = new CodegenConfigurator(); + configurator.setGeneratorName("java"); + configurator.setInputSpec(specLocation); // Can be URL or file path + configurator.setOutputDir(rawOutputDir.toString()); + + // Configure custom templates + Path templatesDir = findProjectRoot().resolve("tools/model-generator/templates"); + if (templatesDir.toFile().exists()) { + configurator.setTemplateDir(templatesDir.toString()); + logger.info("Using custom templates from: {}", templatesDir); + } else { + logger.warn("Custom templates directory not found: {}, using defaults", templatesDir); + } + + // Configure generation options for Java + Map additionalProperties = new HashMap<>(); + additionalProperties.put("modelPackage", "com.coinbase.prime.model"); + additionalProperties.put("enumPackage", "com.coinbase.prime.model.enums"); // Separate enum package + additionalProperties.put("apiPackage", "com.coinbase.prime.api"); + additionalProperties.put("invokerPackage", "com.coinbase.prime.client"); + additionalProperties.put("groupId", "com.coinbase.prime"); + additionalProperties.put("artifactId", "prime-sdk-java"); + additionalProperties.put("artifactVersion", "1.0.0"); + additionalProperties.put("library", "native"); // Use native Java HTTP client + additionalProperties.put("dateLibrary", "java8"); // Use Java 8 time + additionalProperties.put("serializationLibrary", "jackson"); // Use Jackson + additionalProperties.put("useJakartaEe", "false"); + additionalProperties.put("hideGenerationTimestamp", "true"); + additionalProperties.put("generateApiTests", "false"); + additionalProperties.put("generateModelTests", "false"); + additionalProperties.put("generateApiDocumentation", "false"); + additionalProperties.put("generateModelDocumentation", "false"); + additionalProperties.put("sourceFolder", "src/main/java"); + additionalProperties.put("useBeanValidation", "false"); + additionalProperties.put("performBeanValidation", "false"); + additionalProperties.put("generateBuilders", "false"); // We'll add our own builders + additionalProperties.put("openApiNullable", "false"); + additionalProperties.put("enumPropertyNaming", "MACRO_CASE"); // This generates UPPERCASE_WITH_UNDERSCORES style + + configurator.setAdditionalProperties(additionalProperties); + + // Map OpenAPI boolean type to Java primitive boolean (not Boolean wrapper) + Map typeMappings = new HashMap<>(); + typeMappings.put("Boolean", "boolean"); + configurator.setTypeMappings(typeMappings); + + // Generate only models (not APIs) + configurator.setGenerateAliasAsModel(true); + + // Set global properties to control what gets generated + Map globalProperties = new HashMap<>(); + globalProperties.put("models", ""); // Generate models + globalProperties.put("apis", "false"); // Don't generate APIs + globalProperties.put("supportingFiles", "false"); // Don't generate supporting files + configurator.setGlobalProperties(globalProperties); + + // Run the generator + logger.info("Running OpenAPI Generator with ignore file..."); + final ClientOptInput input = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(input).generate(); + + logger.info("Raw models generated in: {}", rawOutputDir); + } + + private Path findProjectRoot() { + Path current = outputDir.getParent(); + while (current != null) { + if (current.resolve("pom.xml").toFile().exists() && + current.resolve("src/main/java/com/coinbase/prime").toFile().exists()) { + return current; + } + current = current.getParent(); + } + throw new RuntimeException("Could not find project root"); + } +} \ No newline at end of file diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java new file mode 100644 index 0000000..f358630 --- /dev/null +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java @@ -0,0 +1,735 @@ +/* + * 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.tools.modelgenerator; + +import org.apache.commons.io.FileUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.nio.file.*; +import java.nio.file.attribute.BasicFileAttributes; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +public class PostProcessor { + private static final Logger logger = LoggerFactory.getLogger(PostProcessor.class); + + // Special case enum renames: stripped name -> final enum name + // This handles cases where enums need custom naming beyond simple prefix stripping + private static final Map ENUM_NAME_MAPPINGS = new HashMap() {{ + put("ActivityType", "PrimeActivityType"); // CoinbasePublicRestApiActivityType -> PrimeActivityType + // CoinbaseCustodyApiActivityType is handled by stripCommonPrefixes special case + }}; + + /** + * Duplicate enums for TS/Go-aligned names on Prime cross-margin responses. + * Graduated spec refs {@code XMControlStatus}; other SDKs expose {@code PrimeXMControlStatus} too. + */ + private static final Map ENUM_ALIASES = new LinkedHashMap() {{ + put("XMControlStatus", "PrimeXMControlStatus"); + put("XMMarginLevel", "PrimeXMMarginLevel"); + }}; + + private final Path tempDir; + private final Path outputDir; + private final Path enumsDir; + private final EnumJavadocEnhancer enumJavadocEnhancer; + private final ModelJavadocEnhancer modelJavadocEnhancer; + + private int newModelsCount = 0; + private int updatedModelsCount = 0; + private int removedStaleCount = 0; + private final Set writtenOutputFiles = new HashSet<>(); + + public PostProcessor(Path tempDir, Path outputDir, Path enumsDir, Path specPath) throws IOException { + this.tempDir = tempDir; + this.outputDir = outputDir; + this.enumsDir = enumsDir; + this.enumJavadocEnhancer = EnumJavadocEnhancer.load(specPath); + this.modelJavadocEnhancer = ModelJavadocEnhancer.load(specPath); + } + + /** Maps an OpenAPI schema name to the SDK Java enum type name (prefix strip + acronym rules). */ + static String stripSchemaNameToJavaType(String schemaName) { + return stripCommonPrefixes(schemaName); + } + + /** Maps an OpenAPI schema short name to the generated Java model class name. */ + static String deriveJavaModelName(String rawSchemaName) { + String result = rawSchemaName; + for (Map.Entry entry : CONTENT_REPLACEMENTS.entrySet()) { + if (result.contains(entry.getKey())) { + result = result.replace(entry.getKey(), entry.getValue()); + } + } + result = stripCommonPrefixes(result); + if (result.contains("Web3")) { + result = result.replace("Web3", "Onchain"); + } + return result; + } + + public void processModels() throws IOException { + logger.info("Finding generated model files..."); + List modelFiles = findGeneratedModelFiles(); + logger.info("Found {} model files to process", modelFiles.size()); + + // Create output directories + Files.createDirectories(outputDir); + Files.createDirectories(enumsDir); + + // Separate enum files from model files + List enumFiles = new ArrayList<>(); + List nonEnumFiles = new ArrayList<>(); + + for (Path file : modelFiles) { + if (isEnumFile(file)) { + enumFiles.add(file); + } else { + nonEnumFiles.add(file); + } + } + + logger.info("Found {} enum files and {} model files", enumFiles.size(), nonEnumFiles.size()); + + // Process enums FIRST so they're available for import fixing + logger.info("Processing enums first..."); + for (Path file : enumFiles) { + String fileName = file.getFileName().toString(); + logger.info("Processing enum: {}", fileName); + + try { + processEnumFile(file); + } catch (Exception e) { + logger.error("Error processing enum file: " + fileName, e); + } + } + + createEnumAliases(); + + // Then process models with fixed enum imports + logger.info("Processing models..."); + for (Path file : nonEnumFiles) { + String fileName = file.getFileName().toString(); + logger.info("Processing model: {}", fileName); + + try { + processModelFile(file); + } catch (Exception e) { + logger.error("Error processing model file: " + fileName, e); + } + } + + removeStaleOutputFiles(); + + // Clean up temporary directory + logger.info("Cleaning up temporary files..."); + FileUtils.deleteDirectory(tempDir.toFile()); + + // Log summary + logger.info("=========================================="); + logger.info("Model Generation Summary:"); + logger.info(" New models: {}", newModelsCount); + logger.info(" Updated models: {}", updatedModelsCount); + logger.info(" Removed stale: {}", removedStaleCount); + logger.info(" Total processed: {}", modelFiles.size()); + logger.info("=========================================="); + } + + /** + * Deletes model and enum files under the output directories that were not produced in this run. + */ + private void removeStaleOutputFiles() throws IOException { + removedStaleCount = 0; + if (Files.exists(outputDir)) { + try (DirectoryStream stream = Files.newDirectoryStream(outputDir, "*.java")) { + for (Path file : stream) { + removedStaleCount += deleteIfStale(file); + } + } + } + if (Files.exists(enumsDir)) { + try (DirectoryStream stream = Files.newDirectoryStream(enumsDir, "*.java")) { + for (Path file : stream) { + removedStaleCount += deleteIfStale(file); + } + } + } + if (removedStaleCount > 0) { + logger.info("Removed {} stale model/enum file(s) not produced by this generation run", removedStaleCount); + } + } + + private int deleteIfStale(Path file) throws IOException { + Path normalized = file.toAbsolutePath().normalize(); + if (writtenOutputFiles.contains(normalized)) { + return 0; + } + Files.delete(file); + logger.info("Deleted stale file: {}", file.getFileName()); + return 1; + } + + private List findGeneratedModelFiles() throws IOException { + List files = new ArrayList<>(); + Path modelPath = tempDir.resolve("raw"); + + if (Files.exists(modelPath)) { + Files.walkFileTree(modelPath, new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { + String fileName = file.getFileName().toString(); + if (file.toString().endsWith(".java") && + !fileName.contains("Test") && + !fileName.matches(".*Api\\.java$")) { // Only skip files ending with "Api.java", not containing "Api" + files.add(file); + } + return FileVisitResult.CONTINUE; + } + }); + } + + return files; + } + + private boolean isEnumFile(Path file) throws IOException { + String content = Files.readString(file); + return content.contains("public enum "); + } + + /** + * Fixes enum imports to use the enums package and applies special case enum name mappings. + * Handles both import statements and type references throughout the content. + */ + private String fixEnumImports(String content) { + // Get list of all actual enum names from enums directory + Set actualEnumNames = new HashSet<>(); + try { + Files.walk(enumsDir, 1) + .filter(p -> p.toString().endsWith(".java")) + .forEach(p -> { + String fileName = p.getFileName().toString(); + actualEnumNames.add(fileName.replace(".java", "")); + }); + } catch (Exception e) { + logger.warn("Could not read enums directory: {}", e.getMessage()); + } + + // First, apply special case enum name mappings (e.g., ActivityType -> PrimeActivityType) + // This must happen BEFORE fixing import paths + for (Map.Entry mapping : ENUM_NAME_MAPPINGS.entrySet()) { + String strippedName = mapping.getKey(); + String actualEnumName = mapping.getValue(); + + // Only apply mapping if the actual enum exists + if (actualEnumNames.contains(actualEnumName)) { + // Replace type references (but not in @JsonProperty annotations) + // Pattern: word boundary + strippedName + word boundary (not followed by quotes) + content = content.replaceAll( + "\\b" + strippedName + "\\b(?![^@]*@JsonProperty)", + actualEnumName + ); + logger.debug("Applied enum mapping: {} -> {}", strippedName, actualEnumName); + } + } + + // Then, fix import paths for all enums (move from model to model.enums package) + for (String enumName : actualEnumNames) { + content = content.replace( + "import com.coinbase.prime.model." + enumName + ";", + "import com.coinbase.prime.model.enums." + enumName + ";" + ); + } + + return content; + } + + private void processEnumFile(Path file) throws IOException { + processFile(file, enumsDir, true); + } + + private void createEnumAliases() throws IOException { + for (Map.Entry alias : ENUM_ALIASES.entrySet()) { + String sourceName = alias.getKey(); + String aliasName = alias.getValue(); + Path sourcePath = enumsDir.resolve(sourceName + ".java"); + if (!Files.exists(sourcePath)) { + logger.warn("Skipping enum alias {} -> {} (source not found)", sourceName, aliasName); + continue; + } + + String content = Files.readString(sourcePath); + content = content.replaceAll("\\b" + Pattern.quote(sourceName) + "\\b", aliasName); + Path aliasPath = enumsDir.resolve(aliasName + ".java"); + String copyrightYear = GeneratedFileHeader.resolveStartYear(aliasPath); + content = decodeHtmlEntities(content); + content = GeneratedFileHeader.applyStartYear(content, copyrightYear); + Files.writeString(aliasPath, content); + writtenOutputFiles.add(aliasPath.toAbsolutePath().normalize()); + logger.info("Created enum alias: {} -> {}", sourceName, aliasName); + } + } + + private void processModelFile(Path file) throws IOException { + processFile(file, outputDir, false); + } + + /** + * Unified file processing logic for both enums and models. + * @param file Source file to process + * @param targetDir Target directory (enumsDir for enums, outputDir for models) + * @param isEnum Whether this is an enum file (affects package name and preserves SCREAMING_SNAKE_CASE) + */ + private void processFile(Path file, Path targetDir, boolean isEnum) throws IOException { + String content = Files.readString(file); + String originalFileName = file.getFileName().toString(); + String className = extractClassName(content); + + // Apply content replacements to ALL files (matching TS replaceString logic) + content = applyContentReplacements(content); + + // Re-extract class name AFTER content replacements (they may have changed it) + String afterReplacementsClassName = extractClassName(content); + + // Strip prefixes from class name (matching prime-sdk-ts logic) + String originalClassName = afterReplacementsClassName; + className = stripCommonPrefixes(afterReplacementsClassName); + + if (!className.equals(originalClassName)) { + // Replace ALL occurrences of the class/enum name in the content + // Use negative lookahead (?!_) to preserve SCREAMING_SNAKE_CASE constants (applies to both enums and models) + content = content.replaceAll("\\b" + Pattern.quote(originalClassName) + "\\b(?!_)", className); + logger.info("Transformed {} name: {} -> {}", isEnum ? "enum" : "class", originalClassName, className); + } + + // Apply Web3 to Onchain transformation (models only, but safe for enums too) + if (!isEnum) { + content = applyWeb3ToOnchainTransformation(content, className); + } + + // Extract final class name after all transformations (for correct filename) + className = extractClassName(content); + String fileName = className + ".java"; + + // Apply Web3 to Onchain transformation to filename (models only) + if (!isEnum && fileName.contains("Web3")) { + fileName = fileName.replace("Web3", "Onchain"); + className = className.replace("Web3", "Onchain"); + } + + // Log filename transformation if changed + if (!originalFileName.equals(fileName)) { + logger.info("Transformed {} filename: {} -> {}", isEnum ? "enum" : "model", originalFileName, fileName); + } + + Path outputPath = targetDir.resolve(fileName); + // Read copyright year before deleting case-variant paths (TS getHeaderYear parity) + String copyrightYear = GeneratedFileHeader.resolveStartYear(outputPath); + boolean existsBefore = Files.exists(outputPath); + + // Handle case-only filename changes on case-insensitive filesystems + // Delete ANY file with case-insensitive matching name BEFORE writing + final String finalFileName = fileName; + try { + List toDelete = Files.list(targetDir) + .filter(p -> p.getFileName().toString().equalsIgnoreCase(finalFileName)) + .collect(java.util.stream.Collectors.toList()); + + for (Path p : toDelete) { + Files.delete(p); + if (!p.getFileName().toString().equals(finalFileName)) { + logger.info("Deleted old {} file with different casing: {} -> {}", + isEnum ? "enum" : "model", p.getFileName(), finalFileName); + } + } + } catch (IOException e) { + logger.warn("Could not delete old {} file variants: {}", isEnum ? "enum" : "model", e.getMessage()); + } + + // Apply final transformations based on file type + if (isEnum) { + // Fix package for enums + content = content.replace("package com.coinbase.prime.model;", "package com.coinbase.prime.model.enums;"); + content = enumJavadocEnhancer.apply(content, className); + } else { + // Fix enum imports for models + content = fixEnumImports(content); + // Ensure boolean fields use primitive type, not Boolean wrapper + content = applyBooleanPrimitiveConversion(content); + // Drop @JsonProperty when wire name equals Java field name (Jackson default mapping) + content = removeRedundantJsonProperty(content); + content = modelJavadocEnhancer.apply(content, className); + content = removeUnusedImports(content); + } + + content = decodeHtmlEntities(content); + content = GeneratedFileHeader.applyStartYear(content, copyrightYear); + + Files.writeString(outputPath, content); + writtenOutputFiles.add(outputPath.toAbsolutePath().normalize()); + + if (!existsBefore) { + logger.info("Generated new {}: {}", isEnum ? "enum" : "model", className); + newModelsCount++; + } else { + logger.info("Updated {}: {}", isEnum ? "enum" : "model", className); + updatedModelsCount++; + } + logger.debug("Wrote {} file: {}", isEnum ? "enum" : "model", outputPath); + } + + private String applyWeb3ToOnchainTransformation(String content, String className) { + if (content.contains("Web3") || content.contains("web3")) { + logger.info("Applying Web3 to Onchain transformation for: {}", className); + + // Replace class names + content = content.replaceAll("\\bWeb3", "Onchain"); + + // Replace in property names and method names + content = content.replaceAll("\\bweb3", "onchain"); + + // Keep JSON property mappings unchanged + content = content.replaceAll("@JsonProperty\\(\"onchain", "@JsonProperty(\"web3"); + } + + return content; + } + + private String extractClassName(String content) { + Pattern pattern = Pattern.compile("public\\s+(?:class|enum)\\s+(\\w+)"); + Matcher matcher = pattern.matcher(content); + if (matcher.find()) { + return matcher.group(1); + } + return ""; + } + + // File path replacements (matching prime-sdk-ts filePathReplacements) + // Used for transforming class names and file names + private static final Map FILE_PATH_REPLACEMENTS = new LinkedHashMap() {{ + put("CoinbaseCustodyApiActivityType", "CustodyActivityType"); + put("CoinbasePublicRestApiActivityType", "PrimeActivityType"); + put("CoinbaseBrokerageProxyEventsMaterializedApi", ""); + put("CoinbasePublicRestApi", ""); + put("CoinbaseCustodyApi", ""); + put("PrimeRESTAPI", ""); + put("PublicRestApi", ""); + put("rFQ", "RFQ"); + put("FcmFuturesSweep", "FuturesSweep"); + put("GoogleTypeDate", "DateOfBirth"); + }}; + + // Content replacements (matching prime-sdk-ts replacements) + // Applied to all file content to strip prefixes from type references + private static final Map CONTENT_REPLACEMENTS = new LinkedHashMap() {{ + put("coinbaseCustodyApiActivityType", "CustodyActivityType"); + put("coinbasePublicRestApiActivityType", "PrimeActivityType"); + put("CoinbaseCustodyApiActivityType", "CustodyActivityType"); + put("CoinbasePublicRestApiActivityType", "PrimeActivityType"); + put("CoinbasePublicRestApi", ""); + put("coinbasePublicRestApi", ""); + put("PrimeRESTAPI", ""); + put("primeRESTAPI", ""); + put("CoinbaseCustodyApi", ""); + put("coinbaseCustodyApi", ""); + put("CoinbaseBrokerageProxyEventsMaterializedApi", ""); + put("coinbaseBrokerageProxyEventsMaterializedApi", ""); + put("publicRestApi", ""); + put("PublicRestApi", ""); + // Simplify verbose model names + put("CreateOnchainTransactionRequestEvmParams", "EvmParams"); + put("FcmFuturesSweepRequestAmount", "SweepAmount"); + put("FcmFuturesSweep", "FuturesSweep"); + // google.type.Date is excluded as Google*; map to existing DateOfBirth (same year/month/day shape) + put("GoogleTypeDate", "DateOfBirth"); + }}; + + + /** + * Normalizes acronyms in content (imports, class references, method calls, etc.). + * Preserves SCREAMING_SNAKE_CASE enum constants and acronyms within comments. + * Examples: GetFCMRiskLimits -> GetFcmRiskLimits + * But: FCM_POSITION_SIDE_UNSPECIFIED stays FCM_POSITION_SIDE_UNSPECIFIED + * And: "intermediary VASP" in comments stays "intermediary VASP" + */ + private String normalizeAcronymsInContent(String content) { + // List of known acronyms that should be converted to PascalCase + Map acronymMap = new LinkedHashMap<>(); + acronymMap.put("FCM", "Fcm"); + acronymMap.put("PM", "Pm"); + acronymMap.put("RFQ", "Rfq"); + acronymMap.put("NFT", "Nft"); + acronymMap.put("EVM", "Evm"); + acronymMap.put("VASP", "Vasp"); + acronymMap.put("TF", "Tf"); + + // Step 1: Extract and replace comments with placeholders to preserve them + List preservedComments = new ArrayList<>(); + int commentIndex = 0; + + // Pattern to match all comment types: //, /* */, and /** */ + Pattern commentPattern = Pattern.compile( + "//.*?$|/\\*.*?\\*/", + Pattern.MULTILINE | Pattern.DOTALL + ); + + Matcher commentMatcher = commentPattern.matcher(content); + StringBuffer contentWithPlaceholders = new StringBuffer(); + + while (commentMatcher.find()) { + String comment = commentMatcher.group(); + preservedComments.add(comment); + commentMatcher.appendReplacement(contentWithPlaceholders, + "___COMMENT_PLACEHOLDER_" + commentIndex + "___"); + commentIndex++; + } + commentMatcher.appendTail(contentWithPlaceholders); + + // Step 2: Perform acronym normalization on non-comment code + String result = contentWithPlaceholders.toString(); + for (Map.Entry entry : acronymMap.entrySet()) { + String acronym = entry.getKey(); + String normalized = entry.getValue(); + + // Replace acronym in various contexts: + // 1. Class names: GetFCMRiskLimits -> GetFcmRiskLimits + // 2. Import statements: import ...GetFCMRiskLimits -> import ...GetFcmRiskLimits + // 3. Type references: GetFCMRiskLimitsResponse -> GetFcmRiskLimitsResponse + // 4. Method names: getFCMMarginCall -> getFcmMarginCall + // 5. Standalone type names: private VASP vasp -> private Vasp vasp + // BUT: preserve SCREAMING_SNAKE_CASE enum constants like FCM_POSITION_SIDE_UNSPECIFIED + // AND: preserve enum values like "CBE", "FCM" (standalone on their own line) + + // Pattern 1: Match acronym when followed by uppercase letter (word boundary before) + // But NOT if it's part of a SCREAMING_SNAKE_CASE identifier (followed by underscore) + result = result.replaceAll("\\b" + acronym + "(?=[A-Z](?!_))", normalized); + + // Pattern 2: Match acronym as standalone type (followed by lowercase identifier) + // This catches: "private VASP vasp", "VASP getVasp()", etc. + // But NOT enum values (standalone on their own line) + result = result.replaceAll("\\b" + acronym + "(?=[\\s]+[a-z])", normalized); + + // Pattern 3: Match acronym in generics, method calls, and imports + // This catches: "List", "new VASP(", "import ...VASP;", etc. + // But NOT enum values (which are typically just "FCM," or "FCM\n") + result = result.replaceAll("\\b" + acronym + "(?=[\\(\\)<>;])", normalized); + + // Pattern 4: Match acronym at end of identifier name (before .) + // This catches: "VASP.class", but avoids enum constants with underscores + result = result.replaceAll("\\b" + acronym + "(?=\\.)", normalized); + } + + // Step 3: Restore original comments with acronyms preserved + for (int i = 0; i < preservedComments.size(); i++) { + result = result.replace("___COMMENT_PLACEHOLDER_" + i + "___", preservedComments.get(i)); + } + + return result; + } + + /** + * Normalizes acronyms in class names to use PascalCase. + * Examples: FCMMarginCall -> FcmMarginCall + */ + private String normalizeAcronyms(String className) { + // List of known acronyms that should be converted to PascalCase + // Using LinkedHashMap to control replacement order (longer acronyms first) + Map acronymMap = new LinkedHashMap<>(); + acronymMap.put("FCM", "Fcm"); + acronymMap.put("PM", "Pm"); + acronymMap.put("RFQ", "Rfq"); + acronymMap.put("NFT", "Nft"); + acronymMap.put("EVM", "Evm"); + acronymMap.put("VASP", "Vasp"); + + String result = className; + for (Map.Entry entry : acronymMap.entrySet()) { + String acronym = entry.getKey(); + String normalized = entry.getValue(); + + // Replace acronym when: + // 1. At the start followed by uppercase letter (FCMMarginCall -> FcmMarginCall) + // 2. At the end of the string (just FCM -> Fcm) + // 3. In the middle followed by uppercase (EntityFCMBalance -> EntityFcmBalance) + + // Use word boundary and lookahead to ensure we only replace the acronym part + result = result.replaceAll("\\b" + acronym + "(?=[A-Z])", normalized); + + // Handle end of string + if (result.endsWith(acronym)) { + result = result.substring(0, result.length() - acronym.length()) + normalized; + } + } + + return result; + } + + /** + * Apply file path replacements to strip common prefixes from class names. + * Matches prime-sdk-ts filePathReplacements behavior. + */ + private static String stripCommonPrefixes(String className) { + String result = className; + + // Apply replacements in order (LinkedHashMap maintains insertion order) + for (Map.Entry entry : FILE_PATH_REPLACEMENTS.entrySet()) { + if (result.contains(entry.getKey())) { + result = result.replace(entry.getKey(), entry.getValue()); + } + } + + // Normalize acronyms to PascalCase after prefix stripping + result = normalizeAcronymsForClassName(result); + + return result; + } + + private static String normalizeAcronymsForClassName(String className) { + Map acronymMap = new LinkedHashMap<>(); + acronymMap.put("FCM", "Fcm"); + acronymMap.put("PM", "Pm"); + acronymMap.put("RFQ", "Rfq"); + acronymMap.put("NFT", "Nft"); + acronymMap.put("EVM", "Evm"); + acronymMap.put("VASP", "Vasp"); + acronymMap.put("TF", "Tf"); + + String result = className; + for (Map.Entry entry : acronymMap.entrySet()) { + result = result.replaceAll("\\b" + entry.getKey() + "(?=[A-Z])", entry.getValue()); + } + return result; + } + + /** + * Apply content replacements to all files to strip prefixes from type references. + * Matches prime-sdk-ts replaceString() behavior - uses split/join like TS. + */ + private String applyContentReplacements(String content) { + // Apply content replacements (matching TS replacements object) + // Uses String.replace() which replaces ALL occurrences (like TS split().join()) + for (Map.Entry entry : CONTENT_REPLACEMENTS.entrySet()) { + String key = entry.getKey(); + String value = entry.getValue(); + + // Simple string replacement - replaces all occurrences + content = content.replace(key, value); + } + + // Apply acronym normalization to content (class references, imports, etc.) + content = normalizeAcronymsInContent(content); + + return content; + } + + private String applyBooleanPrimitiveConversion(String content) { + // Field declarations: private Boolean foo; -> private boolean foo; + content = content.replaceAll("\\bprivate Boolean (\\w)", "private boolean $1"); + // Getter return types: public Boolean getFoo() -> public boolean getFoo() + content = content.replaceAll("\\bpublic Boolean (get|is)(\\w)", "public boolean $1$2"); + // Setter and builder method params: (Boolean foo) -> (boolean foo) + content = content.replaceAll("\\(Boolean (\\w)", "(boolean $1"); + return content; + } + + /** + * Removes {@code @JsonProperty} when the wire name matches the Java field name. + * Jackson maps by field name by default; annotations are only needed for snake_case wire names. + */ + private String removeRedundantJsonProperty(String content) { + Pattern pattern = Pattern.compile( + " @JsonProperty\\(\"([^\"]+)\"\\)\\s*\\n" + + "(\\s*private\\s+[\\w<>,\\?\\[\\]\\.\\s]+\\s+)(\\w+)(\\s*;)", + Pattern.MULTILINE + ); + Matcher matcher = pattern.matcher(content); + StringBuffer sb = new StringBuffer(); + while (matcher.find()) { + String wireName = matcher.group(1); + String fieldPrefix = matcher.group(2); + String fieldName = matcher.group(3); + String suffix = matcher.group(4); + if (wireName.equals(fieldName)) { + matcher.appendReplacement(sb, Matcher.quoteReplacement(fieldPrefix + fieldName + suffix)); + } + } + matcher.appendTail(sb); + content = sb.toString(); + + if (!content.contains("@JsonProperty(")) { + content = content.replaceAll( + "import com\\.fasterxml\\.jackson\\.annotation\\.JsonProperty;\\s*\\n", + "" + ); + } + return content; + } + + /** Decodes HTML entities in generated Javadoc (OpenAPI / prior escaping). */ + static String decodeHtmlEntities(String content) { + return content + .replace("&", "&") + .replace("<", "<") + .replace(">", ">") + .replace("'", "'") + .replace("'", "'") + .replace("`", "`") + .replace(""", "\""); + } + + /** Drops import lines whose types are not referenced in the generated class body. */ + private String removeUnusedImports(String content) { + Matcher bodyMatcher = Pattern.compile("^public (?:class|enum) ", Pattern.MULTILINE).matcher(content); + if (!bodyMatcher.find()) { + return content; + } + int bodyStart = bodyMatcher.start(); + String body = content.substring(bodyStart); + + Pattern importPattern = Pattern.compile("^import ([\\w.]+);\\r?\\n", Pattern.MULTILINE); + Matcher importMatcher = importPattern.matcher(content.substring(0, bodyStart)); + StringBuilder header = new StringBuilder(); + int lastEnd = 0; + while (importMatcher.find()) { + header.append(content, lastEnd, importMatcher.start()); + String fqcn = importMatcher.group(1); + String simpleName = fqcn.substring(fqcn.lastIndexOf('.') + 1); + Pattern usePattern = Pattern.compile("\\b" + Pattern.quote(simpleName) + "\\b"); + if (usePattern.matcher(body).find()) { + header.append(importMatcher.group(0)); + } + lastEnd = importMatcher.end(); + } + header.append(content, lastEnd, bodyStart); + return header.toString() + body; + } + + private Path findProjectRoot() { + Path current = outputDir; + while (current != null) { + if (Files.exists(current.resolve("pom.xml")) && + Files.exists(current.resolve("apiSpec/prime-public-spec.yaml"))) { + return current; + } + current = current.getParent(); + } + throw new RuntimeException("Could not find project root"); + } +} diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/SpecFetcher.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/SpecFetcher.java new file mode 100644 index 0000000..c137363 --- /dev/null +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/SpecFetcher.java @@ -0,0 +1,73 @@ +/* + * 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.tools.modelgenerator; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Duration; + +public final class SpecFetcher { + private static final Logger logger = LoggerFactory.getLogger(SpecFetcher.class); + + static final String DEFAULT_SPEC_URL = "https://api.prime.coinbase.com/v1/openapi.yaml"; + static final String SPEC_RELATIVE_PATH = "apiSpec/prime-public-spec.yaml"; + + private SpecFetcher() {} + + /** + * Downloads the latest OpenAPI spec into {@code apiSpec/prime-public-spec.yaml} at the SDK root. + */ + public static Path fetch(Path projectRoot) throws IOException, InterruptedException { + return fetch(projectRoot, DEFAULT_SPEC_URL); + } + + static Path fetch(Path projectRoot, String specUrl) throws IOException, InterruptedException { + Path specPath = projectRoot.resolve(SPEC_RELATIVE_PATH); + Files.createDirectories(specPath.getParent()); + + logger.info("Fetching OpenAPI spec from: {}", specUrl); + logger.info("Writing spec to: {}", specPath); + + HttpClient client = HttpClient.newBuilder() + .followRedirects(HttpClient.Redirect.NORMAL) + .connectTimeout(Duration.ofSeconds(30)) + .build(); + + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(specUrl)) + .timeout(Duration.ofMinutes(2)) + .GET() + .build(); + + HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofFile(specPath)); + if (response.statusCode() < 200 || response.statusCode() >= 300) { + throw new IOException( + "Failed to fetch OpenAPI spec: HTTP " + response.statusCode() + " from " + specUrl); + } + + logger.info("OpenAPI spec fetched successfully ({} bytes)", Files.size(specPath)); + return specPath; + } +} diff --git a/tools/model-generator/templates/licenseInfo.mustache b/tools/model-generator/templates/licenseInfo.mustache new file mode 100644 index 0000000..3e50b6b --- /dev/null +++ b/tools/model-generator/templates/licenseInfo.mustache @@ -0,0 +1,20 @@ +{{! Placeholder year — PostProcessor / GeneratedFileHeader.resolveStartYear() preserves existing file years (TS getHeaderYear parity). }} +/* + * 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. + */ diff --git a/tools/model-generator/templates/model.mustache b/tools/model-generator/templates/model.mustache new file mode 100644 index 0000000..45c605a --- /dev/null +++ b/tools/model-generator/templates/model.mustache @@ -0,0 +1,6 @@ +{{>licenseInfo}} +package {{package}}; +{{#imports}}import {{import}}; +{{/imports}} + +{{#models}}{{#model}}{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}}{{/model}}{{/models}} diff --git a/tools/model-generator/templates/modelEnum.mustache b/tools/model-generator/templates/modelEnum.mustache new file mode 100644 index 0000000..5499109 --- /dev/null +++ b/tools/model-generator/templates/modelEnum.mustache @@ -0,0 +1,8 @@ +public enum {{classname}} { +{{#allowableValues}}{{#enumVars}}{{#enumDescription}} + /** + * {{.}} + */ +{{/enumDescription}} + {{name}}{{^-last}},{{/-last}}{{#-last}}{{/-last}} +{{/enumVars}}{{/allowableValues}}} diff --git a/tools/model-generator/templates/pojo.mustache b/tools/model-generator/templates/pojo.mustache new file mode 100644 index 0000000..2048aa5 --- /dev/null +++ b/tools/model-generator/templates/pojo.mustache @@ -0,0 +1,37 @@ +public class {{classname}} { +{{#vars}}{{#description}} /** + * {{.}} + */ +{{/description}} @JsonProperty("{{baseName}}") + private {{{datatype}}} {{name}}; + +{{/vars}} + public {{classname}}() { + } + + public {{classname}}(Builder builder) { +{{#vars}} this.{{name}} = builder.{{name}}; +{{/vars}} } +{{#vars}} + public {{{datatype}}} {{getter}}() { + return {{name}}; + } + + public void {{setter}}({{{datatype}}} {{name}}) { + this.{{name}} = {{name}}; + } +{{/vars}} + public static class Builder { +{{#vars}} private {{{datatype}}} {{name}}; + +{{/vars}} +{{#vars}} public Builder {{name}}({{{datatype}}} {{name}}) { + this.{{name}} = {{name}}; + return this; + } + +{{/vars}} public {{classname}} build() { + return new {{classname}}(this); + } + } +} From c162132b1532c7ce39d9531134cd3d4fab4498ad Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 8 Jun 2026 18:32:56 -0400 Subject: [PATCH 2/8] chore(spec): refresh prime-public-spec.yaml from live OpenAPI Update the committed Prime REST API spec to match the current public OpenAPI document. Co-authored-by: Cursor --- apiSpec/prime-public-spec.yaml | 1429 ++++++++++++++++---------------- 1 file changed, 731 insertions(+), 698 deletions(-) diff --git a/apiSpec/prime-public-spec.yaml b/apiSpec/prime-public-spec.yaml index 46ed0d3..d21e61e 100644 --- a/apiSpec/prime-public-spec.yaml +++ b/apiSpec/prime-public-spec.yaml @@ -350,6 +350,91 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginOverviewResponse' + /v1/entities/{entity_id}/cross_margin/risk_parameters: + get: + tags: + - Financing + summary: Get Cross Margin Risk Parameters + description: Gets the current Cross Margin (XM) risk parameters for an entity. + operationId: PrimeRESTAPI_GetCrossMarginRiskParameters + parameters: + - name: entity_id + in: path + description: XM customer Prime Entity ID. + required: true + schema: + type: string + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginRiskParametersResponse' + /v1/entities/{entity_id}/funding_settings: + post: + tags: + - Financing + summary: Update Funding Settings + description: Sets FCM funding configuration for the entity and submits the desired + configuration to Prime API for approval. + operationId: PrimeRESTAPI_UpdateFundingSettings + parameters: + - name: entity_id + in: path + description: Prime Entity ID + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + required: + - automatic_conversion_enabled + - automatic_excess_return_enabled + - automatic_loan_enabled + - designated_funding_portfolio_id + - excess_funds_target_amount + type: object + properties: + designated_funding_portfolio_id: + type: string + description: Set the Derivatives Funding Portfolio that will be + used to fund FCM margin calls and receive excess margin sweeps. + Only one portfolio per entity. + example: a0724c0c-0f9e-4525-baf4-1aa8fce77eb2 + automatic_conversion_enabled: + type: boolean + description: "When true, USDC in your Derivatives Funding Portfolio\ + \ will be converted to USD to meet FCM margin calls (Auto-Convert\ + \ USDC)." + automatic_loan_enabled: + type: boolean + description: "When true, Coinbase affiliates may initiate loans\ + \ on your behalf to meet FCM margin calls, per your Lending agreement.\ + \ Available to Portfolio Margin or Cross Margin clients only.\ + \ (Auto-Initiate Loans)" + automatic_excess_return_enabled: + type: boolean + description: "When true, any FCM account balance above your margin\ + \ requirements will be automatically swept back to your Derivatives\ + \ funding portfolio. (Auto-Return Excess Margin)" + excess_funds_target_amount: + type: string + description: "Weekend Buying Power: Setting a target amount to maintain\ + \ in your Futures account above margin requirements. You can only\ + \ withdraw funds in excess of this amount." + example: "1000.00" + required: true + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.UpdateFundingSettingsResponse' + x-codegen-request-body-name: body /v1/entities/{entity_id}/futures/auto_sweep: post: tags: @@ -779,6 +864,48 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetMarginSummariesResponse' + /v1/entities/{entity_id}/market_data: + get: + tags: + - Financing + summary: Get Market Data + description: Retrieves market data including volatility and average daily volume + for an entity. + operationId: PrimeRESTAPI_GetMarketData + parameters: + - name: entity_id + in: path + description: Prime Entity ID + required: true + schema: + type: string + - name: cursor + in: query + description: Cursor for pagination + schema: + type: string + - name: limit + in: query + description: Number of results to return per page + schema: + type: integer + format: int32 + - name: sort_direction + in: query + description: Sort direction for results + schema: + type: string + default: DESC + enum: + - DESC + - ASC + responses: + "200": + description: A successful response. + content: + application/json: + schema: + $ref: '#/components/schemas/coinbase.public_rest_api.GetMarketDataResponse' /v1/entities/{entity_id}/payment-methods: get: tags: @@ -3071,7 +3198,6 @@ paths: application/json: schema: required: - - amount - currency_symbol - idempotency_key type: object @@ -3089,6 +3215,8 @@ paths: description: The quantity of the chosen currency to unstake metadata: $ref: '#/components/schemas/coinbase.public_rest_api.PortfolioStakingMetadata' + validator_provider: + $ref: '#/components/schemas/coinbase.public_rest_api.ValidatorProvider' required: true responses: "200": @@ -3877,6 +4005,9 @@ paths: the original response inputs: $ref: '#/components/schemas/coinbase.public_rest_api.WalletClaimRewardsInputs' + description: |- + StakingClaimRewardsRequest represents a request to claim staking rewards. + Intentionally omits WalletStakingMetadata; see WalletStakingMetadata for rationale. required: true responses: "200": @@ -3920,6 +4051,8 @@ paths: execution. Subsequent requests using the same key will fail inputs: $ref: '#/components/schemas/coinbase.public_rest_api.WalletStakeInputs' + metadata: + $ref: '#/components/schemas/coinbase.public_rest_api.WalletStakingMetadata' description: StakingInitiateRequest represents a request to initiate a staking operation. required: true @@ -3994,6 +4127,8 @@ paths: execution. Subsequent requests using the same key will fail inputs: $ref: '#/components/schemas/coinbase.public_rest_api.WalletUnstakeInputs' + metadata: + $ref: '#/components/schemas/coinbase.public_rest_api.WalletStakingMetadata' description: StakingUnstakeRequest represents a request to initiate an unstaking operation. required: true @@ -4420,34 +4555,13 @@ paths: application/json: schema: $ref: '#/components/schemas/coinbase.public_rest_api.GetWithdrawalPowerResponse' - /v1/entities/{entity_id}/cross_margin/risk_parameters: - get: - tags: - - Financing - summary: Get Cross Margin Risk Parameters (Beta) - description: Gets the current Cross Margin (XM) risk parameters for an entity. - operationId: PrimeBeta_GetCrossMarginRiskParameters - parameters: - - name: entity_id - in: path - description: XM customer Prime Entity ID - required: true - schema: - type: string - responses: - "200": - description: A successful response. - content: - application/json: - schema: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.GetCrossMarginRiskParametersResponse' /v2/entities/{entity_id}/cross_margin/prime: get: tags: - Financing - summary: Get Prime Cross Margin Overview (Beta) - description: Returns full live cross-margin (XM) margin information. - operationId: PrimeBeta_GetCrossMarginPrimeOverview + summary: Get Prime Cross Margin Overview + description: Returns real time risk data from the cross margin model. + operationId: PrimeRESTAPI_GetCrossMarginPrimeOverview parameters: - name: entity_id in: path @@ -4461,116 +4575,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.GetCrossMarginPrimeOverviewResponse' - /v1/entities/{entity_id}/funding_settings: - post: - tags: - - Financing - summary: Update Funding Settings (Beta) - description: Sets FCM funding configuration for the entity and submits the desired - configuration to Prime API for approval. - operationId: PrimeBeta_SetFundingSettings - parameters: - - name: entity_id - in: path - description: Prime Entity ID - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - required: - - automatic_conversion_enabled - - automatic_excess_return_enabled - - automatic_loan_enabled - - designated_funding_portfolio_id - - excess_funds_target_amount - type: object - properties: - designated_funding_portfolio_id: - type: string - description: Set the Derivatives Funding Portfolio that will be - used to fund FCM margin calls and receive excess margin sweeps. - Only one portfolio per entity. - example: a0724c0c-0f9e-4525-baf4-1aa8fce77eb2 - automatic_conversion_enabled: - type: boolean - description: "When true, USDC in your Derivatives Funding Portfolio\ - \ will be converted to USD to meet FCM margin calls (Auto-Convert\ - \ USDC)." - automatic_loan_enabled: - type: boolean - description: "When true, Coinbase affiliates may initiate loans\ - \ on your behalf to meet FCM margin calls, per your Lending agreement.\ - \ Available to Portfolio Margin or Cross Margin clients only.\ - \ (Auto-Initiate Loans)" - automatic_excess_return_enabled: - type: boolean - description: "When true, any FCM account balance above your margin\ - \ requirements will be automatically swept back to your Derivatives\ - \ funding portfolio. (Auto-Return Excess Margin)" - excess_funds_target_amount: - type: string - description: "Weekend Buying Power: Setting a target amount to maintain\ - \ in your Futures account above margin requirements. You can only\ - \ withdraw funds in excess of this amount." - example: "1000.00" - description: |- - SetFundingSettingsRequest sets FCM funding configuration for an entity (creates a PCS proposal). - entity_id is also bound from the URL path. - required: true - responses: - "200": - description: A successful response. - content: - application/json: - schema: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.SetFundingSettingsResponse' - x-codegen-request-body-name: body - /v1/entities/{entity_id}/market_data: - get: - tags: - - Financing - summary: Get Market Data (Beta) - description: Retrieves market data including volatility and average daily volume - for an entity - operationId: PrimeBeta_GetMarketData - parameters: - - name: entity_id - in: path - description: Prime Entity ID - required: true - schema: - type: string - - name: cursor - in: query - description: Cursor for pagination - schema: - type: string - - name: limit - in: query - description: Number of results to return per page - schema: - type: integer - format: int32 - - name: sort_direction - in: query - description: Sort direction for results - schema: - type: string - default: DESC - enum: - - DESC - - ASC - responses: - "200": - description: A successful response. - content: - application/json: - schema: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.GetMarketDataResponse' + $ref: '#/components/schemas/coinbase.public_rest_api.GetCrossMarginPrimeOverviewResponse' components: schemas: coinbase.brokerage.proxy.events.materialized.api.LimitOrderEdit: @@ -5849,22 +5854,314 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.XMLoan' active_liquidation: $ref: '#/components/schemas/coinbase.public_rest_api.ActiveLiquidationSummary' - coinbase.public_rest_api.DefiBalance: + coinbase.public_rest_api.CrossMarginPrimeDerivativesEquityBreakdown: type: object properties: - network: - title: Network this asset is on (ie "ethereum-mainnet") + cash_balance: type: string - protocol: - title: a set of rules and standards that define how data is exchanged (ie - "Aave V4 ") + description: Derivatives cash balance component. + example: "1000.00" + unrealized_pnl: type: string - net_usd_value: - title: Total USD value + description: Unrealized PnL component of derivatives equity. + example: "-252.40" + realized_pnl: type: string - coinbase.public_rest_api.DestinationAlloc: - type: object - properties: + description: Realized PnL component of derivatives equity. + example: "123.65" + accrued_funding_pnl: + type: string + description: Accrued funding PnL component of derivatives equity. + example: "-1.08" + description: Breakdown of the components of derivatives equity. + coinbase.public_rest_api.CrossMarginPrimeMarginSummary: + type: object + properties: + margin_requirement: + type: string + description: Cross Margin Margin Requirement (XMMR) notional. + example: "10362.72" + margin_requirement_type: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMMarginRequirementType' + account_equity: + type: string + description: Equity notional. + example: "-21542.63" + margin_excess_shortfall: + type: string + description: Equity - XMMR (margin excess is > 0). + example: "-31891.67" + consumed_credit: + type: string + description: Credit consumed from Cross Margin Credit Limit (XMCL). + example: "22906.34" + xm_credit_limit: + type: string + description: XM Credit Limit (XMCL) is the maximum notional USD of total + fiat and digital asset loans. + example: "1222322.00" + xm_margin_limit: + type: string + description: XM Margin Limit (XMML) is the maximum notional USD deficit. + example: "22123.00" + consumed_margin_limit: + type: string + description: Amount of the XM margin limit consumed by excess deficit. + example: "15000.00" + spot_equity: + type: string + description: Equity attributed by spot. + example: "-21505.91" + futures_equity: + type: string + description: Equity attributed by futures. + example: "-36.71" + gross_market_value: + type: string + description: Gross market value. + example: "160000.00" + net_market_value: + type: string + description: Net market value. + example: "45000.00" + net_exposure: + type: string + description: Net exposure. + example: "12000.00" + gross_leverage: + type: string + description: Gross leverage. + example: "2.35" + spot_equity_breakdown: + $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginPrimeSpotEquityBreakdown' + derivatives_equity_breakdown: + $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginPrimeDerivativesEquityBreakdown' + risk_netting_info: + $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginPrimeRiskNettingInfo' + health_status: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMHealthStatus' + equity_ratio: + type: string + description: Equity ratio. + example: "1.02" + deficit_ratio: + type: string + description: Deficit ratio. + example: "0.15" + margin_thresholds: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMMarginCallThresholds' + fcm_excess_available_to_return: + type: string + description: FCM excess available to return. + example: "5000.00" + description: Cross-margin account summary and nested breakdowns. + coinbase.public_rest_api.CrossMarginPrimeRiskNettingInfo: + type: object + properties: + dco_margin_requirement: + type: string + description: "Derivatives Clearing Organization Margin Requirement (DMR)\ + \ is the margin requirement for all futures positions, derived from the\ + \ Derivatives Clearing Organization model" + example: "9243.25" + portfolio_margin_requirement: + type: string + description: "Portfolio Margin Requirement (PMR) is the margin requirement\ + \ for all spot positions, derived from the XM model" + example: "9003.67" + integrated_portfolio_margin_requirement: + type: string + description: Integrated Portfolio Margin Requirement (IPMR) is the margin + requirement for all spot positions + futures positions with underlying + assets eligible in Portfolio Margin. + example: "10154.67" + ineligible_futures_margin_requirement: + type: string + description: Ineligible Futures Margin Requirement (IFMR) is the margin + requirement for IPMR-ineligible futures contracts + example: "194.36" + pmr_breakdown: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMMarginRequirementBreakdown' + ipmr_breakdown: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMMarginRequirementBreakdown' + portfolio_margin_offset_credit_breakdown: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMOffsetCreditBreakdown' + integrated_portfolio_margin_offset_credit_breakdown: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMOffsetCreditBreakdown' + xm_positions: + type: array + description: Netted positions used in the model calculation. + items: + $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginPrimeXMPosition' + description: "Groups XM margin requirement components, offset credits, and per-asset\ + \ rows." + coinbase.public_rest_api.CrossMarginPrimeSpotEquityBreakdown: + type: object + properties: + cash_balance: + type: string + description: PM cash balance component of spot equity. + example: "56166.60" + long_market_value: + type: string + description: Long market value component of spot equity. + example: "85268.31" + short_market_value: + type: string + description: Short market value component of spot equity. + example: "0.00" + short_collateral: + type: string + description: Short collateral component of spot equity. + example: "0.00" + pending_transfers: + type: string + description: Pending transfers affecting spot equity. + example: "15303.77" + description: Breakdown of the components of spot equity. + coinbase.public_rest_api.CrossMarginPrimeXMPosition: + type: object + properties: + currency: + type: string + description: Position currency + example: BTC + market_price: + type: string + description: Current market price + example: "114531.73" + spot_balance: + type: string + description: XM spot balance nominal + example: "-0.19652944" + spot_balance_notional: + type: string + description: XM spot balance notional + example: "-22508.85" + futures_balance: + type: string + description: XM futures balance nominal + example: "-0.19652944" + futures_balance_notional: + type: string + description: XM futures balance notional + example: "-22508.85" + base_requirement: + type: string + description: Base margin requirement notional + example: "8925.50" + total_position_margin: + type: string + description: Total margin required + example: "9100.00" + basis_credit: + type: string + description: Basis offset credit applied to this asset row. + example: "-5.25" + futures_netted_notional: + type: string + description: Post-netting USD notional for futures on this asset + example: "11510.00" + futures_netting_margin: + type: string + description: Margin attributed to futures netting for this asset row. + example: "120.00" + long_amount: + type: string + description: Per-asset long amount from position_summary. + example: "0.75539174" + short_amount: + type: string + description: Per-asset short amount from position_summary. + example: "0.95292118" + volatility_addon: + type: string + description: Volatility margin add-on for this asset. + example: "0.00" + liquidity_addon: + type: string + description: Liquidity margin add-on for this asset. + example: "0.49" + description: CrossMarginPrimeXMPosition is a single per-asset XM row (proto-backed + fields from XMPositionDetails). + coinbase.public_rest_api.CrossMarginRiskParameters: + type: object + properties: + asset_tier: + type: string + description: Asset tier identifier. + example: "0" + base_ratio_long: + type: string + description: Base ratio for long positions. + example: "0.3540" + base_ratio_short: + type: string + description: Base ratio for short positions. + example: "0.4051" + volatility_rate_long: + type: string + description: Volatility rate for long positions. + example: "0.0365" + volatility_rate_short: + type: string + description: Volatility rate for short positions. + example: "0.0484" + volatility_low_threshold: + type: string + description: Volatility low threshold. + example: "0.0385" + volatility_high_threshold: + type: string + description: Volatility high threshold. + example: "0.0777" + liquidity_a_long: + type: string + description: Liquidity A for long positions. + example: "0.132227" + liquidity_a_short: + type: string + description: Liquidity A for short positions. + example: "0.153226" + liquidity_b_short: + type: string + description: Liquidity B for short positions. + example: "0.634878" + liquidity_threshold: + type: string + description: Liquidity threshold. + example: "0.2395" + basis_offset_credit_rate: + type: string + description: Basis offset credit rate. + example: "0.92" + description: XM 2.0 risk parameters for an asset tier. + coinbase.public_rest_api.CustomStablecoinRewardDetails: + title: Details for a custom stablecoin reward payout transaction + type: object + properties: + start_date: + type: string + description: ISO-formatted start date of the reward period (e.g. 2025-02-01T00:00:00Z) + end_date: + type: string + description: ISO-formatted end date of the reward period (e.g. 2025-02-28T00:00:00Z) + coinbase.public_rest_api.DefiBalance: + type: object + properties: + network: + title: Network this asset is on (ie "ethereum-mainnet") + type: string + protocol: + title: a set of rules and standards that define how data is exchanged (ie + "Aave V4 ") + type: string + net_usd_value: + title: Total USD value + type: string + coinbase.public_rest_api.DestinationAlloc: + type: object + properties: leg_id: type: string description: The ID unique to each leg of an allocation. @@ -6445,23 +6742,65 @@ components: properties: overview: $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginOverview' - coinbase.public_rest_api.GetEntityActivitiesResponse: - required: - - activities - - pagination - type: object - properties: - activities: - type: array - items: - $ref: '#/components/schemas/coinbase.public_rest_api.Activity' - pagination: - $ref: '#/components/schemas/coinbase.public_rest_api.PaginatedResponse' - coinbase.public_rest_api.GetEntityAssetsResponse: + coinbase.public_rest_api.GetCrossMarginPrimeOverviewResponse: type: object properties: - assets: - title: List of assets + control_status: + $ref: '#/components/schemas/coinbase.public_rest_api.XMControlStatus' + margin_level: + $ref: '#/components/schemas/coinbase.public_rest_api.XMMarginLevel' + evaluated_at: + type: string + description: When margin metrics were evaluated. + format: date-time + example: 2023-11-07T05:31:56Z + margin_summary: + $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginPrimeMarginSummary' + coinbase.public_rest_api.GetCrossMarginRiskParametersResponse: + type: object + properties: + risk_parameters: + type: array + description: Current XM tier risk parameters for the entity's client tier. + items: + $ref: '#/components/schemas/coinbase.public_rest_api.CrossMarginRiskParameters' + offset_credit_matrix_long_short: + type: array + description: Offset credit rate matrix for long/short tier pairs. + items: + $ref: '#/components/schemas/coinbase.public_rest_api.TierPairRateEntry' + offset_credit_matrix_long_long: + type: array + description: Offset credit rate matrix for long/long tier pairs. + items: + $ref: '#/components/schemas/coinbase.public_rest_api.TierPairRateEntry' + offset_credit_matrix_short_short: + type: array + description: Offset credit rate matrix for short/short tier pairs. + items: + $ref: '#/components/schemas/coinbase.public_rest_api.TierPairRateEntry' + margin_period_of_risk: + type: number + description: Margin period of risk (number of days). + format: double + example: 5.0 + coinbase.public_rest_api.GetEntityActivitiesResponse: + required: + - activities + - pagination + type: object + properties: + activities: + type: array + items: + $ref: '#/components/schemas/coinbase.public_rest_api.Activity' + pagination: + $ref: '#/components/schemas/coinbase.public_rest_api.PaginatedResponse' + coinbase.public_rest_api.GetEntityAssetsResponse: + type: object + properties: + assets: + title: List of assets type: array items: $ref: '#/components/schemas/coinbase.public_rest_api.Asset' @@ -6658,6 +6997,16 @@ components: type: array items: $ref: '#/components/schemas/coinbase.public_rest_api.MarginSummaryHistorical' + coinbase.public_rest_api.GetMarketDataResponse: + type: object + properties: + market_data: + type: array + description: List of market data entries + items: + $ref: '#/components/schemas/coinbase.public_rest_api.MarketData' + pagination: + $ref: '#/components/schemas/coinbase.public_rest_api.PaginatedResponse' coinbase.public_rest_api.GetOpenOrdersResponse: type: object properties: @@ -7478,6 +7827,37 @@ components: example: 2023-05-01 margin_summary: $ref: '#/components/schemas/coinbase.public_rest_api.MarginSummary' + coinbase.public_rest_api.MarketData: + type: object + properties: + symbol: + type: string + description: "Base asset symbol (e.g., BTC, ETH, SOL)" + example: BTC + vol_5d: + type: string + description: "Daily historical volatility over trailing 5 days (decimal,\ + \ e.g., 0.65 = 65%)" + example: "0.65" + vol_30d: + type: string + description: "Daily historical volatility over trailing 30 days (decimal,\ + \ e.g., 0.65 = 65%)" + example: "0.65" + vol_90d: + type: string + description: "Daily historical volatility over trailing 90 days (decimal,\ + \ e.g., 0.65 = 65%)" + example: "0.65" + adv_30d: + type: string + description: Average daily trading volume over trailing 30 days (USD) + example: "1234567.89" + weighted_vol: + type: string + description: Weighted blend of the most recent vol_5d and the max vol_5d + over last 30 days into a single volatility measure (decimal). + example: "0.0345" coinbase.public_rest_api.MarketRate: type: object properties: @@ -8373,6 +8753,132 @@ components: $ref: '#/components/schemas/coinbase.public_rest_api.ValidatorUnstakePreview' description: PreviewUnstakeResponse contains the response data from previewing an unstaking operation. + coinbase.public_rest_api.PrimeXMHealthStatus: + type: string + description: |2- + - HEALTH_STATUS_HEALTHY: Margin level is healthy. + - HEALTH_STATUS_WARNING: Margin level is breaching the warning threshold (WT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as defined in the margin methodology). WT is differentiated from DT in that it means margin health is approaching the UMCT. + - HEALTH_STATUS_CRITICAL: Margin level is breaching the UMCT and, as defined in the margin methodology, this will trigger an urgent margin call. + - HEALTH_STATUS_SUSPENDED: Trading and withdrawals are suspended per XM margin methodology. + - HEALTH_STATUS_RESTRICTED: Account is in a restricted state per XM margin methodology. + - HEALTH_STATUS_PRE_LIQUIDATION: Margin level is breaching the liquidation threshold (LT) and, as defined in the margin methodology, this will trigger the SESSION_LOCKED control status and liquidation may commence. + - HEALTH_STATUS_LIQUIDATING: Liquidation has commenced. + - HEALTH_STATUS_IN_DEFICIT: Margin level is breaching the deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the margin methodology). + enum: + - HEALTH_STATUS_HEALTHY + - HEALTH_STATUS_WARNING + - HEALTH_STATUS_CRITICAL + - HEALTH_STATUS_SUSPENDED + - HEALTH_STATUS_RESTRICTED + - HEALTH_STATUS_PRE_LIQUIDATION + - HEALTH_STATUS_LIQUIDATING + - HEALTH_STATUS_IN_DEFICIT + coinbase.public_rest_api.PrimeXMMarginCallThresholds: + type: object + properties: + deficit_threshold: + type: string + description: Deficit threshold (DT). + example: "0.8" + warning_threshold: + type: string + description: Warning threshold (WT). + example: "0.8" + critical_threshold: + type: string + description: Urgent margin call threshold (UMCT). + example: "1.0" + liquidation_threshold: + type: string + description: Liquidation threshold (LT). + example: "1.5" + margin_thresholds: + type: array + description: Structured margin thresholds by margin level. + items: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMMarginThreshold' + coinbase.public_rest_api.PrimeXMMarginRequirementBreakdown: + type: object + properties: + base_margin: + type: string + description: Base margin requirement component. + example: "30188.41" + volatility_addon: + type: string + description: Volatility add-on component. + example: "0.00" + liquidity_addon: + type: string + description: Liquidity add-on component. + example: "0.49" + offset_credit: + type: string + description: Credits that offset margin charges due to portfolio composition. + example: "-20.29" + futures_margin: + type: string + description: Futures margin charge applied for any futures trades of the + opposing direction but of the same underlying. + example: "0.00" + coinbase.public_rest_api.PrimeXMMarginRequirementType: + type: string + description: |2- + - MARGIN_REQUIREMENT_TYPE_DMR_PLUS_PMR: Integrated (netted) cross-margin requirement for spot assets and all derivatives contracts. + - MARGIN_REQUIREMENT_TYPE_IPMR_PLUS_IFMR: Combined cross-margin requirement: Integrated Portfolio Margin (IPMR) plus Ineligible Futures Margin (IFMR). + default: MARGIN_REQUIREMENT_TYPE_UNSPECIFIED + enum: + - MARGIN_REQUIREMENT_TYPE_UNSPECIFIED + - MARGIN_REQUIREMENT_TYPE_DMR_PLUS_PMR + - MARGIN_REQUIREMENT_TYPE_IPMR_PLUS_IFMR + coinbase.public_rest_api.PrimeXMMarginThreshold: + type: object + properties: + margin_level: + $ref: '#/components/schemas/coinbase.public_rest_api.XMMarginLevel' + threshold_type: + $ref: '#/components/schemas/coinbase.public_rest_api.PrimeXMMarginThresholdType' + threshold_value: + type: string + example: "0.8" + coinbase.public_rest_api.PrimeXMMarginThresholdType: + type: string + description: |2- + - MARGIN_THRESHOLD_EQUITY_RATIO: Threshold based on equity ratio EQ / MR; triggers when EQ / MR >= threshold_value. + - MARGIN_THRESHOLD_DEFICIT_RATIO: Threshold based on deficit ratio (MR - EQ) / XMML; triggers when (MR - EQ) / XMML > threshold_value. + default: MARGIN_THRESHOLD_TYPE_UNSPECIFIED + enum: + - MARGIN_THRESHOLD_TYPE_UNSPECIFIED + - MARGIN_THRESHOLD_EQUITY_RATIO + - MARGIN_THRESHOLD_DEFICIT_RATIO + - MARGIN_THRESHOLD_NONE + coinbase.public_rest_api.PrimeXMOffsetCreditBreakdown: + type: object + properties: + basis_credit: + type: string + description: Basis offset credit component. + example: "0" + long_short_credit: + type: string + description: Long/short tier-pair offset credit. + example: "0" + long_long_credit: + type: string + description: Long/long tier-pair offset credit. + example: "-1.15" + short_short_credit: + type: string + description: Short/short tier-pair offset credit. + example: "0" + same_tier_credit: + type: string + description: Same-tier offset credit. + example: "-19.13" + total_credit: + type: string + description: Total offset credit. + example: "-20.29" coinbase.public_rest_api.ProcessRequirements: title: Represents the status of various process requirements for a transaction type: object @@ -8512,6 +9018,8 @@ components: properties: subtype: $ref: '#/components/schemas/coinbase.public_rest_api.RewardSubtype' + custom_stablecoin_reward_details: + $ref: '#/components/schemas/coinbase.public_rest_api.CustomStablecoinRewardDetails' coinbase.public_rest_api.RewardSubtype: title: Indicates the reward subtype type: string @@ -8531,6 +9039,8 @@ components: i.e. coinbase pays rebates for staking fees to eligible delegators - BUIDL_DIVIDEND: A BUIDL dividend reward i.e. dividends from BUIDL fund holdings + - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward + i.e. USDC reward payouts enum: - MEV_REWARD - INFLATION_REWARD @@ -8539,6 +9049,7 @@ components: - TRANSACTION_REWARD - STAKING_FEE_REBATE_REWARD - BUIDL_DIVIDEND + - CUSTOM_STABLECOIN_REWARD coinbase.public_rest_api.RiskAssessment: title: New message for risk assessment details type: object @@ -8788,6 +9299,23 @@ components: type: string description: Settlement due date example: "1000" + coinbase.public_rest_api.TierPairRateEntry: + type: object + properties: + tier_a: + type: string + description: First tier in the pair. + example: "0" + tier_b: + type: string + description: Second tier in the pair. + example: "0" + rate: + type: string + description: Credit rate for this tier pair. + example: "0.4579" + description: "TierPairRateEntry represents a single (tier_a, tier_b) -> rate\ + \ entry in an offset credit matrix." coinbase.public_rest_api.TieredPricingFee: type: object properties: @@ -9233,6 +9761,19 @@ components: description: Detailed explanation of the estimate status for display to users. example: Live estimate based on current network conditions + coinbase.public_rest_api.UpdateFundingSettingsResponse: + type: object + properties: + activity_id: + type: string + description: Identifier for the created activity / proposal + activity_type: + type: string + description: Type of the activity (e.g. PCS proposal type) + num_approvals_remaining: + type: integer + description: Number of approvals still required before the change applies + format: int32 coinbase.public_rest_api.UserAction: type: object properties: @@ -9287,6 +9828,22 @@ components: description: |- ValidatorAllocation specifies the validator and amount for staking or unstaking. Used for granular ETH V2 validator-level staking or unstaking operations. + coinbase.public_rest_api.ValidatorProvider: + type: string + description: |- + ValidatorProvider enumerates the ETH validator service providers that PPA accepts on + PortfolioStakingUnstakeRequest.validator_provider. The enum names map 1:1 to the display + names returned by ISS GetUsedValidators (service_provider field) and shown in the Prime + UI. Keep in sync with staking/internal/asset/ethereum.mapServiceProviderToDisplayName. + default: VALIDATOR_PROVIDER_UNSPECIFIED + enum: + - VALIDATOR_PROVIDER_UNSPECIFIED + - VALIDATOR_PROVIDER_COINBASE_CLOUD + - VALIDATOR_PROVIDER_MAVAN + - VALIDATOR_PROVIDER_FIGMENT + - VALIDATOR_PROVIDER_CODEFI + - VALIDATOR_PROVIDER_ATTESTANT + - VALIDATOR_PROVIDER_GALAXY coinbase.public_rest_api.ValidatorStakingInfo: required: - statuses @@ -9472,6 +10029,19 @@ components: description: |- WalletStakeInputs contains the custom inputs for staking operations on a wallet. Requirements and supported fields vary by asset type. + coinbase.public_rest_api.WalletStakingMetadata: + type: object + properties: + external_id: + type: string + description: An optional custom identifier (up to 255 bytes) to attach to + the transaction. This is not a searchable transaction field. Retries with + the same idempotency_key must use the same external_id; a differing value + on retry will be silently ignored. + description: |- + WalletStakingMetadata contains optional metadata for wallet staking requests. + external_id tags the discrete TWS transaction stake/unstake create; automatic reward crediting (e.g. SOL inflation) does not produce one. + StakingClaimRewardsRequest intentionally omits this field; add metadata to claim rewards only if a supported network's claim flow creates a discrete TWS transaction clients need to tag. coinbase.public_rest_api.WalletType: title: Indicates the wallet type type: string @@ -10116,543 +10686,6 @@ components: * [google.type.TimeOfDay][google.type.TimeOfDay] * [google.type.DateTime][google.type.DateTime] * [google.protobuf.Timestamp][google.protobuf.Timestamp] - coinbase.public_rest_api.beta.GetCrossMarginRiskParametersResponse: - type: object - properties: - risk_parameters: - type: array - description: Current XM tier risk parameters for the entity's client tier - items: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.CrossMarginRiskParameters' - offset_credit_matrix_long_short: - type: array - description: Offset credit rate matrix for long/short tier pairs - items: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.TierPairRateEntry' - offset_credit_matrix_long_long: - type: array - description: Offset credit rate matrix for long/long tier pairs - items: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.TierPairRateEntry' - offset_credit_matrix_short_short: - type: array - description: Offset credit rate matrix for short/short tier pairs - items: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.TierPairRateEntry' - margin_period_of_risk: - type: number - description: Margin period of risk (number of days) - format: double - coinbase.public_rest_api.beta.GetCrossMarginPrimeOverviewResponse: - type: object - properties: - control_status: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMControlStatus' - margin_level: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginLevel' - evaluated_at: - type: string - description: When margin metrics were evaluated. - format: date-time - example: 2023-11-07T05:31:56Z - margin_summary: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.CrossMarginPrimeMarginSummary' - coinbase.public_rest_api.beta.SetFundingSettingsResponse: - type: object - properties: - activity_id: - type: string - description: Identifier for the created activity / proposal - activity_type: - type: string - description: Type of the activity (e.g. PCS proposal type) - num_approvals_remaining: - type: integer - description: Number of approvals still required before the change applies - format: int32 - description: SetFundingSettingsResponse returns PCS activity metadata after - the proposal is created. - coinbase.public_rest_api.beta.GetMarketDataResponse: - type: object - properties: - market_data: - type: array - description: List of market data entries - items: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.MarketData' - pagination: - $ref: '#/components/schemas/coinbase.public_rest_api.PaginatedResponse' - coinbase.public_rest_api.beta.CrossMarginRiskParameters: - type: object - properties: - asset_tier: - type: string - description: Asset tier identifier - base_ratio_long: - type: string - description: Base ratio for long positions - base_ratio_short: - type: string - description: Base ratio for short positions - volatility_rate_long: - type: string - description: Volatility rate for long positions - volatility_rate_short: - type: string - description: Volatility rate for short positions - volatility_low_threshold: - type: string - description: Volatility low threshold - volatility_high_threshold: - type: string - description: Volatility high threshold - liquidity_a_long: - type: string - description: Liquidity A for long positions - liquidity_a_short: - type: string - description: Liquidity A for short positions - liquidity_b_short: - type: string - description: Liquidity B for short positions - liquidity_threshold: - type: string - description: Liquidity threshold - basis_offset_credit_rate: - type: string - description: Basis offset credit rate - description: XM 2.0 risk parameters for an asset tier - coinbase.public_rest_api.beta.TierPairRateEntry: - type: object - properties: - tier_a: - type: string - description: First tier in the pair - tier_b: - type: string - description: Second tier in the pair - rate: - type: string - description: Credit rate for this tier pair - description: "TierPairRateEntry represents a single (tier_a, tier_b) -> rate\ - \ entry in an offset credit matrix." - coinbase.public_rest_api.beta.PrimeXMControlStatus: - title: Live data for Cross Margin (XM) for a specific XM customer entity - type: string - description: |- - - TRADES_AND_WITHDRAWALS: Allowed to trade and withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled. - - TRADES_ONLY: Allowed to trade but not withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled. - - SESSION_LOCKED: Not allowed to trade or withdraw. See XM Margin Methodology for full description of when trading and withdrawals are enabled or disabled. - default: XM_CONTROL_STATUS_UNSPECIFIED - enum: - - XM_CONTROL_STATUS_UNSPECIFIED - - TRADES_AND_WITHDRAWALS - - TRADES_ONLY - - SESSION_LOCKED - coinbase.public_rest_api.beta.PrimeXMMarginLevel: - type: string - description: |2- - - HEALTHY_THRESHOLD: Margin level is healthy. - - WARNING_THRESHOLD: Margin level is breaching the warning threshold (WT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as defined in the margin methodology). WT is differentiated from DT in that it means margin health is approaching the UMCT. - - URGENT_MARGIN_CALL_THRESHOLD: Urgent margin call threshold (UMCT): breaching UMCT per margin methodology. - - LIQUIDATION_THRESHOLD: Liquidation threshold (LT): breaching LT; SESSION_LOCKED may apply and liquidation may commence per margin methodology. - - DEFICIT_THRESHOLD: Margin level is breaching the deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the margin methodology). - default: XM_MARGIN_LEVEL_UNSPECIFIED - enum: - - XM_MARGIN_LEVEL_UNSPECIFIED - - HEALTHY_THRESHOLD - - WARNING_THRESHOLD - - URGENT_MARGIN_CALL_THRESHOLD - - LIQUIDATION_THRESHOLD - - DEFICIT_THRESHOLD - coinbase.public_rest_api.beta.CrossMarginPrimeMarginSummary: - type: object - properties: - margin_requirement: - type: string - description: Cross Margin Margin Requirement (XMMR) notional - example: "10362.72" - margin_requirement_type: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginRequirementType' - account_equity: - type: string - description: Equity notional - example: "-21542.63" - margin_excess_shortfall: - type: string - description: Equity - XMMR (margin excess is > 0) - example: "-31891.67" - consumed_credit: - type: string - description: Credit consumed from Cross Margin Credit Limit (XMCL) - example: "22906.34" - xm_credit_limit: - type: string - description: XM Credit Limit (XMCL) is the maximum notional USD of total - fiat and digital asset loans - example: "1222322.00" - xm_margin_limit: - type: string - description: XM Margin Limit (XMML) is the maximum notional USD deficit - example: "22123.00" - consumed_margin_limit: - type: string - description: Amount of the XM margin limit consumed by excess deficit. - example: "15000.00" - spot_equity: - type: string - description: Equity attributed by spot - example: "-21505.91" - futures_equity: - type: string - description: Equity attributed by futures - example: "-36.71" - gross_market_value: - type: string - description: Gross market value. - example: "160000.00" - net_market_value: - type: string - description: Net market value. - example: "45000.00" - net_exposure: - type: string - description: Net exposure. - example: "12000.00" - gross_leverage: - type: string - description: Gross leverage. - example: "2.35" - spot_equity_breakdown: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.CrossMarginPrimeSpotEquityBreakdown' - derivatives_equity_breakdown: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.CrossMarginPrimeDerivativesEquityBreakdown' - risk_netting_info: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.CrossMarginPrimeRiskNettingInfo' - health_status: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMHealthStatus' - equity_ratio: - type: string - description: Equity ratio. - example: "1.02" - deficit_ratio: - type: string - description: Deficit ratio. - example: "0.15" - margin_thresholds: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginCallThresholds' - fcm_excess_available_to_return: - type: string - description: FCM excess available to return. - example: "5000.00" - description: Cross-margin account summary and nested breakdowns. - coinbase.public_rest_api.beta.MarketData: - title: MarketData contains volatility and ADV data for a single product - type: object - properties: - symbol: - type: string - description: "Base asset symbol (e.g., BTC, ETH, SOL)" - example: BTC - vol_5d: - type: string - description: "Daily historical volatility over trailing 5 days (decimal,\ - \ e.g., 0.65 = 65%)" - example: "0.65" - vol_30d: - type: string - description: "Daily historical volatility over trailing 30 days (decimal,\ - \ e.g., 0.65 = 65%)" - example: "0.65" - vol_90d: - type: string - description: "Daily historical volatility over trailing 90 days (decimal,\ - \ e.g., 0.65 = 65%)" - example: "0.65" - adv_30d: - type: string - description: Average daily trading volume over trailing 30 days (USD) - example: "1234567.89" - weighted_vol: - type: string - description: Weighted blend of the most recent vol_5d and the max vol_5d - over last 30 days into a single volatility measure (decimal). - example: "0.0345" - coinbase.public_rest_api.beta.PrimeXMMarginRequirementType: - type: string - description: |2- - - MARGIN_REQUIREMENT_TYPE_DMR_PLUS_PMR: Integrated (netted) cross-margin requirement for spot assets and all derivatives contracts. - - MARGIN_REQUIREMENT_TYPE_IPMR_PLUS_IFMR: Combined cross-margin requirement: Integrated Portfolio Margin (IPMR) plus Ineligible Futures Margin (IFMR). - default: MARGIN_REQUIREMENT_TYPE_UNSPECIFIED - enum: - - MARGIN_REQUIREMENT_TYPE_UNSPECIFIED - - MARGIN_REQUIREMENT_TYPE_DMR_PLUS_PMR - - MARGIN_REQUIREMENT_TYPE_IPMR_PLUS_IFMR - coinbase.public_rest_api.beta.CrossMarginPrimeSpotEquityBreakdown: - type: object - properties: - cash_balance: - type: string - description: PM cash balance component of spot equity. - example: "56166.60" - long_market_value: - type: string - description: Long market value component of spot equity. - example: "85268.31" - short_market_value: - type: string - description: Short market value component of spot equity. - example: "0.00" - short_collateral: - type: string - description: Short collateral component of spot equity. - example: "0.00" - pending_transfers: - type: string - description: Pending transfers affecting spot equity. - example: "15303.77" - description: Breakdown of the components of spot equity. - coinbase.public_rest_api.beta.CrossMarginPrimeDerivativesEquityBreakdown: - type: object - properties: - cash_balance: - type: string - description: Derivatives cash balance component. - example: "1000.00" - unrealized_pnl: - type: string - description: Unrealized PnL component of derivatives equity. - example: "-252.40" - realized_pnl: - type: string - description: Realized PnL component of derivatives equity. - example: "123.65" - accrued_funding_pnl: - type: string - description: Accrued funding PnL component of derivatives equity. - example: "-1.08" - description: Breakdown of the components of derivatives equity. - coinbase.public_rest_api.beta.CrossMarginPrimeRiskNettingInfo: - type: object - properties: - dco_margin_requirement: - type: string - description: "Derivatives Clearing Organization Margin Requirement (DMR)\ - \ is the margin requirement for all futures positions, derived from the\ - \ Derivatives Clearing Organization model" - example: "9243.25" - portfolio_margin_requirement: - type: string - description: "Portfolio Margin Requirement (PMR) is the margin requirement\ - \ for all spot positions, derived from the XM model" - example: "9003.67" - integrated_portfolio_margin_requirement: - type: string - description: Integrated Portfolio Margin Requirement (IPMR) is the margin - requirement for all spot positions + futures positions with underlying - assets eligible in Portfolio Margin. - example: "10154.67" - ineligible_futures_margin_requirement: - type: string - description: Ineligible Futures Margin Requirement (IFMR) is the margin - requirement for IPMR-ineligible futures contracts - example: "194.36" - pmr_breakdown: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginRequirementBreakdown' - ipmr_breakdown: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginRequirementBreakdown' - portfolio_margin_offset_credit_breakdown: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMOffsetCreditBreakdown' - integrated_portfolio_margin_offset_credit_breakdown: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMOffsetCreditBreakdown' - xm_positions: - type: array - description: Netted positions used in the model calculation. - items: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.CrossMarginPrimeXMPosition' - description: "Groups XM margin requirement components, offset credits, and per-asset\ - \ rows." - coinbase.public_rest_api.beta.PrimeXMHealthStatus: - type: string - description: |2- - - HEALTH_STATUS_HEALTHY: Margin level is healthy. - - HEALTH_STATUS_WARNING: Margin level is breaching the warning threshold (WT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as defined in the margin methodology). WT is differentiated from DT in that it means margin health is approaching the UMCT. - - HEALTH_STATUS_CRITICAL: Margin level is breaching the UMCT and, as defined in the margin methodology, this will trigger an urgent margin call. - - HEALTH_STATUS_SUSPENDED: Trading and withdrawals are suspended per XM margin methodology. - - HEALTH_STATUS_RESTRICTED: Account is in a restricted state per XM margin methodology. - - HEALTH_STATUS_PRE_LIQUIDATION: Margin level is breaching the liquidation threshold (LT) and, as defined in the margin methodology, this will trigger the SESSION_LOCKED control status and liquidation may commence. - - HEALTH_STATUS_LIQUIDATING: Liquidation has commenced. - - HEALTH_STATUS_IN_DEFICIT: Margin level is breaching the deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the margin methodology). - enum: - - HEALTH_STATUS_HEALTHY - - HEALTH_STATUS_WARNING - - HEALTH_STATUS_CRITICAL - - HEALTH_STATUS_SUSPENDED - - HEALTH_STATUS_RESTRICTED - - HEALTH_STATUS_PRE_LIQUIDATION - - HEALTH_STATUS_LIQUIDATING - - HEALTH_STATUS_IN_DEFICIT - coinbase.public_rest_api.beta.PrimeXMMarginCallThresholds: - type: object - properties: - deficit_threshold: - type: string - description: Deficit threshold (DT). - example: "0.8" - warning_threshold: - type: string - description: Warning threshold (WT). - example: "0.8" - critical_threshold: - type: string - description: Urgent margin call threshold (UMCT). - example: "1.0" - liquidation_threshold: - type: string - description: Liquidation threshold (LT). - example: "1.5" - margin_thresholds: - type: array - description: Structured margin thresholds by margin level. - items: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginThreshold' - coinbase.public_rest_api.beta.PrimeXMMarginRequirementBreakdown: - type: object - properties: - base_margin: - type: string - description: Base margin requirement component. - example: "30188.41" - volatility_addon: - type: string - description: Volatility add-on component. - example: "0.00" - liquidity_addon: - type: string - description: Liquidity add-on component. - example: "0.49" - offset_credit: - type: string - description: Credits that offset margin charges due to portfolio composition. - example: "-20.29" - futures_margin: - type: string - description: Futures margin charge applied for any futures trades of the - opposing direction but of the same underlying. - example: "0.00" - coinbase.public_rest_api.beta.PrimeXMOffsetCreditBreakdown: - type: object - properties: - basis_credit: - type: string - description: Basis offset credit component. - example: "0" - long_short_credit: - type: string - description: Long/short tier-pair offset credit. - example: "0" - long_long_credit: - type: string - description: Long/long tier-pair offset credit. - example: "-1.15" - short_short_credit: - type: string - description: Short/short tier-pair offset credit. - example: "0" - same_tier_credit: - type: string - description: Same-tier offset credit. - example: "-19.13" - total_credit: - type: string - description: Total offset credit. - example: "-20.29" - coinbase.public_rest_api.beta.CrossMarginPrimeXMPosition: - type: object - properties: - currency: - type: string - description: Position currency - example: BTC - market_price: - type: string - description: Current market price - example: "114531.73" - spot_balance: - type: string - description: XM spot balance nominal - example: "-0.19652944" - spot_balance_notional: - type: string - description: XM spot balance notional - example: "-22508.85" - futures_balance: - type: string - description: XM futures balance nominal - example: "-0.19652944" - futures_balance_notional: - type: string - description: XM futures balance notional - example: "-22508.85" - base_requirement: - type: string - description: Base margin requirement notional - example: "8925.50" - total_position_margin: - type: string - description: Total margin required - example: "9100.00" - basis_credit: - type: string - description: Basis offset credit applied to this asset row. - example: "-5.25" - futures_netted_notional: - type: string - description: Post-netting USD notional for futures on this asset - example: "11510.00" - futures_netting_margin: - type: string - description: Margin attributed to futures netting for this asset row. - example: "120.00" - long_amount: - type: string - description: Per-asset long amount from position_summary. - example: "0.75539174" - short_amount: - type: string - description: Per-asset short amount from position_summary. - example: "0.95292118" - volatility_addon: - type: string - description: Volatility margin add-on for this asset. - example: "0.00" - liquidity_addon: - type: string - description: Liquidity margin add-on for this asset. - example: "0.49" - description: CrossMarginPrimeXMPosition is a single per-asset XM row (proto-backed - fields from XMPositionDetails). - coinbase.public_rest_api.beta.PrimeXMMarginThreshold: - type: object - properties: - margin_level: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginLevel' - threshold_type: - $ref: '#/components/schemas/coinbase.public_rest_api.beta.PrimeXMMarginThresholdType' - threshold_value: - type: string - example: "0.8" - coinbase.public_rest_api.beta.PrimeXMMarginThresholdType: - type: string - description: |2- - - MARGIN_THRESHOLD_EQUITY_RATIO: Threshold based on equity ratio EQ / MR; triggers when EQ / MR >= threshold_value. - - MARGIN_THRESHOLD_DEFICIT_RATIO: Threshold based on deficit ratio (MR - EQ) / XMML; triggers when (MR - EQ) / XMML > threshold_value. - default: MARGIN_THRESHOLD_TYPE_UNSPECIFIED - enum: - - MARGIN_THRESHOLD_TYPE_UNSPECIFIED - - MARGIN_THRESHOLD_EQUITY_RATIO - - MARGIN_THRESHOLD_DEFICIT_RATIO - - MARGIN_THRESHOLD_NONE public_rest_apiCreateAllocationRequest: type: object properties: From 6c9eb5cc95ed7c353b13ab96cfe683c0bdb16434 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 8 Jun 2026 18:33:44 -0400 Subject: [PATCH 3/8] chore: regenerate models and enums from OpenAPI spec Regenerate model/ and model/enums/ from the refreshed spec, including new cross-margin and staking types and XM naming alignment. Co-authored-by: Cursor --- .../com/coinbase/prime/model/Accrual.java | 4 - .../prime/model/ActiveLiquidationSummary.java | 13 +- .../com/coinbase/prime/model/Activity.java | 7 - .../prime/model/ActivityMetadataAccount.java | 3 - .../model/ActivityMetadataTransactions.java | 3 - .../prime/model/AddressBookEntry.java | 5 - .../coinbase/prime/model/AddressEntry.java | 2 - .../coinbase/prime/model/AddressGroup.java | 3 - .../prime/model/AdvancedTransfer.java | 3 - .../prime/model/AggregatedFiatBalance.java | 4 - .../com/coinbase/prime/model/Allocation.java | 4 - .../coinbase/prime/model/AllocationLeg.java | 1 - .../com/coinbase/prime/model/AmountDue.java | 2 - .../java/com/coinbase/prime/model/Asset.java | 3 - .../coinbase/prime/model/AssetBalance.java | 2 - .../com/coinbase/prime/model/AssetChange.java | 6 - .../com/coinbase/prime/model/Balance.java | 5 +- .../prime/model/BlockchainAddress.java | 2 - .../java/com/coinbase/prime/model/Candle.java | 7 - .../com/coinbase/prime/model/Commission.java | 4 +- .../prime/model/ConversionDetail.java | 1 - .../model/CreateAllocationResponseBody.java | 1 - .../CreateNetAllocationResponseBody.java | 1 - .../prime/model/CrossMarginOverview.java | 78 ++-- ...MarginPrimeDerivativesEquityBreakdown.java | 117 ++++++ .../model/CrossMarginPrimeMarginSummary.java | 305 +++++++++++++++- .../CrossMarginPrimeRiskNettingInfo.java | 234 ++++++++++++ .../CrossMarginPrimeSpotEquityBreakdown.java | 137 +++++++ .../model/CrossMarginPrimeXMPosition.java | 339 ++++++++++++++++++ .../model/CrossMarginRiskParameters.java | 130 ++++++- .../model/CustomStablecoinRewardDetails.java | 77 ++++ .../com/coinbase/prime/model/DateOfBirth.java | 41 +-- .../com/coinbase/prime/model/DefiBalance.java | 2 - .../coinbase/prime/model/DetailedAddress.java | 2 - .../com/coinbase/prime/model/DisplayUser.java | 2 - .../coinbase/prime/model/EntityBalance.java | 1 - .../com/coinbase/prime/model/EntityUser.java | 5 - .../coinbase/prime/model/ExistingLocate.java | 2 - .../coinbase/prime/model/FcmMarginCall.java | 2 - .../com/coinbase/prime/model/FcmPosition.java | 1 - .../prime/model/FcmTradingSessionDetails.java | 1 - .../java/com/coinbase/prime/model/Fill.java | 6 - .../coinbase/prime/model/FundMovement.java | 7 - .../prime/model/FutureProductDetails.java | 1 - .../coinbase/prime/model/FuturesSweep.java | 2 - .../com/coinbase/prime/model/Invoice.java | 2 - .../com/coinbase/prime/model/InvoiceItem.java | 5 - .../coinbase/prime/model/LimitOrderEdit.java | 2 - .../com/coinbase/prime/model/LoanInfo.java | 2 - .../java/com/coinbase/prime/model/Locate.java | 5 - .../com/coinbase/prime/model/MarginAddOn.java | 1 - .../coinbase/prime/model/MarginSummary.java | 17 +- .../com/coinbase/prime/model/MarketData.java | 88 ++++- .../com/coinbase/prime/model/MarketRate.java | 4 - .../com/coinbase/prime/model/Network.java | 4 - .../coinbase/prime/model/NetworkDetails.java | 2 - .../coinbase/prime/model/NftCollection.java | 3 - .../com/coinbase/prime/model/NftItem.java | 3 - .../coinbase/prime/model/OnchainAsset.java | 4 +- .../coinbase/prime/model/OnchainBalance.java | 3 +- .../model/OnchainTransactionDetails.java | 1 - .../model/OnchainTransactionMetadata.java | 1 - .../java/com/coinbase/prime/model/Order.java | 20 +- .../com/coinbase/prime/model/OrderEdit.java | 1 - .../prime/model/PaymentMethodDetails.java | 3 - .../prime/model/PaymentMethodSummary.java | 2 - .../com/coinbase/prime/model/PmAssetInfo.java | 5 +- .../com/coinbase/prime/model/Portfolio.java | 2 - .../coinbase/prime/model/PortfolioUser.java | 5 - .../com/coinbase/prime/model/Position.java | 1 - .../prime/model/PositionReference.java | 3 - .../model/PostTradeCreditInformation.java | 6 - .../model/PrimeXMMarginCallThresholds.java | 137 +++++++ .../PrimeXMMarginRequirementBreakdown.java | 139 +++++++ .../prime/model/PrimeXMMarginThreshold.java | 113 ++++++ .../model/PrimeXMOffsetCreditBreakdown.java | 156 ++++++++ .../com/coinbase/prime/model/Product.java | 4 +- ...leDataForAnExistingDepositTransaction.java | 2 - .../coinbase/prime/model/RewardMetadata.java | 26 +- .../prime/model/RfqProductDetails.java | 1 - .../com/coinbase/prime/model/RpcConfig.java | 1 - .../coinbase/prime/model/StakingStatus.java | 1 - .../com/coinbase/prime/model/SweepAmount.java | 4 - .../com/coinbase/prime/model/TfAsset.java | 2 +- .../coinbase/prime/model/TfObligation.java | 2 +- .../prime/model/TierPairRateEntry.java | 65 +++- .../prime/model/TieredPricingFee.java | 4 - .../com/coinbase/prime/model/Transaction.java | 12 +- .../prime/model/TransferLocation.java | 3 - .../coinbase/prime/model/TravelRuleData.java | 2 - .../coinbase/prime/model/TravelRuleEntry.java | 226 ------------ .../coinbase/prime/model/TravelRuleParty.java | 9 +- .../prime/model/TravelRuleWalletDetails.java | 75 ---- .../coinbase/prime/model/UnstakingStatus.java | 1 - .../com/coinbase/prime/model/UserAction.java | 2 - .../prime/model/ValidatorAllocation.java | 1 - .../prime/model/ValidatorStakingInfo.java | 1 - .../prime/model/ValidatorUnstakingInfo.java | 1 - .../java/com/coinbase/prime/model/Vasp.java | 93 ----- .../java/com/coinbase/prime/model/Wallet.java | 7 - .../prime/model/WalletClaimRewardsInputs.java | 3 - .../WalletCryptoDepositInstructions.java | 9 +- .../model/WalletFiatDepositInstructions.java | 3 - .../prime/model/WalletStakeInputs.java | 1 - .../prime/model/WalletStakingMetadata.java | 67 ++++ .../prime/model/WalletUnstakeInputs.java | 1 - .../coinbase/prime/model/WithdrawalPower.java | 4 - .../prime/model/{XmLoan.java => XMLoan.java} | 27 +- .../{XmMarginCall.java => XMMarginCall.java} | 83 +++-- .../{XmPosition.java => XMPosition.java} | 12 +- ...ettingInfo.java => XMRiskNettingInfo.java} | 40 +-- .../model/{XmSummary.java => XMSummary.java} | 23 +- .../model/enums/ActivitySecondaryType.java | 3 + .../prime/model/enums/DestinationType.java | 4 + .../model/enums/PortfolioBalanceType.java | 5 + .../model/enums/PrimeXMControlStatus.java | 39 +- .../model/enums/PrimeXMHealthStatus.java | 70 ++++ .../prime/model/enums/PrimeXMMarginLevel.java | 57 ++- .../enums/PrimeXMMarginRequirementType.java | 38 ++ ...s.java => PrimeXMMarginThresholdType.java} | 24 +- .../prime/model/enums/RewardSubtype.java | 7 +- .../prime/model/enums/SigningStatus.java | 2 + .../model/enums/TransferLocationType.java | 6 + ...trolStatus.java => ValidatorProvider.java} | 21 +- .../prime/model/enums/VisibilityStatus.java | 3 + .../{XmCallStatus.java => XMCallStatus.java} | 11 +- .../{XmCallType.java => XMCallType.java} | 9 +- .../prime/model/enums/XMControlStatus.java | 47 +++ .../prime/model/enums/XMEntityCallStatus.java | 58 +++ ...onStatus.java => XMLiquidationStatus.java} | 14 +- .../prime/model/enums/XMMarginLevel.java | 63 ++++ .../enums/{XmParty.java => XMParty.java} | 8 +- .../prime/model/enums/XmMarginLevel.java | 30 -- 133 files changed, 2730 insertions(+), 925 deletions(-) create mode 100644 src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java create mode 100644 src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java create mode 100644 src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java create mode 100644 src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java create mode 100644 src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java create mode 100644 src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java create mode 100644 src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java create mode 100644 src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java create mode 100644 src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java delete mode 100644 src/main/java/com/coinbase/prime/model/TravelRuleEntry.java delete mode 100644 src/main/java/com/coinbase/prime/model/TravelRuleWalletDetails.java delete mode 100644 src/main/java/com/coinbase/prime/model/Vasp.java create mode 100644 src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java rename src/main/java/com/coinbase/prime/model/{XmLoan.java => XMLoan.java} (89%) rename src/main/java/com/coinbase/prime/model/{XmMarginCall.java => XMMarginCall.java} (65%) rename src/main/java/com/coinbase/prime/model/{XmPosition.java => XMPosition.java} (98%) rename src/main/java/com/coinbase/prime/model/{XmRiskNettingInfo.java => XMRiskNettingInfo.java} (91%) rename src/main/java/com/coinbase/prime/model/{XmSummary.java => XMSummary.java} (90%) create mode 100644 src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java rename src/main/java/com/coinbase/prime/model/enums/{XmEntityCallStatus.java => PrimeXMMarginThresholdType.java} (51%) rename src/main/java/com/coinbase/prime/model/enums/{XmControlStatus.java => ValidatorProvider.java} (52%) rename src/main/java/com/coinbase/prime/model/enums/{XmCallStatus.java => XMCallStatus.java} (66%) rename src/main/java/com/coinbase/prime/model/enums/{XmCallType.java => XMCallType.java} (71%) create mode 100644 src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java create mode 100644 src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java rename src/main/java/com/coinbase/prime/model/enums/{XmLiquidationStatus.java => XMLiquidationStatus.java} (62%) create mode 100644 src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java rename src/main/java/com/coinbase/prime/model/enums/{XmParty.java => XMParty.java} (69%) delete mode 100644 src/main/java/com/coinbase/prime/model/enums/XmMarginLevel.java diff --git a/src/main/java/com/coinbase/prime/model/Accrual.java b/src/main/java/com/coinbase/prime/model/Accrual.java index ab1ccaf..2434fe1 100644 --- a/src/main/java/com/coinbase/prime/model/Accrual.java +++ b/src/main/java/com/coinbase/prime/model/Accrual.java @@ -31,7 +31,6 @@ public class Accrual { private String accrualId; /** The date of accrual in UTC */ - @JsonProperty("date") private String date; /** The unique ID of the portfolio */ @@ -39,7 +38,6 @@ public class Accrual { private String portfolioId; /** The currency symbol */ - @JsonProperty("symbol") private String symbol; @JsonProperty("loan_type") @@ -65,7 +63,6 @@ public class Accrual { @JsonProperty("loan_amount") private String loanAmount; - @JsonProperty("benchmark") private Benchmark benchmark; /** Daily interest rate fetched from the benchmark source */ @@ -73,7 +70,6 @@ public class Accrual { private String benchmarkRate; /** Daily spread offset from the benchmark rate */ - @JsonProperty("spread") private String spread; @JsonProperty("rate_type") diff --git a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java index 3eb2e00..e5a0685 100644 --- a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java +++ b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java @@ -20,7 +20,7 @@ package com.coinbase.prime.model; -import com.coinbase.prime.model.enums.XmLiquidationStatus; +import com.coinbase.prime.model.enums.XMLiquidationStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** ActiveLiquidationSummary provides a summary of the active or most recent XM liquidation */ @@ -36,8 +36,7 @@ public class ActiveLiquidationSummary { * XM_LIQUIDATION_STATUS_CANCELED: Liquidation was canceled - XM_LIQUIDATION_STATUS_FAILED: * Liquidation failed */ - @JsonProperty("status") - private XmLiquidationStatus status; + private XMLiquidationStatus status; /** USD notional shortfall amount that triggered the liquidation */ @JsonProperty("shortfall_amount") @@ -59,11 +58,11 @@ public void setLiquidationId(String liquidationId) { this.liquidationId = liquidationId; } - public XmLiquidationStatus getStatus() { + public XMLiquidationStatus getStatus() { return status; } - public void setStatus(XmLiquidationStatus status) { + public void setStatus(XMLiquidationStatus status) { this.status = status; } @@ -78,7 +77,7 @@ public void setShortfallAmount(String shortfallAmount) { public static class Builder { private String liquidationId; - private XmLiquidationStatus status; + private XMLiquidationStatus status; private String shortfallAmount; @@ -87,7 +86,7 @@ public Builder liquidationId(String liquidationId) { return this; } - public Builder status(XmLiquidationStatus status) { + public Builder status(XMLiquidationStatus status) { this.status = status; return this; } diff --git a/src/main/java/com/coinbase/prime/model/Activity.java b/src/main/java/com/coinbase/prime/model/Activity.java index a8d7aba..6281d4c 100644 --- a/src/main/java/com/coinbase/prime/model/Activity.java +++ b/src/main/java/com/coinbase/prime/model/Activity.java @@ -30,17 +30,14 @@ public class Activity { /** A unique id for the account activity */ - @JsonProperty("id") private String id; /** A reference for orders and transactions, n/a for other category types */ @JsonProperty("reference_id") private String referenceId; - @JsonProperty("category") private ActivityCategory category; - @JsonProperty("type") private PrimeActivityType type; /** @@ -51,7 +48,6 @@ public class Activity { @JsonProperty("secondary_type") private ActivitySecondaryType secondaryType; - @JsonProperty("status") private ActivityStatus status; /** Id of user who created the activity */ @@ -59,11 +55,9 @@ public class Activity { private String createdBy; /** Title of the activity */ - @JsonProperty("title") private String title; /** Description detail of the activity */ - @JsonProperty("description") private String description; /** Actions related to the Activity */ @@ -80,7 +74,6 @@ public class Activity { private Object ordersMetadata; /** List of currencies included in an activity */ - @JsonProperty("symbols") private List symbols; /** Time activity was created at */ diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java index 9065b8e..6beda4e 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java @@ -20,10 +20,7 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class ActivityMetadataAccount { - @JsonProperty("consensus") private ActivityMetadataConsensus consensus; public ActivityMetadataAccount() {} diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java index 1e1c81f..f27363b 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java @@ -20,10 +20,7 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class ActivityMetadataTransactions { - @JsonProperty("consensus") private ActivityMetadataConsensus consensus; public ActivityMetadataTransactions() {} diff --git a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java index 7834cec..9499a1e 100644 --- a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java @@ -26,7 +26,6 @@ public class AddressBookEntry { /** UUID identifying this address book entry */ - @JsonProperty("id") private String id; /** Currency symbol */ @@ -34,11 +33,9 @@ public class AddressBookEntry { private String currencySymbol; /** Name for this address book entry */ - @JsonProperty("name") private String name; /** Cryptocurrency address */ - @JsonProperty("address") private String address; /** Memo or destination tag for currencies which support them */ @@ -50,7 +47,6 @@ public class AddressBookEntry { private String accountIdentifierName; /** State of this address book entry */ - @JsonProperty("state") private String state; /** Link to a blockchain explorer */ @@ -68,7 +64,6 @@ public class AddressBookEntry { @JsonProperty("added_by") private DisplayUser addedBy; - @JsonProperty("type") private AddressBookType type; /** counterparty id */ diff --git a/src/main/java/com/coinbase/prime/model/AddressEntry.java b/src/main/java/com/coinbase/prime/model/AddressEntry.java index 77c80f3..1809f10 100644 --- a/src/main/java/com/coinbase/prime/model/AddressEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressEntry.java @@ -24,10 +24,8 @@ import java.util.List; public class AddressEntry { - @JsonProperty("name") private String name; - @JsonProperty("address") private String address; /** List of compatible chain IDs for a given address, empty for Solana */ diff --git a/src/main/java/com/coinbase/prime/model/AddressGroup.java b/src/main/java/com/coinbase/prime/model/AddressGroup.java index daa0cdb..7c6f45b 100644 --- a/src/main/java/com/coinbase/prime/model/AddressGroup.java +++ b/src/main/java/com/coinbase/prime/model/AddressGroup.java @@ -26,17 +26,14 @@ import java.util.List; public class AddressGroup { - @JsonProperty("id") private String id; - @JsonProperty("name") private String name; @JsonProperty("network_type") private NetworkType networkType; /** A list of addresses within the group */ - @JsonProperty("addresses") private List addresses; @JsonProperty("added_at") diff --git a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java index b4fbe91..ef3bc17 100644 --- a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java +++ b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java @@ -27,15 +27,12 @@ /** AdvancedTransfer represents a complex transfer operation such as a blind match settlement. */ public class AdvancedTransfer { - @JsonProperty("id") private String id; /** AdvancedTransferType specifies the type of advanced transfer. */ - @JsonProperty("type") private AdvancedTransferType type; /** AdvancedTransferState represents the lifecycle state of an advanced transfer. */ - @JsonProperty("state") private AdvancedTransferState state; @JsonProperty("fund_movements") diff --git a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java index 89e33de..518606b 100644 --- a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java +++ b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java @@ -20,13 +20,9 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class AggregatedFiatBalance { - @JsonProperty("total") private String total; - @JsonProperty("holds") private String holds; public AggregatedFiatBalance() {} diff --git a/src/main/java/com/coinbase/prime/model/Allocation.java b/src/main/java/com/coinbase/prime/model/Allocation.java index 2f4e232..1288432 100644 --- a/src/main/java/com/coinbase/prime/model/Allocation.java +++ b/src/main/java/com/coinbase/prime/model/Allocation.java @@ -51,7 +51,6 @@ public class Allocation { private String productId; /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ - @JsonProperty("side") private OrderSide side; /** Price the allocation was done at. */ @@ -70,11 +69,9 @@ public class Allocation { @JsonProperty("fees_allocated") private String feesAllocated; - @JsonProperty("status") private AllocationStatus status; /** Portfolio ID of the source portfolio. */ - @JsonProperty("source") private String source; /** @@ -89,7 +86,6 @@ public class Allocation { * units allocated to each portfolio: [{leg_id, portfolio_id, allocation_base, allocation_quote}, * {leg_id, portfolio_id, allocation_base, allocation_quote}...] */ - @JsonProperty("destinations") private List destinations; /** diff --git a/src/main/java/com/coinbase/prime/model/AllocationLeg.java b/src/main/java/com/coinbase/prime/model/AllocationLeg.java index 6959c47..c2cd7c2 100644 --- a/src/main/java/com/coinbase/prime/model/AllocationLeg.java +++ b/src/main/java/com/coinbase/prime/model/AllocationLeg.java @@ -32,7 +32,6 @@ public class AllocationLeg { private String destinationPortfolioId; /** The amount size for the allocation leg */ - @JsonProperty("amount") private String amount; public AllocationLeg() {} diff --git a/src/main/java/com/coinbase/prime/model/AmountDue.java b/src/main/java/com/coinbase/prime/model/AmountDue.java index c486719..1944778 100644 --- a/src/main/java/com/coinbase/prime/model/AmountDue.java +++ b/src/main/java/com/coinbase/prime/model/AmountDue.java @@ -25,11 +25,9 @@ public class AmountDue { /** The currency this loan is due in */ - @JsonProperty("currency") private String currency; /** The amount due */ - @JsonProperty("amount") private String amount; /** The date this settlement is due, expressed in UTC */ diff --git a/src/main/java/com/coinbase/prime/model/Asset.java b/src/main/java/com/coinbase/prime/model/Asset.java index 710f8ee..0a04ba7 100644 --- a/src/main/java/com/coinbase/prime/model/Asset.java +++ b/src/main/java/com/coinbase/prime/model/Asset.java @@ -25,11 +25,9 @@ public class Asset { /** The name of the asset */ - @JsonProperty("name") private String name; /** The mutable series of letters used to identify the asset */ - @JsonProperty("symbol") private String symbol; /** The number of decimals supported for the asset */ @@ -45,7 +43,6 @@ public class Asset { private String explorerUrl; /** List of networks supported by this asset */ - @JsonProperty("networks") private List networks; public Asset() {} diff --git a/src/main/java/com/coinbase/prime/model/AssetBalance.java b/src/main/java/com/coinbase/prime/model/AssetBalance.java index 19806bf..5b9dad1 100644 --- a/src/main/java/com/coinbase/prime/model/AssetBalance.java +++ b/src/main/java/com/coinbase/prime/model/AssetBalance.java @@ -28,11 +28,9 @@ public class AssetBalance { private String portfolioId; /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** Balance amount */ - @JsonProperty("amount") private String amount; /** Notional balance amount */ diff --git a/src/main/java/com/coinbase/prime/model/AssetChange.java b/src/main/java/com/coinbase/prime/model/AssetChange.java index 1635cba..3faa181 100644 --- a/src/main/java/com/coinbase/prime/model/AssetChange.java +++ b/src/main/java/com/coinbase/prime/model/AssetChange.java @@ -21,25 +21,19 @@ package com.coinbase.prime.model; import com.coinbase.prime.model.enums.AssetChangeType; -import com.fasterxml.jackson.annotation.JsonProperty; public class AssetChange { /** AssetChangeType identifies the type of asset change */ - @JsonProperty("type") private AssetChangeType type; /** The currency symbol associated with the balance operation */ - @JsonProperty("symbol") private String symbol; /** The amount in whole units being transferred or approved */ - @JsonProperty("amount") private String amount; - @JsonProperty("collection") private NftCollection collection; - @JsonProperty("item") private NftItem item; public AssetChange() {} diff --git a/src/main/java/com/coinbase/prime/model/Balance.java b/src/main/java/com/coinbase/prime/model/Balance.java index 77c3415..7c6f236 100644 --- a/src/main/java/com/coinbase/prime/model/Balance.java +++ b/src/main/java/com/coinbase/prime/model/Balance.java @@ -24,17 +24,14 @@ public class Balance { /** The display symbol for the asset */ - @JsonProperty("symbol") private String symbol; - /** The total amount in whole units with full precision. Includes the `holds` amount. */ - @JsonProperty("amount") + /** The total amount in whole units with full precision. Includes the `holds` amount. */ private String amount; /** * Amount that is currently held in obligation to an open order's position or a pending withdrawal */ - @JsonProperty("holds") private String holds; /** diff --git a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java index 26bd192..d4852b0 100644 --- a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java +++ b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java @@ -24,14 +24,12 @@ public class BlockchainAddress { /** The address on the network */ - @JsonProperty("address") private String address; /** The account identifier (used on some chains to distinguish accounts using the same address) */ @JsonProperty("account_identifier") private String accountIdentifier; - @JsonProperty("network") private Network network; public BlockchainAddress() {} diff --git a/src/main/java/com/coinbase/prime/model/Candle.java b/src/main/java/com/coinbase/prime/model/Candle.java index d7c241f..cfa7cf6 100644 --- a/src/main/java/com/coinbase/prime/model/Candle.java +++ b/src/main/java/com/coinbase/prime/model/Candle.java @@ -20,33 +20,26 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Represents a single candle data point */ public class Candle { /** Timestamp for the start of the candle period */ - @JsonProperty("timestamp") private OffsetDateTime timestamp; /** Opening price for the period */ - @JsonProperty("open") private String open; /** Highest price during the period */ - @JsonProperty("high") private String high; /** Lowest price during the period */ - @JsonProperty("low") private String low; /** Closing price for the period */ - @JsonProperty("close") private String close; /** Volume traded during the period */ - @JsonProperty("volume") private String volume; public Candle() {} diff --git a/src/main/java/com/coinbase/prime/model/Commission.java b/src/main/java/com/coinbase/prime/model/Commission.java index 3b82495..3921f4f 100644 --- a/src/main/java/com/coinbase/prime/model/Commission.java +++ b/src/main/java/com/coinbase/prime/model/Commission.java @@ -24,11 +24,9 @@ public class Commission { /** Fee model (all_in or cost_plus) */ - @JsonProperty("type") private String type; - /** Commission rate (in whole percentage. Commission of 15bps is "0.0015") */ - @JsonProperty("rate") + /** Commission rate (in whole percentage. Commission of 15bps is \"0.0015\") */ private String rate; /** Average 30 days over past 3 months (e.g. 90 days divided by 3) */ diff --git a/src/main/java/com/coinbase/prime/model/ConversionDetail.java b/src/main/java/com/coinbase/prime/model/ConversionDetail.java index 13297e2..dc88a00 100644 --- a/src/main/java/com/coinbase/prime/model/ConversionDetail.java +++ b/src/main/java/com/coinbase/prime/model/ConversionDetail.java @@ -24,7 +24,6 @@ public class ConversionDetail { /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** Trade finance balance after the conversion */ diff --git a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java index b799fd3..83df389 100644 --- a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java @@ -24,7 +24,6 @@ public class CreateAllocationResponseBody { /** The success boolean for the post allocation */ - @JsonProperty("success") private boolean success; /** The allocation id for the post allocation */ diff --git a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java index 5392f6f..6b1ced2 100644 --- a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java @@ -24,7 +24,6 @@ public class CreateNetAllocationResponseBody { /** The success boolean for the post net allocation */ - @JsonProperty("success") private boolean success; /** The netting_id for the post net allocation */ diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java index a0f3f33..83e8543 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java @@ -20,9 +20,9 @@ package com.coinbase.prime.model; -import com.coinbase.prime.model.enums.XmControlStatus; -import com.coinbase.prime.model.enums.XmEntityCallStatus; -import com.coinbase.prime.model.enums.XmMarginLevel; +import com.coinbase.prime.model.enums.XMControlStatus; +import com.coinbase.prime.model.enums.XMEntityCallStatus; +import com.coinbase.prime.model.enums.XMMarginLevel; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -36,22 +36,22 @@ public class CrossMarginOverview { * disabled. */ @JsonProperty("control_status") - private XmControlStatus controlStatus; + private XMControlStatus controlStatus; /** * XMEntityCallStatus summarizes the state of open margin calls or debit calls. When multiple * calls exist, the status reflects the highest priority call type. Priority order (highest to - * lowest): aged > urgent > standard > debit. - ENTITY_NO_CALL: There are no margin calls - * or debit calls. - ENTITY_OPEN_STANDARD_CALL: There is a standard margin call. There may also be - * debit calls, but there are no urgent margin calls or expired calls.. - ENTITY_OPEN_URGENT_CALL: - * There is an urgent margin call. There may also be standard margin calls or debit calls, but - * there are no expired calls. - ENTITY_AGED_CALL: At least one open margin call (standard or - * urgent) or debit call is aged. This will trigger the SESSION_LOCKED control status. - + * lowest): aged > urgent > standard > debit. - ENTITY_NO_CALL: There are no margin calls or debit + * calls. - ENTITY_OPEN_STANDARD_CALL: There is a standard margin call. There may also be debit + * calls, but there are no urgent margin calls or expired calls.. - ENTITY_OPEN_URGENT_CALL: There + * is an urgent margin call. There may also be standard margin calls or debit calls, but there are + * no expired calls. - ENTITY_AGED_CALL: At least one open margin call (standard or urgent) or + * debit call is aged. This will trigger the SESSION_LOCKED control status. - * ENTITY_OPEN_DEBIT_CALL: There is a debit call. There are no standard margin calls, urgent * margin calls, or expired calls. */ @JsonProperty("call_status") - private XmEntityCallStatus callStatus; + private XMEntityCallStatus callStatus; /** * - HEALTHY_THRESHOLD: Margin level is healthy - DEFICIT_THRESHOLD: Margin level is breaching the @@ -67,19 +67,19 @@ public class CrossMarginOverview { * may commence. */ @JsonProperty("margin_level") - private XmMarginLevel marginLevel; + private XMMarginLevel marginLevel; /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ @JsonProperty("margin_summary") - private XmSummary marginSummary; + private XMSummary marginSummary; /** List of active XM margin calls */ @JsonProperty("active_margin_calls") - private List activeMarginCalls; + private List activeMarginCalls; /** List of active XM loans */ @JsonProperty("active_loans") - private List activeLoans; + private List activeLoans; /** ActiveLiquidationSummary provides a summary of the active or most recent XM liquidation */ @JsonProperty("active_liquidation") @@ -97,51 +97,51 @@ public CrossMarginOverview(Builder builder) { this.activeLiquidation = builder.activeLiquidation; } - public XmControlStatus getControlStatus() { + public XMControlStatus getControlStatus() { return controlStatus; } - public void setControlStatus(XmControlStatus controlStatus) { + public void setControlStatus(XMControlStatus controlStatus) { this.controlStatus = controlStatus; } - public XmEntityCallStatus getCallStatus() { + public XMEntityCallStatus getCallStatus() { return callStatus; } - public void setCallStatus(XmEntityCallStatus callStatus) { + public void setCallStatus(XMEntityCallStatus callStatus) { this.callStatus = callStatus; } - public XmMarginLevel getMarginLevel() { + public XMMarginLevel getMarginLevel() { return marginLevel; } - public void setMarginLevel(XmMarginLevel marginLevel) { + public void setMarginLevel(XMMarginLevel marginLevel) { this.marginLevel = marginLevel; } - public XmSummary getMarginSummary() { + public XMSummary getMarginSummary() { return marginSummary; } - public void setMarginSummary(XmSummary marginSummary) { + public void setMarginSummary(XMSummary marginSummary) { this.marginSummary = marginSummary; } - public List getActiveMarginCalls() { + public List getActiveMarginCalls() { return activeMarginCalls; } - public void setActiveMarginCalls(List activeMarginCalls) { + public void setActiveMarginCalls(List activeMarginCalls) { this.activeMarginCalls = activeMarginCalls; } - public List getActiveLoans() { + public List getActiveLoans() { return activeLoans; } - public void setActiveLoans(List activeLoans) { + public void setActiveLoans(List activeLoans) { this.activeLoans = activeLoans; } @@ -154,46 +154,46 @@ public void setActiveLiquidation(ActiveLiquidationSummary activeLiquidation) { } public static class Builder { - private XmControlStatus controlStatus; + private XMControlStatus controlStatus; - private XmEntityCallStatus callStatus; + private XMEntityCallStatus callStatus; - private XmMarginLevel marginLevel; + private XMMarginLevel marginLevel; - private XmSummary marginSummary; + private XMSummary marginSummary; - private List activeMarginCalls; + private List activeMarginCalls; - private List activeLoans; + private List activeLoans; private ActiveLiquidationSummary activeLiquidation; - public Builder controlStatus(XmControlStatus controlStatus) { + public Builder controlStatus(XMControlStatus controlStatus) { this.controlStatus = controlStatus; return this; } - public Builder callStatus(XmEntityCallStatus callStatus) { + public Builder callStatus(XMEntityCallStatus callStatus) { this.callStatus = callStatus; return this; } - public Builder marginLevel(XmMarginLevel marginLevel) { + public Builder marginLevel(XMMarginLevel marginLevel) { this.marginLevel = marginLevel; return this; } - public Builder marginSummary(XmSummary marginSummary) { + public Builder marginSummary(XMSummary marginSummary) { this.marginSummary = marginSummary; return this; } - public Builder activeMarginCalls(List activeMarginCalls) { + public Builder activeMarginCalls(List activeMarginCalls) { this.activeMarginCalls = activeMarginCalls; return this; } - public Builder activeLoans(List activeLoans) { + public Builder activeLoans(List activeLoans) { this.activeLoans = activeLoans; return this; } diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java new file mode 100644 index 0000000..9f62f41 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java @@ -0,0 +1,117 @@ +/* + * 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; + +/** Breakdown of the components of derivatives equity. */ +public class CrossMarginPrimeDerivativesEquityBreakdown { + /** Derivatives cash balance component. */ + @JsonProperty("cash_balance") + private String cashBalance; + + /** Unrealized PnL component of derivatives equity. */ + @JsonProperty("unrealized_pnl") + private String unrealizedPnl; + + /** Realized PnL component of derivatives equity. */ + @JsonProperty("realized_pnl") + private String realizedPnl; + + /** Accrued funding PnL component of derivatives equity. */ + @JsonProperty("accrued_funding_pnl") + private String accruedFundingPnl; + + public CrossMarginPrimeDerivativesEquityBreakdown() {} + + public CrossMarginPrimeDerivativesEquityBreakdown(Builder builder) { + this.cashBalance = builder.cashBalance; + this.unrealizedPnl = builder.unrealizedPnl; + this.realizedPnl = builder.realizedPnl; + this.accruedFundingPnl = builder.accruedFundingPnl; + } + + public String getCashBalance() { + return cashBalance; + } + + public void setCashBalance(String cashBalance) { + this.cashBalance = cashBalance; + } + + public String getUnrealizedPnl() { + return unrealizedPnl; + } + + public void setUnrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + } + + public String getRealizedPnl() { + return realizedPnl; + } + + public void setRealizedPnl(String realizedPnl) { + this.realizedPnl = realizedPnl; + } + + public String getAccruedFundingPnl() { + return accruedFundingPnl; + } + + public void setAccruedFundingPnl(String accruedFundingPnl) { + this.accruedFundingPnl = accruedFundingPnl; + } + + public static class Builder { + private String cashBalance; + + private String unrealizedPnl; + + private String realizedPnl; + + private String accruedFundingPnl; + + public Builder cashBalance(String cashBalance) { + this.cashBalance = cashBalance; + return this; + } + + public Builder unrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + return this; + } + + public Builder realizedPnl(String realizedPnl) { + this.realizedPnl = realizedPnl; + return this; + } + + public Builder accruedFundingPnl(String accruedFundingPnl) { + this.accruedFundingPnl = accruedFundingPnl; + return this; + } + + public CrossMarginPrimeDerivativesEquityBreakdown build() { + return new CrossMarginPrimeDerivativesEquityBreakdown(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java index 27828ba..c41bdba 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java @@ -1,37 +1,49 @@ /* * 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 + * 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. + * 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.coinbase.prime.model.enums.PrimeXMHealthStatus; +import com.coinbase.prime.model.enums.PrimeXMMarginRequirementType; import com.fasterxml.jackson.annotation.JsonProperty; -/** Cross-margin account summary and nested breakdowns. */ -@JsonInclude(JsonInclude.Include.NON_NULL) /** Cross-margin account summary and nested breakdowns. */ public class CrossMarginPrimeMarginSummary { /** Cross Margin Margin Requirement (XMMR) notional. */ @JsonProperty("margin_requirement") private String marginRequirement; + /** + * - MARGIN_REQUIREMENT_TYPE_DMR_PLUS_PMR: Integrated (netted) cross-margin requirement for spot + * assets and all derivatives contracts. - MARGIN_REQUIREMENT_TYPE_IPMR_PLUS_IFMR: Combined + * cross-margin requirement: Integrated Portfolio Margin (IPMR) plus Ineligible Futures Margin + * (IFMR). + */ + @JsonProperty("margin_requirement_type") + private PrimeXMMarginRequirementType marginRequirementType; + /** Equity notional. */ @JsonProperty("account_equity") private String accountEquity; - /** Equity - XMMR (margin excess is > 0). */ + /** Equity - XMMR (margin excess is > 0). */ @JsonProperty("margin_excess_shortfall") private String marginExcessShortfall; @@ -75,6 +87,37 @@ public class CrossMarginPrimeMarginSummary { @JsonProperty("gross_leverage") private String grossLeverage; + /** Breakdown of the components of spot equity. */ + @JsonProperty("spot_equity_breakdown") + private CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown; + + /** Breakdown of the components of derivatives equity. */ + @JsonProperty("derivatives_equity_breakdown") + private CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown; + + /** Groups XM margin requirement components, offset credits, and per-asset rows. */ + @JsonProperty("risk_netting_info") + private CrossMarginPrimeRiskNettingInfo riskNettingInfo; + + /** + * - HEALTH_STATUS_HEALTHY: Margin level is healthy. - HEALTH_STATUS_WARNING: Margin level is + * breaching the warning threshold (WT) which will result in the issuance of a Margin Call if this + * is still the case by the scheduled next Margin Call (as defined in the margin methodology). WT + * is differentiated from DT in that it means margin health is approaching the UMCT. - + * HEALTH_STATUS_CRITICAL: Margin level is breaching the UMCT and, as defined in the margin + * methodology, this will trigger an urgent margin call. - HEALTH_STATUS_SUSPENDED: Trading and + * withdrawals are suspended per XM margin methodology. - HEALTH_STATUS_RESTRICTED: Account is in + * a restricted state per XM margin methodology. - HEALTH_STATUS_PRE_LIQUIDATION: Margin level is + * breaching the liquidation threshold (LT) and, as defined in the margin methodology, this will + * trigger the SESSION_LOCKED control status and liquidation may commence. - + * HEALTH_STATUS_LIQUIDATING: Liquidation has commenced. - HEALTH_STATUS_IN_DEFICIT: Margin level + * is breaching the deficit threshold (DT) which will result in the issuance of a Margin Call if + * this is still the case by the scheduled next Margin Call time (as defined in the margin + * methodology). + */ + @JsonProperty("health_status") + private PrimeXMHealthStatus healthStatus; + /** Equity ratio. */ @JsonProperty("equity_ratio") private String equityRatio; @@ -83,12 +126,40 @@ public class CrossMarginPrimeMarginSummary { @JsonProperty("deficit_ratio") private String deficitRatio; + @JsonProperty("margin_thresholds") + private PrimeXMMarginCallThresholds marginThresholds; + /** FCM excess available to return. */ @JsonProperty("fcm_excess_available_to_return") private String fcmExcessAvailableToReturn; public CrossMarginPrimeMarginSummary() {} + public CrossMarginPrimeMarginSummary(Builder builder) { + this.marginRequirement = builder.marginRequirement; + this.marginRequirementType = builder.marginRequirementType; + this.accountEquity = builder.accountEquity; + this.marginExcessShortfall = builder.marginExcessShortfall; + this.consumedCredit = builder.consumedCredit; + this.xmCreditLimit = builder.xmCreditLimit; + this.xmMarginLimit = builder.xmMarginLimit; + this.consumedMarginLimit = builder.consumedMarginLimit; + this.spotEquity = builder.spotEquity; + this.futuresEquity = builder.futuresEquity; + this.grossMarketValue = builder.grossMarketValue; + this.netMarketValue = builder.netMarketValue; + this.netExposure = builder.netExposure; + this.grossLeverage = builder.grossLeverage; + this.spotEquityBreakdown = builder.spotEquityBreakdown; + this.derivativesEquityBreakdown = builder.derivativesEquityBreakdown; + this.riskNettingInfo = builder.riskNettingInfo; + this.healthStatus = builder.healthStatus; + this.equityRatio = builder.equityRatio; + this.deficitRatio = builder.deficitRatio; + this.marginThresholds = builder.marginThresholds; + this.fcmExcessAvailableToReturn = builder.fcmExcessAvailableToReturn; + } + public String getMarginRequirement() { return marginRequirement; } @@ -97,6 +168,14 @@ public void setMarginRequirement(String marginRequirement) { this.marginRequirement = marginRequirement; } + public PrimeXMMarginRequirementType getMarginRequirementType() { + return marginRequirementType; + } + + public void setMarginRequirementType(PrimeXMMarginRequirementType marginRequirementType) { + this.marginRequirementType = marginRequirementType; + } + public String getAccountEquity() { return accountEquity; } @@ -193,6 +272,39 @@ public void setGrossLeverage(String grossLeverage) { this.grossLeverage = grossLeverage; } + public CrossMarginPrimeSpotEquityBreakdown getSpotEquityBreakdown() { + return spotEquityBreakdown; + } + + public void setSpotEquityBreakdown(CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown) { + this.spotEquityBreakdown = spotEquityBreakdown; + } + + public CrossMarginPrimeDerivativesEquityBreakdown getDerivativesEquityBreakdown() { + return derivativesEquityBreakdown; + } + + public void setDerivativesEquityBreakdown( + CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown) { + this.derivativesEquityBreakdown = derivativesEquityBreakdown; + } + + public CrossMarginPrimeRiskNettingInfo getRiskNettingInfo() { + return riskNettingInfo; + } + + public void setRiskNettingInfo(CrossMarginPrimeRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; + } + + public PrimeXMHealthStatus getHealthStatus() { + return healthStatus; + } + + public void setHealthStatus(PrimeXMHealthStatus healthStatus) { + this.healthStatus = healthStatus; + } + public String getEquityRatio() { return equityRatio; } @@ -209,6 +321,14 @@ public void setDeficitRatio(String deficitRatio) { this.deficitRatio = deficitRatio; } + public PrimeXMMarginCallThresholds getMarginThresholds() { + return marginThresholds; + } + + public void setMarginThresholds(PrimeXMMarginCallThresholds marginThresholds) { + this.marginThresholds = marginThresholds; + } + public String getFcmExcessAvailableToReturn() { return fcmExcessAvailableToReturn; } @@ -216,4 +336,165 @@ public String getFcmExcessAvailableToReturn() { public void setFcmExcessAvailableToReturn(String fcmExcessAvailableToReturn) { this.fcmExcessAvailableToReturn = fcmExcessAvailableToReturn; } + + public static class Builder { + private String marginRequirement; + + private PrimeXMMarginRequirementType marginRequirementType; + + private String accountEquity; + + private String marginExcessShortfall; + + private String consumedCredit; + + private String xmCreditLimit; + + private String xmMarginLimit; + + private String consumedMarginLimit; + + private String spotEquity; + + private String futuresEquity; + + private String grossMarketValue; + + private String netMarketValue; + + private String netExposure; + + private String grossLeverage; + + private CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown; + + private CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown; + + private CrossMarginPrimeRiskNettingInfo riskNettingInfo; + + private PrimeXMHealthStatus healthStatus; + + private String equityRatio; + + private String deficitRatio; + + private PrimeXMMarginCallThresholds marginThresholds; + + private String fcmExcessAvailableToReturn; + + public Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + return this; + } + + public Builder marginRequirementType(PrimeXMMarginRequirementType marginRequirementType) { + this.marginRequirementType = marginRequirementType; + return this; + } + + public Builder accountEquity(String accountEquity) { + this.accountEquity = accountEquity; + return this; + } + + public Builder marginExcessShortfall(String marginExcessShortfall) { + this.marginExcessShortfall = marginExcessShortfall; + return this; + } + + public Builder consumedCredit(String consumedCredit) { + this.consumedCredit = consumedCredit; + return this; + } + + public Builder xmCreditLimit(String xmCreditLimit) { + this.xmCreditLimit = xmCreditLimit; + return this; + } + + public Builder xmMarginLimit(String xmMarginLimit) { + this.xmMarginLimit = xmMarginLimit; + return this; + } + + public Builder consumedMarginLimit(String consumedMarginLimit) { + this.consumedMarginLimit = consumedMarginLimit; + return this; + } + + public Builder spotEquity(String spotEquity) { + this.spotEquity = spotEquity; + return this; + } + + public Builder futuresEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + return this; + } + + public Builder grossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + return this; + } + + public Builder netMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + return this; + } + + public Builder netExposure(String netExposure) { + this.netExposure = netExposure; + return this; + } + + public Builder grossLeverage(String grossLeverage) { + this.grossLeverage = grossLeverage; + return this; + } + + public Builder spotEquityBreakdown(CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown) { + this.spotEquityBreakdown = spotEquityBreakdown; + return this; + } + + public Builder derivativesEquityBreakdown( + CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown) { + this.derivativesEquityBreakdown = derivativesEquityBreakdown; + return this; + } + + public Builder riskNettingInfo(CrossMarginPrimeRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; + return this; + } + + public Builder healthStatus(PrimeXMHealthStatus healthStatus) { + this.healthStatus = healthStatus; + return this; + } + + public Builder equityRatio(String equityRatio) { + this.equityRatio = equityRatio; + return this; + } + + public Builder deficitRatio(String deficitRatio) { + this.deficitRatio = deficitRatio; + return this; + } + + public Builder marginThresholds(PrimeXMMarginCallThresholds marginThresholds) { + this.marginThresholds = marginThresholds; + return this; + } + + public Builder fcmExcessAvailableToReturn(String fcmExcessAvailableToReturn) { + this.fcmExcessAvailableToReturn = fcmExcessAvailableToReturn; + return this; + } + + public CrossMarginPrimeMarginSummary build() { + return new CrossMarginPrimeMarginSummary(this); + } + } } diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java new file mode 100644 index 0000000..714aaf1 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java @@ -0,0 +1,234 @@ +/* + * 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; +import java.util.List; + +/** Groups XM margin requirement components, offset credits, and per-asset rows. */ +public class CrossMarginPrimeRiskNettingInfo { + /** + * Derivatives Clearing Organization Margin Requirement (DMR) is the margin requirement for all + * futures positions, derived from the Derivatives Clearing Organization model + */ + @JsonProperty("dco_margin_requirement") + private String dcoMarginRequirement; + + /** + * Portfolio Margin Requirement (PMR) is the margin requirement for all spot positions, derived + * from the XM model + */ + @JsonProperty("portfolio_margin_requirement") + private String portfolioMarginRequirement; + + /** + * Integrated Portfolio Margin Requirement (IPMR) is the margin requirement for all spot positions + * + futures positions with underlying assets eligible in Portfolio Margin. + */ + @JsonProperty("integrated_portfolio_margin_requirement") + private String integratedPortfolioMarginRequirement; + + /** + * Ineligible Futures Margin Requirement (IFMR) is the margin requirement for IPMR-ineligible + * futures contracts + */ + @JsonProperty("ineligible_futures_margin_requirement") + private String ineligibleFuturesMarginRequirement; + + @JsonProperty("pmr_breakdown") + private PrimeXMMarginRequirementBreakdown pmrBreakdown; + + @JsonProperty("ipmr_breakdown") + private PrimeXMMarginRequirementBreakdown ipmrBreakdown; + + @JsonProperty("portfolio_margin_offset_credit_breakdown") + private PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown; + + @JsonProperty("integrated_portfolio_margin_offset_credit_breakdown") + private PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown; + + /** Netted positions used in the model calculation. */ + @JsonProperty("xm_positions") + private List xmPositions; + + public CrossMarginPrimeRiskNettingInfo() {} + + public CrossMarginPrimeRiskNettingInfo(Builder builder) { + this.dcoMarginRequirement = builder.dcoMarginRequirement; + this.portfolioMarginRequirement = builder.portfolioMarginRequirement; + this.integratedPortfolioMarginRequirement = builder.integratedPortfolioMarginRequirement; + this.ineligibleFuturesMarginRequirement = builder.ineligibleFuturesMarginRequirement; + this.pmrBreakdown = builder.pmrBreakdown; + this.ipmrBreakdown = builder.ipmrBreakdown; + this.portfolioMarginOffsetCreditBreakdown = builder.portfolioMarginOffsetCreditBreakdown; + this.integratedPortfolioMarginOffsetCreditBreakdown = + builder.integratedPortfolioMarginOffsetCreditBreakdown; + this.xmPositions = builder.xmPositions; + } + + public String getDcoMarginRequirement() { + return dcoMarginRequirement; + } + + public void setDcoMarginRequirement(String dcoMarginRequirement) { + this.dcoMarginRequirement = dcoMarginRequirement; + } + + public String getPortfolioMarginRequirement() { + return portfolioMarginRequirement; + } + + public void setPortfolioMarginRequirement(String portfolioMarginRequirement) { + this.portfolioMarginRequirement = portfolioMarginRequirement; + } + + public String getIntegratedPortfolioMarginRequirement() { + return integratedPortfolioMarginRequirement; + } + + public void setIntegratedPortfolioMarginRequirement(String integratedPortfolioMarginRequirement) { + this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; + } + + public String getIneligibleFuturesMarginRequirement() { + return ineligibleFuturesMarginRequirement; + } + + public void setIneligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { + this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; + } + + public PrimeXMMarginRequirementBreakdown getPmrBreakdown() { + return pmrBreakdown; + } + + public void setPmrBreakdown(PrimeXMMarginRequirementBreakdown pmrBreakdown) { + this.pmrBreakdown = pmrBreakdown; + } + + public PrimeXMMarginRequirementBreakdown getIpmrBreakdown() { + return ipmrBreakdown; + } + + public void setIpmrBreakdown(PrimeXMMarginRequirementBreakdown ipmrBreakdown) { + this.ipmrBreakdown = ipmrBreakdown; + } + + public PrimeXMOffsetCreditBreakdown getPortfolioMarginOffsetCreditBreakdown() { + return portfolioMarginOffsetCreditBreakdown; + } + + public void setPortfolioMarginOffsetCreditBreakdown( + PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown) { + this.portfolioMarginOffsetCreditBreakdown = portfolioMarginOffsetCreditBreakdown; + } + + public PrimeXMOffsetCreditBreakdown getIntegratedPortfolioMarginOffsetCreditBreakdown() { + return integratedPortfolioMarginOffsetCreditBreakdown; + } + + public void setIntegratedPortfolioMarginOffsetCreditBreakdown( + PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown) { + this.integratedPortfolioMarginOffsetCreditBreakdown = + integratedPortfolioMarginOffsetCreditBreakdown; + } + + public List getXmPositions() { + return xmPositions; + } + + public void setXmPositions(List xmPositions) { + this.xmPositions = xmPositions; + } + + public static class Builder { + private String dcoMarginRequirement; + + private String portfolioMarginRequirement; + + private String integratedPortfolioMarginRequirement; + + private String ineligibleFuturesMarginRequirement; + + private PrimeXMMarginRequirementBreakdown pmrBreakdown; + + private PrimeXMMarginRequirementBreakdown ipmrBreakdown; + + private PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown; + + private PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown; + + private List xmPositions; + + public Builder dcoMarginRequirement(String dcoMarginRequirement) { + this.dcoMarginRequirement = dcoMarginRequirement; + return this; + } + + public Builder portfolioMarginRequirement(String portfolioMarginRequirement) { + this.portfolioMarginRequirement = portfolioMarginRequirement; + return this; + } + + public Builder integratedPortfolioMarginRequirement( + String integratedPortfolioMarginRequirement) { + this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; + return this; + } + + public Builder ineligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { + this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; + return this; + } + + public Builder pmrBreakdown(PrimeXMMarginRequirementBreakdown pmrBreakdown) { + this.pmrBreakdown = pmrBreakdown; + return this; + } + + public Builder ipmrBreakdown(PrimeXMMarginRequirementBreakdown ipmrBreakdown) { + this.ipmrBreakdown = ipmrBreakdown; + return this; + } + + public Builder portfolioMarginOffsetCreditBreakdown( + PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown) { + this.portfolioMarginOffsetCreditBreakdown = portfolioMarginOffsetCreditBreakdown; + return this; + } + + public Builder integratedPortfolioMarginOffsetCreditBreakdown( + PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown) { + this.integratedPortfolioMarginOffsetCreditBreakdown = + integratedPortfolioMarginOffsetCreditBreakdown; + return this; + } + + public Builder xmPositions(List xmPositions) { + this.xmPositions = xmPositions; + return this; + } + + public CrossMarginPrimeRiskNettingInfo build() { + return new CrossMarginPrimeRiskNettingInfo(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java new file mode 100644 index 0000000..b2d1f41 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java @@ -0,0 +1,137 @@ +/* + * 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; + +/** Breakdown of the components of spot equity. */ +public class CrossMarginPrimeSpotEquityBreakdown { + /** PM cash balance component of spot equity. */ + @JsonProperty("cash_balance") + private String cashBalance; + + /** Long market value component of spot equity. */ + @JsonProperty("long_market_value") + private String longMarketValue; + + /** Short market value component of spot equity. */ + @JsonProperty("short_market_value") + private String shortMarketValue; + + /** Short collateral component of spot equity. */ + @JsonProperty("short_collateral") + private String shortCollateral; + + /** Pending transfers affecting spot equity. */ + @JsonProperty("pending_transfers") + private String pendingTransfers; + + public CrossMarginPrimeSpotEquityBreakdown() {} + + public CrossMarginPrimeSpotEquityBreakdown(Builder builder) { + this.cashBalance = builder.cashBalance; + this.longMarketValue = builder.longMarketValue; + this.shortMarketValue = builder.shortMarketValue; + this.shortCollateral = builder.shortCollateral; + this.pendingTransfers = builder.pendingTransfers; + } + + public String getCashBalance() { + return cashBalance; + } + + public void setCashBalance(String cashBalance) { + this.cashBalance = cashBalance; + } + + public String getLongMarketValue() { + return longMarketValue; + } + + public void setLongMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + } + + public String getShortMarketValue() { + return shortMarketValue; + } + + public void setShortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + } + + public String getShortCollateral() { + return shortCollateral; + } + + public void setShortCollateral(String shortCollateral) { + this.shortCollateral = shortCollateral; + } + + public String getPendingTransfers() { + return pendingTransfers; + } + + public void setPendingTransfers(String pendingTransfers) { + this.pendingTransfers = pendingTransfers; + } + + public static class Builder { + private String cashBalance; + + private String longMarketValue; + + private String shortMarketValue; + + private String shortCollateral; + + private String pendingTransfers; + + public Builder cashBalance(String cashBalance) { + this.cashBalance = cashBalance; + return this; + } + + public Builder longMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + return this; + } + + public Builder shortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + return this; + } + + public Builder shortCollateral(String shortCollateral) { + this.shortCollateral = shortCollateral; + return this; + } + + public Builder pendingTransfers(String pendingTransfers) { + this.pendingTransfers = pendingTransfers; + return this; + } + + public CrossMarginPrimeSpotEquityBreakdown build() { + return new CrossMarginPrimeSpotEquityBreakdown(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java new file mode 100644 index 0000000..6e213d2 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java @@ -0,0 +1,339 @@ +/* + * 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; + +/** + * CrossMarginPrimeXMPosition is a single per-asset XM row (proto-backed fields from + * XMPositionDetails). + */ +public class CrossMarginPrimeXMPosition { + /** Position currency */ + private String currency; + + /** Current market price */ + @JsonProperty("market_price") + private String marketPrice; + + /** XM spot balance nominal */ + @JsonProperty("spot_balance") + private String spotBalance; + + /** XM spot balance notional */ + @JsonProperty("spot_balance_notional") + private String spotBalanceNotional; + + /** XM futures balance nominal */ + @JsonProperty("futures_balance") + private String futuresBalance; + + /** XM futures balance notional */ + @JsonProperty("futures_balance_notional") + private String futuresBalanceNotional; + + /** Base margin requirement notional */ + @JsonProperty("base_requirement") + private String baseRequirement; + + /** Total margin required */ + @JsonProperty("total_position_margin") + private String totalPositionMargin; + + /** Basis offset credit applied to this asset row. */ + @JsonProperty("basis_credit") + private String basisCredit; + + /** Post-netting USD notional for futures on this asset */ + @JsonProperty("futures_netted_notional") + private String futuresNettedNotional; + + /** Margin attributed to futures netting for this asset row. */ + @JsonProperty("futures_netting_margin") + private String futuresNettingMargin; + + /** Per-asset long amount from position_summary. */ + @JsonProperty("long_amount") + private String longAmount; + + /** Per-asset short amount from position_summary. */ + @JsonProperty("short_amount") + private String shortAmount; + + /** Volatility margin add-on for this asset. */ + @JsonProperty("volatility_addon") + private String volatilityAddon; + + /** Liquidity margin add-on for this asset. */ + @JsonProperty("liquidity_addon") + private String liquidityAddon; + + public CrossMarginPrimeXMPosition() {} + + public CrossMarginPrimeXMPosition(Builder builder) { + this.currency = builder.currency; + this.marketPrice = builder.marketPrice; + this.spotBalance = builder.spotBalance; + this.spotBalanceNotional = builder.spotBalanceNotional; + this.futuresBalance = builder.futuresBalance; + this.futuresBalanceNotional = builder.futuresBalanceNotional; + this.baseRequirement = builder.baseRequirement; + this.totalPositionMargin = builder.totalPositionMargin; + this.basisCredit = builder.basisCredit; + this.futuresNettedNotional = builder.futuresNettedNotional; + this.futuresNettingMargin = builder.futuresNettingMargin; + this.longAmount = builder.longAmount; + this.shortAmount = builder.shortAmount; + this.volatilityAddon = builder.volatilityAddon; + this.liquidityAddon = builder.liquidityAddon; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getMarketPrice() { + return marketPrice; + } + + public void setMarketPrice(String marketPrice) { + this.marketPrice = marketPrice; + } + + public String getSpotBalance() { + return spotBalance; + } + + public void setSpotBalance(String spotBalance) { + this.spotBalance = spotBalance; + } + + public String getSpotBalanceNotional() { + return spotBalanceNotional; + } + + public void setSpotBalanceNotional(String spotBalanceNotional) { + this.spotBalanceNotional = spotBalanceNotional; + } + + public String getFuturesBalance() { + return futuresBalance; + } + + public void setFuturesBalance(String futuresBalance) { + this.futuresBalance = futuresBalance; + } + + public String getFuturesBalanceNotional() { + return futuresBalanceNotional; + } + + public void setFuturesBalanceNotional(String futuresBalanceNotional) { + this.futuresBalanceNotional = futuresBalanceNotional; + } + + public String getBaseRequirement() { + return baseRequirement; + } + + public void setBaseRequirement(String baseRequirement) { + this.baseRequirement = baseRequirement; + } + + public String getTotalPositionMargin() { + return totalPositionMargin; + } + + public void setTotalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + } + + public String getBasisCredit() { + return basisCredit; + } + + public void setBasisCredit(String basisCredit) { + this.basisCredit = basisCredit; + } + + public String getFuturesNettedNotional() { + return futuresNettedNotional; + } + + public void setFuturesNettedNotional(String futuresNettedNotional) { + this.futuresNettedNotional = futuresNettedNotional; + } + + public String getFuturesNettingMargin() { + return futuresNettingMargin; + } + + public void setFuturesNettingMargin(String futuresNettingMargin) { + this.futuresNettingMargin = futuresNettingMargin; + } + + public String getLongAmount() { + return longAmount; + } + + public void setLongAmount(String longAmount) { + this.longAmount = longAmount; + } + + public String getShortAmount() { + return shortAmount; + } + + public void setShortAmount(String shortAmount) { + this.shortAmount = shortAmount; + } + + public String getVolatilityAddon() { + return volatilityAddon; + } + + public void setVolatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + } + + public String getLiquidityAddon() { + return liquidityAddon; + } + + public void setLiquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + } + + public static class Builder { + private String currency; + + private String marketPrice; + + private String spotBalance; + + private String spotBalanceNotional; + + private String futuresBalance; + + private String futuresBalanceNotional; + + private String baseRequirement; + + private String totalPositionMargin; + + private String basisCredit; + + private String futuresNettedNotional; + + private String futuresNettingMargin; + + private String longAmount; + + private String shortAmount; + + private String volatilityAddon; + + private String liquidityAddon; + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + public Builder marketPrice(String marketPrice) { + this.marketPrice = marketPrice; + return this; + } + + public Builder spotBalance(String spotBalance) { + this.spotBalance = spotBalance; + return this; + } + + public Builder spotBalanceNotional(String spotBalanceNotional) { + this.spotBalanceNotional = spotBalanceNotional; + return this; + } + + public Builder futuresBalance(String futuresBalance) { + this.futuresBalance = futuresBalance; + return this; + } + + public Builder futuresBalanceNotional(String futuresBalanceNotional) { + this.futuresBalanceNotional = futuresBalanceNotional; + return this; + } + + public Builder baseRequirement(String baseRequirement) { + this.baseRequirement = baseRequirement; + return this; + } + + public Builder totalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + return this; + } + + public Builder basisCredit(String basisCredit) { + this.basisCredit = basisCredit; + return this; + } + + public Builder futuresNettedNotional(String futuresNettedNotional) { + this.futuresNettedNotional = futuresNettedNotional; + return this; + } + + public Builder futuresNettingMargin(String futuresNettingMargin) { + this.futuresNettingMargin = futuresNettingMargin; + return this; + } + + public Builder longAmount(String longAmount) { + this.longAmount = longAmount; + return this; + } + + public Builder shortAmount(String shortAmount) { + this.shortAmount = shortAmount; + return this; + } + + public Builder volatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + return this; + } + + public Builder liquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + return this; + } + + public CrossMarginPrimeXMPosition build() { + return new CrossMarginPrimeXMPosition(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java b/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java index 379f3e5..954f388 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java @@ -1,26 +1,27 @@ /* * 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 + * 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. + * 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; -/** XM 2.0 risk parameters for an asset tier. */ -@JsonInclude(JsonInclude.Include.NON_NULL) /** XM 2.0 risk parameters for an asset tier. */ public class CrossMarginRiskParameters { /** Asset tier identifier. */ @@ -71,6 +72,23 @@ public class CrossMarginRiskParameters { @JsonProperty("basis_offset_credit_rate") private String basisOffsetCreditRate; + public CrossMarginRiskParameters() {} + + public CrossMarginRiskParameters(Builder builder) { + this.assetTier = builder.assetTier; + this.baseRatioLong = builder.baseRatioLong; + this.baseRatioShort = builder.baseRatioShort; + this.volatilityRateLong = builder.volatilityRateLong; + this.volatilityRateShort = builder.volatilityRateShort; + this.volatilityLowThreshold = builder.volatilityLowThreshold; + this.volatilityHighThreshold = builder.volatilityHighThreshold; + this.liquidityALong = builder.liquidityALong; + this.liquidityAShort = builder.liquidityAShort; + this.liquidityBShort = builder.liquidityBShort; + this.liquidityThreshold = builder.liquidityThreshold; + this.basisOffsetCreditRate = builder.basisOffsetCreditRate; + } + public String getAssetTier() { return assetTier; } @@ -166,4 +184,94 @@ public String getBasisOffsetCreditRate() { public void setBasisOffsetCreditRate(String basisOffsetCreditRate) { this.basisOffsetCreditRate = basisOffsetCreditRate; } + + public static class Builder { + private String assetTier; + + private String baseRatioLong; + + private String baseRatioShort; + + private String volatilityRateLong; + + private String volatilityRateShort; + + private String volatilityLowThreshold; + + private String volatilityHighThreshold; + + private String liquidityALong; + + private String liquidityAShort; + + private String liquidityBShort; + + private String liquidityThreshold; + + private String basisOffsetCreditRate; + + public Builder assetTier(String assetTier) { + this.assetTier = assetTier; + return this; + } + + public Builder baseRatioLong(String baseRatioLong) { + this.baseRatioLong = baseRatioLong; + return this; + } + + public Builder baseRatioShort(String baseRatioShort) { + this.baseRatioShort = baseRatioShort; + return this; + } + + public Builder volatilityRateLong(String volatilityRateLong) { + this.volatilityRateLong = volatilityRateLong; + return this; + } + + public Builder volatilityRateShort(String volatilityRateShort) { + this.volatilityRateShort = volatilityRateShort; + return this; + } + + public Builder volatilityLowThreshold(String volatilityLowThreshold) { + this.volatilityLowThreshold = volatilityLowThreshold; + return this; + } + + public Builder volatilityHighThreshold(String volatilityHighThreshold) { + this.volatilityHighThreshold = volatilityHighThreshold; + return this; + } + + public Builder liquidityALong(String liquidityALong) { + this.liquidityALong = liquidityALong; + return this; + } + + public Builder liquidityAShort(String liquidityAShort) { + this.liquidityAShort = liquidityAShort; + return this; + } + + public Builder liquidityBShort(String liquidityBShort) { + this.liquidityBShort = liquidityBShort; + return this; + } + + public Builder liquidityThreshold(String liquidityThreshold) { + this.liquidityThreshold = liquidityThreshold; + return this; + } + + public Builder basisOffsetCreditRate(String basisOffsetCreditRate) { + this.basisOffsetCreditRate = basisOffsetCreditRate; + return this; + } + + public CrossMarginRiskParameters build() { + return new CrossMarginRiskParameters(this); + } + } } diff --git a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java new file mode 100644 index 0000000..9b4f098 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java @@ -0,0 +1,77 @@ +/* + * 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; + +/** Details for a custom stablecoin reward payout transaction */ +public class CustomStablecoinRewardDetails { + /** ISO-formatted start date of the reward period (e.g. 2025-02-01T00:00:00Z) */ + @JsonProperty("start_date") + private String startDate; + + /** ISO-formatted end date of the reward period (e.g. 2025-02-28T00:00:00Z) */ + @JsonProperty("end_date") + private String endDate; + + public CustomStablecoinRewardDetails() {} + + public CustomStablecoinRewardDetails(Builder builder) { + this.startDate = builder.startDate; + this.endDate = builder.endDate; + } + + public String getStartDate() { + return startDate; + } + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + public static class Builder { + private String startDate; + + private String endDate; + + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } + + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } + + public CustomStablecoinRewardDetails build() { + return new CustomStablecoinRewardDetails(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/DateOfBirth.java b/src/main/java/com/coinbase/prime/model/DateOfBirth.java index 4b63c47..d8b0ee4 100644 --- a/src/main/java/com/coinbase/prime/model/DateOfBirth.java +++ b/src/main/java/com/coinbase/prime/model/DateOfBirth.java @@ -20,17 +20,18 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class DateOfBirth { - @JsonProperty("year") - private Long year; + /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ + private Integer year; - @JsonProperty("month") - private Long month; + /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ + private Integer month; - @JsonProperty("day") - private Long day; + /** + * 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. + */ + private Integer day; public DateOfBirth() {} @@ -40,48 +41,48 @@ public DateOfBirth(Builder builder) { this.day = builder.day; } - public Long getYear() { + public Integer getYear() { return year; } - public void setYear(Long year) { + public void setYear(Integer year) { this.year = year; } - public Long getMonth() { + public Integer getMonth() { return month; } - public void setMonth(Long month) { + public void setMonth(Integer month) { this.month = month; } - public Long getDay() { + public Integer getDay() { return day; } - public void setDay(Long day) { + public void setDay(Integer day) { this.day = day; } public static class Builder { - private Long year; + private Integer year; - private Long month; + private Integer month; - private Long day; + private Integer day; - public Builder year(Long year) { + public Builder year(Integer year) { this.year = year; return this; } - public Builder month(Long month) { + public Builder month(Integer month) { this.month = month; return this; } - public Builder day(Long day) { + public Builder day(Integer day) { this.day = day; return this; } diff --git a/src/main/java/com/coinbase/prime/model/DefiBalance.java b/src/main/java/com/coinbase/prime/model/DefiBalance.java index 8a3666c..033e0ee 100644 --- a/src/main/java/com/coinbase/prime/model/DefiBalance.java +++ b/src/main/java/com/coinbase/prime/model/DefiBalance.java @@ -24,11 +24,9 @@ public class DefiBalance { /** Network this asset is on (ie "ethereum-mainnet") */ - @JsonProperty("network") private String network; /** a set of rules and standards that define how data is exchanged (ie "Aave V4 ") */ - @JsonProperty("protocol") private String protocol; /** Total USD value */ diff --git a/src/main/java/com/coinbase/prime/model/DetailedAddress.java b/src/main/java/com/coinbase/prime/model/DetailedAddress.java index ca25dd1..54d3180 100644 --- a/src/main/java/com/coinbase/prime/model/DetailedAddress.java +++ b/src/main/java/com/coinbase/prime/model/DetailedAddress.java @@ -37,11 +37,9 @@ public class DetailedAddress { private String address3; /** City name */ - @JsonProperty("city") private String city; /** State or province */ - @JsonProperty("state") private String state; /** ISO 3166-1 alpha-2 country code */ diff --git a/src/main/java/com/coinbase/prime/model/DisplayUser.java b/src/main/java/com/coinbase/prime/model/DisplayUser.java index 6c9d174..da34c3d 100644 --- a/src/main/java/com/coinbase/prime/model/DisplayUser.java +++ b/src/main/java/com/coinbase/prime/model/DisplayUser.java @@ -24,11 +24,9 @@ public class DisplayUser { /** User UUID */ - @JsonProperty("id") private String id; /** User full name */ - @JsonProperty("name") private String name; /** User avatar URL */ diff --git a/src/main/java/com/coinbase/prime/model/EntityBalance.java b/src/main/java/com/coinbase/prime/model/EntityBalance.java index 8ae6195..8af893f 100644 --- a/src/main/java/com/coinbase/prime/model/EntityBalance.java +++ b/src/main/java/com/coinbase/prime/model/EntityBalance.java @@ -24,7 +24,6 @@ public class EntityBalance { /** The display symbol for the asset */ - @JsonProperty("symbol") private String symbol; /** The long balance */ diff --git a/src/main/java/com/coinbase/prime/model/EntityUser.java b/src/main/java/com/coinbase/prime/model/EntityUser.java index 71f99b2..a5ce62a 100644 --- a/src/main/java/com/coinbase/prime/model/EntityUser.java +++ b/src/main/java/com/coinbase/prime/model/EntityUser.java @@ -27,15 +27,12 @@ public class EntityUser { /** The unique ID of the user */ - @JsonProperty("id") private String id; /** The name of the user */ - @JsonProperty("name") private String name; /** The email of the user */ - @JsonProperty("email") private String email; /** The entity to which this user and associated permissions are identified */ @@ -48,11 +45,9 @@ public class EntityUser { * with full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A * tax manager - BUSINESS_MANAGER: A business manager */ - @JsonProperty("role") private UserRole role; /** All primary roles assigned to the user. */ - @JsonProperty("roles") private List roles; /** All secondary permissions assigned to the user. */ diff --git a/src/main/java/com/coinbase/prime/model/ExistingLocate.java b/src/main/java/com/coinbase/prime/model/ExistingLocate.java index 4124c03..3295184 100644 --- a/src/main/java/com/coinbase/prime/model/ExistingLocate.java +++ b/src/main/java/com/coinbase/prime/model/ExistingLocate.java @@ -36,7 +36,6 @@ public class ExistingLocate { private String portfolioId; /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** The requested locate amount */ @@ -48,7 +47,6 @@ public class ExistingLocate { private String interestRate; /** The locate status */ - @JsonProperty("status") private String status; /** The approved locate amount */ diff --git a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java index abfb1e9..687ccee 100644 --- a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java @@ -26,10 +26,8 @@ import java.time.OffsetDateTime; public class FcmMarginCall { - @JsonProperty("type") private FcmMarginCallType type; - @JsonProperty("state") private FcmMarginCallState state; /** Initial margin call amount to settle */ diff --git a/src/main/java/com/coinbase/prime/model/FcmPosition.java b/src/main/java/com/coinbase/prime/model/FcmPosition.java index 5b088cf..4302fbc 100644 --- a/src/main/java/com/coinbase/prime/model/FcmPosition.java +++ b/src/main/java/com/coinbase/prime/model/FcmPosition.java @@ -29,7 +29,6 @@ public class FcmPosition { @JsonProperty("product_id") private String productId; - @JsonProperty("side") private FcmPositionSide side; /** Number of contracts */ diff --git a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java index a259c6a..90f1961 100644 --- a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java +++ b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java @@ -63,7 +63,6 @@ public class FcmTradingSessionDetails { private FcmTradingSessionClosedReason closedReason; /** FcmScheduledMaintenance contains scheduled maintenance window information */ - @JsonProperty("maintenance") private FcmScheduledMaintenance maintenance; /** Settlement timestamp from previous trading day */ diff --git a/src/main/java/com/coinbase/prime/model/Fill.java b/src/main/java/com/coinbase/prime/model/Fill.java index ddc87c6..051b7ad 100644 --- a/src/main/java/com/coinbase/prime/model/Fill.java +++ b/src/main/java/com/coinbase/prime/model/Fill.java @@ -27,7 +27,6 @@ public class Fill { /** The unique ID of the fill */ - @JsonProperty("id") private String id; /** The order ID of the fill */ @@ -43,7 +42,6 @@ public class Fill { private String clientProductId; /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ - @JsonProperty("side") private OrderSide side; /** Filled size (in base asset units) */ @@ -55,19 +53,15 @@ public class Fill { private String filledValue; /** The price of the fill */ - @JsonProperty("price") private String price; /** The date and time of the fill */ - @JsonProperty("time") private OffsetDateTime time; /** The commission incurred for the fill */ - @JsonProperty("commission") private String commission; /** The name of the venue */ - @JsonProperty("venue") private String venue; /** The venue fees incurred for the fill */ diff --git a/src/main/java/com/coinbase/prime/model/FundMovement.java b/src/main/java/com/coinbase/prime/model/FundMovement.java index 1d8a58a..d7c30c3 100644 --- a/src/main/java/com/coinbase/prime/model/FundMovement.java +++ b/src/main/java/com/coinbase/prime/model/FundMovement.java @@ -20,23 +20,16 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - /** FundMovement represents a single movement of funds between two counterparties. */ 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() {} diff --git a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java index 0aef093..22c333f 100644 --- a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java @@ -60,7 +60,6 @@ public class FutureProductDetails { private RiskManagementType riskManagedBy; /** The venue this product trades on */ - @JsonProperty("venue") private String venue; /** Descriptive name for the product group */ diff --git a/src/main/java/com/coinbase/prime/model/FuturesSweep.java b/src/main/java/com/coinbase/prime/model/FuturesSweep.java index a1f02a3..348c70a 100644 --- a/src/main/java/com/coinbase/prime/model/FuturesSweep.java +++ b/src/main/java/com/coinbase/prime/model/FuturesSweep.java @@ -26,7 +26,6 @@ public class FuturesSweep { /** Sweep ID */ - @JsonProperty("id") private String id; @JsonProperty("requested_amount") @@ -36,7 +35,6 @@ public class FuturesSweep { @JsonProperty("should_sweep_all") private boolean shouldSweepAll; - @JsonProperty("status") private FuturesSweepStatus status; /** Scheduled time */ diff --git a/src/main/java/com/coinbase/prime/model/Invoice.java b/src/main/java/com/coinbase/prime/model/Invoice.java index 01bcb7e..887d42a 100644 --- a/src/main/java/com/coinbase/prime/model/Invoice.java +++ b/src/main/java/com/coinbase/prime/model/Invoice.java @@ -26,7 +26,6 @@ /** Invoice */ public class Invoice { - @JsonProperty("id") private String id; @JsonProperty("billing_month") @@ -42,7 +41,6 @@ public class Invoice { private String invoiceNumber; /** States */ - @JsonProperty("state") private InvoiceState state; @JsonProperty("usd_amount_paid") diff --git a/src/main/java/com/coinbase/prime/model/InvoiceItem.java b/src/main/java/com/coinbase/prime/model/InvoiceItem.java index 51aca14..9d87efb 100644 --- a/src/main/java/com/coinbase/prime/model/InvoiceItem.java +++ b/src/main/java/com/coinbase/prime/model/InvoiceItem.java @@ -25,7 +25,6 @@ /** Invoice item */ public class InvoiceItem { - @JsonProperty("description") private String description; @JsonProperty("currency_symbol") @@ -35,19 +34,15 @@ public class InvoiceItem { @JsonProperty("invoice_type") private InvoiceType invoiceType; - @JsonProperty("rate") private Double rate; - @JsonProperty("quantity") private Double quantity; - @JsonProperty("price") private Double price; @JsonProperty("average_auc") private Double averageAuc; - @JsonProperty("total") private Double total; public InvoiceItem() {} diff --git a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java index 1bc45de..a4ffe5d 100644 --- a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java @@ -26,11 +26,9 @@ /** LimitOrderEdit represents an order edit that is accepted */ public class LimitOrderEdit { /** New price for the edited order */ - @JsonProperty("price") private String price; /** New size for the edited order */ - @JsonProperty("size") private String size; /** New display size for the edited order */ diff --git a/src/main/java/com/coinbase/prime/model/LoanInfo.java b/src/main/java/com/coinbase/prime/model/LoanInfo.java index d46315b..4283cbd 100644 --- a/src/main/java/com/coinbase/prime/model/LoanInfo.java +++ b/src/main/java/com/coinbase/prime/model/LoanInfo.java @@ -28,11 +28,9 @@ public class LoanInfo { private String portfolioId; /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** Balance amount */ - @JsonProperty("amount") private String amount; /** Notional balance amount */ diff --git a/src/main/java/com/coinbase/prime/model/Locate.java b/src/main/java/com/coinbase/prime/model/Locate.java index 3af0383..20c9a78 100644 --- a/src/main/java/com/coinbase/prime/model/Locate.java +++ b/src/main/java/com/coinbase/prime/model/Locate.java @@ -20,19 +20,14 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class Locate { /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** The available quantity located */ - @JsonProperty("quantity") private String quantity; /** The interest rate for located symbol */ - @JsonProperty("rate") private String rate; public Locate() {} diff --git a/src/main/java/com/coinbase/prime/model/MarginAddOn.java b/src/main/java/com/coinbase/prime/model/MarginAddOn.java index a2d942b..1687e27 100644 --- a/src/main/java/com/coinbase/prime/model/MarginAddOn.java +++ b/src/main/java/com/coinbase/prime/model/MarginAddOn.java @@ -25,7 +25,6 @@ public class MarginAddOn { /** margin add on amount */ - @JsonProperty("amount") private String amount; @JsonProperty("add_on_type") diff --git a/src/main/java/com/coinbase/prime/model/MarginSummary.java b/src/main/java/com/coinbase/prime/model/MarginSummary.java index e6b7d3b..ad738be 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummary.java @@ -29,8 +29,8 @@ public class MarginSummary { private String entityId; /** - * The margin equity at the entity level. Margin Equity = LMV + SMV + Trading Cash Balance + Short - * Collateral - Pending Withdrawals + * The margin equity at the entity level. Margin Equity = LMV + SMV + Trading Cash Balance + + * Short Collateral - Pending Withdrawals */ @JsonProperty("margin_equity") private String marginEquity; @@ -82,7 +82,6 @@ public class MarginSummary { private String tfAdjustedEquity; /** Whether or not a entity is frozen due to balance outstanding or other reason */ - @JsonProperty("frozen") private boolean frozen; /** The reason why a entity is frozen */ @@ -122,15 +121,15 @@ public class MarginSummary { @JsonProperty("short_collateral") private List shortCollateral; - /** Gross market value (GMV) = LMV + Abs (SMV) */ + /** Gross market value (GMV) = LMV + Abs (SMV) */ @JsonProperty("gross_market_value") private String grossMarketValue; - /** Net Market Value (NMV) = LMV + SMV */ + /** Net Market Value (NMV) = LMV + SMV */ @JsonProperty("net_market_value") private String netMarketValue; - /** Long Market Value (LMV) = Sum of positive notional for all assets */ + /** Long Market Value (LMV) = Sum of positive notional for all assets */ @JsonProperty("long_market_value") private String longMarketValue; @@ -138,15 +137,15 @@ public class MarginSummary { @JsonProperty("non_marginable_long_market_value") private String nonMarginableLongMarketValue; - /** Short Market Value (SMV) = Sum of negative notional for each margin eligible coin */ + /** Short Market Value (SMV) = Sum of negative notional for each margin eligible coin */ @JsonProperty("short_market_value") private String shortMarketValue; - /** Gross Leverage = GMV / Margin Requirement */ + /** Gross Leverage = GMV / Margin Requirement */ @JsonProperty("gross_leverage") private String grossLeverage; - /** Net Exposure = (LMV + SMV) / GMV */ + /** Net Exposure = (LMV + SMV) / GMV */ @JsonProperty("net_exposure") private String netExposure; diff --git a/src/main/java/com/coinbase/prime/model/MarketData.java b/src/main/java/com/coinbase/prime/model/MarketData.java index 2c78f3d..8eba1f8 100644 --- a/src/main/java/com/coinbase/prime/model/MarketData.java +++ b/src/main/java/com/coinbase/prime/model/MarketData.java @@ -1,39 +1,40 @@ /* * 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 + * 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. + * 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; -@JsonInclude(JsonInclude.Include.NON_NULL) public class MarketData { /** Base asset symbol (e.g., BTC, ETH, SOL) */ - @JsonProperty("symbol") private String symbol; - /** Daily historical volatility over trailing 5 days (decimal, e.g., 0.65 = 65%) */ + /** Daily historical volatility over trailing 5 days (decimal, e.g., 0.65 = 65%) */ @JsonProperty("vol_5d") private String vol5d; - /** Daily historical volatility over trailing 30 days (decimal, e.g., 0.65 = 65%) */ + /** Daily historical volatility over trailing 30 days (decimal, e.g., 0.65 = 65%) */ @JsonProperty("vol_30d") private String vol30d; - /** Daily historical volatility over trailing 90 days (decimal, e.g., 0.65 = 65%) */ + /** Daily historical volatility over trailing 90 days (decimal, e.g., 0.65 = 65%) */ @JsonProperty("vol_90d") private String vol90d; @@ -48,6 +49,17 @@ public class MarketData { @JsonProperty("weighted_vol") private String weightedVol; + public MarketData() {} + + public MarketData(Builder builder) { + this.symbol = builder.symbol; + this.vol5d = builder.vol5d; + this.vol30d = builder.vol30d; + this.vol90d = builder.vol90d; + this.adv30d = builder.adv30d; + this.weightedVol = builder.weightedVol; + } + public String getSymbol() { return symbol; } @@ -95,4 +107,52 @@ public String getWeightedVol() { public void setWeightedVol(String weightedVol) { this.weightedVol = weightedVol; } + + public static class Builder { + private String symbol; + + private String vol5d; + + private String vol30d; + + private String vol90d; + + private String adv30d; + + private String weightedVol; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder vol5d(String vol5d) { + this.vol5d = vol5d; + return this; + } + + public Builder vol30d(String vol30d) { + this.vol30d = vol30d; + return this; + } + + public Builder vol90d(String vol90d) { + this.vol90d = vol90d; + return this; + } + + public Builder adv30d(String adv30d) { + this.adv30d = adv30d; + return this; + } + + public Builder weightedVol(String weightedVol) { + this.weightedVol = weightedVol; + return this; + } + + public MarketData build() { + return new MarketData(this); + } + } } diff --git a/src/main/java/com/coinbase/prime/model/MarketRate.java b/src/main/java/com/coinbase/prime/model/MarketRate.java index 2de0835..5b6ff82 100644 --- a/src/main/java/com/coinbase/prime/model/MarketRate.java +++ b/src/main/java/com/coinbase/prime/model/MarketRate.java @@ -20,15 +20,11 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class MarketRate { /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** The current market rate of currency */ - @JsonProperty("rate") private String rate; public MarketRate() {} diff --git a/src/main/java/com/coinbase/prime/model/Network.java b/src/main/java/com/coinbase/prime/model/Network.java index a1d15e6..56c11fe 100644 --- a/src/main/java/com/coinbase/prime/model/Network.java +++ b/src/main/java/com/coinbase/prime/model/Network.java @@ -20,15 +20,11 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class Network { /** The network id: base, bitcoin, ethereum, solana etc */ - @JsonProperty("id") private String id; /** The network type: mainnet, testnet, etc */ - @JsonProperty("type") private String type; public Network() {} diff --git a/src/main/java/com/coinbase/prime/model/NetworkDetails.java b/src/main/java/com/coinbase/prime/model/NetworkDetails.java index fb5eb17..122decf 100644 --- a/src/main/java/com/coinbase/prime/model/NetworkDetails.java +++ b/src/main/java/com/coinbase/prime/model/NetworkDetails.java @@ -23,11 +23,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class NetworkDetails { - @JsonProperty("network") private Network network; /** The name of the network */ - @JsonProperty("name") private String name; /** The maximum number of decimals supported for this network */ diff --git a/src/main/java/com/coinbase/prime/model/NftCollection.java b/src/main/java/com/coinbase/prime/model/NftCollection.java index ebc2cfc..74b2cdf 100644 --- a/src/main/java/com/coinbase/prime/model/NftCollection.java +++ b/src/main/java/com/coinbase/prime/model/NftCollection.java @@ -20,11 +20,8 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class NftCollection { /** NFT collection name */ - @JsonProperty("name") private String name; public NftCollection() {} diff --git a/src/main/java/com/coinbase/prime/model/NftItem.java b/src/main/java/com/coinbase/prime/model/NftItem.java index b5b0cd6..929d098 100644 --- a/src/main/java/com/coinbase/prime/model/NftItem.java +++ b/src/main/java/com/coinbase/prime/model/NftItem.java @@ -20,11 +20,8 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class NftItem { /** NFT item name */ - @JsonProperty("name") private String name; public NftItem() {} diff --git a/src/main/java/com/coinbase/prime/model/OnchainAsset.java b/src/main/java/com/coinbase/prime/model/OnchainAsset.java index a91891d..91b2c97 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainAsset.java +++ b/src/main/java/com/coinbase/prime/model/OnchainAsset.java @@ -23,7 +23,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainAsset { - @JsonProperty("network") + /** Network this asset is on (ie "ethereum-mainnet") */ private String network; /** Contract Address of this asset (empty for native assets). */ @@ -31,7 +31,6 @@ public class OnchainAsset { private String contractAddress; /** Symbol of this asset. */ - @JsonProperty("symbol") private String symbol; /** Token ID of this asset (empty for non NFT assets). */ @@ -39,7 +38,6 @@ public class OnchainAsset { private String tokenId; /** Name of this asset, either the name of the crypto token or the NFT collection name. */ - @JsonProperty("name") private String name; public OnchainAsset() {} diff --git a/src/main/java/com/coinbase/prime/model/OnchainBalance.java b/src/main/java/com/coinbase/prime/model/OnchainBalance.java index 2124866..b048b3b 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainBalance.java +++ b/src/main/java/com/coinbase/prime/model/OnchainBalance.java @@ -24,13 +24,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainBalance { - @JsonProperty("asset") private OnchainAsset asset; /** The total amount in whole units with full precision. */ - @JsonProperty("amount") private String amount; + /** - UNKNOWN_VISIBILITY_STATUS: nil - VISIBLE: Visible - HIDDEN: Hidden - SPAM: Spam */ @JsonProperty("visibility_status") private VisibilityStatus visibilityStatus; diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java index dc853bc..4ad94cb 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java @@ -37,7 +37,6 @@ public class OnchainTransactionDetails { private String chainId; /** The transaction nonce. Only present for EVM-based blockchain transactions. */ - @JsonProperty("nonce") private String nonce; /** The ID of the transaction that this transaction replaced */ diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java index 239eab9..8e84839 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java @@ -25,7 +25,6 @@ public class OnchainTransactionMetadata { /** The transaction type label of the confirmed transaction post settlement */ - @JsonProperty("label") private String label; /** The confirmed asset changes (onchain) */ diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index 52587b6..a710e78 100644 --- a/src/main/java/com/coinbase/prime/model/Order.java +++ b/src/main/java/com/coinbase/prime/model/Order.java @@ -31,7 +31,6 @@ public class Order { /** The unique order ID generated by Coinbase */ - @JsonProperty("id") private String id; /** The ID of the user that created the order */ @@ -47,7 +46,6 @@ public class Order { private String productId; /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ - @JsonProperty("side") private OrderSide side; /** @@ -70,21 +68,16 @@ public class Order { * adjust based on market conditions while maintaining execution discretion and avoiding adverse * selection */ - @JsonProperty("type") private OrderType type; - /** - * Order size in base asset units (either `base_quantity` or `quote_value` is - * required) - */ + /** Order size in base asset units (either `base_quantity` or `quote_value` is required) */ @JsonProperty("base_quantity") private String baseQuantity; /** * Order size in quote asset units, i.e. the amount the user wants to spend (when buying) or * receive (when selling); the quantity in base units will be determined based on the market - * liquidity and indicated `quote_value`. Either `base_quantity` or - * `quote_value` is required + * liquidity and indicated `quote_value`. Either `base_quantity` or `quote_value` is required */ @JsonProperty("quote_value") private String quoteValue; @@ -99,7 +92,7 @@ public class Order { /** * The expiry time of the order in UTC (applies to TWAP, VWAP, LIMIT, and STOP_LIMIT orders with - * `time_in_force` set to `GTD`) + * `time_in_force` set to `GTD`) */ @JsonProperty("expiry_time") private OffsetDateTime expiryTime; @@ -109,7 +102,6 @@ public class Order { * was filled - CANCELLED: The order was cancelled - EXPIRED: The order has expired - FAILED: * Order submission failed - PENDING: The order has been sent but is not yet confirmed */ - @JsonProperty("status") private OrderStatus status; /** @@ -133,7 +125,7 @@ public class Order { @JsonProperty("filled_value") private String filledValue; - /** Indicates the average `filled_price` */ + /** Indicates the average `filled_price` */ @JsonProperty("average_filled_price") private String averageFilledPrice; @@ -141,7 +133,6 @@ public class Order { * Total commission paid on this order (in quote asset units) -- only applicable for partially- or * fully-filled orders */ - @JsonProperty("commission") private String commission; /** @@ -162,7 +153,7 @@ public class Order { @JsonProperty("stop_price") private String stopPrice; - /** Indicates the average `filled_price` net of commissions and fees */ + /** Indicates the average `filled_price` net of commissions and fees */ @JsonProperty("net_average_filled_price") private String netAverageFilledPrice; @@ -210,7 +201,6 @@ public class Order { private String pegOffsetType; /** The offset value for PEG orders */ - @JsonProperty("offset") private String offset; /** The wig (would if good) level for PEG orders - best price opposite to limit_price */ diff --git a/src/main/java/com/coinbase/prime/model/OrderEdit.java b/src/main/java/com/coinbase/prime/model/OrderEdit.java index 0dfa693..99c326f 100644 --- a/src/main/java/com/coinbase/prime/model/OrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/OrderEdit.java @@ -25,7 +25,6 @@ public class OrderEdit { /** New price for the edited order */ - @JsonProperty("price") private String price; /** New base quantity for the edited order, populated if order is in base size */ diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java index ce2f7d4..46f528a 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java @@ -24,10 +24,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodDetails { - @JsonProperty("id") private String id; - @JsonProperty("symbol") private String symbol; /** @@ -37,7 +35,6 @@ public class PaymentMethodDetails { @JsonProperty("payment_method_type") private PaymentMethodType paymentMethodType; - @JsonProperty("name") private String name; @JsonProperty("account_number") diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java index d045a36..52fb7b3 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java @@ -24,10 +24,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodSummary { - @JsonProperty("id") private String id; - @JsonProperty("symbol") private String symbol; /** diff --git a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java index 7ce6d9e..ea097d3 100644 --- a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java +++ b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java @@ -24,15 +24,12 @@ public class PmAssetInfo { /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** Nominal amount of the currency */ - @JsonProperty("amount") private String amount; /** Spot price for the currency */ - @JsonProperty("price") private String price; /** Notional amount of the currency */ @@ -51,7 +48,7 @@ public class PmAssetInfo { @JsonProperty("base_margin_requirement") private String baseMarginRequirement; - /** Notional amount of the currency's base margin requirement */ + /** Notional amount of the currency's base margin requirement */ @JsonProperty("base_margin_requirement_notional") private String baseMarginRequirementNotional; diff --git a/src/main/java/com/coinbase/prime/model/Portfolio.java b/src/main/java/com/coinbase/prime/model/Portfolio.java index c59c82e..b4a74c1 100644 --- a/src/main/java/com/coinbase/prime/model/Portfolio.java +++ b/src/main/java/com/coinbase/prime/model/Portfolio.java @@ -24,11 +24,9 @@ public class Portfolio { /** The unique ID of the portfolio */ - @JsonProperty("id") private String id; /** The name of the portfolio */ - @JsonProperty("name") private String name; /** The ID of the entity to which the portfolio is associated */ diff --git a/src/main/java/com/coinbase/prime/model/PortfolioUser.java b/src/main/java/com/coinbase/prime/model/PortfolioUser.java index 0c00594..828f921 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioUser.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioUser.java @@ -27,15 +27,12 @@ public class PortfolioUser { /** The unique ID of the user. */ - @JsonProperty("id") private String id; /** The name of the user. */ - @JsonProperty("name") private String name; /** The email of the user. */ - @JsonProperty("email") private String email; /** The portfolio to which this user and associated permissions are identified. */ @@ -52,11 +49,9 @@ public class PortfolioUser { * with full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A * tax manager - BUSINESS_MANAGER: A business manager */ - @JsonProperty("role") private UserRole role; /** All primary roles assigned to the user. */ - @JsonProperty("roles") private List roles; /** All secondary permissions assigned to the user. */ diff --git a/src/main/java/com/coinbase/prime/model/Position.java b/src/main/java/com/coinbase/prime/model/Position.java index 9b36217..a1711c3 100644 --- a/src/main/java/com/coinbase/prime/model/Position.java +++ b/src/main/java/com/coinbase/prime/model/Position.java @@ -24,7 +24,6 @@ public class Position { /** Asset symbol */ - @JsonProperty("symbol") private String symbol; /** The long position based on 'reference' value */ diff --git a/src/main/java/com/coinbase/prime/model/PositionReference.java b/src/main/java/com/coinbase/prime/model/PositionReference.java index 45aad8b..08164b5 100644 --- a/src/main/java/com/coinbase/prime/model/PositionReference.java +++ b/src/main/java/com/coinbase/prime/model/PositionReference.java @@ -21,14 +21,11 @@ package com.coinbase.prime.model; import com.coinbase.prime.model.enums.PositionReferenceType; -import com.fasterxml.jackson.annotation.JsonProperty; public class PositionReference { /** Reference ID */ - @JsonProperty("id") private String id; - @JsonProperty("type") private PositionReferenceType type; public PositionReference() {} diff --git a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java index 47552b4..7d20d9f 100644 --- a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java +++ b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java @@ -29,23 +29,18 @@ public class PostTradeCreditInformation { private String portfolioId; /** The currency symbol credit is denoted in */ - @JsonProperty("currency") private String currency; /** The maximum credit limit */ - @JsonProperty("limit") private String limit; /** The amount of credit used */ - @JsonProperty("utilized") private String utilized; /** The amount of credit available */ - @JsonProperty("available") private String available; /** Whether or not a portfolio is frozen due to balance outstanding or other reason */ - @JsonProperty("frozen") private boolean frozen; /** The reason why the portfolio is frozen */ @@ -56,7 +51,6 @@ public class PostTradeCreditInformation { private List amountsDue; /** Whether the portfolio has credit enabled */ - @JsonProperty("enabled") private boolean enabled; /** The amount of adjusted credit used */ diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java new file mode 100644 index 0000000..2795985 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java @@ -0,0 +1,137 @@ +/* + * 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; +import java.util.List; + +public class PrimeXMMarginCallThresholds { + /** Deficit threshold (DT). */ + @JsonProperty("deficit_threshold") + private String deficitThreshold; + + /** Warning threshold (WT). */ + @JsonProperty("warning_threshold") + private String warningThreshold; + + /** Urgent margin call threshold (UMCT). */ + @JsonProperty("critical_threshold") + private String criticalThreshold; + + /** Liquidation threshold (LT). */ + @JsonProperty("liquidation_threshold") + private String liquidationThreshold; + + /** Structured margin thresholds by margin level. */ + @JsonProperty("margin_thresholds") + private List marginThresholds; + + public PrimeXMMarginCallThresholds() {} + + public PrimeXMMarginCallThresholds(Builder builder) { + this.deficitThreshold = builder.deficitThreshold; + this.warningThreshold = builder.warningThreshold; + this.criticalThreshold = builder.criticalThreshold; + this.liquidationThreshold = builder.liquidationThreshold; + this.marginThresholds = builder.marginThresholds; + } + + public String getDeficitThreshold() { + return deficitThreshold; + } + + public void setDeficitThreshold(String deficitThreshold) { + this.deficitThreshold = deficitThreshold; + } + + public String getWarningThreshold() { + return warningThreshold; + } + + public void setWarningThreshold(String warningThreshold) { + this.warningThreshold = warningThreshold; + } + + public String getCriticalThreshold() { + return criticalThreshold; + } + + public void setCriticalThreshold(String criticalThreshold) { + this.criticalThreshold = criticalThreshold; + } + + public String getLiquidationThreshold() { + return liquidationThreshold; + } + + public void setLiquidationThreshold(String liquidationThreshold) { + this.liquidationThreshold = liquidationThreshold; + } + + public List getMarginThresholds() { + return marginThresholds; + } + + public void setMarginThresholds(List marginThresholds) { + this.marginThresholds = marginThresholds; + } + + public static class Builder { + private String deficitThreshold; + + private String warningThreshold; + + private String criticalThreshold; + + private String liquidationThreshold; + + private List marginThresholds; + + public Builder deficitThreshold(String deficitThreshold) { + this.deficitThreshold = deficitThreshold; + return this; + } + + public Builder warningThreshold(String warningThreshold) { + this.warningThreshold = warningThreshold; + return this; + } + + public Builder criticalThreshold(String criticalThreshold) { + this.criticalThreshold = criticalThreshold; + return this; + } + + public Builder liquidationThreshold(String liquidationThreshold) { + this.liquidationThreshold = liquidationThreshold; + return this; + } + + public Builder marginThresholds(List marginThresholds) { + this.marginThresholds = marginThresholds; + return this; + } + + public PrimeXMMarginCallThresholds build() { + return new PrimeXMMarginCallThresholds(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java new file mode 100644 index 0000000..24b7877 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java @@ -0,0 +1,139 @@ +/* + * 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 PrimeXMMarginRequirementBreakdown { + /** Base margin requirement component. */ + @JsonProperty("base_margin") + private String baseMargin; + + /** Volatility add-on component. */ + @JsonProperty("volatility_addon") + private String volatilityAddon; + + /** Liquidity add-on component. */ + @JsonProperty("liquidity_addon") + private String liquidityAddon; + + /** Credits that offset margin charges due to portfolio composition. */ + @JsonProperty("offset_credit") + private String offsetCredit; + + /** + * Futures margin charge applied for any futures trades of the opposing direction but of the same + * underlying. + */ + @JsonProperty("futures_margin") + private String futuresMargin; + + public PrimeXMMarginRequirementBreakdown() {} + + public PrimeXMMarginRequirementBreakdown(Builder builder) { + this.baseMargin = builder.baseMargin; + this.volatilityAddon = builder.volatilityAddon; + this.liquidityAddon = builder.liquidityAddon; + this.offsetCredit = builder.offsetCredit; + this.futuresMargin = builder.futuresMargin; + } + + public String getBaseMargin() { + return baseMargin; + } + + public void setBaseMargin(String baseMargin) { + this.baseMargin = baseMargin; + } + + public String getVolatilityAddon() { + return volatilityAddon; + } + + public void setVolatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + } + + public String getLiquidityAddon() { + return liquidityAddon; + } + + public void setLiquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + } + + public String getOffsetCredit() { + return offsetCredit; + } + + public void setOffsetCredit(String offsetCredit) { + this.offsetCredit = offsetCredit; + } + + public String getFuturesMargin() { + return futuresMargin; + } + + public void setFuturesMargin(String futuresMargin) { + this.futuresMargin = futuresMargin; + } + + public static class Builder { + private String baseMargin; + + private String volatilityAddon; + + private String liquidityAddon; + + private String offsetCredit; + + private String futuresMargin; + + public Builder baseMargin(String baseMargin) { + this.baseMargin = baseMargin; + return this; + } + + public Builder volatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + return this; + } + + public Builder liquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + return this; + } + + public Builder offsetCredit(String offsetCredit) { + this.offsetCredit = offsetCredit; + return this; + } + + public Builder futuresMargin(String futuresMargin) { + this.futuresMargin = futuresMargin; + return this; + } + + public PrimeXMMarginRequirementBreakdown build() { + return new PrimeXMMarginRequirementBreakdown(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java new file mode 100644 index 0000000..3a3eecb --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java @@ -0,0 +1,113 @@ +/* + * 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.coinbase.prime.model.enums.PrimeXMMarginThresholdType; +import com.coinbase.prime.model.enums.XMMarginLevel; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class PrimeXMMarginThreshold { + /** + * - HEALTHY_THRESHOLD: Margin level is healthy - DEFICIT_THRESHOLD: Margin level is breaching the + * deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the + * case by the scheduled next Margin Call time (as defined in the margin methodology) - + * WARNING_THRESHOLD: Margin level is breaching the warning threshold (WT) which will result in + * the issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as + * defined in the margin methodology). WT is differentiated from DT in that it means margin health + * is approaching the UMCT - URGENT_MARGIN_CALL_THRESHOLD: Margin level is breaching the UMCT and, + * as defined in the margin methodology, this will trigger an urgent margin call - + * LIQUIDATION_THRESHOLD: Margin level is breaching the liquidation threshold (LT) and, as defined + * in the margin methodology, this will trigger the SESSION_LOCKED control status and liquidation + * may commence. + */ + @JsonProperty("margin_level") + private XMMarginLevel marginLevel; + + /** + * - MARGIN_THRESHOLD_EQUITY_RATIO: Threshold based on equity ratio EQ / MR; triggers when EQ / MR + * >= threshold_value. - MARGIN_THRESHOLD_DEFICIT_RATIO: Threshold based on deficit ratio (MR - + * EQ) / XMML; triggers when (MR - EQ) / XMML > threshold_value. + */ + @JsonProperty("threshold_type") + private PrimeXMMarginThresholdType thresholdType; + + @JsonProperty("threshold_value") + private String thresholdValue; + + public PrimeXMMarginThreshold() {} + + public PrimeXMMarginThreshold(Builder builder) { + this.marginLevel = builder.marginLevel; + this.thresholdType = builder.thresholdType; + this.thresholdValue = builder.thresholdValue; + } + + public XMMarginLevel getMarginLevel() { + return marginLevel; + } + + public void setMarginLevel(XMMarginLevel marginLevel) { + this.marginLevel = marginLevel; + } + + public PrimeXMMarginThresholdType getThresholdType() { + return thresholdType; + } + + public void setThresholdType(PrimeXMMarginThresholdType thresholdType) { + this.thresholdType = thresholdType; + } + + public String getThresholdValue() { + return thresholdValue; + } + + public void setThresholdValue(String thresholdValue) { + this.thresholdValue = thresholdValue; + } + + public static class Builder { + private XMMarginLevel marginLevel; + + private PrimeXMMarginThresholdType thresholdType; + + private String thresholdValue; + + public Builder marginLevel(XMMarginLevel marginLevel) { + this.marginLevel = marginLevel; + return this; + } + + public Builder thresholdType(PrimeXMMarginThresholdType thresholdType) { + this.thresholdType = thresholdType; + return this; + } + + public Builder thresholdValue(String thresholdValue) { + this.thresholdValue = thresholdValue; + return this; + } + + public PrimeXMMarginThreshold build() { + return new PrimeXMMarginThreshold(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java b/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java new file mode 100644 index 0000000..e4efc73 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java @@ -0,0 +1,156 @@ +/* + * 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 PrimeXMOffsetCreditBreakdown { + /** Basis offset credit component. */ + @JsonProperty("basis_credit") + private String basisCredit; + + /** Long/short tier-pair offset credit. */ + @JsonProperty("long_short_credit") + private String longShortCredit; + + /** Long/long tier-pair offset credit. */ + @JsonProperty("long_long_credit") + private String longLongCredit; + + /** Short/short tier-pair offset credit. */ + @JsonProperty("short_short_credit") + private String shortShortCredit; + + /** Same-tier offset credit. */ + @JsonProperty("same_tier_credit") + private String sameTierCredit; + + /** Total offset credit. */ + @JsonProperty("total_credit") + private String totalCredit; + + public PrimeXMOffsetCreditBreakdown() {} + + public PrimeXMOffsetCreditBreakdown(Builder builder) { + this.basisCredit = builder.basisCredit; + this.longShortCredit = builder.longShortCredit; + this.longLongCredit = builder.longLongCredit; + this.shortShortCredit = builder.shortShortCredit; + this.sameTierCredit = builder.sameTierCredit; + this.totalCredit = builder.totalCredit; + } + + public String getBasisCredit() { + return basisCredit; + } + + public void setBasisCredit(String basisCredit) { + this.basisCredit = basisCredit; + } + + public String getLongShortCredit() { + return longShortCredit; + } + + public void setLongShortCredit(String longShortCredit) { + this.longShortCredit = longShortCredit; + } + + public String getLongLongCredit() { + return longLongCredit; + } + + public void setLongLongCredit(String longLongCredit) { + this.longLongCredit = longLongCredit; + } + + public String getShortShortCredit() { + return shortShortCredit; + } + + public void setShortShortCredit(String shortShortCredit) { + this.shortShortCredit = shortShortCredit; + } + + public String getSameTierCredit() { + return sameTierCredit; + } + + public void setSameTierCredit(String sameTierCredit) { + this.sameTierCredit = sameTierCredit; + } + + public String getTotalCredit() { + return totalCredit; + } + + public void setTotalCredit(String totalCredit) { + this.totalCredit = totalCredit; + } + + public static class Builder { + private String basisCredit; + + private String longShortCredit; + + private String longLongCredit; + + private String shortShortCredit; + + private String sameTierCredit; + + private String totalCredit; + + public Builder basisCredit(String basisCredit) { + this.basisCredit = basisCredit; + return this; + } + + public Builder longShortCredit(String longShortCredit) { + this.longShortCredit = longShortCredit; + return this; + } + + public Builder longLongCredit(String longLongCredit) { + this.longLongCredit = longLongCredit; + return this; + } + + public Builder shortShortCredit(String shortShortCredit) { + this.shortShortCredit = shortShortCredit; + return this; + } + + public Builder sameTierCredit(String sameTierCredit) { + this.sameTierCredit = sameTierCredit; + return this; + } + + public Builder totalCredit(String totalCredit) { + this.totalCredit = totalCredit; + return this; + } + + public PrimeXMOffsetCreditBreakdown build() { + return new PrimeXMOffsetCreditBreakdown(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Product.java b/src/main/java/com/coinbase/prime/model/Product.java index df6bbc9..0259247 100644 --- a/src/main/java/com/coinbase/prime/model/Product.java +++ b/src/main/java/com/coinbase/prime/model/Product.java @@ -26,8 +26,7 @@ import java.util.List; public class Product { - /** The product ID, written as `BASE-QUOTE` */ - @JsonProperty("id") + /** The product ID, written as `BASE-QUOTE` */ private String id; /** The smallest permitted unit of denomination for the base asset (varies by product) */ @@ -55,7 +54,6 @@ public class Product { private String quoteMaxSize; /** Permissions given to the user for a product */ - @JsonProperty("permissions") private List permissions; /** The smallest permitted price increment for the product */ diff --git a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java index 87458d3..c76efd5 100644 --- a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java +++ b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java @@ -23,10 +23,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; public class RequestToSubmitTravelRuleDataForAnExistingDepositTransaction { - @JsonProperty("originator") private TravelRuleParty originator; - @JsonProperty("beneficiary") private TravelRuleParty beneficiary; @JsonProperty("is_self") diff --git a/src/main/java/com/coinbase/prime/model/RewardMetadata.java b/src/main/java/com/coinbase/prime/model/RewardMetadata.java index e1dc89f..ee23e7b 100644 --- a/src/main/java/com/coinbase/prime/model/RewardMetadata.java +++ b/src/main/java/com/coinbase/prime/model/RewardMetadata.java @@ -32,15 +32,20 @@ public class RewardMetadata { * validator (consensus layer) rewards - TRANSACTION_REWARD: A transaction reward i.e. ethereum * transaction (execution layer) rewards - STAKING_FEE_REBATE_REWARD: A staking fee rebate reward * i.e. coinbase pays rebates for staking fees to eligible delegators - BUIDL_DIVIDEND: A BUIDL - * dividend reward i.e. dividends from BUIDL fund holdings + * dividend reward i.e. dividends from BUIDL fund holdings - CUSTOM_STABLECOIN_REWARD: A custom + * stablecoin reward i.e. USDC reward payouts */ - @JsonProperty("subtype") private RewardSubtype subtype; + /** Details for a custom stablecoin reward payout transaction */ + @JsonProperty("custom_stablecoin_reward_details") + private CustomStablecoinRewardDetails customStablecoinRewardDetails; + public RewardMetadata() {} public RewardMetadata(Builder builder) { this.subtype = builder.subtype; + this.customStablecoinRewardDetails = builder.customStablecoinRewardDetails; } public RewardSubtype getSubtype() { @@ -51,14 +56,31 @@ public void setSubtype(RewardSubtype subtype) { this.subtype = subtype; } + public CustomStablecoinRewardDetails getCustomStablecoinRewardDetails() { + return customStablecoinRewardDetails; + } + + public void setCustomStablecoinRewardDetails( + CustomStablecoinRewardDetails customStablecoinRewardDetails) { + this.customStablecoinRewardDetails = customStablecoinRewardDetails; + } + public static class Builder { private RewardSubtype subtype; + private CustomStablecoinRewardDetails customStablecoinRewardDetails; + public Builder subtype(RewardSubtype subtype) { this.subtype = subtype; return this; } + public Builder customStablecoinRewardDetails( + CustomStablecoinRewardDetails customStablecoinRewardDetails) { + this.customStablecoinRewardDetails = customStablecoinRewardDetails; + return this; + } + public RewardMetadata build() { return new RewardMetadata(this); } diff --git a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java index db7a361..e00364b 100644 --- a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java @@ -24,7 +24,6 @@ public class RfqProductDetails { /** Whether the product is tradable via RFQ */ - @JsonProperty("tradable") private boolean tradable; /** Deprecated: Value will be an empty string */ diff --git a/src/main/java/com/coinbase/prime/model/RpcConfig.java b/src/main/java/com/coinbase/prime/model/RpcConfig.java index d99cb53..4e701db 100644 --- a/src/main/java/com/coinbase/prime/model/RpcConfig.java +++ b/src/main/java/com/coinbase/prime/model/RpcConfig.java @@ -28,7 +28,6 @@ public class RpcConfig { private boolean skipBroadcast; /** Custom blockchain node RPC URL. (EVM-only) */ - @JsonProperty("url") private String url; public RpcConfig() {} diff --git a/src/main/java/com/coinbase/prime/model/StakingStatus.java b/src/main/java/com/coinbase/prime/model/StakingStatus.java index 0e31c32..9d05bd9 100644 --- a/src/main/java/com/coinbase/prime/model/StakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/StakingStatus.java @@ -26,7 +26,6 @@ public class StakingStatus { /** Amount being staked (whole amount, e.g., 16 ETH) */ - @JsonProperty("amount") private String amount; @JsonProperty("stake_type") diff --git a/src/main/java/com/coinbase/prime/model/SweepAmount.java b/src/main/java/com/coinbase/prime/model/SweepAmount.java index f5dc51f..de4fd50 100644 --- a/src/main/java/com/coinbase/prime/model/SweepAmount.java +++ b/src/main/java/com/coinbase/prime/model/SweepAmount.java @@ -20,15 +20,11 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class SweepAmount { /** Currency */ - @JsonProperty("currency") private String currency; /** Amount */ - @JsonProperty("amount") private String amount; public SweepAmount() {} diff --git a/src/main/java/com/coinbase/prime/model/TfAsset.java b/src/main/java/com/coinbase/prime/model/TfAsset.java index 77a2f57..da9aa7b 100644 --- a/src/main/java/com/coinbase/prime/model/TfAsset.java +++ b/src/main/java/com/coinbase/prime/model/TfAsset.java @@ -22,9 +22,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; +/** TFAsset represents an asset eligible for Trade Finance with adjustment factors */ public class TfAsset { /** The asset symbol */ - @JsonProperty("symbol") private String symbol; /** The asset adjustment factor for Trade Finance */ diff --git a/src/main/java/com/coinbase/prime/model/TfObligation.java b/src/main/java/com/coinbase/prime/model/TfObligation.java index af9c135..62e596a 100644 --- a/src/main/java/com/coinbase/prime/model/TfObligation.java +++ b/src/main/java/com/coinbase/prime/model/TfObligation.java @@ -22,13 +22,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; +/** Trade finance obligation information */ public class TfObligation { /** The unique ID of the portfolio */ @JsonProperty("portfolio_id") private String portfolioId; /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** Current amount due */ diff --git a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java index a927e12..95200d1 100644 --- a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java +++ b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java @@ -1,32 +1,29 @@ /* * 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 + * 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. + * 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; /** - * TierPairRateEntry represents a single (tier_a, tier_b) -> rate entry in an offset credit - * matrix. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -/** - * TierPairRateEntry represents a single (tier_a, tier_b) -> rate entry in an offset credit - * matrix. + * TierPairRateEntry represents a single (tier_a, tier_b) -> rate entry in an offset credit matrix. */ public class TierPairRateEntry { /** First tier in the pair. */ @@ -38,9 +35,16 @@ public class TierPairRateEntry { private String tierB; /** Credit rate for this tier pair. */ - @JsonProperty("rate") private String rate; + public TierPairRateEntry() {} + + public TierPairRateEntry(Builder builder) { + this.tierA = builder.tierA; + this.tierB = builder.tierB; + this.rate = builder.rate; + } + public String getTierA() { return tierA; } @@ -64,4 +68,31 @@ public String getRate() { public void setRate(String rate) { this.rate = rate; } + + public static class Builder { + private String tierA; + + private String tierB; + + private String rate; + + public Builder tierA(String tierA) { + this.tierA = tierA; + return this; + } + + public Builder tierB(String tierB) { + this.tierB = tierB; + return this; + } + + public Builder rate(String rate) { + this.rate = rate; + return this; + } + + public TierPairRateEntry build() { + return new TierPairRateEntry(this); + } + } } diff --git a/src/main/java/com/coinbase/prime/model/TieredPricingFee.java b/src/main/java/com/coinbase/prime/model/TieredPricingFee.java index 6faef80..9540b4c 100644 --- a/src/main/java/com/coinbase/prime/model/TieredPricingFee.java +++ b/src/main/java/com/coinbase/prime/model/TieredPricingFee.java @@ -20,15 +20,11 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class TieredPricingFee { /** Asset symbol */ - @JsonProperty("symbol") private String symbol; /** The fee in bps */ - @JsonProperty("fee") private String fee; public TieredPricingFee() {} diff --git a/src/main/java/com/coinbase/prime/model/Transaction.java b/src/main/java/com/coinbase/prime/model/Transaction.java index 740cba1..db38a41 100644 --- a/src/main/java/com/coinbase/prime/model/Transaction.java +++ b/src/main/java/com/coinbase/prime/model/Transaction.java @@ -28,7 +28,6 @@ public class Transaction { /** The ID of the transaction */ - @JsonProperty("id") private String id; /** The wallet ID of the transaction */ @@ -69,7 +68,6 @@ public class Transaction { * On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: Portfolio-level * staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation */ - @JsonProperty("type") private TransactionType type; /** @@ -103,11 +101,9 @@ public class Transaction { * status - TRANSACTION_CONSTRUCTED: The transaction bctx is constructed but not yet broadcasting * on chain This is a non-terminal status */ - @JsonProperty("status") private TransactionStatus status; /** The asset symbol */ - @JsonProperty("symbol") private String symbol; /** The transaction creation time (as a UTC timestamp) */ @@ -119,7 +115,6 @@ public class Transaction { private OffsetDateTime completedAt; /** The transaction amount in whole units */ - @JsonProperty("amount") private String amount; @JsonProperty("transfer_from") @@ -133,7 +128,6 @@ public class Transaction { private String networkFees; /** The fees that the customer paid for the transaction (in whole units) */ - @JsonProperty("fees") private String fees; /** The asset in which fees will be paid */ @@ -155,15 +149,13 @@ public class Transaction { @JsonProperty("estimated_network_fees") private EstimatedNetworkFees estimatedNetworkFees; - /** The network name specific to web3/onchain wallet transactions */ - @JsonProperty("network") + /** The network name specific to onchain/onchain wallet transactions */ private String network; - /** The estimated asset changes (web3) */ + /** The estimated asset changes (onchain) */ @JsonProperty("estimated_asset_changes") private List estimatedAssetChanges; - @JsonProperty("metadata") private TransactionMetadata metadata; /** The idempotency key associated with the transaction creation request */ diff --git a/src/main/java/com/coinbase/prime/model/TransferLocation.java b/src/main/java/com/coinbase/prime/model/TransferLocation.java index dd99d0e..71a642d 100644 --- a/src/main/java/com/coinbase/prime/model/TransferLocation.java +++ b/src/main/java/com/coinbase/prime/model/TransferLocation.java @@ -30,15 +30,12 @@ public class TransferLocation { * of transfer location: Blockchain Network, Coinbase - MULTIPLE_ADDRESSES: Multiple * cryptocurrency addresses - COUNTERPARTY_ID: Counterparty ID */ - @JsonProperty("type") private TransferLocationType type; /** The value of the transfer location: payment method ID, wallet ID or crypto address */ - @JsonProperty("value") private String value; /** The crypto address of the transfer location */ - @JsonProperty("address") private String address; /** diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index cdbceee..62c288a 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -25,11 +25,9 @@ /** Data object used for withdrawals. */ public class TravelRuleData { /** Represents a party in a travel rule transfer (originator or beneficiary). */ - @JsonProperty("beneficiary") private TravelRuleParty beneficiary; /** Represents a party in a travel rule transfer (originator or beneficiary). */ - @JsonProperty("originator") private TravelRuleParty originator; /** True if user owns the counterparty address (self-transfer) */ diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleEntry.java b/src/main/java/com/coinbase/prime/model/TravelRuleEntry.java deleted file mode 100644 index d9727a9..0000000 --- a/src/main/java/com/coinbase/prime/model/TravelRuleEntry.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * Copyright 2025-present Coinbase Global, Inc. - * - * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Do not edit the class manually. - */ - -package com.coinbase.prime.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class TravelRuleEntry { - @JsonProperty("id") - private String id; - - @JsonProperty("blockchain_address") - private BlockchainAddress blockchainAddress; - - @JsonProperty("originator") - private TravelRuleParty originator; - - @JsonProperty("beneficiary") - private TravelRuleParty beneficiary; - - @JsonProperty("vasp") - private Vasp vasp; - - @JsonProperty("wallet_details") - private TravelRuleWalletDetails walletDetails; - - @JsonProperty("transfer_purpose") - private String transferPurpose; - - @JsonProperty("is_self_certified") - private Boolean isSelfCertified; - - @JsonProperty("is_intermediary") - private Boolean isIntermediary; - - @JsonProperty("is_self") - private Boolean isSelf; - - public TravelRuleEntry() {} - - public TravelRuleEntry(Builder builder) { - this.id = builder.id; - this.blockchainAddress = builder.blockchainAddress; - this.originator = builder.originator; - this.beneficiary = builder.beneficiary; - this.vasp = builder.vasp; - this.walletDetails = builder.walletDetails; - this.transferPurpose = builder.transferPurpose; - this.isSelfCertified = builder.isSelfCertified; - this.isIntermediary = builder.isIntermediary; - this.isSelf = builder.isSelf; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public BlockchainAddress getBlockchainAddress() { - return blockchainAddress; - } - - public void setBlockchainAddress(BlockchainAddress blockchainAddress) { - this.blockchainAddress = blockchainAddress; - } - - public TravelRuleParty getOriginator() { - return originator; - } - - public void setOriginator(TravelRuleParty originator) { - this.originator = originator; - } - - public TravelRuleParty getBeneficiary() { - return beneficiary; - } - - public void setBeneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - } - - public Vasp getVasp() { - return vasp; - } - - public void setVasp(Vasp vasp) { - this.vasp = vasp; - } - - public TravelRuleWalletDetails getWalletDetails() { - return walletDetails; - } - - public void setWalletDetails(TravelRuleWalletDetails walletDetails) { - this.walletDetails = walletDetails; - } - - public String getTransferPurpose() { - return transferPurpose; - } - - public void setTransferPurpose(String transferPurpose) { - this.transferPurpose = transferPurpose; - } - - public Boolean getIsSelfCertified() { - return isSelfCertified; - } - - public void setIsSelfCertified(Boolean isSelfCertified) { - this.isSelfCertified = isSelfCertified; - } - - public Boolean getIsIntermediary() { - return isIntermediary; - } - - public void setIsIntermediary(Boolean isIntermediary) { - this.isIntermediary = isIntermediary; - } - - public Boolean getIsSelf() { - return isSelf; - } - - public void setIsSelf(Boolean isSelf) { - this.isSelf = isSelf; - } - - public static class Builder { - private String id; - - private BlockchainAddress blockchainAddress; - - private TravelRuleParty originator; - - private TravelRuleParty beneficiary; - - private Vasp vasp; - - private TravelRuleWalletDetails walletDetails; - - private String transferPurpose; - - private Boolean isSelfCertified; - - private Boolean isIntermediary; - - private Boolean isSelf; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder blockchainAddress(BlockchainAddress blockchainAddress) { - this.blockchainAddress = blockchainAddress; - return this; - } - - public Builder originator(TravelRuleParty originator) { - this.originator = originator; - return this; - } - - public Builder beneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - return this; - } - - public Builder vasp(Vasp vasp) { - this.vasp = vasp; - return this; - } - - public Builder walletDetails(TravelRuleWalletDetails walletDetails) { - this.walletDetails = walletDetails; - return this; - } - - public Builder transferPurpose(String transferPurpose) { - this.transferPurpose = transferPurpose; - return this; - } - - public Builder isSelfCertified(Boolean isSelfCertified) { - this.isSelfCertified = isSelfCertified; - return this; - } - - public Builder isIntermediary(Boolean isIntermediary) { - this.isIntermediary = isIntermediary; - return this; - } - - public Builder isSelf(Boolean isSelf) { - this.isSelf = isSelf; - return this; - } - - public TravelRuleEntry build() { - return new TravelRuleEntry(this); - } - } -} diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java index 4327b56..7e2a31e 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -26,7 +26,6 @@ /** Represents a party in a travel rule transfer (originator or beneficiary). */ public class TravelRuleParty { /** Legal name (for entities or simple name format) */ - @JsonProperty("name") private String name; /** Natural person name components */ @@ -34,7 +33,6 @@ public class TravelRuleParty { private NaturalPersonName naturalPersonName; /** Detailed address information */ - @JsonProperty("address") private DetailedAddress address; /** @@ -60,6 +58,13 @@ public class TravelRuleParty { @JsonProperty("personal_id") private String personalId; + /** + * * A full date, with non-zero year, month, and day values. * A month and day, with a zero year + * (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year + * and month, with a zero day (for example, a credit card expiration date). Related types: * + * [google.type.TimeOfDay][google.type.TimeOfDay] * [google.type.DateTime][google.type.DateTime] * + * [google.protobuf.Timestamp][google.protobuf.Timestamp] + */ @JsonProperty("date_of_birth") private DateOfBirth dateOfBirth; diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleWalletDetails.java b/src/main/java/com/coinbase/prime/model/TravelRuleWalletDetails.java deleted file mode 100644 index 12d2ffd..0000000 --- a/src/main/java/com/coinbase/prime/model/TravelRuleWalletDetails.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2025-present Coinbase Global, Inc. - * - * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Do not edit the class manually. - */ - -package com.coinbase.prime.model; - -import com.coinbase.prime.model.enums.TravelRuleWalletType; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class TravelRuleWalletDetails { - @JsonProperty("wallet_type") - private TravelRuleWalletType walletType; - - @JsonProperty("wallet_address") - private BlockchainAddress walletAddress; - - public TravelRuleWalletDetails() {} - - public TravelRuleWalletDetails(Builder builder) { - this.walletType = builder.walletType; - this.walletAddress = builder.walletAddress; - } - - public TravelRuleWalletType getWalletType() { - return walletType; - } - - public void setWalletType(TravelRuleWalletType walletType) { - this.walletType = walletType; - } - - public BlockchainAddress getWalletAddress() { - return walletAddress; - } - - public void setWalletAddress(BlockchainAddress walletAddress) { - this.walletAddress = walletAddress; - } - - public static class Builder { - private TravelRuleWalletType walletType; - - private BlockchainAddress walletAddress; - - public Builder walletType(TravelRuleWalletType walletType) { - this.walletType = walletType; - return this; - } - - public Builder walletAddress(BlockchainAddress walletAddress) { - this.walletAddress = walletAddress; - return this; - } - - public TravelRuleWalletDetails build() { - return new TravelRuleWalletDetails(this); - } - } -} diff --git a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java index 9ffddca..00f0e8e 100644 --- a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java @@ -27,7 +27,6 @@ public class UnstakingStatus { /** Amount being unstaked (whole amount, e.g., 16 ETH) */ - @JsonProperty("amount") private String amount; @JsonProperty("unstake_type") diff --git a/src/main/java/com/coinbase/prime/model/UserAction.java b/src/main/java/com/coinbase/prime/model/UserAction.java index 7bb184a..dc04a1f 100644 --- a/src/main/java/com/coinbase/prime/model/UserAction.java +++ b/src/main/java/com/coinbase/prime/model/UserAction.java @@ -25,7 +25,6 @@ public class UserAction { /** Action is the available user action types */ - @JsonProperty("action") private Action action; /** Id of the user who executed the action */ @@ -33,7 +32,6 @@ public class UserAction { private String userId; /** Time the action was taken */ - @JsonProperty("timestamp") private String timestamp; public UserAction() {} diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java index d75d763..633cb80 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -32,7 +32,6 @@ public class ValidatorAllocation { private String validatorAddress; /** Amount for performing staking operations with this validator */ - @JsonProperty("amount") private String amount; public ValidatorAllocation() {} diff --git a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java index c2f86e7..066b625 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java @@ -29,7 +29,6 @@ public class ValidatorStakingInfo { private String validatorAddress; /** List of active staking requests for this validator */ - @JsonProperty("statuses") private List statuses; public ValidatorStakingInfo() {} diff --git a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java index 351b901..366a346 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java @@ -29,7 +29,6 @@ public class ValidatorUnstakingInfo { private String validatorAddress; /** List of active unstaking requests for this validator */ - @JsonProperty("statuses") private List statuses; public ValidatorUnstakingInfo() {} diff --git a/src/main/java/com/coinbase/prime/model/Vasp.java b/src/main/java/com/coinbase/prime/model/Vasp.java deleted file mode 100644 index f3b66db..0000000 --- a/src/main/java/com/coinbase/prime/model/Vasp.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2025-present Coinbase Global, Inc. - * - * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Do not edit the class manually. - */ - -package com.coinbase.prime.model; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public class Vasp { - @JsonProperty("id") - private String id; - - @JsonProperty("country_code") - private String countryCode; - - @JsonProperty("lei_number") - private String leiNumber; - - public Vasp() {} - - public Vasp(Builder builder) { - this.id = builder.id; - this.countryCode = builder.countryCode; - this.leiNumber = builder.leiNumber; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getCountryCode() { - return countryCode; - } - - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - - public String getLeiNumber() { - return leiNumber; - } - - public void setLeiNumber(String leiNumber) { - this.leiNumber = leiNumber; - } - - public static class Builder { - private String id; - - private String countryCode; - - private String leiNumber; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } - - public Builder leiNumber(String leiNumber) { - this.leiNumber = leiNumber; - return this; - } - - public Vasp build() { - return new Vasp(this); - } - } -} diff --git a/src/main/java/com/coinbase/prime/model/Wallet.java b/src/main/java/com/coinbase/prime/model/Wallet.java index e27b565..0fbd64c 100644 --- a/src/main/java/com/coinbase/prime/model/Wallet.java +++ b/src/main/java/com/coinbase/prime/model/Wallet.java @@ -27,22 +27,18 @@ public class Wallet { /** The unique UUID for the wallet */ - @JsonProperty("id") private String id; /** The name of the wallet */ - @JsonProperty("name") private String name; /** The asset stored in the wallet */ - @JsonProperty("symbol") private String symbol; /** * - VAULT: A crypto vault - TRADING: A trading wallet - WALLET_TYPE_OTHER: Other wallet types * (like consumer, etc) - QC: A QC Wallet - ONCHAIN: An Onchain wallet */ - @JsonProperty("type") private WalletType type; /** The UTC timestamp when this wallet was created */ @@ -50,13 +46,10 @@ public class Wallet { private OffsetDateTime createdAt; /** The active address of the wallet */ - @JsonProperty("address") private String address; - @JsonProperty("visibility") private WalletVisibility visibility; - @JsonProperty("network") private Network network; public Wallet() {} diff --git a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java index a834162..9f3e95b 100644 --- a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java @@ -20,8 +20,6 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - /** * WalletClaimRewardsInputs contains the custom inputs for claim rewards operations on a wallet. * Requirements and supported fields vary by asset type. @@ -31,7 +29,6 @@ public class WalletClaimRewardsInputs { * Optional amount to claim rewards (ETH only). If omitted, the wallet will claim the maximum * amount available */ - @JsonProperty("amount") private String amount; public WalletClaimRewardsInputs() {} diff --git a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java index 3ee8ebb..bc7bc5e 100644 --- a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java @@ -25,11 +25,9 @@ public class WalletCryptoDepositInstructions { /** The ID of the wallet */ - @JsonProperty("id") private String id; /** The name of the wallet */ - @JsonProperty("name") private String name; /** @@ -37,11 +35,9 @@ public class WalletCryptoDepositInstructions { * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - * SEPA: A SEPA deposit (Single Euro Payments Area) */ - @JsonProperty("type") private WalletDepositInstructionType type; /** The address of the wallet */ - @JsonProperty("address") private String address; /** @@ -52,13 +48,12 @@ public class WalletCryptoDepositInstructions { /** * The blockchain network's terminology for the unique identifier used to identify the receiver of - * the transaction (different blockchain networks use different names, such as - * `destination_tag` or `memo`) + * the transaction (different blockchain networks use different names, such as `destination_tag` + * or `memo`) */ @JsonProperty("account_identifier_name") private String accountIdentifierName; - @JsonProperty("network") private Network network; public WalletCryptoDepositInstructions() {} diff --git a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java index f721dd1..37af5a1 100644 --- a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java @@ -25,11 +25,9 @@ public class WalletFiatDepositInstructions { /** The id of the wallet */ - @JsonProperty("id") private String id; /** The name of the wallet */ - @JsonProperty("name") private String name; /** @@ -37,7 +35,6 @@ public class WalletFiatDepositInstructions { * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - * SEPA: A SEPA deposit (Single Euro Payments Area) */ - @JsonProperty("type") private WalletDepositInstructionType type; /** The fiat account number */ diff --git a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java index c223682..a95a5da 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java @@ -31,7 +31,6 @@ public class WalletStakeInputs { * Optional amount to stake (ETH only). If omitted, the wallet will stake the maximum amount * available */ - @JsonProperty("amount") private String amount; /** diff --git a/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java new file mode 100644 index 0000000..bd3fd6f --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java @@ -0,0 +1,67 @@ +/* + * 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; + +/** + * WalletStakingMetadata contains optional metadata for wallet staking requests. external_id tags + * the discrete TWS transaction stake/unstake create; automatic reward crediting (e.g. SOL + * inflation) does not produce one. StakingClaimRewardsRequest intentionally omits this field; add + * metadata to claim rewards only if a supported network's claim flow creates a discrete TWS + * transaction clients need to tag. + */ +public class WalletStakingMetadata { + /** + * An optional custom identifier (up to 255 bytes) to attach to the transaction. This is not a + * searchable transaction field. Retries with the same idempotency_key must use the same + * external_id; a differing value on retry will be silently ignored. + */ + @JsonProperty("external_id") + private String externalId; + + public WalletStakingMetadata() {} + + public WalletStakingMetadata(Builder builder) { + this.externalId = builder.externalId; + } + + public String getExternalId() { + return externalId; + } + + public void setExternalId(String externalId) { + this.externalId = externalId; + } + + public static class Builder { + private String externalId; + + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; + } + + public WalletStakingMetadata build() { + return new WalletStakingMetadata(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java index 06d8350..d7186ab 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -32,7 +32,6 @@ public class WalletUnstakeInputs { * Optional amount to unstake (ETH only). If omitted, the wallet will unstake the maximum amount * available */ - @JsonProperty("amount") private String amount; /** diff --git a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java index 1ed7dc5..d19e178 100644 --- a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java +++ b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java @@ -20,15 +20,11 @@ package com.coinbase.prime.model; -import com.fasterxml.jackson.annotation.JsonProperty; - public class WithdrawalPower { /** The currency symbol */ - @JsonProperty("symbol") private String symbol; /** Withdrawal power */ - @JsonProperty("amount") private String amount; public WithdrawalPower() {} diff --git a/src/main/java/com/coinbase/prime/model/XmLoan.java b/src/main/java/com/coinbase/prime/model/XMLoan.java similarity index 89% rename from src/main/java/com/coinbase/prime/model/XmLoan.java rename to src/main/java/com/coinbase/prime/model/XMLoan.java index 42073b8..e8111f3 100644 --- a/src/main/java/com/coinbase/prime/model/XmLoan.java +++ b/src/main/java/com/coinbase/prime/model/XMLoan.java @@ -20,17 +20,22 @@ package com.coinbase.prime.model; -import com.coinbase.prime.model.enums.XmParty; +import com.coinbase.prime.model.enums.XMParty; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -public class XmLoan { +/** XMLoan contains details about a Cross Margin loan */ +public class XMLoan { /** Financing loan UUID */ @JsonProperty("loan_id") private String loanId; + /** + * - CBE: Coinbase Exchange, trading venue that can receive the XM loan - FCM: Coinbase’s Futures + * Commission Merchant, trading venue that can receive the XM loan + */ @JsonProperty("loan_party") - private XmParty loanParty; + private XMParty loanParty; /** Loan principal currency */ @JsonProperty("principal_currency") @@ -56,9 +61,9 @@ public class XmLoan { @JsonProperty("updated_at") private OffsetDateTime updatedAt; - public XmLoan() {} + public XMLoan() {} - public XmLoan(Builder builder) { + public XMLoan(Builder builder) { this.loanId = builder.loanId; this.loanParty = builder.loanParty; this.principalCurrency = builder.principalCurrency; @@ -77,11 +82,11 @@ public void setLoanId(String loanId) { this.loanId = loanId; } - public XmParty getLoanParty() { + public XMParty getLoanParty() { return loanParty; } - public void setLoanParty(XmParty loanParty) { + public void setLoanParty(XMParty loanParty) { this.loanParty = loanParty; } @@ -136,7 +141,7 @@ public void setUpdatedAt(OffsetDateTime updatedAt) { public static class Builder { private String loanId; - private XmParty loanParty; + private XMParty loanParty; private String principalCurrency; @@ -155,7 +160,7 @@ public Builder loanId(String loanId) { return this; } - public Builder loanParty(XmParty loanParty) { + public Builder loanParty(XMParty loanParty) { this.loanParty = loanParty; return this; } @@ -190,8 +195,8 @@ public Builder updatedAt(OffsetDateTime updatedAt) { return this; } - public XmLoan build() { - return new XmLoan(this); + public XMLoan build() { + return new XMLoan(this); } } } diff --git a/src/main/java/com/coinbase/prime/model/XmMarginCall.java b/src/main/java/com/coinbase/prime/model/XMMarginCall.java similarity index 65% rename from src/main/java/com/coinbase/prime/model/XmMarginCall.java rename to src/main/java/com/coinbase/prime/model/XMMarginCall.java index 0263409..2b73ff1 100644 --- a/src/main/java/com/coinbase/prime/model/XmMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/XMMarginCall.java @@ -20,19 +20,19 @@ package com.coinbase.prime.model; -import com.coinbase.prime.model.enums.XmCallStatus; -import com.coinbase.prime.model.enums.XmCallType; -import com.coinbase.prime.model.enums.XmMarginLevel; +import com.coinbase.prime.model.enums.XMCallStatus; +import com.coinbase.prime.model.enums.XMCallType; +import com.coinbase.prime.model.enums.XMMarginLevel; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -public class XmMarginCall { +/** XMMarginCall contains details about a margin call in Cross Margin */ +public class XMMarginCall { /** Financing margin call UUID */ @JsonProperty("margin_call_id") private String marginCallId; /** Margin call currency */ - @JsonProperty("currency") private String currency; /** Call amount (notional) as of the margin call creation */ @@ -43,17 +43,40 @@ public class XmMarginCall { @JsonProperty("outstanding_notional_amount") private String outstandingNotionalAmount; + /** + * - CALL_TYPE_STANDARD: Evaluated at standard margin call evaluation time - CALL_TYPE_URGENT: + * Evaluated in realtime - CALL_TYPE_DEBIT: Evaluated at debit call evaluation time + */ @JsonProperty("margin_call_type") - private XmCallType marginCallType; + private XMCallType marginCallType; + /** + * - CALL_STATUS_OPEN: Margin call is open and not expired - CALL_STATUS_AGED: Margin call is open + * and it is expired - CALL_STATUS_SETTLED: Margin call is fully settled - CALL_STATUS_CANCELED: + * Margin call was canceled by Credit Risk + */ @JsonProperty("margin_call_status") - private XmCallStatus marginCallStatus; - + private XMCallStatus marginCallStatus; + + /** + * - HEALTHY_THRESHOLD: Margin level is healthy - DEFICIT_THRESHOLD: Margin level is breaching the + * deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the + * case by the scheduled next Margin Call time (as defined in the margin methodology) - + * WARNING_THRESHOLD: Margin level is breaching the warning threshold (WT) which will result in + * the issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as + * defined in the margin methodology). WT is differentiated from DT in that it means margin health + * is approaching the UMCT - URGENT_MARGIN_CALL_THRESHOLD: Margin level is breaching the UMCT and, + * as defined in the margin methodology, this will trigger an urgent margin call - + * LIQUIDATION_THRESHOLD: Margin level is breaching the liquidation threshold (LT) and, as defined + * in the margin methodology, this will trigger the SESSION_LOCKED control status and liquidation + * may commence. + */ @JsonProperty("called_with_margin_level") - private XmMarginLevel calledWithMarginLevel; + private XMMarginLevel calledWithMarginLevel; + /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ @JsonProperty("called_with_margin_summary") - private XmSummary calledWithMarginSummary; + private XMSummary calledWithMarginSummary; /** Timestamp when the margin call settlement is due */ @JsonProperty("due_at") @@ -67,9 +90,9 @@ public class XmMarginCall { @JsonProperty("updated_at") private OffsetDateTime updatedAt; - public XmMarginCall() {} + public XMMarginCall() {} - public XmMarginCall(Builder builder) { + public XMMarginCall(Builder builder) { this.marginCallId = builder.marginCallId; this.currency = builder.currency; this.initialNotionalAmount = builder.initialNotionalAmount; @@ -115,35 +138,35 @@ public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { this.outstandingNotionalAmount = outstandingNotionalAmount; } - public XmCallType getMarginCallType() { + public XMCallType getMarginCallType() { return marginCallType; } - public void setMarginCallType(XmCallType marginCallType) { + public void setMarginCallType(XMCallType marginCallType) { this.marginCallType = marginCallType; } - public XmCallStatus getMarginCallStatus() { + public XMCallStatus getMarginCallStatus() { return marginCallStatus; } - public void setMarginCallStatus(XmCallStatus marginCallStatus) { + public void setMarginCallStatus(XMCallStatus marginCallStatus) { this.marginCallStatus = marginCallStatus; } - public XmMarginLevel getCalledWithMarginLevel() { + public XMMarginLevel getCalledWithMarginLevel() { return calledWithMarginLevel; } - public void setCalledWithMarginLevel(XmMarginLevel calledWithMarginLevel) { + public void setCalledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { this.calledWithMarginLevel = calledWithMarginLevel; } - public XmSummary getCalledWithMarginSummary() { + public XMSummary getCalledWithMarginSummary() { return calledWithMarginSummary; } - public void setCalledWithMarginSummary(XmSummary calledWithMarginSummary) { + public void setCalledWithMarginSummary(XMSummary calledWithMarginSummary) { this.calledWithMarginSummary = calledWithMarginSummary; } @@ -180,13 +203,13 @@ public static class Builder { private String outstandingNotionalAmount; - private XmCallType marginCallType; + private XMCallType marginCallType; - private XmCallStatus marginCallStatus; + private XMCallStatus marginCallStatus; - private XmMarginLevel calledWithMarginLevel; + private XMMarginLevel calledWithMarginLevel; - private XmSummary calledWithMarginSummary; + private XMSummary calledWithMarginSummary; private OffsetDateTime dueAt; @@ -214,22 +237,22 @@ public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { return this; } - public Builder marginCallType(XmCallType marginCallType) { + public Builder marginCallType(XMCallType marginCallType) { this.marginCallType = marginCallType; return this; } - public Builder marginCallStatus(XmCallStatus marginCallStatus) { + public Builder marginCallStatus(XMCallStatus marginCallStatus) { this.marginCallStatus = marginCallStatus; return this; } - public Builder calledWithMarginLevel(XmMarginLevel calledWithMarginLevel) { + public Builder calledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { this.calledWithMarginLevel = calledWithMarginLevel; return this; } - public Builder calledWithMarginSummary(XmSummary calledWithMarginSummary) { + public Builder calledWithMarginSummary(XMSummary calledWithMarginSummary) { this.calledWithMarginSummary = calledWithMarginSummary; return this; } @@ -249,8 +272,8 @@ public Builder updatedAt(OffsetDateTime updatedAt) { return this; } - public XmMarginCall build() { - return new XmMarginCall(this); + public XMMarginCall build() { + return new XMMarginCall(this); } } } diff --git a/src/main/java/com/coinbase/prime/model/XmPosition.java b/src/main/java/com/coinbase/prime/model/XMPosition.java similarity index 98% rename from src/main/java/com/coinbase/prime/model/XmPosition.java rename to src/main/java/com/coinbase/prime/model/XMPosition.java index c18037b..4dbdd7a 100644 --- a/src/main/java/com/coinbase/prime/model/XmPosition.java +++ b/src/main/java/com/coinbase/prime/model/XMPosition.java @@ -22,9 +22,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; -public class XmPosition { +/** XMPosition */ +public class XMPosition { /** Position currency */ - @JsonProperty("currency") private String currency; /** Current market price */ @@ -123,9 +123,9 @@ public class XmPosition { @JsonProperty("total_position_margin") private String totalPositionMargin; - public XmPosition() {} + public XMPosition() {} - public XmPosition(Builder builder) { + public XMPosition(Builder builder) { this.currency = builder.currency; this.marketPrice = builder.marketPrice; this.marginEligible = builder.marginEligible; @@ -529,8 +529,8 @@ public Builder totalPositionMargin(String totalPositionMargin) { return this; } - public XmPosition build() { - return new XmPosition(this); + public XMPosition build() { + return new XMPosition(this); } } } diff --git a/src/main/java/com/coinbase/prime/model/XmRiskNettingInfo.java b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java similarity index 91% rename from src/main/java/com/coinbase/prime/model/XmRiskNettingInfo.java rename to src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java index f727c93..28157e3 100644 --- a/src/main/java/com/coinbase/prime/model/XmRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java @@ -23,13 +23,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -public class XmRiskNettingInfo { +public class XMRiskNettingInfo { /** * Derivatives Clearing Organization Margin Requirement (DMR) is the margin requirement for all * futures positions, derived from the Derivatives Clearing Organization model */ - @JsonProperty("nodal_margin_requirement") - private String nodalMarginRequirement; + @JsonProperty("dco_margin_requirement") + private String dcoMarginRequirement; /** * Portfolio Margin Requirement (PMR) is the margin requirement for all spot positions, derived @@ -90,12 +90,12 @@ public class XmRiskNettingInfo { /** Netted positions used in the model calculation */ @JsonProperty("xm_positions") - private List xmPositions; + private List xmPositions; - public XmRiskNettingInfo() {} + public XMRiskNettingInfo() {} - public XmRiskNettingInfo(Builder builder) { - this.nodalMarginRequirement = builder.nodalMarginRequirement; + public XMRiskNettingInfo(Builder builder) { + this.dcoMarginRequirement = builder.dcoMarginRequirement; this.portfolioMarginRequirement = builder.portfolioMarginRequirement; this.integratedPortfolioMarginRequirement = builder.integratedPortfolioMarginRequirement; this.ineligibleFuturesMarginRequirement = builder.ineligibleFuturesMarginRequirement; @@ -111,12 +111,12 @@ public XmRiskNettingInfo(Builder builder) { this.xmPositions = builder.xmPositions; } - public String getNodalMarginRequirement() { - return nodalMarginRequirement; + public String getDcoMarginRequirement() { + return dcoMarginRequirement; } - public void setNodalMarginRequirement(String nodalMarginRequirement) { - this.nodalMarginRequirement = nodalMarginRequirement; + public void setDcoMarginRequirement(String dcoMarginRequirement) { + this.dcoMarginRequirement = dcoMarginRequirement; } public String getPortfolioMarginRequirement() { @@ -215,16 +215,16 @@ public void setAllIntegratedScenarioAddons(List allIntegratedScenar this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; } - public List getXmPositions() { + public List getXmPositions() { return xmPositions; } - public void setXmPositions(List xmPositions) { + public void setXmPositions(List xmPositions) { this.xmPositions = xmPositions; } public static class Builder { - private String nodalMarginRequirement; + private String dcoMarginRequirement; private String portfolioMarginRequirement; @@ -250,10 +250,10 @@ public static class Builder { private List allIntegratedScenarioAddons; - private List xmPositions; + private List xmPositions; - public Builder nodalMarginRequirement(String nodalMarginRequirement) { - this.nodalMarginRequirement = nodalMarginRequirement; + public Builder dcoMarginRequirement(String dcoMarginRequirement) { + this.dcoMarginRequirement = dcoMarginRequirement; return this; } @@ -318,13 +318,13 @@ public Builder allIntegratedScenarioAddons(List allIntegratedScenar return this; } - public Builder xmPositions(List xmPositions) { + public Builder xmPositions(List xmPositions) { this.xmPositions = xmPositions; return this; } - public XmRiskNettingInfo build() { - return new XmRiskNettingInfo(this); + public XMRiskNettingInfo build() { + return new XMRiskNettingInfo(this); } } } diff --git a/src/main/java/com/coinbase/prime/model/XmSummary.java b/src/main/java/com/coinbase/prime/model/XMSummary.java similarity index 90% rename from src/main/java/com/coinbase/prime/model/XmSummary.java rename to src/main/java/com/coinbase/prime/model/XMSummary.java index 0558933..69c3cb5 100644 --- a/src/main/java/com/coinbase/prime/model/XmSummary.java +++ b/src/main/java/com/coinbase/prime/model/XMSummary.java @@ -22,7 +22,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; -public class XmSummary { +/** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ +public class XMSummary { /** Cross Margin Margin Requirement (XMMR) notional */ @JsonProperty("margin_requirement") private String marginRequirement; @@ -31,7 +32,7 @@ public class XmSummary { @JsonProperty("account_equity") private String accountEquity; - /** Equity - XMMR (margin excess is > 0) */ + /** Equity - XMMR (margin excess is > 0) */ @JsonProperty("margin_excess_shortfall") private String marginExcessShortfall; @@ -56,11 +57,11 @@ public class XmSummary { private String futuresEquity; @JsonProperty("risk_netting_info") - private XmRiskNettingInfo riskNettingInfo; + private XMRiskNettingInfo riskNettingInfo; - public XmSummary() {} + public XMSummary() {} - public XmSummary(Builder builder) { + public XMSummary(Builder builder) { this.marginRequirement = builder.marginRequirement; this.accountEquity = builder.accountEquity; this.marginExcessShortfall = builder.marginExcessShortfall; @@ -136,11 +137,11 @@ public void setFuturesEquity(String futuresEquity) { this.futuresEquity = futuresEquity; } - public XmRiskNettingInfo getRiskNettingInfo() { + public XMRiskNettingInfo getRiskNettingInfo() { return riskNettingInfo; } - public void setRiskNettingInfo(XmRiskNettingInfo riskNettingInfo) { + public void setRiskNettingInfo(XMRiskNettingInfo riskNettingInfo) { this.riskNettingInfo = riskNettingInfo; } @@ -161,7 +162,7 @@ public static class Builder { private String futuresEquity; - private XmRiskNettingInfo riskNettingInfo; + private XMRiskNettingInfo riskNettingInfo; public Builder marginRequirement(String marginRequirement) { this.marginRequirement = marginRequirement; @@ -203,13 +204,13 @@ public Builder futuresEquity(String futuresEquity) { return this; } - public Builder riskNettingInfo(XmRiskNettingInfo riskNettingInfo) { + public Builder riskNettingInfo(XMRiskNettingInfo riskNettingInfo) { this.riskNettingInfo = riskNettingInfo; return this; } - public XmSummary build() { - return new XmSummary(this); + public XMSummary build() { + return new XMSummary(this); } } } diff --git a/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java b/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java index 4f2d07a..6060750 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java @@ -26,10 +26,13 @@ */ public enum ActivitySecondaryType { NO_SECONDARY_TYPE, + /** Order secondary types */ ACTIVITY_SECONDARY_TYPE_BUY, ACTIVITY_SECONDARY_TYPE_SELL, + /** Transaction secondary types */ ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER, ACTIVITY_SECONDARY_TYPE_SWEEP_TRANSFER_TYPE, + /** Onchain secondary types */ ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER, ACTIVITY_SECONDARY_TYPE_WEB3_WALLET } diff --git a/src/main/java/com/coinbase/prime/model/enums/DestinationType.java b/src/main/java/com/coinbase/prime/model/enums/DestinationType.java index aa950b7..49da002 100644 --- a/src/main/java/com/coinbase/prime/model/enums/DestinationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/DestinationType.java @@ -27,8 +27,12 @@ * withdrawals endpoint only transfers - DESTINATION_COUNTERPARTY: Counterparty ID */ public enum DestinationType { + /** A fiat bank account linked to a payment method id via Payment Method Service */ DESTINATION_PAYMENT_METHOD, + /** A blockchain network address */ DESTINATION_BLOCKCHAIN, + /** An on platform wallet UUID */ DESTINATION_WALLET, + /** Counterparty ID */ DESTINATION_COUNTERPARTY } diff --git a/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java b/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java index f3fda92..9249e41 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java @@ -27,9 +27,14 @@ * across networks and wallet types (vault + trading + prime custody) */ public enum PortfolioBalanceType { + /** Trading balances */ TRADING_BALANCES, + /** Vault balances */ VAULT_BALANCES, + /** Total balances (The sum of vault and trading + prime custody) */ TOTAL_BALANCES, + /** Prime custody balances */ PRIME_CUSTODY_BALANCES, + /** Unified total balance across networks and wallet types (vault + trading + prime custody) */ UNIFIED_TOTAL_BALANCES } diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java index 18fb306..d9ce8e9 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java @@ -1,24 +1,47 @@ /* * 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 + * 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. + * 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; +/** + * - TRADES_AND_WITHDRAWALS: Allowed to trade and withdraw. See XM Margin Methodology for full + * description of when trading and withdrawals are enabled or disabled. - TRADES_ONLY: Allowed to + * trade but not withdraw. See XM Margin Methodology for full description of when trading and + * withdrawals are enabled or disabled. - SESSION_LOCKED: Not allowed to trade or withdraw. See XM + * Margin Methodology for full description of when trading and withdrawals are enabled or disabled. + */ public enum PrimeXMControlStatus { XM_CONTROL_STATUS_UNSPECIFIED, + /** + * Allowed to trade and withdraw. See XM Margin Methodology for full description of when trading + * and withdrawals are enabled or disabled. + */ TRADES_AND_WITHDRAWALS, + /** + * Allowed to trade but not withdraw. See XM Margin Methodology for full description of when + * trading and withdrawals are enabled or disabled. + */ TRADES_ONLY, + /** + * Not allowed to trade or withdraw. See XM Margin Methodology for full description of when + * trading and withdrawals are enabled or disabled. + */ SESSION_LOCKED } diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java new file mode 100644 index 0000000..d7a7825 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java @@ -0,0 +1,70 @@ +/* + * 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.enums; + +/** + * - HEALTH_STATUS_HEALTHY: Margin level is healthy. - HEALTH_STATUS_WARNING: Margin level is + * breaching the warning threshold (WT) which will result in the issuance of a Margin Call if this + * is still the case by the scheduled next Margin Call (as defined in the margin methodology). WT is + * differentiated from DT in that it means margin health is approaching the UMCT. - + * HEALTH_STATUS_CRITICAL: Margin level is breaching the UMCT and, as defined in the margin + * methodology, this will trigger an urgent margin call. - HEALTH_STATUS_SUSPENDED: Trading and + * withdrawals are suspended per XM margin methodology. - HEALTH_STATUS_RESTRICTED: Account is in a + * restricted state per XM margin methodology. - HEALTH_STATUS_PRE_LIQUIDATION: Margin level is + * breaching the liquidation threshold (LT) and, as defined in the margin methodology, this will + * trigger the SESSION_LOCKED control status and liquidation may commence. - + * HEALTH_STATUS_LIQUIDATING: Liquidation has commenced. - HEALTH_STATUS_IN_DEFICIT: Margin level is + * breaching the deficit threshold (DT) which will result in the issuance of a Margin Call if this + * is still the case by the scheduled next Margin Call time (as defined in the margin methodology). + */ +public enum PrimeXMHealthStatus { + /** Margin level is healthy. */ + HEALTH_STATUS_HEALTHY, + /** + * Margin level is breaching the warning threshold (WT) which will result in the issuance of a + * Margin Call if this is still the case by the scheduled next Margin Call (as defined in the + * margin methodology). WT is differentiated from DT in that it means margin health is approaching + * the UMCT. + */ + HEALTH_STATUS_WARNING, + /** + * Margin level is breaching the UMCT and, as defined in the margin methodology, this will trigger + * an urgent margin call. + */ + HEALTH_STATUS_CRITICAL, + /** Trading and withdrawals are suspended per XM margin methodology. */ + HEALTH_STATUS_SUSPENDED, + /** Account is in a restricted state per XM margin methodology. */ + HEALTH_STATUS_RESTRICTED, + /** + * Margin level is breaching the liquidation threshold (LT) and, as defined in the margin + * methodology, this will trigger the SESSION_LOCKED control status and liquidation may commence. + */ + HEALTH_STATUS_PRE_LIQUIDATION, + /** Liquidation has commenced. */ + HEALTH_STATUS_LIQUIDATING, + /** + * Margin level is breaching the deficit threshold (DT) which will result in the issuance of a + * Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the + * margin methodology). + */ + HEALTH_STATUS_IN_DEFICIT +} diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java index 5c3fed4..da157e9 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java @@ -1,26 +1,63 @@ /* * 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 + * 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. + * 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; +/** + * - HEALTHY_THRESHOLD: Margin level is healthy - DEFICIT_THRESHOLD: Margin level is breaching the + * deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the + * case by the scheduled next Margin Call time (as defined in the margin methodology) - + * WARNING_THRESHOLD: Margin level is breaching the warning threshold (WT) which will result in the + * issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as defined + * in the margin methodology). WT is differentiated from DT in that it means margin health is + * approaching the UMCT - URGENT_MARGIN_CALL_THRESHOLD: Margin level is breaching the UMCT and, as + * defined in the margin methodology, this will trigger an urgent margin call - + * LIQUIDATION_THRESHOLD: Margin level is breaching the liquidation threshold (LT) and, as defined + * in the margin methodology, this will trigger the SESSION_LOCKED control status and liquidation + * may commence. + */ public enum PrimeXMMarginLevel { XM_MARGIN_LEVEL_UNSPECIFIED, + /** Margin level is healthy */ HEALTHY_THRESHOLD, + /** + * Margin level is breaching the deficit threshold (DT) which will result in the issuance of a + * Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the + * margin methodology) + */ + DEFICIT_THRESHOLD, + /** + * Margin level is breaching the warning threshold (WT) which will result in the issuance of a + * Margin Call if this is still the case by the scheduled next Margin Call (as defined in the + * margin methodology). WT is differentiated from DT in that it means margin health is approaching + * the UMCT + */ WARNING_THRESHOLD, + /** + * Margin level is breaching the UMCT and, as defined in the margin methodology, this will trigger + * an urgent margin call + */ URGENT_MARGIN_CALL_THRESHOLD, - LIQUIDATION_THRESHOLD, - DEFICIT_THRESHOLD + /** + * Margin level is breaching the liquidation threshold (LT) and, as defined in the margin + * methodology, this will trigger the SESSION_LOCKED control status and liquidation may commence. + */ + LIQUIDATION_THRESHOLD } diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java new file mode 100644 index 0000000..75a9fab --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java @@ -0,0 +1,38 @@ +/* + * 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.enums; + +/** + * - MARGIN_REQUIREMENT_TYPE_DMR_PLUS_PMR: Integrated (netted) cross-margin requirement for spot + * assets and all derivatives contracts. - MARGIN_REQUIREMENT_TYPE_IPMR_PLUS_IFMR: Combined + * cross-margin requirement: Integrated Portfolio Margin (IPMR) plus Ineligible Futures Margin + * (IFMR). + */ +public enum PrimeXMMarginRequirementType { + MARGIN_REQUIREMENT_TYPE_UNSPECIFIED, + /** Integrated (netted) cross-margin requirement for spot assets and all derivatives contracts. */ + MARGIN_REQUIREMENT_TYPE_DMR_PLUS_PMR, + /** + * Combined cross-margin requirement: Integrated Portfolio Margin (IPMR) plus Ineligible Futures + * Margin (IFMR). + */ + MARGIN_REQUIREMENT_TYPE_IPMR_PLUS_IFMR +} diff --git a/src/main/java/com/coinbase/prime/model/enums/XmEntityCallStatus.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java similarity index 51% rename from src/main/java/com/coinbase/prime/model/enums/XmEntityCallStatus.java rename to src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java index f42e8c0..574c096 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XmEntityCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.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 * @@ -20,11 +20,19 @@ package com.coinbase.prime.model.enums; -public enum XmEntityCallStatus { - XM_ENTITY_CALL_STATUS_UNSPECIFIED, - ENTITY_NO_CALL, - ENTITY_OPEN_STANDARD_CALL, - ENTITY_OPEN_URGENT_CALL, - ENTITY_AGED_CALL, - ENTITY_OPEN_DEBIT_CALL +/** + * - MARGIN_THRESHOLD_EQUITY_RATIO: Threshold based on equity ratio EQ / MR; triggers when EQ / MR + * >= threshold_value. - MARGIN_THRESHOLD_DEFICIT_RATIO: Threshold based on deficit ratio (MR - EQ) + * / XMML; triggers when (MR - EQ) / XMML > threshold_value. + */ +public enum PrimeXMMarginThresholdType { + MARGIN_THRESHOLD_TYPE_UNSPECIFIED, + /** Threshold based on equity ratio EQ / MR; triggers when EQ / MR >= threshold_value. */ + MARGIN_THRESHOLD_EQUITY_RATIO, + /** + * Threshold based on deficit ratio (MR - EQ) / XMML; triggers when (MR - EQ) / XMML > + * threshold_value. + */ + MARGIN_THRESHOLD_DEFICIT_RATIO, + MARGIN_THRESHOLD_NONE } 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 dc3f3c3..e6ed11f 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java +++ b/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java @@ -28,7 +28,8 @@ * (consensus layer) rewards - TRANSACTION_REWARD: A transaction reward i.e. ethereum transaction * (execution layer) rewards - STAKING_FEE_REBATE_REWARD: A staking fee rebate reward i.e. coinbase * pays rebates for staking fees to eligible delegators - BUIDL_DIVIDEND: A BUIDL dividend reward - * i.e. dividends from BUIDL fund holdings + * i.e. dividends from BUIDL fund holdings - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward + * i.e. USDC reward payouts */ public enum RewardSubtype { /** A maximal extractable value reward */ @@ -44,5 +45,7 @@ public enum RewardSubtype { /** A staking fee rebate reward */ STAKING_FEE_REBATE_REWARD, /** A BUIDL dividend reward */ - BUIDL_DIVIDEND + BUIDL_DIVIDEND, + /** A custom stablecoin reward */ + CUSTOM_STABLECOIN_REWARD } diff --git a/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java b/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java index 785cc25..3d6c5b7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java @@ -25,6 +25,8 @@ * UNSIGNED: Transaction is unsigned */ public enum SigningStatus { + /** Transaction has been signed */ SIGNED, + /** Transaction is unsigned */ UNSIGNED } diff --git a/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java b/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java index b5bfc5f..6c0f6b8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java @@ -27,10 +27,16 @@ * addresses - COUNTERPARTY_ID: Counterparty ID */ public enum TransferLocationType { + /** The ID of a fiat payment method */ PAYMENT_METHOD, + /** The ID of a wallet */ WALLET, + /** A cryptocurrency address */ ADDRESS, + /** Another type of transfer location: Blockchain Network, Coinbase */ OTHER, + /** Multiple cryptocurrency addresses */ MULTIPLE_ADDRESSES, + /** Counterparty ID */ COUNTERPARTY_ID } diff --git a/src/main/java/com/coinbase/prime/model/enums/XmControlStatus.java b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java similarity index 52% rename from src/main/java/com/coinbase/prime/model/enums/XmControlStatus.java rename to src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java index 7271ac1..229a6f8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XmControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.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 * @@ -20,9 +20,18 @@ package com.coinbase.prime.model.enums; -public enum XmControlStatus { - XM_CONTROL_STATUS_UNSPECIFIED, - TRADES_AND_WITHDRAWALS, - TRADES_ONLY, - SESSION_LOCKED +/** + * ValidatorProvider enumerates the ETH validator service providers that PPA accepts on + * PortfolioStakingUnstakeRequest.validator_provider. The enum names map 1:1 to the display names + * returned by ISS GetUsedValidators (service_provider field) and shown in the Prime UI. Keep in + * sync with staking/internal/asset/ethereum.mapServiceProviderToDisplayName. + */ +public enum ValidatorProvider { + VALIDATOR_PROVIDER_UNSPECIFIED, + VALIDATOR_PROVIDER_COINBASE_CLOUD, + VALIDATOR_PROVIDER_MAVAN, + VALIDATOR_PROVIDER_FIGMENT, + VALIDATOR_PROVIDER_CODEFI, + VALIDATOR_PROVIDER_ATTESTANT, + VALIDATOR_PROVIDER_GALAXY } diff --git a/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java b/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java index 6ef458c..51a0dd7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java @@ -22,7 +22,10 @@ /** - UNKNOWN_VISIBILITY_STATUS: nil - VISIBLE: Visible - HIDDEN: Hidden - SPAM: Spam */ public enum VisibilityStatus { + /** Visible */ VISIBLE, + /** Hidden */ HIDDEN, + /** Spam */ SPAM } diff --git a/src/main/java/com/coinbase/prime/model/enums/XmCallStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java similarity index 66% rename from src/main/java/com/coinbase/prime/model/enums/XmCallStatus.java rename to src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java index 4805482..bf106e5 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XmCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java @@ -20,10 +20,19 @@ package com.coinbase.prime.model.enums; -public enum XmCallStatus { +/** + * - CALL_STATUS_OPEN: Margin call is open and not expired - CALL_STATUS_AGED: Margin call is open + * and it is expired - CALL_STATUS_SETTLED: Margin call is fully settled - CALL_STATUS_CANCELED: + * Margin call was canceled by Credit Risk + */ +public enum XMCallStatus { XM_CALL_STATUS_UNSPECIFIED, + /** Margin call is open and not expired */ CALL_STATUS_OPEN, + /** Margin call is open and it is expired */ CALL_STATUS_AGED, + /** Margin call is fully settled */ CALL_STATUS_SETTLED, + /** Margin call was canceled by Credit Risk */ CALL_STATUS_CANCELED } diff --git a/src/main/java/com/coinbase/prime/model/enums/XmCallType.java b/src/main/java/com/coinbase/prime/model/enums/XMCallType.java similarity index 71% rename from src/main/java/com/coinbase/prime/model/enums/XmCallType.java rename to src/main/java/com/coinbase/prime/model/enums/XMCallType.java index 03856d5..af71989 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XmCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallType.java @@ -20,9 +20,16 @@ package com.coinbase.prime.model.enums; -public enum XmCallType { +/** + * - CALL_TYPE_STANDARD: Evaluated at standard margin call evaluation time - CALL_TYPE_URGENT: + * Evaluated in realtime - CALL_TYPE_DEBIT: Evaluated at debit call evaluation time + */ +public enum XMCallType { XM_CALL_TYPE_UNSPECIFIED, + /** Evaluated at standard margin call evaluation time */ CALL_TYPE_STANDARD, + /** Evaluated in realtime */ CALL_TYPE_URGENT, + /** Evaluated at debit call evaluation time */ CALL_TYPE_DEBIT } diff --git a/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java new file mode 100644 index 0000000..c59d24d --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java @@ -0,0 +1,47 @@ +/* + * 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; + +/** + * - TRADES_AND_WITHDRAWALS: Allowed to trade and withdraw. See XM Margin Methodology for full + * description of when trading and withdrawals are enabled or disabled. - TRADES_ONLY: Allowed to + * trade but not withdraw. See XM Margin Methodology for full description of when trading and + * withdrawals are enabled or disabled. - SESSION_LOCKED: Not allowed to trade or withdraw. See XM + * Margin Methodology for full description of when trading and withdrawals are enabled or disabled. + */ +public enum XMControlStatus { + XM_CONTROL_STATUS_UNSPECIFIED, + /** + * Allowed to trade and withdraw. See XM Margin Methodology for full description of when trading + * and withdrawals are enabled or disabled. + */ + TRADES_AND_WITHDRAWALS, + /** + * Allowed to trade but not withdraw. See XM Margin Methodology for full description of when + * trading and withdrawals are enabled or disabled. + */ + TRADES_ONLY, + /** + * Not allowed to trade or withdraw. See XM Margin Methodology for full description of when + * trading and withdrawals are enabled or disabled. + */ + SESSION_LOCKED +} diff --git a/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java new file mode 100644 index 0000000..a5f3ca0 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java @@ -0,0 +1,58 @@ +/* + * 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; + +/** + * XMEntityCallStatus summarizes the state of open margin calls or debit calls. When multiple calls + * exist, the status reflects the highest priority call type. Priority order (highest to lowest): + * aged > urgent > standard > debit. - ENTITY_NO_CALL: There are no margin calls or debit calls. - + * ENTITY_OPEN_STANDARD_CALL: There is a standard margin call. There may also be debit calls, but + * there are no urgent margin calls or expired calls.. - ENTITY_OPEN_URGENT_CALL: There is an urgent + * margin call. There may also be standard margin calls or debit calls, but there are no expired + * calls. - ENTITY_AGED_CALL: At least one open margin call (standard or urgent) or debit call is + * aged. This will trigger the SESSION_LOCKED control status. - ENTITY_OPEN_DEBIT_CALL: There is a + * debit call. There are no standard margin calls, urgent margin calls, or expired calls. + */ +public enum XMEntityCallStatus { + XM_ENTITY_CALL_STATUS_UNSPECIFIED, + /** There are no margin calls or debit calls. */ + ENTITY_NO_CALL, + /** + * There is a standard margin call. There may also be debit calls, but there are no urgent margin + * calls or expired calls.. + */ + ENTITY_OPEN_STANDARD_CALL, + /** + * There is an urgent margin call. There may also be standard margin calls or debit calls, but + * there are no expired calls. + */ + ENTITY_OPEN_URGENT_CALL, + /** + * At least one open margin call (standard or urgent) or debit call is aged. This will trigger the + * SESSION_LOCKED control status. + */ + ENTITY_AGED_CALL, + /** + * There is a debit call. There are no standard margin calls, urgent margin calls, or expired + * calls. + */ + ENTITY_OPEN_DEBIT_CALL +} diff --git a/src/main/java/com/coinbase/prime/model/enums/XmLiquidationStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java similarity index 62% rename from src/main/java/com/coinbase/prime/model/enums/XmLiquidationStatus.java rename to src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java index 94bef3f..a969e58 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XmLiquidationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java @@ -20,11 +20,23 @@ package com.coinbase.prime.model.enums; -public enum XmLiquidationStatus { +/** + * - XM_LIQUIDATION_STATUS_PRE_LIQUIDATION: Liquidation is in the pre-liquidation phase - + * XM_LIQUIDATION_STATUS_LIQUIDATING: Liquidation is actively in progress - + * XM_LIQUIDATION_STATUS_LIQUIDATED: Liquidation has completed successfully - + * XM_LIQUIDATION_STATUS_CANCELED: Liquidation was canceled - XM_LIQUIDATION_STATUS_FAILED: + * Liquidation failed + */ +public enum XMLiquidationStatus { XM_LIQUIDATION_STATUS_UNSET, + /** Liquidation is in the pre-liquidation phase */ XM_LIQUIDATION_STATUS_PRE_LIQUIDATION, + /** Liquidation is actively in progress */ XM_LIQUIDATION_STATUS_LIQUIDATING, + /** Liquidation has completed successfully */ XM_LIQUIDATION_STATUS_LIQUIDATED, + /** Liquidation was canceled */ XM_LIQUIDATION_STATUS_CANCELED, + /** Liquidation failed */ XM_LIQUIDATION_STATUS_FAILED } diff --git a/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java b/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java new file mode 100644 index 0000000..025d3c4 --- /dev/null +++ b/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java @@ -0,0 +1,63 @@ +/* + * 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; + +/** + * - HEALTHY_THRESHOLD: Margin level is healthy - DEFICIT_THRESHOLD: Margin level is breaching the + * deficit threshold (DT) which will result in the issuance of a Margin Call if this is still the + * case by the scheduled next Margin Call time (as defined in the margin methodology) - + * WARNING_THRESHOLD: Margin level is breaching the warning threshold (WT) which will result in the + * issuance of a Margin Call if this is still the case by the scheduled next Margin Call (as defined + * in the margin methodology). WT is differentiated from DT in that it means margin health is + * approaching the UMCT - URGENT_MARGIN_CALL_THRESHOLD: Margin level is breaching the UMCT and, as + * defined in the margin methodology, this will trigger an urgent margin call - + * LIQUIDATION_THRESHOLD: Margin level is breaching the liquidation threshold (LT) and, as defined + * in the margin methodology, this will trigger the SESSION_LOCKED control status and liquidation + * may commence. + */ +public enum XMMarginLevel { + XM_MARGIN_LEVEL_UNSPECIFIED, + /** Margin level is healthy */ + HEALTHY_THRESHOLD, + /** + * Margin level is breaching the deficit threshold (DT) which will result in the issuance of a + * Margin Call if this is still the case by the scheduled next Margin Call time (as defined in the + * margin methodology) + */ + DEFICIT_THRESHOLD, + /** + * Margin level is breaching the warning threshold (WT) which will result in the issuance of a + * Margin Call if this is still the case by the scheduled next Margin Call (as defined in the + * margin methodology). WT is differentiated from DT in that it means margin health is approaching + * the UMCT + */ + WARNING_THRESHOLD, + /** + * Margin level is breaching the UMCT and, as defined in the margin methodology, this will trigger + * an urgent margin call + */ + URGENT_MARGIN_CALL_THRESHOLD, + /** + * Margin level is breaching the liquidation threshold (LT) and, as defined in the margin + * methodology, this will trigger the SESSION_LOCKED control status and liquidation may commence. + */ + LIQUIDATION_THRESHOLD +} diff --git a/src/main/java/com/coinbase/prime/model/enums/XmParty.java b/src/main/java/com/coinbase/prime/model/enums/XMParty.java similarity index 69% rename from src/main/java/com/coinbase/prime/model/enums/XmParty.java rename to src/main/java/com/coinbase/prime/model/enums/XMParty.java index e713ee7..c0807d7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XmParty.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMParty.java @@ -20,8 +20,14 @@ package com.coinbase.prime.model.enums; -public enum XmParty { +/** + * - CBE: Coinbase Exchange, trading venue that can receive the XM loan - FCM: Coinbase’s Futures + * Commission Merchant, trading venue that can receive the XM loan + */ +public enum XMParty { XM_PARTY_UNSPECIFIED, + /** Coinbase Exchange, trading venue that can receive the XM loan */ CBE, + /** Coinbase’s Futures Commission Merchant, trading venue that can receive the XM loan */ FCM } diff --git a/src/main/java/com/coinbase/prime/model/enums/XmMarginLevel.java b/src/main/java/com/coinbase/prime/model/enums/XmMarginLevel.java deleted file mode 100644 index 132a225..0000000 --- a/src/main/java/com/coinbase/prime/model/enums/XmMarginLevel.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2025-present Coinbase Global, Inc. - * - * This file is generated by Openapi Generator https://github.com/openapitools/openapi-generator - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Do not edit the class manually. - */ - -package com.coinbase.prime.model.enums; - -public enum XmMarginLevel { - XM_MARGIN_LEVEL_UNSPECIFIED, - HEALTHY_THRESHOLD, - DEFICIT_THRESHOLD, - WARNING_THRESHOLD, - URGENT_MARGIN_CALL_THRESHOLD, - LIQUIDATION_THRESHOLD -} From 915cd2d92ce9f6223b30f41d6e9a5e7770177fe0 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 8 Jun 2026 18:33:44 -0400 Subject: [PATCH 4/8] fix: align service requests with spec and remove legacy APIs Add staking metadata and validator provider fields, remove deprecated service aliases, and delete unused legacy request/response types superseded by canonical names. Co-authored-by: Cursor --- .../AdvancedTransferService.java | 18 -- .../AdvancedTransferServiceImpl.java | 16 -- .../GetPortfolioCounterpartyIdRequest.java | 66 ----- .../GetPortfolioCounterpartyIdResponse.java | 36 --- .../prime/futures/GetFcmEquityResponse.java | 4 +- .../prime/orders/AcceptQuoteRequest.java | 2 +- .../prime/orders/CreateOrderRequest.java | 10 +- .../prime/orders/EditOrderRequest.java | 8 +- .../prime/orders/GetOrderRequest.java | 88 ------- .../prime/orders/GetOrderResponse.java | 36 --- .../ListAggregatePositionsRequest.java | 85 ------- .../ListAggregatePositionsResponse.java | 48 ---- .../prime/positions/ListPositionsRequest.java | 85 ------- .../positions/ListPositionsResponse.java | 48 ---- .../prime/positions/PositionsService.java | 32 --- .../prime/positions/PositionsServiceImpl.java | 30 --- .../staking/ClaimStakingRewardsRequest.java | 125 --------- .../staking/ClaimStakingRewardsResponse.java | 57 ----- .../staking/CreatePortfolioStakeRequest.java | 139 ---------- .../staking/CreatePortfolioStakeResponse.java | 46 ---- .../CreatePortfolioUnstakeRequest.java | 139 ---------- .../CreatePortfolioUnstakeResponse.java | 46 ---- .../prime/staking/CreateStakeRequest.java | 19 ++ .../prime/staking/CreateUnstakeRequest.java | 19 ++ .../PortfolioStakingUnstakeRequest.java | 19 ++ .../transactions/CreateTransferRequest.java | 160 ------------ .../transactions/CreateTransferResponse.java | 134 ---------- .../transactions/CreateWithdrawalRequest.java | 237 ------------------ .../CreateWithdrawalResponse.java | 147 ----------- .../prime/users/ListUsersRequest.java | 84 ------- .../prime/users/ListUsersResponse.java | 48 ---- .../PositionsServiceSerializationTest.java | 33 +-- .../StakingServiceSerializationTest.java | 24 ++ 33 files changed, 107 insertions(+), 1981 deletions(-) delete mode 100644 src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java delete mode 100644 src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java delete mode 100644 src/main/java/com/coinbase/prime/orders/GetOrderRequest.java delete mode 100644 src/main/java/com/coinbase/prime/orders/GetOrderResponse.java delete mode 100644 src/main/java/com/coinbase/prime/positions/ListAggregatePositionsRequest.java delete mode 100644 src/main/java/com/coinbase/prime/positions/ListAggregatePositionsResponse.java delete mode 100644 src/main/java/com/coinbase/prime/positions/ListPositionsRequest.java delete mode 100644 src/main/java/com/coinbase/prime/positions/ListPositionsResponse.java delete mode 100644 src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsRequest.java delete mode 100644 src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsResponse.java delete mode 100644 src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeRequest.java delete mode 100644 src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeResponse.java delete mode 100644 src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeRequest.java delete mode 100644 src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeResponse.java delete mode 100644 src/main/java/com/coinbase/prime/transactions/CreateTransferRequest.java delete mode 100644 src/main/java/com/coinbase/prime/transactions/CreateTransferResponse.java delete mode 100644 src/main/java/com/coinbase/prime/transactions/CreateWithdrawalRequest.java delete mode 100644 src/main/java/com/coinbase/prime/transactions/CreateWithdrawalResponse.java delete mode 100644 src/main/java/com/coinbase/prime/users/ListUsersRequest.java delete mode 100644 src/main/java/com/coinbase/prime/users/ListUsersResponse.java diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java index ea3e317..04439c0 100644 --- a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java +++ b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java @@ -77,22 +77,4 @@ CancelAdvancedTransferResponse cancelAdvancedTransfer(CancelAdvancedTransferRequ ListAdvancedTransferTransactionsResponse listAdvancedTransferTransactions( ListAdvancedTransferTransactionsRequest request) throws CoinbaseClientException, CoinbasePrimeException; - - /** - * Get Portfolio Counterparty ID. - * - *

Retrieve the counterparty ID for a given portfolio - * - * @deprecated Prefer {@link - * com.coinbase.prime.portfolios.PortfoliosService#getPortfolioCounterpartyId(com.coinbase.prime.portfolios.GetPortfolioCounterpartyIdRequest)} - * — this route is scoped to portfolios in the REST API. - * @param request the request parameters for this operation - * @return the response payload for this operation - * @throws CoinbaseClientException if the request fails client-side validation - * @throws CoinbasePrimeException if the Prime API returns an error response - */ - @Deprecated - GetPortfolioCounterpartyIdResponse getPortfolioCounterpartyId( - GetPortfolioCounterpartyIdRequest request) - throws CoinbaseClientException, CoinbasePrimeException; } diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java index b208e5f..9531ca4 100644 --- a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java +++ b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java @@ -76,20 +76,4 @@ public ListAdvancedTransferTransactionsResponse listAdvancedTransferTransactions List.of(200), new TypeReference() {}); } - - /** - * @deprecated Prefer {@link - * com.coinbase.prime.portfolios.PortfoliosService#getPortfolioCounterpartyId} - */ - @Deprecated - @Override - public GetPortfolioCounterpartyIdResponse getPortfolioCounterpartyId( - GetPortfolioCounterpartyIdRequest request) throws CoinbasePrimeException { - return this.request( - HttpMethod.GET, - String.format("/portfolios/%s/counterparty", request.getPortfolioId()), - request, - List.of(200), - new TypeReference() {}); - } } diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java b/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java deleted file mode 100644 index 91d7d16..0000000 --- a/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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.advancedtransfer; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Get Portfolio Counterparty ID */ -public class GetPortfolioCounterpartyIdRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore - private String portfolioId; - - public GetPortfolioCounterpartyIdRequest() {} - - public GetPortfolioCounterpartyIdRequest(Builder builder) { - this.portfolioId = builder.portfolioId; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public static class Builder { - private String portfolioId; - - public Builder() {} - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public GetPortfolioCounterpartyIdRequest build() throws CoinbaseClientException { - validate(); - return new GetPortfolioCounterpartyIdRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.portfolioId)) { - throw new CoinbaseClientException("PortfolioId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java b/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java deleted file mode 100644 index 814479f..0000000 --- a/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.advancedtransfer; - -import com.coinbase.prime.model.Counterparty; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Get Portfolio Counterparty ID */ -public class GetPortfolioCounterpartyIdResponse { - @JsonProperty("counterparty") - private Counterparty counterparty; - - public GetPortfolioCounterpartyIdResponse() {} - - public Counterparty getCounterparty() { - return counterparty; - } - - public void setCounterparty(Counterparty counterparty) { - this.counterparty = counterparty; - } -} diff --git a/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java index 472c07a..df745d9 100644 --- a/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java +++ b/src/main/java/com/coinbase/prime/futures/GetFcmEquityResponse.java @@ -20,11 +20,11 @@ /** Get FCM Equity */ public class GetFcmEquityResponse { - /** Prior EOD account equity (ending balance + realized P&L + commissions/fees) */ + /** Prior EOD account equity (ending balance + realized P&L + commissions/fees) */ @JsonProperty("eod_account_equity") private String eodAccountEquity; - /** Prior EOD unrealized P&L on open futures positions */ + /** Prior EOD unrealized P&L on open futures positions */ @JsonProperty("eod_unrealized_pnl") private String eodUnrealizedPnl; diff --git a/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java b/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java index d002e3f..ad2845f 100644 --- a/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java +++ b/src/main/java/com/coinbase/prime/orders/AcceptQuoteRequest.java @@ -30,7 +30,7 @@ public class AcceptQuoteRequest { @JsonIgnore private String portfolioId; - /** The ID of the product being traded for the order (e.g. `BTC-USD`) */ + /** The ID of the product being traded for the order (e.g. `BTC-USD`) */ @JsonProperty("product_id") private String productId; diff --git a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java index 01cf95f..9689057 100644 --- a/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java +++ b/src/main/java/com/coinbase/prime/orders/CreateOrderRequest.java @@ -33,7 +33,7 @@ public class CreateOrderRequest { @JsonIgnore private String portfolioId; - /** The ID of the product being traded for the order (e.g. `BTC-USD`) */ + /** The ID of the product being traded for the order (e.g. `BTC-USD`) */ @JsonProperty("product_id") private String productId; @@ -61,18 +61,14 @@ public class CreateOrderRequest { @JsonProperty("type") private OrderType type; - /** - * Order size in base asset units (either `base_quantity` or `quote_value` is - * required) - */ + /** Order size in base asset units (either `base_quantity` or `quote_value` is required) */ @JsonProperty("base_quantity") private String baseQuantity; /** * Order size in quote asset units, i.e. the amount the user wants to spend (when buying) or * receive (when selling); the quantity in base units will be determined based on the market - * liquidity and indicated `quote_value` (either `base_quantity` or - * `quote_value` is required) + * liquidity and indicated `quote_value` (either `base_quantity` or `quote_value` is required) */ @JsonProperty("quote_value") private String quoteValue; diff --git a/src/main/java/com/coinbase/prime/orders/EditOrderRequest.java b/src/main/java/com/coinbase/prime/orders/EditOrderRequest.java index 35e1580..52d1815 100644 --- a/src/main/java/com/coinbase/prime/orders/EditOrderRequest.java +++ b/src/main/java/com/coinbase/prime/orders/EditOrderRequest.java @@ -46,18 +46,14 @@ public class EditOrderRequest { @JsonProperty("client_order_id") private String clientOrderId; - /** - * Order size in base asset units (either `base_quantity` or `quote_value` is - * required) - */ + /** Order size in base asset units (either `base_quantity` or `quote_value` is required) */ @JsonProperty("base_quantity") private String baseQuantity; /** * Order size in quote asset units, i.e. the amount the user wants to spend (when buying) or * receive (when selling); the quantity in base units will be determined based on the market - * liquidity and indicated `quote_value` (either `base_quantity` or - * `quote_value` is required) + * liquidity and indicated `quote_value` (either `base_quantity` or `quote_value` is required) */ @JsonProperty("quote_value") private String quoteValue; diff --git a/src/main/java/com/coinbase/prime/orders/GetOrderRequest.java b/src/main/java/com/coinbase/prime/orders/GetOrderRequest.java deleted file mode 100644 index 93c67b6..0000000 --- a/src/main/java/com/coinbase/prime/orders/GetOrderRequest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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.orders; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Get Order by Order ID */ -public class GetOrderRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore - private String portfolioId; - - @JsonProperty(required = true, value = "order_id") - @JsonIgnore - private String orderId; - - public GetOrderRequest() {} - - public GetOrderRequest(Builder builder) { - this.portfolioId = builder.portfolioId; - this.orderId = builder.orderId; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getOrderId() { - return orderId; - } - - public void setOrderId(String orderId) { - this.orderId = orderId; - } - - public static class Builder { - private String portfolioId; - private String orderId; - - public Builder() {} - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder orderId(String orderId) { - this.orderId = orderId; - return this; - } - - public GetOrderRequest build() throws CoinbaseClientException { - validate(); - return new GetOrderRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.portfolioId)) { - throw new CoinbaseClientException("PortfolioId is required"); - } - if (isNullOrEmpty(this.orderId)) { - throw new CoinbaseClientException("OrderId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/orders/GetOrderResponse.java b/src/main/java/com/coinbase/prime/orders/GetOrderResponse.java deleted file mode 100644 index ea54796..0000000 --- a/src/main/java/com/coinbase/prime/orders/GetOrderResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.orders; - -import com.coinbase.prime.model.Order; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Get Order by Order ID */ -public class GetOrderResponse { - @JsonProperty("order") - private Order order; - - public GetOrderResponse() {} - - public Order getOrder() { - return order; - } - - public void setOrder(Order order) { - this.order = order; - } -} diff --git a/src/main/java/com/coinbase/prime/positions/ListAggregatePositionsRequest.java b/src/main/java/com/coinbase/prime/positions/ListAggregatePositionsRequest.java deleted file mode 100644 index 7e8c340..0000000 --- a/src/main/java/com/coinbase/prime/positions/ListAggregatePositionsRequest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.positions; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.common.Pagination; -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; - -/** List Aggregate Entity Positions */ -public class ListAggregatePositionsRequest extends PrimeListRequest { - /** The unique ID of the entity */ - @JsonProperty(required = true, value = "entity_id") - @JsonIgnore - private String entityId; - - public ListAggregatePositionsRequest() {} - - public ListAggregatePositionsRequest(Builder builder) { - super(builder.cursor, builder.sortDirection, builder.limit); - this.entityId = builder.entityId; - } - - public String getEntityId() { - return entityId; - } - - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - public static class Builder { - private String entityId; - private String cursor; - private SortDirection sortDirection; - private Integer limit; - - public Builder() {} - - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } - - public Builder limit(Integer limit) { - this.limit = limit; - return this; - } - - public Builder pagination(Pagination pagination) { - this.cursor = pagination.getNextCursor(); - this.sortDirection = pagination.getSortDirection(); - return this; - } - - public ListAggregatePositionsRequest build() throws CoinbaseClientException { - validate(); - return new ListAggregatePositionsRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.entityId)) { - throw new CoinbaseClientException("EntityId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/positions/ListAggregatePositionsResponse.java b/src/main/java/com/coinbase/prime/positions/ListAggregatePositionsResponse.java deleted file mode 100644 index 29ec64a..0000000 --- a/src/main/java/com/coinbase/prime/positions/ListAggregatePositionsResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.positions; - -import com.coinbase.prime.common.Pagination; -import com.coinbase.prime.model.Position; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** List Aggregate Entity Positions */ -public class ListAggregatePositionsResponse { - @JsonProperty("positions") - private Position[] positions; - - @JsonProperty("pagination") - private Pagination pagination; - - public ListAggregatePositionsResponse() {} - - public Position[] getPositions() { - return positions; - } - - public void setPositions(Position[] positions) { - this.positions = positions; - } - - public Pagination getPagination() { - return pagination; - } - - public void setPagination(Pagination pagination) { - this.pagination = pagination; - } -} diff --git a/src/main/java/com/coinbase/prime/positions/ListPositionsRequest.java b/src/main/java/com/coinbase/prime/positions/ListPositionsRequest.java deleted file mode 100644 index 5d3b094..0000000 --- a/src/main/java/com/coinbase/prime/positions/ListPositionsRequest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.positions; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.common.Pagination; -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; - -/** List Entity Positions */ -public class ListPositionsRequest extends PrimeListRequest { - /** The unique ID of the entity */ - @JsonProperty(required = true, value = "entity_id") - @JsonIgnore - private String entityId; - - public ListPositionsRequest() {} - - public ListPositionsRequest(Builder builder) { - super(builder.cursor, builder.sortDirection, builder.limit); - this.entityId = builder.entityId; - } - - public String getEntityId() { - return entityId; - } - - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - public static class Builder { - private String entityId; - private String cursor; - private SortDirection sortDirection; - private Integer limit; - - public Builder() {} - - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } - - public Builder limit(Integer limit) { - this.limit = limit; - return this; - } - - public Builder pagination(Pagination pagination) { - this.cursor = pagination.getNextCursor(); - this.sortDirection = pagination.getSortDirection(); - return this; - } - - public ListPositionsRequest build() throws CoinbaseClientException { - validate(); - return new ListPositionsRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.entityId)) { - throw new CoinbaseClientException("EntityId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/positions/ListPositionsResponse.java b/src/main/java/com/coinbase/prime/positions/ListPositionsResponse.java deleted file mode 100644 index b9d400f..0000000 --- a/src/main/java/com/coinbase/prime/positions/ListPositionsResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.positions; - -import com.coinbase.prime.common.Pagination; -import com.coinbase.prime.model.Position; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** List Entity Positions */ -public class ListPositionsResponse { - @JsonProperty("positions") - private Position[] positions; - - @JsonProperty("pagination") - private Pagination pagination; - - public ListPositionsResponse() {} - - public Position[] getPositions() { - return positions; - } - - public void setPositions(Position[] positions) { - this.positions = positions; - } - - public Pagination getPagination() { - return pagination; - } - - public void setPagination(Pagination pagination) { - this.pagination = pagination; - } -} diff --git a/src/main/java/com/coinbase/prime/positions/PositionsService.java b/src/main/java/com/coinbase/prime/positions/PositionsService.java index 3da137b..34e927b 100644 --- a/src/main/java/com/coinbase/prime/positions/PositionsService.java +++ b/src/main/java/com/coinbase/prime/positions/PositionsService.java @@ -21,22 +21,6 @@ public interface PositionsService { - /** - * List Aggregate Entity Positions. - * - *

List paginated aggregate positions for a specific entity - * - * @deprecated Prefer {@link #listAggregateEntityPositions(ListAggregateEntityPositionsRequest)} — - * same REST route as the current spec. - * @param request the request parameters for this operation - * @return the response payload for this operation - * @throws CoinbaseClientException if the request fails client-side validation - * @throws CoinbasePrimeException if the Prime API returns an error response - */ - @Deprecated - ListAggregatePositionsResponse listAggregatePositions(ListAggregatePositionsRequest request) - throws CoinbaseClientException, CoinbasePrimeException; - /** * List Aggregate Entity Positions. * @@ -63,20 +47,4 @@ ListAggregateEntityPositionsResponse listAggregateEntityPositions( */ ListEntityPositionsResponse listEntityPositions(ListEntityPositionsRequest request) throws CoinbaseClientException, CoinbasePrimeException; - - /** - * List Entity Positions. - * - *

List paginated positions for a specific entity - * - * @deprecated Prefer {@link #listEntityPositions(ListEntityPositionsRequest)} — same REST route - * as the current spec. - * @param request the request parameters for this operation - * @return the response payload for this operation - * @throws CoinbaseClientException if the request fails client-side validation - * @throws CoinbasePrimeException if the Prime API returns an error response - */ - @Deprecated - ListPositionsResponse listPositions(ListPositionsRequest request) - throws CoinbaseClientException, CoinbasePrimeException; } diff --git a/src/main/java/com/coinbase/prime/positions/PositionsServiceImpl.java b/src/main/java/com/coinbase/prime/positions/PositionsServiceImpl.java index ccb417c..f061175 100644 --- a/src/main/java/com/coinbase/prime/positions/PositionsServiceImpl.java +++ b/src/main/java/com/coinbase/prime/positions/PositionsServiceImpl.java @@ -28,21 +28,6 @@ public PositionsServiceImpl(CoinbasePrimeClient client) { super(client); } - /** - * @deprecated Prefer {@link #listAggregateEntityPositions(ListAggregateEntityPositionsRequest)} - */ - @Deprecated - @Override - public ListAggregatePositionsResponse listAggregatePositions( - ListAggregatePositionsRequest request) throws CoinbasePrimeException { - return this.request( - HttpMethod.GET, - String.format("/entities/%s/aggregate_positions", request.getEntityId()), - request, - List.of(200), - new TypeReference() {}); - } - @Override public ListAggregateEntityPositionsResponse listAggregateEntityPositions( ListAggregateEntityPositionsRequest request) throws CoinbasePrimeException { @@ -64,19 +49,4 @@ public ListEntityPositionsResponse listEntityPositions(ListEntityPositionsReques List.of(200), new TypeReference() {}); } - - /** - * @deprecated Prefer {@link #listEntityPositions(ListEntityPositionsRequest)} - */ - @Deprecated - @Override - public ListPositionsResponse listPositions(ListPositionsRequest request) - throws CoinbasePrimeException { - return this.request( - HttpMethod.GET, - String.format("/entities/%s/positions", request.getEntityId()), - request, - List.of(200), - new TypeReference() {}); - } } diff --git a/src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsRequest.java b/src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsRequest.java deleted file mode 100644 index 1122887..0000000 --- a/src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsRequest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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.staking; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.model.WalletClaimRewardsInputs; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Claim Wallet Staking Rewards (Alpha) */ -public class ClaimStakingRewardsRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore - private String portfolioId; - - @JsonProperty(required = true, value = "wallet_id") - @JsonIgnore - private String walletId; - - @JsonProperty("idempotency_key") - private String idempotencyKey; - - @JsonProperty("inputs") - private WalletClaimRewardsInputs inputs; - - public ClaimStakingRewardsRequest() {} - - public ClaimStakingRewardsRequest(Builder builder) { - this.portfolioId = builder.portfolioId; - this.walletId = builder.walletId; - this.idempotencyKey = builder.idempotencyKey; - this.inputs = builder.inputs; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getWalletId() { - return walletId; - } - - public void setWalletId(String walletId) { - this.walletId = walletId; - } - - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - public WalletClaimRewardsInputs getInputs() { - return inputs; - } - - public void setInputs(WalletClaimRewardsInputs inputs) { - this.inputs = inputs; - } - - public static class Builder { - private String portfolioId; - private String walletId; - private String idempotencyKey; - private WalletClaimRewardsInputs inputs; - - public Builder() {} - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder walletId(String walletId) { - this.walletId = walletId; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder inputs(WalletClaimRewardsInputs inputs) { - this.inputs = inputs; - return this; - } - - public ClaimStakingRewardsRequest build() throws CoinbaseClientException { - validate(); - return new ClaimStakingRewardsRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.portfolioId)) { - throw new CoinbaseClientException("PortfolioId is required"); - } - if (isNullOrEmpty(this.walletId)) { - throw new CoinbaseClientException("WalletId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsResponse.java b/src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsResponse.java deleted file mode 100644 index 2026fd7..0000000 --- a/src/main/java/com/coinbase/prime/staking/ClaimStakingRewardsResponse.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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.staking; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Claim Wallet Staking Rewards (Alpha) */ -public class ClaimStakingRewardsResponse { - @JsonProperty("wallet_id") - private String walletId; - - @JsonProperty("transaction_id") - private String transactionId; - - @JsonProperty("activity_id") - private String activityId; - - public ClaimStakingRewardsResponse() {} - - public String getWalletId() { - return walletId; - } - - public void setWalletId(String walletId) { - this.walletId = walletId; - } - - public String getTransactionId() { - return transactionId; - } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } - - public String getActivityId() { - return activityId; - } - - public void setActivityId(String activityId) { - this.activityId = activityId; - } -} diff --git a/src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeRequest.java b/src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeRequest.java deleted file mode 100644 index 22d19ff..0000000 --- a/src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeRequest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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.staking; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.model.PortfolioStakingMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Request to stake currency in a portfolio */ -public class CreatePortfolioStakeRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore - private String portfolioId; - - @JsonProperty("idempotency_key") - private String idempotencyKey; - - @JsonProperty("currency_symbol") - private String currencySymbol; - - @JsonProperty("amount") - private String amount; - - @JsonProperty("metadata") - private PortfolioStakingMetadata metadata; - - public CreatePortfolioStakeRequest() {} - - public CreatePortfolioStakeRequest(Builder builder) { - this.portfolioId = builder.portfolioId; - this.idempotencyKey = builder.idempotencyKey; - this.currencySymbol = builder.currencySymbol; - this.amount = builder.amount; - this.metadata = builder.metadata; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - public String getCurrencySymbol() { - return currencySymbol; - } - - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public PortfolioStakingMetadata getMetadata() { - return metadata; - } - - public void setMetadata(PortfolioStakingMetadata metadata) { - this.metadata = metadata; - } - - public static class Builder { - private String portfolioId; - private String idempotencyKey; - private String currencySymbol; - private String amount; - private PortfolioStakingMetadata metadata; - - public Builder() {} - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; - } - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder metadata(PortfolioStakingMetadata metadata) { - this.metadata = metadata; - return this; - } - - public CreatePortfolioStakeRequest build() throws CoinbaseClientException { - validate(); - return new CreatePortfolioStakeRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.portfolioId)) { - throw new CoinbaseClientException("PortfolioId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeResponse.java b/src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeResponse.java deleted file mode 100644 index 3eb0713..0000000 --- a/src/main/java/com/coinbase/prime/staking/CreatePortfolioStakeResponse.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.staking; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Request to stake currency in a portfolio */ -public class CreatePortfolioStakeResponse { - @JsonProperty("activity_id") - private String activityId; - - @JsonProperty("transaction_id") - private String transactionId; - - public CreatePortfolioStakeResponse() {} - - public String getActivityId() { - return activityId; - } - - public void setActivityId(String activityId) { - this.activityId = activityId; - } - - public String getTransactionId() { - return transactionId; - } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } -} diff --git a/src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeRequest.java b/src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeRequest.java deleted file mode 100644 index 9e431e0..0000000 --- a/src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeRequest.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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.staking; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.model.PortfolioStakingMetadata; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Request to unstake currency across a portfolio */ -public class CreatePortfolioUnstakeRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore - private String portfolioId; - - @JsonProperty("idempotency_key") - private String idempotencyKey; - - @JsonProperty("currency_symbol") - private String currencySymbol; - - @JsonProperty("amount") - private String amount; - - @JsonProperty("metadata") - private PortfolioStakingMetadata metadata; - - public CreatePortfolioUnstakeRequest() {} - - public CreatePortfolioUnstakeRequest(Builder builder) { - this.portfolioId = builder.portfolioId; - this.idempotencyKey = builder.idempotencyKey; - this.currencySymbol = builder.currencySymbol; - this.amount = builder.amount; - this.metadata = builder.metadata; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - public String getCurrencySymbol() { - return currencySymbol; - } - - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public PortfolioStakingMetadata getMetadata() { - return metadata; - } - - public void setMetadata(PortfolioStakingMetadata metadata) { - this.metadata = metadata; - } - - public static class Builder { - private String portfolioId; - private String idempotencyKey; - private String currencySymbol; - private String amount; - private PortfolioStakingMetadata metadata; - - public Builder() {} - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; - } - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder metadata(PortfolioStakingMetadata metadata) { - this.metadata = metadata; - return this; - } - - public CreatePortfolioUnstakeRequest build() throws CoinbaseClientException { - validate(); - return new CreatePortfolioUnstakeRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.portfolioId)) { - throw new CoinbaseClientException("PortfolioId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeResponse.java b/src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeResponse.java deleted file mode 100644 index b83a098..0000000 --- a/src/main/java/com/coinbase/prime/staking/CreatePortfolioUnstakeResponse.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.staking; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Request to unstake currency across a portfolio */ -public class CreatePortfolioUnstakeResponse { - @JsonProperty("activity_id") - private String activityId; - - @JsonProperty("transaction_id") - private String transactionId; - - public CreatePortfolioUnstakeResponse() {} - - public String getActivityId() { - return activityId; - } - - public void setActivityId(String activityId) { - this.activityId = activityId; - } - - public String getTransactionId() { - return transactionId; - } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } -} diff --git a/src/main/java/com/coinbase/prime/staking/CreateStakeRequest.java b/src/main/java/com/coinbase/prime/staking/CreateStakeRequest.java index 6cccf91..692ab26 100644 --- a/src/main/java/com/coinbase/prime/staking/CreateStakeRequest.java +++ b/src/main/java/com/coinbase/prime/staking/CreateStakeRequest.java @@ -20,6 +20,7 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.WalletStakeInputs; +import com.coinbase.prime.model.WalletStakingMetadata; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +40,9 @@ public class CreateStakeRequest { @JsonProperty("inputs") private WalletStakeInputs inputs; + @JsonProperty("metadata") + private WalletStakingMetadata metadata; + public CreateStakeRequest() {} public CreateStakeRequest(Builder builder) { @@ -46,6 +50,7 @@ public CreateStakeRequest(Builder builder) { this.walletId = builder.walletId; this.idempotencyKey = builder.idempotencyKey; this.inputs = builder.inputs; + this.metadata = builder.metadata; } public String getPortfolioId() { @@ -80,11 +85,20 @@ public void setInputs(WalletStakeInputs inputs) { this.inputs = inputs; } + public WalletStakingMetadata getMetadata() { + return metadata; + } + + public void setMetadata(WalletStakingMetadata metadata) { + this.metadata = metadata; + } + public static class Builder { private String portfolioId; private String walletId; private String idempotencyKey; private WalletStakeInputs inputs; + private WalletStakingMetadata metadata; public Builder() {} @@ -108,6 +122,11 @@ public Builder inputs(WalletStakeInputs inputs) { return this; } + public Builder metadata(WalletStakingMetadata metadata) { + this.metadata = metadata; + return this; + } + public CreateStakeRequest build() throws CoinbaseClientException { validate(); return new CreateStakeRequest(this); diff --git a/src/main/java/com/coinbase/prime/staking/CreateUnstakeRequest.java b/src/main/java/com/coinbase/prime/staking/CreateUnstakeRequest.java index a03beea..a719d17 100644 --- a/src/main/java/com/coinbase/prime/staking/CreateUnstakeRequest.java +++ b/src/main/java/com/coinbase/prime/staking/CreateUnstakeRequest.java @@ -19,6 +19,7 @@ import static com.coinbase.core.utils.Utils.isNullOrEmpty; import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.model.WalletStakingMetadata; import com.coinbase.prime.model.WalletUnstakeInputs; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +40,9 @@ public class CreateUnstakeRequest { @JsonProperty("inputs") private WalletUnstakeInputs inputs; + @JsonProperty("metadata") + private WalletStakingMetadata metadata; + public CreateUnstakeRequest() {} public CreateUnstakeRequest(Builder builder) { @@ -46,6 +50,7 @@ public CreateUnstakeRequest(Builder builder) { this.walletId = builder.walletId; this.idempotencyKey = builder.idempotencyKey; this.inputs = builder.inputs; + this.metadata = builder.metadata; } public String getPortfolioId() { @@ -80,11 +85,20 @@ public void setInputs(WalletUnstakeInputs inputs) { this.inputs = inputs; } + public WalletStakingMetadata getMetadata() { + return metadata; + } + + public void setMetadata(WalletStakingMetadata metadata) { + this.metadata = metadata; + } + public static class Builder { private String portfolioId; private String walletId; private String idempotencyKey; private WalletUnstakeInputs inputs; + private WalletStakingMetadata metadata; public Builder() {} @@ -108,6 +122,11 @@ public Builder inputs(WalletUnstakeInputs inputs) { return this; } + public Builder metadata(WalletStakingMetadata metadata) { + this.metadata = metadata; + return this; + } + public CreateUnstakeRequest build() throws CoinbaseClientException { validate(); return new CreateUnstakeRequest(this); diff --git a/src/main/java/com/coinbase/prime/staking/PortfolioStakingUnstakeRequest.java b/src/main/java/com/coinbase/prime/staking/PortfolioStakingUnstakeRequest.java index fda22cb..47f02f9 100644 --- a/src/main/java/com/coinbase/prime/staking/PortfolioStakingUnstakeRequest.java +++ b/src/main/java/com/coinbase/prime/staking/PortfolioStakingUnstakeRequest.java @@ -20,6 +20,7 @@ import com.coinbase.core.errors.CoinbaseClientException; import com.coinbase.prime.model.PortfolioStakingMetadata; +import com.coinbase.prime.model.enums.ValidatorProvider; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -48,6 +49,9 @@ public class PortfolioStakingUnstakeRequest { @JsonProperty("metadata") private PortfolioStakingMetadata metadata; + @JsonProperty("validator_provider") + private ValidatorProvider validatorProvider; + public PortfolioStakingUnstakeRequest() {} public PortfolioStakingUnstakeRequest(Builder builder) { @@ -56,6 +60,7 @@ public PortfolioStakingUnstakeRequest(Builder builder) { this.currencySymbol = builder.currencySymbol; this.amount = builder.amount; this.metadata = builder.metadata; + this.validatorProvider = builder.validatorProvider; } public String getPortfolioId() { @@ -98,12 +103,21 @@ public void setMetadata(PortfolioStakingMetadata metadata) { this.metadata = metadata; } + public ValidatorProvider getValidatorProvider() { + return validatorProvider; + } + + public void setValidatorProvider(ValidatorProvider validatorProvider) { + this.validatorProvider = validatorProvider; + } + public static class Builder { private String portfolioId; private String idempotencyKey; private String currencySymbol; private String amount; private PortfolioStakingMetadata metadata; + private ValidatorProvider validatorProvider; public Builder() {} @@ -132,6 +146,11 @@ public Builder metadata(PortfolioStakingMetadata metadata) { return this; } + public Builder validatorProvider(ValidatorProvider validatorProvider) { + this.validatorProvider = validatorProvider; + return this; + } + public PortfolioStakingUnstakeRequest build() throws CoinbaseClientException { validate(); return new PortfolioStakingUnstakeRequest(this); diff --git a/src/main/java/com/coinbase/prime/transactions/CreateTransferRequest.java b/src/main/java/com/coinbase/prime/transactions/CreateTransferRequest.java deleted file mode 100644 index 0ca79ed..0000000 --- a/src/main/java/com/coinbase/prime/transactions/CreateTransferRequest.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright 2026-present Coinbase Global, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.coinbase.prime.transactions; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Create Transfer */ -public class CreateTransferRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore - private String portfolioId; - - @JsonProperty(required = true, value = "wallet_id") - @JsonIgnore - private String walletId; - - @JsonProperty("amount") - private String amount; - - @JsonProperty("destination") - private String destination; - - @JsonProperty("idempotency_key") - private String idempotencyKey; - - @JsonProperty("currency_symbol") - private String currencySymbol; - - public CreateTransferRequest() {} - - public CreateTransferRequest(Builder builder) { - this.portfolioId = builder.portfolioId; - this.walletId = builder.walletId; - this.amount = builder.amount; - this.destination = builder.destination; - this.idempotencyKey = builder.idempotencyKey; - this.currencySymbol = builder.currencySymbol; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getWalletId() { - return walletId; - } - - public void setWalletId(String walletId) { - this.walletId = walletId; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public String getDestination() { - return destination; - } - - public void setDestination(String destination) { - this.destination = destination; - } - - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - public String getCurrencySymbol() { - return currencySymbol; - } - - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } - - public static class Builder { - private String portfolioId; - private String walletId; - private String amount; - private String destination; - private String idempotencyKey; - private String currencySymbol; - - public Builder() {} - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder walletId(String walletId) { - this.walletId = walletId; - return this; - } - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder destination(String destination) { - this.destination = destination; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; - } - - public CreateTransferRequest build() throws CoinbaseClientException { - validate(); - return new CreateTransferRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.portfolioId)) { - throw new CoinbaseClientException("PortfolioId is required"); - } - if (isNullOrEmpty(this.walletId)) { - throw new CoinbaseClientException("WalletId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/transactions/CreateTransferResponse.java b/src/main/java/com/coinbase/prime/transactions/CreateTransferResponse.java deleted file mode 100644 index ea85fe2..0000000 --- a/src/main/java/com/coinbase/prime/transactions/CreateTransferResponse.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2026-present Coinbase Global, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.coinbase.prime.transactions; - -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Create Transfer */ -public class CreateTransferResponse { - @JsonProperty("activity_id") - private String activityId; - - @JsonProperty("approval_url") - private String approvalUrl; - - @JsonProperty("symbol") - private String symbol; - - @JsonProperty("amount") - private String amount; - - @JsonProperty("fee") - private String fee; - - @JsonProperty("destination_address") - private String destinationAddress; - - @JsonProperty("destination_type") - private String destinationType; - - @JsonProperty("source_address") - private String sourceAddress; - - @JsonProperty("source_type") - private String sourceType; - - @JsonProperty("transaction_id") - private String transactionId; - - public CreateTransferResponse() {} - - public String getActivityId() { - return activityId; - } - - public void setActivityId(String activityId) { - this.activityId = activityId; - } - - public String getApprovalUrl() { - return approvalUrl; - } - - public void setApprovalUrl(String approvalUrl) { - this.approvalUrl = approvalUrl; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public String getFee() { - return fee; - } - - public void setFee(String fee) { - this.fee = fee; - } - - public String getDestinationAddress() { - return destinationAddress; - } - - public void setDestinationAddress(String destinationAddress) { - this.destinationAddress = destinationAddress; - } - - public String getDestinationType() { - return destinationType; - } - - public void setDestinationType(String destinationType) { - this.destinationType = destinationType; - } - - public String getSourceAddress() { - return sourceAddress; - } - - public void setSourceAddress(String sourceAddress) { - this.sourceAddress = sourceAddress; - } - - public String getSourceType() { - return sourceType; - } - - public void setSourceType(String sourceType) { - this.sourceType = sourceType; - } - - public String getTransactionId() { - return transactionId; - } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } -} diff --git a/src/main/java/com/coinbase/prime/transactions/CreateWithdrawalRequest.java b/src/main/java/com/coinbase/prime/transactions/CreateWithdrawalRequest.java deleted file mode 100644 index bb16545..0000000 --- a/src/main/java/com/coinbase/prime/transactions/CreateWithdrawalRequest.java +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Copyright 2026-present Coinbase Global, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.coinbase.prime.transactions; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.model.BlockchainAddress; -import com.coinbase.prime.model.CounterpartyDestination; -import com.coinbase.prime.model.PaymentMethodDestination; -import com.coinbase.prime.model.TravelRuleData; -import com.coinbase.prime.model.enums.DestinationType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Create Withdrawal */ -public class CreateWithdrawalRequest { - @JsonProperty(required = true, value = "portfolio_id") - @JsonIgnore - private String portfolioId; - - @JsonProperty(required = true, value = "wallet_id") - @JsonIgnore - private String walletId; - - @JsonProperty("amount") - private String amount; - - @JsonProperty("destination_type") - private DestinationType destinationType; - - @JsonProperty("idempotency_key") - private String idempotencyKey; - - @JsonProperty("currency_symbol") - private String currencySymbol; - - @JsonProperty("payment_method") - private PaymentMethodDestination paymentMethod; - - @JsonProperty("blockchain_address") - private BlockchainAddress blockchainAddress; - - @JsonProperty("counterparty") - private CounterpartyDestination counterparty; - - @JsonProperty("travel_rule_data") - private TravelRuleData travelRuleData; - - public CreateWithdrawalRequest() {} - - public CreateWithdrawalRequest(Builder builder) { - this.portfolioId = builder.portfolioId; - this.walletId = builder.walletId; - this.amount = builder.amount; - this.destinationType = builder.destinationType; - this.idempotencyKey = builder.idempotencyKey; - this.currencySymbol = builder.currencySymbol; - this.paymentMethod = builder.paymentMethod; - this.blockchainAddress = builder.blockchainAddress; - this.counterparty = builder.counterparty; - this.travelRuleData = builder.travelRuleData; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getWalletId() { - return walletId; - } - - public void setWalletId(String walletId) { - this.walletId = walletId; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public DestinationType getDestinationType() { - return destinationType; - } - - public void setDestinationType(DestinationType destinationType) { - this.destinationType = destinationType; - } - - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - public String getCurrencySymbol() { - return currencySymbol; - } - - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } - - public PaymentMethodDestination getPaymentMethod() { - return paymentMethod; - } - - public void setPaymentMethod(PaymentMethodDestination paymentMethod) { - this.paymentMethod = paymentMethod; - } - - public BlockchainAddress getBlockchainAddress() { - return blockchainAddress; - } - - public void setBlockchainAddress(BlockchainAddress blockchainAddress) { - this.blockchainAddress = blockchainAddress; - } - - public CounterpartyDestination getCounterparty() { - return counterparty; - } - - public void setCounterparty(CounterpartyDestination counterparty) { - this.counterparty = counterparty; - } - - public TravelRuleData getTravelRuleData() { - return travelRuleData; - } - - public void setTravelRuleData(TravelRuleData travelRuleData) { - this.travelRuleData = travelRuleData; - } - - public static class Builder { - private String portfolioId; - private String walletId; - private String amount; - private DestinationType destinationType; - private String idempotencyKey; - private String currencySymbol; - private PaymentMethodDestination paymentMethod; - private BlockchainAddress blockchainAddress; - private CounterpartyDestination counterparty; - private TravelRuleData travelRuleData; - - public Builder() {} - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder walletId(String walletId) { - this.walletId = walletId; - return this; - } - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder destinationType(DestinationType destinationType) { - this.destinationType = destinationType; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; - } - - public Builder paymentMethod(PaymentMethodDestination paymentMethod) { - this.paymentMethod = paymentMethod; - return this; - } - - public Builder blockchainAddress(BlockchainAddress blockchainAddress) { - this.blockchainAddress = blockchainAddress; - return this; - } - - public Builder counterparty(CounterpartyDestination counterparty) { - this.counterparty = counterparty; - return this; - } - - public Builder travelRuleData(TravelRuleData travelRuleData) { - this.travelRuleData = travelRuleData; - return this; - } - - public CreateWithdrawalRequest build() throws CoinbaseClientException { - validate(); - return new CreateWithdrawalRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.portfolioId)) { - throw new CoinbaseClientException("PortfolioId is required"); - } - if (isNullOrEmpty(this.walletId)) { - throw new CoinbaseClientException("WalletId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/transactions/CreateWithdrawalResponse.java b/src/main/java/com/coinbase/prime/transactions/CreateWithdrawalResponse.java deleted file mode 100644 index f869167..0000000 --- a/src/main/java/com/coinbase/prime/transactions/CreateWithdrawalResponse.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright 2026-present Coinbase Global, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.coinbase.prime.transactions; - -import com.coinbase.prime.model.BlockchainAddress; -import com.coinbase.prime.model.CounterpartyDestination; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Create Withdrawal */ -public class CreateWithdrawalResponse { - @JsonProperty("activity_id") - private String activityId; - - @JsonProperty("approval_url") - private String approvalUrl; - - @JsonProperty("symbol") - private String symbol; - - @JsonProperty("amount") - private String amount; - - @JsonProperty("fee") - private String fee; - - @JsonProperty("destination_type") - private String destinationType; - - @JsonProperty("source_type") - private String sourceType; - - @JsonProperty("blockchain_destination") - private BlockchainAddress blockchainDestination; - - @JsonProperty("counterparty_destination") - private CounterpartyDestination counterpartyDestination; - - @JsonProperty("blockchain_source") - private BlockchainAddress blockchainSource; - - @JsonProperty("transaction_id") - private String transactionId; - - public CreateWithdrawalResponse() {} - - public String getActivityId() { - return activityId; - } - - public void setActivityId(String activityId) { - this.activityId = activityId; - } - - public String getApprovalUrl() { - return approvalUrl; - } - - public void setApprovalUrl(String approvalUrl) { - this.approvalUrl = approvalUrl; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public String getFee() { - return fee; - } - - public void setFee(String fee) { - this.fee = fee; - } - - public String getDestinationType() { - return destinationType; - } - - public void setDestinationType(String destinationType) { - this.destinationType = destinationType; - } - - public String getSourceType() { - return sourceType; - } - - public void setSourceType(String sourceType) { - this.sourceType = sourceType; - } - - public BlockchainAddress getBlockchainDestination() { - return blockchainDestination; - } - - public void setBlockchainDestination(BlockchainAddress blockchainDestination) { - this.blockchainDestination = blockchainDestination; - } - - public CounterpartyDestination getCounterpartyDestination() { - return counterpartyDestination; - } - - public void setCounterpartyDestination(CounterpartyDestination counterpartyDestination) { - this.counterpartyDestination = counterpartyDestination; - } - - public BlockchainAddress getBlockchainSource() { - return blockchainSource; - } - - public void setBlockchainSource(BlockchainAddress blockchainSource) { - this.blockchainSource = blockchainSource; - } - - public String getTransactionId() { - return transactionId; - } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } -} diff --git a/src/main/java/com/coinbase/prime/users/ListUsersRequest.java b/src/main/java/com/coinbase/prime/users/ListUsersRequest.java deleted file mode 100644 index 4c89141..0000000 --- a/src/main/java/com/coinbase/prime/users/ListUsersRequest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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.users; - -import static com.coinbase.core.utils.Utils.isNullOrEmpty; - -import com.coinbase.core.errors.CoinbaseClientException; -import com.coinbase.prime.common.Pagination; -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; - -/** List Users */ -public class ListUsersRequest extends PrimeListRequest { - @JsonProperty(required = true, value = "entity_id") - @JsonIgnore - private String entityId; - - public ListUsersRequest() {} - - public ListUsersRequest(Builder builder) { - super(builder.cursor, builder.sortDirection, builder.limit); - this.entityId = builder.entityId; - } - - public String getEntityId() { - return entityId; - } - - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - public static class Builder { - private String entityId; - private String cursor; - private SortDirection sortDirection; - private Integer limit; - - public Builder() {} - - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } - - public Builder limit(Integer limit) { - this.limit = limit; - return this; - } - - public Builder pagination(Pagination pagination) { - this.cursor = pagination.getNextCursor(); - this.sortDirection = pagination.getSortDirection(); - return this; - } - - public ListUsersRequest build() throws CoinbaseClientException { - validate(); - return new ListUsersRequest(this); - } - - private void validate() throws CoinbaseClientException { - if (isNullOrEmpty(this.entityId)) { - throw new CoinbaseClientException("EntityId is required"); - } - } - } -} diff --git a/src/main/java/com/coinbase/prime/users/ListUsersResponse.java b/src/main/java/com/coinbase/prime/users/ListUsersResponse.java deleted file mode 100644 index 99e4e26..0000000 --- a/src/main/java/com/coinbase/prime/users/ListUsersResponse.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.users; - -import com.coinbase.prime.common.Pagination; -import com.coinbase.prime.model.EntityUser; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** List Users */ -public class ListUsersResponse { - @JsonProperty("users") - private EntityUser[] users; - - @JsonProperty("pagination") - private Pagination pagination; - - public ListUsersResponse() {} - - public EntityUser[] getUsers() { - return users; - } - - public void setUsers(EntityUser[] users) { - this.users = users; - } - - public Pagination getPagination() { - return pagination; - } - - public void setPagination(Pagination pagination) { - this.pagination = pagination; - } -} diff --git a/src/test/java/com/coinbase/prime/positions/PositionsServiceSerializationTest.java b/src/test/java/com/coinbase/prime/positions/PositionsServiceSerializationTest.java index a6728ea..724d580 100644 --- a/src/test/java/com/coinbase/prime/positions/PositionsServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/positions/PositionsServiceSerializationTest.java @@ -35,24 +35,26 @@ public void setUp() { new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); } - // ==================== ListAggregatePositions Tests ==================== + // ==================== ListAggregateEntityPositions Tests ==================== @Test - public void testListAggregatePositionsRequestConstruction() throws CoinbaseClientException { - ListAggregatePositionsRequest request = - new ListAggregatePositionsRequest.Builder().entityId("entity-123").build(); + public void testListAggregateEntityPositionsRequestConstruction() throws CoinbaseClientException { + ListAggregateEntityPositionsRequest request = + new ListAggregateEntityPositionsRequest.Builder().entityId("entity-123").build(); assertNotNull(request); assertEquals("entity-123", request.getEntityId()); } @Test - public void testListAggregatePositionsRequestBuilderValidation() { + public void testListAggregateEntityPositionsRequestBuilderValidation() { assertThrows( - CoinbaseClientException.class, () -> new ListAggregatePositionsRequest.Builder().build()); + CoinbaseClientException.class, + () -> new ListAggregateEntityPositionsRequest.Builder().build()); } @Test - public void testListAggregatePositionsResponseDeserialization() throws JsonProcessingException { + public void testListAggregateEntityPositionsResponseDeserialization() + throws JsonProcessingException { String json = "{" + "\"positions\":[" @@ -62,25 +64,25 @@ public void testListAggregatePositionsResponseDeserialization() throws JsonProce + "\"pagination\":{\"has_next\":false}" + "}"; - ListAggregatePositionsResponse response = - objectMapper.readValue(json, ListAggregatePositionsResponse.class); + ListAggregateEntityPositionsResponse response = + objectMapper.readValue(json, ListAggregateEntityPositionsResponse.class); assertNotNull(response); assertNotNull(response.getPositions()); assertEquals(2, response.getPositions().length); } - // ==================== ListPositions Tests ==================== + // ==================== ListEntityPositions Tests ==================== @Test - public void testListPositionsRequestConstruction() throws CoinbaseClientException { - ListPositionsRequest request = - new ListPositionsRequest.Builder().entityId("entity-123").build(); + public void testListEntityPositionsRequestConstruction() throws CoinbaseClientException { + ListEntityPositionsRequest request = + new ListEntityPositionsRequest.Builder().entityId("entity-123").build(); assertNotNull(request); assertEquals("entity-123", request.getEntityId()); } @Test - public void testListPositionsResponseDeserialization() throws JsonProcessingException { + public void testListEntityPositionsResponseDeserialization() throws JsonProcessingException { String json = "{" + "\"positions\":[" @@ -90,7 +92,8 @@ public void testListPositionsResponseDeserialization() throws JsonProcessingExce + "\"pagination\":{\"next_cursor\":\"pos-cursor\",\"has_next\":true}" + "}"; - ListPositionsResponse response = objectMapper.readValue(json, ListPositionsResponse.class); + ListEntityPositionsResponse response = + objectMapper.readValue(json, ListEntityPositionsResponse.class); assertNotNull(response); assertNotNull(response.getPositions()); assertEquals(2, response.getPositions().length); diff --git a/src/test/java/com/coinbase/prime/staking/StakingServiceSerializationTest.java b/src/test/java/com/coinbase/prime/staking/StakingServiceSerializationTest.java index bb539b8..dbfc9f9 100644 --- a/src/test/java/com/coinbase/prime/staking/StakingServiceSerializationTest.java +++ b/src/test/java/com/coinbase/prime/staking/StakingServiceSerializationTest.java @@ -19,6 +19,8 @@ import static org.junit.jupiter.api.Assertions.*; import com.coinbase.core.errors.CoinbaseClientException; +import com.coinbase.prime.model.WalletStakingMetadata; +import com.coinbase.prime.model.enums.ValidatorProvider; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; @@ -90,11 +92,13 @@ public void testCreateStakeRequestSerialization() throws JsonProcessingException .portfolioId("portfolio-123") .walletId("wallet-456") .idempotencyKey("idem-key-def") + .metadata(new WalletStakingMetadata.Builder().externalId("ext-123").build()) .build(); String json = objectMapper.writeValueAsString(request); assertNotNull(json); assertTrue(json.contains("\"idempotency_key\":\"idem-key-def\"")); + assertTrue(json.contains("\"external_id\":\"ext-123\"")); assertFalse(json.contains("portfolio_id")); assertFalse(json.contains("wallet_id")); } @@ -117,6 +121,24 @@ public void testCreateStakeResponseDeserialization() throws JsonProcessingExcept // ==================== CreateUnstake Tests ==================== + @Test + public void testCreateUnstakeRequestSerialization() throws JsonProcessingException { + CreateUnstakeRequest request = + new CreateUnstakeRequest.Builder() + .portfolioId("portfolio-123") + .walletId("wallet-456") + .idempotencyKey("idem-key-ghi") + .metadata(new WalletStakingMetadata.Builder().externalId("ext-456").build()) + .build(); + + String json = objectMapper.writeValueAsString(request); + assertNotNull(json); + assertTrue(json.contains("\"idempotency_key\":\"idem-key-ghi\"")); + assertTrue(json.contains("\"external_id\":\"ext-456\"")); + assertFalse(json.contains("portfolio_id")); + assertFalse(json.contains("wallet_id")); + } + @Test public void testCreateUnstakeResponseDeserialization() throws JsonProcessingException { String json = @@ -175,6 +197,7 @@ public void testPortfolioStakingUnstakeRequestSerialization() throws JsonProcess .idempotencyKey("idem-unstake-1") .currencySymbol("ETH") .amount("5.0") + .validatorProvider(ValidatorProvider.VALIDATOR_PROVIDER_FIGMENT) .build(); String json = objectMapper.writeValueAsString(request); @@ -182,6 +205,7 @@ public void testPortfolioStakingUnstakeRequestSerialization() throws JsonProcess assertTrue(json.contains("\"idempotency_key\":\"idem-unstake-1\"")); assertTrue(json.contains("\"currency_symbol\":\"ETH\"")); assertTrue(json.contains("\"amount\":\"5.0\"")); + assertTrue(json.contains("\"validator_provider\":\"VALIDATOR_PROVIDER_FIGMENT\"")); assertFalse(json.contains("portfolio_id")); } From b6a5ed944c031deebb8c85205a49b1ea0cad928f Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 8 Jun 2026 18:33:44 -0400 Subject: [PATCH 5/8] chore(release): bump to v1.10.0 and update CHANGELOG Document customer-facing model, request, and removal changes for the OpenAPI sync release. Co-authored-by: Cursor --- CHANGELOG.md | 42 +++++++++++++++++++++++++++++++++++++++++- pom.xml | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de04438..2dc29f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,45 @@ # Changelog +## [1.10.0] - 2026-JUN-08 + +### Added + +#### New & Updated Models + +- **`CrossMarginPrimeDerivativesEquityBreakdown`**, **`CrossMarginPrimeRiskNettingInfo`**, **`CrossMarginPrimeSpotEquityBreakdown`**, **`CrossMarginPrimeXMPosition`**: Cross-margin Prime overview breakdown types +- **`CustomStablecoinRewardDetails`**: Custom stablecoin reward metadata +- **`PrimeXMMarginCallThresholds`**, **`PrimeXMMarginRequirementBreakdown`**, **`PrimeXMMarginThreshold`**, **`PrimeXMOffsetCreditBreakdown`**: Prime XM margin detail types +- **`WalletStakingMetadata`**: Wallet staking metadata payload +- **`DateOfBirth`**: Date-of-birth value type +- Regenerated models include class and field Javadoc from OpenAPI `title` / `description` + +#### New Enums + +- **`PrimeXMHealthStatus`**, **`PrimeXMMarginRequirementType`**, **`PrimeXMMarginThresholdType`** +- **`XMControlStatus`**, **`XMEntityCallStatus`**, **`XMMarginLevel`** +- **`ValidatorProvider`**: ETH validator service providers for staking unstake requests + +### Changed + +- **Cross-margin model renames** (update imports): `XmLoan` → **`XMLoan`**, `XmMarginCall` → **`XMMarginCall`**, `XmPosition` → **`XMPosition`**, `XmRiskNettingInfo` → **`XMRiskNettingInfo`**, `XmSummary` → **`XMSummary`** +- **Cross-margin enum renames** (update imports): `XmCallStatus` → **`XMCallStatus`**, `XmCallType` → **`XMCallType`**, `XmControlStatus` → **`XMControlStatus`**, `XmEntityCallStatus` → **`XMEntityCallStatus`**, `XmLiquidationStatus` → **`XMLiquidationStatus`**, `XmParty` → **`XMParty`** +- **`CreateStakeRequest`** / **`CreateUnstakeRequest`**: Added `metadata` (`WalletStakingMetadata`) for wallet staking initiate/unstake +- **`PortfolioStakingUnstakeRequest`**: Added `validatorProvider` (`ValidatorProvider`) for portfolio unstake +- Regenerated **`model/`** and **`model/enums/`** from the latest OpenAPI spec via restored **`tools/model-generator`** + +### Removed + +- **`TravelRuleEntry`**, **`TravelRuleWalletDetails`**, **`Vasp`**: Removed from the public OpenAPI spec +- **`XmMarginLevel`**: Replaced by **`XMMarginLevel`** (wire values unchanged; update imports) +- **`PositionsService.listAggregatePositions()`** / **`listPositions()`**: Use **`listAggregateEntityPositions()`** / **`listEntityPositions()`** +- **`AdvancedTransferService.getPortfolioCounterpartyId()`**: Use **`PortfoliosService.getPortfolioCounterpartyId()`** +- Unused legacy request/response types superseded by canonical names: **`ListUsersRequest`/`Response`** (use **`ListEntityUsersRequest`/`Response`**), **`CreateTransferRequest`/`Response`** (use **`CreateWalletTransferRequest`/`Response`**), **`CreateWithdrawalRequest`/`Response`** (use **`CreateWalletWithdrawalRequest`/`Response`**), **`CreatePortfolioStakeRequest`/`Response`** (use **`PortfolioStakingInitiateRequest`/`Response`**), **`CreatePortfolioUnstakeRequest`/`Response`** (use **`PortfolioStakingUnstakeRequest`/`Response`**), **`ClaimStakingRewardsRequest`/`Response`** (use **`ClaimRewardsRequest`/`Response`**), **`GetOrderRequest`/`Response`** (use **`GetOrderByOrderIdRequest`/`Response`**), **`ListAggregatePositionsRequest`/`Response`**, **`ListPositionsRequest`/`Response`**, **`advancedtransfer.GetPortfolioCounterpartyIdRequest`/`Response`** + +### Notes + +- Minor release: OpenAPI spec sync, regenerated models/enums, and service-layer request alignment. No new service methods. +- Consumers on deprecated position/counterparty helpers or removed legacy types should migrate to the replacements listed above. + ## [1.9.0] - 2026-06-03 ### Changed @@ -69,7 +109,7 @@ - **`PositionsService.listAggregatePositions()`** / **`listPositions()`**: same routes as **`listAggregateEntityPositions()`** / **`listEntityPositions()`**; prefer the spec-aligned entity-named methods. - **`AdvancedTransferService.getPortfolioCounterpartyId()`**: prefer **`PortfoliosService.getPortfolioCounterpartyId()`** (same HTTP route). - +### Removed - **`tools/model-generator`**: removed; maintain models, requests, responses, and services against `apiSpec/prime-public-spec.yaml` - **`com.coinbase.prime.advancedtransfers`** package and **`AdvancedTransfersService`**: renamed to **`com.coinbase.prime.advancedtransfer`** and **`AdvancedTransferService`**; **`PrimeServiceFactory.createAdvancedTransfersService()`** replaced by **`createAdvancedTransferService()`** diff --git a/pom.xml b/pom.xml index 6c4c045..7c73f85 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/prime-sdk-java - 1.9.0 + 1.10.0 Apache License, Version 2.0 From 8a5d26c13b09607820e9d98019534e573eeea21a Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Tue, 9 Jun 2026 11:32:51 -0400 Subject: [PATCH 6/8] address review: restore getPortfolioCounterpartyId on AdvancedTransferService The OpenAPI spec tags this route under Advanced Transfer. Keep PortfoliosService as a deprecated shim for backward compatibility. Co-authored-by: Cursor --- .../AdvancedTransferService.java | 14 ++++ .../AdvancedTransferServiceImpl.java | 11 ++++ .../GetPortfolioCounterpartyIdRequest.java | 66 +++++++++++++++++++ .../GetPortfolioCounterpartyIdResponse.java | 36 ++++++++++ .../prime/portfolios/PortfoliosService.java | 6 ++ .../portfolios/PortfoliosServiceImpl.java | 4 ++ .../prime/integration/AdvancedTransferIT.java | 7 +- 7 files changed, 139 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java create mode 100644 src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java index 04439c0..591fc2b 100644 --- a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java +++ b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferService.java @@ -77,4 +77,18 @@ CancelAdvancedTransferResponse cancelAdvancedTransfer(CancelAdvancedTransferRequ ListAdvancedTransferTransactionsResponse listAdvancedTransferTransactions( ListAdvancedTransferTransactionsRequest request) throws CoinbaseClientException, CoinbasePrimeException; + + /** + * Get Portfolio Counterparty ID. + * + *

Retrieve the counterparty ID for a given portfolio + * + * @param request the request parameters for this operation + * @return the response payload for this operation + * @throws CoinbaseClientException if the request fails client-side validation + * @throws CoinbasePrimeException if the Prime API returns an error response + */ + GetPortfolioCounterpartyIdResponse getPortfolioCounterpartyId( + GetPortfolioCounterpartyIdRequest request) + throws CoinbaseClientException, CoinbasePrimeException; } diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java index 9531ca4..039ee71 100644 --- a/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java +++ b/src/main/java/com/coinbase/prime/advancedtransfer/AdvancedTransferServiceImpl.java @@ -76,4 +76,15 @@ public ListAdvancedTransferTransactionsResponse listAdvancedTransferTransactions List.of(200), new TypeReference() {}); } + + @Override + public GetPortfolioCounterpartyIdResponse getPortfolioCounterpartyId( + GetPortfolioCounterpartyIdRequest request) throws CoinbasePrimeException { + return this.request( + HttpMethod.GET, + String.format("/portfolios/%s/counterparty", request.getPortfolioId()), + request, + List.of(200), + new TypeReference() {}); + } } diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java b/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java new file mode 100644 index 0000000..91d7d16 --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdRequest.java @@ -0,0 +1,66 @@ +/* + * 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.advancedtransfer; + +import static com.coinbase.core.utils.Utils.isNullOrEmpty; + +import com.coinbase.core.errors.CoinbaseClientException; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Get Portfolio Counterparty ID */ +public class GetPortfolioCounterpartyIdRequest { + @JsonProperty(required = true, value = "portfolio_id") + @JsonIgnore + private String portfolioId; + + public GetPortfolioCounterpartyIdRequest() {} + + public GetPortfolioCounterpartyIdRequest(Builder builder) { + this.portfolioId = builder.portfolioId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public static class Builder { + private String portfolioId; + + public Builder() {} + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public GetPortfolioCounterpartyIdRequest build() throws CoinbaseClientException { + validate(); + return new GetPortfolioCounterpartyIdRequest(this); + } + + private void validate() throws CoinbaseClientException { + if (isNullOrEmpty(this.portfolioId)) { + throw new CoinbaseClientException("PortfolioId is required"); + } + } + } +} diff --git a/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java b/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java new file mode 100644 index 0000000..814479f --- /dev/null +++ b/src/main/java/com/coinbase/prime/advancedtransfer/GetPortfolioCounterpartyIdResponse.java @@ -0,0 +1,36 @@ +/* + * 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.advancedtransfer; + +import com.coinbase.prime.model.Counterparty; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Get Portfolio Counterparty ID */ +public class GetPortfolioCounterpartyIdResponse { + @JsonProperty("counterparty") + private Counterparty counterparty; + + public GetPortfolioCounterpartyIdResponse() {} + + public Counterparty getCounterparty() { + return counterparty; + } + + public void setCounterparty(Counterparty counterparty) { + this.counterparty = counterparty; + } +} diff --git a/src/main/java/com/coinbase/prime/portfolios/PortfoliosService.java b/src/main/java/com/coinbase/prime/portfolios/PortfoliosService.java index 522d1c4..064774a 100644 --- a/src/main/java/com/coinbase/prime/portfolios/PortfoliosService.java +++ b/src/main/java/com/coinbase/prime/portfolios/PortfoliosService.java @@ -44,6 +44,12 @@ ListPortfoliosResponse listPortfolios(ListPortfoliosRequest request) GetPortfolioResponse getPortfolio(GetPortfolioRequest request) throws CoinbaseClientException, CoinbasePrimeException; + /** + * @deprecated Prefer {@link + * com.coinbase.prime.advancedtransfer.AdvancedTransferService#getPortfolioCounterpartyId(com.coinbase.prime.advancedtransfer.GetPortfolioCounterpartyIdRequest)} + * — this route is tagged under Advanced Transfer in the REST API. + */ + @Deprecated GetPortfolioCounterpartyIdResponse getPortfolioCounterpartyId( GetPortfolioCounterpartyIdRequest request) throws CoinbaseClientException, CoinbasePrimeException; diff --git a/src/main/java/com/coinbase/prime/portfolios/PortfoliosServiceImpl.java b/src/main/java/com/coinbase/prime/portfolios/PortfoliosServiceImpl.java index 52c8b02..7ef453b 100644 --- a/src/main/java/com/coinbase/prime/portfolios/PortfoliosServiceImpl.java +++ b/src/main/java/com/coinbase/prime/portfolios/PortfoliosServiceImpl.java @@ -50,6 +50,10 @@ public GetPortfolioResponse getPortfolio(GetPortfolioRequest request) new TypeReference() {}); } + /** + * @deprecated Prefer {@link com.coinbase.prime.advancedtransfer.AdvancedTransferService} + */ + @Deprecated @Override public GetPortfolioCounterpartyIdResponse getPortfolioCounterpartyId( GetPortfolioCounterpartyIdRequest request) throws CoinbasePrimeException { diff --git a/src/test/java/com/coinbase/prime/integration/AdvancedTransferIT.java b/src/test/java/com/coinbase/prime/integration/AdvancedTransferIT.java index 2b9921c..44b4eca 100644 --- a/src/test/java/com/coinbase/prime/integration/AdvancedTransferIT.java +++ b/src/test/java/com/coinbase/prime/integration/AdvancedTransferIT.java @@ -21,9 +21,6 @@ import com.coinbase.prime.advancedtransfer.*; import com.coinbase.prime.factory.PrimeServiceFactory; -import com.coinbase.prime.portfolios.GetPortfolioCounterpartyIdRequest; -import com.coinbase.prime.portfolios.GetPortfolioCounterpartyIdResponse; -import com.coinbase.prime.portfolios.PortfoliosService; import org.junit.jupiter.api.Test; public class AdvancedTransferIT extends BaseIntegrationTest { @@ -62,10 +59,10 @@ public void testGetPortfolioCounterpartyId() throws Exception { assumeTrue( portfolioId != null && !portfolioId.isEmpty(), "Skipping: COINBASE_PRIME_PORTFOLIO_ID not set"); - PortfoliosService service = PrimeServiceFactory.createPortfoliosService(client); + AdvancedTransferService service = PrimeServiceFactory.createAdvancedTransferService(client); GetPortfolioCounterpartyIdResponse response = service.getPortfolioCounterpartyId( - new GetPortfolioCounterpartyIdRequest.Builder(portfolioId).build()); + new GetPortfolioCounterpartyIdRequest.Builder().portfolioId(portfolioId).build()); assertNotNull(response); } From 47de8fc711f9d7887e5820def4df515de7a2b11c Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Tue, 9 Jun 2026 11:33:01 -0400 Subject: [PATCH 7/8] address review: update generated model headers and DateOfBirth primitives Remove OpenAPI Generator attribution from generated file headers and convert DateOfBirth year/month/day fields to int primitives via post-processor. Co-authored-by: Cursor --- .../com/coinbase/prime/model/Accrual.java | 2 -- .../prime/model/ActiveLiquidationSummary.java | 2 -- .../com/coinbase/prime/model/Activity.java | 2 -- .../prime/model/ActivityMetadataAccount.java | 2 -- .../model/ActivityMetadataConsensus.java | 2 -- .../model/ActivityMetadataTransactions.java | 2 -- .../prime/model/AddressBookEntry.java | 2 -- .../coinbase/prime/model/AddressEntry.java | 2 -- .../coinbase/prime/model/AddressGroup.java | 2 -- .../prime/model/AdvancedTransfer.java | 2 -- .../prime/model/AggregatedFiatBalance.java | 2 -- .../com/coinbase/prime/model/Allocation.java | 2 -- .../coinbase/prime/model/AllocationLeg.java | 2 -- .../com/coinbase/prime/model/AmountDue.java | 2 -- .../java/com/coinbase/prime/model/Asset.java | 2 -- .../coinbase/prime/model/AssetBalance.java | 2 -- .../com/coinbase/prime/model/AssetChange.java | 2 -- .../com/coinbase/prime/model/Balance.java | 2 -- .../prime/model/BlindMatchMetadata.java | 2 -- .../prime/model/BlockchainAddress.java | 2 -- .../com/coinbase/prime/model/BuyingPower.java | 2 -- .../java/com/coinbase/prime/model/Candle.java | 2 -- .../com/coinbase/prime/model/Commission.java | 2 -- .../prime/model/CommissionDetailTotal.java | 2 -- .../com/coinbase/prime/model/Conversion.java | 2 -- .../prime/model/ConversionDetail.java | 2 -- .../coinbase/prime/model/Counterparty.java | 2 -- .../prime/model/CounterpartyDestination.java | 2 -- .../model/CreateAllocationResponseBody.java | 2 -- .../CreateNetAllocationResponseBody.java | 2 -- .../prime/model/CrossMarginOverview.java | 2 -- ...MarginPrimeDerivativesEquityBreakdown.java | 2 -- .../model/CrossMarginPrimeMarginSummary.java | 2 -- .../CrossMarginPrimeRiskNettingInfo.java | 2 -- .../CrossMarginPrimeSpotEquityBreakdown.java | 2 -- .../model/CrossMarginPrimeXMPosition.java | 2 -- .../model/CrossMarginRiskParameters.java | 2 -- .../model/CustomStablecoinRewardDetails.java | 2 -- .../com/coinbase/prime/model/DateOfBirth.java | 32 +++++++++---------- .../com/coinbase/prime/model/DefiBalance.java | 2 -- .../prime/model/DestinationAlloc.java | 2 -- .../coinbase/prime/model/DetailedAddress.java | 2 -- .../com/coinbase/prime/model/DisplayUser.java | 2 -- .../coinbase/prime/model/EntityBalance.java | 2 -- .../com/coinbase/prime/model/EntityUser.java | 2 -- .../prime/model/EstimatedNetworkFees.java | 2 -- .../com/coinbase/prime/model/EvmParams.java | 2 -- .../coinbase/prime/model/ExistingLocate.java | 2 -- .../coinbase/prime/model/FcmMarginCall.java | 2 -- .../com/coinbase/prime/model/FcmPosition.java | 2 -- .../prime/model/FcmScheduledMaintenance.java | 2 -- .../prime/model/FcmTradingSessionDetails.java | 2 -- .../java/com/coinbase/prime/model/Fill.java | 2 -- .../coinbase/prime/model/FundMovement.java | 2 -- .../prime/model/FutureProductDetails.java | 2 -- .../coinbase/prime/model/FuturesSweep.java | 2 -- .../com/coinbase/prime/model/Invoice.java | 2 -- .../com/coinbase/prime/model/InvoiceItem.java | 2 -- .../coinbase/prime/model/LimitOrderEdit.java | 2 -- .../com/coinbase/prime/model/LoanInfo.java | 2 -- .../java/com/coinbase/prime/model/Locate.java | 2 -- .../com/coinbase/prime/model/MarginAddOn.java | 2 -- .../prime/model/MarginCallRecord.java | 2 -- .../prime/model/MarginInformation.java | 2 -- .../coinbase/prime/model/MarginSummary.java | 2 -- .../prime/model/MarginSummaryHistorical.java | 2 -- .../com/coinbase/prime/model/MarketData.java | 2 -- .../com/coinbase/prime/model/MarketRate.java | 2 -- .../coinbase/prime/model/MatchMetadata.java | 2 -- .../prime/model/NaturalPersonName.java | 2 -- .../com/coinbase/prime/model/Network.java | 2 -- .../coinbase/prime/model/NetworkDetails.java | 2 -- .../coinbase/prime/model/NftCollection.java | 2 -- .../com/coinbase/prime/model/NftItem.java | 2 -- .../coinbase/prime/model/OnchainAsset.java | 2 -- .../coinbase/prime/model/OnchainBalance.java | 2 -- .../model/OnchainTransactionDetails.java | 2 -- .../model/OnchainTransactionMetadata.java | 2 -- .../java/com/coinbase/prime/model/Order.java | 2 -- .../com/coinbase/prime/model/OrderEdit.java | 2 -- .../prime/model/PaymentMethodDestination.java | 2 -- .../prime/model/PaymentMethodDetails.java | 2 -- .../prime/model/PaymentMethodSummary.java | 2 -- .../prime/model/PerpetualProductDetails.java | 2 -- .../com/coinbase/prime/model/PmAssetInfo.java | 2 -- .../com/coinbase/prime/model/Portfolio.java | 2 -- .../prime/model/PortfolioStakingMetadata.java | 2 -- .../coinbase/prime/model/PortfolioUser.java | 2 -- .../com/coinbase/prime/model/Position.java | 2 -- .../prime/model/PositionReference.java | 2 -- .../model/PostTradeCreditInformation.java | 2 -- .../model/PrimeXMMarginCallThresholds.java | 2 -- .../PrimeXMMarginRequirementBreakdown.java | 2 -- .../prime/model/PrimeXMMarginThreshold.java | 2 -- .../model/PrimeXMOffsetCreditBreakdown.java | 2 -- .../prime/model/ProcessRequirements.java | 2 -- .../com/coinbase/prime/model/Product.java | 2 -- ...leDataForAnExistingDepositTransaction.java | 2 -- .../coinbase/prime/model/RewardMetadata.java | 2 -- .../prime/model/RfqProductDetails.java | 2 -- .../coinbase/prime/model/RiskAssessment.java | 2 -- .../com/coinbase/prime/model/RpcConfig.java | 2 -- .../coinbase/prime/model/ShortCollateral.java | 2 -- .../coinbase/prime/model/StakingStatus.java | 2 -- .../com/coinbase/prime/model/SweepAmount.java | 2 -- .../com/coinbase/prime/model/TfAsset.java | 2 -- .../coinbase/prime/model/TfObligation.java | 2 -- .../prime/model/TierPairRateEntry.java | 2 -- .../prime/model/TieredPricingFee.java | 2 -- .../com/coinbase/prime/model/Transaction.java | 2 -- .../prime/model/TransactionMetadata.java | 2 -- .../prime/model/TransactionValidator.java | 2 -- .../prime/model/TransferLocation.java | 2 -- .../coinbase/prime/model/TravelRuleData.java | 2 -- .../coinbase/prime/model/TravelRuleParty.java | 2 -- .../coinbase/prime/model/UnstakingStatus.java | 2 -- .../com/coinbase/prime/model/UserAction.java | 2 -- .../prime/model/ValidatorAllocation.java | 2 -- .../prime/model/ValidatorStakingInfo.java | 2 -- .../prime/model/ValidatorUnstakePreview.java | 2 -- .../prime/model/ValidatorUnstakingInfo.java | 2 -- .../java/com/coinbase/prime/model/Wallet.java | 2 -- .../prime/model/WalletClaimRewardsInputs.java | 2 -- .../WalletCryptoDepositInstructions.java | 2 -- .../model/WalletFiatDepositInstructions.java | 2 -- .../prime/model/WalletStakeInputs.java | 2 -- .../prime/model/WalletStakingMetadata.java | 2 -- .../prime/model/WalletUnstakeInputs.java | 2 -- .../coinbase/prime/model/WithdrawalPower.java | 2 -- .../java/com/coinbase/prime/model/XMLoan.java | 2 -- .../coinbase/prime/model/XMMarginCall.java | 2 -- .../com/coinbase/prime/model/XMPosition.java | 2 -- .../prime/model/XMRiskNettingInfo.java | 2 -- .../com/coinbase/prime/model/XMSummary.java | 2 -- .../coinbase/prime/model/enums/Action.java | 2 -- .../prime/model/enums/ActivityCategory.java | 2 -- .../prime/model/enums/ActivityLevel.java | 2 -- .../model/enums/ActivitySecondaryType.java | 2 -- .../prime/model/enums/ActivityStatus.java | 2 -- .../prime/model/enums/AddressBookType.java | 2 -- .../model/enums/AdvancedTransferState.java | 2 -- .../model/enums/AdvancedTransferType.java | 2 -- .../prime/model/enums/AllocationSizeType.java | 2 -- .../prime/model/enums/AllocationStatus.java | 2 -- .../prime/model/enums/AssetChangeType.java | 2 -- .../coinbase/prime/model/enums/Benchmark.java | 2 -- .../prime/model/enums/CandlesGranularity.java | 2 -- .../prime/model/enums/ContractExpiryType.java | 2 -- .../model/enums/CustodyActivityType.java | 2 -- .../prime/model/enums/DestinationType.java | 2 -- .../prime/model/enums/EstimateType.java | 2 -- .../model/enums/ExpiringContractStatus.java | 2 -- .../prime/model/enums/FcmMarginCallState.java | 2 -- .../prime/model/enums/FcmMarginCallType.java | 2 -- .../model/enums/FcmMarginHealthState.java | 2 -- .../prime/model/enums/FcmPositionSide.java | 2 -- .../enums/FcmTradingSessionClosedReason.java | 2 -- .../model/enums/FcmTradingSessionState.java | 2 -- .../prime/model/enums/FuturesSweepStatus.java | 2 -- .../prime/model/enums/HierarchyType.java | 2 -- .../prime/model/enums/InvoiceState.java | 2 -- .../prime/model/enums/InvoiceType.java | 2 -- .../coinbase/prime/model/enums/LoanType.java | 2 -- .../prime/model/enums/MarginAddOnType.java | 2 -- .../prime/model/enums/NetworkFamily.java | 2 -- .../prime/model/enums/NetworkType.java | 2 -- .../coinbase/prime/model/enums/OrderSide.java | 2 -- .../prime/model/enums/OrderStatus.java | 2 -- .../coinbase/prime/model/enums/OrderType.java | 2 -- .../prime/model/enums/PaymentMethodType.java | 2 -- .../prime/model/enums/PegOffsetType.java | 2 -- .../model/enums/PortfolioBalanceType.java | 2 -- .../model/enums/PositionReferenceType.java | 2 -- .../prime/model/enums/PrimeActivityType.java | 2 -- .../model/enums/PrimeXMControlStatus.java | 2 -- .../model/enums/PrimeXMHealthStatus.java | 2 -- .../prime/model/enums/PrimeXMMarginLevel.java | 2 -- .../enums/PrimeXMMarginRequirementType.java | 2 -- .../enums/PrimeXMMarginThresholdType.java | 2 -- .../prime/model/enums/ProductPermissions.java | 2 -- .../prime/model/enums/ProductType.java | 2 -- .../coinbase/prime/model/enums/RateType.java | 2 -- .../prime/model/enums/RewardSubtype.java | 2 -- .../prime/model/enums/RiskManagementType.java | 2 -- .../model/enums/SecondaryPermission.java | 2 -- .../prime/model/enums/SigningStatus.java | 2 -- .../prime/model/enums/SortDirection.java | 2 -- .../coinbase/prime/model/enums/StakeType.java | 2 -- .../prime/model/enums/TimeInForceType.java | 2 -- .../prime/model/enums/TransactionStatus.java | 2 -- .../prime/model/enums/TransactionType.java | 2 -- .../model/enums/TransferLocationType.java | 2 -- .../prime/model/enums/TravelRuleStatus.java | 2 -- .../model/enums/TravelRuleWalletType.java | 2 -- .../prime/model/enums/UnstakeType.java | 2 -- .../coinbase/prime/model/enums/UserRole.java | 2 -- .../prime/model/enums/ValidatorProvider.java | 2 -- .../prime/model/enums/ValidatorStatus.java | 2 -- .../prime/model/enums/VisibilityStatus.java | 2 -- .../enums/WalletDepositInstructionType.java | 2 -- .../prime/model/enums/WalletType.java | 2 -- .../prime/model/enums/WalletVisibility.java | 2 -- .../prime/model/enums/XMCallStatus.java | 2 -- .../prime/model/enums/XMCallType.java | 2 -- .../prime/model/enums/XMControlStatus.java | 2 -- .../prime/model/enums/XMEntityCallStatus.java | 2 -- .../model/enums/XMLiquidationStatus.java | 2 -- .../prime/model/enums/XMMarginLevel.java | 2 -- .../coinbase/prime/model/enums/XMParty.java | 2 -- .../tools/modelgenerator/PostProcessor.java | 19 +++++++++++ .../templates/licenseInfo.mustache | 2 -- 211 files changed, 34 insertions(+), 435 deletions(-) diff --git a/src/main/java/com/coinbase/prime/model/Accrual.java b/src/main/java/com/coinbase/prime/model/Accrual.java index 2434fe1..420d8d6 100644 --- a/src/main/java/com/coinbase/prime/model/Accrual.java +++ b/src/main/java/com/coinbase/prime/model/Accrual.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java index e5a0685..ad4c7a7 100644 --- a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java +++ b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Activity.java b/src/main/java/com/coinbase/prime/model/Activity.java index 6281d4c..19de362 100644 --- a/src/main/java/com/coinbase/prime/model/Activity.java +++ b/src/main/java/com/coinbase/prime/model/Activity.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java index 6beda4e..b6c3341 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java index 4d98dea..5a2ae77 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java index f27363b..a345160 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java index 9499a1e..f9848a6 100644 --- a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AddressEntry.java b/src/main/java/com/coinbase/prime/model/AddressEntry.java index 1809f10..361e823 100644 --- a/src/main/java/com/coinbase/prime/model/AddressEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressEntry.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AddressGroup.java b/src/main/java/com/coinbase/prime/model/AddressGroup.java index 7c6f45b..38fa3f6 100644 --- a/src/main/java/com/coinbase/prime/model/AddressGroup.java +++ b/src/main/java/com/coinbase/prime/model/AddressGroup.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java index ef3bc17..fcad19e 100644 --- a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java +++ b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java index 518606b..c1bfb53 100644 --- a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java +++ b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Allocation.java b/src/main/java/com/coinbase/prime/model/Allocation.java index 1288432..3d8f2a5 100644 --- a/src/main/java/com/coinbase/prime/model/Allocation.java +++ b/src/main/java/com/coinbase/prime/model/Allocation.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AllocationLeg.java b/src/main/java/com/coinbase/prime/model/AllocationLeg.java index c2cd7c2..7f64cea 100644 --- a/src/main/java/com/coinbase/prime/model/AllocationLeg.java +++ b/src/main/java/com/coinbase/prime/model/AllocationLeg.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AmountDue.java b/src/main/java/com/coinbase/prime/model/AmountDue.java index 1944778..16f8af2 100644 --- a/src/main/java/com/coinbase/prime/model/AmountDue.java +++ b/src/main/java/com/coinbase/prime/model/AmountDue.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Asset.java b/src/main/java/com/coinbase/prime/model/Asset.java index 0a04ba7..f7a6a37 100644 --- a/src/main/java/com/coinbase/prime/model/Asset.java +++ b/src/main/java/com/coinbase/prime/model/Asset.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AssetBalance.java b/src/main/java/com/coinbase/prime/model/AssetBalance.java index 5b9dad1..bab77eb 100644 --- a/src/main/java/com/coinbase/prime/model/AssetBalance.java +++ b/src/main/java/com/coinbase/prime/model/AssetBalance.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/AssetChange.java b/src/main/java/com/coinbase/prime/model/AssetChange.java index 3faa181..32d43bf 100644 --- a/src/main/java/com/coinbase/prime/model/AssetChange.java +++ b/src/main/java/com/coinbase/prime/model/AssetChange.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Balance.java b/src/main/java/com/coinbase/prime/model/Balance.java index 7c6f236..afd769a 100644 --- a/src/main/java/com/coinbase/prime/model/Balance.java +++ b/src/main/java/com/coinbase/prime/model/Balance.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java index f3e61ad..f53a2ec 100644 --- a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java +++ b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java index d4852b0..6e55858 100644 --- a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java +++ b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/BuyingPower.java b/src/main/java/com/coinbase/prime/model/BuyingPower.java index 4cc49da..10db8ca 100644 --- a/src/main/java/com/coinbase/prime/model/BuyingPower.java +++ b/src/main/java/com/coinbase/prime/model/BuyingPower.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Candle.java b/src/main/java/com/coinbase/prime/model/Candle.java index cfa7cf6..5594bd2 100644 --- a/src/main/java/com/coinbase/prime/model/Candle.java +++ b/src/main/java/com/coinbase/prime/model/Candle.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Commission.java b/src/main/java/com/coinbase/prime/model/Commission.java index 3921f4f..2e6ec81 100644 --- a/src/main/java/com/coinbase/prime/model/Commission.java +++ b/src/main/java/com/coinbase/prime/model/Commission.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java index 820a55d..dd68544 100644 --- a/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java +++ b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Conversion.java b/src/main/java/com/coinbase/prime/model/Conversion.java index 49e0eef..f26ae77 100644 --- a/src/main/java/com/coinbase/prime/model/Conversion.java +++ b/src/main/java/com/coinbase/prime/model/Conversion.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ConversionDetail.java b/src/main/java/com/coinbase/prime/model/ConversionDetail.java index dc88a00..b55b319 100644 --- a/src/main/java/com/coinbase/prime/model/ConversionDetail.java +++ b/src/main/java/com/coinbase/prime/model/ConversionDetail.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Counterparty.java b/src/main/java/com/coinbase/prime/model/Counterparty.java index b77cf77..5aa627d 100644 --- a/src/main/java/com/coinbase/prime/model/Counterparty.java +++ b/src/main/java/com/coinbase/prime/model/Counterparty.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java b/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java index aa374f8..1d98213 100644 --- a/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java +++ b/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java index 83df389..41b9f63 100644 --- a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java index 6b1ced2..400fa72 100644 --- a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java index 83e8543..8727ef7 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java index 9f62f41..bb84bcb 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java index c41bdba..1d30f79 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java index 714aaf1..3f00fc9 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java index b2d1f41..f29a85e 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java index 6e213d2..6987007 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java b/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java index 954f388..6d73dde 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java index 9b4f098..de3469a 100644 --- a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/DateOfBirth.java b/src/main/java/com/coinbase/prime/model/DateOfBirth.java index d8b0ee4..9b65542 100644 --- a/src/main/java/com/coinbase/prime/model/DateOfBirth.java +++ b/src/main/java/com/coinbase/prime/model/DateOfBirth.java @@ -1,8 +1,6 @@ /* * 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 @@ -22,16 +20,16 @@ public class DateOfBirth { /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */ - private Integer year; + private int year; /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ - private Integer month; + private int 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. */ - private Integer day; + private int day; public DateOfBirth() {} @@ -41,48 +39,48 @@ public DateOfBirth(Builder builder) { this.day = builder.day; } - public Integer getYear() { + public int getYear() { return year; } - public void setYear(Integer year) { + public void setYear(int year) { this.year = year; } - public Integer getMonth() { + public int getMonth() { return month; } - public void setMonth(Integer month) { + public void setMonth(int month) { this.month = month; } - public Integer getDay() { + public int getDay() { return day; } - public void setDay(Integer day) { + public void setDay(int day) { this.day = day; } public static class Builder { - private Integer year; + private int year; - private Integer month; + private int month; - private Integer day; + private int day; - public Builder year(Integer year) { + public Builder year(int year) { this.year = year; return this; } - public Builder month(Integer month) { + public Builder month(int month) { this.month = month; return this; } - public Builder day(Integer day) { + public Builder day(int day) { this.day = day; return this; } diff --git a/src/main/java/com/coinbase/prime/model/DefiBalance.java b/src/main/java/com/coinbase/prime/model/DefiBalance.java index 033e0ee..bc53f3d 100644 --- a/src/main/java/com/coinbase/prime/model/DefiBalance.java +++ b/src/main/java/com/coinbase/prime/model/DefiBalance.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java index 9904648..59fc803 100644 --- a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java +++ b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/DetailedAddress.java b/src/main/java/com/coinbase/prime/model/DetailedAddress.java index 54d3180..9627d47 100644 --- a/src/main/java/com/coinbase/prime/model/DetailedAddress.java +++ b/src/main/java/com/coinbase/prime/model/DetailedAddress.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/DisplayUser.java b/src/main/java/com/coinbase/prime/model/DisplayUser.java index da34c3d..db14b2d 100644 --- a/src/main/java/com/coinbase/prime/model/DisplayUser.java +++ b/src/main/java/com/coinbase/prime/model/DisplayUser.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/EntityBalance.java b/src/main/java/com/coinbase/prime/model/EntityBalance.java index 8af893f..ad0fd08 100644 --- a/src/main/java/com/coinbase/prime/model/EntityBalance.java +++ b/src/main/java/com/coinbase/prime/model/EntityBalance.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/EntityUser.java b/src/main/java/com/coinbase/prime/model/EntityUser.java index a5ce62a..2e97ec7 100644 --- a/src/main/java/com/coinbase/prime/model/EntityUser.java +++ b/src/main/java/com/coinbase/prime/model/EntityUser.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java b/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java index 314a3a3..cff61ee 100644 --- a/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java +++ b/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/EvmParams.java b/src/main/java/com/coinbase/prime/model/EvmParams.java index 6fd69eb..de7c401 100644 --- a/src/main/java/com/coinbase/prime/model/EvmParams.java +++ b/src/main/java/com/coinbase/prime/model/EvmParams.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ExistingLocate.java b/src/main/java/com/coinbase/prime/model/ExistingLocate.java index 3295184..c8a65d3 100644 --- a/src/main/java/com/coinbase/prime/model/ExistingLocate.java +++ b/src/main/java/com/coinbase/prime/model/ExistingLocate.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java index 687ccee..a727e2e 100644 --- a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/FcmPosition.java b/src/main/java/com/coinbase/prime/model/FcmPosition.java index 4302fbc..f3ea0a3 100644 --- a/src/main/java/com/coinbase/prime/model/FcmPosition.java +++ b/src/main/java/com/coinbase/prime/model/FcmPosition.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java index cd159a4..c00b686 100644 --- a/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java +++ b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java index 90f1961..adf59b8 100644 --- a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java +++ b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Fill.java b/src/main/java/com/coinbase/prime/model/Fill.java index 051b7ad..5a000cf 100644 --- a/src/main/java/com/coinbase/prime/model/Fill.java +++ b/src/main/java/com/coinbase/prime/model/Fill.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/FundMovement.java b/src/main/java/com/coinbase/prime/model/FundMovement.java index d7c30c3..fa7f62d 100644 --- a/src/main/java/com/coinbase/prime/model/FundMovement.java +++ b/src/main/java/com/coinbase/prime/model/FundMovement.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java index 22c333f..28bc4b3 100644 --- a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/FuturesSweep.java b/src/main/java/com/coinbase/prime/model/FuturesSweep.java index 348c70a..c5ddc69 100644 --- a/src/main/java/com/coinbase/prime/model/FuturesSweep.java +++ b/src/main/java/com/coinbase/prime/model/FuturesSweep.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Invoice.java b/src/main/java/com/coinbase/prime/model/Invoice.java index 887d42a..95598d6 100644 --- a/src/main/java/com/coinbase/prime/model/Invoice.java +++ b/src/main/java/com/coinbase/prime/model/Invoice.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/InvoiceItem.java b/src/main/java/com/coinbase/prime/model/InvoiceItem.java index 9d87efb..780c6dd 100644 --- a/src/main/java/com/coinbase/prime/model/InvoiceItem.java +++ b/src/main/java/com/coinbase/prime/model/InvoiceItem.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java index a4ffe5d..d22753e 100644 --- a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/LoanInfo.java b/src/main/java/com/coinbase/prime/model/LoanInfo.java index 4283cbd..8a30363 100644 --- a/src/main/java/com/coinbase/prime/model/LoanInfo.java +++ b/src/main/java/com/coinbase/prime/model/LoanInfo.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Locate.java b/src/main/java/com/coinbase/prime/model/Locate.java index 20c9a78..be312b2 100644 --- a/src/main/java/com/coinbase/prime/model/Locate.java +++ b/src/main/java/com/coinbase/prime/model/Locate.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MarginAddOn.java b/src/main/java/com/coinbase/prime/model/MarginAddOn.java index 1687e27..d0c49cd 100644 --- a/src/main/java/com/coinbase/prime/model/MarginAddOn.java +++ b/src/main/java/com/coinbase/prime/model/MarginAddOn.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MarginCallRecord.java b/src/main/java/com/coinbase/prime/model/MarginCallRecord.java index 22db7aa..3c87f9f 100644 --- a/src/main/java/com/coinbase/prime/model/MarginCallRecord.java +++ b/src/main/java/com/coinbase/prime/model/MarginCallRecord.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MarginInformation.java b/src/main/java/com/coinbase/prime/model/MarginInformation.java index a293fda..5eca711 100644 --- a/src/main/java/com/coinbase/prime/model/MarginInformation.java +++ b/src/main/java/com/coinbase/prime/model/MarginInformation.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MarginSummary.java b/src/main/java/com/coinbase/prime/model/MarginSummary.java index ad738be..7da1753 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummary.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java b/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java index 0eca807..c800149 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MarketData.java b/src/main/java/com/coinbase/prime/model/MarketData.java index 8eba1f8..640acf9 100644 --- a/src/main/java/com/coinbase/prime/model/MarketData.java +++ b/src/main/java/com/coinbase/prime/model/MarketData.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MarketRate.java b/src/main/java/com/coinbase/prime/model/MarketRate.java index 5b6ff82..afe822c 100644 --- a/src/main/java/com/coinbase/prime/model/MarketRate.java +++ b/src/main/java/com/coinbase/prime/model/MarketRate.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/MatchMetadata.java b/src/main/java/com/coinbase/prime/model/MatchMetadata.java index eecac61..90d3e6b 100644 --- a/src/main/java/com/coinbase/prime/model/MatchMetadata.java +++ b/src/main/java/com/coinbase/prime/model/MatchMetadata.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/NaturalPersonName.java b/src/main/java/com/coinbase/prime/model/NaturalPersonName.java index 7f2507f..aa3dd35 100644 --- a/src/main/java/com/coinbase/prime/model/NaturalPersonName.java +++ b/src/main/java/com/coinbase/prime/model/NaturalPersonName.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Network.java b/src/main/java/com/coinbase/prime/model/Network.java index 56c11fe..6a46f4c 100644 --- a/src/main/java/com/coinbase/prime/model/Network.java +++ b/src/main/java/com/coinbase/prime/model/Network.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/NetworkDetails.java b/src/main/java/com/coinbase/prime/model/NetworkDetails.java index 122decf..d57d361 100644 --- a/src/main/java/com/coinbase/prime/model/NetworkDetails.java +++ b/src/main/java/com/coinbase/prime/model/NetworkDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/NftCollection.java b/src/main/java/com/coinbase/prime/model/NftCollection.java index 74b2cdf..6507fa6 100644 --- a/src/main/java/com/coinbase/prime/model/NftCollection.java +++ b/src/main/java/com/coinbase/prime/model/NftCollection.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/NftItem.java b/src/main/java/com/coinbase/prime/model/NftItem.java index 929d098..8fa3b1b 100644 --- a/src/main/java/com/coinbase/prime/model/NftItem.java +++ b/src/main/java/com/coinbase/prime/model/NftItem.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/OnchainAsset.java b/src/main/java/com/coinbase/prime/model/OnchainAsset.java index 91b2c97..bee9270 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainAsset.java +++ b/src/main/java/com/coinbase/prime/model/OnchainAsset.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/OnchainBalance.java b/src/main/java/com/coinbase/prime/model/OnchainBalance.java index b048b3b..3a37efb 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainBalance.java +++ b/src/main/java/com/coinbase/prime/model/OnchainBalance.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java index 4ad94cb..c3896a8 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java index 8e84839..23df078 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index a710e78..eeb2673 100644 --- a/src/main/java/com/coinbase/prime/model/Order.java +++ b/src/main/java/com/coinbase/prime/model/Order.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/OrderEdit.java b/src/main/java/com/coinbase/prime/model/OrderEdit.java index 99c326f..d5a6af5 100644 --- a/src/main/java/com/coinbase/prime/model/OrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/OrderEdit.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java b/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java index 4951dda..d5c7000 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java index 46f528a..7c12fac 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java index 52fb7b3..1e76f85 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java index 0a66c0c..a196bd6 100644 --- a/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java index ea097d3..7c9bad6 100644 --- a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java +++ b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Portfolio.java b/src/main/java/com/coinbase/prime/model/Portfolio.java index b4a74c1..c5a9c8f 100644 --- a/src/main/java/com/coinbase/prime/model/Portfolio.java +++ b/src/main/java/com/coinbase/prime/model/Portfolio.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java b/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java index f0df61d..44c43eb 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PortfolioUser.java b/src/main/java/com/coinbase/prime/model/PortfolioUser.java index 828f921..8ad0a2e 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioUser.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioUser.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Position.java b/src/main/java/com/coinbase/prime/model/Position.java index a1711c3..573a815 100644 --- a/src/main/java/com/coinbase/prime/model/Position.java +++ b/src/main/java/com/coinbase/prime/model/Position.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PositionReference.java b/src/main/java/com/coinbase/prime/model/PositionReference.java index 08164b5..c3baac4 100644 --- a/src/main/java/com/coinbase/prime/model/PositionReference.java +++ b/src/main/java/com/coinbase/prime/model/PositionReference.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java index 7d20d9f..29ae30f 100644 --- a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java +++ b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java index 2795985..d13b04c 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java index 24b7877..9a0202c 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java index 3a3eecb..afc3a5c 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java b/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java index e4efc73..55a2f2b 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ProcessRequirements.java b/src/main/java/com/coinbase/prime/model/ProcessRequirements.java index dce850d..2021ef7 100644 --- a/src/main/java/com/coinbase/prime/model/ProcessRequirements.java +++ b/src/main/java/com/coinbase/prime/model/ProcessRequirements.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Product.java b/src/main/java/com/coinbase/prime/model/Product.java index 0259247..a6a9fde 100644 --- a/src/main/java/com/coinbase/prime/model/Product.java +++ b/src/main/java/com/coinbase/prime/model/Product.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java index c76efd5..1663fcc 100644 --- a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java +++ b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/RewardMetadata.java b/src/main/java/com/coinbase/prime/model/RewardMetadata.java index ee23e7b..c5dc33a 100644 --- a/src/main/java/com/coinbase/prime/model/RewardMetadata.java +++ b/src/main/java/com/coinbase/prime/model/RewardMetadata.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java index e00364b..b164c2a 100644 --- a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/RiskAssessment.java b/src/main/java/com/coinbase/prime/model/RiskAssessment.java index cb945f2..4779699 100644 --- a/src/main/java/com/coinbase/prime/model/RiskAssessment.java +++ b/src/main/java/com/coinbase/prime/model/RiskAssessment.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/RpcConfig.java b/src/main/java/com/coinbase/prime/model/RpcConfig.java index 4e701db..a829249 100644 --- a/src/main/java/com/coinbase/prime/model/RpcConfig.java +++ b/src/main/java/com/coinbase/prime/model/RpcConfig.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ShortCollateral.java b/src/main/java/com/coinbase/prime/model/ShortCollateral.java index dfc44f5..4ac65a6 100644 --- a/src/main/java/com/coinbase/prime/model/ShortCollateral.java +++ b/src/main/java/com/coinbase/prime/model/ShortCollateral.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/StakingStatus.java b/src/main/java/com/coinbase/prime/model/StakingStatus.java index 9d05bd9..9b0fff8 100644 --- a/src/main/java/com/coinbase/prime/model/StakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/StakingStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/SweepAmount.java b/src/main/java/com/coinbase/prime/model/SweepAmount.java index de4fd50..9616df6 100644 --- a/src/main/java/com/coinbase/prime/model/SweepAmount.java +++ b/src/main/java/com/coinbase/prime/model/SweepAmount.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TfAsset.java b/src/main/java/com/coinbase/prime/model/TfAsset.java index da9aa7b..2cd8de5 100644 --- a/src/main/java/com/coinbase/prime/model/TfAsset.java +++ b/src/main/java/com/coinbase/prime/model/TfAsset.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TfObligation.java b/src/main/java/com/coinbase/prime/model/TfObligation.java index 62e596a..4ccb1c4 100644 --- a/src/main/java/com/coinbase/prime/model/TfObligation.java +++ b/src/main/java/com/coinbase/prime/model/TfObligation.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java index 95200d1..eb33282 100644 --- a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java +++ b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TieredPricingFee.java b/src/main/java/com/coinbase/prime/model/TieredPricingFee.java index 9540b4c..f8ad16a 100644 --- a/src/main/java/com/coinbase/prime/model/TieredPricingFee.java +++ b/src/main/java/com/coinbase/prime/model/TieredPricingFee.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Transaction.java b/src/main/java/com/coinbase/prime/model/Transaction.java index db38a41..01d8cd4 100644 --- a/src/main/java/com/coinbase/prime/model/Transaction.java +++ b/src/main/java/com/coinbase/prime/model/Transaction.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TransactionMetadata.java b/src/main/java/com/coinbase/prime/model/TransactionMetadata.java index b135743..d132085 100644 --- a/src/main/java/com/coinbase/prime/model/TransactionMetadata.java +++ b/src/main/java/com/coinbase/prime/model/TransactionMetadata.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TransactionValidator.java b/src/main/java/com/coinbase/prime/model/TransactionValidator.java index 105f598..93d2354 100644 --- a/src/main/java/com/coinbase/prime/model/TransactionValidator.java +++ b/src/main/java/com/coinbase/prime/model/TransactionValidator.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TransferLocation.java b/src/main/java/com/coinbase/prime/model/TransferLocation.java index 71a642d..5bcea1a 100644 --- a/src/main/java/com/coinbase/prime/model/TransferLocation.java +++ b/src/main/java/com/coinbase/prime/model/TransferLocation.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index 62c288a..6a7b8e7 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java index 7e2a31e..b401be3 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java index 00f0e8e..e73f531 100644 --- a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/UserAction.java b/src/main/java/com/coinbase/prime/model/UserAction.java index dc04a1f..1df1943 100644 --- a/src/main/java/com/coinbase/prime/model/UserAction.java +++ b/src/main/java/com/coinbase/prime/model/UserAction.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java index 633cb80..3c488fe 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java index 066b625..448437d 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java b/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java index 79bdc46..982a0d1 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java index 366a346..7a2698c 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/Wallet.java b/src/main/java/com/coinbase/prime/model/Wallet.java index 0fbd64c..3cb886e 100644 --- a/src/main/java/com/coinbase/prime/model/Wallet.java +++ b/src/main/java/com/coinbase/prime/model/Wallet.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java index 9f3e95b..91898d1 100644 --- a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java index bc7bc5e..5991653 100644 --- a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java index 37af5a1..5b8e011 100644 --- a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java index a95a5da..58b080a 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java index bd3fd6f..f703778 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java index d7186ab..4817ca7 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java index d19e178..532669d 100644 --- a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java +++ b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/XMLoan.java b/src/main/java/com/coinbase/prime/model/XMLoan.java index e8111f3..2ffa0d0 100644 --- a/src/main/java/com/coinbase/prime/model/XMLoan.java +++ b/src/main/java/com/coinbase/prime/model/XMLoan.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/XMMarginCall.java b/src/main/java/com/coinbase/prime/model/XMMarginCall.java index 2b73ff1..31455a3 100644 --- a/src/main/java/com/coinbase/prime/model/XMMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/XMMarginCall.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/XMPosition.java b/src/main/java/com/coinbase/prime/model/XMPosition.java index 4dbdd7a..89cc692 100644 --- a/src/main/java/com/coinbase/prime/model/XMPosition.java +++ b/src/main/java/com/coinbase/prime/model/XMPosition.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java index 28157e3..5b6ae82 100644 --- a/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/XMSummary.java b/src/main/java/com/coinbase/prime/model/XMSummary.java index 69c3cb5..383d2f8 100644 --- a/src/main/java/com/coinbase/prime/model/XMSummary.java +++ b/src/main/java/com/coinbase/prime/model/XMSummary.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/Action.java b/src/main/java/com/coinbase/prime/model/enums/Action.java index 277fd89..2815e30 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Action.java +++ b/src/main/java/com/coinbase/prime/model/enums/Action.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java b/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java index e3c0ffd..26d8ee7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java b/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java index b2e9c67..8206e0a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java b/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java index 6060750..db7f5fd 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java b/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java index 3fa8163..0ed4689 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java b/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java index a5b3263..07b0e26 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java index fa5147a..f1240a2 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java index d6b9c66..6004744 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java b/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java index 9f57942..d4a71e8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java b/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java index c0e4e64..7e6c6a6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java b/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java index f2f3d38..5c2b2e1 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/Benchmark.java b/src/main/java/com/coinbase/prime/model/enums/Benchmark.java index d5dbc37..ac8a646 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Benchmark.java +++ b/src/main/java/com/coinbase/prime/model/enums/Benchmark.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java b/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java index d37802c..1d33cdc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java +++ b/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java b/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java index 2bd6e03..d38db0b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java b/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java index 3ba7449..b9c04f5 100644 --- a/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java +++ b/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/DestinationType.java b/src/main/java/com/coinbase/prime/model/enums/DestinationType.java index 49da002..a3f4223 100644 --- a/src/main/java/com/coinbase/prime/model/enums/DestinationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/DestinationType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/EstimateType.java b/src/main/java/com/coinbase/prime/model/enums/EstimateType.java index bb5c394..5f22984 100644 --- a/src/main/java/com/coinbase/prime/model/enums/EstimateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/EstimateType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java b/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java index 96b7cd5..0d6ad82 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java index 80a745a..0899ba4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java index 10cc19f..faf6005 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java b/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java index 139fec5..8a79aa6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java b/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java index 789372f..5e6cb96 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java index 032da95..9055adc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java index 19051d6..727051c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java b/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java index a290eb3..49152e0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java b/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java index ceb1416..80af7a6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java +++ b/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java b/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java index 7b29282..a4f1490 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java b/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java index dbfa5ea..f69fc41 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/LoanType.java b/src/main/java/com/coinbase/prime/model/enums/LoanType.java index 607eb73..b93f60e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/LoanType.java +++ b/src/main/java/com/coinbase/prime/model/enums/LoanType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java b/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java index 178f93a..691d526 100644 --- a/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java +++ b/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java b/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java index 21f7268..929cad8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/NetworkType.java b/src/main/java/com/coinbase/prime/model/enums/NetworkType.java index 230ee46..6480120 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkType.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/OrderSide.java b/src/main/java/com/coinbase/prime/model/enums/OrderSide.java index 5ad3a07..54b9891 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderSide.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java b/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java index 4dc1113..2417a3e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/OrderType.java b/src/main/java/com/coinbase/prime/model/enums/OrderType.java index e82a47a..2550fa9 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderType.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java b/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java index c6c7f5d..2e558cd 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java b/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java index 40c9175..7b7404d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java b/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java index 9249e41..9f71124 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java index 955fa3c..5cecbb6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java b/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java index 672cf08..735a272 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java index d9ce8e9..84ce0ea 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java index d7a7825..3f1d78e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java index da157e9..f154024 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java index 75a9fab..bb8f79c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java index 574c096..28dfd3e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java b/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java index 5a348b3..6c76a1d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java +++ b/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ProductType.java b/src/main/java/com/coinbase/prime/model/enums/ProductType.java index faf26e7..4a3a454 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ProductType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ProductType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/RateType.java b/src/main/java/com/coinbase/prime/model/enums/RateType.java index 01fd989..4def497 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RateType.java @@ -1,8 +1,6 @@ /* * 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 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 e6ed11f..40e2176 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java +++ b/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java b/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java index a2fcaed..15d8f96 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java b/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java index 8de5177..5eb5ca0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java +++ b/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java b/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java index 3d6c5b7..3a120f8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/SortDirection.java b/src/main/java/com/coinbase/prime/model/enums/SortDirection.java index 3cd3bf6..37697a0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SortDirection.java +++ b/src/main/java/com/coinbase/prime/model/enums/SortDirection.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/StakeType.java b/src/main/java/com/coinbase/prime/model/enums/StakeType.java index 8bc9098..7b557a7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/StakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/StakeType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java b/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java index bb7730b..a1b3807 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java b/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java index e79f915..29c1e28 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/TransactionType.java b/src/main/java/com/coinbase/prime/model/enums/TransactionType.java index 851d8a9..33446ae 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransactionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransactionType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java b/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java index 6c0f6b8..7dfe4c1 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java b/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java index e5dfd46..f5cdd05 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java b/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java index c1f51f0..3cebb9f 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java b/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java index a2dad5a..02b315a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/UserRole.java b/src/main/java/com/coinbase/prime/model/enums/UserRole.java index d5dc75f..30945e8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UserRole.java +++ b/src/main/java/com/coinbase/prime/model/enums/UserRole.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java index 229a6f8..c1c1468 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java b/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java index 0958d18..ca90685 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java b/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java index 51a0dd7..7511547 100644 --- a/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java b/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java index fd2fb59..04d7749 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/WalletType.java b/src/main/java/com/coinbase/prime/model/enums/WalletType.java index 0f18846..71f277a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletType.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java b/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java index 8a8f0d4..1b3ac96 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java index bf106e5..2882aed 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/XMCallType.java b/src/main/java/com/coinbase/prime/model/enums/XMCallType.java index af71989..90b01c8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallType.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java index c59d24d..cb90db0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java index a5f3ca0..5e9b304 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java b/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java index a969e58..d4286ce 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java b/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java index 025d3c4..76d25bc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/src/main/java/com/coinbase/prime/model/enums/XMParty.java b/src/main/java/com/coinbase/prime/model/enums/XMParty.java index c0807d7..1155e6b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMParty.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMParty.java @@ -1,8 +1,6 @@ /* * 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 diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java index f358630..4003cd5 100644 --- a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java @@ -373,6 +373,9 @@ private void processFile(Path file, Path targetDir, boolean isEnum) throws IOExc content = fixEnumImports(content); // Ensure boolean fields use primitive type, not Boolean wrapper content = applyBooleanPrimitiveConversion(content); + if ("DateOfBirth".equals(className)) { + content = applyDateOfBirthPrimitiveConversion(content); + } // Drop @JsonProperty when wire name equals Java field name (Jackson default mapping) content = removeRedundantJsonProperty(content); content = modelJavadocEnhancer.apply(content, className); @@ -380,6 +383,7 @@ private void processFile(Path file, Path targetDir, boolean isEnum) throws IOExc } content = decodeHtmlEntities(content); + content = removeOpenApiGeneratorAttribution(content); content = GeneratedFileHeader.applyStartYear(content, copyrightYear); Files.writeString(outputPath, content); @@ -649,6 +653,21 @@ private String applyBooleanPrimitiveConversion(String content) { return content; } + private String removeOpenApiGeneratorAttribution(String content) { + return content.replaceAll( + "(?m)^ \\* This file is generated by Openapi Generator https://github\\.com/openapitools/openapi-generator\\s*\\n", + ""); + } + + private String applyDateOfBirthPrimitiveConversion(String content) { + content = content.replaceAll("\\bprivate Integer (year|month|day)\\b", "private int $1"); + content = content.replaceAll("\\bpublic Integer (getYear|getMonth|getDay)\\b", "public int $1"); + content = content.replaceAll("\\bvoid set(Year|Month|Day)\\(Integer ", "void set$1(int "); + content = content.replaceAll("\\bprivate Integer (year|month|day)\\b", "private int $1"); + content = content.replaceAll("\\bBuilder (year|month|day)\\(Integer ", "Builder $1(int "); + return content; + } + /** * Removes {@code @JsonProperty} when the wire name matches the Java field name. * Jackson maps by field name by default; annotations are only needed for snake_case wire names. diff --git a/tools/model-generator/templates/licenseInfo.mustache b/tools/model-generator/templates/licenseInfo.mustache index 3e50b6b..afd6323 100644 --- a/tools/model-generator/templates/licenseInfo.mustache +++ b/tools/model-generator/templates/licenseInfo.mustache @@ -2,8 +2,6 @@ /* * 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 From ea882deedcb6e65562ac1908cfa215e3a41f995b Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Tue, 9 Jun 2026 14:08:03 -0400 Subject: [PATCH 8/8] address review: enforce XM acronym casing across generated models Add post-processor normalization so Xm* type and accessor names become XM* for parity with TS/Go SDKs, including case-variant file cleanup on regen. Co-authored-by: Cursor --- .../model/CrossMarginPrimeMarginSummary.java | 8 +-- .../CrossMarginPrimeRiskNettingInfo.java | 4 +- .../prime/model/XMRiskNettingInfo.java | 4 +- .../com/coinbase/prime/model/XMSummary.java | 8 +-- .../tools/modelgenerator/PostProcessor.java | 55 +++++++++++++------ 5 files changed, 49 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java index 1d30f79..4a7487f 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java @@ -198,19 +198,19 @@ public void setConsumedCredit(String consumedCredit) { this.consumedCredit = consumedCredit; } - public String getXmCreditLimit() { + public String getXMCreditLimit() { return xmCreditLimit; } - public void setXmCreditLimit(String xmCreditLimit) { + public void setXMCreditLimit(String xmCreditLimit) { this.xmCreditLimit = xmCreditLimit; } - public String getXmMarginLimit() { + public String getXMMarginLimit() { return xmMarginLimit; } - public void setXmMarginLimit(String xmMarginLimit) { + public void setXMMarginLimit(String xmMarginLimit) { this.xmMarginLimit = xmMarginLimit; } diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java index 3f00fc9..531628b 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java @@ -149,11 +149,11 @@ public void setIntegratedPortfolioMarginOffsetCreditBreakdown( integratedPortfolioMarginOffsetCreditBreakdown; } - public List getXmPositions() { + public List getXMPositions() { return xmPositions; } - public void setXmPositions(List xmPositions) { + public void setXMPositions(List xmPositions) { this.xmPositions = xmPositions; } diff --git a/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java index 5b6ae82..4c7069e 100644 --- a/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java @@ -213,11 +213,11 @@ public void setAllIntegratedScenarioAddons(List allIntegratedScenar this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; } - public List getXmPositions() { + public List getXMPositions() { return xmPositions; } - public void setXmPositions(List xmPositions) { + public void setXMPositions(List xmPositions) { this.xmPositions = xmPositions; } diff --git a/src/main/java/com/coinbase/prime/model/XMSummary.java b/src/main/java/com/coinbase/prime/model/XMSummary.java index 383d2f8..36d60ea 100644 --- a/src/main/java/com/coinbase/prime/model/XMSummary.java +++ b/src/main/java/com/coinbase/prime/model/XMSummary.java @@ -103,19 +103,19 @@ public void setConsumedCredit(String consumedCredit) { this.consumedCredit = consumedCredit; } - public String getXmCreditLimit() { + public String getXMCreditLimit() { return xmCreditLimit; } - public void setXmCreditLimit(String xmCreditLimit) { + public void setXMCreditLimit(String xmCreditLimit) { this.xmCreditLimit = xmCreditLimit; } - public String getXmMarginLimit() { + public String getXMMarginLimit() { return xmMarginLimit; } - public void setXmMarginLimit(String xmMarginLimit) { + public void setXMMarginLimit(String xmMarginLimit) { this.xmMarginLimit = xmMarginLimit; } diff --git a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java index 4003cd5..5061a61 100644 --- a/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java +++ b/tools/model-generator/src/main/java/com/coinbase/tools/modelgenerator/PostProcessor.java @@ -344,24 +344,7 @@ private void processFile(Path file, Path targetDir, boolean isEnum) throws IOExc String copyrightYear = GeneratedFileHeader.resolveStartYear(outputPath); boolean existsBefore = Files.exists(outputPath); - // Handle case-only filename changes on case-insensitive filesystems - // Delete ANY file with case-insensitive matching name BEFORE writing - final String finalFileName = fileName; - try { - List toDelete = Files.list(targetDir) - .filter(p -> p.getFileName().toString().equalsIgnoreCase(finalFileName)) - .collect(java.util.stream.Collectors.toList()); - - for (Path p : toDelete) { - Files.delete(p); - if (!p.getFileName().toString().equals(finalFileName)) { - logger.info("Deleted old {} file with different casing: {} -> {}", - isEnum ? "enum" : "model", p.getFileName(), finalFileName); - } - } - } catch (IOException e) { - logger.warn("Could not delete old {} file variants: {}", isEnum ? "enum" : "model", e.getMessage()); - } + deleteCaseVariantFiles(targetDir, fileName, isEnum); // Apply final transformations based on file type if (isEnum) { @@ -384,8 +367,17 @@ private void processFile(Path file, Path targetDir, boolean isEnum) throws IOExc content = decodeHtmlEntities(content); content = removeOpenApiGeneratorAttribution(content); + content = applyXMAcronymCasing(content); content = GeneratedFileHeader.applyStartYear(content, copyrightYear); + String resolvedClassName = extractClassName(content); + if (!resolvedClassName.equals(className)) { + className = resolvedClassName; + fileName = className + ".java"; + outputPath = targetDir.resolve(fileName); + deleteCaseVariantFiles(targetDir, fileName, isEnum); + } + Files.writeString(outputPath, content); writtenOutputFiles.add(outputPath.toAbsolutePath().normalize()); @@ -659,6 +651,33 @@ private String removeOpenApiGeneratorAttribution(String content) { ""); } + /** + * Keeps XM acronym casing aligned with TS/Go SDKs ({@code XMSummary}, not {@code XmSummary}). + * Converts {@code Xm} + uppercase letter (type names, imports, accessors) while leaving + * wire-mapped fields like {@code xmCreditLimit} unchanged. + */ + private String applyXMAcronymCasing(String content) { + return content.replaceAll("Xm([A-Z])", "XM$1"); + } + + private void deleteCaseVariantFiles(Path targetDir, String fileName, boolean isEnum) throws IOException { + try { + List toDelete = Files.list(targetDir) + .filter(p -> p.getFileName().toString().equalsIgnoreCase(fileName)) + .collect(Collectors.toList()); + + for (Path p : toDelete) { + Files.delete(p); + if (!p.getFileName().toString().equals(fileName)) { + logger.info("Deleted old {} file with different casing: {} -> {}", + isEnum ? "enum" : "model", p.getFileName(), fileName); + } + } + } catch (IOException e) { + logger.warn("Could not delete old {} file variants: {}", isEnum ? "enum" : "model", e.getMessage()); + } + } + private String applyDateOfBirthPrimitiveConversion(String content) { content = content.replaceAll("\\bprivate Integer (year|month|day)\\b", "private int $1"); content = content.replaceAll("\\bpublic Integer (getYear|getMonth|getDay)\\b", "public int $1");