From a2cc57fec21887d008a8449cebf077fe4de0eddd Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Mon, 8 Jun 2026 18:32:51 -0400 Subject: [PATCH 01/11] 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 02/11] 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 03/11] 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 04/11] 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 05/11] 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 06/11] 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 07/11] 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 08/11] 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"); From 5e3abdceb20386e5c45c32bc90a8dc1f398e90a3 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Wed, 17 Jun 2026 12:13:21 -0700 Subject: [PATCH 09/11] chore: regenerate models with updated generator formatting Re-run the OpenAPI model generator to apply consistent 4-space indentation, expanded Javadoc blocks, and enum doc formatting across all 209 model and enum files. Co-authored-by: Cursor --- .../com/coinbase/prime/model/Accrual.java | 561 +++---- .../prime/model/ActiveLiquidationSummary.java | 127 +- .../com/coinbase/prime/model/Activity.java | 555 +++---- .../prime/model/ActivityMetadataAccount.java | 45 +- .../model/ActivityMetadataConsensus.java | 84 +- .../model/ActivityMetadataTransactions.java | 45 +- .../prime/model/AddressBookEntry.java | 432 +++--- .../coinbase/prime/model/AddressEntry.java | 103 +- .../coinbase/prime/model/AddressGroup.java | 160 +- .../prime/model/AdvancedTransfer.java | 165 ++- .../prime/model/AggregatedFiatBalance.java | 71 +- .../com/coinbase/prime/model/Allocation.java | 519 +++---- .../coinbase/prime/model/AllocationLeg.java | 115 +- .../com/coinbase/prime/model/AmountDue.java | 113 +- .../java/com/coinbase/prime/model/Asset.java | 211 +-- .../coinbase/prime/model/AssetBalance.java | 179 +-- .../com/coinbase/prime/model/AssetChange.java | 165 +-- .../com/coinbase/prime/model/Balance.java | 485 ++++--- .../prime/model/BlindMatchMetadata.java | 151 +- .../prime/model/BlockchainAddress.java | 110 +- .../com/coinbase/prime/model/BuyingPower.java | 183 +-- .../java/com/coinbase/prime/model/Candle.java | 202 +-- .../com/coinbase/prime/model/Commission.java | 113 +- .../prime/model/CommissionDetailTotal.java | 251 ++-- .../com/coinbase/prime/model/Conversion.java | 148 +- .../prime/model/ConversionDetail.java | 249 ++-- .../coinbase/prime/model/Counterparty.java | 51 +- .../prime/model/CounterpartyDestination.java | 49 +- .../model/CreateAllocationResponseBody.java | 115 +- .../CreateNetAllocationResponseBody.java | 181 +-- .../prime/model/CrossMarginOverview.java | 293 ++-- ...MarginPrimeDerivativesEquityBreakdown.java | 150 +- .../model/CrossMarginPrimeMarginSummary.java | 770 +++++----- .../CrossMarginPrimeRiskNettingInfo.java | 324 ++--- .../CrossMarginPrimeSpotEquityBreakdown.java | 183 +-- .../model/CrossMarginPrimeXMPosition.java | 518 +++---- .../model/CrossMarginRiskParameters.java | 416 +++--- .../model/CustomStablecoinRewardDetails.java | 84 +- .../com/coinbase/prime/model/DateOfBirth.java | 113 +- .../com/coinbase/prime/model/DefiBalance.java | 107 +- .../prime/model/DestinationAlloc.java | 188 +-- .../coinbase/prime/model/DetailedAddress.java | 231 ++- .../com/coinbase/prime/model/DisplayUser.java | 113 +- .../coinbase/prime/model/EntityBalance.java | 181 +-- .../com/coinbase/prime/model/EntityUser.java | 257 ++-- .../prime/model/EstimatedNetworkFees.java | 84 +- .../com/coinbase/prime/model/EvmParams.java | 196 ++- .../coinbase/prime/model/ExistingLocate.java | 379 ++--- .../coinbase/prime/model/FcmMarginCall.java | 204 +-- .../com/coinbase/prime/model/FcmPosition.java | 278 ++-- .../prime/model/FcmScheduledMaintenance.java | 84 +- .../prime/model/FcmTradingSessionDetails.java | 333 ++--- .../java/com/coinbase/prime/model/Fill.java | 504 +++---- .../coinbase/prime/model/FundMovement.java | 153 +- .../prime/model/FutureProductDetails.java | 392 ++--- .../coinbase/prime/model/FuturesSweep.java | 172 +-- .../com/coinbase/prime/model/Invoice.java | 278 ++-- .../com/coinbase/prime/model/InvoiceItem.java | 242 ++- .../coinbase/prime/model/LimitOrderEdit.java | 264 ++-- .../com/coinbase/prime/model/LoanInfo.java | 179 +-- .../java/com/coinbase/prime/model/Locate.java | 110 +- .../com/coinbase/prime/model/MarginAddOn.java | 78 +- .../prime/model/MarginCallRecord.java | 183 +-- .../prime/model/MarginInformation.java | 82 +- .../coinbase/prime/model/MarginSummary.java | 1093 +++++++------- .../prime/model/MarginSummaryHistorical.java | 114 +- .../com/coinbase/prime/model/MarketData.java | 219 +-- .../com/coinbase/prime/model/MarketRate.java | 79 +- .../coinbase/prime/model/MatchMetadata.java | 84 +- .../prime/model/NaturalPersonName.java | 111 +- .../com/coinbase/prime/model/Network.java | 79 +- .../coinbase/prime/model/NetworkDetails.java | 454 +++--- .../coinbase/prime/model/NftCollection.java | 48 +- .../com/coinbase/prime/model/NftItem.java | 48 +- .../coinbase/prime/model/OnchainAsset.java | 175 +-- .../coinbase/prime/model/OnchainBalance.java | 113 +- .../model/OnchainTransactionDetails.java | 323 ++-- .../model/OnchainTransactionMetadata.java | 83 +- .../java/com/coinbase/prime/model/Order.java | 1293 +++++++++-------- .../com/coinbase/prime/model/OrderEdit.java | 300 ++-- .../prime/model/PaymentMethodDestination.java | 49 +- .../prime/model/PaymentMethodDetails.java | 196 ++- .../prime/model/PaymentMethodSummary.java | 198 ++- .../prime/model/PerpetualProductDetails.java | 183 +-- .../com/coinbase/prime/model/PmAssetInfo.java | 575 ++++---- .../com/coinbase/prime/model/Portfolio.java | 179 +-- .../prime/model/PortfolioStakingMetadata.java | 54 +- .../coinbase/prime/model/PortfolioUser.java | 290 ++-- .../com/coinbase/prime/model/Position.java | 145 +- .../prime/model/PositionReference.java | 76 +- .../model/PostTradeCreditInformation.java | 366 ++--- .../model/PrimeXMMarginCallThresholds.java | 184 +-- .../PrimeXMMarginRequirementBreakdown.java | 188 +-- .../prime/model/PrimeXMMarginThreshold.java | 136 +- .../model/PrimeXMOffsetCreditBreakdown.java | 218 +-- .../prime/model/ProcessRequirements.java | 49 +- .../com/coinbase/prime/model/Product.java | 442 +++--- ...leDataForAnExistingDepositTransaction.java | 131 +- .../coinbase/prime/model/RewardMetadata.java | 109 +- .../prime/model/RfqProductDetails.java | 249 ++-- .../coinbase/prime/model/RiskAssessment.java | 84 +- .../com/coinbase/prime/model/RpcConfig.java | 82 +- .../coinbase/prime/model/ShortCollateral.java | 150 +- .../coinbase/prime/model/StakingStatus.java | 177 +-- .../com/coinbase/prime/model/SweepAmount.java | 79 +- .../com/coinbase/prime/model/TfAsset.java | 115 +- .../coinbase/prime/model/TfObligation.java | 181 +-- .../prime/model/TierPairRateEntry.java | 119 +- .../prime/model/TieredPricingFee.java | 79 +- .../com/coinbase/prime/model/Transaction.java | 947 ++++++------ .../prime/model/TransactionMetadata.java | 109 +- .../prime/model/TransactionValidator.java | 113 +- .../prime/model/TransferLocation.java | 159 +- .../coinbase/prime/model/TravelRuleData.java | 210 ++- .../coinbase/prime/model/TravelRuleParty.java | 362 ++--- .../coinbase/prime/model/UnstakingStatus.java | 239 +-- .../com/coinbase/prime/model/UserAction.java | 111 +- .../prime/model/ValidatorAllocation.java | 86 +- .../prime/model/ValidatorStakingInfo.java | 83 +- .../prime/model/ValidatorUnstakePreview.java | 150 +- .../prime/model/ValidatorUnstakingInfo.java | 83 +- .../java/com/coinbase/prime/model/Wallet.java | 258 ++-- .../prime/model/WalletClaimRewardsInputs.java | 51 +- .../WalletCryptoDepositInstructions.java | 253 ++-- .../model/WalletFiatDepositInstructions.java | 211 ++- .../prime/model/WalletStakeInputs.java | 92 +- .../prime/model/WalletStakingMetadata.java | 63 +- .../prime/model/WalletUnstakeInputs.java | 94 +- .../coinbase/prime/model/WithdrawalPower.java | 79 +- .../java/com/coinbase/prime/model/XMLoan.java | 288 ++-- .../coinbase/prime/model/XMMarginCall.java | 408 +++--- .../com/coinbase/prime/model/XMPosition.java | 843 +++++------ .../prime/model/XMRiskNettingInfo.java | 494 +++---- .../com/coinbase/prime/model/XMSummary.java | 314 ++-- .../coinbase/prime/model/enums/Action.java | 5 +- .../prime/model/enums/ActivityCategory.java | 1 + .../prime/model/enums/ActivityLevel.java | 1 + .../model/enums/ActivitySecondaryType.java | 18 +- .../prime/model/enums/ActivityStatus.java | 1 + .../prime/model/enums/AddressBookType.java | 1 + .../model/enums/AdvancedTransferState.java | 5 +- .../model/enums/AdvancedTransferType.java | 5 +- .../prime/model/enums/AllocationSizeType.java | 1 + .../prime/model/enums/AllocationStatus.java | 1 + .../prime/model/enums/AssetChangeType.java | 5 +- .../coinbase/prime/model/enums/Benchmark.java | 1 + .../prime/model/enums/CandlesGranularity.java | 5 +- .../prime/model/enums/ContractExpiryType.java | 19 +- .../model/enums/CustodyActivityType.java | 1 + .../prime/model/enums/DestinationType.java | 28 +- .../prime/model/enums/EstimateType.java | 1 + .../model/enums/ExpiringContractStatus.java | 22 +- .../prime/model/enums/FcmMarginCallState.java | 1 + .../prime/model/enums/FcmMarginCallType.java | 1 + .../model/enums/FcmMarginHealthState.java | 32 +- .../prime/model/enums/FcmPositionSide.java | 1 + .../enums/FcmTradingSessionClosedReason.java | 25 +- .../model/enums/FcmTradingSessionState.java | 36 +- .../prime/model/enums/FuturesSweepStatus.java | 1 + .../prime/model/enums/HierarchyType.java | 4 +- .../prime/model/enums/InvoiceState.java | 5 +- .../prime/model/enums/InvoiceType.java | 5 +- .../coinbase/prime/model/enums/LoanType.java | 1 + .../prime/model/enums/MarginAddOnType.java | 1 + .../prime/model/enums/NetworkFamily.java | 1 + .../prime/model/enums/NetworkType.java | 1 + .../coinbase/prime/model/enums/OrderSide.java | 15 +- .../prime/model/enums/OrderStatus.java | 35 +- .../coinbase/prime/model/enums/OrderType.java | 49 +- .../prime/model/enums/PaymentMethodType.java | 19 +- .../prime/model/enums/PegOffsetType.java | 20 +- .../model/enums/PortfolioBalanceType.java | 31 +- .../model/enums/PositionReferenceType.java | 1 + .../prime/model/enums/PrimeActivityType.java | 1 + .../model/enums/PrimeXMControlStatus.java | 18 +- .../model/enums/PrimeXMHealthStatus.java | 53 +- .../prime/model/enums/PrimeXMMarginLevel.java | 36 +- .../enums/PrimeXMMarginRequirementType.java | 14 +- .../enums/PrimeXMMarginThresholdType.java | 13 +- .../prime/model/enums/ProductPermissions.java | 1 + .../prime/model/enums/ProductType.java | 15 +- .../coinbase/prime/model/enums/RateType.java | 1 + .../prime/model/enums/RewardSubtype.java | 57 +- .../prime/model/enums/RiskManagementType.java | 19 +- .../model/enums/SecondaryPermission.java | 19 +- .../prime/model/enums/SigningStatus.java | 14 +- .../prime/model/enums/SortDirection.java | 1 + .../coinbase/prime/model/enums/StakeType.java | 1 + .../prime/model/enums/TimeInForceType.java | 26 +- .../prime/model/enums/TransactionStatus.java | 156 +- .../prime/model/enums/TransactionType.java | 201 ++- .../model/enums/TransferLocationType.java | 36 +- .../prime/model/enums/TravelRuleStatus.java | 5 +- .../model/enums/TravelRuleWalletType.java | 19 +- .../prime/model/enums/UnstakeType.java | 1 + .../coinbase/prime/model/enums/UserRole.java | 61 +- .../prime/model/enums/ValidatorProvider.java | 7 +- .../prime/model/enums/ValidatorStatus.java | 1 + .../prime/model/enums/VisibilityStatus.java | 20 +- .../enums/WalletDepositInstructionType.java | 30 +- .../prime/model/enums/WalletType.java | 28 +- .../prime/model/enums/WalletVisibility.java | 1 + .../prime/model/enums/XMCallStatus.java | 24 +- .../prime/model/enums/XMCallType.java | 18 +- .../prime/model/enums/XMControlStatus.java | 18 +- .../prime/model/enums/XMEntityCallStatus.java | 33 +- .../model/enums/XMLiquidationStatus.java | 31 +- .../prime/model/enums/XMMarginLevel.java | 36 +- .../coinbase/prime/model/enums/XMParty.java | 13 +- 209 files changed, 16061 insertions(+), 15233 deletions(-) diff --git a/src/main/java/com/coinbase/prime/model/Accrual.java b/src/main/java/com/coinbase/prime/model/Accrual.java index 420d8d6..58fc4be 100644 --- a/src/main/java/com/coinbase/prime/model/Accrual.java +++ b/src/main/java/com/coinbase/prime/model/Accrual.java @@ -17,354 +17,365 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.Benchmark; import com.coinbase.prime.model.enums.LoanType; import com.coinbase.prime.model.enums.RateType; import com.fasterxml.jackson.annotation.JsonProperty; public class Accrual { - /** The accrual ID */ - @JsonProperty("accrual_id") - private String accrualId; - - /** The date of accrual in UTC */ - private String date; - - /** The unique ID of the portfolio */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The currency symbol */ - private String symbol; - - @JsonProperty("loan_type") - private LoanType loanType; - - /** The daily or annualized interest rate for the loan, see rate_type */ - @JsonProperty("interest_rate") - private String interestRate; - - /** Daily accrual amount in the principal currency */ - @JsonProperty("nominal_accrual") - private String nominalAccrual; - - /** Daily USD accrued interest */ - @JsonProperty("notional_accrual") - private String notionalAccrual; - - /** Accrual rate used to convert from principal to USD accrual */ - @JsonProperty("conversion_rate") - private String conversionRate; - - /** Outstanding principal of the loan */ - @JsonProperty("loan_amount") - private String loanAmount; - - private Benchmark benchmark; - - /** Daily interest rate fetched from the benchmark source */ - @JsonProperty("benchmark_rate") - private String benchmarkRate; - - /** Daily spread offset from the benchmark rate */ - private String spread; - - @JsonProperty("rate_type") - private RateType rateType; - - /** Outstanding principal of the loan in USD */ - @JsonProperty("loan_amount_notional") - private String loanAmountNotional; - - /** Settled open borrow as of start-of-day in the principal currency */ - @JsonProperty("nominal_open_borrow_sod") - private String nominalOpenBorrowSod; - - /** Settled open borrow as of start-of-day in USD */ - @JsonProperty("notional_open_borrow_sod") - private String notionalOpenBorrowSod; - - public Accrual() {} - - public Accrual(Builder builder) { - this.accrualId = builder.accrualId; - this.date = builder.date; - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.loanType = builder.loanType; - this.interestRate = builder.interestRate; - this.nominalAccrual = builder.nominalAccrual; - this.notionalAccrual = builder.notionalAccrual; - this.conversionRate = builder.conversionRate; - this.loanAmount = builder.loanAmount; - this.benchmark = builder.benchmark; - this.benchmarkRate = builder.benchmarkRate; - this.spread = builder.spread; - this.rateType = builder.rateType; - this.loanAmountNotional = builder.loanAmountNotional; - this.nominalOpenBorrowSod = builder.nominalOpenBorrowSod; - this.notionalOpenBorrowSod = builder.notionalOpenBorrowSod; - } - - public String getAccrualId() { - return accrualId; - } - - public void setAccrualId(String accrualId) { - this.accrualId = accrualId; - } - - public String getDate() { - return date; - } - - public void setDate(String date) { - this.date = date; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - public LoanType getLoanType() { - return loanType; - } - - public void setLoanType(LoanType loanType) { - this.loanType = loanType; - } - - public String getInterestRate() { - return interestRate; - } - - public void setInterestRate(String interestRate) { - this.interestRate = interestRate; - } - - public String getNominalAccrual() { - return nominalAccrual; - } - - public void setNominalAccrual(String nominalAccrual) { - this.nominalAccrual = nominalAccrual; - } - - public String getNotionalAccrual() { - return notionalAccrual; - } - - public void setNotionalAccrual(String notionalAccrual) { - this.notionalAccrual = notionalAccrual; - } - - public String getConversionRate() { - return conversionRate; - } - - public void setConversionRate(String conversionRate) { - this.conversionRate = conversionRate; - } - - public String getLoanAmount() { - return loanAmount; - } - - public void setLoanAmount(String loanAmount) { - this.loanAmount = loanAmount; - } - - public Benchmark getBenchmark() { - return benchmark; - } - - public void setBenchmark(Benchmark benchmark) { - this.benchmark = benchmark; - } - - public String getBenchmarkRate() { - return benchmarkRate; - } - - public void setBenchmarkRate(String benchmarkRate) { - this.benchmarkRate = benchmarkRate; - } - - public String getSpread() { - return spread; - } - - public void setSpread(String spread) { - this.spread = spread; - } - - public RateType getRateType() { - return rateType; - } - - public void setRateType(RateType rateType) { - this.rateType = rateType; - } - - public String getLoanAmountNotional() { - return loanAmountNotional; - } - - public void setLoanAmountNotional(String loanAmountNotional) { - this.loanAmountNotional = loanAmountNotional; - } - - public String getNominalOpenBorrowSod() { - return nominalOpenBorrowSod; - } - - public void setNominalOpenBorrowSod(String nominalOpenBorrowSod) { - this.nominalOpenBorrowSod = nominalOpenBorrowSod; - } - - public String getNotionalOpenBorrowSod() { - return notionalOpenBorrowSod; - } - - public void setNotionalOpenBorrowSod(String notionalOpenBorrowSod) { - this.notionalOpenBorrowSod = notionalOpenBorrowSod; - } - - public static class Builder { + /** + * The accrual ID + */ + @JsonProperty("accrual_id") private String accrualId; + /** + * The date of accrual in UTC + */ private String date; + /** + * The unique ID of the portfolio + */ + @JsonProperty("portfolio_id") private String portfolioId; + /** + * The currency symbol + */ private String symbol; + @JsonProperty("loan_type") private LoanType loanType; + /** + * The daily or annualized interest rate for the loan, see rate_type + */ + @JsonProperty("interest_rate") private String interestRate; + /** + * Daily accrual amount in the principal currency + */ + @JsonProperty("nominal_accrual") private String nominalAccrual; + /** + * Daily USD accrued interest + */ + @JsonProperty("notional_accrual") private String notionalAccrual; + /** + * Accrual rate used to convert from principal to USD accrual + */ + @JsonProperty("conversion_rate") private String conversionRate; + /** + * Outstanding principal of the loan + */ + @JsonProperty("loan_amount") private String loanAmount; private Benchmark benchmark; + /** + * Daily interest rate fetched from the benchmark source + */ + @JsonProperty("benchmark_rate") private String benchmarkRate; + /** + * Daily spread offset from the benchmark rate + */ private String spread; + @JsonProperty("rate_type") private RateType rateType; + /** + * Outstanding principal of the loan in USD + */ + @JsonProperty("loan_amount_notional") private String loanAmountNotional; + /** + * Settled open borrow as of start-of-day in the principal currency + */ + @JsonProperty("nominal_open_borrow_sod") private String nominalOpenBorrowSod; + /** + * Settled open borrow as of start-of-day in USD + */ + @JsonProperty("notional_open_borrow_sod") private String notionalOpenBorrowSod; - public Builder accrualId(String accrualId) { - this.accrualId = accrualId; - return this; + public Accrual() { } - public Builder date(String date) { - this.date = date; - return this; + public Accrual(Builder builder) { + this.accrualId = builder.accrualId; + this.date = builder.date; + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.loanType = builder.loanType; + this.interestRate = builder.interestRate; + this.nominalAccrual = builder.nominalAccrual; + this.notionalAccrual = builder.notionalAccrual; + this.conversionRate = builder.conversionRate; + this.loanAmount = builder.loanAmount; + this.benchmark = builder.benchmark; + this.benchmarkRate = builder.benchmarkRate; + this.spread = builder.spread; + this.rateType = builder.rateType; + this.loanAmountNotional = builder.loanAmountNotional; + this.nominalOpenBorrowSod = builder.nominalOpenBorrowSod; + this.notionalOpenBorrowSod = builder.notionalOpenBorrowSod; + } + public String getAccrualId() { + return accrualId; } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; + public void setAccrualId(String accrualId) { + this.accrualId = accrualId; + } + public String getDate() { + return date; } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; + public void setDate(String date) { + this.date = date; + } + public String getPortfolioId() { + return portfolioId; } - public Builder loanType(LoanType loanType) { - this.loanType = loanType; - return this; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getSymbol() { + return symbol; } - public Builder interestRate(String interestRate) { - this.interestRate = interestRate; - return this; + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public LoanType getLoanType() { + return loanType; } - public Builder nominalAccrual(String nominalAccrual) { - this.nominalAccrual = nominalAccrual; - return this; + public void setLoanType(LoanType loanType) { + this.loanType = loanType; + } + public String getInterestRate() { + return interestRate; + } + + public void setInterestRate(String interestRate) { + this.interestRate = interestRate; + } + public String getNominalAccrual() { + return nominalAccrual; } - public Builder notionalAccrual(String notionalAccrual) { - this.notionalAccrual = notionalAccrual; - return this; + public void setNominalAccrual(String nominalAccrual) { + this.nominalAccrual = nominalAccrual; + } + public String getNotionalAccrual() { + return notionalAccrual; + } + + public void setNotionalAccrual(String notionalAccrual) { + this.notionalAccrual = notionalAccrual; + } + public String getConversionRate() { + return conversionRate; } - public Builder conversionRate(String conversionRate) { - this.conversionRate = conversionRate; - return this; + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } + public String getLoanAmount() { + return loanAmount; } - public Builder loanAmount(String loanAmount) { - this.loanAmount = loanAmount; - return this; + public void setLoanAmount(String loanAmount) { + this.loanAmount = loanAmount; + } + public Benchmark getBenchmark() { + return benchmark; } - public Builder benchmark(Benchmark benchmark) { - this.benchmark = benchmark; - return this; + public void setBenchmark(Benchmark benchmark) { + this.benchmark = benchmark; + } + public String getBenchmarkRate() { + return benchmarkRate; } - public Builder benchmarkRate(String benchmarkRate) { - this.benchmarkRate = benchmarkRate; - return this; + public void setBenchmarkRate(String benchmarkRate) { + this.benchmarkRate = benchmarkRate; + } + public String getSpread() { + return spread; } - public Builder spread(String spread) { - this.spread = spread; - return this; + public void setSpread(String spread) { + this.spread = spread; + } + public RateType getRateType() { + return rateType; } - public Builder rateType(RateType rateType) { - this.rateType = rateType; - return this; + public void setRateType(RateType rateType) { + this.rateType = rateType; + } + public String getLoanAmountNotional() { + return loanAmountNotional; } - public Builder loanAmountNotional(String loanAmountNotional) { - this.loanAmountNotional = loanAmountNotional; - return this; + public void setLoanAmountNotional(String loanAmountNotional) { + this.loanAmountNotional = loanAmountNotional; + } + public String getNominalOpenBorrowSod() { + return nominalOpenBorrowSod; } - public Builder nominalOpenBorrowSod(String nominalOpenBorrowSod) { - this.nominalOpenBorrowSod = nominalOpenBorrowSod; - return this; + public void setNominalOpenBorrowSod(String nominalOpenBorrowSod) { + this.nominalOpenBorrowSod = nominalOpenBorrowSod; + } + public String getNotionalOpenBorrowSod() { + return notionalOpenBorrowSod; } - public Builder notionalOpenBorrowSod(String notionalOpenBorrowSod) { - this.notionalOpenBorrowSod = notionalOpenBorrowSod; - return this; + public void setNotionalOpenBorrowSod(String notionalOpenBorrowSod) { + this.notionalOpenBorrowSod = notionalOpenBorrowSod; } + public static class Builder { + private String accrualId; - public Accrual build() { - return new Accrual(this); + private String date; + + private String portfolioId; + + private String symbol; + + private LoanType loanType; + + private String interestRate; + + private String nominalAccrual; + + private String notionalAccrual; + + private String conversionRate; + + private String loanAmount; + + private Benchmark benchmark; + + private String benchmarkRate; + + private String spread; + + private RateType rateType; + + private String loanAmountNotional; + + private String nominalOpenBorrowSod; + + private String notionalOpenBorrowSod; + + public Builder accrualId(String accrualId) { + this.accrualId = accrualId; + return this; + } + + public Builder date(String date) { + this.date = date; + return this; + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder loanType(LoanType loanType) { + this.loanType = loanType; + return this; + } + + public Builder interestRate(String interestRate) { + this.interestRate = interestRate; + return this; + } + + public Builder nominalAccrual(String nominalAccrual) { + this.nominalAccrual = nominalAccrual; + return this; + } + + public Builder notionalAccrual(String notionalAccrual) { + this.notionalAccrual = notionalAccrual; + return this; + } + + public Builder conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; + } + + public Builder loanAmount(String loanAmount) { + this.loanAmount = loanAmount; + return this; + } + + public Builder benchmark(Benchmark benchmark) { + this.benchmark = benchmark; + return this; + } + + public Builder benchmarkRate(String benchmarkRate) { + this.benchmarkRate = benchmarkRate; + return this; + } + + public Builder spread(String spread) { + this.spread = spread; + return this; + } + + public Builder rateType(RateType rateType) { + this.rateType = rateType; + return this; + } + + public Builder loanAmountNotional(String loanAmountNotional) { + this.loanAmountNotional = loanAmountNotional; + return this; + } + + public Builder nominalOpenBorrowSod(String nominalOpenBorrowSod) { + this.nominalOpenBorrowSod = nominalOpenBorrowSod; + return this; + } + + public Builder notionalOpenBorrowSod(String notionalOpenBorrowSod) { + this.notionalOpenBorrowSod = notionalOpenBorrowSod; + return this; + } + + public Accrual build() { + return new Accrual(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java index ad4c7a7..79ea8b0 100644 --- a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java +++ b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java @@ -17,85 +17,86 @@ */ package com.coinbase.prime.model; - 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 */ public class ActiveLiquidationSummary { - /** Financing liquidation UUID */ - @JsonProperty("liquidation_id") - private String liquidationId; - - /** - * - 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 - */ - private XMLiquidationStatus status; - - /** USD notional shortfall amount that triggered the liquidation */ - @JsonProperty("shortfall_amount") - private String shortfallAmount; - - public ActiveLiquidationSummary() {} - - public ActiveLiquidationSummary(Builder builder) { - this.liquidationId = builder.liquidationId; - this.status = builder.status; - this.shortfallAmount = builder.shortfallAmount; - } - - public String getLiquidationId() { - return liquidationId; - } - - public void setLiquidationId(String liquidationId) { - this.liquidationId = liquidationId; - } - - public XMLiquidationStatus getStatus() { - return status; - } - - public void setStatus(XMLiquidationStatus status) { - this.status = status; - } - - public String getShortfallAmount() { - return shortfallAmount; - } - - public void setShortfallAmount(String shortfallAmount) { - this.shortfallAmount = shortfallAmount; - } - - public static class Builder { + /** + * Financing liquidation UUID + */ + @JsonProperty("liquidation_id") private String liquidationId; + /** + * - 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 + */ private XMLiquidationStatus status; + /** + * USD notional shortfall amount that triggered the liquidation + */ + @JsonProperty("shortfall_amount") private String shortfallAmount; - public Builder liquidationId(String liquidationId) { - this.liquidationId = liquidationId; - return this; + public ActiveLiquidationSummary() { + } + + public ActiveLiquidationSummary(Builder builder) { + this.liquidationId = builder.liquidationId; + this.status = builder.status; + this.shortfallAmount = builder.shortfallAmount; + } + public String getLiquidationId() { + return liquidationId; + } + + public void setLiquidationId(String liquidationId) { + this.liquidationId = liquidationId; + } + public XMLiquidationStatus getStatus() { + return status; } - public Builder status(XMLiquidationStatus status) { - this.status = status; - return this; + public void setStatus(XMLiquidationStatus status) { + this.status = status; + } + public String getShortfallAmount() { + return shortfallAmount; } - public Builder shortfallAmount(String shortfallAmount) { - this.shortfallAmount = shortfallAmount; - return this; + public void setShortfallAmount(String shortfallAmount) { + this.shortfallAmount = shortfallAmount; } + public static class Builder { + private String liquidationId; + + private XMLiquidationStatus status; + + private String shortfallAmount; + + public Builder liquidationId(String liquidationId) { + this.liquidationId = liquidationId; + return this; + } - public ActiveLiquidationSummary build() { - return new ActiveLiquidationSummary(this); + public Builder status(XMLiquidationStatus status) { + this.status = status; + return this; + } + + public Builder shortfallAmount(String shortfallAmount) { + this.shortfallAmount = shortfallAmount; + return this; + } + + public ActiveLiquidationSummary build() { + return new ActiveLiquidationSummary(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Activity.java b/src/main/java/com/coinbase/prime/model/Activity.java index 19de362..348c2b7 100644 --- a/src/main/java/com/coinbase/prime/model/Activity.java +++ b/src/main/java/com/coinbase/prime/model/Activity.java @@ -17,358 +17,359 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.ActivityCategory; +import com.coinbase.prime.model.ActivityMetadataAccount; +import com.coinbase.prime.model.ActivityMetadataTransactions; import com.coinbase.prime.model.enums.ActivitySecondaryType; import com.coinbase.prime.model.enums.ActivityStatus; -import com.coinbase.prime.model.enums.HierarchyType; import com.coinbase.prime.model.enums.PrimeActivityType; +import com.coinbase.prime.model.enums.HierarchyType; +import com.coinbase.prime.model.UserAction; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Activity { - /** A unique id for the account activity */ - private String id; - - /** A reference for orders and transactions, n/a for other category types */ - @JsonProperty("reference_id") - private String referenceId; - - private ActivityCategory category; - - private PrimeActivityType type; - - /** - * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types - - * ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: Transaction secondary types - - * ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types - */ - @JsonProperty("secondary_type") - private ActivitySecondaryType secondaryType; - - private ActivityStatus status; - - /** Id of user who created the activity */ - @JsonProperty("created_by") - private String createdBy; - - /** Title of the activity */ - private String title; - - /** Description detail of the activity */ - private String description; - - /** Actions related to the Activity */ - @JsonProperty("user_actions") - private List userActions; - - @JsonProperty("transactions_metadata") - private ActivityMetadataTransactions transactionsMetadata; - - @JsonProperty("account_metadata") - private ActivityMetadataAccount accountMetadata; - - @JsonProperty("orders_metadata") - private Object ordersMetadata; - - /** List of currencies included in an activity */ - private List symbols; - - /** Time activity was created at */ - @JsonProperty("created_at") - private String createdAt; - - /** Time for latest status update of account activity */ - @JsonProperty("updated_at") - private String updatedAt; - - /** - * HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, - * Portfolio - */ - @JsonProperty("hierarchy_type") - private HierarchyType hierarchyType; - - public Activity() {} - - public Activity(Builder builder) { - this.id = builder.id; - this.referenceId = builder.referenceId; - this.category = builder.category; - this.type = builder.type; - this.secondaryType = builder.secondaryType; - this.status = builder.status; - this.createdBy = builder.createdBy; - this.title = builder.title; - this.description = builder.description; - this.userActions = builder.userActions; - this.transactionsMetadata = builder.transactionsMetadata; - this.accountMetadata = builder.accountMetadata; - this.ordersMetadata = builder.ordersMetadata; - this.symbols = builder.symbols; - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - this.hierarchyType = builder.hierarchyType; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - public ActivityCategory getCategory() { - return category; - } - - public void setCategory(ActivityCategory category) { - this.category = category; - } - - public PrimeActivityType getType() { - return type; - } - - public void setType(PrimeActivityType type) { - this.type = type; - } - - public ActivitySecondaryType getSecondaryType() { - return secondaryType; - } - - public void setSecondaryType(ActivitySecondaryType secondaryType) { - this.secondaryType = secondaryType; - } - - public ActivityStatus getStatus() { - return status; - } - - public void setStatus(ActivityStatus status) { - this.status = status; - } - - public String getCreatedBy() { - return createdBy; - } - - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public List getUserActions() { - return userActions; - } - - public void setUserActions(List userActions) { - this.userActions = userActions; - } - - public ActivityMetadataTransactions getTransactionsMetadata() { - return transactionsMetadata; - } - - public void setTransactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { - this.transactionsMetadata = transactionsMetadata; - } - - public ActivityMetadataAccount getAccountMetadata() { - return accountMetadata; - } - - public void setAccountMetadata(ActivityMetadataAccount accountMetadata) { - this.accountMetadata = accountMetadata; - } - - public Object getOrdersMetadata() { - return ordersMetadata; - } - - public void setOrdersMetadata(Object ordersMetadata) { - this.ordersMetadata = ordersMetadata; - } - - public List getSymbols() { - return symbols; - } - - public void setSymbols(List symbols) { - this.symbols = symbols; - } - - public String getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(String createdAt) { - this.createdAt = createdAt; - } - - public String getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - } - - public HierarchyType getHierarchyType() { - return hierarchyType; - } - - public void setHierarchyType(HierarchyType hierarchyType) { - this.hierarchyType = hierarchyType; - } - - public static class Builder { + /** + * A unique id for the account activity + */ private String id; + /** + * A reference for orders and transactions, n/a for other category types + */ + @JsonProperty("reference_id") private String referenceId; private ActivityCategory category; private PrimeActivityType type; + /** + * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types + * - ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: Transaction secondary types + * - ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types + */ + @JsonProperty("secondary_type") private ActivitySecondaryType secondaryType; private ActivityStatus status; + /** + * Id of user who created the activity + */ + @JsonProperty("created_by") private String createdBy; + /** + * Title of the activity + */ private String title; + /** + * Description detail of the activity + */ private String description; + /** + * Actions related to the Activity + */ + @JsonProperty("user_actions") private List userActions; + @JsonProperty("transactions_metadata") private ActivityMetadataTransactions transactionsMetadata; + @JsonProperty("account_metadata") private ActivityMetadataAccount accountMetadata; + @JsonProperty("orders_metadata") private Object ordersMetadata; + /** + * List of currencies included in an activity + */ private List symbols; + /** + * Time activity was created at + */ + @JsonProperty("created_at") private String createdAt; + /** + * Time for latest status update of account activity + */ + @JsonProperty("updated_at") private String updatedAt; + /** HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, Portfolio */ + @JsonProperty("hierarchy_type") private HierarchyType hierarchyType; - public Builder id(String id) { - this.id = id; - return this; + public Activity() { + } + + public Activity(Builder builder) { + this.id = builder.id; + this.referenceId = builder.referenceId; + this.category = builder.category; + this.type = builder.type; + this.secondaryType = builder.secondaryType; + this.status = builder.status; + this.createdBy = builder.createdBy; + this.title = builder.title; + this.description = builder.description; + this.userActions = builder.userActions; + this.transactionsMetadata = builder.transactionsMetadata; + this.accountMetadata = builder.accountMetadata; + this.ordersMetadata = builder.ordersMetadata; + this.symbols = builder.symbols; + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + this.hierarchyType = builder.hierarchyType; + } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + public String getReferenceId() { + return referenceId; } - public Builder referenceId(String referenceId) { - this.referenceId = referenceId; - return this; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + public ActivityCategory getCategory() { + return category; } - public Builder category(ActivityCategory category) { - this.category = category; - return this; + public void setCategory(ActivityCategory category) { + this.category = category; + } + public PrimeActivityType getType() { + return type; } - public Builder type(PrimeActivityType type) { - this.type = type; - return this; + public void setType(PrimeActivityType type) { + this.type = type; + } + public ActivitySecondaryType getSecondaryType() { + return secondaryType; } - public Builder secondaryType(ActivitySecondaryType secondaryType) { - this.secondaryType = secondaryType; - return this; + public void setSecondaryType(ActivitySecondaryType secondaryType) { + this.secondaryType = secondaryType; + } + public ActivityStatus getStatus() { + return status; } - public Builder status(ActivityStatus status) { - this.status = status; - return this; + public void setStatus(ActivityStatus status) { + this.status = status; + } + public String getCreatedBy() { + return createdBy; } - public Builder createdBy(String createdBy) { - this.createdBy = createdBy; - return this; + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + public String getTitle() { + return title; } - public Builder title(String title) { - this.title = title; - return this; + public void setTitle(String title) { + this.title = title; + } + public String getDescription() { + return description; } - public Builder description(String description) { - this.description = description; - return this; + public void setDescription(String description) { + this.description = description; + } + public List getUserActions() { + return userActions; } - public Builder userActions(List userActions) { - this.userActions = userActions; - return this; + public void setUserActions(List userActions) { + this.userActions = userActions; + } + public ActivityMetadataTransactions getTransactionsMetadata() { + return transactionsMetadata; } - public Builder transactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { - this.transactionsMetadata = transactionsMetadata; - return this; + public void setTransactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { + this.transactionsMetadata = transactionsMetadata; + } + public ActivityMetadataAccount getAccountMetadata() { + return accountMetadata; } - public Builder accountMetadata(ActivityMetadataAccount accountMetadata) { - this.accountMetadata = accountMetadata; - return this; + public void setAccountMetadata(ActivityMetadataAccount accountMetadata) { + this.accountMetadata = accountMetadata; + } + public Object getOrdersMetadata() { + return ordersMetadata; } - public Builder ordersMetadata(Object ordersMetadata) { - this.ordersMetadata = ordersMetadata; - return this; + public void setOrdersMetadata(Object ordersMetadata) { + this.ordersMetadata = ordersMetadata; + } + public List getSymbols() { + return symbols; } - public Builder symbols(List symbols) { - this.symbols = symbols; - return this; + public void setSymbols(List symbols) { + this.symbols = symbols; + } + public String getCreatedAt() { + return createdAt; } - public Builder createdAt(String createdAt) { - this.createdAt = createdAt; - return this; + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + public String getUpdatedAt() { + return updatedAt; } - public Builder updatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + public HierarchyType getHierarchyType() { + return hierarchyType; } - public Builder hierarchyType(HierarchyType hierarchyType) { - this.hierarchyType = hierarchyType; - return this; + public void setHierarchyType(HierarchyType hierarchyType) { + this.hierarchyType = hierarchyType; } + public static class Builder { + private String id; + + private String referenceId; + + private ActivityCategory category; + + private PrimeActivityType type; + + private ActivitySecondaryType secondaryType; + + private ActivityStatus status; + + private String createdBy; + + private String title; + + private String description; + + private List userActions; + + private ActivityMetadataTransactions transactionsMetadata; + + private ActivityMetadataAccount accountMetadata; + + private Object ordersMetadata; + + private List symbols; + + private String createdAt; + + private String updatedAt; + + private HierarchyType hierarchyType; - public Activity build() { - return new Activity(this); + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + public Builder category(ActivityCategory category) { + this.category = category; + return this; + } + + public Builder type(PrimeActivityType type) { + this.type = type; + return this; + } + + public Builder secondaryType(ActivitySecondaryType secondaryType) { + this.secondaryType = secondaryType; + return this; + } + + public Builder status(ActivityStatus status) { + this.status = status; + return this; + } + + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + return this; + } + + public Builder title(String title) { + this.title = title; + return this; + } + + public Builder description(String description) { + this.description = description; + return this; + } + + public Builder userActions(List userActions) { + this.userActions = userActions; + return this; + } + + public Builder transactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { + this.transactionsMetadata = transactionsMetadata; + return this; + } + + public Builder accountMetadata(ActivityMetadataAccount accountMetadata) { + this.accountMetadata = accountMetadata; + return this; + } + + public Builder ordersMetadata(Object ordersMetadata) { + this.ordersMetadata = ordersMetadata; + return this; + } + + public Builder symbols(List symbols) { + this.symbols = symbols; + return this; + } + + public Builder createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + public Builder hierarchyType(HierarchyType hierarchyType) { + this.hierarchyType = hierarchyType; + return this; + } + + public Activity build() { + return new Activity(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java index b6c3341..f74ca5a 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java @@ -17,34 +17,35 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.ActivityMetadataConsensus; public class ActivityMetadataAccount { - private ActivityMetadataConsensus consensus; - - public ActivityMetadataAccount() {} - - public ActivityMetadataAccount(Builder builder) { - this.consensus = builder.consensus; - } - - public ActivityMetadataConsensus getConsensus() { - return consensus; - } + private ActivityMetadataConsensus consensus; - public void setConsensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - } + public ActivityMetadataAccount() { + } - public static class Builder { - private ActivityMetadataConsensus consensus; + public ActivityMetadataAccount(Builder builder) { + this.consensus = builder.consensus; + } + public ActivityMetadataConsensus getConsensus() { + return consensus; + } - public Builder consensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - return this; + public void setConsensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; } + public static class Builder { + private ActivityMetadataConsensus consensus; - public ActivityMetadataAccount build() { - return new ActivityMetadataAccount(this); + public Builder consensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; + return this; + } + + public ActivityMetadataAccount build() { + return new ActivityMetadataAccount(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java index 5a2ae77..40a9571 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java @@ -17,58 +17,60 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class ActivityMetadataConsensus { - /** Deadline for approval of an activity */ - @JsonProperty("approval_deadline") - private String approvalDeadline; - - /** If activity has passed consensus threshold */ - @JsonProperty("has_passed_consensus") - private boolean hasPassedConsensus; - - public ActivityMetadataConsensus() {} - - public ActivityMetadataConsensus(Builder builder) { - this.approvalDeadline = builder.approvalDeadline; - this.hasPassedConsensus = builder.hasPassedConsensus; - } + /** + * Deadline for approval of an activity + */ + @JsonProperty("approval_deadline") + private String approvalDeadline; - public String getApprovalDeadline() { - return approvalDeadline; - } + /** + * If activity has passed consensus threshold + */ + @JsonProperty("has_passed_consensus") + private boolean hasPassedConsensus; - public void setApprovalDeadline(String approvalDeadline) { - this.approvalDeadline = approvalDeadline; - } + public ActivityMetadataConsensus() { + } - public boolean getHasPassedConsensus() { - return hasPassedConsensus; - } + public ActivityMetadataConsensus(Builder builder) { + this.approvalDeadline = builder.approvalDeadline; + this.hasPassedConsensus = builder.hasPassedConsensus; + } + public String getApprovalDeadline() { + return approvalDeadline; + } - public void setHasPassedConsensus(boolean hasPassedConsensus) { - this.hasPassedConsensus = hasPassedConsensus; - } + public void setApprovalDeadline(String approvalDeadline) { + this.approvalDeadline = approvalDeadline; + } + public boolean getHasPassedConsensus() { + return hasPassedConsensus; + } - public static class Builder { - private String approvalDeadline; + public void setHasPassedConsensus(boolean hasPassedConsensus) { + this.hasPassedConsensus = hasPassedConsensus; + } + public static class Builder { + private String approvalDeadline; - private boolean hasPassedConsensus; + private boolean hasPassedConsensus; - public Builder approvalDeadline(String approvalDeadline) { - this.approvalDeadline = approvalDeadline; - return this; - } + public Builder approvalDeadline(String approvalDeadline) { + this.approvalDeadline = approvalDeadline; + return this; + } - public Builder hasPassedConsensus(boolean hasPassedConsensus) { - this.hasPassedConsensus = hasPassedConsensus; - return this; - } + public Builder hasPassedConsensus(boolean hasPassedConsensus) { + this.hasPassedConsensus = hasPassedConsensus; + return this; + } - public ActivityMetadataConsensus build() { - return new ActivityMetadataConsensus(this); + public ActivityMetadataConsensus build() { + return new ActivityMetadataConsensus(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java index a345160..05a0ab0 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java @@ -17,34 +17,35 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.ActivityMetadataConsensus; public class ActivityMetadataTransactions { - private ActivityMetadataConsensus consensus; - - public ActivityMetadataTransactions() {} - - public ActivityMetadataTransactions(Builder builder) { - this.consensus = builder.consensus; - } - - public ActivityMetadataConsensus getConsensus() { - return consensus; - } + private ActivityMetadataConsensus consensus; - public void setConsensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - } + public ActivityMetadataTransactions() { + } - public static class Builder { - private ActivityMetadataConsensus consensus; + public ActivityMetadataTransactions(Builder builder) { + this.consensus = builder.consensus; + } + public ActivityMetadataConsensus getConsensus() { + return consensus; + } - public Builder consensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - return this; + public void setConsensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; } + public static class Builder { + private ActivityMetadataConsensus consensus; - public ActivityMetadataTransactions build() { - return new ActivityMetadataTransactions(this); + public Builder consensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; + return this; + } + + public ActivityMetadataTransactions build() { + return new ActivityMetadataTransactions(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java index f9848a6..c5bc51b 100644 --- a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java @@ -17,273 +17,283 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.AddressBookType; +import com.coinbase.prime.model.DisplayUser; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class AddressBookEntry { - /** UUID identifying this address book entry */ - private String id; - - /** Currency symbol */ - @JsonProperty("currency_symbol") - private String currencySymbol; - - /** Name for this address book entry */ - private String name; - - /** Cryptocurrency address */ - private String address; - - /** Memo or destination tag for currencies which support them */ - @JsonProperty("account_identifier") - private String accountIdentifier; - - /** Name of the account identifier. For instance Destination Tag */ - @JsonProperty("account_identifier_name") - private String accountIdentifierName; - - /** State of this address book entry */ - private String state; - - /** Link to a blockchain explorer */ - @JsonProperty("explorer_link") - private String explorerLink; - - /** When this entry was last used for a transaction */ - @JsonProperty("last_used_at") - private OffsetDateTime lastUsedAt; - - /** When this entry was added to the address book */ - @JsonProperty("added_at") - private OffsetDateTime addedAt; - - @JsonProperty("added_by") - private DisplayUser addedBy; - - private AddressBookType type; - - /** counterparty id */ - @JsonProperty("counterparty_id") - private String counterpartyId; - - public AddressBookEntry() {} - - public AddressBookEntry(Builder builder) { - this.id = builder.id; - this.currencySymbol = builder.currencySymbol; - this.name = builder.name; - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - this.accountIdentifierName = builder.accountIdentifierName; - this.state = builder.state; - this.explorerLink = builder.explorerLink; - this.lastUsedAt = builder.lastUsedAt; - this.addedAt = builder.addedAt; - this.addedBy = builder.addedBy; - this.type = builder.type; - this.counterpartyId = builder.counterpartyId; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getCurrencySymbol() { - return currencySymbol; - } - - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getAccountIdentifier() { - return accountIdentifier; - } - - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } - - public String getAccountIdentifierName() { - return accountIdentifierName; - } - - public void setAccountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - } - - public String getState() { - return state; - } - - public void setState(String state) { - this.state = state; - } - - public String getExplorerLink() { - return explorerLink; - } - - public void setExplorerLink(String explorerLink) { - this.explorerLink = explorerLink; - } - - public OffsetDateTime getLastUsedAt() { - return lastUsedAt; - } - - public void setLastUsedAt(OffsetDateTime lastUsedAt) { - this.lastUsedAt = lastUsedAt; - } - - public OffsetDateTime getAddedAt() { - return addedAt; - } - - public void setAddedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - } - - public DisplayUser getAddedBy() { - return addedBy; - } - - public void setAddedBy(DisplayUser addedBy) { - this.addedBy = addedBy; - } - - public AddressBookType getType() { - return type; - } - - public void setType(AddressBookType type) { - this.type = type; - } - - public String getCounterpartyId() { - return counterpartyId; - } - - public void setCounterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - } - - public static class Builder { + /** + * UUID identifying this address book entry + */ private String id; + /** + * Currency symbol + */ + @JsonProperty("currency_symbol") private String currencySymbol; + /** + * Name for this address book entry + */ private String name; + /** + * Cryptocurrency address + */ private String address; + /** + * Memo or destination tag for currencies which support them + */ + @JsonProperty("account_identifier") private String accountIdentifier; + /** + * Name of the account identifier. For instance Destination Tag + */ + @JsonProperty("account_identifier_name") private String accountIdentifierName; + /** + * State of this address book entry + */ private String state; + /** + * Link to a blockchain explorer + */ + @JsonProperty("explorer_link") private String explorerLink; + /** + * When this entry was last used for a transaction + */ + @JsonProperty("last_used_at") private OffsetDateTime lastUsedAt; + /** + * When this entry was added to the address book + */ + @JsonProperty("added_at") private OffsetDateTime addedAt; + @JsonProperty("added_by") private DisplayUser addedBy; private AddressBookType type; + /** + * counterparty id + */ + @JsonProperty("counterparty_id") private String counterpartyId; - public Builder id(String id) { - this.id = id; - return this; + public AddressBookEntry() { + } + + public AddressBookEntry(Builder builder) { + this.id = builder.id; + this.currencySymbol = builder.currencySymbol; + this.name = builder.name; + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + this.accountIdentifierName = builder.accountIdentifierName; + this.state = builder.state; + this.explorerLink = builder.explorerLink; + this.lastUsedAt = builder.lastUsedAt; + this.addedAt = builder.addedAt; + this.addedBy = builder.addedBy; + this.type = builder.type; + this.counterpartyId = builder.counterpartyId; + } + public String getId() { + return id; } - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; + public void setId(String id) { + this.id = id; + } + public String getCurrencySymbol() { + return currencySymbol; } - public Builder name(String name) { - this.name = name; - return this; + public void setCurrencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + } + public String getName() { + return name; } - public Builder address(String address) { - this.address = address; - return this; + public void setName(String name) { + this.name = name; + } + public String getAddress() { + return address; } - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; + public void setAddress(String address) { + this.address = address; + } + public String getAccountIdentifier() { + return accountIdentifier; } - public Builder accountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - return this; + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } + public String getAccountIdentifierName() { + return accountIdentifierName; } - public Builder state(String state) { - this.state = state; - return this; + public void setAccountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + } + public String getState() { + return state; } - public Builder explorerLink(String explorerLink) { - this.explorerLink = explorerLink; - return this; + public void setState(String state) { + this.state = state; + } + public String getExplorerLink() { + return explorerLink; } - public Builder lastUsedAt(OffsetDateTime lastUsedAt) { - this.lastUsedAt = lastUsedAt; - return this; + public void setExplorerLink(String explorerLink) { + this.explorerLink = explorerLink; + } + public OffsetDateTime getLastUsedAt() { + return lastUsedAt; } - public Builder addedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - return this; + public void setLastUsedAt(OffsetDateTime lastUsedAt) { + this.lastUsedAt = lastUsedAt; + } + public OffsetDateTime getAddedAt() { + return addedAt; } - public Builder addedBy(DisplayUser addedBy) { - this.addedBy = addedBy; - return this; + public void setAddedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + } + public DisplayUser getAddedBy() { + return addedBy; } - public Builder type(AddressBookType type) { - this.type = type; - return this; + public void setAddedBy(DisplayUser addedBy) { + this.addedBy = addedBy; + } + public AddressBookType getType() { + return type; } - public Builder counterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - return this; + public void setType(AddressBookType type) { + this.type = type; + } + public String getCounterpartyId() { + return counterpartyId; } - public AddressBookEntry build() { - return new AddressBookEntry(this); + public void setCounterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + } + public static class Builder { + private String id; + + private String currencySymbol; + + private String name; + + private String address; + + private String accountIdentifier; + + private String accountIdentifierName; + + private String state; + + private String explorerLink; + + private OffsetDateTime lastUsedAt; + + private OffsetDateTime addedAt; + + private DisplayUser addedBy; + + private AddressBookType type; + + private String counterpartyId; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder currencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder address(String address) { + this.address = address; + return this; + } + + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; + } + + public Builder accountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + return this; + } + + public Builder state(String state) { + this.state = state; + return this; + } + + public Builder explorerLink(String explorerLink) { + this.explorerLink = explorerLink; + return this; + } + + public Builder lastUsedAt(OffsetDateTime lastUsedAt) { + this.lastUsedAt = lastUsedAt; + return this; + } + + public Builder addedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + return this; + } + + public Builder addedBy(DisplayUser addedBy) { + this.addedBy = addedBy; + return this; + } + + public Builder type(AddressBookType type) { + this.type = type; + return this; + } + + public Builder counterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + return this; + } + + public AddressBookEntry build() { + return new AddressBookEntry(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AddressEntry.java b/src/main/java/com/coinbase/prime/model/AddressEntry.java index 361e823..3d33f1f 100644 --- a/src/main/java/com/coinbase/prime/model/AddressEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressEntry.java @@ -17,75 +17,72 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class AddressEntry { - private String name; - - private String address; - - /** List of compatible chain IDs for a given address, empty for Solana */ - @JsonProperty("chain_ids") - private List chainIds; - - public AddressEntry() {} - - public AddressEntry(Builder builder) { - this.name = builder.name; - this.address = builder.address; - this.chainIds = builder.chainIds; - } + private String name; - public String getName() { - return name; - } + private String address; - public void setName(String name) { - this.name = name; - } + /** List of compatible chain IDs for a given address, empty for Solana */ + @JsonProperty("chain_ids") + private List chainIds; - public String getAddress() { - return address; - } + public AddressEntry() { + } - public void setAddress(String address) { - this.address = address; - } + public AddressEntry(Builder builder) { + this.name = builder.name; + this.address = builder.address; + this.chainIds = builder.chainIds; + } + public String getName() { + return name; + } - public List getChainIds() { - return chainIds; - } + public void setName(String name) { + this.name = name; + } + public String getAddress() { + return address; + } - public void setChainIds(List chainIds) { - this.chainIds = chainIds; - } + public void setAddress(String address) { + this.address = address; + } + public List getChainIds() { + return chainIds; + } - public static class Builder { - private String name; + public void setChainIds(List chainIds) { + this.chainIds = chainIds; + } + public static class Builder { + private String name; - private String address; + private String address; - private List chainIds; + private List chainIds; - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Builder address(String address) { - this.address = address; - return this; - } + public Builder address(String address) { + this.address = address; + return this; + } - public Builder chainIds(List chainIds) { - this.chainIds = chainIds; - return this; - } + public Builder chainIds(List chainIds) { + this.chainIds = chainIds; + return this; + } - public AddressEntry build() { - return new AddressEntry(this); + public AddressEntry build() { + return new AddressEntry(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AddressGroup.java b/src/main/java/com/coinbase/prime/model/AddressGroup.java index 38fa3f6..c977cc8 100644 --- a/src/main/java/com/coinbase/prime/model/AddressGroup.java +++ b/src/main/java/com/coinbase/prime/model/AddressGroup.java @@ -17,114 +17,110 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.AddressEntry; import com.coinbase.prime.model.enums.NetworkType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; public class AddressGroup { - private String id; - - private String name; - - @JsonProperty("network_type") - private NetworkType networkType; - - /** A list of addresses within the group */ - private List addresses; - - @JsonProperty("added_at") - private OffsetDateTime addedAt; - - public AddressGroup() {} - - public AddressGroup(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.networkType = builder.networkType; - this.addresses = builder.addresses; - this.addedAt = builder.addedAt; - } + private String id; - public String getId() { - return id; - } + private String name; - public void setId(String id) { - this.id = id; - } + @JsonProperty("network_type") + private NetworkType networkType; - public String getName() { - return name; - } + /** A list of addresses within the group */ + private List addresses; - public void setName(String name) { - this.name = name; - } + @JsonProperty("added_at") + private OffsetDateTime addedAt; - public NetworkType getNetworkType() { - return networkType; - } + public AddressGroup() { + } - public void setNetworkType(NetworkType networkType) { - this.networkType = networkType; - } + public AddressGroup(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.networkType = builder.networkType; + this.addresses = builder.addresses; + this.addedAt = builder.addedAt; + } + public String getId() { + return id; + } - public List getAddresses() { - return addresses; - } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } - public void setAddresses(List addresses) { - this.addresses = addresses; - } + public void setName(String name) { + this.name = name; + } + public NetworkType getNetworkType() { + return networkType; + } - public OffsetDateTime getAddedAt() { - return addedAt; - } + public void setNetworkType(NetworkType networkType) { + this.networkType = networkType; + } + public List getAddresses() { + return addresses; + } - public void setAddedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - } + public void setAddresses(List addresses) { + this.addresses = addresses; + } + public OffsetDateTime getAddedAt() { + return addedAt; + } - public static class Builder { - private String id; + public void setAddedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + } + public static class Builder { + private String id; - private String name; + private String name; - private NetworkType networkType; + private NetworkType networkType; - private List addresses; + private List addresses; - private OffsetDateTime addedAt; + private OffsetDateTime addedAt; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Builder networkType(NetworkType networkType) { - this.networkType = networkType; - return this; - } + public Builder networkType(NetworkType networkType) { + this.networkType = networkType; + return this; + } - public Builder addresses(List addresses) { - this.addresses = addresses; - return this; - } + public Builder addresses(List addresses) { + this.addresses = addresses; + return this; + } - public Builder addedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - return this; - } + public Builder addedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + return this; + } - public AddressGroup build() { - return new AddressGroup(this); + public AddressGroup build() { + return new AddressGroup(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java index fcad19e..6177759 100644 --- a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java +++ b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java @@ -17,117 +17,114 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.AdvancedTransferState; import com.coinbase.prime.model.enums.AdvancedTransferType; +import com.coinbase.prime.model.BlindMatchMetadata; +import com.coinbase.prime.model.FundMovement; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** AdvancedTransfer represents a complex transfer operation such as a blind match settlement. */ public class AdvancedTransfer { - private String id; - - /** AdvancedTransferType specifies the type of advanced transfer. */ - private AdvancedTransferType type; - - /** AdvancedTransferState represents the lifecycle state of an advanced transfer. */ - private AdvancedTransferState state; - - @JsonProperty("fund_movements") - private List fundMovements; - - /** BlindMatchMetadata contains metadata specific to blind match advanced transfers. */ - @JsonProperty("blind_match_metadata") - private BlindMatchMetadata blindMatchMetadata; - - public AdvancedTransfer() {} - - public AdvancedTransfer(Builder builder) { - this.id = builder.id; - this.type = builder.type; - this.state = builder.state; - this.fundMovements = builder.fundMovements; - this.blindMatchMetadata = builder.blindMatchMetadata; - } + private String id; - public String getId() { - return id; - } + /** AdvancedTransferType specifies the type of advanced transfer. */ + private AdvancedTransferType type; - public void setId(String id) { - this.id = id; - } + /** AdvancedTransferState represents the lifecycle state of an advanced transfer. */ + private AdvancedTransferState state; - public AdvancedTransferType getType() { - return type; - } + @JsonProperty("fund_movements") + private List fundMovements; - public void setType(AdvancedTransferType type) { - this.type = type; - } + /** BlindMatchMetadata contains metadata specific to blind match advanced transfers. */ + @JsonProperty("blind_match_metadata") + private BlindMatchMetadata blindMatchMetadata; - public AdvancedTransferState getState() { - return state; - } + public AdvancedTransfer() { + } - public void setState(AdvancedTransferState state) { - this.state = state; - } + public AdvancedTransfer(Builder builder) { + this.id = builder.id; + this.type = builder.type; + this.state = builder.state; + this.fundMovements = builder.fundMovements; + this.blindMatchMetadata = builder.blindMatchMetadata; + } + public String getId() { + return id; + } - public List getFundMovements() { - return fundMovements; - } + public void setId(String id) { + this.id = id; + } + public AdvancedTransferType getType() { + return type; + } - public void setFundMovements(List fundMovements) { - this.fundMovements = fundMovements; - } + public void setType(AdvancedTransferType type) { + this.type = type; + } + public AdvancedTransferState getState() { + return state; + } - public BlindMatchMetadata getBlindMatchMetadata() { - return blindMatchMetadata; - } + public void setState(AdvancedTransferState state) { + this.state = state; + } + public List getFundMovements() { + return fundMovements; + } - public void setBlindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { - this.blindMatchMetadata = blindMatchMetadata; - } + public void setFundMovements(List fundMovements) { + this.fundMovements = fundMovements; + } + public BlindMatchMetadata getBlindMatchMetadata() { + return blindMatchMetadata; + } - public static class Builder { - private String id; + public void setBlindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { + this.blindMatchMetadata = blindMatchMetadata; + } + public static class Builder { + private String id; - private AdvancedTransferType type; + private AdvancedTransferType type; - private AdvancedTransferState state; + private AdvancedTransferState state; - private List fundMovements; + private List fundMovements; - private BlindMatchMetadata blindMatchMetadata; + private BlindMatchMetadata blindMatchMetadata; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder type(AdvancedTransferType type) { - this.type = type; - return this; - } + public Builder type(AdvancedTransferType type) { + this.type = type; + return this; + } - public Builder state(AdvancedTransferState state) { - this.state = state; - return this; - } + public Builder state(AdvancedTransferState state) { + this.state = state; + return this; + } - public Builder fundMovements(List fundMovements) { - this.fundMovements = fundMovements; - return this; - } + public Builder fundMovements(List fundMovements) { + this.fundMovements = fundMovements; + return this; + } - public Builder blindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { - this.blindMatchMetadata = blindMatchMetadata; - return this; - } + public Builder blindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { + this.blindMatchMetadata = blindMatchMetadata; + return this; + } - public AdvancedTransfer build() { - return new AdvancedTransfer(this); + public AdvancedTransfer build() { + return new AdvancedTransfer(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java index c1bfb53..98f2588 100644 --- a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java +++ b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java @@ -19,50 +19,49 @@ package com.coinbase.prime.model; public class AggregatedFiatBalance { - private String total; - - private String holds; - - public AggregatedFiatBalance() {} - - public AggregatedFiatBalance(Builder builder) { - this.total = builder.total; - this.holds = builder.holds; - } + private String total; - public String getTotal() { - return total; - } + private String holds; - public void setTotal(String total) { - this.total = total; - } + public AggregatedFiatBalance() { + } - public String getHolds() { - return holds; - } + public AggregatedFiatBalance(Builder builder) { + this.total = builder.total; + this.holds = builder.holds; + } + public String getTotal() { + return total; + } - public void setHolds(String holds) { - this.holds = holds; - } + public void setTotal(String total) { + this.total = total; + } + public String getHolds() { + return holds; + } - public static class Builder { - private String total; + public void setHolds(String holds) { + this.holds = holds; + } + public static class Builder { + private String total; - private String holds; + private String holds; - public Builder total(String total) { - this.total = total; - return this; - } + public Builder total(String total) { + this.total = total; + return this; + } - public Builder holds(String holds) { - this.holds = holds; - return this; - } + public Builder holds(String holds) { + this.holds = holds; + return this; + } - public AggregatedFiatBalance build() { - return new AggregatedFiatBalance(this); + public AggregatedFiatBalance build() { + return new AggregatedFiatBalance(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Allocation.java b/src/main/java/com/coinbase/prime/model/Allocation.java index 3d8f2a5..6bc495c 100644 --- a/src/main/java/com/coinbase/prime/model/Allocation.java +++ b/src/main/java/com/coinbase/prime/model/Allocation.java @@ -17,330 +17,333 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.AllocationStatus; +import com.coinbase.prime.model.DestinationAlloc; import com.coinbase.prime.model.enums.OrderSide; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; public class Allocation { - /** The ID that ties together an allocation and all of its legs. */ - @JsonProperty("root_id") - private String rootId; - - /** - * The ID of the allocation if this allocation is a reversal. In this case, the root_id would be - * the original allocation ID. - */ - @JsonProperty("reversal_id") - private String reversalId; - - /** Time the final leg of the root allocation was completed. */ - @JsonProperty("allocation_completed_at") - private OffsetDateTime allocationCompletedAt; - - /** The ID of the user that created the allocation. */ - @JsonProperty("user_id") - private String userId; - - /** The ID of the product of the orders allocated. */ - @JsonProperty("product_id") - private String productId; - - /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ - private OrderSide side; - - /** Price the allocation was done at. */ - @JsonProperty("avg_price") - private String avgPrice; - - /** Amount allocated in base asset units. */ - @JsonProperty("base_quantity") - private String baseQuantity; - - /** Amount allocated in quote asset units. */ - @JsonProperty("quote_value") - private String quoteValue; - - /** Fees from original trade execution allocated in quote asset units. */ - @JsonProperty("fees_allocated") - private String feesAllocated; - - private AllocationStatus status; - - /** Portfolio ID of the source portfolio. */ - private String source; - - /** - * All order IDs that were aggregated to calculate the avg_price, quantity to allocate in each - * leg. Each order_id should tie back to the single allocation root_id. - */ - @JsonProperty("order_ids") - private List orderIds; - - /** - * Array of objects, each containing the leg ID, destination portfolio ID and amount in chosen - * units allocated to each portfolio: [{leg_id, portfolio_id, allocation_base, allocation_quote}, - * {leg_id, portfolio_id, allocation_base, allocation_quote}...] - */ - private List destinations; - - /** - * The netting ID of the allocation, not empty if the allocation was submitted as part of a net - * allocation - */ - @JsonProperty("netting_id") - private String nettingId; - - public Allocation() {} - - public Allocation(Builder builder) { - this.rootId = builder.rootId; - this.reversalId = builder.reversalId; - this.allocationCompletedAt = builder.allocationCompletedAt; - this.userId = builder.userId; - this.productId = builder.productId; - this.side = builder.side; - this.avgPrice = builder.avgPrice; - this.baseQuantity = builder.baseQuantity; - this.quoteValue = builder.quoteValue; - this.feesAllocated = builder.feesAllocated; - this.status = builder.status; - this.source = builder.source; - this.orderIds = builder.orderIds; - this.destinations = builder.destinations; - this.nettingId = builder.nettingId; - } - - public String getRootId() { - return rootId; - } - - public void setRootId(String rootId) { - this.rootId = rootId; - } - - public String getReversalId() { - return reversalId; - } - - public void setReversalId(String reversalId) { - this.reversalId = reversalId; - } - - public OffsetDateTime getAllocationCompletedAt() { - return allocationCompletedAt; - } - - public void setAllocationCompletedAt(OffsetDateTime allocationCompletedAt) { - this.allocationCompletedAt = allocationCompletedAt; - } - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public String getProductId() { - return productId; - } - - public void setProductId(String productId) { - this.productId = productId; - } - - public OrderSide getSide() { - return side; - } - - public void setSide(OrderSide side) { - this.side = side; - } - - public String getAvgPrice() { - return avgPrice; - } - - public void setAvgPrice(String avgPrice) { - this.avgPrice = avgPrice; - } - - public String getBaseQuantity() { - return baseQuantity; - } - - public void setBaseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - } - - public String getQuoteValue() { - return quoteValue; - } - - public void setQuoteValue(String quoteValue) { - this.quoteValue = quoteValue; - } - - public String getFeesAllocated() { - return feesAllocated; - } - - public void setFeesAllocated(String feesAllocated) { - this.feesAllocated = feesAllocated; - } - - public AllocationStatus getStatus() { - return status; - } - - public void setStatus(AllocationStatus status) { - this.status = status; - } - - public String getSource() { - return source; - } - - public void setSource(String source) { - this.source = source; - } - - public List getOrderIds() { - return orderIds; - } - - public void setOrderIds(List orderIds) { - this.orderIds = orderIds; - } - - public List getDestinations() { - return destinations; - } - - public void setDestinations(List destinations) { - this.destinations = destinations; - } - - public String getNettingId() { - return nettingId; - } - - public void setNettingId(String nettingId) { - this.nettingId = nettingId; - } - - public static class Builder { + /** + * The ID that ties together an allocation and all of its legs. + */ + @JsonProperty("root_id") private String rootId; + /** + * The ID of the allocation if this allocation is a reversal. In this case, the root_id would be the original allocation ID. + */ + @JsonProperty("reversal_id") private String reversalId; + /** + * Time the final leg of the root allocation was completed. + */ + @JsonProperty("allocation_completed_at") private OffsetDateTime allocationCompletedAt; + /** + * The ID of the user that created the allocation. + */ + @JsonProperty("user_id") private String userId; + /** + * The ID of the product of the orders allocated. + */ + @JsonProperty("product_id") private String productId; + /** + * - UNKNOWN_ORDER_SIDE: nil value + * - BUY: Buy order + * - SELL: Sell order + */ private OrderSide side; + /** + * Price the allocation was done at. + */ + @JsonProperty("avg_price") private String avgPrice; + /** + * Amount allocated in base asset units. + */ + @JsonProperty("base_quantity") private String baseQuantity; + /** + * Amount allocated in quote asset units. + */ + @JsonProperty("quote_value") private String quoteValue; + /** + * Fees from original trade execution allocated in quote asset units. + */ + @JsonProperty("fees_allocated") private String feesAllocated; private AllocationStatus status; + /** + * Portfolio ID of the source portfolio. + */ private String source; + /** + * All order IDs that were aggregated to calculate the avg_price, quantity to allocate in each leg. Each order_id should tie back to the single allocation root_id. + */ + @JsonProperty("order_ids") private List orderIds; + /** + * Array of objects, each containing the leg ID, destination portfolio ID and amount in chosen units allocated to each portfolio: [{leg_id, portfolio_id, allocation_base, allocation_quote}, {leg_id, portfolio_id, allocation_base, allocation_quote}...] + */ private List destinations; + /** + * The netting ID of the allocation, not empty if the allocation was submitted as part of a net allocation + */ + @JsonProperty("netting_id") private String nettingId; - public Builder rootId(String rootId) { - this.rootId = rootId; - return this; + public Allocation() { } - public Builder reversalId(String reversalId) { - this.reversalId = reversalId; - return this; + public Allocation(Builder builder) { + this.rootId = builder.rootId; + this.reversalId = builder.reversalId; + this.allocationCompletedAt = builder.allocationCompletedAt; + this.userId = builder.userId; + this.productId = builder.productId; + this.side = builder.side; + this.avgPrice = builder.avgPrice; + this.baseQuantity = builder.baseQuantity; + this.quoteValue = builder.quoteValue; + this.feesAllocated = builder.feesAllocated; + this.status = builder.status; + this.source = builder.source; + this.orderIds = builder.orderIds; + this.destinations = builder.destinations; + this.nettingId = builder.nettingId; + } + public String getRootId() { + return rootId; } - public Builder allocationCompletedAt(OffsetDateTime allocationCompletedAt) { - this.allocationCompletedAt = allocationCompletedAt; - return this; + public void setRootId(String rootId) { + this.rootId = rootId; + } + public String getReversalId() { + return reversalId; } - public Builder userId(String userId) { - this.userId = userId; - return this; + public void setReversalId(String reversalId) { + this.reversalId = reversalId; + } + public OffsetDateTime getAllocationCompletedAt() { + return allocationCompletedAt; } - public Builder productId(String productId) { - this.productId = productId; - return this; + public void setAllocationCompletedAt(OffsetDateTime allocationCompletedAt) { + this.allocationCompletedAt = allocationCompletedAt; + } + public String getUserId() { + return userId; } - public Builder side(OrderSide side) { - this.side = side; - return this; + public void setUserId(String userId) { + this.userId = userId; + } + public String getProductId() { + return productId; } - public Builder avgPrice(String avgPrice) { - this.avgPrice = avgPrice; - return this; + public void setProductId(String productId) { + this.productId = productId; + } + public OrderSide getSide() { + return side; } - public Builder baseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - return this; + public void setSide(OrderSide side) { + this.side = side; + } + public String getAvgPrice() { + return avgPrice; } - public Builder quoteValue(String quoteValue) { - this.quoteValue = quoteValue; - return this; + public void setAvgPrice(String avgPrice) { + this.avgPrice = avgPrice; + } + public String getBaseQuantity() { + return baseQuantity; } - public Builder feesAllocated(String feesAllocated) { - this.feesAllocated = feesAllocated; - return this; + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + public String getQuoteValue() { + return quoteValue; } - public Builder status(AllocationStatus status) { - this.status = status; - return this; + public void setQuoteValue(String quoteValue) { + this.quoteValue = quoteValue; + } + public String getFeesAllocated() { + return feesAllocated; } - public Builder source(String source) { - this.source = source; - return this; + public void setFeesAllocated(String feesAllocated) { + this.feesAllocated = feesAllocated; + } + public AllocationStatus getStatus() { + return status; + } + + public void setStatus(AllocationStatus status) { + this.status = status; + } + public String getSource() { + return source; } - public Builder orderIds(List orderIds) { - this.orderIds = orderIds; - return this; + public void setSource(String source) { + this.source = source; + } + public List getOrderIds() { + return orderIds; } - public Builder destinations(List destinations) { - this.destinations = destinations; - return this; + public void setOrderIds(List orderIds) { + this.orderIds = orderIds; + } + public List getDestinations() { + return destinations; } - public Builder nettingId(String nettingId) { - this.nettingId = nettingId; - return this; + public void setDestinations(List destinations) { + this.destinations = destinations; + } + public String getNettingId() { + return nettingId; } - public Allocation build() { - return new Allocation(this); + public void setNettingId(String nettingId) { + this.nettingId = nettingId; + } + public static class Builder { + private String rootId; + + private String reversalId; + + private OffsetDateTime allocationCompletedAt; + + private String userId; + + private String productId; + + private OrderSide side; + + private String avgPrice; + + private String baseQuantity; + + private String quoteValue; + + private String feesAllocated; + + private AllocationStatus status; + + private String source; + + private List orderIds; + + private List destinations; + + private String nettingId; + + public Builder rootId(String rootId) { + this.rootId = rootId; + return this; + } + + public Builder reversalId(String reversalId) { + this.reversalId = reversalId; + return this; + } + + public Builder allocationCompletedAt(OffsetDateTime allocationCompletedAt) { + this.allocationCompletedAt = allocationCompletedAt; + return this; + } + + public Builder userId(String userId) { + this.userId = userId; + return this; + } + + public Builder productId(String productId) { + this.productId = productId; + return this; + } + + public Builder side(OrderSide side) { + this.side = side; + return this; + } + + public Builder avgPrice(String avgPrice) { + this.avgPrice = avgPrice; + return this; + } + + public Builder baseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + return this; + } + + public Builder quoteValue(String quoteValue) { + this.quoteValue = quoteValue; + return this; + } + + public Builder feesAllocated(String feesAllocated) { + this.feesAllocated = feesAllocated; + return this; + } + + public Builder status(AllocationStatus status) { + this.status = status; + return this; + } + + public Builder source(String source) { + this.source = source; + return this; + } + + public Builder orderIds(List orderIds) { + this.orderIds = orderIds; + return this; + } + + public Builder destinations(List destinations) { + this.destinations = destinations; + return this; + } + + public Builder nettingId(String nettingId) { + this.nettingId = nettingId; + return this; + } + + public Allocation build() { + return new Allocation(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AllocationLeg.java b/src/main/java/com/coinbase/prime/model/AllocationLeg.java index 7f64cea..6ec60f2 100644 --- a/src/main/java/com/coinbase/prime/model/AllocationLeg.java +++ b/src/main/java/com/coinbase/prime/model/AllocationLeg.java @@ -17,77 +17,80 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class AllocationLeg { - /** The ID of the portfolio of the allocation leg */ - @JsonProperty("allocation_leg_id") - private String allocationLegId; - - /** The ID of the destination portfolio of the allocation leg */ - @JsonProperty("destination_portfolio_id") - private String destinationPortfolioId; - - /** The amount size for the allocation leg */ - private String amount; - - public AllocationLeg() {} - - public AllocationLeg(Builder builder) { - this.allocationLegId = builder.allocationLegId; - this.destinationPortfolioId = builder.destinationPortfolioId; - this.amount = builder.amount; - } + /** + * The ID of the portfolio of the allocation leg + */ + @JsonProperty("allocation_leg_id") + private String allocationLegId; - public String getAllocationLegId() { - return allocationLegId; - } + /** + * The ID of the destination portfolio of the allocation leg + */ + @JsonProperty("destination_portfolio_id") + private String destinationPortfolioId; - public void setAllocationLegId(String allocationLegId) { - this.allocationLegId = allocationLegId; - } + /** + * The amount size for the allocation leg + */ + private String amount; - public String getDestinationPortfolioId() { - return destinationPortfolioId; - } + public AllocationLeg() { + } - public void setDestinationPortfolioId(String destinationPortfolioId) { - this.destinationPortfolioId = destinationPortfolioId; - } + public AllocationLeg(Builder builder) { + this.allocationLegId = builder.allocationLegId; + this.destinationPortfolioId = builder.destinationPortfolioId; + this.amount = builder.amount; + } + public String getAllocationLegId() { + return allocationLegId; + } - public String getAmount() { - return amount; - } + public void setAllocationLegId(String allocationLegId) { + this.allocationLegId = allocationLegId; + } + public String getDestinationPortfolioId() { + return destinationPortfolioId; + } - public void setAmount(String amount) { - this.amount = amount; - } + public void setDestinationPortfolioId(String destinationPortfolioId) { + this.destinationPortfolioId = destinationPortfolioId; + } + public String getAmount() { + return amount; + } - public static class Builder { - private String allocationLegId; + public void setAmount(String amount) { + this.amount = amount; + } + public static class Builder { + private String allocationLegId; - private String destinationPortfolioId; + private String destinationPortfolioId; - private String amount; + private String amount; - public Builder allocationLegId(String allocationLegId) { - this.allocationLegId = allocationLegId; - return this; - } + public Builder allocationLegId(String allocationLegId) { + this.allocationLegId = allocationLegId; + return this; + } - public Builder destinationPortfolioId(String destinationPortfolioId) { - this.destinationPortfolioId = destinationPortfolioId; - return this; - } + public Builder destinationPortfolioId(String destinationPortfolioId) { + this.destinationPortfolioId = destinationPortfolioId; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public AllocationLeg build() { - return new AllocationLeg(this); + public AllocationLeg build() { + return new AllocationLeg(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AmountDue.java b/src/main/java/com/coinbase/prime/model/AmountDue.java index 16f8af2..9bb4029 100644 --- a/src/main/java/com/coinbase/prime/model/AmountDue.java +++ b/src/main/java/com/coinbase/prime/model/AmountDue.java @@ -17,77 +17,80 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class AmountDue { - /** The currency this loan is due in */ - private String currency; - - /** The amount due */ - private String amount; - - /** The date this settlement is due, expressed in UTC */ - @JsonProperty("due_date") - private OffsetDateTime dueDate; - - public AmountDue() {} - - public AmountDue(Builder builder) { - this.currency = builder.currency; - this.amount = builder.amount; - this.dueDate = builder.dueDate; - } + /** + * The currency this loan is due in + */ + private String currency; - public String getCurrency() { - return currency; - } + /** + * The amount due + */ + private String amount; - public void setCurrency(String currency) { - this.currency = currency; - } + /** + * The date this settlement is due, expressed in UTC + */ + @JsonProperty("due_date") + private OffsetDateTime dueDate; - public String getAmount() { - return amount; - } + public AmountDue() { + } - public void setAmount(String amount) { - this.amount = amount; - } + public AmountDue(Builder builder) { + this.currency = builder.currency; + this.amount = builder.amount; + this.dueDate = builder.dueDate; + } + public String getCurrency() { + return currency; + } - public OffsetDateTime getDueDate() { - return dueDate; - } + public void setCurrency(String currency) { + this.currency = currency; + } + public String getAmount() { + return amount; + } - public void setDueDate(OffsetDateTime dueDate) { - this.dueDate = dueDate; - } + public void setAmount(String amount) { + this.amount = amount; + } + public OffsetDateTime getDueDate() { + return dueDate; + } - public static class Builder { - private String currency; + public void setDueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + } + public static class Builder { + private String currency; - private String amount; + private String amount; - private OffsetDateTime dueDate; + private OffsetDateTime dueDate; - public Builder currency(String currency) { - this.currency = currency; - return this; - } + public Builder currency(String currency) { + this.currency = currency; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = dueDate; - return this; - } + public Builder dueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + return this; + } - public AmountDue build() { - return new AmountDue(this); + public AmountDue build() { + return new AmountDue(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Asset.java b/src/main/java/com/coinbase/prime/model/Asset.java index f7a6a37..86462a2 100644 --- a/src/main/java/com/coinbase/prime/model/Asset.java +++ b/src/main/java/com/coinbase/prime/model/Asset.java @@ -17,136 +17,143 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.NetworkDetails; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Asset { - /** The name of the asset */ - private String name; - - /** The mutable series of letters used to identify the asset */ - private String symbol; - - /** The number of decimals supported for the asset */ - @JsonProperty("decimal_precision") - private String decimalPrecision; - - /** Indicates whether this asset can be traded */ - @JsonProperty("trading_supported") - private boolean tradingSupported; - - /** Base URL to our recommended block explorer (crypto only) */ - @JsonProperty("explorer_url") - private String explorerUrl; - - /** List of networks supported by this asset */ - private List networks; - - public Asset() {} - - public Asset(Builder builder) { - this.name = builder.name; - this.symbol = builder.symbol; - this.decimalPrecision = builder.decimalPrecision; - this.tradingSupported = builder.tradingSupported; - this.explorerUrl = builder.explorerUrl; - this.networks = builder.networks; - } + /** + * The name of the asset + */ + private String name; - public String getName() { - return name; - } + /** + * The mutable series of letters used to identify the asset + */ + private String symbol; - public void setName(String name) { - this.name = name; - } + /** + * The number of decimals supported for the asset + */ + @JsonProperty("decimal_precision") + private String decimalPrecision; - public String getSymbol() { - return symbol; - } + /** + * Indicates whether this asset can be traded + */ + @JsonProperty("trading_supported") + private boolean tradingSupported; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * Base URL to our recommended block explorer (crypto only) + */ + @JsonProperty("explorer_url") + private String explorerUrl; - public String getDecimalPrecision() { - return decimalPrecision; - } + /** + * List of networks supported by this asset + */ + private List networks; - public void setDecimalPrecision(String decimalPrecision) { - this.decimalPrecision = decimalPrecision; - } + public Asset() { + } - public boolean getTradingSupported() { - return tradingSupported; - } + public Asset(Builder builder) { + this.name = builder.name; + this.symbol = builder.symbol; + this.decimalPrecision = builder.decimalPrecision; + this.tradingSupported = builder.tradingSupported; + this.explorerUrl = builder.explorerUrl; + this.networks = builder.networks; + } + public String getName() { + return name; + } - public void setTradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - } + public void setName(String name) { + this.name = name; + } + public String getSymbol() { + return symbol; + } - public String getExplorerUrl() { - return explorerUrl; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getDecimalPrecision() { + return decimalPrecision; + } - public void setExplorerUrl(String explorerUrl) { - this.explorerUrl = explorerUrl; - } + public void setDecimalPrecision(String decimalPrecision) { + this.decimalPrecision = decimalPrecision; + } + public boolean getTradingSupported() { + return tradingSupported; + } - public List getNetworks() { - return networks; - } + public void setTradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + } + public String getExplorerUrl() { + return explorerUrl; + } - public void setNetworks(List networks) { - this.networks = networks; - } + public void setExplorerUrl(String explorerUrl) { + this.explorerUrl = explorerUrl; + } + public List getNetworks() { + return networks; + } - public static class Builder { - private String name; + public void setNetworks(List networks) { + this.networks = networks; + } + public static class Builder { + private String name; - private String symbol; + private String symbol; - private String decimalPrecision; + private String decimalPrecision; - private boolean tradingSupported; + private boolean tradingSupported; - private String explorerUrl; + private String explorerUrl; - private List networks; + private List networks; - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder decimalPrecision(String decimalPrecision) { - this.decimalPrecision = decimalPrecision; - return this; - } + public Builder decimalPrecision(String decimalPrecision) { + this.decimalPrecision = decimalPrecision; + return this; + } - public Builder tradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - return this; - } + public Builder tradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + return this; + } - public Builder explorerUrl(String explorerUrl) { - this.explorerUrl = explorerUrl; - return this; - } + public Builder explorerUrl(String explorerUrl) { + this.explorerUrl = explorerUrl; + return this; + } - public Builder networks(List networks) { - this.networks = networks; - return this; - } + public Builder networks(List networks) { + this.networks = networks; + return this; + } - public Asset build() { - return new Asset(this); + public Asset build() { + return new Asset(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AssetBalance.java b/src/main/java/com/coinbase/prime/model/AssetBalance.java index bab77eb..ffbc3b0 100644 --- a/src/main/java/com/coinbase/prime/model/AssetBalance.java +++ b/src/main/java/com/coinbase/prime/model/AssetBalance.java @@ -17,116 +17,121 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class AssetBalance { - /** The unique ID of the portfolio */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The currency symbol */ - private String symbol; - - /** Balance amount */ - private String amount; - - /** Notional balance amount */ - @JsonProperty("notional_amount") - private String notionalAmount; - - /** Conversion rate */ - @JsonProperty("conversion_rate") - private String conversionRate; - - public AssetBalance() {} - - public AssetBalance(Builder builder) { - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.amount = builder.amount; - this.notionalAmount = builder.notionalAmount; - this.conversionRate = builder.conversionRate; - } + /** + * The unique ID of the portfolio + */ + @JsonProperty("portfolio_id") + private String portfolioId; - public String getPortfolioId() { - return portfolioId; - } + /** + * The currency symbol + */ + private String symbol; - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } + /** + * Balance amount + */ + private String amount; - public String getSymbol() { - return symbol; - } + /** + * Notional balance amount + */ + @JsonProperty("notional_amount") + private String notionalAmount; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * Conversion rate + */ + @JsonProperty("conversion_rate") + private String conversionRate; - public String getAmount() { - return amount; - } + public AssetBalance() { + } - public void setAmount(String amount) { - this.amount = amount; - } + public AssetBalance(Builder builder) { + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.amount = builder.amount; + this.notionalAmount = builder.notionalAmount; + this.conversionRate = builder.conversionRate; + } + public String getPortfolioId() { + return portfolioId; + } - public String getNotionalAmount() { - return notionalAmount; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getSymbol() { + return symbol; + } - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getAmount() { + return amount; + } - public String getConversionRate() { - return conversionRate; - } + public void setAmount(String amount) { + this.amount = amount; + } + public String getNotionalAmount() { + return notionalAmount; + } - public void setConversionRate(String conversionRate) { - this.conversionRate = conversionRate; - } + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } + public String getConversionRate() { + return conversionRate; + } - public static class Builder { - private String portfolioId; + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } + public static class Builder { + private String portfolioId; - private String symbol; + private String symbol; - private String amount; + private String amount; - private String notionalAmount; + private String notionalAmount; - private String conversionRate; + private String conversionRate; - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; - } + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; + } - public Builder conversionRate(String conversionRate) { - this.conversionRate = conversionRate; - return this; - } + public Builder conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; + } - public AssetBalance build() { - return new AssetBalance(this); + public AssetBalance build() { + return new AssetBalance(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/AssetChange.java b/src/main/java/com/coinbase/prime/model/AssetChange.java index 32d43bf..bde8a45 100644 --- a/src/main/java/com/coinbase/prime/model/AssetChange.java +++ b/src/main/java/com/coinbase/prime/model/AssetChange.java @@ -17,111 +17,112 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.AssetChangeType; +import com.coinbase.prime.model.NftCollection; +import com.coinbase.prime.model.NftItem; public class AssetChange { - /** AssetChangeType identifies the type of asset change */ - private AssetChangeType type; - - /** The currency symbol associated with the balance operation */ - private String symbol; - - /** The amount in whole units being transferred or approved */ - private String amount; - - private NftCollection collection; - - private NftItem item; - - public AssetChange() {} - - public AssetChange(Builder builder) { - this.type = builder.type; - this.symbol = builder.symbol; - this.amount = builder.amount; - this.collection = builder.collection; - this.item = builder.item; - } + /** AssetChangeType identifies the type of asset change */ + private AssetChangeType type; - public AssetChangeType getType() { - return type; - } + /** + * The currency symbol associated with the balance operation + */ + private String symbol; - public void setType(AssetChangeType type) { - this.type = type; - } + /** + * The amount in whole units being transferred or approved + */ + private String amount; - public String getSymbol() { - return symbol; - } + private NftCollection collection; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + private NftItem item; - public String getAmount() { - return amount; - } + public AssetChange() { + } - public void setAmount(String amount) { - this.amount = amount; - } + public AssetChange(Builder builder) { + this.type = builder.type; + this.symbol = builder.symbol; + this.amount = builder.amount; + this.collection = builder.collection; + this.item = builder.item; + } + public AssetChangeType getType() { + return type; + } - public NftCollection getCollection() { - return collection; - } + public void setType(AssetChangeType type) { + this.type = type; + } + public String getSymbol() { + return symbol; + } - public void setCollection(NftCollection collection) { - this.collection = collection; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getAmount() { + return amount; + } - public NftItem getItem() { - return item; - } + public void setAmount(String amount) { + this.amount = amount; + } + public NftCollection getCollection() { + return collection; + } - public void setItem(NftItem item) { - this.item = item; - } + public void setCollection(NftCollection collection) { + this.collection = collection; + } + public NftItem getItem() { + return item; + } - public static class Builder { - private AssetChangeType type; + public void setItem(NftItem item) { + this.item = item; + } + public static class Builder { + private AssetChangeType type; - private String symbol; + private String symbol; - private String amount; + private String amount; - private NftCollection collection; + private NftCollection collection; - private NftItem item; + private NftItem item; - public Builder type(AssetChangeType type) { - this.type = type; - return this; - } + public Builder type(AssetChangeType type) { + this.type = type; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder collection(NftCollection collection) { - this.collection = collection; - return this; - } + public Builder collection(NftCollection collection) { + this.collection = collection; + return this; + } - public Builder item(NftItem item) { - this.item = item; - return this; - } + public Builder item(NftItem item) { + this.item = item; + return this; + } - public AssetChange build() { - return new AssetChange(this); + public AssetChange build() { + return new AssetChange(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Balance.java b/src/main/java/com/coinbase/prime/model/Balance.java index afd769a..668152a 100644 --- a/src/main/java/com/coinbase/prime/model/Balance.java +++ b/src/main/java/com/coinbase/prime/model/Balance.java @@ -17,304 +17,309 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class Balance { - /** The display symbol for the asset */ - private String symbol; - - /** 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 - */ - private String holds; - - /** - * Amount that is currently locked due to bonding/staking, potentially subject to an unbonding - * period, in whole units - */ - @JsonProperty("bonded_amount") - private String bondedAmount; - - /** Amount that must remain in the wallet due to the protocol, in whole units */ - @JsonProperty("reserved_amount") - private String reservedAmount; - - /** Amount that is in the process of unbonding, in whole units */ - @JsonProperty("unbonding_amount") - private String unbondingAmount; - - /** Unrealized amount subject to a vesting schedule, in whole units */ - @JsonProperty("unvested_amount") - private String unvestedAmount; - - /** Pending bonding/staking rewards that have not yet been realized, in whole units */ - @JsonProperty("pending_rewards_amount") - private String pendingRewardsAmount; - - /** Previously realized bonding/staking rewards, in whole units */ - @JsonProperty("past_rewards_amount") - private String pastRewardsAmount; - - /** Amount available for bonding/staking, in whole units */ - @JsonProperty("bondable_amount") - private String bondableAmount; - - /** Amount available to withdraw, in whole units */ - @JsonProperty("withdrawable_amount") - private String withdrawableAmount; - - /** The total amount in fiat unit */ - @JsonProperty("fiat_amount") - private String fiatAmount; - - /** Amount available for unbonding/unstaking, in whole units */ - @JsonProperty("unbondable_amount") - private String unbondableAmount; - - /** - * ETH staking rewards currently available to claim, in whole units. This field is returned only - * in GetWalletBalance responses for ETH wallets. It is omitted or empty for portfolio-level - * responses and for non-ETH assets; use pending_rewards_amount where applicable. - */ - @JsonProperty("claimable_rewards_amount") - private String claimableRewardsAmount; - - public Balance() {} - - public Balance(Builder builder) { - this.symbol = builder.symbol; - this.amount = builder.amount; - this.holds = builder.holds; - this.bondedAmount = builder.bondedAmount; - this.reservedAmount = builder.reservedAmount; - this.unbondingAmount = builder.unbondingAmount; - this.unvestedAmount = builder.unvestedAmount; - this.pendingRewardsAmount = builder.pendingRewardsAmount; - this.pastRewardsAmount = builder.pastRewardsAmount; - this.bondableAmount = builder.bondableAmount; - this.withdrawableAmount = builder.withdrawableAmount; - this.fiatAmount = builder.fiatAmount; - this.unbondableAmount = builder.unbondableAmount; - this.claimableRewardsAmount = builder.claimableRewardsAmount; - } - - 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 getHolds() { - return holds; - } - - public void setHolds(String holds) { - this.holds = holds; - } - - public String getBondedAmount() { - return bondedAmount; - } - - public void setBondedAmount(String bondedAmount) { - this.bondedAmount = bondedAmount; - } - - public String getReservedAmount() { - return reservedAmount; - } - - public void setReservedAmount(String reservedAmount) { - this.reservedAmount = reservedAmount; - } - - public String getUnbondingAmount() { - return unbondingAmount; - } - - public void setUnbondingAmount(String unbondingAmount) { - this.unbondingAmount = unbondingAmount; - } - - public String getUnvestedAmount() { - return unvestedAmount; - } - - public void setUnvestedAmount(String unvestedAmount) { - this.unvestedAmount = unvestedAmount; - } - - public String getPendingRewardsAmount() { - return pendingRewardsAmount; - } - - public void setPendingRewardsAmount(String pendingRewardsAmount) { - this.pendingRewardsAmount = pendingRewardsAmount; - } - - public String getPastRewardsAmount() { - return pastRewardsAmount; - } - - public void setPastRewardsAmount(String pastRewardsAmount) { - this.pastRewardsAmount = pastRewardsAmount; - } - - public String getBondableAmount() { - return bondableAmount; - } - - public void setBondableAmount(String bondableAmount) { - this.bondableAmount = bondableAmount; - } - - public String getWithdrawableAmount() { - return withdrawableAmount; - } - - public void setWithdrawableAmount(String withdrawableAmount) { - this.withdrawableAmount = withdrawableAmount; - } - - public String getFiatAmount() { - return fiatAmount; - } - - public void setFiatAmount(String fiatAmount) { - this.fiatAmount = fiatAmount; - } - - public String getUnbondableAmount() { - return unbondableAmount; - } - - public void setUnbondableAmount(String unbondableAmount) { - this.unbondableAmount = unbondableAmount; - } - - public String getClaimableRewardsAmount() { - return claimableRewardsAmount; - } - - public void setClaimableRewardsAmount(String claimableRewardsAmount) { - this.claimableRewardsAmount = claimableRewardsAmount; - } - - public static class Builder { + /** + * The display symbol for the asset + */ private String symbol; + /** + * 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 + */ private String holds; + /** + * Amount that is currently locked due to bonding/staking, potentially subject to an unbonding period, in whole units + */ + @JsonProperty("bonded_amount") private String bondedAmount; + /** + * Amount that must remain in the wallet due to the protocol, in whole units + */ + @JsonProperty("reserved_amount") private String reservedAmount; + /** + * Amount that is in the process of unbonding, in whole units + */ + @JsonProperty("unbonding_amount") private String unbondingAmount; + /** + * Unrealized amount subject to a vesting schedule, in whole units + */ + @JsonProperty("unvested_amount") private String unvestedAmount; + /** + * Pending bonding/staking rewards that have not yet been realized, in whole units + */ + @JsonProperty("pending_rewards_amount") private String pendingRewardsAmount; + /** + * Previously realized bonding/staking rewards, in whole units + */ + @JsonProperty("past_rewards_amount") private String pastRewardsAmount; + /** + * Amount available for bonding/staking, in whole units + */ + @JsonProperty("bondable_amount") private String bondableAmount; + /** + * Amount available to withdraw, in whole units + */ + @JsonProperty("withdrawable_amount") private String withdrawableAmount; + /** + * The total amount in fiat unit + */ + @JsonProperty("fiat_amount") private String fiatAmount; + /** + * Amount available for unbonding/unstaking, in whole units + */ + @JsonProperty("unbondable_amount") private String unbondableAmount; + /** + * ETH staking rewards currently available to claim, in whole units. This field is returned only in GetWalletBalance responses for ETH wallets. It is omitted or empty for portfolio-level responses and for non-ETH assets; use pending_rewards_amount where applicable. + */ + @JsonProperty("claimable_rewards_amount") private String claimableRewardsAmount; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; + public Balance() { } - public Builder amount(String amount) { - this.amount = amount; - return this; + public Balance(Builder builder) { + this.symbol = builder.symbol; + this.amount = builder.amount; + this.holds = builder.holds; + this.bondedAmount = builder.bondedAmount; + this.reservedAmount = builder.reservedAmount; + this.unbondingAmount = builder.unbondingAmount; + this.unvestedAmount = builder.unvestedAmount; + this.pendingRewardsAmount = builder.pendingRewardsAmount; + this.pastRewardsAmount = builder.pastRewardsAmount; + this.bondableAmount = builder.bondableAmount; + this.withdrawableAmount = builder.withdrawableAmount; + this.fiatAmount = builder.fiatAmount; + this.unbondableAmount = builder.unbondableAmount; + this.claimableRewardsAmount = builder.claimableRewardsAmount; + } + 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 getHolds() { + return holds; } - public Builder holds(String holds) { - this.holds = holds; - return this; + public void setHolds(String holds) { + this.holds = holds; + } + public String getBondedAmount() { + return bondedAmount; } - public Builder bondedAmount(String bondedAmount) { - this.bondedAmount = bondedAmount; - return this; + public void setBondedAmount(String bondedAmount) { + this.bondedAmount = bondedAmount; + } + public String getReservedAmount() { + return reservedAmount; } - public Builder reservedAmount(String reservedAmount) { - this.reservedAmount = reservedAmount; - return this; + public void setReservedAmount(String reservedAmount) { + this.reservedAmount = reservedAmount; + } + public String getUnbondingAmount() { + return unbondingAmount; } - public Builder unbondingAmount(String unbondingAmount) { - this.unbondingAmount = unbondingAmount; - return this; + public void setUnbondingAmount(String unbondingAmount) { + this.unbondingAmount = unbondingAmount; + } + public String getUnvestedAmount() { + return unvestedAmount; } - public Builder unvestedAmount(String unvestedAmount) { - this.unvestedAmount = unvestedAmount; - return this; + public void setUnvestedAmount(String unvestedAmount) { + this.unvestedAmount = unvestedAmount; + } + public String getPendingRewardsAmount() { + return pendingRewardsAmount; } - public Builder pendingRewardsAmount(String pendingRewardsAmount) { - this.pendingRewardsAmount = pendingRewardsAmount; - return this; + public void setPendingRewardsAmount(String pendingRewardsAmount) { + this.pendingRewardsAmount = pendingRewardsAmount; + } + public String getPastRewardsAmount() { + return pastRewardsAmount; } - public Builder pastRewardsAmount(String pastRewardsAmount) { - this.pastRewardsAmount = pastRewardsAmount; - return this; + public void setPastRewardsAmount(String pastRewardsAmount) { + this.pastRewardsAmount = pastRewardsAmount; + } + public String getBondableAmount() { + return bondableAmount; } - public Builder bondableAmount(String bondableAmount) { - this.bondableAmount = bondableAmount; - return this; + public void setBondableAmount(String bondableAmount) { + this.bondableAmount = bondableAmount; + } + public String getWithdrawableAmount() { + return withdrawableAmount; } - public Builder withdrawableAmount(String withdrawableAmount) { - this.withdrawableAmount = withdrawableAmount; - return this; + public void setWithdrawableAmount(String withdrawableAmount) { + this.withdrawableAmount = withdrawableAmount; + } + public String getFiatAmount() { + return fiatAmount; } - public Builder fiatAmount(String fiatAmount) { - this.fiatAmount = fiatAmount; - return this; + public void setFiatAmount(String fiatAmount) { + this.fiatAmount = fiatAmount; + } + public String getUnbondableAmount() { + return unbondableAmount; } - public Builder unbondableAmount(String unbondableAmount) { - this.unbondableAmount = unbondableAmount; - return this; + public void setUnbondableAmount(String unbondableAmount) { + this.unbondableAmount = unbondableAmount; + } + public String getClaimableRewardsAmount() { + return claimableRewardsAmount; } - public Builder claimableRewardsAmount(String claimableRewardsAmount) { - this.claimableRewardsAmount = claimableRewardsAmount; - return this; + public void setClaimableRewardsAmount(String claimableRewardsAmount) { + this.claimableRewardsAmount = claimableRewardsAmount; } + public static class Builder { + private String symbol; + + private String amount; + + private String holds; - public Balance build() { - return new Balance(this); + private String bondedAmount; + + private String reservedAmount; + + private String unbondingAmount; + + private String unvestedAmount; + + private String pendingRewardsAmount; + + private String pastRewardsAmount; + + private String bondableAmount; + + private String withdrawableAmount; + + private String fiatAmount; + + private String unbondableAmount; + + private String claimableRewardsAmount; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder holds(String holds) { + this.holds = holds; + return this; + } + + public Builder bondedAmount(String bondedAmount) { + this.bondedAmount = bondedAmount; + return this; + } + + public Builder reservedAmount(String reservedAmount) { + this.reservedAmount = reservedAmount; + return this; + } + + public Builder unbondingAmount(String unbondingAmount) { + this.unbondingAmount = unbondingAmount; + return this; + } + + public Builder unvestedAmount(String unvestedAmount) { + this.unvestedAmount = unvestedAmount; + return this; + } + + public Builder pendingRewardsAmount(String pendingRewardsAmount) { + this.pendingRewardsAmount = pendingRewardsAmount; + return this; + } + + public Builder pastRewardsAmount(String pastRewardsAmount) { + this.pastRewardsAmount = pastRewardsAmount; + return this; + } + + public Builder bondableAmount(String bondableAmount) { + this.bondableAmount = bondableAmount; + return this; + } + + public Builder withdrawableAmount(String withdrawableAmount) { + this.withdrawableAmount = withdrawableAmount; + return this; + } + + public Builder fiatAmount(String fiatAmount) { + this.fiatAmount = fiatAmount; + return this; + } + + public Builder unbondableAmount(String unbondableAmount) { + this.unbondableAmount = unbondableAmount; + return this; + } + + public Builder claimableRewardsAmount(String claimableRewardsAmount) { + this.claimableRewardsAmount = claimableRewardsAmount; + return this; + } + + public Balance build() { + return new Balance(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java index f53a2ec..8a07e94 100644 --- a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java +++ b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java @@ -17,101 +17,100 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** BlindMatchMetadata contains metadata specific to blind match advanced transfers. */ public class BlindMatchMetadata { - @JsonProperty("reference_id") - private String referenceId; - - /** The intended time of Transfer settlement in YYYYMMDD format */ - @JsonProperty("settlement_date") - private String settlementDate; - - /** Optional date of the original Trade in YYYYMMMDD format */ - @JsonProperty("trade_date") - private String tradeDate; - - /** - * Optional time of transfer settlement in HHMM format in UTC. If not provided, it defaults to - * 09:30 Eastern Time. - */ - @JsonProperty("settlement_time") - private String settlementTime; - - public BlindMatchMetadata() {} - - public BlindMatchMetadata(Builder builder) { - this.referenceId = builder.referenceId; - this.settlementDate = builder.settlementDate; - this.tradeDate = builder.tradeDate; - this.settlementTime = builder.settlementTime; - } - - public String getReferenceId() { - return referenceId; - } - - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - - public String getSettlementDate() { - return settlementDate; - } - - public void setSettlementDate(String settlementDate) { - this.settlementDate = settlementDate; - } - - public String getTradeDate() { - return tradeDate; - } - - public void setTradeDate(String tradeDate) { - this.tradeDate = tradeDate; - } - - public String getSettlementTime() { - return settlementTime; - } - - public void setSettlementTime(String settlementTime) { - this.settlementTime = settlementTime; - } - - public static class Builder { + @JsonProperty("reference_id") private String referenceId; + /** + * The intended time of Transfer settlement in YYYYMMDD format + */ + @JsonProperty("settlement_date") private String settlementDate; + /** + * Optional date of the original Trade in YYYYMMMDD format + */ + @JsonProperty("trade_date") private String tradeDate; + /** + * Optional time of transfer settlement in HHMM format in UTC. If not provided, it defaults to 09:30 Eastern Time. + */ + @JsonProperty("settlement_time") private String settlementTime; - public Builder referenceId(String referenceId) { - this.referenceId = referenceId; - return this; + public BlindMatchMetadata() { } - public Builder settlementDate(String settlementDate) { - this.settlementDate = settlementDate; - return this; + public BlindMatchMetadata(Builder builder) { + this.referenceId = builder.referenceId; + this.settlementDate = builder.settlementDate; + this.tradeDate = builder.tradeDate; + this.settlementTime = builder.settlementTime; + } + public String getReferenceId() { + return referenceId; } - public Builder tradeDate(String tradeDate) { - this.tradeDate = tradeDate; - return this; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + public String getSettlementDate() { + return settlementDate; } - public Builder settlementTime(String settlementTime) { - this.settlementTime = settlementTime; - return this; + public void setSettlementDate(String settlementDate) { + this.settlementDate = settlementDate; + } + public String getTradeDate() { + return tradeDate; } - public BlindMatchMetadata build() { - return new BlindMatchMetadata(this); + public void setTradeDate(String tradeDate) { + this.tradeDate = tradeDate; + } + public String getSettlementTime() { + return settlementTime; + } + + public void setSettlementTime(String settlementTime) { + this.settlementTime = settlementTime; + } + public static class Builder { + private String referenceId; + + private String settlementDate; + + private String tradeDate; + + private String settlementTime; + + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } + + public Builder settlementDate(String settlementDate) { + this.settlementDate = settlementDate; + return this; + } + + public Builder tradeDate(String tradeDate) { + this.tradeDate = tradeDate; + return this; + } + + public Builder settlementTime(String settlementTime) { + this.settlementTime = settlementTime; + return this; + } + + public BlindMatchMetadata build() { + return new BlindMatchMetadata(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java index 6e55858..a07667e 100644 --- a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java +++ b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java @@ -17,75 +17,77 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.Network; import com.fasterxml.jackson.annotation.JsonProperty; public class BlockchainAddress { - /** The address on the network */ - private String address; - - /** The account identifier (used on some chains to distinguish accounts using the same address) */ - @JsonProperty("account_identifier") - private String accountIdentifier; - - private Network network; - - public BlockchainAddress() {} - - public BlockchainAddress(Builder builder) { - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - this.network = builder.network; - } + /** + * The address on the network + */ + private String address; - public String getAddress() { - return address; - } + /** + * The account identifier (used on some chains to distinguish accounts using the same address) + */ + @JsonProperty("account_identifier") + private String accountIdentifier; - public void setAddress(String address) { - this.address = address; - } + private Network network; - public String getAccountIdentifier() { - return accountIdentifier; - } + public BlockchainAddress() { + } - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } + public BlockchainAddress(Builder builder) { + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + this.network = builder.network; + } + public String getAddress() { + return address; + } - public Network getNetwork() { - return network; - } + public void setAddress(String address) { + this.address = address; + } + public String getAccountIdentifier() { + return accountIdentifier; + } - public void setNetwork(Network network) { - this.network = network; - } + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } + public Network getNetwork() { + return network; + } - public static class Builder { - private String address; + public void setNetwork(Network network) { + this.network = network; + } + public static class Builder { + private String address; - private String accountIdentifier; + private String accountIdentifier; - private Network network; + private Network network; - public Builder address(String address) { - this.address = address; - return this; - } + public Builder address(String address) { + this.address = address; + return this; + } - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; - } + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; + } - public Builder network(Network network) { - this.network = network; - return this; - } + public Builder network(Network network) { + this.network = network; + return this; + } - public BlockchainAddress build() { - return new BlockchainAddress(this); + public BlockchainAddress build() { + return new BlockchainAddress(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/BuyingPower.java b/src/main/java/com/coinbase/prime/model/BuyingPower.java index 10db8ca..b0ffa81 100644 --- a/src/main/java/com/coinbase/prime/model/BuyingPower.java +++ b/src/main/java/com/coinbase/prime/model/BuyingPower.java @@ -17,118 +17,123 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class BuyingPower { - /** The unique ID of the portfolio */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The symbol for the base currency */ - @JsonProperty("base_currency") - private String baseCurrency; - - /** The symbol for the quote currency */ - @JsonProperty("quote_currency") - private String quoteCurrency; - - /** The buying power for the base currency */ - @JsonProperty("base_buying_power") - private String baseBuyingPower; - - /** The buying power for the quote currency */ - @JsonProperty("quote_buying_power") - private String quoteBuyingPower; - - public BuyingPower() {} - - public BuyingPower(Builder builder) { - this.portfolioId = builder.portfolioId; - this.baseCurrency = builder.baseCurrency; - this.quoteCurrency = builder.quoteCurrency; - this.baseBuyingPower = builder.baseBuyingPower; - this.quoteBuyingPower = builder.quoteBuyingPower; - } + /** + * The unique ID of the portfolio + */ + @JsonProperty("portfolio_id") + private String portfolioId; - public String getPortfolioId() { - return portfolioId; - } + /** + * The symbol for the base currency + */ + @JsonProperty("base_currency") + private String baseCurrency; - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } + /** + * The symbol for the quote currency + */ + @JsonProperty("quote_currency") + private String quoteCurrency; - public String getBaseCurrency() { - return baseCurrency; - } + /** + * The buying power for the base currency + */ + @JsonProperty("base_buying_power") + private String baseBuyingPower; - public void setBaseCurrency(String baseCurrency) { - this.baseCurrency = baseCurrency; - } + /** + * The buying power for the quote currency + */ + @JsonProperty("quote_buying_power") + private String quoteBuyingPower; - public String getQuoteCurrency() { - return quoteCurrency; - } + public BuyingPower() { + } - public void setQuoteCurrency(String quoteCurrency) { - this.quoteCurrency = quoteCurrency; - } + public BuyingPower(Builder builder) { + this.portfolioId = builder.portfolioId; + this.baseCurrency = builder.baseCurrency; + this.quoteCurrency = builder.quoteCurrency; + this.baseBuyingPower = builder.baseBuyingPower; + this.quoteBuyingPower = builder.quoteBuyingPower; + } + public String getPortfolioId() { + return portfolioId; + } - public String getBaseBuyingPower() { - return baseBuyingPower; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getBaseCurrency() { + return baseCurrency; + } - public void setBaseBuyingPower(String baseBuyingPower) { - this.baseBuyingPower = baseBuyingPower; - } + public void setBaseCurrency(String baseCurrency) { + this.baseCurrency = baseCurrency; + } + public String getQuoteCurrency() { + return quoteCurrency; + } - public String getQuoteBuyingPower() { - return quoteBuyingPower; - } + public void setQuoteCurrency(String quoteCurrency) { + this.quoteCurrency = quoteCurrency; + } + public String getBaseBuyingPower() { + return baseBuyingPower; + } - public void setQuoteBuyingPower(String quoteBuyingPower) { - this.quoteBuyingPower = quoteBuyingPower; - } + public void setBaseBuyingPower(String baseBuyingPower) { + this.baseBuyingPower = baseBuyingPower; + } + public String getQuoteBuyingPower() { + return quoteBuyingPower; + } - public static class Builder { - private String portfolioId; + public void setQuoteBuyingPower(String quoteBuyingPower) { + this.quoteBuyingPower = quoteBuyingPower; + } + public static class Builder { + private String portfolioId; - private String baseCurrency; + private String baseCurrency; - private String quoteCurrency; + private String quoteCurrency; - private String baseBuyingPower; + private String baseBuyingPower; - private String quoteBuyingPower; + private String quoteBuyingPower; - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } - public Builder baseCurrency(String baseCurrency) { - this.baseCurrency = baseCurrency; - return this; - } + public Builder baseCurrency(String baseCurrency) { + this.baseCurrency = baseCurrency; + return this; + } - public Builder quoteCurrency(String quoteCurrency) { - this.quoteCurrency = quoteCurrency; - return this; - } + public Builder quoteCurrency(String quoteCurrency) { + this.quoteCurrency = quoteCurrency; + return this; + } - public Builder baseBuyingPower(String baseBuyingPower) { - this.baseBuyingPower = baseBuyingPower; - return this; - } + public Builder baseBuyingPower(String baseBuyingPower) { + this.baseBuyingPower = baseBuyingPower; + return this; + } - public Builder quoteBuyingPower(String quoteBuyingPower) { - this.quoteBuyingPower = quoteBuyingPower; - return this; - } + public Builder quoteBuyingPower(String quoteBuyingPower) { + this.quoteBuyingPower = quoteBuyingPower; + return this; + } - public BuyingPower build() { - return new BuyingPower(this); + public BuyingPower build() { + return new BuyingPower(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Candle.java b/src/main/java/com/coinbase/prime/model/Candle.java index 5594bd2..09975bf 100644 --- a/src/main/java/com/coinbase/prime/model/Candle.java +++ b/src/main/java/com/coinbase/prime/model/Candle.java @@ -17,133 +17,137 @@ */ package com.coinbase.prime.model; - import java.time.OffsetDateTime; /** Represents a single candle data point */ public class Candle { - /** Timestamp for the start of the candle period */ - private OffsetDateTime timestamp; - - /** Opening price for the period */ - private String open; - - /** Highest price during the period */ - private String high; - - /** Lowest price during the period */ - private String low; - - /** Closing price for the period */ - private String close; - - /** Volume traded during the period */ - private String volume; - - public Candle() {} - - public Candle(Builder builder) { - this.timestamp = builder.timestamp; - this.open = builder.open; - this.high = builder.high; - this.low = builder.low; - this.close = builder.close; - this.volume = builder.volume; - } + /** Timestamp for the start of the candle period */ + private OffsetDateTime timestamp; - public OffsetDateTime getTimestamp() { - return timestamp; - } + /** + * Opening price for the period + */ + private String open; - public void setTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - } + /** + * Highest price during the period + */ + private String high; - public String getOpen() { - return open; - } + /** + * Lowest price during the period + */ + private String low; - public void setOpen(String open) { - this.open = open; - } + /** + * Closing price for the period + */ + private String close; - public String getHigh() { - return high; - } + /** + * Volume traded during the period + */ + private String volume; - public void setHigh(String high) { - this.high = high; - } + public Candle() { + } - public String getLow() { - return low; - } + public Candle(Builder builder) { + this.timestamp = builder.timestamp; + this.open = builder.open; + this.high = builder.high; + this.low = builder.low; + this.close = builder.close; + this.volume = builder.volume; + } + public OffsetDateTime getTimestamp() { + return timestamp; + } - public void setLow(String low) { - this.low = low; - } + public void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + public String getOpen() { + return open; + } - public String getClose() { - return close; - } + public void setOpen(String open) { + this.open = open; + } + public String getHigh() { + return high; + } - public void setClose(String close) { - this.close = close; - } + public void setHigh(String high) { + this.high = high; + } + public String getLow() { + return low; + } - public String getVolume() { - return volume; - } + public void setLow(String low) { + this.low = low; + } + public String getClose() { + return close; + } - public void setVolume(String volume) { - this.volume = volume; - } + public void setClose(String close) { + this.close = close; + } + public String getVolume() { + return volume; + } - public static class Builder { - private OffsetDateTime timestamp; + public void setVolume(String volume) { + this.volume = volume; + } + public static class Builder { + private OffsetDateTime timestamp; - private String open; + private String open; - private String high; + private String high; - private String low; + private String low; - private String close; + private String close; - private String volume; + private String volume; - public Builder timestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - return this; - } + public Builder timestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } - public Builder open(String open) { - this.open = open; - return this; - } + public Builder open(String open) { + this.open = open; + return this; + } - public Builder high(String high) { - this.high = high; - return this; - } + public Builder high(String high) { + this.high = high; + return this; + } - public Builder low(String low) { - this.low = low; - return this; - } + public Builder low(String low) { + this.low = low; + return this; + } - public Builder close(String close) { - this.close = close; - return this; - } + public Builder close(String close) { + this.close = close; + return this; + } - public Builder volume(String volume) { - this.volume = volume; - return this; - } + public Builder volume(String volume) { + this.volume = volume; + return this; + } - public Candle build() { - return new Candle(this); + public Candle build() { + return new Candle(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Commission.java b/src/main/java/com/coinbase/prime/model/Commission.java index 2e6ec81..f57238d 100644 --- a/src/main/java/com/coinbase/prime/model/Commission.java +++ b/src/main/java/com/coinbase/prime/model/Commission.java @@ -17,76 +17,79 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class Commission { - /** Fee model (all_in or cost_plus) */ - private String type; - - /** 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) */ - @JsonProperty("trading_volume") - private String tradingVolume; - - public Commission() {} - - public Commission(Builder builder) { - this.type = builder.type; - this.rate = builder.rate; - this.tradingVolume = builder.tradingVolume; - } + /** + * Fee model (all_in or cost_plus) + */ + private String type; - public String getType() { - return type; - } + /** + * Commission rate (in whole percentage. Commission of 15bps is \"0.0015\") + */ + private String rate; - public void setType(String type) { - this.type = type; - } + /** + * Average 30 days over past 3 months (e.g. 90 days divided by 3) + */ + @JsonProperty("trading_volume") + private String tradingVolume; - public String getRate() { - return rate; - } + public Commission() { + } - public void setRate(String rate) { - this.rate = rate; - } + public Commission(Builder builder) { + this.type = builder.type; + this.rate = builder.rate; + this.tradingVolume = builder.tradingVolume; + } + public String getType() { + return type; + } - public String getTradingVolume() { - return tradingVolume; - } + public void setType(String type) { + this.type = type; + } + public String getRate() { + return rate; + } - public void setTradingVolume(String tradingVolume) { - this.tradingVolume = tradingVolume; - } + public void setRate(String rate) { + this.rate = rate; + } + public String getTradingVolume() { + return tradingVolume; + } - public static class Builder { - private String type; + public void setTradingVolume(String tradingVolume) { + this.tradingVolume = tradingVolume; + } + public static class Builder { + private String type; - private String rate; + private String rate; - private String tradingVolume; + private String tradingVolume; - public Builder type(String type) { - this.type = type; - return this; - } + public Builder type(String type) { + this.type = type; + return this; + } - public Builder rate(String rate) { - this.rate = rate; - return this; - } + public Builder rate(String rate) { + this.rate = rate; + return this; + } - public Builder tradingVolume(String tradingVolume) { - this.tradingVolume = tradingVolume; - return this; - } + public Builder tradingVolume(String tradingVolume) { + this.tradingVolume = tradingVolume; + return this; + } - public Commission build() { - return new Commission(this); + public Commission build() { + return new Commission(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java index dd68544..b9b6d2c 100644 --- a/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java +++ b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java @@ -17,161 +17,162 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class CommissionDetailTotal { - /** - * Total commission amount charged for the order This is the sum of all commission charged on the - * order - */ - @JsonProperty("total_commission") - private String totalCommission; - - /** CB fee */ - @JsonProperty("client_commission") - private String clientCommission; - - /** Exchange fees */ - @JsonProperty("venue_commission") - private String venueCommission; - - /** CES Commission */ - @JsonProperty("ces_commission") - private String cesCommission; - - /** Financing Commission */ - @JsonProperty("financing_commission") - private String financingCommission; - - /** NFA fees */ - @JsonProperty("regulatory_commission") - private String regulatoryCommission; - - /** Clearing fees */ - @JsonProperty("clearing_commission") - private String clearingCommission; - - public CommissionDetailTotal() {} - - public CommissionDetailTotal(Builder builder) { - this.totalCommission = builder.totalCommission; - this.clientCommission = builder.clientCommission; - this.venueCommission = builder.venueCommission; - this.cesCommission = builder.cesCommission; - this.financingCommission = builder.financingCommission; - this.regulatoryCommission = builder.regulatoryCommission; - this.clearingCommission = builder.clearingCommission; - } - - public String getTotalCommission() { - return totalCommission; - } - - public void setTotalCommission(String totalCommission) { - this.totalCommission = totalCommission; - } - - public String getClientCommission() { - return clientCommission; - } - - public void setClientCommission(String clientCommission) { - this.clientCommission = clientCommission; - } - - public String getVenueCommission() { - return venueCommission; - } - - public void setVenueCommission(String venueCommission) { - this.venueCommission = venueCommission; - } - - public String getCesCommission() { - return cesCommission; - } - - public void setCesCommission(String cesCommission) { - this.cesCommission = cesCommission; - } - - public String getFinancingCommission() { - return financingCommission; - } - - public void setFinancingCommission(String financingCommission) { - this.financingCommission = financingCommission; - } - - public String getRegulatoryCommission() { - return regulatoryCommission; - } - - public void setRegulatoryCommission(String regulatoryCommission) { - this.regulatoryCommission = regulatoryCommission; - } - - public String getClearingCommission() { - return clearingCommission; - } - - public void setClearingCommission(String clearingCommission) { - this.clearingCommission = clearingCommission; - } - - public static class Builder { + /** + * Total commission amount charged for the order + * This is the sum of all commission charged on the order + */ + @JsonProperty("total_commission") private String totalCommission; + /** + * CB fee + */ + @JsonProperty("client_commission") private String clientCommission; + /** + * Exchange fees + */ + @JsonProperty("venue_commission") private String venueCommission; + /** CES Commission */ + @JsonProperty("ces_commission") private String cesCommission; + /** Financing Commission */ + @JsonProperty("financing_commission") private String financingCommission; + /** + * NFA fees + */ + @JsonProperty("regulatory_commission") private String regulatoryCommission; + /** + * Clearing fees + */ + @JsonProperty("clearing_commission") private String clearingCommission; - public Builder totalCommission(String totalCommission) { - this.totalCommission = totalCommission; - return this; + public CommissionDetailTotal() { } - public Builder clientCommission(String clientCommission) { - this.clientCommission = clientCommission; - return this; + public CommissionDetailTotal(Builder builder) { + this.totalCommission = builder.totalCommission; + this.clientCommission = builder.clientCommission; + this.venueCommission = builder.venueCommission; + this.cesCommission = builder.cesCommission; + this.financingCommission = builder.financingCommission; + this.regulatoryCommission = builder.regulatoryCommission; + this.clearingCommission = builder.clearingCommission; + } + public String getTotalCommission() { + return totalCommission; } - public Builder venueCommission(String venueCommission) { - this.venueCommission = venueCommission; - return this; + public void setTotalCommission(String totalCommission) { + this.totalCommission = totalCommission; + } + public String getClientCommission() { + return clientCommission; } - public Builder cesCommission(String cesCommission) { - this.cesCommission = cesCommission; - return this; + public void setClientCommission(String clientCommission) { + this.clientCommission = clientCommission; + } + public String getVenueCommission() { + return venueCommission; } - public Builder financingCommission(String financingCommission) { - this.financingCommission = financingCommission; - return this; + public void setVenueCommission(String venueCommission) { + this.venueCommission = venueCommission; + } + public String getCesCommission() { + return cesCommission; } - public Builder regulatoryCommission(String regulatoryCommission) { - this.regulatoryCommission = regulatoryCommission; - return this; + public void setCesCommission(String cesCommission) { + this.cesCommission = cesCommission; + } + public String getFinancingCommission() { + return financingCommission; } - public Builder clearingCommission(String clearingCommission) { - this.clearingCommission = clearingCommission; - return this; + public void setFinancingCommission(String financingCommission) { + this.financingCommission = financingCommission; + } + public String getRegulatoryCommission() { + return regulatoryCommission; } - public CommissionDetailTotal build() { - return new CommissionDetailTotal(this); + public void setRegulatoryCommission(String regulatoryCommission) { + this.regulatoryCommission = regulatoryCommission; + } + public String getClearingCommission() { + return clearingCommission; + } + + public void setClearingCommission(String clearingCommission) { + this.clearingCommission = clearingCommission; + } + public static class Builder { + private String totalCommission; + + private String clientCommission; + + private String venueCommission; + + private String cesCommission; + + private String financingCommission; + + private String regulatoryCommission; + + private String clearingCommission; + + public Builder totalCommission(String totalCommission) { + this.totalCommission = totalCommission; + return this; + } + + public Builder clientCommission(String clientCommission) { + this.clientCommission = clientCommission; + return this; + } + + public Builder venueCommission(String venueCommission) { + this.venueCommission = venueCommission; + return this; + } + + public Builder cesCommission(String cesCommission) { + this.cesCommission = cesCommission; + return this; + } + + public Builder financingCommission(String financingCommission) { + this.financingCommission = financingCommission; + return this; + } + + public Builder regulatoryCommission(String regulatoryCommission) { + this.regulatoryCommission = regulatoryCommission; + return this; + } + + public Builder clearingCommission(String clearingCommission) { + this.clearingCommission = clearingCommission; + return this; + } + + public CommissionDetailTotal build() { + return new CommissionDetailTotal(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Conversion.java b/src/main/java/com/coinbase/prime/model/Conversion.java index f26ae77..6389647 100644 --- a/src/main/java/com/coinbase/prime/model/Conversion.java +++ b/src/main/java/com/coinbase/prime/model/Conversion.java @@ -17,98 +17,102 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.ConversionDetail; +import com.coinbase.prime.model.ShortCollateral; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Conversion { - /** Conversion details */ - @JsonProperty("conversion_details") - private List conversionDetails; - - @JsonProperty("short_collateral") - private ShortCollateral shortCollateral; - - /** The UTC date time used for conversion */ - @JsonProperty("conversion_datetime") - private String conversionDatetime; - - /** Portfolio Id */ - @JsonProperty("portfolio_id") - private String portfolioId; - - public Conversion() {} - - public Conversion(Builder builder) { - this.conversionDetails = builder.conversionDetails; - this.shortCollateral = builder.shortCollateral; - this.conversionDatetime = builder.conversionDatetime; - this.portfolioId = builder.portfolioId; - } + /** + * Conversion details + */ + @JsonProperty("conversion_details") + private List conversionDetails; - public List getConversionDetails() { - return conversionDetails; - } + @JsonProperty("short_collateral") + private ShortCollateral shortCollateral; - public void setConversionDetails(List conversionDetails) { - this.conversionDetails = conversionDetails; - } + /** + * The UTC date time used for conversion + */ + @JsonProperty("conversion_datetime") + private String conversionDatetime; - public ShortCollateral getShortCollateral() { - return shortCollateral; - } + /** + * Portfolio Id + */ + @JsonProperty("portfolio_id") + private String portfolioId; - public void setShortCollateral(ShortCollateral shortCollateral) { - this.shortCollateral = shortCollateral; - } + public Conversion() { + } - public String getConversionDatetime() { - return conversionDatetime; - } + public Conversion(Builder builder) { + this.conversionDetails = builder.conversionDetails; + this.shortCollateral = builder.shortCollateral; + this.conversionDatetime = builder.conversionDatetime; + this.portfolioId = builder.portfolioId; + } + public List getConversionDetails() { + return conversionDetails; + } - public void setConversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - } + public void setConversionDetails(List conversionDetails) { + this.conversionDetails = conversionDetails; + } + public ShortCollateral getShortCollateral() { + return shortCollateral; + } - public String getPortfolioId() { - return portfolioId; - } + public void setShortCollateral(ShortCollateral shortCollateral) { + this.shortCollateral = shortCollateral; + } + public String getConversionDatetime() { + return conversionDatetime; + } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } + public void setConversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + } + public String getPortfolioId() { + return portfolioId; + } - public static class Builder { - private List conversionDetails; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public static class Builder { + private List conversionDetails; - private ShortCollateral shortCollateral; + private ShortCollateral shortCollateral; - private String conversionDatetime; + private String conversionDatetime; - private String portfolioId; + private String portfolioId; - public Builder conversionDetails(List conversionDetails) { - this.conversionDetails = conversionDetails; - return this; - } + public Builder conversionDetails(List conversionDetails) { + this.conversionDetails = conversionDetails; + return this; + } - public Builder shortCollateral(ShortCollateral shortCollateral) { - this.shortCollateral = shortCollateral; - return this; - } + public Builder shortCollateral(ShortCollateral shortCollateral) { + this.shortCollateral = shortCollateral; + return this; + } - public Builder conversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - return this; - } + public Builder conversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + return this; + } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } - public Conversion build() { - return new Conversion(this); + public Conversion build() { + return new Conversion(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ConversionDetail.java b/src/main/java/com/coinbase/prime/model/ConversionDetail.java index b55b319..44f4920 100644 --- a/src/main/java/com/coinbase/prime/model/ConversionDetail.java +++ b/src/main/java/com/coinbase/prime/model/ConversionDetail.java @@ -17,157 +17,164 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class ConversionDetail { - /** The currency symbol */ - private String symbol; - - /** Trade finance balance after the conversion */ - @JsonProperty("tf_balance") - private String tfBalance; - - /** Notional trade finance balance after the conversion */ - @JsonProperty("notional_tf_balance") - private String notionalTfBalance; - - /** Converted balance */ - @JsonProperty("converted_balance") - private String convertedBalance; - - /** Notional converted balance */ - @JsonProperty("notional_converted_balance") - private String notionalConvertedBalance; - - /** Interest rate */ - @JsonProperty("interest_rate") - private String interestRate; - - /** Conversion rate */ - @JsonProperty("conversion_rate") - private String conversionRate; - - public ConversionDetail() {} - - public ConversionDetail(Builder builder) { - this.symbol = builder.symbol; - this.tfBalance = builder.tfBalance; - this.notionalTfBalance = builder.notionalTfBalance; - this.convertedBalance = builder.convertedBalance; - this.notionalConvertedBalance = builder.notionalConvertedBalance; - this.interestRate = builder.interestRate; - this.conversionRate = builder.conversionRate; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - public String getTfBalance() { - return tfBalance; - } - - public void setTfBalance(String tfBalance) { - this.tfBalance = tfBalance; - } - - public String getNotionalTfBalance() { - return notionalTfBalance; - } - - public void setNotionalTfBalance(String notionalTfBalance) { - this.notionalTfBalance = notionalTfBalance; - } - - public String getConvertedBalance() { - return convertedBalance; - } - - public void setConvertedBalance(String convertedBalance) { - this.convertedBalance = convertedBalance; - } - - public String getNotionalConvertedBalance() { - return notionalConvertedBalance; - } - - public void setNotionalConvertedBalance(String notionalConvertedBalance) { - this.notionalConvertedBalance = notionalConvertedBalance; - } - - public String getInterestRate() { - return interestRate; - } - - public void setInterestRate(String interestRate) { - this.interestRate = interestRate; - } - - public String getConversionRate() { - return conversionRate; - } - - public void setConversionRate(String conversionRate) { - this.conversionRate = conversionRate; - } - - public static class Builder { + /** + * The currency symbol + */ private String symbol; + /** + * Trade finance balance after the conversion + */ + @JsonProperty("tf_balance") private String tfBalance; + /** + * Notional trade finance balance after the conversion + */ + @JsonProperty("notional_tf_balance") private String notionalTfBalance; + /** + * Converted balance + */ + @JsonProperty("converted_balance") private String convertedBalance; + /** + * Notional converted balance + */ + @JsonProperty("notional_converted_balance") private String notionalConvertedBalance; + /** + * Interest rate + */ + @JsonProperty("interest_rate") private String interestRate; + /** + * Conversion rate + */ + @JsonProperty("conversion_rate") private String conversionRate; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; + public ConversionDetail() { } - public Builder tfBalance(String tfBalance) { - this.tfBalance = tfBalance; - return this; + public ConversionDetail(Builder builder) { + this.symbol = builder.symbol; + this.tfBalance = builder.tfBalance; + this.notionalTfBalance = builder.notionalTfBalance; + this.convertedBalance = builder.convertedBalance; + this.notionalConvertedBalance = builder.notionalConvertedBalance; + this.interestRate = builder.interestRate; + this.conversionRate = builder.conversionRate; + } + public String getSymbol() { + return symbol; } - public Builder notionalTfBalance(String notionalTfBalance) { - this.notionalTfBalance = notionalTfBalance; - return this; + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getTfBalance() { + return tfBalance; } - public Builder convertedBalance(String convertedBalance) { - this.convertedBalance = convertedBalance; - return this; + public void setTfBalance(String tfBalance) { + this.tfBalance = tfBalance; + } + public String getNotionalTfBalance() { + return notionalTfBalance; } - public Builder notionalConvertedBalance(String notionalConvertedBalance) { - this.notionalConvertedBalance = notionalConvertedBalance; - return this; + public void setNotionalTfBalance(String notionalTfBalance) { + this.notionalTfBalance = notionalTfBalance; + } + public String getConvertedBalance() { + return convertedBalance; } - public Builder interestRate(String interestRate) { - this.interestRate = interestRate; - return this; + public void setConvertedBalance(String convertedBalance) { + this.convertedBalance = convertedBalance; + } + public String getNotionalConvertedBalance() { + return notionalConvertedBalance; } - public Builder conversionRate(String conversionRate) { - this.conversionRate = conversionRate; - return this; + public void setNotionalConvertedBalance(String notionalConvertedBalance) { + this.notionalConvertedBalance = notionalConvertedBalance; + } + public String getInterestRate() { + return interestRate; } - public ConversionDetail build() { - return new ConversionDetail(this); + public void setInterestRate(String interestRate) { + this.interestRate = interestRate; + } + public String getConversionRate() { + return conversionRate; + } + + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } + public static class Builder { + private String symbol; + + private String tfBalance; + + private String notionalTfBalance; + + private String convertedBalance; + + private String notionalConvertedBalance; + + private String interestRate; + + private String conversionRate; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder tfBalance(String tfBalance) { + this.tfBalance = tfBalance; + return this; + } + + public Builder notionalTfBalance(String notionalTfBalance) { + this.notionalTfBalance = notionalTfBalance; + return this; + } + + public Builder convertedBalance(String convertedBalance) { + this.convertedBalance = convertedBalance; + return this; + } + + public Builder notionalConvertedBalance(String notionalConvertedBalance) { + this.notionalConvertedBalance = notionalConvertedBalance; + return this; + } + + public Builder interestRate(String interestRate) { + this.interestRate = interestRate; + return this; + } + + public Builder conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; + } + + public ConversionDetail build() { + return new ConversionDetail(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Counterparty.java b/src/main/java/com/coinbase/prime/model/Counterparty.java index 5aa627d..c64b2d6 100644 --- a/src/main/java/com/coinbase/prime/model/Counterparty.java +++ b/src/main/java/com/coinbase/prime/model/Counterparty.java @@ -17,38 +17,39 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class Counterparty { - /** The unique counterparty ID for the portfolio */ - @JsonProperty("counterparty_id") - private String counterpartyId; - - public Counterparty() {} - - public Counterparty(Builder builder) { - this.counterpartyId = builder.counterpartyId; - } - - public String getCounterpartyId() { - return counterpartyId; - } + /** + * The unique counterparty ID for the portfolio + */ + @JsonProperty("counterparty_id") + private String counterpartyId; - public void setCounterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - } + public Counterparty() { + } - public static class Builder { - private String counterpartyId; + public Counterparty(Builder builder) { + this.counterpartyId = builder.counterpartyId; + } + public String getCounterpartyId() { + return counterpartyId; + } - public Builder counterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - return this; + public void setCounterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; } + public static class Builder { + private String counterpartyId; - public Counterparty build() { - return new Counterparty(this); + public Builder counterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + return this; + } + + public Counterparty build() { + return new Counterparty(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java b/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java index 1d98213..c32c5c8 100644 --- a/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java +++ b/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java @@ -17,39 +17,38 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a destination for a counterparty payment */ public class CounterpartyDestination { - /** The counterparty ID to pay out */ - @JsonProperty("counterparty_id") - private String counterpartyId; - - public CounterpartyDestination() {} - - public CounterpartyDestination(Builder builder) { - this.counterpartyId = builder.counterpartyId; - } - - public String getCounterpartyId() { - return counterpartyId; - } + /** The counterparty ID to pay out */ + @JsonProperty("counterparty_id") + private String counterpartyId; - public void setCounterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - } + public CounterpartyDestination() { + } - public static class Builder { - private String counterpartyId; + public CounterpartyDestination(Builder builder) { + this.counterpartyId = builder.counterpartyId; + } + public String getCounterpartyId() { + return counterpartyId; + } - public Builder counterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - return this; + public void setCounterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; } + public static class Builder { + private String counterpartyId; - public CounterpartyDestination build() { - return new CounterpartyDestination(this); + public Builder counterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + return this; + } + + public CounterpartyDestination build() { + return new CounterpartyDestination(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java index 41b9f63..b20934d 100644 --- a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java @@ -17,77 +17,80 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class CreateAllocationResponseBody { - /** The success boolean for the post allocation */ - private boolean success; - - /** The allocation id for the post allocation */ - @JsonProperty("allocation_id") - private String allocationId; - - /** The failure reason for the post allocation */ - @JsonProperty("failure_reason") - private String failureReason; - - public CreateAllocationResponseBody() {} - - public CreateAllocationResponseBody(Builder builder) { - this.success = builder.success; - this.allocationId = builder.allocationId; - this.failureReason = builder.failureReason; - } + /** + * The success boolean for the post allocation + */ + private boolean success; - public boolean getSuccess() { - return success; - } + /** + * The allocation id for the post allocation + */ + @JsonProperty("allocation_id") + private String allocationId; - public void setSuccess(boolean success) { - this.success = success; - } + /** + * The failure reason for the post allocation + */ + @JsonProperty("failure_reason") + private String failureReason; - public String getAllocationId() { - return allocationId; - } + public CreateAllocationResponseBody() { + } - public void setAllocationId(String allocationId) { - this.allocationId = allocationId; - } + public CreateAllocationResponseBody(Builder builder) { + this.success = builder.success; + this.allocationId = builder.allocationId; + this.failureReason = builder.failureReason; + } + public boolean getSuccess() { + return success; + } - public String getFailureReason() { - return failureReason; - } + public void setSuccess(boolean success) { + this.success = success; + } + public String getAllocationId() { + return allocationId; + } - public void setFailureReason(String failureReason) { - this.failureReason = failureReason; - } + public void setAllocationId(String allocationId) { + this.allocationId = allocationId; + } + public String getFailureReason() { + return failureReason; + } - public static class Builder { - private boolean success; + public void setFailureReason(String failureReason) { + this.failureReason = failureReason; + } + public static class Builder { + private boolean success; - private String allocationId; + private String allocationId; - private String failureReason; + private String failureReason; - public Builder success(boolean success) { - this.success = success; - return this; - } + public Builder success(boolean success) { + this.success = success; + return this; + } - public Builder allocationId(String allocationId) { - this.allocationId = allocationId; - return this; - } + public Builder allocationId(String allocationId) { + this.allocationId = allocationId; + return this; + } - public Builder failureReason(String failureReason) { - this.failureReason = failureReason; - return this; - } + public Builder failureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } - public CreateAllocationResponseBody build() { - return new CreateAllocationResponseBody(this); + public CreateAllocationResponseBody build() { + return new CreateAllocationResponseBody(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java index 400fa72..a513d8d 100644 --- a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java @@ -17,117 +17,122 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class CreateNetAllocationResponseBody { - /** The success boolean for the post net allocation */ - private boolean success; - - /** The netting_id for the post net allocation */ - @JsonProperty("netting_id") - private String nettingId; - - /** The allocation id of the buy allocation in net allocation */ - @JsonProperty("buy_allocation_id") - private String buyAllocationId; - - /** The allocation id of the sell allocation in net allocation */ - @JsonProperty("sell_allocation_id") - private String sellAllocationId; - - /** The failure reason for the post net allocation */ - @JsonProperty("failure_reason") - private String failureReason; - - public CreateNetAllocationResponseBody() {} - - public CreateNetAllocationResponseBody(Builder builder) { - this.success = builder.success; - this.nettingId = builder.nettingId; - this.buyAllocationId = builder.buyAllocationId; - this.sellAllocationId = builder.sellAllocationId; - this.failureReason = builder.failureReason; - } + /** + * The success boolean for the post net allocation + */ + private boolean success; - public boolean getSuccess() { - return success; - } + /** + * The netting_id for the post net allocation + */ + @JsonProperty("netting_id") + private String nettingId; - public void setSuccess(boolean success) { - this.success = success; - } + /** + * The allocation id of the buy allocation in net allocation + */ + @JsonProperty("buy_allocation_id") + private String buyAllocationId; - public String getNettingId() { - return nettingId; - } + /** + * The allocation id of the sell allocation in net allocation + */ + @JsonProperty("sell_allocation_id") + private String sellAllocationId; - public void setNettingId(String nettingId) { - this.nettingId = nettingId; - } + /** + * The failure reason for the post net allocation + */ + @JsonProperty("failure_reason") + private String failureReason; - public String getBuyAllocationId() { - return buyAllocationId; - } + public CreateNetAllocationResponseBody() { + } - public void setBuyAllocationId(String buyAllocationId) { - this.buyAllocationId = buyAllocationId; - } + public CreateNetAllocationResponseBody(Builder builder) { + this.success = builder.success; + this.nettingId = builder.nettingId; + this.buyAllocationId = builder.buyAllocationId; + this.sellAllocationId = builder.sellAllocationId; + this.failureReason = builder.failureReason; + } + public boolean getSuccess() { + return success; + } - public String getSellAllocationId() { - return sellAllocationId; - } + public void setSuccess(boolean success) { + this.success = success; + } + public String getNettingId() { + return nettingId; + } - public void setSellAllocationId(String sellAllocationId) { - this.sellAllocationId = sellAllocationId; - } + public void setNettingId(String nettingId) { + this.nettingId = nettingId; + } + public String getBuyAllocationId() { + return buyAllocationId; + } - public String getFailureReason() { - return failureReason; - } + public void setBuyAllocationId(String buyAllocationId) { + this.buyAllocationId = buyAllocationId; + } + public String getSellAllocationId() { + return sellAllocationId; + } - public void setFailureReason(String failureReason) { - this.failureReason = failureReason; - } + public void setSellAllocationId(String sellAllocationId) { + this.sellAllocationId = sellAllocationId; + } + public String getFailureReason() { + return failureReason; + } - public static class Builder { - private boolean success; + public void setFailureReason(String failureReason) { + this.failureReason = failureReason; + } + public static class Builder { + private boolean success; - private String nettingId; + private String nettingId; - private String buyAllocationId; + private String buyAllocationId; - private String sellAllocationId; + private String sellAllocationId; - private String failureReason; + private String failureReason; - public Builder success(boolean success) { - this.success = success; - return this; - } + public Builder success(boolean success) { + this.success = success; + return this; + } - public Builder nettingId(String nettingId) { - this.nettingId = nettingId; - return this; - } + public Builder nettingId(String nettingId) { + this.nettingId = nettingId; + return this; + } - public Builder buyAllocationId(String buyAllocationId) { - this.buyAllocationId = buyAllocationId; - return this; - } + public Builder buyAllocationId(String buyAllocationId) { + this.buyAllocationId = buyAllocationId; + return this; + } - public Builder sellAllocationId(String sellAllocationId) { - this.sellAllocationId = sellAllocationId; - return this; - } + public Builder sellAllocationId(String sellAllocationId) { + this.sellAllocationId = sellAllocationId; + return this; + } - public Builder failureReason(String failureReason) { - this.failureReason = failureReason; - return this; - } + public Builder failureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } - public CreateNetAllocationResponseBody build() { - return new CreateNetAllocationResponseBody(this); + public CreateNetAllocationResponseBody build() { + return new CreateNetAllocationResponseBody(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java index 8727ef7..b7f3e92 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java @@ -17,192 +17,181 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.ActiveLiquidationSummary; import com.coinbase.prime.model.enums.XMControlStatus; import com.coinbase.prime.model.enums.XMEntityCallStatus; +import com.coinbase.prime.model.XMLoan; +import com.coinbase.prime.model.XMMarginCall; import com.coinbase.prime.model.enums.XMMarginLevel; +import com.coinbase.prime.model.XMSummary; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class CrossMarginOverview { - /** - * - 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. - */ - @JsonProperty("control_status") - 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. - - * 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; - - /** - * - 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; - - /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ - @JsonProperty("margin_summary") - private XMSummary marginSummary; - - /** List of active XM margin calls */ - @JsonProperty("active_margin_calls") - private List activeMarginCalls; - - /** List of active XM loans */ - @JsonProperty("active_loans") - private List activeLoans; - - /** ActiveLiquidationSummary provides a summary of the active or most recent XM liquidation */ - @JsonProperty("active_liquidation") - private ActiveLiquidationSummary activeLiquidation; - - public CrossMarginOverview() {} - - public CrossMarginOverview(Builder builder) { - this.controlStatus = builder.controlStatus; - this.callStatus = builder.callStatus; - this.marginLevel = builder.marginLevel; - this.marginSummary = builder.marginSummary; - this.activeMarginCalls = builder.activeMarginCalls; - this.activeLoans = builder.activeLoans; - this.activeLiquidation = builder.activeLiquidation; - } - - public XMControlStatus getControlStatus() { - return controlStatus; - } - - public void setControlStatus(XMControlStatus controlStatus) { - this.controlStatus = controlStatus; - } - - public XMEntityCallStatus getCallStatus() { - return callStatus; - } - - public void setCallStatus(XMEntityCallStatus callStatus) { - this.callStatus = callStatus; - } - - public XMMarginLevel getMarginLevel() { - return marginLevel; - } - - public void setMarginLevel(XMMarginLevel marginLevel) { - this.marginLevel = marginLevel; - } - - public XMSummary getMarginSummary() { - return marginSummary; - } - - public void setMarginSummary(XMSummary marginSummary) { - this.marginSummary = marginSummary; - } - - public List getActiveMarginCalls() { - return activeMarginCalls; - } - - public void setActiveMarginCalls(List activeMarginCalls) { - this.activeMarginCalls = activeMarginCalls; - } - - public List getActiveLoans() { - return activeLoans; - } - - public void setActiveLoans(List activeLoans) { - this.activeLoans = activeLoans; - } - - public ActiveLiquidationSummary getActiveLiquidation() { - return activeLiquidation; - } - - public void setActiveLiquidation(ActiveLiquidationSummary activeLiquidation) { - this.activeLiquidation = activeLiquidation; - } - - public static class Builder { + /** + * - 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. + */ + @JsonProperty("control_status") 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. + * - 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; + /** + * - 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; + /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ + @JsonProperty("margin_summary") private XMSummary marginSummary; + /** + * List of active XM margin calls + */ + @JsonProperty("active_margin_calls") private List activeMarginCalls; + /** + * List of active XM loans + */ + @JsonProperty("active_loans") private List activeLoans; + /** ActiveLiquidationSummary provides a summary of the active or most recent XM liquidation */ + @JsonProperty("active_liquidation") private ActiveLiquidationSummary activeLiquidation; - public Builder controlStatus(XMControlStatus controlStatus) { - this.controlStatus = controlStatus; - return this; + public CrossMarginOverview() { } - public Builder callStatus(XMEntityCallStatus callStatus) { - this.callStatus = callStatus; - return this; + public CrossMarginOverview(Builder builder) { + this.controlStatus = builder.controlStatus; + this.callStatus = builder.callStatus; + this.marginLevel = builder.marginLevel; + this.marginSummary = builder.marginSummary; + this.activeMarginCalls = builder.activeMarginCalls; + this.activeLoans = builder.activeLoans; + this.activeLiquidation = builder.activeLiquidation; + } + public XMControlStatus getControlStatus() { + return controlStatus; } - public Builder marginLevel(XMMarginLevel marginLevel) { - this.marginLevel = marginLevel; - return this; + public void setControlStatus(XMControlStatus controlStatus) { + this.controlStatus = controlStatus; + } + public XMEntityCallStatus getCallStatus() { + return callStatus; } - public Builder marginSummary(XMSummary marginSummary) { - this.marginSummary = marginSummary; - return this; + public void setCallStatus(XMEntityCallStatus callStatus) { + this.callStatus = callStatus; + } + public XMMarginLevel getMarginLevel() { + return marginLevel; } - public Builder activeMarginCalls(List activeMarginCalls) { - this.activeMarginCalls = activeMarginCalls; - return this; + public void setMarginLevel(XMMarginLevel marginLevel) { + this.marginLevel = marginLevel; + } + public XMSummary getMarginSummary() { + return marginSummary; } - public Builder activeLoans(List activeLoans) { - this.activeLoans = activeLoans; - return this; + public void setMarginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + } + public List getActiveMarginCalls() { + return activeMarginCalls; } - public Builder activeLiquidation(ActiveLiquidationSummary activeLiquidation) { - this.activeLiquidation = activeLiquidation; - return this; + public void setActiveMarginCalls(List activeMarginCalls) { + this.activeMarginCalls = activeMarginCalls; + } + public List getActiveLoans() { + return activeLoans; } - public CrossMarginOverview build() { - return new CrossMarginOverview(this); + public void setActiveLoans(List activeLoans) { + this.activeLoans = activeLoans; + } + public ActiveLiquidationSummary getActiveLiquidation() { + return activeLiquidation; + } + + public void setActiveLiquidation(ActiveLiquidationSummary activeLiquidation) { + this.activeLiquidation = activeLiquidation; + } + public static class Builder { + private XMControlStatus controlStatus; + + private XMEntityCallStatus callStatus; + + private XMMarginLevel marginLevel; + + private XMSummary marginSummary; + + private List activeMarginCalls; + + private List activeLoans; + + private ActiveLiquidationSummary activeLiquidation; + + public Builder controlStatus(XMControlStatus controlStatus) { + this.controlStatus = controlStatus; + return this; + } + + public Builder callStatus(XMEntityCallStatus callStatus) { + this.callStatus = callStatus; + return this; + } + + public Builder marginLevel(XMMarginLevel marginLevel) { + this.marginLevel = marginLevel; + return this; + } + + public Builder marginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + return this; + } + + public Builder activeMarginCalls(List activeMarginCalls) { + this.activeMarginCalls = activeMarginCalls; + return this; + } + + public Builder activeLoans(List activeLoans) { + this.activeLoans = activeLoans; + return this; + } + + public Builder activeLiquidation(ActiveLiquidationSummary activeLiquidation) { + this.activeLiquidation = activeLiquidation; + return this; + } + + public CrossMarginOverview build() { + return new CrossMarginOverview(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java index bb84bcb..8fbc2f7 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java @@ -17,99 +17,103 @@ */ 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; - } + /** + * Derivatives cash balance component. + */ + @JsonProperty("cash_balance") + private String cashBalance; - public String getCashBalance() { - return cashBalance; - } + /** + * Unrealized PnL component of derivatives equity. + */ + @JsonProperty("unrealized_pnl") + private String unrealizedPnl; - public void setCashBalance(String cashBalance) { - this.cashBalance = cashBalance; - } + /** + * Realized PnL component of derivatives equity. + */ + @JsonProperty("realized_pnl") + private String realizedPnl; - public String getUnrealizedPnl() { - return unrealizedPnl; - } + /** + * Accrued funding PnL component of derivatives equity. + */ + @JsonProperty("accrued_funding_pnl") + private String accruedFundingPnl; - public void setUnrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - } + public CrossMarginPrimeDerivativesEquityBreakdown() { + } - public String getRealizedPnl() { - return realizedPnl; - } + 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 setRealizedPnl(String realizedPnl) { - this.realizedPnl = realizedPnl; - } + public void setCashBalance(String cashBalance) { + this.cashBalance = cashBalance; + } + public String getUnrealizedPnl() { + return unrealizedPnl; + } - public String getAccruedFundingPnl() { - return accruedFundingPnl; - } + public void setUnrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + } + public String getRealizedPnl() { + return realizedPnl; + } - public void setAccruedFundingPnl(String accruedFundingPnl) { - this.accruedFundingPnl = accruedFundingPnl; - } + public void setRealizedPnl(String realizedPnl) { + this.realizedPnl = realizedPnl; + } + public String getAccruedFundingPnl() { + return accruedFundingPnl; + } - public static class Builder { - private String cashBalance; + public void setAccruedFundingPnl(String accruedFundingPnl) { + this.accruedFundingPnl = accruedFundingPnl; + } + public static class Builder { + private String cashBalance; - private String unrealizedPnl; + private String unrealizedPnl; - private String realizedPnl; + private String realizedPnl; - private String accruedFundingPnl; + private String accruedFundingPnl; - public Builder cashBalance(String cashBalance) { - this.cashBalance = cashBalance; - return this; - } + public Builder cashBalance(String cashBalance) { + this.cashBalance = cashBalance; + return this; + } - public Builder unrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - return this; - } + public Builder unrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + return this; + } - public Builder realizedPnl(String realizedPnl) { - this.realizedPnl = realizedPnl; - return this; - } + public Builder realizedPnl(String realizedPnl) { + this.realizedPnl = realizedPnl; + return this; + } - public Builder accruedFundingPnl(String accruedFundingPnl) { - this.accruedFundingPnl = accruedFundingPnl; - return this; - } + public Builder accruedFundingPnl(String accruedFundingPnl) { + this.accruedFundingPnl = accruedFundingPnl; + return this; + } - public CrossMarginPrimeDerivativesEquityBreakdown build() { - return new CrossMarginPrimeDerivativesEquityBreakdown(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 4a7487f..feef16f 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java @@ -17,482 +17,486 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.CrossMarginPrimeDerivativesEquityBreakdown; +import com.coinbase.prime.model.CrossMarginPrimeRiskNettingInfo; +import com.coinbase.prime.model.CrossMarginPrimeSpotEquityBreakdown; import com.coinbase.prime.model.enums.PrimeXMHealthStatus; +import com.coinbase.prime.model.PrimeXMMarginCallThresholds; import com.coinbase.prime.model.enums.PrimeXMMarginRequirementType; import com.fasterxml.jackson.annotation.JsonProperty; /** 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). */ - @JsonProperty("margin_excess_shortfall") - private String marginExcessShortfall; - - /** Credit consumed from Cross Margin Credit Limit (XMCL). */ - @JsonProperty("consumed_credit") - private String consumedCredit; - - /** XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans. */ - @JsonProperty("xm_credit_limit") - private String xmCreditLimit; - - /** XM Margin Limit (XMML) is the maximum notional USD deficit. */ - @JsonProperty("xm_margin_limit") - private String xmMarginLimit; - - /** Amount of the XM margin limit consumed by excess deficit. */ - @JsonProperty("consumed_margin_limit") - private String consumedMarginLimit; - - /** Equity attributed by spot. */ - @JsonProperty("spot_equity") - private String spotEquity; - - /** Equity attributed by futures. */ - @JsonProperty("futures_equity") - private String futuresEquity; - - /** Gross market value. */ - @JsonProperty("gross_market_value") - private String grossMarketValue; - - /** Net market value. */ - @JsonProperty("net_market_value") - private String netMarketValue; - - /** Net exposure. */ - @JsonProperty("net_exposure") - private String netExposure; - - /** Gross leverage. */ - @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; - - /** Deficit ratio. */ - @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; - } - - 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; - } - - public void setAccountEquity(String accountEquity) { - this.accountEquity = accountEquity; - } - - public String getMarginExcessShortfall() { - return marginExcessShortfall; - } - - public void setMarginExcessShortfall(String marginExcessShortfall) { - this.marginExcessShortfall = marginExcessShortfall; - } - - public String getConsumedCredit() { - return consumedCredit; - } - - public void setConsumedCredit(String consumedCredit) { - this.consumedCredit = consumedCredit; - } - - public String getXMCreditLimit() { - return xmCreditLimit; - } - - public void setXMCreditLimit(String xmCreditLimit) { - this.xmCreditLimit = xmCreditLimit; - } - - public String getXMMarginLimit() { - return xmMarginLimit; - } - - public void setXMMarginLimit(String xmMarginLimit) { - this.xmMarginLimit = xmMarginLimit; - } - - public String getConsumedMarginLimit() { - return consumedMarginLimit; - } - - public void setConsumedMarginLimit(String consumedMarginLimit) { - this.consumedMarginLimit = consumedMarginLimit; - } - - public String getSpotEquity() { - return spotEquity; - } - - public void setSpotEquity(String spotEquity) { - this.spotEquity = spotEquity; - } - - public String getFuturesEquity() { - return futuresEquity; - } - - public void setFuturesEquity(String futuresEquity) { - this.futuresEquity = futuresEquity; - } - - public String getGrossMarketValue() { - return grossMarketValue; - } - - public void setGrossMarketValue(String grossMarketValue) { - this.grossMarketValue = grossMarketValue; - } - - public String getNetMarketValue() { - return netMarketValue; - } - - public void setNetMarketValue(String netMarketValue) { - this.netMarketValue = netMarketValue; - } - - public String getNetExposure() { - return netExposure; - } - - public void setNetExposure(String netExposure) { - this.netExposure = netExposure; - } - - public String getGrossLeverage() { - return grossLeverage; - } - - 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; - } - - public void setEquityRatio(String equityRatio) { - this.equityRatio = equityRatio; - } - - public String getDeficitRatio() { - return deficitRatio; - } - - 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; - } - - public void setFcmExcessAvailableToReturn(String fcmExcessAvailableToReturn) { - this.fcmExcessAvailableToReturn = fcmExcessAvailableToReturn; - } - - public static class Builder { + /** + * 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). + */ + @JsonProperty("margin_excess_shortfall") private String marginExcessShortfall; + /** + * Credit consumed from Cross Margin Credit Limit (XMCL). + */ + @JsonProperty("consumed_credit") private String consumedCredit; + /** + * XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans. + */ + @JsonProperty("xm_credit_limit") private String xmCreditLimit; + /** + * XM Margin Limit (XMML) is the maximum notional USD deficit. + */ + @JsonProperty("xm_margin_limit") private String xmMarginLimit; + /** + * Amount of the XM margin limit consumed by excess deficit. + */ + @JsonProperty("consumed_margin_limit") private String consumedMarginLimit; + /** + * Equity attributed by spot. + */ + @JsonProperty("spot_equity") private String spotEquity; + /** + * Equity attributed by futures. + */ + @JsonProperty("futures_equity") private String futuresEquity; + /** + * Gross market value. + */ + @JsonProperty("gross_market_value") private String grossMarketValue; + /** + * Net market value. + */ + @JsonProperty("net_market_value") private String netMarketValue; + /** + * Net exposure. + */ + @JsonProperty("net_exposure") private String netExposure; + /** + * Gross leverage. + */ + @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; + /** + * Deficit ratio. + */ + @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 Builder marginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - return this; + public CrossMarginPrimeMarginSummary() { } - public Builder marginRequirementType(PrimeXMMarginRequirementType marginRequirementType) { - this.marginRequirementType = marginRequirementType; - return this; + 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; } - public Builder accountEquity(String accountEquity) { - this.accountEquity = accountEquity; - return this; + public void setMarginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + } + public PrimeXMMarginRequirementType getMarginRequirementType() { + return marginRequirementType; } - public Builder marginExcessShortfall(String marginExcessShortfall) { - this.marginExcessShortfall = marginExcessShortfall; - return this; + public void setMarginRequirementType(PrimeXMMarginRequirementType marginRequirementType) { + this.marginRequirementType = marginRequirementType; + } + public String getAccountEquity() { + return accountEquity; } - public Builder consumedCredit(String consumedCredit) { - this.consumedCredit = consumedCredit; - return this; + public void setAccountEquity(String accountEquity) { + this.accountEquity = accountEquity; + } + public String getMarginExcessShortfall() { + return marginExcessShortfall; } - public Builder xmCreditLimit(String xmCreditLimit) { - this.xmCreditLimit = xmCreditLimit; - return this; + public void setMarginExcessShortfall(String marginExcessShortfall) { + this.marginExcessShortfall = marginExcessShortfall; + } + public String getConsumedCredit() { + return consumedCredit; } - public Builder xmMarginLimit(String xmMarginLimit) { - this.xmMarginLimit = xmMarginLimit; - return this; + public void setConsumedCredit(String consumedCredit) { + this.consumedCredit = consumedCredit; + } + public String getXMCreditLimit() { + return xmCreditLimit; } - public Builder consumedMarginLimit(String consumedMarginLimit) { - this.consumedMarginLimit = consumedMarginLimit; - return this; + public void setXMCreditLimit(String xmCreditLimit) { + this.xmCreditLimit = xmCreditLimit; + } + public String getXMMarginLimit() { + return xmMarginLimit; } - public Builder spotEquity(String spotEquity) { - this.spotEquity = spotEquity; - return this; + public void setXMMarginLimit(String xmMarginLimit) { + this.xmMarginLimit = xmMarginLimit; + } + public String getConsumedMarginLimit() { + return consumedMarginLimit; } - public Builder futuresEquity(String futuresEquity) { - this.futuresEquity = futuresEquity; - return this; + public void setConsumedMarginLimit(String consumedMarginLimit) { + this.consumedMarginLimit = consumedMarginLimit; + } + public String getSpotEquity() { + return spotEquity; } - public Builder grossMarketValue(String grossMarketValue) { - this.grossMarketValue = grossMarketValue; - return this; + public void setSpotEquity(String spotEquity) { + this.spotEquity = spotEquity; + } + public String getFuturesEquity() { + return futuresEquity; } - public Builder netMarketValue(String netMarketValue) { - this.netMarketValue = netMarketValue; - return this; + public void setFuturesEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + } + public String getGrossMarketValue() { + return grossMarketValue; } - public Builder netExposure(String netExposure) { - this.netExposure = netExposure; - return this; + public void setGrossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + } + public String getNetMarketValue() { + return netMarketValue; + } + + public void setNetMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + } + public String getNetExposure() { + return netExposure; + } + + public void setNetExposure(String netExposure) { + this.netExposure = netExposure; + } + public String getGrossLeverage() { + return grossLeverage; } - public Builder grossLeverage(String grossLeverage) { - this.grossLeverage = grossLeverage; - return this; + public void setGrossLeverage(String grossLeverage) { + this.grossLeverage = grossLeverage; + } + public CrossMarginPrimeSpotEquityBreakdown getSpotEquityBreakdown() { + return spotEquityBreakdown; } - public Builder spotEquityBreakdown(CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown) { - this.spotEquityBreakdown = spotEquityBreakdown; - return this; + public void setSpotEquityBreakdown(CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown) { + this.spotEquityBreakdown = spotEquityBreakdown; + } + public CrossMarginPrimeDerivativesEquityBreakdown getDerivativesEquityBreakdown() { + return derivativesEquityBreakdown; } - public Builder derivativesEquityBreakdown( - CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown) { - this.derivativesEquityBreakdown = derivativesEquityBreakdown; - return this; + public void setDerivativesEquityBreakdown(CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown) { + this.derivativesEquityBreakdown = derivativesEquityBreakdown; + } + public CrossMarginPrimeRiskNettingInfo getRiskNettingInfo() { + return riskNettingInfo; } - public Builder riskNettingInfo(CrossMarginPrimeRiskNettingInfo riskNettingInfo) { - this.riskNettingInfo = riskNettingInfo; - return this; + public void setRiskNettingInfo(CrossMarginPrimeRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; + } + public PrimeXMHealthStatus getHealthStatus() { + return healthStatus; } - public Builder healthStatus(PrimeXMHealthStatus healthStatus) { - this.healthStatus = healthStatus; - return this; + public void setHealthStatus(PrimeXMHealthStatus healthStatus) { + this.healthStatus = healthStatus; + } + public String getEquityRatio() { + return equityRatio; } - public Builder equityRatio(String equityRatio) { - this.equityRatio = equityRatio; - return this; + public void setEquityRatio(String equityRatio) { + this.equityRatio = equityRatio; + } + public String getDeficitRatio() { + return deficitRatio; } - public Builder deficitRatio(String deficitRatio) { - this.deficitRatio = deficitRatio; - return this; + public void setDeficitRatio(String deficitRatio) { + this.deficitRatio = deficitRatio; + } + public PrimeXMMarginCallThresholds getMarginThresholds() { + return marginThresholds; } - public Builder marginThresholds(PrimeXMMarginCallThresholds marginThresholds) { - this.marginThresholds = marginThresholds; - return this; + public void setMarginThresholds(PrimeXMMarginCallThresholds marginThresholds) { + this.marginThresholds = marginThresholds; + } + public String getFcmExcessAvailableToReturn() { + return fcmExcessAvailableToReturn; } - public Builder fcmExcessAvailableToReturn(String fcmExcessAvailableToReturn) { - this.fcmExcessAvailableToReturn = fcmExcessAvailableToReturn; - return this; + 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; - public CrossMarginPrimeMarginSummary build() { - return new CrossMarginPrimeMarginSummary(this); + 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 index 531628b..5fab1bf 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java @@ -17,216 +17,200 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.CrossMarginPrimeXMPosition; +import com.coinbase.prime.model.PrimeXMMarginRequirementBreakdown; +import com.coinbase.prime.model.PrimeXMOffsetCreditBreakdown; 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 { + /** + * 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 Builder dcoMarginRequirement(String dcoMarginRequirement) { - this.dcoMarginRequirement = dcoMarginRequirement; - return this; + 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 Builder portfolioMarginRequirement(String portfolioMarginRequirement) { - this.portfolioMarginRequirement = portfolioMarginRequirement; - return this; + public void setPortfolioMarginRequirement(String portfolioMarginRequirement) { + this.portfolioMarginRequirement = portfolioMarginRequirement; + } + public String getIntegratedPortfolioMarginRequirement() { + return integratedPortfolioMarginRequirement; } - public Builder integratedPortfolioMarginRequirement( - String integratedPortfolioMarginRequirement) { - this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; - return this; + public void setIntegratedPortfolioMarginRequirement(String integratedPortfolioMarginRequirement) { + this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; + } + public String getIneligibleFuturesMarginRequirement() { + return ineligibleFuturesMarginRequirement; } - public Builder ineligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { - this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; - return this; + public void setIneligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { + this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; + } + public PrimeXMMarginRequirementBreakdown getPmrBreakdown() { + return pmrBreakdown; } - public Builder pmrBreakdown(PrimeXMMarginRequirementBreakdown pmrBreakdown) { - this.pmrBreakdown = pmrBreakdown; - return this; + public void setPmrBreakdown(PrimeXMMarginRequirementBreakdown pmrBreakdown) { + this.pmrBreakdown = pmrBreakdown; + } + public PrimeXMMarginRequirementBreakdown getIpmrBreakdown() { + return ipmrBreakdown; } - public Builder ipmrBreakdown(PrimeXMMarginRequirementBreakdown ipmrBreakdown) { - this.ipmrBreakdown = ipmrBreakdown; - return this; + public void setIpmrBreakdown(PrimeXMMarginRequirementBreakdown ipmrBreakdown) { + this.ipmrBreakdown = ipmrBreakdown; + } + public PrimeXMOffsetCreditBreakdown getPortfolioMarginOffsetCreditBreakdown() { + return portfolioMarginOffsetCreditBreakdown; } - public Builder portfolioMarginOffsetCreditBreakdown( - PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown) { - this.portfolioMarginOffsetCreditBreakdown = portfolioMarginOffsetCreditBreakdown; - return this; + public void setPortfolioMarginOffsetCreditBreakdown(PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown) { + this.portfolioMarginOffsetCreditBreakdown = portfolioMarginOffsetCreditBreakdown; + } + public PrimeXMOffsetCreditBreakdown getIntegratedPortfolioMarginOffsetCreditBreakdown() { + return integratedPortfolioMarginOffsetCreditBreakdown; } - public Builder integratedPortfolioMarginOffsetCreditBreakdown( - PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown) { - this.integratedPortfolioMarginOffsetCreditBreakdown = - integratedPortfolioMarginOffsetCreditBreakdown; - return this; + public void setIntegratedPortfolioMarginOffsetCreditBreakdown(PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown) { + this.integratedPortfolioMarginOffsetCreditBreakdown = integratedPortfolioMarginOffsetCreditBreakdown; + } + public List getXMPositions() { + return xmPositions; } - public Builder xmPositions(List xmPositions) { - this.xmPositions = xmPositions; - return this; + public void setXMPositions(List xmPositions) { + this.xmPositions = xmPositions; } + public static class Builder { + private String dcoMarginRequirement; + + private String portfolioMarginRequirement; + + private String integratedPortfolioMarginRequirement; - public CrossMarginPrimeRiskNettingInfo build() { - return new CrossMarginPrimeRiskNettingInfo(this); + 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 index f29a85e..d246142 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java @@ -17,119 +17,124 @@ */ 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; - } + /** + * PM cash balance component of spot equity. + */ + @JsonProperty("cash_balance") + private String cashBalance; - public String getCashBalance() { - return cashBalance; - } + /** + * Long market value component of spot equity. + */ + @JsonProperty("long_market_value") + private String longMarketValue; - public void setCashBalance(String cashBalance) { - this.cashBalance = cashBalance; - } + /** + * Short market value component of spot equity. + */ + @JsonProperty("short_market_value") + private String shortMarketValue; - public String getLongMarketValue() { - return longMarketValue; - } + /** + * Short collateral component of spot equity. + */ + @JsonProperty("short_collateral") + private String shortCollateral; - public void setLongMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - } + /** + * Pending transfers affecting spot equity. + */ + @JsonProperty("pending_transfers") + private String pendingTransfers; - public String getShortMarketValue() { - return shortMarketValue; - } + public CrossMarginPrimeSpotEquityBreakdown() { + } - public void setShortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - } + 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 String getShortCollateral() { - return shortCollateral; - } + public void setCashBalance(String cashBalance) { + this.cashBalance = cashBalance; + } + public String getLongMarketValue() { + return longMarketValue; + } - public void setShortCollateral(String shortCollateral) { - this.shortCollateral = shortCollateral; - } + public void setLongMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + } + public String getShortMarketValue() { + return shortMarketValue; + } - public String getPendingTransfers() { - return pendingTransfers; - } + public void setShortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + } + public String getShortCollateral() { + return shortCollateral; + } - public void setPendingTransfers(String pendingTransfers) { - this.pendingTransfers = pendingTransfers; - } + public void setShortCollateral(String shortCollateral) { + this.shortCollateral = shortCollateral; + } + public String getPendingTransfers() { + return pendingTransfers; + } - public static class Builder { - private String cashBalance; + public void setPendingTransfers(String pendingTransfers) { + this.pendingTransfers = pendingTransfers; + } + public static class Builder { + private String cashBalance; - private String longMarketValue; + private String longMarketValue; - private String shortMarketValue; + private String shortMarketValue; - private String shortCollateral; + private String shortCollateral; - private String pendingTransfers; + private String pendingTransfers; - public Builder cashBalance(String cashBalance) { - this.cashBalance = cashBalance; - return this; - } + public Builder cashBalance(String cashBalance) { + this.cashBalance = cashBalance; + return this; + } - public Builder longMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - return this; - } + public Builder longMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + return this; + } - public Builder shortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - return this; - } + public Builder shortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + return this; + } - public Builder shortCollateral(String shortCollateral) { - this.shortCollateral = shortCollateral; - return this; - } + public Builder shortCollateral(String shortCollateral) { + this.shortCollateral = shortCollateral; + return this; + } - public Builder pendingTransfers(String pendingTransfers) { - this.pendingTransfers = pendingTransfers; - return this; - } + public Builder pendingTransfers(String pendingTransfers) { + this.pendingTransfers = pendingTransfers; + return this; + } - public CrossMarginPrimeSpotEquityBreakdown build() { - return new CrossMarginPrimeSpotEquityBreakdown(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 index 6987007..9a8f9f0 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java @@ -17,321 +17,333 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; -/** - * CrossMarginPrimeXMPosition is a single per-asset XM row (proto-backed fields from - * XMPositionDetails). - */ +/** 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 { + /** + * 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 Builder currency(String currency) { - this.currency = currency; - return this; + public CrossMarginPrimeXMPosition() { } - public Builder marketPrice(String marketPrice) { - this.marketPrice = marketPrice; - return this; + 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 Builder spotBalance(String spotBalance) { - this.spotBalance = spotBalance; - return this; + public void setCurrency(String currency) { + this.currency = currency; + } + public String getMarketPrice() { + return marketPrice; } - public Builder spotBalanceNotional(String spotBalanceNotional) { - this.spotBalanceNotional = spotBalanceNotional; - return this; + public void setMarketPrice(String marketPrice) { + this.marketPrice = marketPrice; + } + public String getSpotBalance() { + return spotBalance; } - public Builder futuresBalance(String futuresBalance) { - this.futuresBalance = futuresBalance; - return this; + public void setSpotBalance(String spotBalance) { + this.spotBalance = spotBalance; + } + public String getSpotBalanceNotional() { + return spotBalanceNotional; } - public Builder futuresBalanceNotional(String futuresBalanceNotional) { - this.futuresBalanceNotional = futuresBalanceNotional; - return this; + public void setSpotBalanceNotional(String spotBalanceNotional) { + this.spotBalanceNotional = spotBalanceNotional; + } + public String getFuturesBalance() { + return futuresBalance; } - public Builder baseRequirement(String baseRequirement) { - this.baseRequirement = baseRequirement; - return this; + public void setFuturesBalance(String futuresBalance) { + this.futuresBalance = futuresBalance; + } + public String getFuturesBalanceNotional() { + return futuresBalanceNotional; } - public Builder totalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - return this; + 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 Builder basisCredit(String basisCredit) { - this.basisCredit = basisCredit; - return this; + public void setBasisCredit(String basisCredit) { + this.basisCredit = basisCredit; + } + public String getFuturesNettedNotional() { + return futuresNettedNotional; } - public Builder futuresNettedNotional(String futuresNettedNotional) { - this.futuresNettedNotional = futuresNettedNotional; - return this; + public void setFuturesNettedNotional(String futuresNettedNotional) { + this.futuresNettedNotional = futuresNettedNotional; + } + public String getFuturesNettingMargin() { + return futuresNettingMargin; } - public Builder futuresNettingMargin(String futuresNettingMargin) { - this.futuresNettingMargin = futuresNettingMargin; - return this; + public void setFuturesNettingMargin(String futuresNettingMargin) { + this.futuresNettingMargin = futuresNettingMargin; + } + public String getLongAmount() { + return longAmount; } - public Builder longAmount(String longAmount) { - this.longAmount = longAmount; - return this; + public void setLongAmount(String longAmount) { + this.longAmount = longAmount; + } + public String getShortAmount() { + return shortAmount; } - public Builder shortAmount(String shortAmount) { - this.shortAmount = shortAmount; - return this; + public void setShortAmount(String shortAmount) { + this.shortAmount = shortAmount; + } + public String getVolatilityAddon() { + return volatilityAddon; } - public Builder volatilityAddon(String volatilityAddon) { - this.volatilityAddon = volatilityAddon; - return this; + public void setVolatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + } + public String getLiquidityAddon() { + return liquidityAddon; } - public Builder liquidityAddon(String liquidityAddon) { - this.liquidityAddon = liquidityAddon; - return this; + public void setLiquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; } + public static class Builder { + private String currency; + + private String marketPrice; - public CrossMarginPrimeXMPosition build() { - return new CrossMarginPrimeXMPosition(this); + 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 6d73dde..2db20d5 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java @@ -17,259 +17,271 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** XM 2.0 risk parameters for an asset tier. */ public class CrossMarginRiskParameters { - /** Asset tier identifier. */ - @JsonProperty("asset_tier") - private String assetTier; - - /** Base ratio for long positions. */ - @JsonProperty("base_ratio_long") - private String baseRatioLong; - - /** Base ratio for short positions. */ - @JsonProperty("base_ratio_short") - private String baseRatioShort; - - /** Volatility rate for long positions. */ - @JsonProperty("volatility_rate_long") - private String volatilityRateLong; - - /** Volatility rate for short positions. */ - @JsonProperty("volatility_rate_short") - private String volatilityRateShort; - - /** Volatility low threshold. */ - @JsonProperty("volatility_low_threshold") - private String volatilityLowThreshold; - - /** Volatility high threshold. */ - @JsonProperty("volatility_high_threshold") - private String volatilityHighThreshold; - - /** Liquidity A for long positions. */ - @JsonProperty("liquidity_a_long") - private String liquidityALong; - - /** Liquidity A for short positions. */ - @JsonProperty("liquidity_a_short") - private String liquidityAShort; - - /** Liquidity B for short positions. */ - @JsonProperty("liquidity_b_short") - private String liquidityBShort; - - /** Liquidity threshold. */ - @JsonProperty("liquidity_threshold") - private String liquidityThreshold; - - /** Basis offset credit rate. */ - @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; - } - - public void setAssetTier(String assetTier) { - this.assetTier = assetTier; - } - - public String getBaseRatioLong() { - return baseRatioLong; - } - - public void setBaseRatioLong(String baseRatioLong) { - this.baseRatioLong = baseRatioLong; - } - - public String getBaseRatioShort() { - return baseRatioShort; - } - - public void setBaseRatioShort(String baseRatioShort) { - this.baseRatioShort = baseRatioShort; - } - - public String getVolatilityRateLong() { - return volatilityRateLong; - } - - public void setVolatilityRateLong(String volatilityRateLong) { - this.volatilityRateLong = volatilityRateLong; - } - - public String getVolatilityRateShort() { - return volatilityRateShort; - } - - public void setVolatilityRateShort(String volatilityRateShort) { - this.volatilityRateShort = volatilityRateShort; - } - - public String getVolatilityLowThreshold() { - return volatilityLowThreshold; - } - - public void setVolatilityLowThreshold(String volatilityLowThreshold) { - this.volatilityLowThreshold = volatilityLowThreshold; - } - - public String getVolatilityHighThreshold() { - return volatilityHighThreshold; - } - - public void setVolatilityHighThreshold(String volatilityHighThreshold) { - this.volatilityHighThreshold = volatilityHighThreshold; - } - - public String getLiquidityALong() { - return liquidityALong; - } - - public void setLiquidityALong(String liquidityALong) { - this.liquidityALong = liquidityALong; - } - - public String getLiquidityAShort() { - return liquidityAShort; - } - - public void setLiquidityAShort(String liquidityAShort) { - this.liquidityAShort = liquidityAShort; - } - - public String getLiquidityBShort() { - return liquidityBShort; - } - - public void setLiquidityBShort(String liquidityBShort) { - this.liquidityBShort = liquidityBShort; - } - - public String getLiquidityThreshold() { - return liquidityThreshold; - } - - public void setLiquidityThreshold(String liquidityThreshold) { - this.liquidityThreshold = liquidityThreshold; - } - - public String getBasisOffsetCreditRate() { - return basisOffsetCreditRate; - } - - public void setBasisOffsetCreditRate(String basisOffsetCreditRate) { - this.basisOffsetCreditRate = basisOffsetCreditRate; - } - - public static class Builder { + /** + * Asset tier identifier. + */ + @JsonProperty("asset_tier") private String assetTier; + /** + * Base ratio for long positions. + */ + @JsonProperty("base_ratio_long") private String baseRatioLong; + /** + * Base ratio for short positions. + */ + @JsonProperty("base_ratio_short") private String baseRatioShort; + /** + * Volatility rate for long positions. + */ + @JsonProperty("volatility_rate_long") private String volatilityRateLong; + /** + * Volatility rate for short positions. + */ + @JsonProperty("volatility_rate_short") private String volatilityRateShort; + /** + * Volatility low threshold. + */ + @JsonProperty("volatility_low_threshold") private String volatilityLowThreshold; + /** + * Volatility high threshold. + */ + @JsonProperty("volatility_high_threshold") private String volatilityHighThreshold; + /** + * Liquidity A for long positions. + */ + @JsonProperty("liquidity_a_long") private String liquidityALong; + /** + * Liquidity A for short positions. + */ + @JsonProperty("liquidity_a_short") private String liquidityAShort; + /** + * Liquidity B for short positions. + */ + @JsonProperty("liquidity_b_short") private String liquidityBShort; + /** + * Liquidity threshold. + */ + @JsonProperty("liquidity_threshold") private String liquidityThreshold; + /** + * Basis offset credit rate. + */ + @JsonProperty("basis_offset_credit_rate") private String basisOffsetCreditRate; - public Builder assetTier(String assetTier) { - this.assetTier = assetTier; - return this; + public CrossMarginRiskParameters() { } - public Builder baseRatioLong(String baseRatioLong) { - this.baseRatioLong = baseRatioLong; - return this; + 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; } - public Builder baseRatioShort(String baseRatioShort) { - this.baseRatioShort = baseRatioShort; - return this; + public void setAssetTier(String assetTier) { + this.assetTier = assetTier; + } + public String getBaseRatioLong() { + return baseRatioLong; } - public Builder volatilityRateLong(String volatilityRateLong) { - this.volatilityRateLong = volatilityRateLong; - return this; + public void setBaseRatioLong(String baseRatioLong) { + this.baseRatioLong = baseRatioLong; + } + public String getBaseRatioShort() { + return baseRatioShort; } - public Builder volatilityRateShort(String volatilityRateShort) { - this.volatilityRateShort = volatilityRateShort; - return this; + public void setBaseRatioShort(String baseRatioShort) { + this.baseRatioShort = baseRatioShort; + } + public String getVolatilityRateLong() { + return volatilityRateLong; } - public Builder volatilityLowThreshold(String volatilityLowThreshold) { - this.volatilityLowThreshold = volatilityLowThreshold; - return this; + public void setVolatilityRateLong(String volatilityRateLong) { + this.volatilityRateLong = volatilityRateLong; + } + public String getVolatilityRateShort() { + return volatilityRateShort; } - public Builder volatilityHighThreshold(String volatilityHighThreshold) { - this.volatilityHighThreshold = volatilityHighThreshold; - return this; + public void setVolatilityRateShort(String volatilityRateShort) { + this.volatilityRateShort = volatilityRateShort; + } + public String getVolatilityLowThreshold() { + return volatilityLowThreshold; } - public Builder liquidityALong(String liquidityALong) { - this.liquidityALong = liquidityALong; - return this; + public void setVolatilityLowThreshold(String volatilityLowThreshold) { + this.volatilityLowThreshold = volatilityLowThreshold; + } + public String getVolatilityHighThreshold() { + return volatilityHighThreshold; } - public Builder liquidityAShort(String liquidityAShort) { - this.liquidityAShort = liquidityAShort; - return this; + public void setVolatilityHighThreshold(String volatilityHighThreshold) { + this.volatilityHighThreshold = volatilityHighThreshold; + } + public String getLiquidityALong() { + return liquidityALong; } - public Builder liquidityBShort(String liquidityBShort) { - this.liquidityBShort = liquidityBShort; - return this; + public void setLiquidityALong(String liquidityALong) { + this.liquidityALong = liquidityALong; + } + public String getLiquidityAShort() { + return liquidityAShort; } - public Builder liquidityThreshold(String liquidityThreshold) { - this.liquidityThreshold = liquidityThreshold; - return this; + public void setLiquidityAShort(String liquidityAShort) { + this.liquidityAShort = liquidityAShort; + } + public String getLiquidityBShort() { + return liquidityBShort; + } + + public void setLiquidityBShort(String liquidityBShort) { + this.liquidityBShort = liquidityBShort; + } + public String getLiquidityThreshold() { + return liquidityThreshold; + } + + public void setLiquidityThreshold(String liquidityThreshold) { + this.liquidityThreshold = liquidityThreshold; + } + public String getBasisOffsetCreditRate() { + return basisOffsetCreditRate; } - public Builder basisOffsetCreditRate(String basisOffsetCreditRate) { - this.basisOffsetCreditRate = basisOffsetCreditRate; - return this; + public void setBasisOffsetCreditRate(String basisOffsetCreditRate) { + this.basisOffsetCreditRate = basisOffsetCreditRate; } + public static class Builder { + private String assetTier; + + private String baseRatioLong; + + private String baseRatioShort; + + private String volatilityRateLong; - public CrossMarginRiskParameters build() { - return new CrossMarginRiskParameters(this); + 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 index de3469a..e287b4b 100644 --- a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java @@ -17,59 +17,61 @@ */ 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; - } + /** + * ISO-formatted start date of the reward period (e.g. 2025-02-01T00:00:00Z) + */ + @JsonProperty("start_date") + private String startDate; - public String getStartDate() { - return startDate; - } + /** + * ISO-formatted end date of the reward period (e.g. 2025-02-28T00:00:00Z) + */ + @JsonProperty("end_date") + private String endDate; - public void setStartDate(String startDate) { - this.startDate = startDate; - } + public CustomStablecoinRewardDetails() { + } - public String getEndDate() { - return endDate; - } + public CustomStablecoinRewardDetails(Builder builder) { + this.startDate = builder.startDate; + this.endDate = builder.endDate; + } + public String getStartDate() { + return startDate; + } - public void setEndDate(String endDate) { - this.endDate = endDate; - } + public void setStartDate(String startDate) { + this.startDate = startDate; + } + public String getEndDate() { + return endDate; + } - public static class Builder { - private String startDate; + public void setEndDate(String endDate) { + this.endDate = endDate; + } + public static class Builder { + private String startDate; - private String endDate; + private String endDate; - public Builder startDate(String startDate) { - this.startDate = startDate; - return this; - } + public Builder startDate(String startDate) { + this.startDate = startDate; + return this; + } - public Builder endDate(String endDate) { - this.endDate = endDate; - return this; - } + public Builder endDate(String endDate) { + this.endDate = endDate; + return this; + } - public CustomStablecoinRewardDetails build() { - return new CustomStablecoinRewardDetails(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 9b65542..c3da2d5 100644 --- a/src/main/java/com/coinbase/prime/model/DateOfBirth.java +++ b/src/main/java/com/coinbase/prime/model/DateOfBirth.java @@ -19,74 +19,75 @@ package com.coinbase.prime.model; public class DateOfBirth { - /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a 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 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 int day; - - public DateOfBirth() {} - - public DateOfBirth(Builder builder) { - this.year = builder.year; - this.month = builder.month; - this.day = builder.day; - } + /** + * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. + */ + private int year; - public int getYear() { - return year; - } + /** + * Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. + */ + private int month; - public void setYear(int year) { - this.year = year; - } + /** + * 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 int day; - public int getMonth() { - return month; - } + public DateOfBirth() { + } - public void setMonth(int month) { - this.month = month; - } + public DateOfBirth(Builder builder) { + this.year = builder.year; + this.month = builder.month; + this.day = builder.day; + } + public int getYear() { + return year; + } - public int getDay() { - return day; - } + public void setYear(int year) { + this.year = year; + } + public int getMonth() { + return month; + } - public void setDay(int day) { - this.day = day; - } + public void setMonth(int month) { + this.month = month; + } + public int getDay() { + return day; + } - public static class Builder { - private int year; + public void setDay(int day) { + this.day = day; + } + public static class Builder { + private int year; - private int month; + private int month; - private int day; + private int day; - public Builder year(int year) { - this.year = year; - return this; - } + public Builder year(int year) { + this.year = year; + return this; + } - public Builder month(int month) { - this.month = month; - return this; - } + public Builder month(int month) { + this.month = month; + return this; + } - public Builder day(int day) { - this.day = day; - return this; - } + public Builder day(int day) { + this.day = day; + return this; + } - public DateOfBirth build() { - return new DateOfBirth(this); + public DateOfBirth build() { + return new DateOfBirth(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/DefiBalance.java b/src/main/java/com/coinbase/prime/model/DefiBalance.java index bc53f3d..c4baeb7 100644 --- a/src/main/java/com/coinbase/prime/model/DefiBalance.java +++ b/src/main/java/com/coinbase/prime/model/DefiBalance.java @@ -17,76 +17,73 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class DefiBalance { - /** Network this asset is on (ie "ethereum-mainnet") */ - private String network; - - /** a set of rules and standards that define how data is exchanged (ie "Aave V4 ") */ - private String protocol; - - /** Total USD value */ - @JsonProperty("net_usd_value") - private String netUsdValue; - - public DefiBalance() {} - - public DefiBalance(Builder builder) { - this.network = builder.network; - this.protocol = builder.protocol; - this.netUsdValue = builder.netUsdValue; - } + /** Network this asset is on (ie "ethereum-mainnet") */ + private String network; - public String getNetwork() { - return network; - } + /** a set of rules and standards that define how data is exchanged (ie "Aave V4 ") */ + private String protocol; - public void setNetwork(String network) { - this.network = network; - } + /** Total USD value */ + @JsonProperty("net_usd_value") + private String netUsdValue; - public String getProtocol() { - return protocol; - } + public DefiBalance() { + } - public void setProtocol(String protocol) { - this.protocol = protocol; - } + public DefiBalance(Builder builder) { + this.network = builder.network; + this.protocol = builder.protocol; + this.netUsdValue = builder.netUsdValue; + } + public String getNetwork() { + return network; + } - public String getNetUsdValue() { - return netUsdValue; - } + public void setNetwork(String network) { + this.network = network; + } + public String getProtocol() { + return protocol; + } - public void setNetUsdValue(String netUsdValue) { - this.netUsdValue = netUsdValue; - } + public void setProtocol(String protocol) { + this.protocol = protocol; + } + public String getNetUsdValue() { + return netUsdValue; + } - public static class Builder { - private String network; + public void setNetUsdValue(String netUsdValue) { + this.netUsdValue = netUsdValue; + } + public static class Builder { + private String network; - private String protocol; + private String protocol; - private String netUsdValue; + private String netUsdValue; - public Builder network(String network) { - this.network = network; - return this; - } + public Builder network(String network) { + this.network = network; + return this; + } - public Builder protocol(String protocol) { - this.protocol = protocol; - return this; - } + public Builder protocol(String protocol) { + this.protocol = protocol; + return this; + } - public Builder netUsdValue(String netUsdValue) { - this.netUsdValue = netUsdValue; - return this; - } + public Builder netUsdValue(String netUsdValue) { + this.netUsdValue = netUsdValue; + return this; + } - public DefiBalance build() { - return new DefiBalance(this); + public DefiBalance build() { + return new DefiBalance(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java index 59fc803..11eacdc 100644 --- a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java +++ b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java @@ -17,121 +17,123 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class DestinationAlloc { - /** The ID unique to each leg of an allocation. */ - @JsonProperty("leg_id") - private String legId; - - /** Portfolio ID of the source portfolio. */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** Amount allocated in base asset units. */ - @JsonProperty("allocation_base") - private String allocationBase; - - /** Amount allocated in quote asset units. */ - @JsonProperty("allocation_quote") - private String allocationQuote; - - /** - * Pro rata fees for each leg. Adding up the fees for each leg will sum up to equal the total - * allocation level fees. - */ - @JsonProperty("fees_allocated_leg") - private String feesAllocatedLeg; - - public DestinationAlloc() {} - - public DestinationAlloc(Builder builder) { - this.legId = builder.legId; - this.portfolioId = builder.portfolioId; - this.allocationBase = builder.allocationBase; - this.allocationQuote = builder.allocationQuote; - this.feesAllocatedLeg = builder.feesAllocatedLeg; - } - - public String getLegId() { - return legId; - } - - public void setLegId(String legId) { - this.legId = legId; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getAllocationBase() { - return allocationBase; - } - - public void setAllocationBase(String allocationBase) { - this.allocationBase = allocationBase; - } - - public String getAllocationQuote() { - return allocationQuote; - } - - public void setAllocationQuote(String allocationQuote) { - this.allocationQuote = allocationQuote; - } - - public String getFeesAllocatedLeg() { - return feesAllocatedLeg; - } - - public void setFeesAllocatedLeg(String feesAllocatedLeg) { - this.feesAllocatedLeg = feesAllocatedLeg; - } - - public static class Builder { + /** + * The ID unique to each leg of an allocation. + */ + @JsonProperty("leg_id") private String legId; + /** + * Portfolio ID of the source portfolio. + */ + @JsonProperty("portfolio_id") private String portfolioId; + /** + * Amount allocated in base asset units. + */ + @JsonProperty("allocation_base") private String allocationBase; + /** + * Amount allocated in quote asset units. + */ + @JsonProperty("allocation_quote") private String allocationQuote; + /** + * Pro rata fees for each leg. Adding up the fees for each leg will sum up to equal the total allocation level fees. + */ + @JsonProperty("fees_allocated_leg") private String feesAllocatedLeg; - public Builder legId(String legId) { - this.legId = legId; - return this; + public DestinationAlloc() { + } + + public DestinationAlloc(Builder builder) { + this.legId = builder.legId; + this.portfolioId = builder.portfolioId; + this.allocationBase = builder.allocationBase; + this.allocationQuote = builder.allocationQuote; + this.feesAllocatedLeg = builder.feesAllocatedLeg; + } + public String getLegId() { + return legId; + } + + public void setLegId(String legId) { + this.legId = legId; + } + public String getPortfolioId() { + return portfolioId; } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getAllocationBase() { + return allocationBase; } - public Builder allocationBase(String allocationBase) { - this.allocationBase = allocationBase; - return this; + public void setAllocationBase(String allocationBase) { + this.allocationBase = allocationBase; + } + public String getAllocationQuote() { + return allocationQuote; } - public Builder allocationQuote(String allocationQuote) { - this.allocationQuote = allocationQuote; - return this; + public void setAllocationQuote(String allocationQuote) { + this.allocationQuote = allocationQuote; + } + public String getFeesAllocatedLeg() { + return feesAllocatedLeg; } - public Builder feesAllocatedLeg(String feesAllocatedLeg) { - this.feesAllocatedLeg = feesAllocatedLeg; - return this; + public void setFeesAllocatedLeg(String feesAllocatedLeg) { + this.feesAllocatedLeg = feesAllocatedLeg; } + public static class Builder { + private String legId; - public DestinationAlloc build() { - return new DestinationAlloc(this); + private String portfolioId; + + private String allocationBase; + + private String allocationQuote; + + private String feesAllocatedLeg; + + public Builder legId(String legId) { + this.legId = legId; + return this; + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder allocationBase(String allocationBase) { + this.allocationBase = allocationBase; + return this; + } + + public Builder allocationQuote(String allocationQuote) { + this.allocationQuote = allocationQuote; + return this; + } + + public Builder feesAllocatedLeg(String feesAllocatedLeg) { + this.feesAllocatedLeg = feesAllocatedLeg; + return this; + } + + public DestinationAlloc build() { + return new DestinationAlloc(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/DetailedAddress.java b/src/main/java/com/coinbase/prime/model/DetailedAddress.java index 9627d47..6ef150b 100644 --- a/src/main/java/com/coinbase/prime/model/DetailedAddress.java +++ b/src/main/java/com/coinbase/prime/model/DetailedAddress.java @@ -17,157 +17,150 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** Detailed address information */ public class DetailedAddress { - /** Primary address line */ - @JsonProperty("address_1") - private String address1; - - /** Secondary address line (optional) */ - @JsonProperty("address_2") - private String address2; - - /** Tertiary address line (optional) */ - @JsonProperty("address_3") - private String address3; - - /** City name */ - private String city; - - /** State or province */ - private String state; - - /** ISO 3166-1 alpha-2 country code */ - @JsonProperty("country_code") - private String countryCode; - - /** Postal/ZIP code */ - @JsonProperty("postal_code") - private String postalCode; - - public DetailedAddress() {} - - public DetailedAddress(Builder builder) { - this.address1 = builder.address1; - this.address2 = builder.address2; - this.address3 = builder.address3; - this.city = builder.city; - this.state = builder.state; - this.countryCode = builder.countryCode; - this.postalCode = builder.postalCode; - } + /** Primary address line */ + @JsonProperty("address_1") + private String address1; - public String getAddress1() { - return address1; - } + /** Secondary address line (optional) */ + @JsonProperty("address_2") + private String address2; - public void setAddress1(String address1) { - this.address1 = address1; - } + /** Tertiary address line (optional) */ + @JsonProperty("address_3") + private String address3; - public String getAddress2() { - return address2; - } + /** City name */ + private String city; - public void setAddress2(String address2) { - this.address2 = address2; - } + /** State or province */ + private String state; - public String getAddress3() { - return address3; - } + /** ISO 3166-1 alpha-2 country code */ + @JsonProperty("country_code") + private String countryCode; - public void setAddress3(String address3) { - this.address3 = address3; - } + /** Postal/ZIP code */ + @JsonProperty("postal_code") + private String postalCode; - public String getCity() { - return city; - } + public DetailedAddress() { + } - public void setCity(String city) { - this.city = city; - } + public DetailedAddress(Builder builder) { + this.address1 = builder.address1; + this.address2 = builder.address2; + this.address3 = builder.address3; + this.city = builder.city; + this.state = builder.state; + this.countryCode = builder.countryCode; + this.postalCode = builder.postalCode; + } + public String getAddress1() { + return address1; + } - public String getState() { - return state; - } + public void setAddress1(String address1) { + this.address1 = address1; + } + public String getAddress2() { + return address2; + } - public void setState(String state) { - this.state = state; - } + public void setAddress2(String address2) { + this.address2 = address2; + } + public String getAddress3() { + return address3; + } - public String getCountryCode() { - return countryCode; - } + public void setAddress3(String address3) { + this.address3 = address3; + } + public String getCity() { + return city; + } - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } + public void setCity(String city) { + this.city = city; + } + public String getState() { + return state; + } - public String getPostalCode() { - return postalCode; - } + public void setState(String state) { + this.state = state; + } + public String getCountryCode() { + return countryCode; + } - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + public String getPostalCode() { + return postalCode; + } - public static class Builder { - private String address1; + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } + public static class Builder { + private String address1; - private String address2; + private String address2; - private String address3; + private String address3; - private String city; + private String city; - private String state; + private String state; - private String countryCode; + private String countryCode; - private String postalCode; + private String postalCode; - public Builder address1(String address1) { - this.address1 = address1; - return this; - } + public Builder address1(String address1) { + this.address1 = address1; + return this; + } - public Builder address2(String address2) { - this.address2 = address2; - return this; - } + public Builder address2(String address2) { + this.address2 = address2; + return this; + } - public Builder address3(String address3) { - this.address3 = address3; - return this; - } + public Builder address3(String address3) { + this.address3 = address3; + return this; + } - public Builder city(String city) { - this.city = city; - return this; - } + public Builder city(String city) { + this.city = city; + return this; + } - public Builder state(String state) { - this.state = state; - return this; - } + public Builder state(String state) { + this.state = state; + return this; + } - public Builder countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } + public Builder countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } - public Builder postalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + public Builder postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } - public DetailedAddress build() { - return new DetailedAddress(this); + public DetailedAddress build() { + return new DetailedAddress(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/DisplayUser.java b/src/main/java/com/coinbase/prime/model/DisplayUser.java index db14b2d..d2fb74f 100644 --- a/src/main/java/com/coinbase/prime/model/DisplayUser.java +++ b/src/main/java/com/coinbase/prime/model/DisplayUser.java @@ -17,76 +17,79 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class DisplayUser { - /** User UUID */ - private String id; - - /** User full name */ - private String name; - - /** User avatar URL */ - @JsonProperty("avatar_url") - private String avatarUrl; - - public DisplayUser() {} - - public DisplayUser(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.avatarUrl = builder.avatarUrl; - } + /** + * User UUID + */ + private String id; - public String getId() { - return id; - } + /** + * User full name + */ + private String name; - public void setId(String id) { - this.id = id; - } + /** + * User avatar URL + */ + @JsonProperty("avatar_url") + private String avatarUrl; - public String getName() { - return name; - } + public DisplayUser() { + } - public void setName(String name) { - this.name = name; - } + public DisplayUser(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.avatarUrl = builder.avatarUrl; + } + public String getId() { + return id; + } - public String getAvatarUrl() { - return avatarUrl; - } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } - public void setAvatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - } + public void setName(String name) { + this.name = name; + } + public String getAvatarUrl() { + return avatarUrl; + } - public static class Builder { - private String id; + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl; + } + public static class Builder { + private String id; - private String name; + private String name; - private String avatarUrl; + private String avatarUrl; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Builder avatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - return this; - } + public Builder avatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl; + return this; + } - public DisplayUser build() { - return new DisplayUser(this); + public DisplayUser build() { + return new DisplayUser(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/EntityBalance.java b/src/main/java/com/coinbase/prime/model/EntityBalance.java index ad0fd08..ceb692a 100644 --- a/src/main/java/com/coinbase/prime/model/EntityBalance.java +++ b/src/main/java/com/coinbase/prime/model/EntityBalance.java @@ -17,117 +17,122 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class EntityBalance { - /** The display symbol for the asset */ - private String symbol; - - /** The long balance */ - @JsonProperty("long_amount") - private String longAmount; - - /** The long balance in notional value */ - @JsonProperty("long_notional") - private String longNotional; - - /** The short balance */ - @JsonProperty("short_amount") - private String shortAmount; - - /** The short balance in notional value */ - @JsonProperty("short_notional") - private String shortNotional; - - public EntityBalance() {} - - public EntityBalance(Builder builder) { - this.symbol = builder.symbol; - this.longAmount = builder.longAmount; - this.longNotional = builder.longNotional; - this.shortAmount = builder.shortAmount; - this.shortNotional = builder.shortNotional; - } + /** + * The display symbol for the asset + */ + private String symbol; - public String getSymbol() { - return symbol; - } + /** + * The long balance + */ + @JsonProperty("long_amount") + private String longAmount; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * The long balance in notional value + */ + @JsonProperty("long_notional") + private String longNotional; - public String getLongAmount() { - return longAmount; - } + /** + * The short balance + */ + @JsonProperty("short_amount") + private String shortAmount; - public void setLongAmount(String longAmount) { - this.longAmount = longAmount; - } + /** + * The short balance in notional value + */ + @JsonProperty("short_notional") + private String shortNotional; - public String getLongNotional() { - return longNotional; - } + public EntityBalance() { + } - public void setLongNotional(String longNotional) { - this.longNotional = longNotional; - } + public EntityBalance(Builder builder) { + this.symbol = builder.symbol; + this.longAmount = builder.longAmount; + this.longNotional = builder.longNotional; + this.shortAmount = builder.shortAmount; + this.shortNotional = builder.shortNotional; + } + public String getSymbol() { + return symbol; + } - public String getShortAmount() { - return shortAmount; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getLongAmount() { + return longAmount; + } - public void setShortAmount(String shortAmount) { - this.shortAmount = shortAmount; - } + public void setLongAmount(String longAmount) { + this.longAmount = longAmount; + } + public String getLongNotional() { + return longNotional; + } - public String getShortNotional() { - return shortNotional; - } + public void setLongNotional(String longNotional) { + this.longNotional = longNotional; + } + public String getShortAmount() { + return shortAmount; + } - public void setShortNotional(String shortNotional) { - this.shortNotional = shortNotional; - } + public void setShortAmount(String shortAmount) { + this.shortAmount = shortAmount; + } + public String getShortNotional() { + return shortNotional; + } - public static class Builder { - private String symbol; + public void setShortNotional(String shortNotional) { + this.shortNotional = shortNotional; + } + public static class Builder { + private String symbol; - private String longAmount; + private String longAmount; - private String longNotional; + private String longNotional; - private String shortAmount; + private String shortAmount; - private String shortNotional; + private String shortNotional; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder longAmount(String longAmount) { - this.longAmount = longAmount; - return this; - } + public Builder longAmount(String longAmount) { + this.longAmount = longAmount; + return this; + } - public Builder longNotional(String longNotional) { - this.longNotional = longNotional; - return this; - } + public Builder longNotional(String longNotional) { + this.longNotional = longNotional; + return this; + } - public Builder shortAmount(String shortAmount) { - this.shortAmount = shortAmount; - return this; - } + public Builder shortAmount(String shortAmount) { + this.shortAmount = shortAmount; + return this; + } - public Builder shortNotional(String shortNotional) { - this.shortNotional = shortNotional; - return this; - } + public Builder shortNotional(String shortNotional) { + this.shortNotional = shortNotional; + return this; + } - public EntityBalance build() { - return new EntityBalance(this); + public EntityBalance build() { + return new EntityBalance(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/EntityUser.java b/src/main/java/com/coinbase/prime/model/EntityUser.java index 2e97ec7..c6422d8 100644 --- a/src/main/java/com/coinbase/prime/model/EntityUser.java +++ b/src/main/java/com/coinbase/prime/model/EntityUser.java @@ -17,161 +17,174 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.SecondaryPermission; import com.coinbase.prime.model.enums.UserRole; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class EntityUser { - /** The unique ID of the user */ - private String id; - - /** The name of the user */ - private String name; - - /** The email of the user */ - private String email; - - /** The entity to which this user and associated permissions are identified */ - @JsonProperty("entity_id") - private String entityId; - - /** - * - USER_ROLE_UNKNOWN: nil value - AUDITOR: An auditor - SIGNATORY: A signatory - ADMIN: An admin - * - INITIATOR: An initiator - REVIEWER: A reviewer - TRADER: A trader - FULL_TRADER: A trader - * with full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A - * tax manager - BUSINESS_MANAGER: A business manager - */ - private UserRole role; - - /** All primary roles assigned to the user. */ - private List roles; - - /** All secondary permissions assigned to the user. */ - @JsonProperty("secondary_permissions") - private List secondaryPermissions; - - public EntityUser() {} - - public EntityUser(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.email = builder.email; - this.entityId = builder.entityId; - this.role = builder.role; - this.roles = builder.roles; - this.secondaryPermissions = builder.secondaryPermissions; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getEntityId() { - return entityId; - } - - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - public UserRole getRole() { - return role; - } - - public void setRole(UserRole role) { - this.role = role; - } - - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - - public List getSecondaryPermissions() { - return secondaryPermissions; - } - - public void setSecondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - } - - public static class Builder { + /** + * The unique ID of the user + */ private String id; + /** + * The name of the user + */ private String name; + /** + * The email of the user + */ private String email; + /** + * The entity to which this user and associated permissions are identified + */ + @JsonProperty("entity_id") private String entityId; + /** + * - USER_ROLE_UNKNOWN: nil value + * - AUDITOR: An auditor + * - SIGNATORY: A signatory + * - ADMIN: An admin + * - INITIATOR: An initiator + * - REVIEWER: A reviewer + * - TRADER: A trader + * - FULL_TRADER: A trader with full permissions + * - TEAM_MANAGER: A team manager + * - APPROVER: An approver + * - TAX_MANAGER: A tax manager + * - BUSINESS_MANAGER: A business manager + */ private UserRole role; + /** + * All primary roles assigned to the user. + */ private List roles; + /** + * All secondary permissions assigned to the user. + */ + @JsonProperty("secondary_permissions") private List secondaryPermissions; - public Builder id(String id) { - this.id = id; - return this; + public EntityUser() { } - public Builder name(String name) { - this.name = name; - return this; + public EntityUser(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.email = builder.email; + this.entityId = builder.entityId; + this.role = builder.role; + this.roles = builder.roles; + this.secondaryPermissions = builder.secondaryPermissions; + } + public String getId() { + return id; } - public Builder email(String email) { - this.email = email; - return this; + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; } - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; + public void setName(String name) { + this.name = name; + } + public String getEmail() { + return email; } - public Builder role(UserRole role) { - this.role = role; - return this; + public void setEmail(String email) { + this.email = email; + } + public String getEntityId() { + return entityId; } - public Builder roles(List roles) { - this.roles = roles; - return this; + public void setEntityId(String entityId) { + this.entityId = entityId; + } + public UserRole getRole() { + return role; } - public Builder secondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - return this; + public void setRole(UserRole role) { + this.role = role; + } + public List getRoles() { + return roles; } - public EntityUser build() { - return new EntityUser(this); + public void setRoles(List roles) { + this.roles = roles; + } + public List getSecondaryPermissions() { + return secondaryPermissions; + } + + public void setSecondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + } + public static class Builder { + private String id; + + private String name; + + private String email; + + private String entityId; + + private UserRole role; + + private List roles; + + private List secondaryPermissions; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder email(String email) { + this.email = email; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public Builder role(UserRole role) { + this.role = role; + return this; + } + + public Builder roles(List roles) { + this.roles = roles; + return this; + } + + public Builder secondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + return this; + } + + public EntityUser build() { + return new EntityUser(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java b/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java index cff61ee..fbef7ea 100644 --- a/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java +++ b/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java @@ -17,58 +17,60 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class EstimatedNetworkFees { - /** Estimated lower bound for networks fees (in whole units) */ - @JsonProperty("lower_bound") - private String lowerBound; - - /** Estimated upper bound for network fees (in whole units) */ - @JsonProperty("upper_bound") - private String upperBound; - - public EstimatedNetworkFees() {} - - public EstimatedNetworkFees(Builder builder) { - this.lowerBound = builder.lowerBound; - this.upperBound = builder.upperBound; - } + /** + * Estimated lower bound for networks fees (in whole units) + */ + @JsonProperty("lower_bound") + private String lowerBound; - public String getLowerBound() { - return lowerBound; - } + /** + * Estimated upper bound for network fees (in whole units) + */ + @JsonProperty("upper_bound") + private String upperBound; - public void setLowerBound(String lowerBound) { - this.lowerBound = lowerBound; - } + public EstimatedNetworkFees() { + } - public String getUpperBound() { - return upperBound; - } + public EstimatedNetworkFees(Builder builder) { + this.lowerBound = builder.lowerBound; + this.upperBound = builder.upperBound; + } + public String getLowerBound() { + return lowerBound; + } - public void setUpperBound(String upperBound) { - this.upperBound = upperBound; - } + public void setLowerBound(String lowerBound) { + this.lowerBound = lowerBound; + } + public String getUpperBound() { + return upperBound; + } - public static class Builder { - private String lowerBound; + public void setUpperBound(String upperBound) { + this.upperBound = upperBound; + } + public static class Builder { + private String lowerBound; - private String upperBound; + private String upperBound; - public Builder lowerBound(String lowerBound) { - this.lowerBound = lowerBound; - return this; - } + public Builder lowerBound(String lowerBound) { + this.lowerBound = lowerBound; + return this; + } - public Builder upperBound(String upperBound) { - this.upperBound = upperBound; - return this; - } + public Builder upperBound(String upperBound) { + this.upperBound = upperBound; + return this; + } - public EstimatedNetworkFees build() { - return new EstimatedNetworkFees(this); + public EstimatedNetworkFees build() { + return new EstimatedNetworkFees(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/EvmParams.java b/src/main/java/com/coinbase/prime/model/EvmParams.java index de7c401..486270e 100644 --- a/src/main/java/com/coinbase/prime/model/EvmParams.java +++ b/src/main/java/com/coinbase/prime/model/EvmParams.java @@ -17,129 +17,123 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class EvmParams { - /** - * Option to disable dynamic gas price adjustment for EVM transactions prior to signing and - * broadcast. Defaults to false. - */ - @JsonProperty("disable_dynamic_gas") - private boolean disableDynamicGas; - - /** Option to disable dynamic nonce when creating a transaction. Defaults to false. */ - @JsonProperty("disable_dynamic_nonce") - private boolean disableDynamicNonce; - - /** - * Transaction ID to replace (for speed-up/cancel operations). Common use cases: 1) Gas Price - * Adjustments: When a transaction is stuck due to low gas price, a new transaction with the same - * nonce but higher gas price can be submitted to replace it. 2) Transaction Cancellation: A user - * might want to cancel a pending transaction by replacing it with a new transaction (often a - * 0-value transfer to themselves with higher gas price). Note: When using this field, the - * disable_dynamic_nonce option must be set to false because the nonce would be automatically - * managed by the system. - */ - @JsonProperty("replaced_transaction_id") - private String replacedTransactionId; - - /** Chain ID for EVM transactions. (EVM-only) */ - @JsonProperty("chain_id") - private String chainId; - - /** Network name for EVM transactions. (EVM-only) */ - @JsonProperty("network_name") - private String networkName; - - public EvmParams() {} - - public EvmParams(Builder builder) { - this.disableDynamicGas = builder.disableDynamicGas; - this.disableDynamicNonce = builder.disableDynamicNonce; - this.replacedTransactionId = builder.replacedTransactionId; - this.chainId = builder.chainId; - this.networkName = builder.networkName; - } - - public boolean getDisableDynamicGas() { - return disableDynamicGas; - } - - public void setDisableDynamicGas(boolean disableDynamicGas) { - this.disableDynamicGas = disableDynamicGas; - } - - public boolean getDisableDynamicNonce() { - return disableDynamicNonce; - } - - public void setDisableDynamicNonce(boolean disableDynamicNonce) { - this.disableDynamicNonce = disableDynamicNonce; - } - - public String getReplacedTransactionId() { - return replacedTransactionId; - } - - public void setReplacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - } - - public String getChainId() { - return chainId; - } - - public void setChainId(String chainId) { - this.chainId = chainId; - } - - public String getNetworkName() { - return networkName; - } - - public void setNetworkName(String networkName) { - this.networkName = networkName; - } - - public static class Builder { + /** + * Option to disable dynamic gas price adjustment for EVM transactions prior to signing and broadcast. Defaults to false. + */ + @JsonProperty("disable_dynamic_gas") private boolean disableDynamicGas; + /** + * Option to disable dynamic nonce when creating a transaction. Defaults to false. + */ + @JsonProperty("disable_dynamic_nonce") private boolean disableDynamicNonce; + /** + * Transaction ID to replace (for speed-up/cancel operations). Common use cases: 1) Gas Price Adjustments: When a transaction is stuck due to low gas price, a new transaction with the same nonce but higher gas price can be submitted to replace it. 2) Transaction Cancellation: A user might want to cancel a pending transaction by replacing it with a new transaction (often a 0-value transfer to themselves with higher gas price). Note: When using this field, the disable_dynamic_nonce option must be set to false because the nonce would be automatically managed by the system. + */ + @JsonProperty("replaced_transaction_id") private String replacedTransactionId; + /** + * Chain ID for EVM transactions. (EVM-only) + */ + @JsonProperty("chain_id") private String chainId; + /** + * Network name for EVM transactions. (EVM-only) + */ + @JsonProperty("network_name") private String networkName; - public Builder disableDynamicGas(boolean disableDynamicGas) { - this.disableDynamicGas = disableDynamicGas; - return this; + public EvmParams() { + } + + public EvmParams(Builder builder) { + this.disableDynamicGas = builder.disableDynamicGas; + this.disableDynamicNonce = builder.disableDynamicNonce; + this.replacedTransactionId = builder.replacedTransactionId; + this.chainId = builder.chainId; + this.networkName = builder.networkName; + } + public boolean getDisableDynamicGas() { + return disableDynamicGas; + } + + public void setDisableDynamicGas(boolean disableDynamicGas) { + this.disableDynamicGas = disableDynamicGas; + } + public boolean getDisableDynamicNonce() { + return disableDynamicNonce; } - public Builder disableDynamicNonce(boolean disableDynamicNonce) { - this.disableDynamicNonce = disableDynamicNonce; - return this; + public void setDisableDynamicNonce(boolean disableDynamicNonce) { + this.disableDynamicNonce = disableDynamicNonce; + } + public String getReplacedTransactionId() { + return replacedTransactionId; } - public Builder replacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - return this; + public void setReplacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + } + public String getChainId() { + return chainId; } - public Builder chainId(String chainId) { - this.chainId = chainId; - return this; + public void setChainId(String chainId) { + this.chainId = chainId; + } + public String getNetworkName() { + return networkName; } - public Builder networkName(String networkName) { - this.networkName = networkName; - return this; + public void setNetworkName(String networkName) { + this.networkName = networkName; } + public static class Builder { + private boolean disableDynamicGas; - public EvmParams build() { - return new EvmParams(this); + private boolean disableDynamicNonce; + + private String replacedTransactionId; + + private String chainId; + + private String networkName; + + public Builder disableDynamicGas(boolean disableDynamicGas) { + this.disableDynamicGas = disableDynamicGas; + return this; + } + + public Builder disableDynamicNonce(boolean disableDynamicNonce) { + this.disableDynamicNonce = disableDynamicNonce; + return this; + } + + public Builder replacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + return this; + } + + public Builder chainId(String chainId) { + this.chainId = chainId; + return this; + } + + public Builder networkName(String networkName) { + this.networkName = networkName; + return this; + } + + public EvmParams build() { + return new EvmParams(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ExistingLocate.java b/src/main/java/com/coinbase/prime/model/ExistingLocate.java index c8a65d3..758af2b 100644 --- a/src/main/java/com/coinbase/prime/model/ExistingLocate.java +++ b/src/main/java/com/coinbase/prime/model/ExistingLocate.java @@ -17,236 +17,247 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class ExistingLocate { - /** The locate ID */ - @JsonProperty("locate_id") - private String locateId; - - /** The unique ID of the entity */ - @JsonProperty("entity_id") - private String entityId; - - /** The unique ID of the portfolio */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The currency symbol */ - private String symbol; - - /** The requested locate amount */ - @JsonProperty("requested_amount") - private String requestedAmount; - - /** The interest rate of PM loan */ - @JsonProperty("interest_rate") - private String interestRate; - - /** The locate status */ - private String status; - - /** The approved locate amount */ - @JsonProperty("approved_amount") - private String approvedAmount; - - /** Deprecated: Use locate_date instead */ - @JsonProperty("conversion_date") - private String conversionDate; - - /** The date when the locate was submitted in RFC3339 format */ - @JsonProperty("created_at") - private String createdAt; - - /** The locate date from the CreateNewLocatesRequest in RFC3339 format */ - @JsonProperty("locate_date") - private String locateDate; - - public ExistingLocate() {} - - public ExistingLocate(Builder builder) { - this.locateId = builder.locateId; - this.entityId = builder.entityId; - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.requestedAmount = builder.requestedAmount; - this.interestRate = builder.interestRate; - this.status = builder.status; - this.approvedAmount = builder.approvedAmount; - this.conversionDate = builder.conversionDate; - this.createdAt = builder.createdAt; - this.locateDate = builder.locateDate; - } - - public String getLocateId() { - return locateId; - } - - public void setLocateId(String locateId) { - this.locateId = locateId; - } - - public String getEntityId() { - return entityId; - } - - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - public String getRequestedAmount() { - return requestedAmount; - } - - public void setRequestedAmount(String requestedAmount) { - this.requestedAmount = requestedAmount; - } - - public String getInterestRate() { - return interestRate; - } - - public void setInterestRate(String interestRate) { - this.interestRate = interestRate; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getApprovedAmount() { - return approvedAmount; - } - - public void setApprovedAmount(String approvedAmount) { - this.approvedAmount = approvedAmount; - } - - public String getConversionDate() { - return conversionDate; - } - - public void setConversionDate(String conversionDate) { - this.conversionDate = conversionDate; - } - - public String getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(String createdAt) { - this.createdAt = createdAt; - } - - public String getLocateDate() { - return locateDate; - } - - public void setLocateDate(String locateDate) { - this.locateDate = locateDate; - } - - public static class Builder { + /** + * The locate ID + */ + @JsonProperty("locate_id") private String locateId; + /** + * The unique ID of the entity + */ + @JsonProperty("entity_id") private String entityId; + /** + * The unique ID of the portfolio + */ + @JsonProperty("portfolio_id") private String portfolioId; + /** + * The currency symbol + */ private String symbol; + /** + * The requested locate amount + */ + @JsonProperty("requested_amount") private String requestedAmount; + /** + * The interest rate of PM loan + */ + @JsonProperty("interest_rate") private String interestRate; + /** + * The locate status + */ private String status; + /** + * The approved locate amount + */ + @JsonProperty("approved_amount") private String approvedAmount; + /** + * Deprecated: Use locate_date instead + */ + @JsonProperty("conversion_date") private String conversionDate; + /** + * The date when the locate was submitted in RFC3339 format + */ + @JsonProperty("created_at") private String createdAt; + /** + * The locate date from the CreateNewLocatesRequest in RFC3339 format + */ + @JsonProperty("locate_date") private String locateDate; - public Builder locateId(String locateId) { - this.locateId = locateId; - return this; + public ExistingLocate() { } - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; + public ExistingLocate(Builder builder) { + this.locateId = builder.locateId; + this.entityId = builder.entityId; + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.requestedAmount = builder.requestedAmount; + this.interestRate = builder.interestRate; + this.status = builder.status; + this.approvedAmount = builder.approvedAmount; + this.conversionDate = builder.conversionDate; + this.createdAt = builder.createdAt; + this.locateDate = builder.locateDate; + } + public String getLocateId() { + return locateId; } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; + public void setLocateId(String locateId) { + this.locateId = locateId; + } + public String getEntityId() { + return entityId; } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; + public void setEntityId(String entityId) { + this.entityId = entityId; + } + public String getPortfolioId() { + return portfolioId; } - public Builder requestedAmount(String requestedAmount) { - this.requestedAmount = requestedAmount; - return this; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getSymbol() { + return symbol; } - public Builder interestRate(String interestRate) { - this.interestRate = interestRate; - return this; + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getRequestedAmount() { + return requestedAmount; } - public Builder status(String status) { - this.status = status; - return this; + public void setRequestedAmount(String requestedAmount) { + this.requestedAmount = requestedAmount; + } + public String getInterestRate() { + return interestRate; } - public Builder approvedAmount(String approvedAmount) { - this.approvedAmount = approvedAmount; - return this; + public void setInterestRate(String interestRate) { + this.interestRate = interestRate; + } + public String getStatus() { + return status; } - public Builder conversionDate(String conversionDate) { - this.conversionDate = conversionDate; - return this; + public void setStatus(String status) { + this.status = status; + } + public String getApprovedAmount() { + return approvedAmount; } - public Builder createdAt(String createdAt) { - this.createdAt = createdAt; - return this; + public void setApprovedAmount(String approvedAmount) { + this.approvedAmount = approvedAmount; + } + public String getConversionDate() { + return conversionDate; } - public Builder locateDate(String locateDate) { - this.locateDate = locateDate; - return this; + public void setConversionDate(String conversionDate) { + this.conversionDate = conversionDate; } + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + public String getLocateDate() { + return locateDate; + } + + public void setLocateDate(String locateDate) { + this.locateDate = locateDate; + } + public static class Builder { + private String locateId; + + private String entityId; + + private String portfolioId; + + private String symbol; - public ExistingLocate build() { - return new ExistingLocate(this); + private String requestedAmount; + + private String interestRate; + + private String status; + + private String approvedAmount; + + private String conversionDate; + + private String createdAt; + + private String locateDate; + + public Builder locateId(String locateId) { + this.locateId = locateId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder requestedAmount(String requestedAmount) { + this.requestedAmount = requestedAmount; + return this; + } + + public Builder interestRate(String interestRate) { + this.interestRate = interestRate; + return this; + } + + public Builder status(String status) { + this.status = status; + return this; + } + + public Builder approvedAmount(String approvedAmount) { + this.approvedAmount = approvedAmount; + return this; + } + + public Builder conversionDate(String conversionDate) { + this.conversionDate = conversionDate; + return this; + } + + public Builder createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder locateDate(String locateDate) { + this.locateDate = locateDate; + return this; + } + + public ExistingLocate build() { + return new ExistingLocate(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java index a727e2e..696588e 100644 --- a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java @@ -17,137 +17,139 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.FcmMarginCallState; import com.coinbase.prime.model.enums.FcmMarginCallType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class FcmMarginCall { - private FcmMarginCallType type; - - private FcmMarginCallState state; - - /** Initial margin call amount to settle */ - @JsonProperty("initial_amount") - private String initialAmount; - - /** Remaining margin call amount to settle */ - @JsonProperty("remaining_amount") - private String remainingAmount; - - /** Business date when the margin call was opened */ - @JsonProperty("business_date") - private OffsetDateTime businessDate; - - /** The deadline by which the margin call must be satisfied */ - @JsonProperty("cure_deadline") - private OffsetDateTime cureDeadline; - - public FcmMarginCall() {} - - public FcmMarginCall(Builder builder) { - this.type = builder.type; - this.state = builder.state; - this.initialAmount = builder.initialAmount; - this.remainingAmount = builder.remainingAmount; - this.businessDate = builder.businessDate; - this.cureDeadline = builder.cureDeadline; - } + private FcmMarginCallType type; - public FcmMarginCallType getType() { - return type; - } + private FcmMarginCallState state; - public void setType(FcmMarginCallType type) { - this.type = type; - } + /** + * Initial margin call amount to settle + */ + @JsonProperty("initial_amount") + private String initialAmount; - public FcmMarginCallState getState() { - return state; - } + /** + * Remaining margin call amount to settle + */ + @JsonProperty("remaining_amount") + private String remainingAmount; - public void setState(FcmMarginCallState state) { - this.state = state; - } + /** + * Business date when the margin call was opened + */ + @JsonProperty("business_date") + private OffsetDateTime businessDate; - public String getInitialAmount() { - return initialAmount; - } + /** + * The deadline by which the margin call must be satisfied + */ + @JsonProperty("cure_deadline") + private OffsetDateTime cureDeadline; - public void setInitialAmount(String initialAmount) { - this.initialAmount = initialAmount; - } + public FcmMarginCall() { + } - public String getRemainingAmount() { - return remainingAmount; - } + public FcmMarginCall(Builder builder) { + this.type = builder.type; + this.state = builder.state; + this.initialAmount = builder.initialAmount; + this.remainingAmount = builder.remainingAmount; + this.businessDate = builder.businessDate; + this.cureDeadline = builder.cureDeadline; + } + public FcmMarginCallType getType() { + return type; + } - public void setRemainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - } + public void setType(FcmMarginCallType type) { + this.type = type; + } + public FcmMarginCallState getState() { + return state; + } - public OffsetDateTime getBusinessDate() { - return businessDate; - } + public void setState(FcmMarginCallState state) { + this.state = state; + } + public String getInitialAmount() { + return initialAmount; + } - public void setBusinessDate(OffsetDateTime businessDate) { - this.businessDate = businessDate; - } + public void setInitialAmount(String initialAmount) { + this.initialAmount = initialAmount; + } + public String getRemainingAmount() { + return remainingAmount; + } - public OffsetDateTime getCureDeadline() { - return cureDeadline; - } + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } + public OffsetDateTime getBusinessDate() { + return businessDate; + } - public void setCureDeadline(OffsetDateTime cureDeadline) { - this.cureDeadline = cureDeadline; - } + public void setBusinessDate(OffsetDateTime businessDate) { + this.businessDate = businessDate; + } + public OffsetDateTime getCureDeadline() { + return cureDeadline; + } - public static class Builder { - private FcmMarginCallType type; + public void setCureDeadline(OffsetDateTime cureDeadline) { + this.cureDeadline = cureDeadline; + } + public static class Builder { + private FcmMarginCallType type; - private FcmMarginCallState state; + private FcmMarginCallState state; - private String initialAmount; + private String initialAmount; - private String remainingAmount; + private String remainingAmount; - private OffsetDateTime businessDate; + private OffsetDateTime businessDate; - private OffsetDateTime cureDeadline; + private OffsetDateTime cureDeadline; - public Builder type(FcmMarginCallType type) { - this.type = type; - return this; - } + public Builder type(FcmMarginCallType type) { + this.type = type; + return this; + } - public Builder state(FcmMarginCallState state) { - this.state = state; - return this; - } + public Builder state(FcmMarginCallState state) { + this.state = state; + return this; + } - public Builder initialAmount(String initialAmount) { - this.initialAmount = initialAmount; - return this; - } + public Builder initialAmount(String initialAmount) { + this.initialAmount = initialAmount; + return this; + } - public Builder remainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - return this; - } + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; + } - public Builder businessDate(OffsetDateTime businessDate) { - this.businessDate = businessDate; - return this; - } + public Builder businessDate(OffsetDateTime businessDate) { + this.businessDate = businessDate; + return this; + } - public Builder cureDeadline(OffsetDateTime cureDeadline) { - this.cureDeadline = cureDeadline; - return this; - } + public Builder cureDeadline(OffsetDateTime cureDeadline) { + this.cureDeadline = cureDeadline; + return this; + } - public FcmMarginCall build() { - return new FcmMarginCall(this); + public FcmMarginCall build() { + return new FcmMarginCall(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/FcmPosition.java b/src/main/java/com/coinbase/prime/model/FcmPosition.java index f3ea0a3..cfa33e9 100644 --- a/src/main/java/com/coinbase/prime/model/FcmPosition.java +++ b/src/main/java/com/coinbase/prime/model/FcmPosition.java @@ -17,178 +17,184 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.FcmPositionSide; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class FcmPosition { - /** Product ID */ - @JsonProperty("product_id") - private String productId; - - private FcmPositionSide side; - - /** Number of contracts */ - @JsonProperty("number_of_contracts") - private String numberOfContracts; - - /** Daily realized PNL */ - @JsonProperty("daily_realized_pnl") - private String dailyRealizedPnl; - - /** Unrealized PNL */ - @JsonProperty("unrealized_pnl") - private String unrealizedPnl; - - /** Current price of position */ - @JsonProperty("current_price") - private String currentPrice; - - /** Average entry price */ - @JsonProperty("avg_entry_price") - private String avgEntryPrice; - - /** Expiration time of position */ - @JsonProperty("expiration_time") - private OffsetDateTime expirationTime; - - public FcmPosition() {} - - public FcmPosition(Builder builder) { - this.productId = builder.productId; - this.side = builder.side; - this.numberOfContracts = builder.numberOfContracts; - this.dailyRealizedPnl = builder.dailyRealizedPnl; - this.unrealizedPnl = builder.unrealizedPnl; - this.currentPrice = builder.currentPrice; - this.avgEntryPrice = builder.avgEntryPrice; - this.expirationTime = builder.expirationTime; - } - - public String getProductId() { - return productId; - } - - public void setProductId(String productId) { - this.productId = productId; - } - - public FcmPositionSide getSide() { - return side; - } - - public void setSide(FcmPositionSide side) { - this.side = side; - } - - public String getNumberOfContracts() { - return numberOfContracts; - } - - public void setNumberOfContracts(String numberOfContracts) { - this.numberOfContracts = numberOfContracts; - } - - public String getDailyRealizedPnl() { - return dailyRealizedPnl; - } - - public void setDailyRealizedPnl(String dailyRealizedPnl) { - this.dailyRealizedPnl = dailyRealizedPnl; - } - - public String getUnrealizedPnl() { - return unrealizedPnl; - } - - public void setUnrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - } - - public String getCurrentPrice() { - return currentPrice; - } - - public void setCurrentPrice(String currentPrice) { - this.currentPrice = currentPrice; - } - - public String getAvgEntryPrice() { - return avgEntryPrice; - } - - public void setAvgEntryPrice(String avgEntryPrice) { - this.avgEntryPrice = avgEntryPrice; - } - - public OffsetDateTime getExpirationTime() { - return expirationTime; - } - - public void setExpirationTime(OffsetDateTime expirationTime) { - this.expirationTime = expirationTime; - } - - public static class Builder { + /** + * Product ID + */ + @JsonProperty("product_id") private String productId; private FcmPositionSide side; + /** + * Number of contracts + */ + @JsonProperty("number_of_contracts") private String numberOfContracts; + /** + * Daily realized PNL + */ + @JsonProperty("daily_realized_pnl") private String dailyRealizedPnl; + /** + * Unrealized PNL + */ + @JsonProperty("unrealized_pnl") private String unrealizedPnl; + /** + * Current price of position + */ + @JsonProperty("current_price") private String currentPrice; + /** + * Average entry price + */ + @JsonProperty("avg_entry_price") private String avgEntryPrice; + /** + * Expiration time of position + */ + @JsonProperty("expiration_time") private OffsetDateTime expirationTime; - public Builder productId(String productId) { - this.productId = productId; - return this; + public FcmPosition() { } - public Builder side(FcmPositionSide side) { - this.side = side; - return this; + public FcmPosition(Builder builder) { + this.productId = builder.productId; + this.side = builder.side; + this.numberOfContracts = builder.numberOfContracts; + this.dailyRealizedPnl = builder.dailyRealizedPnl; + this.unrealizedPnl = builder.unrealizedPnl; + this.currentPrice = builder.currentPrice; + this.avgEntryPrice = builder.avgEntryPrice; + this.expirationTime = builder.expirationTime; + } + public String getProductId() { + return productId; } - public Builder numberOfContracts(String numberOfContracts) { - this.numberOfContracts = numberOfContracts; - return this; + public void setProductId(String productId) { + this.productId = productId; + } + public FcmPositionSide getSide() { + return side; } - public Builder dailyRealizedPnl(String dailyRealizedPnl) { - this.dailyRealizedPnl = dailyRealizedPnl; - return this; + public void setSide(FcmPositionSide side) { + this.side = side; + } + public String getNumberOfContracts() { + return numberOfContracts; } - public Builder unrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - return this; + public void setNumberOfContracts(String numberOfContracts) { + this.numberOfContracts = numberOfContracts; + } + public String getDailyRealizedPnl() { + return dailyRealizedPnl; } - public Builder currentPrice(String currentPrice) { - this.currentPrice = currentPrice; - return this; + public void setDailyRealizedPnl(String dailyRealizedPnl) { + this.dailyRealizedPnl = dailyRealizedPnl; + } + public String getUnrealizedPnl() { + return unrealizedPnl; } - public Builder avgEntryPrice(String avgEntryPrice) { - this.avgEntryPrice = avgEntryPrice; - return this; + public void setUnrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + } + public String getCurrentPrice() { + return currentPrice; } - public Builder expirationTime(OffsetDateTime expirationTime) { - this.expirationTime = expirationTime; - return this; + public void setCurrentPrice(String currentPrice) { + this.currentPrice = currentPrice; } + public String getAvgEntryPrice() { + return avgEntryPrice; + } + + public void setAvgEntryPrice(String avgEntryPrice) { + this.avgEntryPrice = avgEntryPrice; + } + public OffsetDateTime getExpirationTime() { + return expirationTime; + } + + public void setExpirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + } + public static class Builder { + private String productId; + + private FcmPositionSide side; - public FcmPosition build() { - return new FcmPosition(this); + private String numberOfContracts; + + private String dailyRealizedPnl; + + private String unrealizedPnl; + + private String currentPrice; + + private String avgEntryPrice; + + private OffsetDateTime expirationTime; + + public Builder productId(String productId) { + this.productId = productId; + return this; + } + + public Builder side(FcmPositionSide side) { + this.side = side; + return this; + } + + public Builder numberOfContracts(String numberOfContracts) { + this.numberOfContracts = numberOfContracts; + return this; + } + + public Builder dailyRealizedPnl(String dailyRealizedPnl) { + this.dailyRealizedPnl = dailyRealizedPnl; + return this; + } + + public Builder unrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + return this; + } + + public Builder currentPrice(String currentPrice) { + this.currentPrice = currentPrice; + return this; + } + + public Builder avgEntryPrice(String avgEntryPrice) { + this.avgEntryPrice = avgEntryPrice; + return this; + } + + public Builder expirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + public FcmPosition build() { + return new FcmPosition(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java index c00b686..9edaba2 100644 --- a/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java +++ b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java @@ -17,60 +17,62 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** FcmScheduledMaintenance contains scheduled maintenance window information */ public class FcmScheduledMaintenance { - /** Maintenance window start time */ - @JsonProperty("start_time") - private OffsetDateTime startTime; - - /** Maintenance window end time */ - @JsonProperty("end_time") - private OffsetDateTime endTime; - - public FcmScheduledMaintenance() {} - - public FcmScheduledMaintenance(Builder builder) { - this.startTime = builder.startTime; - this.endTime = builder.endTime; - } + /** + * Maintenance window start time + */ + @JsonProperty("start_time") + private OffsetDateTime startTime; - public OffsetDateTime getStartTime() { - return startTime; - } + /** + * Maintenance window end time + */ + @JsonProperty("end_time") + private OffsetDateTime endTime; - public void setStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - } + public FcmScheduledMaintenance() { + } - public OffsetDateTime getEndTime() { - return endTime; - } + public FcmScheduledMaintenance(Builder builder) { + this.startTime = builder.startTime; + this.endTime = builder.endTime; + } + public OffsetDateTime getStartTime() { + return startTime; + } - public void setEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - } + public void setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + } + public OffsetDateTime getEndTime() { + return endTime; + } - public static class Builder { - private OffsetDateTime startTime; + public void setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + } + public static class Builder { + private OffsetDateTime startTime; - private OffsetDateTime endTime; + private OffsetDateTime endTime; - public Builder startTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } + public Builder startTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } - public Builder endTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } + public Builder endTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } - public FcmScheduledMaintenance build() { - return new FcmScheduledMaintenance(this); + public FcmScheduledMaintenance build() { + return new FcmScheduledMaintenance(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java index adf59b8..a90e7e8 100644 --- a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java +++ b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java @@ -17,7 +17,7 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.FcmScheduledMaintenance; import com.coinbase.prime.model.enums.FcmTradingSessionClosedReason; import com.coinbase.prime.model.enums.FcmTradingSessionState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,204 +25,209 @@ /** FcmTradingSessionDetails contains trading session details for FCM products */ public class FcmTradingSessionDetails { - /** Whether the trading session is currently open */ - @JsonProperty("session_open") - private boolean sessionOpen; - - /** Trading session open time */ - @JsonProperty("open_time") - private OffsetDateTime openTime; - - /** Trading session close time */ - @JsonProperty("close_time") - private OffsetDateTime closeTime; - - /** - * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state - - * FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled - - * FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled - - * FCM_TRADING_SESSION_STATE_OPEN: Trading session is open - FCM_TRADING_SESSION_STATE_CLOSE: - * Trading session is closed - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted - */ - @JsonProperty("session_state") - private FcmTradingSessionState sessionState; - - /** Whether after-hours order entry is disabled */ - @JsonProperty("after_hours_order_entry_disabled") - private boolean afterHoursOrderEntryDisabled; - - /** - * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason - - * FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close - - * FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance - - * FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance - */ - @JsonProperty("closed_reason") - private FcmTradingSessionClosedReason closedReason; - - /** FcmScheduledMaintenance contains scheduled maintenance window information */ - private FcmScheduledMaintenance maintenance; - - /** Settlement timestamp from previous trading day */ - @JsonProperty("settlement_timestamp") - private OffsetDateTime settlementTimestamp; - - /** Settlement price from previous trading day */ - @JsonProperty("settlement_price") - private String settlementPrice; - - public FcmTradingSessionDetails() {} - - public FcmTradingSessionDetails(Builder builder) { - this.sessionOpen = builder.sessionOpen; - this.openTime = builder.openTime; - this.closeTime = builder.closeTime; - this.sessionState = builder.sessionState; - this.afterHoursOrderEntryDisabled = builder.afterHoursOrderEntryDisabled; - this.closedReason = builder.closedReason; - this.maintenance = builder.maintenance; - this.settlementTimestamp = builder.settlementTimestamp; - this.settlementPrice = builder.settlementPrice; - } - - public boolean getSessionOpen() { - return sessionOpen; - } - - public void setSessionOpen(boolean sessionOpen) { - this.sessionOpen = sessionOpen; - } - - public OffsetDateTime getOpenTime() { - return openTime; - } - - public void setOpenTime(OffsetDateTime openTime) { - this.openTime = openTime; - } - - public OffsetDateTime getCloseTime() { - return closeTime; - } - - public void setCloseTime(OffsetDateTime closeTime) { - this.closeTime = closeTime; - } - - public FcmTradingSessionState getSessionState() { - return sessionState; - } - - public void setSessionState(FcmTradingSessionState sessionState) { - this.sessionState = sessionState; - } - - public boolean getAfterHoursOrderEntryDisabled() { - return afterHoursOrderEntryDisabled; - } - - public void setAfterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { - this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; - } - - public FcmTradingSessionClosedReason getClosedReason() { - return closedReason; - } - - public void setClosedReason(FcmTradingSessionClosedReason closedReason) { - this.closedReason = closedReason; - } - - public FcmScheduledMaintenance getMaintenance() { - return maintenance; - } - - public void setMaintenance(FcmScheduledMaintenance maintenance) { - this.maintenance = maintenance; - } - - public OffsetDateTime getSettlementTimestamp() { - return settlementTimestamp; - } - - public void setSettlementTimestamp(OffsetDateTime settlementTimestamp) { - this.settlementTimestamp = settlementTimestamp; - } - - public String getSettlementPrice() { - return settlementPrice; - } - - public void setSettlementPrice(String settlementPrice) { - this.settlementPrice = settlementPrice; - } - - public static class Builder { + /** + * Whether the trading session is currently open + */ + @JsonProperty("session_open") private boolean sessionOpen; + /** + * Trading session open time + */ + @JsonProperty("open_time") private OffsetDateTime openTime; + /** + * Trading session close time + */ + @JsonProperty("close_time") private OffsetDateTime closeTime; + /** + * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state + * - FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled + * - FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled + * - FCM_TRADING_SESSION_STATE_OPEN: Trading session is open + * - FCM_TRADING_SESSION_STATE_CLOSE: Trading session is closed + * - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted + */ + @JsonProperty("session_state") private FcmTradingSessionState sessionState; + /** + * Whether after-hours order entry is disabled + */ + @JsonProperty("after_hours_order_entry_disabled") private boolean afterHoursOrderEntryDisabled; + /** + * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason + * - FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close + * - FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance + * - FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance + */ + @JsonProperty("closed_reason") private FcmTradingSessionClosedReason closedReason; + /** FcmScheduledMaintenance contains scheduled maintenance window information */ private FcmScheduledMaintenance maintenance; + /** + * Settlement timestamp from previous trading day + */ + @JsonProperty("settlement_timestamp") private OffsetDateTime settlementTimestamp; + /** + * Settlement price from previous trading day + */ + @JsonProperty("settlement_price") private String settlementPrice; - public Builder sessionOpen(boolean sessionOpen) { - this.sessionOpen = sessionOpen; - return this; + public FcmTradingSessionDetails() { + } + + public FcmTradingSessionDetails(Builder builder) { + this.sessionOpen = builder.sessionOpen; + this.openTime = builder.openTime; + this.closeTime = builder.closeTime; + this.sessionState = builder.sessionState; + this.afterHoursOrderEntryDisabled = builder.afterHoursOrderEntryDisabled; + this.closedReason = builder.closedReason; + this.maintenance = builder.maintenance; + this.settlementTimestamp = builder.settlementTimestamp; + this.settlementPrice = builder.settlementPrice; + } + public boolean getSessionOpen() { + return sessionOpen; + } + + public void setSessionOpen(boolean sessionOpen) { + this.sessionOpen = sessionOpen; + } + public OffsetDateTime getOpenTime() { + return openTime; } - public Builder openTime(OffsetDateTime openTime) { - this.openTime = openTime; - return this; + public void setOpenTime(OffsetDateTime openTime) { + this.openTime = openTime; + } + public OffsetDateTime getCloseTime() { + return closeTime; } - public Builder closeTime(OffsetDateTime closeTime) { - this.closeTime = closeTime; - return this; + public void setCloseTime(OffsetDateTime closeTime) { + this.closeTime = closeTime; + } + public FcmTradingSessionState getSessionState() { + return sessionState; } - public Builder sessionState(FcmTradingSessionState sessionState) { - this.sessionState = sessionState; - return this; + public void setSessionState(FcmTradingSessionState sessionState) { + this.sessionState = sessionState; + } + public boolean getAfterHoursOrderEntryDisabled() { + return afterHoursOrderEntryDisabled; } - public Builder afterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { - this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; - return this; + public void setAfterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { + this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; + } + public FcmTradingSessionClosedReason getClosedReason() { + return closedReason; } - public Builder closedReason(FcmTradingSessionClosedReason closedReason) { - this.closedReason = closedReason; - return this; + public void setClosedReason(FcmTradingSessionClosedReason closedReason) { + this.closedReason = closedReason; + } + public FcmScheduledMaintenance getMaintenance() { + return maintenance; } - public Builder maintenance(FcmScheduledMaintenance maintenance) { - this.maintenance = maintenance; - return this; + public void setMaintenance(FcmScheduledMaintenance maintenance) { + this.maintenance = maintenance; + } + public OffsetDateTime getSettlementTimestamp() { + return settlementTimestamp; } - public Builder settlementTimestamp(OffsetDateTime settlementTimestamp) { - this.settlementTimestamp = settlementTimestamp; - return this; + public void setSettlementTimestamp(OffsetDateTime settlementTimestamp) { + this.settlementTimestamp = settlementTimestamp; + } + public String getSettlementPrice() { + return settlementPrice; } - public Builder settlementPrice(String settlementPrice) { - this.settlementPrice = settlementPrice; - return this; + public void setSettlementPrice(String settlementPrice) { + this.settlementPrice = settlementPrice; } + public static class Builder { + private boolean sessionOpen; + + private OffsetDateTime openTime; + + private OffsetDateTime closeTime; - public FcmTradingSessionDetails build() { - return new FcmTradingSessionDetails(this); + private FcmTradingSessionState sessionState; + + private boolean afterHoursOrderEntryDisabled; + + private FcmTradingSessionClosedReason closedReason; + + private FcmScheduledMaintenance maintenance; + + private OffsetDateTime settlementTimestamp; + + private String settlementPrice; + + public Builder sessionOpen(boolean sessionOpen) { + this.sessionOpen = sessionOpen; + return this; + } + + public Builder openTime(OffsetDateTime openTime) { + this.openTime = openTime; + return this; + } + + public Builder closeTime(OffsetDateTime closeTime) { + this.closeTime = closeTime; + return this; + } + + public Builder sessionState(FcmTradingSessionState sessionState) { + this.sessionState = sessionState; + return this; + } + + public Builder afterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { + this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; + return this; + } + + public Builder closedReason(FcmTradingSessionClosedReason closedReason) { + this.closedReason = closedReason; + return this; + } + + public Builder maintenance(FcmScheduledMaintenance maintenance) { + this.maintenance = maintenance; + return this; + } + + public Builder settlementTimestamp(OffsetDateTime settlementTimestamp) { + this.settlementTimestamp = settlementTimestamp; + return this; + } + + public Builder settlementPrice(String settlementPrice) { + this.settlementPrice = settlementPrice; + return this; + } + + public FcmTradingSessionDetails build() { + return new FcmTradingSessionDetails(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Fill.java b/src/main/java/com/coinbase/prime/model/Fill.java index 5a000cf..77b81f0 100644 --- a/src/main/java/com/coinbase/prime/model/Fill.java +++ b/src/main/java/com/coinbase/prime/model/Fill.java @@ -17,314 +17,332 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.CommissionDetailTotal; import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.ProductType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class Fill { - /** The unique ID of the fill */ - private String id; - - /** The order ID of the fill */ - @JsonProperty("order_id") - private String orderId; - - /** The product ID of the fill */ - @JsonProperty("product_id") - private String productId; - - /** The client product ID of the fill indictating the settlment currency */ - @JsonProperty("client_product_id") - private String clientProductId; - - /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ - private OrderSide side; - - /** Filled size (in base asset units) */ - @JsonProperty("filled_quantity") - private String filledQuantity; - - /** Filled value (in quote asset units) */ - @JsonProperty("filled_value") - private String filledValue; - - /** The price of the fill */ - private String price; - - /** The date and time of the fill */ - private OffsetDateTime time; - - /** The commission incurred for the fill */ - private String commission; - - /** The name of the venue */ - private String venue; - - /** The venue fees incurred for the fill */ - @JsonProperty("venue_fees") - private String venueFees; - - /** The CES commission incurred for the fill */ - @JsonProperty("ces_commission") - private String cesCommission; - - /** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ - @JsonProperty("product_type") - private ProductType productType; - - @JsonProperty("commission_detail_total") - private CommissionDetailTotal commissionDetailTotal; - - public Fill() {} - - public Fill(Builder builder) { - this.id = builder.id; - this.orderId = builder.orderId; - this.productId = builder.productId; - this.clientProductId = builder.clientProductId; - this.side = builder.side; - this.filledQuantity = builder.filledQuantity; - this.filledValue = builder.filledValue; - this.price = builder.price; - this.time = builder.time; - this.commission = builder.commission; - this.venue = builder.venue; - this.venueFees = builder.venueFees; - this.cesCommission = builder.cesCommission; - this.productType = builder.productType; - this.commissionDetailTotal = builder.commissionDetailTotal; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getOrderId() { - return orderId; - } - - public void setOrderId(String orderId) { - this.orderId = orderId; - } - - public String getProductId() { - return productId; - } - - public void setProductId(String productId) { - this.productId = productId; - } - - public String getClientProductId() { - return clientProductId; - } - - public void setClientProductId(String clientProductId) { - this.clientProductId = clientProductId; - } - - public OrderSide getSide() { - return side; - } - - public void setSide(OrderSide side) { - this.side = side; - } - - public String getFilledQuantity() { - return filledQuantity; - } - - public void setFilledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - } - - public String getFilledValue() { - return filledValue; - } - - public void setFilledValue(String filledValue) { - this.filledValue = filledValue; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public OffsetDateTime getTime() { - return time; - } - - public void setTime(OffsetDateTime time) { - this.time = time; - } - - public String getCommission() { - return commission; - } - - public void setCommission(String commission) { - this.commission = commission; - } - - public String getVenue() { - return venue; - } - - public void setVenue(String venue) { - this.venue = venue; - } - - public String getVenueFees() { - return venueFees; - } - - public void setVenueFees(String venueFees) { - this.venueFees = venueFees; - } - - public String getCesCommission() { - return cesCommission; - } - - public void setCesCommission(String cesCommission) { - this.cesCommission = cesCommission; - } - - public ProductType getProductType() { - return productType; - } - - public void setProductType(ProductType productType) { - this.productType = productType; - } - - public CommissionDetailTotal getCommissionDetailTotal() { - return commissionDetailTotal; - } - - public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - } - - public static class Builder { + /** + * The unique ID of the fill + */ private String id; + /** + * The order ID of the fill + */ + @JsonProperty("order_id") private String orderId; + /** + * The product ID of the fill + */ + @JsonProperty("product_id") private String productId; + /** + * The client product ID of the fill indictating the settlment currency + */ + @JsonProperty("client_product_id") private String clientProductId; + /** + * - UNKNOWN_ORDER_SIDE: nil value + * - BUY: Buy order + * - SELL: Sell order + */ private OrderSide side; + /** + * Filled size (in base asset units) + */ + @JsonProperty("filled_quantity") private String filledQuantity; + /** + * Filled value (in quote asset units) + */ + @JsonProperty("filled_value") private String filledValue; + /** + * The price of the fill + */ private String price; + /** + * The date and time of the fill + */ private OffsetDateTime time; + /** + * The commission incurred for the fill + */ private String commission; + /** + * The name of the venue + */ private String venue; + /** + * The venue fees incurred for the fill + */ + @JsonProperty("venue_fees") private String venueFees; + /** + * The CES commission incurred for the fill + */ + @JsonProperty("ces_commission") private String cesCommission; + /** + * - UNKNOWN_PRODUCT_TYPE: Unknown product type + * - SPOT: Spot product + * - FUTURE: Future product + */ + @JsonProperty("product_type") private ProductType productType; + @JsonProperty("commission_detail_total") private CommissionDetailTotal commissionDetailTotal; - public Builder id(String id) { - this.id = id; - return this; + public Fill() { } - public Builder orderId(String orderId) { - this.orderId = orderId; - return this; + public Fill(Builder builder) { + this.id = builder.id; + this.orderId = builder.orderId; + this.productId = builder.productId; + this.clientProductId = builder.clientProductId; + this.side = builder.side; + this.filledQuantity = builder.filledQuantity; + this.filledValue = builder.filledValue; + this.price = builder.price; + this.time = builder.time; + this.commission = builder.commission; + this.venue = builder.venue; + this.venueFees = builder.venueFees; + this.cesCommission = builder.cesCommission; + this.productType = builder.productType; + this.commissionDetailTotal = builder.commissionDetailTotal; + } + public String getId() { + return id; } - public Builder productId(String productId) { - this.productId = productId; - return this; + public void setId(String id) { + this.id = id; + } + public String getOrderId() { + return orderId; } - public Builder clientProductId(String clientProductId) { - this.clientProductId = clientProductId; - return this; + public void setOrderId(String orderId) { + this.orderId = orderId; + } + public String getProductId() { + return productId; } - public Builder side(OrderSide side) { - this.side = side; - return this; + public void setProductId(String productId) { + this.productId = productId; + } + public String getClientProductId() { + return clientProductId; } - public Builder filledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - return this; + public void setClientProductId(String clientProductId) { + this.clientProductId = clientProductId; + } + public OrderSide getSide() { + return side; } - public Builder filledValue(String filledValue) { - this.filledValue = filledValue; - return this; + public void setSide(OrderSide side) { + this.side = side; + } + public String getFilledQuantity() { + return filledQuantity; } - public Builder price(String price) { - this.price = price; - return this; + public void setFilledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + } + public String getFilledValue() { + return filledValue; } - public Builder time(OffsetDateTime time) { - this.time = time; - return this; + public void setFilledValue(String filledValue) { + this.filledValue = filledValue; + } + public String getPrice() { + return price; } - public Builder commission(String commission) { - this.commission = commission; - return this; + public void setPrice(String price) { + this.price = price; + } + public OffsetDateTime getTime() { + return time; } - public Builder venue(String venue) { - this.venue = venue; - return this; + public void setTime(OffsetDateTime time) { + this.time = time; + } + public String getCommission() { + return commission; } - public Builder venueFees(String venueFees) { - this.venueFees = venueFees; - return this; + public void setCommission(String commission) { + this.commission = commission; + } + public String getVenue() { + return venue; + } + + public void setVenue(String venue) { + this.venue = venue; + } + public String getVenueFees() { + return venueFees; } - public Builder cesCommission(String cesCommission) { - this.cesCommission = cesCommission; - return this; + public void setVenueFees(String venueFees) { + this.venueFees = venueFees; + } + public String getCesCommission() { + return cesCommission; } - public Builder productType(ProductType productType) { - this.productType = productType; - return this; + public void setCesCommission(String cesCommission) { + this.cesCommission = cesCommission; + } + public ProductType getProductType() { + return productType; } - public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - return this; + public void setProductType(ProductType productType) { + this.productType = productType; + } + public CommissionDetailTotal getCommissionDetailTotal() { + return commissionDetailTotal; } - public Fill build() { - return new Fill(this); + public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + } + public static class Builder { + private String id; + + private String orderId; + + private String productId; + + private String clientProductId; + + private OrderSide side; + + private String filledQuantity; + + private String filledValue; + + private String price; + + private OffsetDateTime time; + + private String commission; + + private String venue; + + private String venueFees; + + private String cesCommission; + + private ProductType productType; + + private CommissionDetailTotal commissionDetailTotal; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder orderId(String orderId) { + this.orderId = orderId; + return this; + } + + public Builder productId(String productId) { + this.productId = productId; + return this; + } + + public Builder clientProductId(String clientProductId) { + this.clientProductId = clientProductId; + return this; + } + + public Builder side(OrderSide side) { + this.side = side; + return this; + } + + public Builder filledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + return this; + } + + public Builder filledValue(String filledValue) { + this.filledValue = filledValue; + return this; + } + + public Builder price(String price) { + this.price = price; + return this; + } + + public Builder time(OffsetDateTime time) { + this.time = time; + return this; + } + + public Builder commission(String commission) { + this.commission = commission; + return this; + } + + public Builder venue(String venue) { + this.venue = venue; + return this; + } + + public Builder venueFees(String venueFees) { + this.venueFees = venueFees; + return this; + } + + public Builder cesCommission(String cesCommission) { + this.cesCommission = cesCommission; + return this; + } + + public Builder productType(ProductType productType) { + this.productType = productType; + return this; + } + + public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + return this; + } + + public Fill build() { + return new Fill(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/FundMovement.java b/src/main/java/com/coinbase/prime/model/FundMovement.java index fa7f62d..4cee772 100644 --- a/src/main/java/com/coinbase/prime/model/FundMovement.java +++ b/src/main/java/com/coinbase/prime/model/FundMovement.java @@ -17,107 +17,104 @@ */ package com.coinbase.prime.model; +import com.coinbase.prime.model.TransferLocation; /** FundMovement represents a single movement of funds between two counterparties. */ public class FundMovement { - private String id; - - private TransferLocation source; - - private TransferLocation target; - - private String currency; - - private String amount; - - public FundMovement() {} - - public FundMovement(Builder builder) { - this.id = builder.id; - this.source = builder.source; - this.target = builder.target; - this.currency = builder.currency; - this.amount = builder.amount; - } + private String id; - public String getId() { - return id; - } + private TransferLocation source; - public void setId(String id) { - this.id = id; - } + private TransferLocation target; - public TransferLocation getSource() { - return source; - } + private String currency; - public void setSource(TransferLocation source) { - this.source = source; - } + private String amount; - public TransferLocation getTarget() { - return target; - } + public FundMovement() { + } - public void setTarget(TransferLocation target) { - this.target = target; - } + public FundMovement(Builder builder) { + this.id = builder.id; + this.source = builder.source; + this.target = builder.target; + this.currency = builder.currency; + this.amount = builder.amount; + } + public String getId() { + return id; + } - public String getCurrency() { - return currency; - } + public void setId(String id) { + this.id = id; + } + public TransferLocation getSource() { + return source; + } - public void setCurrency(String currency) { - this.currency = currency; - } + public void setSource(TransferLocation source) { + this.source = source; + } + public TransferLocation getTarget() { + return target; + } - public String getAmount() { - return amount; - } + public void setTarget(TransferLocation target) { + this.target = target; + } + public String getCurrency() { + return currency; + } - public void setAmount(String amount) { - this.amount = amount; - } + public void setCurrency(String currency) { + this.currency = currency; + } + public String getAmount() { + return amount; + } - public static class Builder { - private String id; + public void setAmount(String amount) { + this.amount = amount; + } + public static class Builder { + private String id; - private TransferLocation source; + private TransferLocation source; - private TransferLocation target; + private TransferLocation target; - private String currency; + private String currency; - private String amount; + private String amount; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder source(TransferLocation source) { - this.source = source; - return this; - } + public Builder source(TransferLocation source) { + this.source = source; + return this; + } - public Builder target(TransferLocation target) { - this.target = target; - return this; - } + public Builder target(TransferLocation target) { + this.target = target; + return this; + } - public Builder currency(String currency) { - this.currency = currency; - return this; - } + public Builder currency(String currency) { + this.currency = currency; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public FundMovement build() { - return new FundMovement(this); + public FundMovement build() { + return new FundMovement(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java index 28bc4b3..96c3e0b 100644 --- a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java @@ -17,249 +17,255 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.ContractExpiryType; +import com.coinbase.prime.model.PerpetualProductDetails; import com.coinbase.prime.model.enums.RiskManagementType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** FutureProductDetails contains details specific to futures products */ public class FutureProductDetails { - /** Contract code identifier */ - @JsonProperty("contract_code") - private String contractCode; - - /** Contract size */ - @JsonProperty("contract_size") - private String contractSize; - - /** Contract expiry timestamp */ - @JsonProperty("contract_expiry") - private OffsetDateTime contractExpiry; - - /** Contract root unit (underlying asset) */ - @JsonProperty("contract_root_unit") - private String contractRootUnit; - - /** - * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type - - * CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract - CONTRACT_EXPIRY_TYPE_PERPETUAL: - * Perpetual futures contract (no expiry) - */ - @JsonProperty("contract_expiry_type") - private ContractExpiryType contractExpiryType; - - /** - * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type - - * RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) - - * RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue - */ - @JsonProperty("risk_managed_by") - private RiskManagementType riskManagedBy; - - /** The venue this product trades on */ - private String venue; - - /** Descriptive name for the product group */ - @JsonProperty("group_description") - private String groupDescription; - - /** IANA time zone for contract expiration */ - @JsonProperty("contract_expiry_timezone") - private String contractExpiryTimezone; - - /** Short version of the group description */ - @JsonProperty("group_short_description") - private String groupShortDescription; - - /** PerpetualProductDetails contains details specific to perpetual futures products */ - @JsonProperty("perpetual_details") - private PerpetualProductDetails perpetualDetails; - - public FutureProductDetails() {} - - public FutureProductDetails(Builder builder) { - this.contractCode = builder.contractCode; - this.contractSize = builder.contractSize; - this.contractExpiry = builder.contractExpiry; - this.contractRootUnit = builder.contractRootUnit; - this.contractExpiryType = builder.contractExpiryType; - this.riskManagedBy = builder.riskManagedBy; - this.venue = builder.venue; - this.groupDescription = builder.groupDescription; - this.contractExpiryTimezone = builder.contractExpiryTimezone; - this.groupShortDescription = builder.groupShortDescription; - this.perpetualDetails = builder.perpetualDetails; - } - - public String getContractCode() { - return contractCode; - } - - public void setContractCode(String contractCode) { - this.contractCode = contractCode; - } - - public String getContractSize() { - return contractSize; - } - - public void setContractSize(String contractSize) { - this.contractSize = contractSize; - } - - public OffsetDateTime getContractExpiry() { - return contractExpiry; - } - - public void setContractExpiry(OffsetDateTime contractExpiry) { - this.contractExpiry = contractExpiry; - } - - public String getContractRootUnit() { - return contractRootUnit; - } - - public void setContractRootUnit(String contractRootUnit) { - this.contractRootUnit = contractRootUnit; - } - - public ContractExpiryType getContractExpiryType() { - return contractExpiryType; - } - - public void setContractExpiryType(ContractExpiryType contractExpiryType) { - this.contractExpiryType = contractExpiryType; - } - - public RiskManagementType getRiskManagedBy() { - return riskManagedBy; - } - - public void setRiskManagedBy(RiskManagementType riskManagedBy) { - this.riskManagedBy = riskManagedBy; - } - - public String getVenue() { - return venue; - } - - public void setVenue(String venue) { - this.venue = venue; - } - - public String getGroupDescription() { - return groupDescription; - } - - public void setGroupDescription(String groupDescription) { - this.groupDescription = groupDescription; - } - - public String getContractExpiryTimezone() { - return contractExpiryTimezone; - } - - public void setContractExpiryTimezone(String contractExpiryTimezone) { - this.contractExpiryTimezone = contractExpiryTimezone; - } - - public String getGroupShortDescription() { - return groupShortDescription; - } - - public void setGroupShortDescription(String groupShortDescription) { - this.groupShortDescription = groupShortDescription; - } - - public PerpetualProductDetails getPerpetualDetails() { - return perpetualDetails; - } - - public void setPerpetualDetails(PerpetualProductDetails perpetualDetails) { - this.perpetualDetails = perpetualDetails; - } - - public static class Builder { + /** + * Contract code identifier + */ + @JsonProperty("contract_code") private String contractCode; + /** + * Contract size + */ + @JsonProperty("contract_size") private String contractSize; + /** + * Contract expiry timestamp + */ + @JsonProperty("contract_expiry") private OffsetDateTime contractExpiry; + /** + * Contract root unit (underlying asset) + */ + @JsonProperty("contract_root_unit") private String contractRootUnit; + /** + * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type + * - CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract + * - CONTRACT_EXPIRY_TYPE_PERPETUAL: Perpetual futures contract (no expiry) + */ + @JsonProperty("contract_expiry_type") private ContractExpiryType contractExpiryType; + /** + * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type + * - RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) + * - RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue + */ + @JsonProperty("risk_managed_by") private RiskManagementType riskManagedBy; + /** + * The venue this product trades on + */ private String venue; + /** + * Descriptive name for the product group + */ + @JsonProperty("group_description") private String groupDescription; + /** + * IANA time zone for contract expiration + */ + @JsonProperty("contract_expiry_timezone") private String contractExpiryTimezone; + /** + * Short version of the group description + */ + @JsonProperty("group_short_description") private String groupShortDescription; + /** PerpetualProductDetails contains details specific to perpetual futures products */ + @JsonProperty("perpetual_details") private PerpetualProductDetails perpetualDetails; - public Builder contractCode(String contractCode) { - this.contractCode = contractCode; - return this; + public FutureProductDetails() { } - public Builder contractSize(String contractSize) { - this.contractSize = contractSize; - return this; + public FutureProductDetails(Builder builder) { + this.contractCode = builder.contractCode; + this.contractSize = builder.contractSize; + this.contractExpiry = builder.contractExpiry; + this.contractRootUnit = builder.contractRootUnit; + this.contractExpiryType = builder.contractExpiryType; + this.riskManagedBy = builder.riskManagedBy; + this.venue = builder.venue; + this.groupDescription = builder.groupDescription; + this.contractExpiryTimezone = builder.contractExpiryTimezone; + this.groupShortDescription = builder.groupShortDescription; + this.perpetualDetails = builder.perpetualDetails; + } + public String getContractCode() { + return contractCode; } - public Builder contractExpiry(OffsetDateTime contractExpiry) { - this.contractExpiry = contractExpiry; - return this; + public void setContractCode(String contractCode) { + this.contractCode = contractCode; + } + public String getContractSize() { + return contractSize; } - public Builder contractRootUnit(String contractRootUnit) { - this.contractRootUnit = contractRootUnit; - return this; + public void setContractSize(String contractSize) { + this.contractSize = contractSize; + } + public OffsetDateTime getContractExpiry() { + return contractExpiry; } - public Builder contractExpiryType(ContractExpiryType contractExpiryType) { - this.contractExpiryType = contractExpiryType; - return this; + public void setContractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + } + public String getContractRootUnit() { + return contractRootUnit; } - public Builder riskManagedBy(RiskManagementType riskManagedBy) { - this.riskManagedBy = riskManagedBy; - return this; + public void setContractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + } + public ContractExpiryType getContractExpiryType() { + return contractExpiryType; } - public Builder venue(String venue) { - this.venue = venue; - return this; + public void setContractExpiryType(ContractExpiryType contractExpiryType) { + this.contractExpiryType = contractExpiryType; + } + public RiskManagementType getRiskManagedBy() { + return riskManagedBy; } - public Builder groupDescription(String groupDescription) { - this.groupDescription = groupDescription; - return this; + public void setRiskManagedBy(RiskManagementType riskManagedBy) { + this.riskManagedBy = riskManagedBy; + } + public String getVenue() { + return venue; } - public Builder contractExpiryTimezone(String contractExpiryTimezone) { - this.contractExpiryTimezone = contractExpiryTimezone; - return this; + public void setVenue(String venue) { + this.venue = venue; + } + public String getGroupDescription() { + return groupDescription; } - public Builder groupShortDescription(String groupShortDescription) { - this.groupShortDescription = groupShortDescription; - return this; + public void setGroupDescription(String groupDescription) { + this.groupDescription = groupDescription; + } + public String getContractExpiryTimezone() { + return contractExpiryTimezone; } - public Builder perpetualDetails(PerpetualProductDetails perpetualDetails) { - this.perpetualDetails = perpetualDetails; - return this; + public void setContractExpiryTimezone(String contractExpiryTimezone) { + this.contractExpiryTimezone = contractExpiryTimezone; } + public String getGroupShortDescription() { + return groupShortDescription; + } + + public void setGroupShortDescription(String groupShortDescription) { + this.groupShortDescription = groupShortDescription; + } + public PerpetualProductDetails getPerpetualDetails() { + return perpetualDetails; + } + + public void setPerpetualDetails(PerpetualProductDetails perpetualDetails) { + this.perpetualDetails = perpetualDetails; + } + public static class Builder { + private String contractCode; + + private String contractSize; + + private OffsetDateTime contractExpiry; + + private String contractRootUnit; - public FutureProductDetails build() { - return new FutureProductDetails(this); + private ContractExpiryType contractExpiryType; + + private RiskManagementType riskManagedBy; + + private String venue; + + private String groupDescription; + + private String contractExpiryTimezone; + + private String groupShortDescription; + + private PerpetualProductDetails perpetualDetails; + + public Builder contractCode(String contractCode) { + this.contractCode = contractCode; + return this; + } + + public Builder contractSize(String contractSize) { + this.contractSize = contractSize; + return this; + } + + public Builder contractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + return this; + } + + public Builder contractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + return this; + } + + public Builder contractExpiryType(ContractExpiryType contractExpiryType) { + this.contractExpiryType = contractExpiryType; + return this; + } + + public Builder riskManagedBy(RiskManagementType riskManagedBy) { + this.riskManagedBy = riskManagedBy; + return this; + } + + public Builder venue(String venue) { + this.venue = venue; + return this; + } + + public Builder groupDescription(String groupDescription) { + this.groupDescription = groupDescription; + return this; + } + + public Builder contractExpiryTimezone(String contractExpiryTimezone) { + this.contractExpiryTimezone = contractExpiryTimezone; + return this; + } + + public Builder groupShortDescription(String groupShortDescription) { + this.groupShortDescription = groupShortDescription; + return this; + } + + public Builder perpetualDetails(PerpetualProductDetails perpetualDetails) { + this.perpetualDetails = perpetualDetails; + return this; + } + + public FutureProductDetails build() { + return new FutureProductDetails(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/FuturesSweep.java b/src/main/java/com/coinbase/prime/model/FuturesSweep.java index c5ddc69..3f07869 100644 --- a/src/main/java/com/coinbase/prime/model/FuturesSweep.java +++ b/src/main/java/com/coinbase/prime/model/FuturesSweep.java @@ -17,116 +17,118 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.SweepAmount; import com.coinbase.prime.model.enums.FuturesSweepStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class FuturesSweep { - /** Sweep ID */ - private String id; - - @JsonProperty("requested_amount") - private SweepAmount requestedAmount; - - /** Should sweep all */ - @JsonProperty("should_sweep_all") - private boolean shouldSweepAll; - - private FuturesSweepStatus status; - - /** Scheduled time */ - @JsonProperty("scheduled_time") - private OffsetDateTime scheduledTime; - - public FuturesSweep() {} - - public FuturesSweep(Builder builder) { - this.id = builder.id; - this.requestedAmount = builder.requestedAmount; - this.shouldSweepAll = builder.shouldSweepAll; - this.status = builder.status; - this.scheduledTime = builder.scheduledTime; - } + /** + * Sweep ID + */ + private String id; - public String getId() { - return id; - } + @JsonProperty("requested_amount") + private SweepAmount requestedAmount; - public void setId(String id) { - this.id = id; - } + /** + * Should sweep all + */ + @JsonProperty("should_sweep_all") + private boolean shouldSweepAll; - public SweepAmount getRequestedAmount() { - return requestedAmount; - } + private FuturesSweepStatus status; - public void setRequestedAmount(SweepAmount requestedAmount) { - this.requestedAmount = requestedAmount; - } + /** + * Scheduled time + */ + @JsonProperty("scheduled_time") + private OffsetDateTime scheduledTime; - public boolean getShouldSweepAll() { - return shouldSweepAll; - } + public FuturesSweep() { + } - public void setShouldSweepAll(boolean shouldSweepAll) { - this.shouldSweepAll = shouldSweepAll; - } + public FuturesSweep(Builder builder) { + this.id = builder.id; + this.requestedAmount = builder.requestedAmount; + this.shouldSweepAll = builder.shouldSweepAll; + this.status = builder.status; + this.scheduledTime = builder.scheduledTime; + } + public String getId() { + return id; + } - public FuturesSweepStatus getStatus() { - return status; - } + public void setId(String id) { + this.id = id; + } + public SweepAmount getRequestedAmount() { + return requestedAmount; + } - public void setStatus(FuturesSweepStatus status) { - this.status = status; - } + public void setRequestedAmount(SweepAmount requestedAmount) { + this.requestedAmount = requestedAmount; + } + public boolean getShouldSweepAll() { + return shouldSweepAll; + } - public OffsetDateTime getScheduledTime() { - return scheduledTime; - } + public void setShouldSweepAll(boolean shouldSweepAll) { + this.shouldSweepAll = shouldSweepAll; + } + public FuturesSweepStatus getStatus() { + return status; + } - public void setScheduledTime(OffsetDateTime scheduledTime) { - this.scheduledTime = scheduledTime; - } + public void setStatus(FuturesSweepStatus status) { + this.status = status; + } + public OffsetDateTime getScheduledTime() { + return scheduledTime; + } - public static class Builder { - private String id; + public void setScheduledTime(OffsetDateTime scheduledTime) { + this.scheduledTime = scheduledTime; + } + public static class Builder { + private String id; - private SweepAmount requestedAmount; + private SweepAmount requestedAmount; - private boolean shouldSweepAll; + private boolean shouldSweepAll; - private FuturesSweepStatus status; + private FuturesSweepStatus status; - private OffsetDateTime scheduledTime; + private OffsetDateTime scheduledTime; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder requestedAmount(SweepAmount requestedAmount) { - this.requestedAmount = requestedAmount; - return this; - } + public Builder requestedAmount(SweepAmount requestedAmount) { + this.requestedAmount = requestedAmount; + return this; + } - public Builder shouldSweepAll(boolean shouldSweepAll) { - this.shouldSweepAll = shouldSweepAll; - return this; - } + public Builder shouldSweepAll(boolean shouldSweepAll) { + this.shouldSweepAll = shouldSweepAll; + return this; + } - public Builder status(FuturesSweepStatus status) { - this.status = status; - return this; - } + public Builder status(FuturesSweepStatus status) { + this.status = status; + return this; + } - public Builder scheduledTime(OffsetDateTime scheduledTime) { - this.scheduledTime = scheduledTime; - return this; - } + public Builder scheduledTime(OffsetDateTime scheduledTime) { + this.scheduledTime = scheduledTime; + return this; + } - public FuturesSweep build() { - return new FuturesSweep(this); + public FuturesSweep build() { + return new FuturesSweep(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Invoice.java b/src/main/java/com/coinbase/prime/model/Invoice.java index 95598d6..c666a2c 100644 --- a/src/main/java/com/coinbase/prime/model/Invoice.java +++ b/src/main/java/com/coinbase/prime/model/Invoice.java @@ -17,191 +17,183 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.InvoiceItem; import com.coinbase.prime.model.enums.InvoiceState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Invoice */ public class Invoice { - private String id; - - @JsonProperty("billing_month") - private Integer billingMonth; - - @JsonProperty("billing_year") - private Integer billingYear; - - @JsonProperty("due_date") - private String dueDate; - - @JsonProperty("invoice_number") - private String invoiceNumber; - - /** States */ - private InvoiceState state; - - @JsonProperty("usd_amount_paid") - private Double usdAmountPaid; - - @JsonProperty("usd_amount_owed") - private Double usdAmountOwed; - - @JsonProperty("invoice_items") - private List invoiceItems; - - public Invoice() {} - - public Invoice(Builder builder) { - this.id = builder.id; - this.billingMonth = builder.billingMonth; - this.billingYear = builder.billingYear; - this.dueDate = builder.dueDate; - this.invoiceNumber = builder.invoiceNumber; - this.state = builder.state; - this.usdAmountPaid = builder.usdAmountPaid; - this.usdAmountOwed = builder.usdAmountOwed; - this.invoiceItems = builder.invoiceItems; - } + private String id; - public String getId() { - return id; - } + @JsonProperty("billing_month") + private Integer billingMonth; - public void setId(String id) { - this.id = id; - } + @JsonProperty("billing_year") + private Integer billingYear; - public Integer getBillingMonth() { - return billingMonth; - } + @JsonProperty("due_date") + private String dueDate; - public void setBillingMonth(Integer billingMonth) { - this.billingMonth = billingMonth; - } + @JsonProperty("invoice_number") + private String invoiceNumber; - public Integer getBillingYear() { - return billingYear; - } + /** States */ + private InvoiceState state; - public void setBillingYear(Integer billingYear) { - this.billingYear = billingYear; - } + @JsonProperty("usd_amount_paid") + private Double usdAmountPaid; - public String getDueDate() { - return dueDate; - } + @JsonProperty("usd_amount_owed") + private Double usdAmountOwed; - public void setDueDate(String dueDate) { - this.dueDate = dueDate; - } + @JsonProperty("invoice_items") + private List invoiceItems; - public String getInvoiceNumber() { - return invoiceNumber; - } + public Invoice() { + } - public void setInvoiceNumber(String invoiceNumber) { - this.invoiceNumber = invoiceNumber; - } + public Invoice(Builder builder) { + this.id = builder.id; + this.billingMonth = builder.billingMonth; + this.billingYear = builder.billingYear; + this.dueDate = builder.dueDate; + this.invoiceNumber = builder.invoiceNumber; + this.state = builder.state; + this.usdAmountPaid = builder.usdAmountPaid; + this.usdAmountOwed = builder.usdAmountOwed; + this.invoiceItems = builder.invoiceItems; + } + public String getId() { + return id; + } - public InvoiceState getState() { - return state; - } + public void setId(String id) { + this.id = id; + } + public Integer getBillingMonth() { + return billingMonth; + } - public void setState(InvoiceState state) { - this.state = state; - } + public void setBillingMonth(Integer billingMonth) { + this.billingMonth = billingMonth; + } + public Integer getBillingYear() { + return billingYear; + } - public Double getUsdAmountPaid() { - return usdAmountPaid; - } + public void setBillingYear(Integer billingYear) { + this.billingYear = billingYear; + } + public String getDueDate() { + return dueDate; + } - public void setUsdAmountPaid(Double usdAmountPaid) { - this.usdAmountPaid = usdAmountPaid; - } + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + public String getInvoiceNumber() { + return invoiceNumber; + } - public Double getUsdAmountOwed() { - return usdAmountOwed; - } + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } + public InvoiceState getState() { + return state; + } - public void setUsdAmountOwed(Double usdAmountOwed) { - this.usdAmountOwed = usdAmountOwed; - } + public void setState(InvoiceState state) { + this.state = state; + } + public Double getUsdAmountPaid() { + return usdAmountPaid; + } - public List getInvoiceItems() { - return invoiceItems; - } + public void setUsdAmountPaid(Double usdAmountPaid) { + this.usdAmountPaid = usdAmountPaid; + } + public Double getUsdAmountOwed() { + return usdAmountOwed; + } - public void setInvoiceItems(List invoiceItems) { - this.invoiceItems = invoiceItems; - } + public void setUsdAmountOwed(Double usdAmountOwed) { + this.usdAmountOwed = usdAmountOwed; + } + public List getInvoiceItems() { + return invoiceItems; + } - public static class Builder { - private String id; + public void setInvoiceItems(List invoiceItems) { + this.invoiceItems = invoiceItems; + } + public static class Builder { + private String id; - private Integer billingMonth; + private Integer billingMonth; - private Integer billingYear; + private Integer billingYear; - private String dueDate; + private String dueDate; - private String invoiceNumber; + private String invoiceNumber; - private InvoiceState state; + private InvoiceState state; - private Double usdAmountPaid; + private Double usdAmountPaid; - private Double usdAmountOwed; + private Double usdAmountOwed; - private List invoiceItems; + private List invoiceItems; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder billingMonth(Integer billingMonth) { - this.billingMonth = billingMonth; - return this; - } + public Builder billingMonth(Integer billingMonth) { + this.billingMonth = billingMonth; + return this; + } - public Builder billingYear(Integer billingYear) { - this.billingYear = billingYear; - return this; - } + public Builder billingYear(Integer billingYear) { + this.billingYear = billingYear; + return this; + } - public Builder dueDate(String dueDate) { - this.dueDate = dueDate; - return this; - } + public Builder dueDate(String dueDate) { + this.dueDate = dueDate; + return this; + } - public Builder invoiceNumber(String invoiceNumber) { - this.invoiceNumber = invoiceNumber; - return this; - } + public Builder invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } - public Builder state(InvoiceState state) { - this.state = state; - return this; - } + public Builder state(InvoiceState state) { + this.state = state; + return this; + } - public Builder usdAmountPaid(Double usdAmountPaid) { - this.usdAmountPaid = usdAmountPaid; - return this; - } + public Builder usdAmountPaid(Double usdAmountPaid) { + this.usdAmountPaid = usdAmountPaid; + return this; + } - public Builder usdAmountOwed(Double usdAmountOwed) { - this.usdAmountOwed = usdAmountOwed; - return this; - } + public Builder usdAmountOwed(Double usdAmountOwed) { + this.usdAmountOwed = usdAmountOwed; + return this; + } - public Builder invoiceItems(List invoiceItems) { - this.invoiceItems = invoiceItems; - return this; - } + public Builder invoiceItems(List invoiceItems) { + this.invoiceItems = invoiceItems; + return this; + } - public Invoice build() { - return new Invoice(this); + public Invoice build() { + return new Invoice(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/InvoiceItem.java b/src/main/java/com/coinbase/prime/model/InvoiceItem.java index 780c6dd..286f0a7 100644 --- a/src/main/java/com/coinbase/prime/model/InvoiceItem.java +++ b/src/main/java/com/coinbase/prime/model/InvoiceItem.java @@ -17,168 +17,160 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.InvoiceType; import com.fasterxml.jackson.annotation.JsonProperty; /** Invoice item */ public class InvoiceItem { - private String description; - - @JsonProperty("currency_symbol") - private String currencySymbol; - - /** Types */ - @JsonProperty("invoice_type") - private InvoiceType invoiceType; - - private Double rate; - - private Double quantity; - - private Double price; - - @JsonProperty("average_auc") - private Double averageAuc; - - private Double total; - - public InvoiceItem() {} - - public InvoiceItem(Builder builder) { - this.description = builder.description; - this.currencySymbol = builder.currencySymbol; - this.invoiceType = builder.invoiceType; - this.rate = builder.rate; - this.quantity = builder.quantity; - this.price = builder.price; - this.averageAuc = builder.averageAuc; - this.total = builder.total; - } + private String description; - public String getDescription() { - return description; - } + @JsonProperty("currency_symbol") + private String currencySymbol; - public void setDescription(String description) { - this.description = description; - } + /** Types */ + @JsonProperty("invoice_type") + private InvoiceType invoiceType; - public String getCurrencySymbol() { - return currencySymbol; - } + private Double rate; - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } + private Double quantity; - public InvoiceType getInvoiceType() { - return invoiceType; - } + private Double price; - public void setInvoiceType(InvoiceType invoiceType) { - this.invoiceType = invoiceType; - } + @JsonProperty("average_auc") + private Double averageAuc; - public Double getRate() { - return rate; - } + private Double total; - public void setRate(Double rate) { - this.rate = rate; - } + public InvoiceItem() { + } - public Double getQuantity() { - return quantity; - } + public InvoiceItem(Builder builder) { + this.description = builder.description; + this.currencySymbol = builder.currencySymbol; + this.invoiceType = builder.invoiceType; + this.rate = builder.rate; + this.quantity = builder.quantity; + this.price = builder.price; + this.averageAuc = builder.averageAuc; + this.total = builder.total; + } + public String getDescription() { + return description; + } - public void setQuantity(Double quantity) { - this.quantity = quantity; - } + public void setDescription(String description) { + this.description = description; + } + public String getCurrencySymbol() { + return currencySymbol; + } - public Double getPrice() { - return price; - } + public void setCurrencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + } + public InvoiceType getInvoiceType() { + return invoiceType; + } - public void setPrice(Double price) { - this.price = price; - } + public void setInvoiceType(InvoiceType invoiceType) { + this.invoiceType = invoiceType; + } + public Double getRate() { + return rate; + } - public Double getAverageAuc() { - return averageAuc; - } + public void setRate(Double rate) { + this.rate = rate; + } + public Double getQuantity() { + return quantity; + } - public void setAverageAuc(Double averageAuc) { - this.averageAuc = averageAuc; - } + public void setQuantity(Double quantity) { + this.quantity = quantity; + } + public Double getPrice() { + return price; + } - public Double getTotal() { - return total; - } + public void setPrice(Double price) { + this.price = price; + } + public Double getAverageAuc() { + return averageAuc; + } - public void setTotal(Double total) { - this.total = total; - } + public void setAverageAuc(Double averageAuc) { + this.averageAuc = averageAuc; + } + public Double getTotal() { + return total; + } - public static class Builder { - private String description; + public void setTotal(Double total) { + this.total = total; + } + public static class Builder { + private String description; - private String currencySymbol; + private String currencySymbol; - private InvoiceType invoiceType; + private InvoiceType invoiceType; - private Double rate; + private Double rate; - private Double quantity; + private Double quantity; - private Double price; + private Double price; - private Double averageAuc; + private Double averageAuc; - private Double total; + private Double total; - public Builder description(String description) { - this.description = description; - return this; - } + public Builder description(String description) { + this.description = description; + return this; + } - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; - } + public Builder currencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + return this; + } - public Builder invoiceType(InvoiceType invoiceType) { - this.invoiceType = invoiceType; - return this; - } + public Builder invoiceType(InvoiceType invoiceType) { + this.invoiceType = invoiceType; + return this; + } - public Builder rate(Double rate) { - this.rate = rate; - return this; - } + public Builder rate(Double rate) { + this.rate = rate; + return this; + } - public Builder quantity(Double quantity) { - this.quantity = quantity; - return this; - } + public Builder quantity(Double quantity) { + this.quantity = quantity; + return this; + } - public Builder price(Double price) { - this.price = price; - return this; - } + public Builder price(Double price) { + this.price = price; + return this; + } - public Builder averageAuc(Double averageAuc) { - this.averageAuc = averageAuc; - return this; - } + public Builder averageAuc(Double averageAuc) { + this.averageAuc = averageAuc; + return this; + } - public Builder total(Double total) { - this.total = total; - return this; - } + public Builder total(Double total) { + this.total = total; + return this; + } - public InvoiceItem build() { - return new InvoiceItem(this); + public InvoiceItem build() { + return new InvoiceItem(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java index d22753e..47b85d6 100644 --- a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java @@ -17,178 +17,170 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** LimitOrderEdit represents an order edit that is accepted */ public class LimitOrderEdit { - /** New price for the edited order */ - private String price; - - /** New size for the edited order */ - private String size; - - /** New display size for the edited order */ - @JsonProperty("display_size") - private String displaySize; - - /** New stop price for the edited order */ - @JsonProperty("stop_price") - private String stopPrice; - - /** New stop limit price for the edited order */ - @JsonProperty("stop_limit_price") - private String stopLimitPrice; - - /** New end time for the edited order */ - @JsonProperty("end_time") - private OffsetDateTime endTime; - - /** Time when the edit was accepted */ - @JsonProperty("accept_time") - private OffsetDateTime acceptTime; - - /** Client order id of the order being replaced */ - @JsonProperty("client_order_id") - private String clientOrderId; - - public LimitOrderEdit() {} - - public LimitOrderEdit(Builder builder) { - this.price = builder.price; - this.size = builder.size; - this.displaySize = builder.displaySize; - this.stopPrice = builder.stopPrice; - this.stopLimitPrice = builder.stopLimitPrice; - this.endTime = builder.endTime; - this.acceptTime = builder.acceptTime; - this.clientOrderId = builder.clientOrderId; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String getSize() { - return size; - } - - public void setSize(String size) { - this.size = size; - } - - public String getDisplaySize() { - return displaySize; - } - - public void setDisplaySize(String displaySize) { - this.displaySize = displaySize; - } - - public String getStopPrice() { - return stopPrice; - } - - public void setStopPrice(String stopPrice) { - this.stopPrice = stopPrice; - } - - public String getStopLimitPrice() { - return stopLimitPrice; - } - - public void setStopLimitPrice(String stopLimitPrice) { - this.stopLimitPrice = stopLimitPrice; - } - - public OffsetDateTime getEndTime() { - return endTime; - } - - public void setEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - } - - public OffsetDateTime getAcceptTime() { - return acceptTime; - } - - public void setAcceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - } - - public String getClientOrderId() { - return clientOrderId; - } - - public void setClientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - } - - public static class Builder { + /** New price for the edited order */ private String price; + /** New size for the edited order */ private String size; + /** New display size for the edited order */ + @JsonProperty("display_size") private String displaySize; + /** New stop price for the edited order */ + @JsonProperty("stop_price") private String stopPrice; + /** New stop limit price for the edited order */ + @JsonProperty("stop_limit_price") private String stopLimitPrice; + /** New end time for the edited order */ + @JsonProperty("end_time") private OffsetDateTime endTime; + /** Time when the edit was accepted */ + @JsonProperty("accept_time") private OffsetDateTime acceptTime; + /** Client order id of the order being replaced */ + @JsonProperty("client_order_id") private String clientOrderId; - public Builder price(String price) { - this.price = price; - return this; + public LimitOrderEdit() { + } + + public LimitOrderEdit(Builder builder) { + this.price = builder.price; + this.size = builder.size; + this.displaySize = builder.displaySize; + this.stopPrice = builder.stopPrice; + this.stopLimitPrice = builder.stopLimitPrice; + this.endTime = builder.endTime; + this.acceptTime = builder.acceptTime; + this.clientOrderId = builder.clientOrderId; + } + public String getPrice() { + return price; } - public Builder size(String size) { - this.size = size; - return this; + public void setPrice(String price) { + this.price = price; + } + public String getSize() { + return size; } - public Builder displaySize(String displaySize) { - this.displaySize = displaySize; - return this; + public void setSize(String size) { + this.size = size; + } + public String getDisplaySize() { + return displaySize; } - public Builder stopPrice(String stopPrice) { - this.stopPrice = stopPrice; - return this; + public void setDisplaySize(String displaySize) { + this.displaySize = displaySize; + } + public String getStopPrice() { + return stopPrice; } - public Builder stopLimitPrice(String stopLimitPrice) { - this.stopLimitPrice = stopLimitPrice; - return this; + public void setStopPrice(String stopPrice) { + this.stopPrice = stopPrice; + } + public String getStopLimitPrice() { + return stopLimitPrice; } - public Builder endTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; + public void setStopLimitPrice(String stopLimitPrice) { + this.stopLimitPrice = stopLimitPrice; + } + public OffsetDateTime getEndTime() { + return endTime; } - public Builder acceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - return this; + public void setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + } + public OffsetDateTime getAcceptTime() { + return acceptTime; } - public Builder clientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; + public void setAcceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + } + public String getClientOrderId() { + return clientOrderId; } - public LimitOrderEdit build() { - return new LimitOrderEdit(this); + public void setClientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + } + public static class Builder { + private String price; + + private String size; + + private String displaySize; + + private String stopPrice; + + private String stopLimitPrice; + + private OffsetDateTime endTime; + + private OffsetDateTime acceptTime; + + private String clientOrderId; + + public Builder price(String price) { + this.price = price; + return this; + } + + public Builder size(String size) { + this.size = size; + return this; + } + + public Builder displaySize(String displaySize) { + this.displaySize = displaySize; + return this; + } + + public Builder stopPrice(String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + public Builder stopLimitPrice(String stopLimitPrice) { + this.stopLimitPrice = stopLimitPrice; + return this; + } + + public Builder endTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + public Builder acceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + return this; + } + + public Builder clientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; + } + + public LimitOrderEdit build() { + return new LimitOrderEdit(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/LoanInfo.java b/src/main/java/com/coinbase/prime/model/LoanInfo.java index 8a30363..2d91acd 100644 --- a/src/main/java/com/coinbase/prime/model/LoanInfo.java +++ b/src/main/java/com/coinbase/prime/model/LoanInfo.java @@ -17,116 +17,121 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class LoanInfo { - /** The unique ID of the portfolio */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The currency symbol */ - private String symbol; - - /** Balance amount */ - private String amount; - - /** Notional balance amount */ - @JsonProperty("notional_amount") - private String notionalAmount; - - /** Settlement due date */ - @JsonProperty("due_date") - private String dueDate; - - public LoanInfo() {} - - public LoanInfo(Builder builder) { - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.amount = builder.amount; - this.notionalAmount = builder.notionalAmount; - this.dueDate = builder.dueDate; - } + /** + * The unique ID of the portfolio + */ + @JsonProperty("portfolio_id") + private String portfolioId; - public String getPortfolioId() { - return portfolioId; - } + /** + * The currency symbol + */ + private String symbol; - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } + /** + * Balance amount + */ + private String amount; - public String getSymbol() { - return symbol; - } + /** + * Notional balance amount + */ + @JsonProperty("notional_amount") + private String notionalAmount; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * Settlement due date + */ + @JsonProperty("due_date") + private String dueDate; - public String getAmount() { - return amount; - } + public LoanInfo() { + } - public void setAmount(String amount) { - this.amount = amount; - } + public LoanInfo(Builder builder) { + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.amount = builder.amount; + this.notionalAmount = builder.notionalAmount; + this.dueDate = builder.dueDate; + } + public String getPortfolioId() { + return portfolioId; + } - public String getNotionalAmount() { - return notionalAmount; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getSymbol() { + return symbol; + } - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getAmount() { + return amount; + } - public String getDueDate() { - return dueDate; - } + public void setAmount(String amount) { + this.amount = amount; + } + public String getNotionalAmount() { + return notionalAmount; + } - public void setDueDate(String dueDate) { - this.dueDate = dueDate; - } + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } + public String getDueDate() { + return dueDate; + } - public static class Builder { - private String portfolioId; + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + public static class Builder { + private String portfolioId; - private String symbol; + private String symbol; - private String amount; + private String amount; - private String notionalAmount; + private String notionalAmount; - private String dueDate; + private String dueDate; - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; - } + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; + } - public Builder dueDate(String dueDate) { - this.dueDate = dueDate; - return this; - } + public Builder dueDate(String dueDate) { + this.dueDate = dueDate; + return this; + } - public LoanInfo build() { - return new LoanInfo(this); + public LoanInfo build() { + return new LoanInfo(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Locate.java b/src/main/java/com/coinbase/prime/model/Locate.java index be312b2..e6cba3c 100644 --- a/src/main/java/com/coinbase/prime/model/Locate.java +++ b/src/main/java/com/coinbase/prime/model/Locate.java @@ -19,71 +19,75 @@ package com.coinbase.prime.model; public class Locate { - /** The currency symbol */ - private String symbol; - - /** The available quantity located */ - private String quantity; - - /** The interest rate for located symbol */ - private String rate; - - public Locate() {} - - public Locate(Builder builder) { - this.symbol = builder.symbol; - this.quantity = builder.quantity; - this.rate = builder.rate; - } + /** + * The currency symbol + */ + private String symbol; - public String getSymbol() { - return symbol; - } + /** + * The available quantity located + */ + private String quantity; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * The interest rate for located symbol + */ + private String rate; - public String getQuantity() { - return quantity; - } + public Locate() { + } - public void setQuantity(String quantity) { - this.quantity = quantity; - } + public Locate(Builder builder) { + this.symbol = builder.symbol; + this.quantity = builder.quantity; + this.rate = builder.rate; + } + public String getSymbol() { + return symbol; + } - public String getRate() { - return rate; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getQuantity() { + return quantity; + } - public void setRate(String rate) { - this.rate = rate; - } + public void setQuantity(String quantity) { + this.quantity = quantity; + } + public String getRate() { + return rate; + } - public static class Builder { - private String symbol; + public void setRate(String rate) { + this.rate = rate; + } + public static class Builder { + private String symbol; - private String quantity; + private String quantity; - private String rate; + private String rate; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder quantity(String quantity) { - this.quantity = quantity; - return this; - } + public Builder quantity(String quantity) { + this.quantity = quantity; + return this; + } - public Builder rate(String rate) { - this.rate = rate; - return this; - } + public Builder rate(String rate) { + this.rate = rate; + return this; + } - public Locate build() { - return new Locate(this); + public Locate build() { + return new Locate(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/MarginAddOn.java b/src/main/java/com/coinbase/prime/model/MarginAddOn.java index d0c49cd..4d320be 100644 --- a/src/main/java/com/coinbase/prime/model/MarginAddOn.java +++ b/src/main/java/com/coinbase/prime/model/MarginAddOn.java @@ -17,57 +17,57 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.MarginAddOnType; import com.fasterxml.jackson.annotation.JsonProperty; public class MarginAddOn { - /** margin add on amount */ - private String amount; - - @JsonProperty("add_on_type") - private MarginAddOnType addOnType; - - public MarginAddOn() {} - - public MarginAddOn(Builder builder) { - this.amount = builder.amount; - this.addOnType = builder.addOnType; - } + /** + * margin add on amount + */ + private String amount; - public String getAmount() { - return amount; - } + @JsonProperty("add_on_type") + private MarginAddOnType addOnType; - public void setAmount(String amount) { - this.amount = amount; - } + public MarginAddOn() { + } - public MarginAddOnType getAddOnType() { - return addOnType; - } + public MarginAddOn(Builder builder) { + this.amount = builder.amount; + this.addOnType = builder.addOnType; + } + public String getAmount() { + return amount; + } - public void setAddOnType(MarginAddOnType addOnType) { - this.addOnType = addOnType; - } + public void setAmount(String amount) { + this.amount = amount; + } + public MarginAddOnType getAddOnType() { + return addOnType; + } - public static class Builder { - private String amount; + public void setAddOnType(MarginAddOnType addOnType) { + this.addOnType = addOnType; + } + public static class Builder { + private String amount; - private MarginAddOnType addOnType; + private MarginAddOnType addOnType; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder addOnType(MarginAddOnType addOnType) { - this.addOnType = addOnType; - return this; - } + public Builder addOnType(MarginAddOnType addOnType) { + this.addOnType = addOnType; + return this; + } - public MarginAddOn build() { - return new MarginAddOn(this); + public MarginAddOn build() { + return new MarginAddOn(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/MarginCallRecord.java b/src/main/java/com/coinbase/prime/model/MarginCallRecord.java index 3c87f9f..ee52984 100644 --- a/src/main/java/com/coinbase/prime/model/MarginCallRecord.java +++ b/src/main/java/com/coinbase/prime/model/MarginCallRecord.java @@ -17,118 +17,123 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class MarginCallRecord { - /** The unique ID of the margin call */ - @JsonProperty("margin_call_id") - private String marginCallId; - - /** The initial margin call amount in notional value */ - @JsonProperty("initial_notional_amount") - private String initialNotionalAmount; - - /** The outstanding margin call amount in notional value */ - @JsonProperty("outstanding_notional_amount") - private String outstandingNotionalAmount; - - /** The time the margin call is created in RFC3330 format */ - @JsonProperty("created_at") - private String createdAt; - - /** The time the margin call is due in RFC3339 format */ - @JsonProperty("due_at") - private String dueAt; - - public MarginCallRecord() {} - - public MarginCallRecord(Builder builder) { - this.marginCallId = builder.marginCallId; - this.initialNotionalAmount = builder.initialNotionalAmount; - this.outstandingNotionalAmount = builder.outstandingNotionalAmount; - this.createdAt = builder.createdAt; - this.dueAt = builder.dueAt; - } + /** + * The unique ID of the margin call + */ + @JsonProperty("margin_call_id") + private String marginCallId; - public String getMarginCallId() { - return marginCallId; - } + /** + * The initial margin call amount in notional value + */ + @JsonProperty("initial_notional_amount") + private String initialNotionalAmount; - public void setMarginCallId(String marginCallId) { - this.marginCallId = marginCallId; - } + /** + * The outstanding margin call amount in notional value + */ + @JsonProperty("outstanding_notional_amount") + private String outstandingNotionalAmount; - public String getInitialNotionalAmount() { - return initialNotionalAmount; - } + /** + * The time the margin call is created in RFC3330 format + */ + @JsonProperty("created_at") + private String createdAt; - public void setInitialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - } + /** + * The time the margin call is due in RFC3339 format + */ + @JsonProperty("due_at") + private String dueAt; - public String getOutstandingNotionalAmount() { - return outstandingNotionalAmount; - } + public MarginCallRecord() { + } - public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - } + public MarginCallRecord(Builder builder) { + this.marginCallId = builder.marginCallId; + this.initialNotionalAmount = builder.initialNotionalAmount; + this.outstandingNotionalAmount = builder.outstandingNotionalAmount; + this.createdAt = builder.createdAt; + this.dueAt = builder.dueAt; + } + public String getMarginCallId() { + return marginCallId; + } - public String getCreatedAt() { - return createdAt; - } + public void setMarginCallId(String marginCallId) { + this.marginCallId = marginCallId; + } + public String getInitialNotionalAmount() { + return initialNotionalAmount; + } - public void setCreatedAt(String createdAt) { - this.createdAt = createdAt; - } + public void setInitialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + } + public String getOutstandingNotionalAmount() { + return outstandingNotionalAmount; + } - public String getDueAt() { - return dueAt; - } + public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + } + public String getCreatedAt() { + return createdAt; + } - public void setDueAt(String dueAt) { - this.dueAt = dueAt; - } + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + public String getDueAt() { + return dueAt; + } - public static class Builder { - private String marginCallId; + public void setDueAt(String dueAt) { + this.dueAt = dueAt; + } + public static class Builder { + private String marginCallId; - private String initialNotionalAmount; + private String initialNotionalAmount; - private String outstandingNotionalAmount; + private String outstandingNotionalAmount; - private String createdAt; + private String createdAt; - private String dueAt; + private String dueAt; - public Builder marginCallId(String marginCallId) { - this.marginCallId = marginCallId; - return this; - } + public Builder marginCallId(String marginCallId) { + this.marginCallId = marginCallId; + return this; + } - public Builder initialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - return this; - } + public Builder initialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + return this; + } - public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - return this; - } + public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + return this; + } - public Builder createdAt(String createdAt) { - this.createdAt = createdAt; - return this; - } + public Builder createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } - public Builder dueAt(String dueAt) { - this.dueAt = dueAt; - return this; - } + public Builder dueAt(String dueAt) { + this.dueAt = dueAt; + return this; + } - public MarginCallRecord build() { - return new MarginCallRecord(this); + public MarginCallRecord build() { + return new MarginCallRecord(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/MarginInformation.java b/src/main/java/com/coinbase/prime/model/MarginInformation.java index 5eca711..625c2f0 100644 --- a/src/main/java/com/coinbase/prime/model/MarginInformation.java +++ b/src/main/java/com/coinbase/prime/model/MarginInformation.java @@ -17,58 +17,60 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.MarginCallRecord; +import com.coinbase.prime.model.MarginSummary; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class MarginInformation { - /** The current margin call records */ - @JsonProperty("margin_call_records") - private List marginCallRecords; - - @JsonProperty("margin_summary") - private MarginSummary marginSummary; - - public MarginInformation() {} - - public MarginInformation(Builder builder) { - this.marginCallRecords = builder.marginCallRecords; - this.marginSummary = builder.marginSummary; - } + /** + * The current margin call records + */ + @JsonProperty("margin_call_records") + private List marginCallRecords; - public List getMarginCallRecords() { - return marginCallRecords; - } + @JsonProperty("margin_summary") + private MarginSummary marginSummary; - public void setMarginCallRecords(List marginCallRecords) { - this.marginCallRecords = marginCallRecords; - } + public MarginInformation() { + } - public MarginSummary getMarginSummary() { - return marginSummary; - } + public MarginInformation(Builder builder) { + this.marginCallRecords = builder.marginCallRecords; + this.marginSummary = builder.marginSummary; + } + public List getMarginCallRecords() { + return marginCallRecords; + } - public void setMarginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - } + public void setMarginCallRecords(List marginCallRecords) { + this.marginCallRecords = marginCallRecords; + } + public MarginSummary getMarginSummary() { + return marginSummary; + } - public static class Builder { - private List marginCallRecords; + public void setMarginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + } + public static class Builder { + private List marginCallRecords; - private MarginSummary marginSummary; + private MarginSummary marginSummary; - public Builder marginCallRecords(List marginCallRecords) { - this.marginCallRecords = marginCallRecords; - return this; - } + public Builder marginCallRecords(List marginCallRecords) { + this.marginCallRecords = marginCallRecords; + return this; + } - public Builder marginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - return this; - } + public Builder marginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + return this; + } - public MarginInformation build() { - return new MarginInformation(this); + public MarginInformation build() { + return new MarginInformation(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/MarginSummary.java b/src/main/java/com/coinbase/prime/model/MarginSummary.java index 7da1753..d414573 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummary.java @@ -17,675 +17,692 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.AssetBalance; +import com.coinbase.prime.model.LoanInfo; +import com.coinbase.prime.model.MarginAddOn; +import com.coinbase.prime.model.MarketRate; +import com.coinbase.prime.model.PmAssetInfo; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class MarginSummary { - /** The unique ID of the entity */ - @JsonProperty("entity_id") - private String entityId; - - /** - * The margin equity at the entity level. Margin Equity = LMV + SMV + Trading Cash Balance + - * Short Collateral - Pending Withdrawals - */ - @JsonProperty("margin_equity") - private String marginEquity; - - /** USD notional value of required equity in entity portfolios */ - @JsonProperty("margin_requirement") - private String marginRequirement; - - /** margin_equity - margin_requirement */ - @JsonProperty("excess_deficit") - private String excessDeficit; - - /** The raw amount of portfolio margin credit used */ - @JsonProperty("pm_credit_consumed") - private String pmCreditConsumed; - - /** - * The maximum trade finance credit limit. This field is deprecated and will be removed in the - * future. - */ - @JsonProperty("tf_credit_limit") - private String tfCreditLimit; - - /** - * The amount of trade finance credit used (USD). This field is deprecated and will be removed in - * the future. - */ - @JsonProperty("tf_credit_consumed") - private String tfCreditConsumed; - - /** TF Asset Adjusted Value (USD). This field is deprecated and will be removed in the future. */ - @JsonProperty("tf_adjusted_asset_value") - private String tfAdjustedAssetValue; - - /** - * TF Adjusted Liability Value (USD). This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_adjusted_liability_value") - private String tfAdjustedLiabilityValue; - - /** - * The amount of adjusted credit used. This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_adjusted_credit_consumed") - private String tfAdjustedCreditConsumed; - - /** The amount of adjusted equity. This field is deprecated and will be removed in the future. */ - @JsonProperty("tf_adjusted_equity") - private String tfAdjustedEquity; - - /** Whether or not a entity is frozen due to balance outstanding or other reason */ - private boolean frozen; - - /** The reason why a entity is frozen */ - @JsonProperty("frozen_reason") - private String frozenReason; - - /** - * Whether TF is enabled for the entity. This field is deprecated and will be removed in the - * future. - */ - @JsonProperty("tf_enabled") - private boolean tfEnabled; - - /** Whether PM is enabled for the entity */ - @JsonProperty("pm_enabled") - private boolean pmEnabled; - - /** Market rates for the list of assets */ - @JsonProperty("market_rates") - private List marketRates; - - /** Asset Balances across portfolios */ - @JsonProperty("asset_balances") - private List assetBalances; - - /** - * Trade finance debit loan amounts. This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_loans") - private List tfLoans; - - /** Portfolio Margin debit loan amounts */ - @JsonProperty("pm_loans") - private List pmLoans; - - /** Short collateral amounts */ - @JsonProperty("short_collateral") - private List shortCollateral; - - /** Gross market value (GMV) = LMV + Abs (SMV) */ - @JsonProperty("gross_market_value") - private String grossMarketValue; - - /** Net Market Value (NMV) = LMV + SMV */ - @JsonProperty("net_market_value") - private String netMarketValue; - - /** Long Market Value (LMV) = Sum of positive notional for all assets */ - @JsonProperty("long_market_value") - private String longMarketValue; - - /** Non_Marginable LMV: Sum of positive notional for each non-margin eligible coin */ - @JsonProperty("non_marginable_long_market_value") - private String nonMarginableLongMarketValue; - - /** 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 */ - @JsonProperty("gross_leverage") - private String grossLeverage; - - /** Net Exposure = (LMV + SMV) / GMV */ - @JsonProperty("net_exposure") - private String netExposure; - - @JsonProperty("portfolio_stress_triggered") - private MarginAddOn portfolioStressTriggered; - - /** PM asset info netted across the entity */ - @JsonProperty("pm_asset_info") - private List pmAssetInfo; - - /** PM limit that monitors gross notional borrowings (crypto + fiat) */ - @JsonProperty("pm_credit_limit") - private String pmCreditLimit; - - /** PM limit that monitors excess deficit */ - @JsonProperty("pm_margin_limit") - private String pmMarginLimit; - - /** The amount of the margin limit that is consumed by the excess deficit */ - @JsonProperty("pm_margin_consumed") - private String pmMarginConsumed; - - public MarginSummary() {} - - public MarginSummary(Builder builder) { - this.entityId = builder.entityId; - this.marginEquity = builder.marginEquity; - this.marginRequirement = builder.marginRequirement; - this.excessDeficit = builder.excessDeficit; - this.pmCreditConsumed = builder.pmCreditConsumed; - this.tfCreditLimit = builder.tfCreditLimit; - this.tfCreditConsumed = builder.tfCreditConsumed; - this.tfAdjustedAssetValue = builder.tfAdjustedAssetValue; - this.tfAdjustedLiabilityValue = builder.tfAdjustedLiabilityValue; - this.tfAdjustedCreditConsumed = builder.tfAdjustedCreditConsumed; - this.tfAdjustedEquity = builder.tfAdjustedEquity; - this.frozen = builder.frozen; - this.frozenReason = builder.frozenReason; - this.tfEnabled = builder.tfEnabled; - this.pmEnabled = builder.pmEnabled; - this.marketRates = builder.marketRates; - this.assetBalances = builder.assetBalances; - this.tfLoans = builder.tfLoans; - this.pmLoans = builder.pmLoans; - this.shortCollateral = builder.shortCollateral; - this.grossMarketValue = builder.grossMarketValue; - this.netMarketValue = builder.netMarketValue; - this.longMarketValue = builder.longMarketValue; - this.nonMarginableLongMarketValue = builder.nonMarginableLongMarketValue; - this.shortMarketValue = builder.shortMarketValue; - this.grossLeverage = builder.grossLeverage; - this.netExposure = builder.netExposure; - this.portfolioStressTriggered = builder.portfolioStressTriggered; - this.pmAssetInfo = builder.pmAssetInfo; - this.pmCreditLimit = builder.pmCreditLimit; - this.pmMarginLimit = builder.pmMarginLimit; - this.pmMarginConsumed = builder.pmMarginConsumed; - } - - public String getEntityId() { - return entityId; - } - - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - public String getMarginEquity() { - return marginEquity; - } - - public void setMarginEquity(String marginEquity) { - this.marginEquity = marginEquity; - } - - public String getMarginRequirement() { - return marginRequirement; - } - - public void setMarginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - } - - public String getExcessDeficit() { - return excessDeficit; - } - - public void setExcessDeficit(String excessDeficit) { - this.excessDeficit = excessDeficit; - } - - public String getPmCreditConsumed() { - return pmCreditConsumed; - } - - public void setPmCreditConsumed(String pmCreditConsumed) { - this.pmCreditConsumed = pmCreditConsumed; - } - - public String getTfCreditLimit() { - return tfCreditLimit; - } - - public void setTfCreditLimit(String tfCreditLimit) { - this.tfCreditLimit = tfCreditLimit; - } - - public String getTfCreditConsumed() { - return tfCreditConsumed; - } - - public void setTfCreditConsumed(String tfCreditConsumed) { - this.tfCreditConsumed = tfCreditConsumed; - } - - public String getTfAdjustedAssetValue() { - return tfAdjustedAssetValue; - } - - public void setTfAdjustedAssetValue(String tfAdjustedAssetValue) { - this.tfAdjustedAssetValue = tfAdjustedAssetValue; - } - - public String getTfAdjustedLiabilityValue() { - return tfAdjustedLiabilityValue; - } - - public void setTfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { - this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; - } - - public String getTfAdjustedCreditConsumed() { - return tfAdjustedCreditConsumed; - } - - public void setTfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { - this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; - } - - public String getTfAdjustedEquity() { - return tfAdjustedEquity; - } - - public void setTfAdjustedEquity(String tfAdjustedEquity) { - this.tfAdjustedEquity = tfAdjustedEquity; - } - - public boolean getFrozen() { - return frozen; - } - - public void setFrozen(boolean frozen) { - this.frozen = frozen; - } - - public String getFrozenReason() { - return frozenReason; - } - - public void setFrozenReason(String frozenReason) { - this.frozenReason = frozenReason; - } - - public boolean getTfEnabled() { - return tfEnabled; - } - - public void setTfEnabled(boolean tfEnabled) { - this.tfEnabled = tfEnabled; - } - - public boolean getPmEnabled() { - return pmEnabled; - } - - public void setPmEnabled(boolean pmEnabled) { - this.pmEnabled = pmEnabled; - } - - public List getMarketRates() { - return marketRates; - } - - public void setMarketRates(List marketRates) { - this.marketRates = marketRates; - } - - public List getAssetBalances() { - return assetBalances; - } - - public void setAssetBalances(List assetBalances) { - this.assetBalances = assetBalances; - } - - public List getTfLoans() { - return tfLoans; - } - - public void setTfLoans(List tfLoans) { - this.tfLoans = tfLoans; - } - - public List getPmLoans() { - return pmLoans; - } - - public void setPmLoans(List pmLoans) { - this.pmLoans = pmLoans; - } - - public List getShortCollateral() { - return shortCollateral; - } - - public void setShortCollateral(List shortCollateral) { - this.shortCollateral = shortCollateral; - } - - public String getGrossMarketValue() { - return grossMarketValue; - } - - public void setGrossMarketValue(String grossMarketValue) { - this.grossMarketValue = grossMarketValue; - } - - public String getNetMarketValue() { - return netMarketValue; - } - - public void setNetMarketValue(String netMarketValue) { - this.netMarketValue = netMarketValue; - } - - public String getLongMarketValue() { - return longMarketValue; - } - - public void setLongMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - } - - public String getNonMarginableLongMarketValue() { - return nonMarginableLongMarketValue; - } - - public void setNonMarginableLongMarketValue(String nonMarginableLongMarketValue) { - this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; - } - - public String getShortMarketValue() { - return shortMarketValue; - } - - public void setShortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - } - - public String getGrossLeverage() { - return grossLeverage; - } - - public void setGrossLeverage(String grossLeverage) { - this.grossLeverage = grossLeverage; - } - - public String getNetExposure() { - return netExposure; - } - - public void setNetExposure(String netExposure) { - this.netExposure = netExposure; - } - - public MarginAddOn getPortfolioStressTriggered() { - return portfolioStressTriggered; - } - - public void setPortfolioStressTriggered(MarginAddOn portfolioStressTriggered) { - this.portfolioStressTriggered = portfolioStressTriggered; - } - - public List getPmAssetInfo() { - return pmAssetInfo; - } - - public void setPmAssetInfo(List pmAssetInfo) { - this.pmAssetInfo = pmAssetInfo; - } - - public String getPmCreditLimit() { - return pmCreditLimit; - } - - public void setPmCreditLimit(String pmCreditLimit) { - this.pmCreditLimit = pmCreditLimit; - } - - public String getPmMarginLimit() { - return pmMarginLimit; - } - - public void setPmMarginLimit(String pmMarginLimit) { - this.pmMarginLimit = pmMarginLimit; - } - - public String getPmMarginConsumed() { - return pmMarginConsumed; - } - - public void setPmMarginConsumed(String pmMarginConsumed) { - this.pmMarginConsumed = pmMarginConsumed; - } - - public static class Builder { + /** + * The unique ID of the entity + */ + @JsonProperty("entity_id") private String entityId; + /** + * The margin equity at the entity level. Margin Equity = LMV + SMV + Trading Cash Balance + Short Collateral - Pending Withdrawals + */ + @JsonProperty("margin_equity") private String marginEquity; + /** + * USD notional value of required equity in entity portfolios + */ + @JsonProperty("margin_requirement") private String marginRequirement; + /** + * margin_equity - margin_requirement + */ + @JsonProperty("excess_deficit") private String excessDeficit; + /** + * The raw amount of portfolio margin credit used + */ + @JsonProperty("pm_credit_consumed") private String pmCreditConsumed; + /** + * The maximum trade finance credit limit. This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_credit_limit") private String tfCreditLimit; + /** + * The amount of trade finance credit used (USD). This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_credit_consumed") private String tfCreditConsumed; + /** + * TF Asset Adjusted Value (USD). This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_adjusted_asset_value") private String tfAdjustedAssetValue; + /** + * TF Adjusted Liability Value (USD). This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_adjusted_liability_value") private String tfAdjustedLiabilityValue; + /** + * The amount of adjusted credit used. This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_adjusted_credit_consumed") private String tfAdjustedCreditConsumed; + /** + * The amount of adjusted equity. This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_adjusted_equity") private String tfAdjustedEquity; + /** + * Whether or not a entity is frozen due to balance outstanding or other reason + */ private boolean frozen; + /** + * The reason why a entity is frozen + */ + @JsonProperty("frozen_reason") private String frozenReason; + /** + * Whether TF is enabled for the entity. This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_enabled") private boolean tfEnabled; + /** + * Whether PM is enabled for the entity + */ + @JsonProperty("pm_enabled") private boolean pmEnabled; + /** + * Market rates for the list of assets + */ + @JsonProperty("market_rates") private List marketRates; + /** + * Asset Balances across portfolios + */ + @JsonProperty("asset_balances") private List assetBalances; + /** + * Trade finance debit loan amounts. This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_loans") private List tfLoans; + /** + * Portfolio Margin debit loan amounts + */ + @JsonProperty("pm_loans") private List pmLoans; + /** + * Short collateral amounts + */ + @JsonProperty("short_collateral") private List shortCollateral; + /** + * Gross market value (GMV) = LMV + Abs (SMV) + */ + @JsonProperty("gross_market_value") private String grossMarketValue; + /** + * Net Market Value (NMV) = LMV + SMV + */ + @JsonProperty("net_market_value") private String netMarketValue; + /** + * Long Market Value (LMV) = Sum of positive notional for all assets + */ + @JsonProperty("long_market_value") private String longMarketValue; + /** + * Non_Marginable LMV: Sum of positive notional for each non-margin eligible coin + */ + @JsonProperty("non_marginable_long_market_value") private String nonMarginableLongMarketValue; + /** + * 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 + */ + @JsonProperty("gross_leverage") private String grossLeverage; + /** + * Net Exposure = (LMV + SMV) / GMV + */ + @JsonProperty("net_exposure") private String netExposure; + @JsonProperty("portfolio_stress_triggered") private MarginAddOn portfolioStressTriggered; + /** + * PM asset info netted across the entity + */ + @JsonProperty("pm_asset_info") private List pmAssetInfo; + /** + * PM limit that monitors gross notional borrowings (crypto + fiat) + */ + @JsonProperty("pm_credit_limit") private String pmCreditLimit; + /** + * PM limit that monitors excess deficit + */ + @JsonProperty("pm_margin_limit") private String pmMarginLimit; + /** + * The amount of the margin limit that is consumed by the excess deficit + */ + @JsonProperty("pm_margin_consumed") private String pmMarginConsumed; - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; + public MarginSummary() { } - public Builder marginEquity(String marginEquity) { - this.marginEquity = marginEquity; - return this; + public MarginSummary(Builder builder) { + this.entityId = builder.entityId; + this.marginEquity = builder.marginEquity; + this.marginRequirement = builder.marginRequirement; + this.excessDeficit = builder.excessDeficit; + this.pmCreditConsumed = builder.pmCreditConsumed; + this.tfCreditLimit = builder.tfCreditLimit; + this.tfCreditConsumed = builder.tfCreditConsumed; + this.tfAdjustedAssetValue = builder.tfAdjustedAssetValue; + this.tfAdjustedLiabilityValue = builder.tfAdjustedLiabilityValue; + this.tfAdjustedCreditConsumed = builder.tfAdjustedCreditConsumed; + this.tfAdjustedEquity = builder.tfAdjustedEquity; + this.frozen = builder.frozen; + this.frozenReason = builder.frozenReason; + this.tfEnabled = builder.tfEnabled; + this.pmEnabled = builder.pmEnabled; + this.marketRates = builder.marketRates; + this.assetBalances = builder.assetBalances; + this.tfLoans = builder.tfLoans; + this.pmLoans = builder.pmLoans; + this.shortCollateral = builder.shortCollateral; + this.grossMarketValue = builder.grossMarketValue; + this.netMarketValue = builder.netMarketValue; + this.longMarketValue = builder.longMarketValue; + this.nonMarginableLongMarketValue = builder.nonMarginableLongMarketValue; + this.shortMarketValue = builder.shortMarketValue; + this.grossLeverage = builder.grossLeverage; + this.netExposure = builder.netExposure; + this.portfolioStressTriggered = builder.portfolioStressTriggered; + this.pmAssetInfo = builder.pmAssetInfo; + this.pmCreditLimit = builder.pmCreditLimit; + this.pmMarginLimit = builder.pmMarginLimit; + this.pmMarginConsumed = builder.pmMarginConsumed; + } + public String getEntityId() { + return entityId; } - public Builder marginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - return this; + public void setEntityId(String entityId) { + this.entityId = entityId; + } + public String getMarginEquity() { + return marginEquity; } - public Builder excessDeficit(String excessDeficit) { - this.excessDeficit = excessDeficit; - return this; + public void setMarginEquity(String marginEquity) { + this.marginEquity = marginEquity; + } + public String getMarginRequirement() { + return marginRequirement; } - public Builder pmCreditConsumed(String pmCreditConsumed) { - this.pmCreditConsumed = pmCreditConsumed; - return this; + public void setMarginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + } + public String getExcessDeficit() { + return excessDeficit; } - public Builder tfCreditLimit(String tfCreditLimit) { - this.tfCreditLimit = tfCreditLimit; - return this; + public void setExcessDeficit(String excessDeficit) { + this.excessDeficit = excessDeficit; + } + public String getPmCreditConsumed() { + return pmCreditConsumed; } - public Builder tfCreditConsumed(String tfCreditConsumed) { - this.tfCreditConsumed = tfCreditConsumed; - return this; + public void setPmCreditConsumed(String pmCreditConsumed) { + this.pmCreditConsumed = pmCreditConsumed; + } + public String getTfCreditLimit() { + return tfCreditLimit; } - public Builder tfAdjustedAssetValue(String tfAdjustedAssetValue) { - this.tfAdjustedAssetValue = tfAdjustedAssetValue; - return this; + public void setTfCreditLimit(String tfCreditLimit) { + this.tfCreditLimit = tfCreditLimit; + } + public String getTfCreditConsumed() { + return tfCreditConsumed; } - public Builder tfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { - this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; - return this; + public void setTfCreditConsumed(String tfCreditConsumed) { + this.tfCreditConsumed = tfCreditConsumed; + } + public String getTfAdjustedAssetValue() { + return tfAdjustedAssetValue; } - public Builder tfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { - this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; - return this; + public void setTfAdjustedAssetValue(String tfAdjustedAssetValue) { + this.tfAdjustedAssetValue = tfAdjustedAssetValue; + } + public String getTfAdjustedLiabilityValue() { + return tfAdjustedLiabilityValue; } - public Builder tfAdjustedEquity(String tfAdjustedEquity) { - this.tfAdjustedEquity = tfAdjustedEquity; - return this; + public void setTfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { + this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; + } + public String getTfAdjustedCreditConsumed() { + return tfAdjustedCreditConsumed; } - public Builder frozen(boolean frozen) { - this.frozen = frozen; - return this; + public void setTfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { + this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; + } + public String getTfAdjustedEquity() { + return tfAdjustedEquity; } - public Builder frozenReason(String frozenReason) { - this.frozenReason = frozenReason; - return this; + public void setTfAdjustedEquity(String tfAdjustedEquity) { + this.tfAdjustedEquity = tfAdjustedEquity; + } + public boolean getFrozen() { + return frozen; } - public Builder tfEnabled(boolean tfEnabled) { - this.tfEnabled = tfEnabled; - return this; + public void setFrozen(boolean frozen) { + this.frozen = frozen; + } + public String getFrozenReason() { + return frozenReason; } - public Builder pmEnabled(boolean pmEnabled) { - this.pmEnabled = pmEnabled; - return this; + public void setFrozenReason(String frozenReason) { + this.frozenReason = frozenReason; + } + public boolean getTfEnabled() { + return tfEnabled; + } + + public void setTfEnabled(boolean tfEnabled) { + this.tfEnabled = tfEnabled; + } + public boolean getPmEnabled() { + return pmEnabled; + } + + public void setPmEnabled(boolean pmEnabled) { + this.pmEnabled = pmEnabled; + } + public List getMarketRates() { + return marketRates; } - public Builder marketRates(List marketRates) { - this.marketRates = marketRates; - return this; + public void setMarketRates(List marketRates) { + this.marketRates = marketRates; + } + public List getAssetBalances() { + return assetBalances; } - public Builder assetBalances(List assetBalances) { - this.assetBalances = assetBalances; - return this; + public void setAssetBalances(List assetBalances) { + this.assetBalances = assetBalances; + } + public List getTfLoans() { + return tfLoans; } - public Builder tfLoans(List tfLoans) { - this.tfLoans = tfLoans; - return this; + public void setTfLoans(List tfLoans) { + this.tfLoans = tfLoans; + } + public List getPmLoans() { + return pmLoans; } - public Builder pmLoans(List pmLoans) { - this.pmLoans = pmLoans; - return this; + public void setPmLoans(List pmLoans) { + this.pmLoans = pmLoans; + } + public List getShortCollateral() { + return shortCollateral; } - public Builder shortCollateral(List shortCollateral) { - this.shortCollateral = shortCollateral; - return this; + public void setShortCollateral(List shortCollateral) { + this.shortCollateral = shortCollateral; + } + public String getGrossMarketValue() { + return grossMarketValue; } - public Builder grossMarketValue(String grossMarketValue) { - this.grossMarketValue = grossMarketValue; - return this; + public void setGrossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + } + public String getNetMarketValue() { + return netMarketValue; } - public Builder netMarketValue(String netMarketValue) { - this.netMarketValue = netMarketValue; - return this; + public void setNetMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + } + public String getLongMarketValue() { + return longMarketValue; } - public Builder longMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - return this; + public void setLongMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + } + public String getNonMarginableLongMarketValue() { + return nonMarginableLongMarketValue; } - public Builder nonMarginableLongMarketValue(String nonMarginableLongMarketValue) { - this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; - return this; + public void setNonMarginableLongMarketValue(String nonMarginableLongMarketValue) { + this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; + } + public String getShortMarketValue() { + return shortMarketValue; } - public Builder shortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - return this; + public void setShortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + } + public String getGrossLeverage() { + return grossLeverage; } - public Builder grossLeverage(String grossLeverage) { - this.grossLeverage = grossLeverage; - return this; + public void setGrossLeverage(String grossLeverage) { + this.grossLeverage = grossLeverage; + } + public String getNetExposure() { + return netExposure; } - public Builder netExposure(String netExposure) { - this.netExposure = netExposure; - return this; + public void setNetExposure(String netExposure) { + this.netExposure = netExposure; + } + public MarginAddOn getPortfolioStressTriggered() { + return portfolioStressTriggered; } - public Builder portfolioStressTriggered(MarginAddOn portfolioStressTriggered) { - this.portfolioStressTriggered = portfolioStressTriggered; - return this; + public void setPortfolioStressTriggered(MarginAddOn portfolioStressTriggered) { + this.portfolioStressTriggered = portfolioStressTriggered; + } + public List getPmAssetInfo() { + return pmAssetInfo; } - public Builder pmAssetInfo(List pmAssetInfo) { - this.pmAssetInfo = pmAssetInfo; - return this; + public void setPmAssetInfo(List pmAssetInfo) { + this.pmAssetInfo = pmAssetInfo; + } + public String getPmCreditLimit() { + return pmCreditLimit; } - public Builder pmCreditLimit(String pmCreditLimit) { - this.pmCreditLimit = pmCreditLimit; - return this; + public void setPmCreditLimit(String pmCreditLimit) { + this.pmCreditLimit = pmCreditLimit; + } + public String getPmMarginLimit() { + return pmMarginLimit; } - public Builder pmMarginLimit(String pmMarginLimit) { - this.pmMarginLimit = pmMarginLimit; - return this; + public void setPmMarginLimit(String pmMarginLimit) { + this.pmMarginLimit = pmMarginLimit; + } + public String getPmMarginConsumed() { + return pmMarginConsumed; } - public Builder pmMarginConsumed(String pmMarginConsumed) { - this.pmMarginConsumed = pmMarginConsumed; - return this; + public void setPmMarginConsumed(String pmMarginConsumed) { + this.pmMarginConsumed = pmMarginConsumed; } + public static class Builder { + private String entityId; + + private String marginEquity; + + private String marginRequirement; + + private String excessDeficit; + + private String pmCreditConsumed; + + private String tfCreditLimit; + + private String tfCreditConsumed; + + private String tfAdjustedAssetValue; + + private String tfAdjustedLiabilityValue; + + private String tfAdjustedCreditConsumed; + + private String tfAdjustedEquity; + + private boolean frozen; + + private String frozenReason; + + private boolean tfEnabled; + + private boolean pmEnabled; + + private List marketRates; - public MarginSummary build() { - return new MarginSummary(this); + private List assetBalances; + + private List tfLoans; + + private List pmLoans; + + private List shortCollateral; + + private String grossMarketValue; + + private String netMarketValue; + + private String longMarketValue; + + private String nonMarginableLongMarketValue; + + private String shortMarketValue; + + private String grossLeverage; + + private String netExposure; + + private MarginAddOn portfolioStressTriggered; + + private List pmAssetInfo; + + private String pmCreditLimit; + + private String pmMarginLimit; + + private String pmMarginConsumed; + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public Builder marginEquity(String marginEquity) { + this.marginEquity = marginEquity; + return this; + } + + public Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + return this; + } + + public Builder excessDeficit(String excessDeficit) { + this.excessDeficit = excessDeficit; + return this; + } + + public Builder pmCreditConsumed(String pmCreditConsumed) { + this.pmCreditConsumed = pmCreditConsumed; + return this; + } + + public Builder tfCreditLimit(String tfCreditLimit) { + this.tfCreditLimit = tfCreditLimit; + return this; + } + + public Builder tfCreditConsumed(String tfCreditConsumed) { + this.tfCreditConsumed = tfCreditConsumed; + return this; + } + + public Builder tfAdjustedAssetValue(String tfAdjustedAssetValue) { + this.tfAdjustedAssetValue = tfAdjustedAssetValue; + return this; + } + + public Builder tfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { + this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; + return this; + } + + public Builder tfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { + this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; + return this; + } + + public Builder tfAdjustedEquity(String tfAdjustedEquity) { + this.tfAdjustedEquity = tfAdjustedEquity; + return this; + } + + public Builder frozen(boolean frozen) { + this.frozen = frozen; + return this; + } + + public Builder frozenReason(String frozenReason) { + this.frozenReason = frozenReason; + return this; + } + + public Builder tfEnabled(boolean tfEnabled) { + this.tfEnabled = tfEnabled; + return this; + } + + public Builder pmEnabled(boolean pmEnabled) { + this.pmEnabled = pmEnabled; + return this; + } + + public Builder marketRates(List marketRates) { + this.marketRates = marketRates; + return this; + } + + public Builder assetBalances(List assetBalances) { + this.assetBalances = assetBalances; + return this; + } + + public Builder tfLoans(List tfLoans) { + this.tfLoans = tfLoans; + return this; + } + + public Builder pmLoans(List pmLoans) { + this.pmLoans = pmLoans; + return this; + } + + public Builder shortCollateral(List shortCollateral) { + this.shortCollateral = shortCollateral; + return this; + } + + public Builder grossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + return this; + } + + public Builder netMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + return this; + } + + public Builder longMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + return this; + } + + public Builder nonMarginableLongMarketValue(String nonMarginableLongMarketValue) { + this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; + return this; + } + + public Builder shortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + return this; + } + + public Builder grossLeverage(String grossLeverage) { + this.grossLeverage = grossLeverage; + return this; + } + + public Builder netExposure(String netExposure) { + this.netExposure = netExposure; + return this; + } + + public Builder portfolioStressTriggered(MarginAddOn portfolioStressTriggered) { + this.portfolioStressTriggered = portfolioStressTriggered; + return this; + } + + public Builder pmAssetInfo(List pmAssetInfo) { + this.pmAssetInfo = pmAssetInfo; + return this; + } + + public Builder pmCreditLimit(String pmCreditLimit) { + this.pmCreditLimit = pmCreditLimit; + return this; + } + + public Builder pmMarginLimit(String pmMarginLimit) { + this.pmMarginLimit = pmMarginLimit; + return this; + } + + public Builder pmMarginConsumed(String pmMarginConsumed) { + this.pmMarginConsumed = pmMarginConsumed; + return this; + } + + public MarginSummary build() { + return new MarginSummary(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java b/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java index c800149..f59508a 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java @@ -17,77 +17,79 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.MarginSummary; import com.fasterxml.jackson.annotation.JsonProperty; public class MarginSummaryHistorical { - /** The UTC date time used for conversion */ - @JsonProperty("conversion_datetime") - private String conversionDatetime; - - /** The date used for conversion */ - @JsonProperty("conversion_date") - private String conversionDate; - - @JsonProperty("margin_summary") - private MarginSummary marginSummary; - - public MarginSummaryHistorical() {} - - public MarginSummaryHistorical(Builder builder) { - this.conversionDatetime = builder.conversionDatetime; - this.conversionDate = builder.conversionDate; - this.marginSummary = builder.marginSummary; - } + /** + * The UTC date time used for conversion + */ + @JsonProperty("conversion_datetime") + private String conversionDatetime; - public String getConversionDatetime() { - return conversionDatetime; - } + /** + * The date used for conversion + */ + @JsonProperty("conversion_date") + private String conversionDate; - public void setConversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - } + @JsonProperty("margin_summary") + private MarginSummary marginSummary; - public String getConversionDate() { - return conversionDate; - } + public MarginSummaryHistorical() { + } - public void setConversionDate(String conversionDate) { - this.conversionDate = conversionDate; - } + public MarginSummaryHistorical(Builder builder) { + this.conversionDatetime = builder.conversionDatetime; + this.conversionDate = builder.conversionDate; + this.marginSummary = builder.marginSummary; + } + public String getConversionDatetime() { + return conversionDatetime; + } - public MarginSummary getMarginSummary() { - return marginSummary; - } + public void setConversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + } + public String getConversionDate() { + return conversionDate; + } - public void setMarginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - } + public void setConversionDate(String conversionDate) { + this.conversionDate = conversionDate; + } + public MarginSummary getMarginSummary() { + return marginSummary; + } - public static class Builder { - private String conversionDatetime; + public void setMarginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + } + public static class Builder { + private String conversionDatetime; - private String conversionDate; + private String conversionDate; - private MarginSummary marginSummary; + private MarginSummary marginSummary; - public Builder conversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - return this; - } + public Builder conversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + return this; + } - public Builder conversionDate(String conversionDate) { - this.conversionDate = conversionDate; - return this; - } + public Builder conversionDate(String conversionDate) { + this.conversionDate = conversionDate; + return this; + } - public Builder marginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - return this; - } + public Builder marginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + return this; + } - public MarginSummaryHistorical build() { - return new MarginSummaryHistorical(this); + public MarginSummaryHistorical build() { + return new MarginSummaryHistorical(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/MarketData.java b/src/main/java/com/coinbase/prime/model/MarketData.java index 640acf9..2ace509 100644 --- a/src/main/java/com/coinbase/prime/model/MarketData.java +++ b/src/main/java/com/coinbase/prime/model/MarketData.java @@ -17,140 +17,143 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class MarketData { - /** Base asset symbol (e.g., BTC, ETH, SOL) */ - private String symbol; - - /** 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%) */ - @JsonProperty("vol_30d") - private String vol30d; - - /** Daily historical volatility over trailing 90 days (decimal, e.g., 0.65 = 65%) */ - @JsonProperty("vol_90d") - private String vol90d; - - /** Average daily trading volume over trailing 30 days (USD) */ - @JsonProperty("adv_30d") - private String adv30d; - - /** - * Weighted blend of the most recent vol_5d and the max vol_5d over last 30 days into a single - * volatility measure (decimal). - */ - @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; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - public String getVol5d() { - return vol5d; - } - - public void setVol5d(String vol5d) { - this.vol5d = vol5d; - } - - public String getVol30d() { - return vol30d; - } - - public void setVol30d(String vol30d) { - this.vol30d = vol30d; - } - - public String getVol90d() { - return vol90d; - } - - public void setVol90d(String vol90d) { - this.vol90d = vol90d; - } - - public String getAdv30d() { - return adv30d; - } - - public void setAdv30d(String adv30d) { - this.adv30d = adv30d; - } - - public String getWeightedVol() { - return weightedVol; - } - - public void setWeightedVol(String weightedVol) { - this.weightedVol = weightedVol; - } - - public static class Builder { + /** + * Base asset symbol (e.g., BTC, ETH, SOL) + */ private String symbol; + /** + * 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%) + */ + @JsonProperty("vol_30d") private String vol30d; + /** + * Daily historical volatility over trailing 90 days (decimal, e.g., 0.65 = 65%) + */ + @JsonProperty("vol_90d") private String vol90d; + /** + * Average daily trading volume over trailing 30 days (USD) + */ + @JsonProperty("adv_30d") private String adv30d; + /** + * Weighted blend of the most recent vol_5d and the max vol_5d over last 30 days into a single volatility measure (decimal). + */ + @JsonProperty("weighted_vol") private String weightedVol; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; + 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; } - public Builder vol5d(String vol5d) { - this.vol5d = vol5d; - return this; + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getVol5d() { + return vol5d; } - public Builder vol30d(String vol30d) { - this.vol30d = vol30d; - return this; + public void setVol5d(String vol5d) { + this.vol5d = vol5d; + } + public String getVol30d() { + return vol30d; } - public Builder vol90d(String vol90d) { - this.vol90d = vol90d; - return this; + public void setVol30d(String vol30d) { + this.vol30d = vol30d; + } + public String getVol90d() { + return vol90d; } - public Builder adv30d(String adv30d) { - this.adv30d = adv30d; - return this; + public void setVol90d(String vol90d) { + this.vol90d = vol90d; + } + public String getAdv30d() { + return adv30d; } - public Builder weightedVol(String weightedVol) { - this.weightedVol = weightedVol; - return this; + public void setAdv30d(String adv30d) { + this.adv30d = adv30d; + } + public String getWeightedVol() { + return weightedVol; } - public MarketData build() { - return new MarketData(this); + 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 afe822c..44491e1 100644 --- a/src/main/java/com/coinbase/prime/model/MarketRate.java +++ b/src/main/java/com/coinbase/prime/model/MarketRate.java @@ -19,52 +19,55 @@ package com.coinbase.prime.model; public class MarketRate { - /** The currency symbol */ - private String symbol; - - /** The current market rate of currency */ - private String rate; - - public MarketRate() {} - - public MarketRate(Builder builder) { - this.symbol = builder.symbol; - this.rate = builder.rate; - } + /** + * The currency symbol + */ + private String symbol; - public String getSymbol() { - return symbol; - } + /** + * The current market rate of currency + */ + private String rate; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + public MarketRate() { + } - public String getRate() { - return rate; - } + public MarketRate(Builder builder) { + this.symbol = builder.symbol; + this.rate = builder.rate; + } + public String getSymbol() { + return symbol; + } - public void setRate(String rate) { - this.rate = rate; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getRate() { + return rate; + } - public static class Builder { - private String symbol; + public void setRate(String rate) { + this.rate = rate; + } + public static class Builder { + private String symbol; - private String rate; + private String rate; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder rate(String rate) { - this.rate = rate; - return this; - } + public Builder rate(String rate) { + this.rate = rate; + return this; + } - public MarketRate build() { - return new MarketRate(this); + public MarketRate build() { + return new MarketRate(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/MatchMetadata.java b/src/main/java/com/coinbase/prime/model/MatchMetadata.java index 90d3e6b..4ab0fbb 100644 --- a/src/main/java/com/coinbase/prime/model/MatchMetadata.java +++ b/src/main/java/com/coinbase/prime/model/MatchMetadata.java @@ -17,58 +17,60 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class MatchMetadata { - /** The reference id of the match */ - @JsonProperty("reference_id") - private String referenceId; - - /** The settlement date of the match */ - @JsonProperty("settlement_date") - private String settlementDate; - - public MatchMetadata() {} - - public MatchMetadata(Builder builder) { - this.referenceId = builder.referenceId; - this.settlementDate = builder.settlementDate; - } + /** + * The reference id of the match + */ + @JsonProperty("reference_id") + private String referenceId; - public String getReferenceId() { - return referenceId; - } + /** + * The settlement date of the match + */ + @JsonProperty("settlement_date") + private String settlementDate; - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } + public MatchMetadata() { + } - public String getSettlementDate() { - return settlementDate; - } + public MatchMetadata(Builder builder) { + this.referenceId = builder.referenceId; + this.settlementDate = builder.settlementDate; + } + public String getReferenceId() { + return referenceId; + } - public void setSettlementDate(String settlementDate) { - this.settlementDate = settlementDate; - } + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + public String getSettlementDate() { + return settlementDate; + } - public static class Builder { - private String referenceId; + public void setSettlementDate(String settlementDate) { + this.settlementDate = settlementDate; + } + public static class Builder { + private String referenceId; - private String settlementDate; + private String settlementDate; - public Builder referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; + } - public Builder settlementDate(String settlementDate) { - this.settlementDate = settlementDate; - return this; - } + public Builder settlementDate(String settlementDate) { + this.settlementDate = settlementDate; + return this; + } - public MatchMetadata build() { - return new MatchMetadata(this); + public MatchMetadata build() { + return new MatchMetadata(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/NaturalPersonName.java b/src/main/java/com/coinbase/prime/model/NaturalPersonName.java index aa3dd35..7e72428 100644 --- a/src/main/java/com/coinbase/prime/model/NaturalPersonName.java +++ b/src/main/java/com/coinbase/prime/model/NaturalPersonName.java @@ -17,79 +17,76 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** Natural person name components */ public class NaturalPersonName { - /** Given/first name */ - @JsonProperty("first_name") - private String firstName; - - /** optional middle name (currently unused) */ - @JsonProperty("middle_name") - private String middleName; - - /** Family/last name */ - @JsonProperty("last_name") - private String lastName; - - public NaturalPersonName() {} - - public NaturalPersonName(Builder builder) { - this.firstName = builder.firstName; - this.middleName = builder.middleName; - this.lastName = builder.lastName; - } + /** Given/first name */ + @JsonProperty("first_name") + private String firstName; - public String getFirstName() { - return firstName; - } + /** optional middle name (currently unused) */ + @JsonProperty("middle_name") + private String middleName; - public void setFirstName(String firstName) { - this.firstName = firstName; - } + /** Family/last name */ + @JsonProperty("last_name") + private String lastName; - public String getMiddleName() { - return middleName; - } + public NaturalPersonName() { + } - public void setMiddleName(String middleName) { - this.middleName = middleName; - } + public NaturalPersonName(Builder builder) { + this.firstName = builder.firstName; + this.middleName = builder.middleName; + this.lastName = builder.lastName; + } + public String getFirstName() { + return firstName; + } - public String getLastName() { - return lastName; - } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + public String getMiddleName() { + return middleName; + } - public void setLastName(String lastName) { - this.lastName = lastName; - } + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + public String getLastName() { + return lastName; + } - public static class Builder { - private String firstName; + public void setLastName(String lastName) { + this.lastName = lastName; + } + public static class Builder { + private String firstName; - private String middleName; + private String middleName; - private String lastName; + private String lastName; - public Builder firstName(String firstName) { - this.firstName = firstName; - return this; - } + public Builder firstName(String firstName) { + this.firstName = firstName; + return this; + } - public Builder middleName(String middleName) { - this.middleName = middleName; - return this; - } + public Builder middleName(String middleName) { + this.middleName = middleName; + return this; + } - public Builder lastName(String lastName) { - this.lastName = lastName; - return this; - } + public Builder lastName(String lastName) { + this.lastName = lastName; + return this; + } - public NaturalPersonName build() { - return new NaturalPersonName(this); + public NaturalPersonName build() { + return new NaturalPersonName(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Network.java b/src/main/java/com/coinbase/prime/model/Network.java index 6a46f4c..aafba59 100644 --- a/src/main/java/com/coinbase/prime/model/Network.java +++ b/src/main/java/com/coinbase/prime/model/Network.java @@ -19,52 +19,55 @@ package com.coinbase.prime.model; public class Network { - /** The network id: base, bitcoin, ethereum, solana etc */ - private String id; - - /** The network type: mainnet, testnet, etc */ - private String type; - - public Network() {} - - public Network(Builder builder) { - this.id = builder.id; - this.type = builder.type; - } + /** + * The network id: base, bitcoin, ethereum, solana etc + */ + private String id; - public String getId() { - return id; - } + /** + * The network type: mainnet, testnet, etc + */ + private String type; - public void setId(String id) { - this.id = id; - } + public Network() { + } - public String getType() { - return type; - } + public Network(Builder builder) { + this.id = builder.id; + this.type = builder.type; + } + public String getId() { + return id; + } - public void setType(String type) { - this.type = type; - } + public void setId(String id) { + this.id = id; + } + public String getType() { + return type; + } - public static class Builder { - private String id; + public void setType(String type) { + this.type = type; + } + public static class Builder { + private String id; - private String type; + private String type; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder type(String type) { - this.type = type; - return this; - } + public Builder type(String type) { + this.type = type; + return this; + } - public Network build() { - return new Network(this); + public Network build() { + return new Network(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/NetworkDetails.java b/src/main/java/com/coinbase/prime/model/NetworkDetails.java index d57d361..5ca5a6c 100644 --- a/src/main/java/com/coinbase/prime/model/NetworkDetails.java +++ b/src/main/java/com/coinbase/prime/model/NetworkDetails.java @@ -17,287 +17,287 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.Network; import com.fasterxml.jackson.annotation.JsonProperty; public class NetworkDetails { - private Network network; - - /** The name of the network */ - private String name; - - /** The maximum number of decimals supported for this network */ - @JsonProperty("max_decimals") - private String maxDecimals; - - /** Indicates whether this network is the default network for the asset */ - @JsonProperty("default") - private boolean _default; - - /** Indicates whether this network supports trading */ - @JsonProperty("trading_supported") - private boolean tradingSupported; - - /** Indicates whether this network supports vault */ - @JsonProperty("vault_supported") - private boolean vaultSupported; - - /** Indicates whether this network supports prime custody */ - @JsonProperty("prime_custody_supported") - private boolean primeCustodySupported; - - /** Indicates whether this network requires a destination tag */ - @JsonProperty("destination_tag_required") - private boolean destinationTagRequired; - - /** Base URL to our recommended block explorer (crypto only) */ - @JsonProperty("network_link") - private String networkLink; - - /** - * Indicates the symbol that can be used to query other endpoints, related to transactions, - * wallets, and activities, to get information particularly for this asset on the network - */ - @JsonProperty("network_scoped_symbol") - private String networkScopedSymbol; - - /** - * The minimum withdrawal amount for this network. Applies to trading, prime custody, and vault - * wallets. - */ - @JsonProperty("min_withdrawal_amount") - private String minWithdrawalAmount; - - /** - * The platform maximum withdrawal amount for this network. Applies to trading, prime custody, and - * vault wallets. Note that Prime Transfer policies may override this value. - */ - @JsonProperty("max_withdrawal_amount") - private String maxWithdrawalAmount; - - /** - * The minimum deposit amount for this network. Applies to trading, prime custody, and vault - * wallets. - */ - @JsonProperty("min_deposit_amount") - private String minDepositAmount; - - public NetworkDetails() {} - - public NetworkDetails(Builder builder) { - this.network = builder.network; - this.name = builder.name; - this.maxDecimals = builder.maxDecimals; - this._default = builder._default; - this.tradingSupported = builder.tradingSupported; - this.vaultSupported = builder.vaultSupported; - this.primeCustodySupported = builder.primeCustodySupported; - this.destinationTagRequired = builder.destinationTagRequired; - this.networkLink = builder.networkLink; - this.networkScopedSymbol = builder.networkScopedSymbol; - this.minWithdrawalAmount = builder.minWithdrawalAmount; - this.maxWithdrawalAmount = builder.maxWithdrawalAmount; - this.minDepositAmount = builder.minDepositAmount; - } - - public Network getNetwork() { - return network; - } - - public void setNetwork(Network network) { - this.network = network; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getMaxDecimals() { - return maxDecimals; - } - - public void setMaxDecimals(String maxDecimals) { - this.maxDecimals = maxDecimals; - } - - public boolean getDefault() { - return _default; - } - - public void setDefault(boolean _default) { - this._default = _default; - } - - public boolean getTradingSupported() { - return tradingSupported; - } - - public void setTradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - } - - public boolean getVaultSupported() { - return vaultSupported; - } - - public void setVaultSupported(boolean vaultSupported) { - this.vaultSupported = vaultSupported; - } - - public boolean getPrimeCustodySupported() { - return primeCustodySupported; - } - - public void setPrimeCustodySupported(boolean primeCustodySupported) { - this.primeCustodySupported = primeCustodySupported; - } - - public boolean getDestinationTagRequired() { - return destinationTagRequired; - } - - public void setDestinationTagRequired(boolean destinationTagRequired) { - this.destinationTagRequired = destinationTagRequired; - } - - public String getNetworkLink() { - return networkLink; - } - - public void setNetworkLink(String networkLink) { - this.networkLink = networkLink; - } - - public String getNetworkScopedSymbol() { - return networkScopedSymbol; - } - - public void setNetworkScopedSymbol(String networkScopedSymbol) { - this.networkScopedSymbol = networkScopedSymbol; - } - - public String getMinWithdrawalAmount() { - return minWithdrawalAmount; - } - - public void setMinWithdrawalAmount(String minWithdrawalAmount) { - this.minWithdrawalAmount = minWithdrawalAmount; - } - - public String getMaxWithdrawalAmount() { - return maxWithdrawalAmount; - } - - public void setMaxWithdrawalAmount(String maxWithdrawalAmount) { - this.maxWithdrawalAmount = maxWithdrawalAmount; - } - - public String getMinDepositAmount() { - return minDepositAmount; - } - - public void setMinDepositAmount(String minDepositAmount) { - this.minDepositAmount = minDepositAmount; - } - - public static class Builder { private Network network; + /** + * The name of the network + */ private String name; + /** + * The maximum number of decimals supported for this network + */ + @JsonProperty("max_decimals") private String maxDecimals; + /** + * Indicates whether this network is the default network for the asset + */ + @JsonProperty("default") private boolean _default; + /** + * Indicates whether this network supports trading + */ + @JsonProperty("trading_supported") private boolean tradingSupported; + /** + * Indicates whether this network supports vault + */ + @JsonProperty("vault_supported") private boolean vaultSupported; + /** + * Indicates whether this network supports prime custody + */ + @JsonProperty("prime_custody_supported") private boolean primeCustodySupported; + /** + * Indicates whether this network requires a destination tag + */ + @JsonProperty("destination_tag_required") private boolean destinationTagRequired; + /** + * Base URL to our recommended block explorer (crypto only) + */ + @JsonProperty("network_link") private String networkLink; + /** + * Indicates the symbol that can be used to query other endpoints, related to transactions, wallets, and activities, to get information particularly for this asset on the network + */ + @JsonProperty("network_scoped_symbol") private String networkScopedSymbol; + /** + * The minimum withdrawal amount for this network. Applies to trading, prime custody, and vault wallets. + */ + @JsonProperty("min_withdrawal_amount") private String minWithdrawalAmount; + /** + * The platform maximum withdrawal amount for this network. Applies to trading, prime custody, and vault wallets. Note that Prime Transfer policies may override this value. + */ + @JsonProperty("max_withdrawal_amount") private String maxWithdrawalAmount; + /** + * The minimum deposit amount for this network. Applies to trading, prime custody, and vault wallets. + */ + @JsonProperty("min_deposit_amount") private String minDepositAmount; - public Builder network(Network network) { - this.network = network; - return this; + public NetworkDetails() { + } + + public NetworkDetails(Builder builder) { + this.network = builder.network; + this.name = builder.name; + this.maxDecimals = builder.maxDecimals; + this._default = builder._default; + this.tradingSupported = builder.tradingSupported; + this.vaultSupported = builder.vaultSupported; + this.primeCustodySupported = builder.primeCustodySupported; + this.destinationTagRequired = builder.destinationTagRequired; + this.networkLink = builder.networkLink; + this.networkScopedSymbol = builder.networkScopedSymbol; + this.minWithdrawalAmount = builder.minWithdrawalAmount; + this.maxWithdrawalAmount = builder.maxWithdrawalAmount; + this.minDepositAmount = builder.minDepositAmount; + } + public Network getNetwork() { + return network; } - public Builder name(String name) { - this.name = name; - return this; + public void setNetwork(Network network) { + this.network = network; + } + public String getName() { + return name; } - public Builder maxDecimals(String maxDecimals) { - this.maxDecimals = maxDecimals; - return this; + public void setName(String name) { + this.name = name; + } + public String getMaxDecimals() { + return maxDecimals; } - public Builder _default(boolean _default) { - this._default = _default; - return this; + public void setMaxDecimals(String maxDecimals) { + this.maxDecimals = maxDecimals; + } + public boolean getDefault() { + return _default; } - public Builder tradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - return this; + public void setDefault(boolean _default) { + this._default = _default; + } + public boolean getTradingSupported() { + return tradingSupported; } - public Builder vaultSupported(boolean vaultSupported) { - this.vaultSupported = vaultSupported; - return this; + public void setTradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + } + public boolean getVaultSupported() { + return vaultSupported; } - public Builder primeCustodySupported(boolean primeCustodySupported) { - this.primeCustodySupported = primeCustodySupported; - return this; + public void setVaultSupported(boolean vaultSupported) { + this.vaultSupported = vaultSupported; + } + public boolean getPrimeCustodySupported() { + return primeCustodySupported; } - public Builder destinationTagRequired(boolean destinationTagRequired) { - this.destinationTagRequired = destinationTagRequired; - return this; + public void setPrimeCustodySupported(boolean primeCustodySupported) { + this.primeCustodySupported = primeCustodySupported; + } + public boolean getDestinationTagRequired() { + return destinationTagRequired; } - public Builder networkLink(String networkLink) { - this.networkLink = networkLink; - return this; + public void setDestinationTagRequired(boolean destinationTagRequired) { + this.destinationTagRequired = destinationTagRequired; + } + public String getNetworkLink() { + return networkLink; } - public Builder networkScopedSymbol(String networkScopedSymbol) { - this.networkScopedSymbol = networkScopedSymbol; - return this; + public void setNetworkLink(String networkLink) { + this.networkLink = networkLink; + } + public String getNetworkScopedSymbol() { + return networkScopedSymbol; } - public Builder minWithdrawalAmount(String minWithdrawalAmount) { - this.minWithdrawalAmount = minWithdrawalAmount; - return this; + public void setNetworkScopedSymbol(String networkScopedSymbol) { + this.networkScopedSymbol = networkScopedSymbol; + } + public String getMinWithdrawalAmount() { + return minWithdrawalAmount; } - public Builder maxWithdrawalAmount(String maxWithdrawalAmount) { - this.maxWithdrawalAmount = maxWithdrawalAmount; - return this; + public void setMinWithdrawalAmount(String minWithdrawalAmount) { + this.minWithdrawalAmount = minWithdrawalAmount; + } + public String getMaxWithdrawalAmount() { + return maxWithdrawalAmount; } - public Builder minDepositAmount(String minDepositAmount) { - this.minDepositAmount = minDepositAmount; - return this; + public void setMaxWithdrawalAmount(String maxWithdrawalAmount) { + this.maxWithdrawalAmount = maxWithdrawalAmount; + } + public String getMinDepositAmount() { + return minDepositAmount; } - public NetworkDetails build() { - return new NetworkDetails(this); + public void setMinDepositAmount(String minDepositAmount) { + this.minDepositAmount = minDepositAmount; + } + public static class Builder { + private Network network; + + private String name; + + private String maxDecimals; + + private boolean _default; + + private boolean tradingSupported; + + private boolean vaultSupported; + + private boolean primeCustodySupported; + + private boolean destinationTagRequired; + + private String networkLink; + + private String networkScopedSymbol; + + private String minWithdrawalAmount; + + private String maxWithdrawalAmount; + + private String minDepositAmount; + + public Builder network(Network network) { + this.network = network; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder maxDecimals(String maxDecimals) { + this.maxDecimals = maxDecimals; + return this; + } + + public Builder _default(boolean _default) { + this._default = _default; + return this; + } + + public Builder tradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + return this; + } + + public Builder vaultSupported(boolean vaultSupported) { + this.vaultSupported = vaultSupported; + return this; + } + + public Builder primeCustodySupported(boolean primeCustodySupported) { + this.primeCustodySupported = primeCustodySupported; + return this; + } + + public Builder destinationTagRequired(boolean destinationTagRequired) { + this.destinationTagRequired = destinationTagRequired; + return this; + } + + public Builder networkLink(String networkLink) { + this.networkLink = networkLink; + return this; + } + + public Builder networkScopedSymbol(String networkScopedSymbol) { + this.networkScopedSymbol = networkScopedSymbol; + return this; + } + + public Builder minWithdrawalAmount(String minWithdrawalAmount) { + this.minWithdrawalAmount = minWithdrawalAmount; + return this; + } + + public Builder maxWithdrawalAmount(String maxWithdrawalAmount) { + this.maxWithdrawalAmount = maxWithdrawalAmount; + return this; + } + + public Builder minDepositAmount(String minDepositAmount) { + this.minDepositAmount = minDepositAmount; + return this; + } + + public NetworkDetails build() { + return new NetworkDetails(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/NftCollection.java b/src/main/java/com/coinbase/prime/model/NftCollection.java index 6507fa6..67bf05b 100644 --- a/src/main/java/com/coinbase/prime/model/NftCollection.java +++ b/src/main/java/com/coinbase/prime/model/NftCollection.java @@ -19,33 +19,35 @@ package com.coinbase.prime.model; public class NftCollection { - /** NFT collection name */ - private String name; - - public NftCollection() {} - - public NftCollection(Builder builder) { - this.name = builder.name; - } - - public String getName() { - return name; - } + /** + * NFT collection name + */ + private String name; - public void setName(String name) { - this.name = name; - } + public NftCollection() { + } - public static class Builder { - private String name; + public NftCollection(Builder builder) { + this.name = builder.name; + } + public String getName() { + return name; + } - public Builder name(String name) { - this.name = name; - return this; + public void setName(String name) { + this.name = name; } + public static class Builder { + private String name; - public NftCollection build() { - return new NftCollection(this); + public Builder name(String name) { + this.name = name; + return this; + } + + public NftCollection build() { + return new NftCollection(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/NftItem.java b/src/main/java/com/coinbase/prime/model/NftItem.java index 8fa3b1b..4bc0b2e 100644 --- a/src/main/java/com/coinbase/prime/model/NftItem.java +++ b/src/main/java/com/coinbase/prime/model/NftItem.java @@ -19,33 +19,35 @@ package com.coinbase.prime.model; public class NftItem { - /** NFT item name */ - private String name; - - public NftItem() {} - - public NftItem(Builder builder) { - this.name = builder.name; - } - - public String getName() { - return name; - } + /** + * NFT item name + */ + private String name; - public void setName(String name) { - this.name = name; - } + public NftItem() { + } - public static class Builder { - private String name; + public NftItem(Builder builder) { + this.name = builder.name; + } + public String getName() { + return name; + } - public Builder name(String name) { - this.name = name; - return this; + public void setName(String name) { + this.name = name; } + public static class Builder { + private String name; - public NftItem build() { - return new NftItem(this); + public Builder name(String name) { + this.name = name; + return this; + } + + public NftItem build() { + return new NftItem(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/OnchainAsset.java b/src/main/java/com/coinbase/prime/model/OnchainAsset.java index bee9270..d2bdfd6 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainAsset.java +++ b/src/main/java/com/coinbase/prime/model/OnchainAsset.java @@ -17,115 +17,118 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainAsset { - /** Network this asset is on (ie "ethereum-mainnet") */ - private String network; - - /** Contract Address of this asset (empty for native assets). */ - @JsonProperty("contract_address") - private String contractAddress; - - /** Symbol of this asset. */ - private String symbol; - - /** Token ID of this asset (empty for non NFT assets). */ - @JsonProperty("token_id") - private String tokenId; - - /** Name of this asset, either the name of the crypto token or the NFT collection name. */ - private String name; - - public OnchainAsset() {} - - public OnchainAsset(Builder builder) { - this.network = builder.network; - this.contractAddress = builder.contractAddress; - this.symbol = builder.symbol; - this.tokenId = builder.tokenId; - this.name = builder.name; - } + /** Network this asset is on (ie "ethereum-mainnet") */ + private String network; - public String getNetwork() { - return network; - } + /** + * Contract Address of this asset (empty for native assets). + */ + @JsonProperty("contract_address") + private String contractAddress; - public void setNetwork(String network) { - this.network = network; - } + /** + * Symbol of this asset. + */ + private String symbol; - public String getContractAddress() { - return contractAddress; - } + /** + * Token ID of this asset (empty for non NFT assets). + */ + @JsonProperty("token_id") + private String tokenId; - public void setContractAddress(String contractAddress) { - this.contractAddress = contractAddress; - } + /** + * Name of this asset, either the name of the crypto token or the NFT collection name. + */ + private String name; - public String getSymbol() { - return symbol; - } + public OnchainAsset() { + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } + public OnchainAsset(Builder builder) { + this.network = builder.network; + this.contractAddress = builder.contractAddress; + this.symbol = builder.symbol; + this.tokenId = builder.tokenId; + this.name = builder.name; + } + public String getNetwork() { + return network; + } - public String getTokenId() { - return tokenId; - } + public void setNetwork(String network) { + this.network = network; + } + public String getContractAddress() { + return contractAddress; + } - public void setTokenId(String tokenId) { - this.tokenId = tokenId; - } + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } + public String getSymbol() { + return symbol; + } - public String getName() { - return name; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getTokenId() { + return tokenId; + } - public void setName(String name) { - this.name = name; - } + public void setTokenId(String tokenId) { + this.tokenId = tokenId; + } + public String getName() { + return name; + } - public static class Builder { - private String network; + public void setName(String name) { + this.name = name; + } + public static class Builder { + private String network; - private String contractAddress; + private String contractAddress; - private String symbol; + private String symbol; - private String tokenId; + private String tokenId; - private String name; + private String name; - public Builder network(String network) { - this.network = network; - return this; - } + public Builder network(String network) { + this.network = network; + return this; + } - public Builder contractAddress(String contractAddress) { - this.contractAddress = contractAddress; - return this; - } + public Builder contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder tokenId(String tokenId) { - this.tokenId = tokenId; - return this; - } + public Builder tokenId(String tokenId) { + this.tokenId = tokenId; + return this; + } - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public OnchainAsset build() { - return new OnchainAsset(this); + public OnchainAsset build() { + return new OnchainAsset(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/OnchainBalance.java b/src/main/java/com/coinbase/prime/model/OnchainBalance.java index 3a37efb..c764f5f 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainBalance.java +++ b/src/main/java/com/coinbase/prime/model/OnchainBalance.java @@ -17,76 +17,81 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.VisibilityStatus; +import com.coinbase.prime.model.OnchainAsset; import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainBalance { - private OnchainAsset asset; - - /** The total amount in whole units with full precision. */ - private String amount; - - /** - UNKNOWN_VISIBILITY_STATUS: nil - VISIBLE: Visible - HIDDEN: Hidden - SPAM: Spam */ - @JsonProperty("visibility_status") - private VisibilityStatus visibilityStatus; - - public OnchainBalance() {} - - public OnchainBalance(Builder builder) { - this.asset = builder.asset; - this.amount = builder.amount; - this.visibilityStatus = builder.visibilityStatus; - } + private OnchainAsset asset; - public OnchainAsset getAsset() { - return asset; - } + /** + * The total amount in whole units with full precision. + */ + private String amount; - public void setAsset(OnchainAsset asset) { - this.asset = asset; - } + /** + * - UNKNOWN_VISIBILITY_STATUS: nil + * - VISIBLE: Visible + * - HIDDEN: Hidden + * - SPAM: Spam + */ + @JsonProperty("visibility_status") + private VisibilityStatus visibilityStatus; - public String getAmount() { - return amount; - } + public OnchainBalance() { + } - public void setAmount(String amount) { - this.amount = amount; - } + public OnchainBalance(Builder builder) { + this.asset = builder.asset; + this.amount = builder.amount; + this.visibilityStatus = builder.visibilityStatus; + } + public OnchainAsset getAsset() { + return asset; + } - public VisibilityStatus getVisibilityStatus() { - return visibilityStatus; - } + public void setAsset(OnchainAsset asset) { + this.asset = asset; + } + public String getAmount() { + return amount; + } - public void setVisibilityStatus(VisibilityStatus visibilityStatus) { - this.visibilityStatus = visibilityStatus; - } + public void setAmount(String amount) { + this.amount = amount; + } + public VisibilityStatus getVisibilityStatus() { + return visibilityStatus; + } - public static class Builder { - private OnchainAsset asset; + public void setVisibilityStatus(VisibilityStatus visibilityStatus) { + this.visibilityStatus = visibilityStatus; + } + public static class Builder { + private OnchainAsset asset; - private String amount; + private String amount; - private VisibilityStatus visibilityStatus; + private VisibilityStatus visibilityStatus; - public Builder asset(OnchainAsset asset) { - this.asset = asset; - return this; - } + public Builder asset(OnchainAsset asset) { + this.asset = asset; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder visibilityStatus(VisibilityStatus visibilityStatus) { - this.visibilityStatus = visibilityStatus; - return this; - } + public Builder visibilityStatus(VisibilityStatus visibilityStatus) { + this.visibilityStatus = visibilityStatus; + return this; + } - public OnchainBalance build() { - return new OnchainBalance(this); + public OnchainBalance build() { + return new OnchainBalance(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java index c3896a8..22c8ae1 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java @@ -17,205 +17,208 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.RiskAssessment; import com.coinbase.prime.model.enums.SigningStatus; import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainTransactionDetails { - /** The signed transaction data */ - @JsonProperty("signed_transaction") - private String signedTransaction; - - /** New message for risk assessment details */ - @JsonProperty("risk_assessment") - private RiskAssessment riskAssessment; - - /** The blockchain network chain ID. Will be empty for Solana transactions. */ - @JsonProperty("chain_id") - private String chainId; - - /** The transaction nonce. Only present for EVM-based blockchain transactions. */ - private String nonce; - - /** The ID of the transaction that this transaction replaced */ - @JsonProperty("replaced_transaction_id") - private String replacedTransactionId; - - /** The destination address for the transaction */ - @JsonProperty("destination_address") - private String destinationAddress; - - /** - * If set to true, the transaction will not be broadcast to the network. You can still retrieve - * the signed transaction from the GetTransaction endpoint by transaction ID once the transaction - * is created. - */ - @JsonProperty("skip_broadcast") - private boolean skipBroadcast; - - /** Reason for transaction failure if applicable */ - @JsonProperty("failure_reason") - private String failureReason; - - /** - * - SIGNING_STATUS_UNKNOWN: Unknown signing status - SIGNED: Transaction has been signed - - * UNSIGNED: Transaction is unsigned - */ - @JsonProperty("signing_status") - private SigningStatus signingStatus; - - public OnchainTransactionDetails() {} - - public OnchainTransactionDetails(Builder builder) { - this.signedTransaction = builder.signedTransaction; - this.riskAssessment = builder.riskAssessment; - this.chainId = builder.chainId; - this.nonce = builder.nonce; - this.replacedTransactionId = builder.replacedTransactionId; - this.destinationAddress = builder.destinationAddress; - this.skipBroadcast = builder.skipBroadcast; - this.failureReason = builder.failureReason; - this.signingStatus = builder.signingStatus; - } - - public String getSignedTransaction() { - return signedTransaction; - } - - public void setSignedTransaction(String signedTransaction) { - this.signedTransaction = signedTransaction; - } - - public RiskAssessment getRiskAssessment() { - return riskAssessment; - } - - public void setRiskAssessment(RiskAssessment riskAssessment) { - this.riskAssessment = riskAssessment; - } - - public String getChainId() { - return chainId; - } - - public void setChainId(String chainId) { - this.chainId = chainId; - } - - public String getNonce() { - return nonce; - } - - public void setNonce(String nonce) { - this.nonce = nonce; - } - - public String getReplacedTransactionId() { - return replacedTransactionId; - } - - public void setReplacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - } - - public String getDestinationAddress() { - return destinationAddress; - } - - public void setDestinationAddress(String destinationAddress) { - this.destinationAddress = destinationAddress; - } - - public boolean getSkipBroadcast() { - return skipBroadcast; - } - - public void setSkipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - } - - public String getFailureReason() { - return failureReason; - } - - public void setFailureReason(String failureReason) { - this.failureReason = failureReason; - } - - public SigningStatus getSigningStatus() { - return signingStatus; - } - - public void setSigningStatus(SigningStatus signingStatus) { - this.signingStatus = signingStatus; - } - - public static class Builder { + /** + * The signed transaction data + */ + @JsonProperty("signed_transaction") private String signedTransaction; + /** New message for risk assessment details */ + @JsonProperty("risk_assessment") private RiskAssessment riskAssessment; + /** + * The blockchain network chain ID. Will be empty for Solana transactions. + */ + @JsonProperty("chain_id") private String chainId; + /** + * The transaction nonce. Only present for EVM-based blockchain transactions. + */ private String nonce; + /** + * The ID of the transaction that this transaction replaced + */ + @JsonProperty("replaced_transaction_id") private String replacedTransactionId; + /** + * The destination address for the transaction + */ + @JsonProperty("destination_address") private String destinationAddress; + /** + * If set to true, the transaction will not be broadcast to the network. You can still retrieve the signed transaction from the GetTransaction endpoint by transaction ID once the transaction is created. + */ + @JsonProperty("skip_broadcast") private boolean skipBroadcast; + /** + * Reason for transaction failure if applicable + */ + @JsonProperty("failure_reason") private String failureReason; + /** + * - SIGNING_STATUS_UNKNOWN: Unknown signing status + * - SIGNED: Transaction has been signed + * - UNSIGNED: Transaction is unsigned + */ + @JsonProperty("signing_status") private SigningStatus signingStatus; - public Builder signedTransaction(String signedTransaction) { - this.signedTransaction = signedTransaction; - return this; + public OnchainTransactionDetails() { + } + + public OnchainTransactionDetails(Builder builder) { + this.signedTransaction = builder.signedTransaction; + this.riskAssessment = builder.riskAssessment; + this.chainId = builder.chainId; + this.nonce = builder.nonce; + this.replacedTransactionId = builder.replacedTransactionId; + this.destinationAddress = builder.destinationAddress; + this.skipBroadcast = builder.skipBroadcast; + this.failureReason = builder.failureReason; + this.signingStatus = builder.signingStatus; + } + public String getSignedTransaction() { + return signedTransaction; + } + + public void setSignedTransaction(String signedTransaction) { + this.signedTransaction = signedTransaction; + } + public RiskAssessment getRiskAssessment() { + return riskAssessment; } - public Builder riskAssessment(RiskAssessment riskAssessment) { - this.riskAssessment = riskAssessment; - return this; + public void setRiskAssessment(RiskAssessment riskAssessment) { + this.riskAssessment = riskAssessment; + } + public String getChainId() { + return chainId; } - public Builder chainId(String chainId) { - this.chainId = chainId; - return this; + public void setChainId(String chainId) { + this.chainId = chainId; + } + public String getNonce() { + return nonce; } - public Builder nonce(String nonce) { - this.nonce = nonce; - return this; + public void setNonce(String nonce) { + this.nonce = nonce; + } + public String getReplacedTransactionId() { + return replacedTransactionId; } - public Builder replacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - return this; + public void setReplacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + } + public String getDestinationAddress() { + return destinationAddress; } - public Builder destinationAddress(String destinationAddress) { - this.destinationAddress = destinationAddress; - return this; + public void setDestinationAddress(String destinationAddress) { + this.destinationAddress = destinationAddress; + } + public boolean getSkipBroadcast() { + return skipBroadcast; } - public Builder skipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - return this; + public void setSkipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + } + public String getFailureReason() { + return failureReason; } - public Builder failureReason(String failureReason) { - this.failureReason = failureReason; - return this; + public void setFailureReason(String failureReason) { + this.failureReason = failureReason; + } + public SigningStatus getSigningStatus() { + return signingStatus; } - public Builder signingStatus(SigningStatus signingStatus) { - this.signingStatus = signingStatus; - return this; + public void setSigningStatus(SigningStatus signingStatus) { + this.signingStatus = signingStatus; } + public static class Builder { + private String signedTransaction; + + private RiskAssessment riskAssessment; + + private String chainId; - public OnchainTransactionDetails build() { - return new OnchainTransactionDetails(this); + private String nonce; + + private String replacedTransactionId; + + private String destinationAddress; + + private boolean skipBroadcast; + + private String failureReason; + + private SigningStatus signingStatus; + + public Builder signedTransaction(String signedTransaction) { + this.signedTransaction = signedTransaction; + return this; + } + + public Builder riskAssessment(RiskAssessment riskAssessment) { + this.riskAssessment = riskAssessment; + return this; + } + + public Builder chainId(String chainId) { + this.chainId = chainId; + return this; + } + + public Builder nonce(String nonce) { + this.nonce = nonce; + return this; + } + + public Builder replacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + return this; + } + + public Builder destinationAddress(String destinationAddress) { + this.destinationAddress = destinationAddress; + return this; + } + + public Builder skipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + return this; + } + + public Builder failureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + public Builder signingStatus(SigningStatus signingStatus) { + this.signingStatus = signingStatus; + return this; + } + + public OnchainTransactionDetails build() { + return new OnchainTransactionDetails(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java index 23df078..a49114a 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java @@ -17,58 +17,61 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.AssetChange; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class OnchainTransactionMetadata { - /** The transaction type label of the confirmed transaction post settlement */ - private String label; - - /** The confirmed asset changes (onchain) */ - @JsonProperty("confirmed_asset_changes") - private List confirmedAssetChanges; - - public OnchainTransactionMetadata() {} - - public OnchainTransactionMetadata(Builder builder) { - this.label = builder.label; - this.confirmedAssetChanges = builder.confirmedAssetChanges; - } + /** + * The transaction type label of the confirmed transaction post settlement + */ + private String label; - public String getLabel() { - return label; - } + /** + * The confirmed asset changes (onchain) + */ + @JsonProperty("confirmed_asset_changes") + private List confirmedAssetChanges; - public void setLabel(String label) { - this.label = label; - } + public OnchainTransactionMetadata() { + } - public List getConfirmedAssetChanges() { - return confirmedAssetChanges; - } + public OnchainTransactionMetadata(Builder builder) { + this.label = builder.label; + this.confirmedAssetChanges = builder.confirmedAssetChanges; + } + public String getLabel() { + return label; + } - public void setConfirmedAssetChanges(List confirmedAssetChanges) { - this.confirmedAssetChanges = confirmedAssetChanges; - } + public void setLabel(String label) { + this.label = label; + } + public List getConfirmedAssetChanges() { + return confirmedAssetChanges; + } - public static class Builder { - private String label; + public void setConfirmedAssetChanges(List confirmedAssetChanges) { + this.confirmedAssetChanges = confirmedAssetChanges; + } + public static class Builder { + private String label; - private List confirmedAssetChanges; + private List confirmedAssetChanges; - public Builder label(String label) { - this.label = label; - return this; - } + public Builder label(String label) { + this.label = label; + return this; + } - public Builder confirmedAssetChanges(List confirmedAssetChanges) { - this.confirmedAssetChanges = confirmedAssetChanges; - return this; - } + public Builder confirmedAssetChanges(List confirmedAssetChanges) { + this.confirmedAssetChanges = confirmedAssetChanges; + return this; + } - public OnchainTransactionMetadata build() { - return new OnchainTransactionMetadata(this); + public OnchainTransactionMetadata build() { + return new OnchainTransactionMetadata(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index eeb2673..aa77651 100644 --- a/src/main/java/com/coinbase/prime/model/Order.java +++ b/src/main/java/com/coinbase/prime/model/Order.java @@ -17,7 +17,9 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.LimitOrderEdit; +import com.coinbase.prime.model.CommissionDetailTotal; +import com.coinbase.prime.model.OrderEdit; import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.OrderStatus; import com.coinbase.prime.model.enums.OrderType; @@ -28,790 +30,805 @@ import java.util.List; public class Order { - /** The unique order ID generated by Coinbase */ - private String id; - - /** The ID of the user that created the order */ - @JsonProperty("user_id") - private String userId; - - /** The ID of the portfolio that owns the order */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The ID of the product being traded by the order */ - @JsonProperty("product_id") - private String productId; - - /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ - private OrderSide side; - - /** - * A client-generated order ID used for reference purposes (note: order will be rejected if this - * ID is not unique among all currently active orders) - */ - @JsonProperty("client_order_id") - private String clientOrderId; - - /** - * - UNKNOWN_ORDER_TYPE: nil value - MARKET: A [market - * order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) - LIMIT: A [limit - * order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) - TWAP: A [time-weighted - * average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) - BLOCK: A - * [block trade](https://en.wikipedia.org/wiki/Block_trade) - VWAP: A [volume-weighted average - * price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) - STOP_LIMIT: A - * [conditional order combined of stop order and limit - * order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) - RFQ: A [request for - * quote](https://en.wikipedia.org/wiki/Request_for_quote) - PEG: A pegged order that dynamically - * adjust based on market conditions while maintaining execution discretion and avoiding adverse - * selection - */ - private OrderType type; - - /** 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 - */ - @JsonProperty("quote_value") - private String quoteValue; - - /** The limit price (required for TWAP, VWAP, LIMIT and STOP_LIMIT orders) */ - @JsonProperty("limit_price") - private String limitPrice; - - /** The start time of the order in UTC (only applies to TWAP, VWAP orders.) */ - @JsonProperty("start_time") - private OffsetDateTime startTime; - - /** - * The expiry time of the order in UTC (applies to TWAP, VWAP, LIMIT, and STOP_LIMIT orders with - * `time_in_force` set to `GTD`) - */ - @JsonProperty("expiry_time") - private OffsetDateTime expiryTime; - - /** - * - UNKNOWN_ORDER_STATUS: nil value - OPEN: The order is open but unfilled - FILLED: The 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 - */ - private OrderStatus status; - - /** - * - UNKNOWN_TIME_IN_FORCE: nil value - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time - - * GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled - IMMEDIATE_OR_CANCEL: Order is - * executed immediately at submission or is cancelled - FILL_OR_KILL: Order is executed - * immediately and fully at submission or is cancelled - */ - @JsonProperty("time_in_force") - private TimeInForceType timeInForce; - - /** The order creation time as a UTC timestamp */ - @JsonProperty("created_at") - private OffsetDateTime createdAt; - - /** Size filled (in base asset units) */ - @JsonProperty("filled_quantity") - private String filledQuantity; - - /** Market value filled (in quote asset units) */ - @JsonProperty("filled_value") - private String filledValue; - - /** Indicates the average `filled_price` */ - @JsonProperty("average_filled_price") - private String averageFilledPrice; - - /** - * Total commission paid on this order (in quote asset units) -- only applicable for partially- or - * fully-filled orders - */ - private String commission; - - /** - * Fee charged by the exchange for Cost Plus commission configurations. Exchange fee will be 0 for - * All In commission configurations. - */ - @JsonProperty("exchange_fee") - private String exchangeFee; - - /** historical pov for the order */ - @JsonProperty("historical_pov") - private String historicalPov; - - /** - * Specifies the stop price at which the order activates. The order is activated if the last trade - * price on Coinbase Exchange crosses the stop price specified on the order - */ - @JsonProperty("stop_price") - private String stopPrice; - - /** Indicates the average `filled_price` net of commissions and fees */ - @JsonProperty("net_average_filled_price") - private String netAverageFilledPrice; - - /** - * Indicates a user friendly message for regarding various aspects of the order such as - * cancellation or rejection reasons - */ - @JsonProperty("user_context") - private String userContext; - - /** The client product ID of the fill indictating the settlment currency */ - @JsonProperty("client_product_id") - private String clientProductId; - - /** Post-only flag - indicates whether the order was placed as post-only */ - @JsonProperty("post_only") - private boolean postOnly; - - /** The history of order edits (deprecated: use edit_history instead) */ - @JsonProperty("order_edit_history") - private List orderEditHistory; - - /** Indicates if this was a raise exact order (size inclusive of fees for sell orders in quote) */ - @JsonProperty("is_raise_exact") - private boolean isRaiseExact; - - /** Display size for the order */ - @JsonProperty("display_size") - private String displaySize; - - /** The history of order edits */ - @JsonProperty("edit_history") - private List editHistory; - - /** The maximum order size that will show up on venue order books (in quote currency). */ - @JsonProperty("display_quote_size") - private String displayQuoteSize; - - /** The maximum order size that will show up on venue order books (in base currency). */ - @JsonProperty("display_base_size") - private String displayBaseSize; - - /** The peg offset type for PEG orders (PRICE, BASIS_POINTS, or CUMULATIVE_DEPTH_IN_BASE_UNITS) */ - @JsonProperty("peg_offset_type") - private String pegOffsetType; - - /** The offset value for PEG orders */ - private String offset; - - /** The wig (would if good) level for PEG orders - best price opposite to limit_price */ - @JsonProperty("wig_level") - private String wigLevel; - - /** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ - @JsonProperty("product_type") - private ProductType productType; - - @JsonProperty("commission_detail_total") - private CommissionDetailTotal commissionDetailTotal; - - public Order() {} - - public Order(Builder builder) { - this.id = builder.id; - this.userId = builder.userId; - this.portfolioId = builder.portfolioId; - this.productId = builder.productId; - this.side = builder.side; - this.clientOrderId = builder.clientOrderId; - this.type = builder.type; - this.baseQuantity = builder.baseQuantity; - this.quoteValue = builder.quoteValue; - this.limitPrice = builder.limitPrice; - this.startTime = builder.startTime; - this.expiryTime = builder.expiryTime; - this.status = builder.status; - this.timeInForce = builder.timeInForce; - this.createdAt = builder.createdAt; - this.filledQuantity = builder.filledQuantity; - this.filledValue = builder.filledValue; - this.averageFilledPrice = builder.averageFilledPrice; - this.commission = builder.commission; - this.exchangeFee = builder.exchangeFee; - this.historicalPov = builder.historicalPov; - this.stopPrice = builder.stopPrice; - this.netAverageFilledPrice = builder.netAverageFilledPrice; - this.userContext = builder.userContext; - this.clientProductId = builder.clientProductId; - this.postOnly = builder.postOnly; - this.orderEditHistory = builder.orderEditHistory; - this.isRaiseExact = builder.isRaiseExact; - this.displaySize = builder.displaySize; - this.editHistory = builder.editHistory; - this.displayQuoteSize = builder.displayQuoteSize; - this.displayBaseSize = builder.displayBaseSize; - this.pegOffsetType = builder.pegOffsetType; - this.offset = builder.offset; - this.wigLevel = builder.wigLevel; - this.productType = builder.productType; - this.commissionDetailTotal = builder.commissionDetailTotal; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getProductId() { - return productId; - } - - public void setProductId(String productId) { - this.productId = productId; - } - - public OrderSide getSide() { - return side; - } - - public void setSide(OrderSide side) { - this.side = side; - } - - public String getClientOrderId() { - return clientOrderId; - } - - public void setClientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - } - - public OrderType getType() { - return type; - } - - public void setType(OrderType type) { - this.type = type; - } - - public String getBaseQuantity() { - return baseQuantity; - } - - public void setBaseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - } - - public String getQuoteValue() { - return quoteValue; - } - - public void setQuoteValue(String quoteValue) { - this.quoteValue = quoteValue; - } - - public String getLimitPrice() { - return limitPrice; - } - - public void setLimitPrice(String limitPrice) { - this.limitPrice = limitPrice; - } - - public OffsetDateTime getStartTime() { - return startTime; - } - - public void setStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - } - - public OffsetDateTime getExpiryTime() { - return expiryTime; - } - - public void setExpiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - } - - public OrderStatus getStatus() { - return status; - } - - public void setStatus(OrderStatus status) { - this.status = status; - } - - public TimeInForceType getTimeInForce() { - return timeInForce; - } - - public void setTimeInForce(TimeInForceType timeInForce) { - this.timeInForce = timeInForce; - } - - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public String getFilledQuantity() { - return filledQuantity; - } - - public void setFilledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - } - - public String getFilledValue() { - return filledValue; - } - - public void setFilledValue(String filledValue) { - this.filledValue = filledValue; - } - - public String getAverageFilledPrice() { - return averageFilledPrice; - } - - public void setAverageFilledPrice(String averageFilledPrice) { - this.averageFilledPrice = averageFilledPrice; - } - - public String getCommission() { - return commission; - } - - public void setCommission(String commission) { - this.commission = commission; - } - - public String getExchangeFee() { - return exchangeFee; - } - - public void setExchangeFee(String exchangeFee) { - this.exchangeFee = exchangeFee; - } - - public String getHistoricalPov() { - return historicalPov; - } - - public void setHistoricalPov(String historicalPov) { - this.historicalPov = historicalPov; - } - - public String getStopPrice() { - return stopPrice; - } - - public void setStopPrice(String stopPrice) { - this.stopPrice = stopPrice; - } - - public String getNetAverageFilledPrice() { - return netAverageFilledPrice; - } - - public void setNetAverageFilledPrice(String netAverageFilledPrice) { - this.netAverageFilledPrice = netAverageFilledPrice; - } - - public String getUserContext() { - return userContext; - } - - public void setUserContext(String userContext) { - this.userContext = userContext; - } - - public String getClientProductId() { - return clientProductId; - } - - public void setClientProductId(String clientProductId) { - this.clientProductId = clientProductId; - } - - public boolean getPostOnly() { - return postOnly; - } - - public void setPostOnly(boolean postOnly) { - this.postOnly = postOnly; - } - - public List getOrderEditHistory() { - return orderEditHistory; - } - - public void setOrderEditHistory(List orderEditHistory) { - this.orderEditHistory = orderEditHistory; - } - - public boolean getIsRaiseExact() { - return isRaiseExact; - } - - public void setIsRaiseExact(boolean isRaiseExact) { - this.isRaiseExact = isRaiseExact; - } - - public String getDisplaySize() { - return displaySize; - } - - public void setDisplaySize(String displaySize) { - this.displaySize = displaySize; - } - - public List getEditHistory() { - return editHistory; - } - - public void setEditHistory(List editHistory) { - this.editHistory = editHistory; - } - - public String getDisplayQuoteSize() { - return displayQuoteSize; - } - - public void setDisplayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - } - - public String getDisplayBaseSize() { - return displayBaseSize; - } - - public void setDisplayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - } - - public String getPegOffsetType() { - return pegOffsetType; - } - - public void setPegOffsetType(String pegOffsetType) { - this.pegOffsetType = pegOffsetType; - } - - public String getOffset() { - return offset; - } - - public void setOffset(String offset) { - this.offset = offset; - } - - public String getWigLevel() { - return wigLevel; - } - - public void setWigLevel(String wigLevel) { - this.wigLevel = wigLevel; - } - - public ProductType getProductType() { - return productType; - } - - public void setProductType(ProductType productType) { - this.productType = productType; - } - - public CommissionDetailTotal getCommissionDetailTotal() { - return commissionDetailTotal; - } - - public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - } - - public static class Builder { + /** + * The unique order ID generated by Coinbase + */ private String id; + /** + * The ID of the user that created the order + */ + @JsonProperty("user_id") private String userId; + /** + * The ID of the portfolio that owns the order + */ + @JsonProperty("portfolio_id") private String portfolioId; + /** + * The ID of the product being traded by the order + */ + @JsonProperty("product_id") private String productId; + /** + * - UNKNOWN_ORDER_SIDE: nil value + * - BUY: Buy order + * - SELL: Sell order + */ private OrderSide side; + /** + * A client-generated order ID used for reference purposes (note: order will be rejected if this ID is not unique among all currently active orders) + */ + @JsonProperty("client_order_id") private String clientOrderId; + /** + * - UNKNOWN_ORDER_TYPE: nil value + * - MARKET: A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) + * - LIMIT: A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) + * - TWAP: A [time-weighted average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) + * - BLOCK: A [block trade](https://en.wikipedia.org/wiki/Block_trade) + * - VWAP: A [volume-weighted average price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) + * - STOP_LIMIT: A [conditional order combined of stop order and limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) + * - RFQ: A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) + * - PEG: A pegged order that dynamically adjust based on market conditions while maintaining execution discretion and avoiding adverse selection + */ private OrderType type; + /** + * 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 + */ + @JsonProperty("quote_value") private String quoteValue; + /** + * The limit price (required for TWAP, VWAP, LIMIT and STOP_LIMIT orders) + */ + @JsonProperty("limit_price") private String limitPrice; + /** + * The start time of the order in UTC (only applies to TWAP, VWAP orders.) + */ + @JsonProperty("start_time") private OffsetDateTime startTime; + /** + * The expiry time of the order in UTC (applies to TWAP, VWAP, LIMIT, and STOP_LIMIT orders with `time_in_force` set to `GTD`) + */ + @JsonProperty("expiry_time") private OffsetDateTime expiryTime; + /** + * - UNKNOWN_ORDER_STATUS: nil value + * - OPEN: The order is open but unfilled + * - FILLED: The 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 + */ private OrderStatus status; + /** + * - UNKNOWN_TIME_IN_FORCE: nil value + * - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time + * - GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled + * - IMMEDIATE_OR_CANCEL: Order is executed immediately at submission or is cancelled + * - FILL_OR_KILL: Order is executed immediately and fully at submission or is cancelled + */ + @JsonProperty("time_in_force") private TimeInForceType timeInForce; + /** + * The order creation time as a UTC timestamp + */ + @JsonProperty("created_at") private OffsetDateTime createdAt; + /** + * Size filled (in base asset units) + */ + @JsonProperty("filled_quantity") private String filledQuantity; + /** + * Market value filled (in quote asset units) + */ + @JsonProperty("filled_value") private String filledValue; + /** + * Indicates the average `filled_price` + */ + @JsonProperty("average_filled_price") private String averageFilledPrice; + /** + * Total commission paid on this order (in quote asset units) -- only applicable for partially- or fully-filled orders + */ private String commission; + /** + * Fee charged by the exchange for Cost Plus commission configurations. Exchange fee will be 0 for All In commission configurations. + */ + @JsonProperty("exchange_fee") private String exchangeFee; + /** + * historical pov for the order + */ + @JsonProperty("historical_pov") private String historicalPov; + /** + * Specifies the stop price at which the order activates. The order is activated if the last trade price on Coinbase Exchange crosses the stop price specified on the order + */ + @JsonProperty("stop_price") private String stopPrice; + /** + * Indicates the average `filled_price` net of commissions and fees + */ + @JsonProperty("net_average_filled_price") private String netAverageFilledPrice; + /** + * Indicates a user friendly message for regarding various aspects of the order such as cancellation or rejection reasons + */ + @JsonProperty("user_context") private String userContext; + /** + * The client product ID of the fill indictating the settlment currency + */ + @JsonProperty("client_product_id") private String clientProductId; + /** + * Post-only flag - indicates whether the order was placed as post-only + */ + @JsonProperty("post_only") private boolean postOnly; + /** + * The history of order edits (deprecated: use edit_history instead) + */ + @JsonProperty("order_edit_history") private List orderEditHistory; + /** + * Indicates if this was a raise exact order (size inclusive of fees for sell orders in quote) + */ + @JsonProperty("is_raise_exact") private boolean isRaiseExact; + /** + * Display size for the order + */ + @JsonProperty("display_size") private String displaySize; + /** + * The history of order edits + */ + @JsonProperty("edit_history") private List editHistory; + /** + * The maximum order size that will show up on venue order books (in quote currency). + */ + @JsonProperty("display_quote_size") private String displayQuoteSize; + /** + * The maximum order size that will show up on venue order books (in base currency). + */ + @JsonProperty("display_base_size") private String displayBaseSize; + /** + * The peg offset type for PEG orders (PRICE, BASIS_POINTS, or CUMULATIVE_DEPTH_IN_BASE_UNITS) + */ + @JsonProperty("peg_offset_type") private String pegOffsetType; + /** + * The offset value for PEG orders + */ private String offset; + /** + * The wig (would if good) level for PEG orders - best price opposite to limit_price + */ + @JsonProperty("wig_level") private String wigLevel; + /** + * - UNKNOWN_PRODUCT_TYPE: Unknown product type + * - SPOT: Spot product + * - FUTURE: Future product + */ + @JsonProperty("product_type") private ProductType productType; + @JsonProperty("commission_detail_total") private CommissionDetailTotal commissionDetailTotal; - public Builder id(String id) { - this.id = id; - return this; + public Order() { + } + + public Order(Builder builder) { + this.id = builder.id; + this.userId = builder.userId; + this.portfolioId = builder.portfolioId; + this.productId = builder.productId; + this.side = builder.side; + this.clientOrderId = builder.clientOrderId; + this.type = builder.type; + this.baseQuantity = builder.baseQuantity; + this.quoteValue = builder.quoteValue; + this.limitPrice = builder.limitPrice; + this.startTime = builder.startTime; + this.expiryTime = builder.expiryTime; + this.status = builder.status; + this.timeInForce = builder.timeInForce; + this.createdAt = builder.createdAt; + this.filledQuantity = builder.filledQuantity; + this.filledValue = builder.filledValue; + this.averageFilledPrice = builder.averageFilledPrice; + this.commission = builder.commission; + this.exchangeFee = builder.exchangeFee; + this.historicalPov = builder.historicalPov; + this.stopPrice = builder.stopPrice; + this.netAverageFilledPrice = builder.netAverageFilledPrice; + this.userContext = builder.userContext; + this.clientProductId = builder.clientProductId; + this.postOnly = builder.postOnly; + this.orderEditHistory = builder.orderEditHistory; + this.isRaiseExact = builder.isRaiseExact; + this.displaySize = builder.displaySize; + this.editHistory = builder.editHistory; + this.displayQuoteSize = builder.displayQuoteSize; + this.displayBaseSize = builder.displayBaseSize; + this.pegOffsetType = builder.pegOffsetType; + this.offset = builder.offset; + this.wigLevel = builder.wigLevel; + this.productType = builder.productType; + this.commissionDetailTotal = builder.commissionDetailTotal; + } + public String getId() { + return id; } - public Builder userId(String userId) { - this.userId = userId; - return this; + public void setId(String id) { + this.id = id; + } + public String getUserId() { + return userId; } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; + public void setUserId(String userId) { + this.userId = userId; + } + public String getPortfolioId() { + return portfolioId; } - public Builder productId(String productId) { - this.productId = productId; - return this; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getProductId() { + return productId; } - public Builder side(OrderSide side) { - this.side = side; - return this; + public void setProductId(String productId) { + this.productId = productId; + } + public OrderSide getSide() { + return side; } - public Builder clientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; + public void setSide(OrderSide side) { + this.side = side; + } + public String getClientOrderId() { + return clientOrderId; + } + + public void setClientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + } + public OrderType getType() { + return type; } - public Builder type(OrderType type) { - this.type = type; - return this; + public void setType(OrderType type) { + this.type = type; + } + public String getBaseQuantity() { + return baseQuantity; } - public Builder baseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - return this; + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + public String getQuoteValue() { + return quoteValue; } - public Builder quoteValue(String quoteValue) { - this.quoteValue = quoteValue; - return this; + public void setQuoteValue(String quoteValue) { + this.quoteValue = quoteValue; + } + public String getLimitPrice() { + return limitPrice; } - public Builder limitPrice(String limitPrice) { - this.limitPrice = limitPrice; - return this; + public void setLimitPrice(String limitPrice) { + this.limitPrice = limitPrice; + } + public OffsetDateTime getStartTime() { + return startTime; } - public Builder startTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; + public void setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + } + public OffsetDateTime getExpiryTime() { + return expiryTime; } - public Builder expiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - return this; + public void setExpiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + } + public OrderStatus getStatus() { + return status; } - public Builder status(OrderStatus status) { - this.status = status; - return this; + public void setStatus(OrderStatus status) { + this.status = status; + } + public TimeInForceType getTimeInForce() { + return timeInForce; } - public Builder timeInForce(TimeInForceType timeInForce) { - this.timeInForce = timeInForce; - return this; + public void setTimeInForce(TimeInForceType timeInForce) { + this.timeInForce = timeInForce; + } + public OffsetDateTime getCreatedAt() { + return createdAt; } - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + public String getFilledQuantity() { + return filledQuantity; } - public Builder filledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - return this; + public void setFilledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + } + public String getFilledValue() { + return filledValue; } - public Builder filledValue(String filledValue) { - this.filledValue = filledValue; - return this; + public void setFilledValue(String filledValue) { + this.filledValue = filledValue; + } + public String getAverageFilledPrice() { + return averageFilledPrice; } - public Builder averageFilledPrice(String averageFilledPrice) { - this.averageFilledPrice = averageFilledPrice; - return this; + public void setAverageFilledPrice(String averageFilledPrice) { + this.averageFilledPrice = averageFilledPrice; + } + public String getCommission() { + return commission; } - public Builder commission(String commission) { - this.commission = commission; - return this; + public void setCommission(String commission) { + this.commission = commission; + } + public String getExchangeFee() { + return exchangeFee; } - public Builder exchangeFee(String exchangeFee) { - this.exchangeFee = exchangeFee; - return this; + public void setExchangeFee(String exchangeFee) { + this.exchangeFee = exchangeFee; + } + public String getHistoricalPov() { + return historicalPov; } - public Builder historicalPov(String historicalPov) { - this.historicalPov = historicalPov; - return this; + public void setHistoricalPov(String historicalPov) { + this.historicalPov = historicalPov; + } + public String getStopPrice() { + return stopPrice; } - public Builder stopPrice(String stopPrice) { - this.stopPrice = stopPrice; - return this; + public void setStopPrice(String stopPrice) { + this.stopPrice = stopPrice; + } + public String getNetAverageFilledPrice() { + return netAverageFilledPrice; } - public Builder netAverageFilledPrice(String netAverageFilledPrice) { - this.netAverageFilledPrice = netAverageFilledPrice; - return this; + public void setNetAverageFilledPrice(String netAverageFilledPrice) { + this.netAverageFilledPrice = netAverageFilledPrice; + } + public String getUserContext() { + return userContext; } - public Builder userContext(String userContext) { - this.userContext = userContext; - return this; + public void setUserContext(String userContext) { + this.userContext = userContext; + } + public String getClientProductId() { + return clientProductId; } - public Builder clientProductId(String clientProductId) { - this.clientProductId = clientProductId; - return this; + public void setClientProductId(String clientProductId) { + this.clientProductId = clientProductId; + } + public boolean getPostOnly() { + return postOnly; } - public Builder postOnly(boolean postOnly) { - this.postOnly = postOnly; - return this; + public void setPostOnly(boolean postOnly) { + this.postOnly = postOnly; + } + public List getOrderEditHistory() { + return orderEditHistory; } - public Builder orderEditHistory(List orderEditHistory) { - this.orderEditHistory = orderEditHistory; - return this; + public void setOrderEditHistory(List orderEditHistory) { + this.orderEditHistory = orderEditHistory; + } + public boolean getIsRaiseExact() { + return isRaiseExact; } - public Builder isRaiseExact(boolean isRaiseExact) { - this.isRaiseExact = isRaiseExact; - return this; + public void setIsRaiseExact(boolean isRaiseExact) { + this.isRaiseExact = isRaiseExact; + } + public String getDisplaySize() { + return displaySize; } - public Builder displaySize(String displaySize) { - this.displaySize = displaySize; - return this; + public void setDisplaySize(String displaySize) { + this.displaySize = displaySize; + } + public List getEditHistory() { + return editHistory; } - public Builder editHistory(List editHistory) { - this.editHistory = editHistory; - return this; + public void setEditHistory(List editHistory) { + this.editHistory = editHistory; + } + public String getDisplayQuoteSize() { + return displayQuoteSize; } - public Builder displayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - return this; + public void setDisplayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + } + public String getDisplayBaseSize() { + return displayBaseSize; } - public Builder displayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - return this; + public void setDisplayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + } + public String getPegOffsetType() { + return pegOffsetType; } - public Builder pegOffsetType(String pegOffsetType) { - this.pegOffsetType = pegOffsetType; - return this; + public void setPegOffsetType(String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + public String getOffset() { + return offset; } - public Builder offset(String offset) { - this.offset = offset; - return this; + public void setOffset(String offset) { + this.offset = offset; + } + public String getWigLevel() { + return wigLevel; } - public Builder wigLevel(String wigLevel) { - this.wigLevel = wigLevel; - return this; + public void setWigLevel(String wigLevel) { + this.wigLevel = wigLevel; + } + public ProductType getProductType() { + return productType; } - public Builder productType(ProductType productType) { - this.productType = productType; - return this; + public void setProductType(ProductType productType) { + this.productType = productType; + } + public CommissionDetailTotal getCommissionDetailTotal() { + return commissionDetailTotal; } - public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - return this; + public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; } + public static class Builder { + private String id; + + private String userId; + + private String portfolioId; + + private String productId; + + private OrderSide side; + + private String clientOrderId; + + private OrderType type; + + private String baseQuantity; + + private String quoteValue; + + private String limitPrice; + + private OffsetDateTime startTime; + + private OffsetDateTime expiryTime; + + private OrderStatus status; + + private TimeInForceType timeInForce; + + private OffsetDateTime createdAt; + + private String filledQuantity; - public Order build() { - return new Order(this); + private String filledValue; + + private String averageFilledPrice; + + private String commission; + + private String exchangeFee; + + private String historicalPov; + + private String stopPrice; + + private String netAverageFilledPrice; + + private String userContext; + + private String clientProductId; + + private boolean postOnly; + + private List orderEditHistory; + + private boolean isRaiseExact; + + private String displaySize; + + private List editHistory; + + private String displayQuoteSize; + + private String displayBaseSize; + + private String pegOffsetType; + + private String offset; + + private String wigLevel; + + private ProductType productType; + + private CommissionDetailTotal commissionDetailTotal; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder userId(String userId) { + this.userId = userId; + return this; + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder productId(String productId) { + this.productId = productId; + return this; + } + + public Builder side(OrderSide side) { + this.side = side; + return this; + } + + public Builder clientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; + } + + public Builder type(OrderType type) { + this.type = type; + return this; + } + + public Builder baseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + return this; + } + + public Builder quoteValue(String quoteValue) { + this.quoteValue = quoteValue; + return this; + } + + public Builder limitPrice(String limitPrice) { + this.limitPrice = limitPrice; + return this; + } + + public Builder startTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + public Builder expiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + return this; + } + + public Builder status(OrderStatus status) { + this.status = status; + return this; + } + + public Builder timeInForce(TimeInForceType timeInForce) { + this.timeInForce = timeInForce; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder filledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + return this; + } + + public Builder filledValue(String filledValue) { + this.filledValue = filledValue; + return this; + } + + public Builder averageFilledPrice(String averageFilledPrice) { + this.averageFilledPrice = averageFilledPrice; + return this; + } + + public Builder commission(String commission) { + this.commission = commission; + return this; + } + + public Builder exchangeFee(String exchangeFee) { + this.exchangeFee = exchangeFee; + return this; + } + + public Builder historicalPov(String historicalPov) { + this.historicalPov = historicalPov; + return this; + } + + public Builder stopPrice(String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + public Builder netAverageFilledPrice(String netAverageFilledPrice) { + this.netAverageFilledPrice = netAverageFilledPrice; + return this; + } + + public Builder userContext(String userContext) { + this.userContext = userContext; + return this; + } + + public Builder clientProductId(String clientProductId) { + this.clientProductId = clientProductId; + return this; + } + + public Builder postOnly(boolean postOnly) { + this.postOnly = postOnly; + return this; + } + + public Builder orderEditHistory(List orderEditHistory) { + this.orderEditHistory = orderEditHistory; + return this; + } + + public Builder isRaiseExact(boolean isRaiseExact) { + this.isRaiseExact = isRaiseExact; + return this; + } + + public Builder displaySize(String displaySize) { + this.displaySize = displaySize; + return this; + } + + public Builder editHistory(List editHistory) { + this.editHistory = editHistory; + return this; + } + + public Builder displayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + return this; + } + + public Builder displayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + return this; + } + + public Builder pegOffsetType(String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; + } + + public Builder offset(String offset) { + this.offset = offset; + return this; + } + + public Builder wigLevel(String wigLevel) { + this.wigLevel = wigLevel; + return this; + } + + public Builder productType(ProductType productType) { + this.productType = productType; + return this; + } + + public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + return this; + } + + public Order build() { + return new Order(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/OrderEdit.java b/src/main/java/com/coinbase/prime/model/OrderEdit.java index d5a6af5..99c5a6f 100644 --- a/src/main/java/com/coinbase/prime/model/OrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/OrderEdit.java @@ -17,201 +17,189 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class OrderEdit { - /** New price for the edited order */ - private String price; - - /** New base quantity for the edited order, populated if order is in base size */ - @JsonProperty("base_quantity") - private String baseQuantity; - - /** New quote value for the edited order, populated if order is in quote size */ - @JsonProperty("quote_value") - private String quoteValue; - - /** Display base size for the edited order, populated if order is in base size */ - @JsonProperty("display_base_size") - private String displayBaseSize; - - /** Display quote size for the edited order, populated if order is in quote size */ - @JsonProperty("display_quote_size") - private String displayQuoteSize; - - /** New stop price for the edited order */ - @JsonProperty("stop_price") - private String stopPrice; - - /** New expiry/end time for the edited order */ - @JsonProperty("expiry_time") - private OffsetDateTime expiryTime; - - /** Time when the edit was accepted */ - @JsonProperty("accept_time") - private OffsetDateTime acceptTime; - - /** - * The new client order identifier that the order adopted after the replacement was successfully - * accepted - */ - @JsonProperty("client_order_id") - private String clientOrderId; - - public OrderEdit() {} - - public OrderEdit(Builder builder) { - this.price = builder.price; - this.baseQuantity = builder.baseQuantity; - this.quoteValue = builder.quoteValue; - this.displayBaseSize = builder.displayBaseSize; - this.displayQuoteSize = builder.displayQuoteSize; - this.stopPrice = builder.stopPrice; - this.expiryTime = builder.expiryTime; - this.acceptTime = builder.acceptTime; - this.clientOrderId = builder.clientOrderId; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String getBaseQuantity() { - return baseQuantity; - } - - public void setBaseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - } - - public String getQuoteValue() { - return quoteValue; - } - - public void setQuoteValue(String quoteValue) { - this.quoteValue = quoteValue; - } - - public String getDisplayBaseSize() { - return displayBaseSize; - } - - public void setDisplayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - } - - public String getDisplayQuoteSize() { - return displayQuoteSize; - } - - public void setDisplayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - } - - public String getStopPrice() { - return stopPrice; - } - - public void setStopPrice(String stopPrice) { - this.stopPrice = stopPrice; - } - - public OffsetDateTime getExpiryTime() { - return expiryTime; - } - - public void setExpiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - } - - public OffsetDateTime getAcceptTime() { - return acceptTime; - } - - public void setAcceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - } - - public String getClientOrderId() { - return clientOrderId; - } - - public void setClientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - } - - public static class Builder { + /** New price for the edited order */ private String price; + /** New base quantity for the edited order, populated if order is in base size */ + @JsonProperty("base_quantity") private String baseQuantity; + /** New quote value for the edited order, populated if order is in quote size */ + @JsonProperty("quote_value") private String quoteValue; + /** Display base size for the edited order, populated if order is in base size */ + @JsonProperty("display_base_size") private String displayBaseSize; + /** Display quote size for the edited order, populated if order is in quote size */ + @JsonProperty("display_quote_size") private String displayQuoteSize; + /** New stop price for the edited order */ + @JsonProperty("stop_price") private String stopPrice; + /** New expiry/end time for the edited order */ + @JsonProperty("expiry_time") private OffsetDateTime expiryTime; + /** Time when the edit was accepted */ + @JsonProperty("accept_time") private OffsetDateTime acceptTime; + /** The new client order identifier that the order adopted after the replacement was successfully accepted */ + @JsonProperty("client_order_id") private String clientOrderId; - public Builder price(String price) { - this.price = price; - return this; + public OrderEdit() { + } + + public OrderEdit(Builder builder) { + this.price = builder.price; + this.baseQuantity = builder.baseQuantity; + this.quoteValue = builder.quoteValue; + this.displayBaseSize = builder.displayBaseSize; + this.displayQuoteSize = builder.displayQuoteSize; + this.stopPrice = builder.stopPrice; + this.expiryTime = builder.expiryTime; + this.acceptTime = builder.acceptTime; + this.clientOrderId = builder.clientOrderId; + } + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + public String getBaseQuantity() { + return baseQuantity; } - public Builder baseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - return this; + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + public String getQuoteValue() { + return quoteValue; } - public Builder quoteValue(String quoteValue) { - this.quoteValue = quoteValue; - return this; + public void setQuoteValue(String quoteValue) { + this.quoteValue = quoteValue; + } + public String getDisplayBaseSize() { + return displayBaseSize; } - public Builder displayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - return this; + public void setDisplayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + } + public String getDisplayQuoteSize() { + return displayQuoteSize; } - public Builder displayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - return this; + public void setDisplayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + } + public String getStopPrice() { + return stopPrice; } - public Builder stopPrice(String stopPrice) { - this.stopPrice = stopPrice; - return this; + public void setStopPrice(String stopPrice) { + this.stopPrice = stopPrice; + } + public OffsetDateTime getExpiryTime() { + return expiryTime; } - public Builder expiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - return this; + public void setExpiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + } + public OffsetDateTime getAcceptTime() { + return acceptTime; } - public Builder acceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - return this; + public void setAcceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + } + public String getClientOrderId() { + return clientOrderId; } - public Builder clientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; + public void setClientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; } + public static class Builder { + private String price; + + private String baseQuantity; + + private String quoteValue; - public OrderEdit build() { - return new OrderEdit(this); + private String displayBaseSize; + + private String displayQuoteSize; + + private String stopPrice; + + private OffsetDateTime expiryTime; + + private OffsetDateTime acceptTime; + + private String clientOrderId; + + public Builder price(String price) { + this.price = price; + return this; + } + + public Builder baseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + return this; + } + + public Builder quoteValue(String quoteValue) { + this.quoteValue = quoteValue; + return this; + } + + public Builder displayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + return this; + } + + public Builder displayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + return this; + } + + public Builder stopPrice(String stopPrice) { + this.stopPrice = stopPrice; + return this; + } + + public Builder expiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + return this; + } + + public Builder acceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + return this; + } + + public Builder clientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; + } + + public OrderEdit build() { + return new OrderEdit(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java b/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java index d5c7000..c174f0e 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java @@ -17,38 +17,37 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodDestination { - /** The payment method id to pay out */ - @JsonProperty("payment_method_id") - private String paymentMethodId; - - public PaymentMethodDestination() {} - - public PaymentMethodDestination(Builder builder) { - this.paymentMethodId = builder.paymentMethodId; - } - - public String getPaymentMethodId() { - return paymentMethodId; - } + /** The payment method id to pay out */ + @JsonProperty("payment_method_id") + private String paymentMethodId; - public void setPaymentMethodId(String paymentMethodId) { - this.paymentMethodId = paymentMethodId; - } + public PaymentMethodDestination() { + } - public static class Builder { - private String paymentMethodId; + public PaymentMethodDestination(Builder builder) { + this.paymentMethodId = builder.paymentMethodId; + } + public String getPaymentMethodId() { + return paymentMethodId; + } - public Builder paymentMethodId(String paymentMethodId) { - this.paymentMethodId = paymentMethodId; - return this; + public void setPaymentMethodId(String paymentMethodId) { + this.paymentMethodId = paymentMethodId; } + public static class Builder { + private String paymentMethodId; - public PaymentMethodDestination build() { - return new PaymentMethodDestination(this); + public Builder paymentMethodId(String paymentMethodId) { + this.paymentMethodId = paymentMethodId; + return this; + } + + public PaymentMethodDestination build() { + return new PaymentMethodDestination(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java index 7c12fac..0ffad5e 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java @@ -17,134 +17,130 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.PaymentMethodType; import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodDetails { - private String id; - - private String symbol; - - /** - * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - METHOD_WIRE: Wire transfer - METHOD_SEN: Silvergate - * exchange network - METHOD_SWIFT: Swift - */ - @JsonProperty("payment_method_type") - private PaymentMethodType paymentMethodType; - - private String name; - - @JsonProperty("account_number") - private String accountNumber; - - @JsonProperty("bank_code") - private String bankCode; - - public PaymentMethodDetails() {} - - public PaymentMethodDetails(Builder builder) { - this.id = builder.id; - this.symbol = builder.symbol; - this.paymentMethodType = builder.paymentMethodType; - this.name = builder.name; - this.accountNumber = builder.accountNumber; - this.bankCode = builder.bankCode; - } + private String id; - public String getId() { - return id; - } + private String symbol; - public void setId(String id) { - this.id = id; - } + /** + * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value + * - METHOD_WIRE: Wire transfer + * - METHOD_SEN: Silvergate exchange network + * - METHOD_SWIFT: Swift + */ + @JsonProperty("payment_method_type") + private PaymentMethodType paymentMethodType; - public String getSymbol() { - return symbol; - } + private String name; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + @JsonProperty("account_number") + private String accountNumber; - public PaymentMethodType getPaymentMethodType() { - return paymentMethodType; - } + @JsonProperty("bank_code") + private String bankCode; - public void setPaymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - } + public PaymentMethodDetails() { + } - public String getName() { - return name; - } + public PaymentMethodDetails(Builder builder) { + this.id = builder.id; + this.symbol = builder.symbol; + this.paymentMethodType = builder.paymentMethodType; + this.name = builder.name; + this.accountNumber = builder.accountNumber; + this.bankCode = builder.bankCode; + } + public String getId() { + return id; + } - public void setName(String name) { - this.name = name; - } + public void setId(String id) { + this.id = id; + } + public String getSymbol() { + return symbol; + } - public String getAccountNumber() { - return accountNumber; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public PaymentMethodType getPaymentMethodType() { + return paymentMethodType; + } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } + public void setPaymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + } + public String getName() { + return name; + } - public String getBankCode() { - return bankCode; - } + public void setName(String name) { + this.name = name; + } + public String getAccountNumber() { + return accountNumber; + } - public void setBankCode(String bankCode) { - this.bankCode = bankCode; - } + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + public String getBankCode() { + return bankCode; + } - public static class Builder { - private String id; + public void setBankCode(String bankCode) { + this.bankCode = bankCode; + } + public static class Builder { + private String id; - private String symbol; + private String symbol; - private PaymentMethodType paymentMethodType; + private PaymentMethodType paymentMethodType; - private String name; + private String name; - private String accountNumber; + private String accountNumber; - private String bankCode; + private String bankCode; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder paymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - return this; - } + public Builder paymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + return this; + } - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + public Builder accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - public Builder bankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } + public Builder bankCode(String bankCode) { + this.bankCode = bankCode; + return this; + } - public PaymentMethodDetails build() { - return new PaymentMethodDetails(this); + public PaymentMethodDetails build() { + return new PaymentMethodDetails(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java index 1e76f85..77626dc 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java @@ -17,135 +17,131 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.PaymentMethodType; import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodSummary { - private String id; - - private String symbol; - - /** - * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - METHOD_WIRE: Wire transfer - METHOD_SEN: Silvergate - * exchange network - METHOD_SWIFT: Swift - */ - @JsonProperty("payment_method_type") - private PaymentMethodType paymentMethodType; - - @JsonProperty("bank_name") - private String bankName; - - @JsonProperty("account_number") - private String accountNumber; - - @JsonProperty("bank_name_2") - private String bankName2; - - public PaymentMethodSummary() {} - - public PaymentMethodSummary(Builder builder) { - this.id = builder.id; - this.symbol = builder.symbol; - this.paymentMethodType = builder.paymentMethodType; - this.bankName = builder.bankName; - this.accountNumber = builder.accountNumber; - this.bankName2 = builder.bankName2; - } + private String id; - public String getId() { - return id; - } + private String symbol; - public void setId(String id) { - this.id = id; - } + /** + * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value + * - METHOD_WIRE: Wire transfer + * - METHOD_SEN: Silvergate exchange network + * - METHOD_SWIFT: Swift + */ + @JsonProperty("payment_method_type") + private PaymentMethodType paymentMethodType; - public String getSymbol() { - return symbol; - } + @JsonProperty("bank_name") + private String bankName; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + @JsonProperty("account_number") + private String accountNumber; - public PaymentMethodType getPaymentMethodType() { - return paymentMethodType; - } + @JsonProperty("bank_name_2") + private String bankName2; - public void setPaymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - } + public PaymentMethodSummary() { + } - public String getBankName() { - return bankName; - } + public PaymentMethodSummary(Builder builder) { + this.id = builder.id; + this.symbol = builder.symbol; + this.paymentMethodType = builder.paymentMethodType; + this.bankName = builder.bankName; + this.accountNumber = builder.accountNumber; + this.bankName2 = builder.bankName2; + } + public String getId() { + return id; + } - public void setBankName(String bankName) { - this.bankName = bankName; - } + public void setId(String id) { + this.id = id; + } + public String getSymbol() { + return symbol; + } - public String getAccountNumber() { - return accountNumber; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public PaymentMethodType getPaymentMethodType() { + return paymentMethodType; + } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } + public void setPaymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + } + public String getBankName() { + return bankName; + } - public String getBankName2() { - return bankName2; - } + public void setBankName(String bankName) { + this.bankName = bankName; + } + public String getAccountNumber() { + return accountNumber; + } - public void setBankName2(String bankName2) { - this.bankName2 = bankName2; - } + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + public String getBankName2() { + return bankName2; + } - public static class Builder { - private String id; + public void setBankName2(String bankName2) { + this.bankName2 = bankName2; + } + public static class Builder { + private String id; - private String symbol; + private String symbol; - private PaymentMethodType paymentMethodType; + private PaymentMethodType paymentMethodType; - private String bankName; + private String bankName; - private String accountNumber; + private String accountNumber; - private String bankName2; + private String bankName2; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder paymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - return this; - } + public Builder paymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + return this; + } - public Builder bankName(String bankName) { - this.bankName = bankName; - return this; - } + public Builder bankName(String bankName) { + this.bankName = bankName; + return this; + } - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + public Builder accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } - public Builder bankName2(String bankName2) { - this.bankName2 = bankName2; - return this; - } + public Builder bankName2(String bankName2) { + this.bankName2 = bankName2; + return this; + } - public PaymentMethodSummary build() { - return new PaymentMethodSummary(this); + public PaymentMethodSummary build() { + return new PaymentMethodSummary(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java index a196bd6..eb28152 100644 --- a/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java @@ -17,120 +17,125 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** PerpetualProductDetails contains details specific to perpetual futures products */ public class PerpetualProductDetails { - /** Open interest */ - @JsonProperty("open_interest") - private String openInterest; - - /** Current funding rate */ - @JsonProperty("funding_rate") - private String fundingRate; - - /** Next funding time */ - @JsonProperty("funding_time") - private OffsetDateTime fundingTime; - - /** Maximum leverage allowed */ - @JsonProperty("max_leverage") - private String maxLeverage; - - /** The type of underlying for the perpetual product */ - @JsonProperty("underlying_type") - private String underlyingType; - - public PerpetualProductDetails() {} - - public PerpetualProductDetails(Builder builder) { - this.openInterest = builder.openInterest; - this.fundingRate = builder.fundingRate; - this.fundingTime = builder.fundingTime; - this.maxLeverage = builder.maxLeverage; - this.underlyingType = builder.underlyingType; - } + /** + * Open interest + */ + @JsonProperty("open_interest") + private String openInterest; - public String getOpenInterest() { - return openInterest; - } + /** + * Current funding rate + */ + @JsonProperty("funding_rate") + private String fundingRate; - public void setOpenInterest(String openInterest) { - this.openInterest = openInterest; - } + /** + * Next funding time + */ + @JsonProperty("funding_time") + private OffsetDateTime fundingTime; - public String getFundingRate() { - return fundingRate; - } + /** + * Maximum leverage allowed + */ + @JsonProperty("max_leverage") + private String maxLeverage; - public void setFundingRate(String fundingRate) { - this.fundingRate = fundingRate; - } + /** + * The type of underlying for the perpetual product + */ + @JsonProperty("underlying_type") + private String underlyingType; - public OffsetDateTime getFundingTime() { - return fundingTime; - } + public PerpetualProductDetails() { + } - public void setFundingTime(OffsetDateTime fundingTime) { - this.fundingTime = fundingTime; - } + public PerpetualProductDetails(Builder builder) { + this.openInterest = builder.openInterest; + this.fundingRate = builder.fundingRate; + this.fundingTime = builder.fundingTime; + this.maxLeverage = builder.maxLeverage; + this.underlyingType = builder.underlyingType; + } + public String getOpenInterest() { + return openInterest; + } - public String getMaxLeverage() { - return maxLeverage; - } + public void setOpenInterest(String openInterest) { + this.openInterest = openInterest; + } + public String getFundingRate() { + return fundingRate; + } - public void setMaxLeverage(String maxLeverage) { - this.maxLeverage = maxLeverage; - } + public void setFundingRate(String fundingRate) { + this.fundingRate = fundingRate; + } + public OffsetDateTime getFundingTime() { + return fundingTime; + } - public String getUnderlyingType() { - return underlyingType; - } + public void setFundingTime(OffsetDateTime fundingTime) { + this.fundingTime = fundingTime; + } + public String getMaxLeverage() { + return maxLeverage; + } - public void setUnderlyingType(String underlyingType) { - this.underlyingType = underlyingType; - } + public void setMaxLeverage(String maxLeverage) { + this.maxLeverage = maxLeverage; + } + public String getUnderlyingType() { + return underlyingType; + } - public static class Builder { - private String openInterest; + public void setUnderlyingType(String underlyingType) { + this.underlyingType = underlyingType; + } + public static class Builder { + private String openInterest; - private String fundingRate; + private String fundingRate; - private OffsetDateTime fundingTime; + private OffsetDateTime fundingTime; - private String maxLeverage; + private String maxLeverage; - private String underlyingType; + private String underlyingType; - public Builder openInterest(String openInterest) { - this.openInterest = openInterest; - return this; - } + public Builder openInterest(String openInterest) { + this.openInterest = openInterest; + return this; + } - public Builder fundingRate(String fundingRate) { - this.fundingRate = fundingRate; - return this; - } + public Builder fundingRate(String fundingRate) { + this.fundingRate = fundingRate; + return this; + } - public Builder fundingTime(OffsetDateTime fundingTime) { - this.fundingTime = fundingTime; - return this; - } + public Builder fundingTime(OffsetDateTime fundingTime) { + this.fundingTime = fundingTime; + return this; + } - public Builder maxLeverage(String maxLeverage) { - this.maxLeverage = maxLeverage; - return this; - } + public Builder maxLeverage(String maxLeverage) { + this.maxLeverage = maxLeverage; + return this; + } - public Builder underlyingType(String underlyingType) { - this.underlyingType = underlyingType; - return this; - } + public Builder underlyingType(String underlyingType) { + this.underlyingType = underlyingType; + return this; + } - public PerpetualProductDetails build() { - return new PerpetualProductDetails(this); + public PerpetualProductDetails build() { + return new PerpetualProductDetails(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java index 7c9bad6..96e9c1c 100644 --- a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java +++ b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java @@ -17,355 +17,372 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class PmAssetInfo { - /** The currency symbol */ - private String symbol; - - /** Nominal amount of the currency */ - private String amount; - - /** Spot price for the currency */ - private String price; - - /** Notional amount of the currency */ - @JsonProperty("notional_amount") - private String notionalAmount; - - /** Asset tier of the currency */ - @JsonProperty("asset_tier") - private String assetTier; - - /** Whether the currency is margin eligible */ - @JsonProperty("margin_eligible") - private boolean marginEligible; - - /** Base margin requirement of the currency */ - @JsonProperty("base_margin_requirement") - private String baseMarginRequirement; - - /** Notional amount of the currency's base margin requirement */ - @JsonProperty("base_margin_requirement_notional") - private String baseMarginRequirementNotional; - - /** The 30d adv of the currency */ - @JsonProperty("adv_30d") - private String adv30d; - - /** Historic 5d volatility of the currency */ - @JsonProperty("hist_5d_vol") - private String hist5dVol; - - /** Historic 30d volatility of the currency */ - @JsonProperty("hist_30d_vol") - private String hist30dVol; - - /** Historic 90d volatility of the currency */ - @JsonProperty("hist_90d_vol") - private String hist90dVol; - - /** Volatility margin addon of the currency position */ - @JsonProperty("volatility_addon") - private String volatilityAddon; - - /** Liquidity margin addon of the currency position */ - @JsonProperty("liquidity_addon") - private String liquidityAddon; - - /** Total position margin of the currency */ - @JsonProperty("total_position_margin") - private String totalPositionMargin; - - /** Nominal short position of the currency */ - @JsonProperty("short_nominal") - private String shortNominal; - - /** Nominal long position of the currency */ - @JsonProperty("long_nominal") - private String longNominal; - - public PmAssetInfo() {} - - public PmAssetInfo(Builder builder) { - this.symbol = builder.symbol; - this.amount = builder.amount; - this.price = builder.price; - this.notionalAmount = builder.notionalAmount; - this.assetTier = builder.assetTier; - this.marginEligible = builder.marginEligible; - this.baseMarginRequirement = builder.baseMarginRequirement; - this.baseMarginRequirementNotional = builder.baseMarginRequirementNotional; - this.adv30d = builder.adv30d; - this.hist5dVol = builder.hist5dVol; - this.hist30dVol = builder.hist30dVol; - this.hist90dVol = builder.hist90dVol; - this.volatilityAddon = builder.volatilityAddon; - this.liquidityAddon = builder.liquidityAddon; - this.totalPositionMargin = builder.totalPositionMargin; - this.shortNominal = builder.shortNominal; - this.longNominal = builder.longNominal; - } - - 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 getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String getNotionalAmount() { - return notionalAmount; - } - - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } - - public String getAssetTier() { - return assetTier; - } - - public void setAssetTier(String assetTier) { - this.assetTier = assetTier; - } - - public boolean getMarginEligible() { - return marginEligible; - } - - public void setMarginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - } - - public String getBaseMarginRequirement() { - return baseMarginRequirement; - } - - public void setBaseMarginRequirement(String baseMarginRequirement) { - this.baseMarginRequirement = baseMarginRequirement; - } - - public String getBaseMarginRequirementNotional() { - return baseMarginRequirementNotional; - } - - public void setBaseMarginRequirementNotional(String baseMarginRequirementNotional) { - this.baseMarginRequirementNotional = baseMarginRequirementNotional; - } - - public String getAdv30d() { - return adv30d; - } - - public void setAdv30d(String adv30d) { - this.adv30d = adv30d; - } - - public String getHist5dVol() { - return hist5dVol; - } - - public void setHist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - } - - public String getHist30dVol() { - return hist30dVol; - } - - public void setHist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - } - - public String getHist90dVol() { - return hist90dVol; - } - - public void setHist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - } - - 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 getTotalPositionMargin() { - return totalPositionMargin; - } - - public void setTotalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - } - - public String getShortNominal() { - return shortNominal; - } - - public void setShortNominal(String shortNominal) { - this.shortNominal = shortNominal; - } - - public String getLongNominal() { - return longNominal; - } - - public void setLongNominal(String longNominal) { - this.longNominal = longNominal; - } - - public static class Builder { + /** + * The currency symbol + */ private String symbol; + /** + * Nominal amount of the currency + */ private String amount; + /** + * Spot price for the currency + */ private String price; + /** + * Notional amount of the currency + */ + @JsonProperty("notional_amount") private String notionalAmount; + /** + * Asset tier of the currency + */ + @JsonProperty("asset_tier") private String assetTier; + /** + * Whether the currency is margin eligible + */ + @JsonProperty("margin_eligible") private boolean marginEligible; + /** + * Base margin requirement of the currency + */ + @JsonProperty("base_margin_requirement") private String baseMarginRequirement; + /** + * Notional amount of the currency's base margin requirement + */ + @JsonProperty("base_margin_requirement_notional") private String baseMarginRequirementNotional; + /** + * The 30d adv of the currency + */ + @JsonProperty("adv_30d") private String adv30d; + /** + * Historic 5d volatility of the currency + */ + @JsonProperty("hist_5d_vol") private String hist5dVol; + /** + * Historic 30d volatility of the currency + */ + @JsonProperty("hist_30d_vol") private String hist30dVol; + /** + * Historic 90d volatility of the currency + */ + @JsonProperty("hist_90d_vol") private String hist90dVol; + /** + * Volatility margin addon of the currency position + */ + @JsonProperty("volatility_addon") private String volatilityAddon; + /** + * Liquidity margin addon of the currency position + */ + @JsonProperty("liquidity_addon") private String liquidityAddon; + /** + * Total position margin of the currency + */ + @JsonProperty("total_position_margin") private String totalPositionMargin; + /** + * Nominal short position of the currency + */ + @JsonProperty("short_nominal") private String shortNominal; + /** + * Nominal long position of the currency + */ + @JsonProperty("long_nominal") private String longNominal; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; + public PmAssetInfo() { } - public Builder amount(String amount) { - this.amount = amount; - return this; + public PmAssetInfo(Builder builder) { + this.symbol = builder.symbol; + this.amount = builder.amount; + this.price = builder.price; + this.notionalAmount = builder.notionalAmount; + this.assetTier = builder.assetTier; + this.marginEligible = builder.marginEligible; + this.baseMarginRequirement = builder.baseMarginRequirement; + this.baseMarginRequirementNotional = builder.baseMarginRequirementNotional; + this.adv30d = builder.adv30d; + this.hist5dVol = builder.hist5dVol; + this.hist30dVol = builder.hist30dVol; + this.hist90dVol = builder.hist90dVol; + this.volatilityAddon = builder.volatilityAddon; + this.liquidityAddon = builder.liquidityAddon; + this.totalPositionMargin = builder.totalPositionMargin; + this.shortNominal = builder.shortNominal; + this.longNominal = builder.longNominal; + } + public String getSymbol() { + return symbol; } - public Builder price(String price) { - this.price = price; - return this; + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getAmount() { + return amount; } - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; + public void setAmount(String amount) { + this.amount = amount; + } + public String getPrice() { + return price; } - public Builder assetTier(String assetTier) { - this.assetTier = assetTier; - return this; + public void setPrice(String price) { + this.price = price; + } + public String getNotionalAmount() { + return notionalAmount; } - public Builder marginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - return this; + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } + public String getAssetTier() { + return assetTier; } - public Builder baseMarginRequirement(String baseMarginRequirement) { - this.baseMarginRequirement = baseMarginRequirement; - return this; + public void setAssetTier(String assetTier) { + this.assetTier = assetTier; + } + public boolean getMarginEligible() { + return marginEligible; + } + + public void setMarginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + } + public String getBaseMarginRequirement() { + return baseMarginRequirement; } - public Builder baseMarginRequirementNotional(String baseMarginRequirementNotional) { - this.baseMarginRequirementNotional = baseMarginRequirementNotional; - return this; + public void setBaseMarginRequirement(String baseMarginRequirement) { + this.baseMarginRequirement = baseMarginRequirement; + } + public String getBaseMarginRequirementNotional() { + return baseMarginRequirementNotional; + } + + public void setBaseMarginRequirementNotional(String baseMarginRequirementNotional) { + this.baseMarginRequirementNotional = baseMarginRequirementNotional; + } + public String getAdv30d() { + return adv30d; } - public Builder adv30d(String adv30d) { - this.adv30d = adv30d; - return this; + public void setAdv30d(String adv30d) { + this.adv30d = adv30d; + } + public String getHist5dVol() { + return hist5dVol; } - public Builder hist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - return this; + public void setHist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + } + public String getHist30dVol() { + return hist30dVol; } - public Builder hist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - return this; + public void setHist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + } + public String getHist90dVol() { + return hist90dVol; } - public Builder hist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - return this; + public void setHist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + } + public String getVolatilityAddon() { + return volatilityAddon; } - public Builder volatilityAddon(String volatilityAddon) { - this.volatilityAddon = volatilityAddon; - return this; + public void setVolatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + } + public String getLiquidityAddon() { + return liquidityAddon; } - public Builder liquidityAddon(String liquidityAddon) { - this.liquidityAddon = liquidityAddon; - return this; + public void setLiquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + } + public String getTotalPositionMargin() { + return totalPositionMargin; } - public Builder totalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - return this; + public void setTotalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + } + public String getShortNominal() { + return shortNominal; } - public Builder shortNominal(String shortNominal) { - this.shortNominal = shortNominal; - return this; + public void setShortNominal(String shortNominal) { + this.shortNominal = shortNominal; + } + public String getLongNominal() { + return longNominal; } - public Builder longNominal(String longNominal) { - this.longNominal = longNominal; - return this; + public void setLongNominal(String longNominal) { + this.longNominal = longNominal; } + public static class Builder { + private String symbol; - public PmAssetInfo build() { - return new PmAssetInfo(this); + private String amount; + + private String price; + + private String notionalAmount; + + private String assetTier; + + private boolean marginEligible; + + private String baseMarginRequirement; + + private String baseMarginRequirementNotional; + + private String adv30d; + + private String hist5dVol; + + private String hist30dVol; + + private String hist90dVol; + + private String volatilityAddon; + + private String liquidityAddon; + + private String totalPositionMargin; + + private String shortNominal; + + private String longNominal; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder price(String price) { + this.price = price; + return this; + } + + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; + } + + public Builder assetTier(String assetTier) { + this.assetTier = assetTier; + return this; + } + + public Builder marginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + return this; + } + + public Builder baseMarginRequirement(String baseMarginRequirement) { + this.baseMarginRequirement = baseMarginRequirement; + return this; + } + + public Builder baseMarginRequirementNotional(String baseMarginRequirementNotional) { + this.baseMarginRequirementNotional = baseMarginRequirementNotional; + return this; + } + + public Builder adv30d(String adv30d) { + this.adv30d = adv30d; + return this; + } + + public Builder hist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + return this; + } + + public Builder hist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + return this; + } + + public Builder hist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + return this; + } + + public Builder volatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + return this; + } + + public Builder liquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + return this; + } + + public Builder totalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + return this; + } + + public Builder shortNominal(String shortNominal) { + this.shortNominal = shortNominal; + return this; + } + + public Builder longNominal(String longNominal) { + this.longNominal = longNominal; + return this; + } + + public PmAssetInfo build() { + return new PmAssetInfo(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Portfolio.java b/src/main/java/com/coinbase/prime/model/Portfolio.java index c5a9c8f..aced61a 100644 --- a/src/main/java/com/coinbase/prime/model/Portfolio.java +++ b/src/main/java/com/coinbase/prime/model/Portfolio.java @@ -17,116 +17,121 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class Portfolio { - /** The unique ID of the portfolio */ - private String id; - - /** The name of the portfolio */ - private String name; - - /** The ID of the entity to which the portfolio is associated */ - @JsonProperty("entity_id") - private String entityId; - - /** The ID of the organization to which the portfolio is associated */ - @JsonProperty("organization_id") - private String organizationId; - - /** The name of the entity to which the portfolio is associated */ - @JsonProperty("entity_name") - private String entityName; - - public Portfolio() {} - - public Portfolio(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.entityId = builder.entityId; - this.organizationId = builder.organizationId; - this.entityName = builder.entityName; - } + /** + * The unique ID of the portfolio + */ + private String id; - public String getId() { - return id; - } + /** + * The name of the portfolio + */ + private String name; - public void setId(String id) { - this.id = id; - } + /** + * The ID of the entity to which the portfolio is associated + */ + @JsonProperty("entity_id") + private String entityId; - public String getName() { - return name; - } + /** + * The ID of the organization to which the portfolio is associated + */ + @JsonProperty("organization_id") + private String organizationId; - public void setName(String name) { - this.name = name; - } + /** + * The name of the entity to which the portfolio is associated + */ + @JsonProperty("entity_name") + private String entityName; - public String getEntityId() { - return entityId; - } + public Portfolio() { + } - public void setEntityId(String entityId) { - this.entityId = entityId; - } + public Portfolio(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.entityId = builder.entityId; + this.organizationId = builder.organizationId; + this.entityName = builder.entityName; + } + public String getId() { + return id; + } - public String getOrganizationId() { - return organizationId; - } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId; - } + public void setName(String name) { + this.name = name; + } + public String getEntityId() { + return entityId; + } - public String getEntityName() { - return entityName; - } + public void setEntityId(String entityId) { + this.entityId = entityId; + } + public String getOrganizationId() { + return organizationId; + } - public void setEntityName(String entityName) { - this.entityName = entityName; - } + public void setOrganizationId(String organizationId) { + this.organizationId = organizationId; + } + public String getEntityName() { + return entityName; + } - public static class Builder { - private String id; + public void setEntityName(String entityName) { + this.entityName = entityName; + } + public static class Builder { + private String id; - private String name; + private String name; - private String entityId; + private String entityId; - private String organizationId; + private String organizationId; - private String entityName; + private String entityName; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } - public Builder organizationId(String organizationId) { - this.organizationId = organizationId; - return this; - } + public Builder organizationId(String organizationId) { + this.organizationId = organizationId; + return this; + } - public Builder entityName(String entityName) { - this.entityName = entityName; - return this; - } + public Builder entityName(String entityName) { + this.entityName = entityName; + return this; + } - public Portfolio build() { - return new Portfolio(this); + public Portfolio build() { + return new Portfolio(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java b/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java index 44c43eb..1798796 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java @@ -17,41 +17,39 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class PortfolioStakingMetadata { - /** - * An optional custom identifier (up to 255 characters) to attach to the transaction. This is not - * a searchable transaction field. - */ - @JsonProperty("external_id") - private String externalId; - - public PortfolioStakingMetadata() {} - - public PortfolioStakingMetadata(Builder builder) { - this.externalId = builder.externalId; - } - - public String getExternalId() { - return externalId; - } + /** + * An optional custom identifier (up to 255 characters) to attach to the transaction. This is not a searchable transaction field. + */ + @JsonProperty("external_id") + private String externalId; - public void setExternalId(String externalId) { - this.externalId = externalId; - } + public PortfolioStakingMetadata() { + } - public static class Builder { - private String externalId; + public PortfolioStakingMetadata(Builder builder) { + this.externalId = builder.externalId; + } + public String getExternalId() { + return externalId; + } - public Builder externalId(String externalId) { - this.externalId = externalId; - return this; + public void setExternalId(String externalId) { + this.externalId = externalId; } + public static class Builder { + private String externalId; - public PortfolioStakingMetadata build() { - return new PortfolioStakingMetadata(this); + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; + } + + public PortfolioStakingMetadata build() { + return new PortfolioStakingMetadata(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PortfolioUser.java b/src/main/java/com/coinbase/prime/model/PortfolioUser.java index 8ad0a2e..2cc951b 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioUser.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioUser.java @@ -17,181 +17,195 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.SecondaryPermission; import com.coinbase.prime.model.enums.UserRole; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class PortfolioUser { - /** The unique ID of the user. */ - private String id; - - /** The name of the user. */ - private String name; - - /** The email of the user. */ - private String email; - - /** The portfolio to which this user and associated permissions are identified. */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The entity to which this user and associated permissions are identified. */ - @JsonProperty("entity_id") - private String entityId; - - /** - * - USER_ROLE_UNKNOWN: nil value - AUDITOR: An auditor - SIGNATORY: A signatory - ADMIN: An admin - * - INITIATOR: An initiator - REVIEWER: A reviewer - TRADER: A trader - FULL_TRADER: A trader - * with full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A - * tax manager - BUSINESS_MANAGER: A business manager - */ - private UserRole role; - - /** All primary roles assigned to the user. */ - private List roles; - - /** All secondary permissions assigned to the user. */ - @JsonProperty("secondary_permissions") - private List secondaryPermissions; - - public PortfolioUser() {} - - public PortfolioUser(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.email = builder.email; - this.portfolioId = builder.portfolioId; - this.entityId = builder.entityId; - this.role = builder.role; - this.roles = builder.roles; - this.secondaryPermissions = builder.secondaryPermissions; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public String getEntityId() { - return entityId; - } - - public void setEntityId(String entityId) { - this.entityId = entityId; - } - - public UserRole getRole() { - return role; - } - - public void setRole(UserRole role) { - this.role = role; - } - - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - - public List getSecondaryPermissions() { - return secondaryPermissions; - } - - public void setSecondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - } - - public static class Builder { + /** + * The unique ID of the user. + */ private String id; + /** + * The name of the user. + */ private String name; + /** + * The email of the user. + */ private String email; + /** + * The portfolio to which this user and associated permissions are identified. + */ + @JsonProperty("portfolio_id") private String portfolioId; + /** + * The entity to which this user and associated permissions are identified. + */ + @JsonProperty("entity_id") private String entityId; + /** + * - USER_ROLE_UNKNOWN: nil value + * - AUDITOR: An auditor + * - SIGNATORY: A signatory + * - ADMIN: An admin + * - INITIATOR: An initiator + * - REVIEWER: A reviewer + * - TRADER: A trader + * - FULL_TRADER: A trader with full permissions + * - TEAM_MANAGER: A team manager + * - APPROVER: An approver + * - TAX_MANAGER: A tax manager + * - BUSINESS_MANAGER: A business manager + */ private UserRole role; + /** + * All primary roles assigned to the user. + */ private List roles; + /** + * All secondary permissions assigned to the user. + */ + @JsonProperty("secondary_permissions") private List secondaryPermissions; - public Builder id(String id) { - this.id = id; - return this; + public PortfolioUser() { } - public Builder name(String name) { - this.name = name; - return this; + public PortfolioUser(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.email = builder.email; + this.portfolioId = builder.portfolioId; + this.entityId = builder.entityId; + this.role = builder.role; + this.roles = builder.roles; + this.secondaryPermissions = builder.secondaryPermissions; + } + public String getId() { + return id; } - public Builder email(String email) { - this.email = email; - return this; + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; + public void setName(String name) { + this.name = name; + } + public String getEmail() { + return email; } - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; + public void setEmail(String email) { + this.email = email; + } + public String getPortfolioId() { + return portfolioId; } - public Builder role(UserRole role) { - this.role = role; - return this; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getEntityId() { + return entityId; } - public Builder roles(List roles) { - this.roles = roles; - return this; + public void setEntityId(String entityId) { + this.entityId = entityId; + } + public UserRole getRole() { + return role; } - public Builder secondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - return this; + public void setRole(UserRole role) { + this.role = role; + } + public List getRoles() { + return roles; } - public PortfolioUser build() { - return new PortfolioUser(this); + public void setRoles(List roles) { + this.roles = roles; + } + public List getSecondaryPermissions() { + return secondaryPermissions; + } + + public void setSecondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + } + public static class Builder { + private String id; + + private String name; + + private String email; + + private String portfolioId; + + private String entityId; + + private UserRole role; + + private List roles; + + private List secondaryPermissions; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder email(String email) { + this.email = email; + return this; + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public Builder role(UserRole role) { + this.role = role; + return this; + } + + public Builder roles(List roles) { + this.roles = roles; + return this; + } + + public Builder secondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + return this; + } + + public PortfolioUser build() { + return new PortfolioUser(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Position.java b/src/main/java/com/coinbase/prime/model/Position.java index 573a815..31594cd 100644 --- a/src/main/java/com/coinbase/prime/model/Position.java +++ b/src/main/java/com/coinbase/prime/model/Position.java @@ -17,96 +17,99 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.PositionReference; import com.fasterxml.jackson.annotation.JsonProperty; public class Position { - /** Asset symbol */ - private String symbol; - - /** The long position based on 'reference' value */ - @JsonProperty("long") - private String _long; - - /** The short position based on 'reference' value */ - @JsonProperty("short") - private String _short; - - @JsonProperty("position_reference") - private PositionReference positionReference; - - public Position() {} - - public Position(Builder builder) { - this.symbol = builder.symbol; - this._long = builder._long; - this._short = builder._short; - this.positionReference = builder.positionReference; - } + /** + * Asset symbol + */ + private String symbol; - public String getSymbol() { - return symbol; - } + /** + * The long position based on 'reference' value + */ + @JsonProperty("long") + private String _long; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * The short position based on 'reference' value + */ + @JsonProperty("short") + private String _short; - public String getLong() { - return _long; - } + @JsonProperty("position_reference") + private PositionReference positionReference; - public void setLong(String _long) { - this._long = _long; - } + public Position() { + } - public String getShort() { - return _short; - } + public Position(Builder builder) { + this.symbol = builder.symbol; + this._long = builder._long; + this._short = builder._short; + this.positionReference = builder.positionReference; + } + public String getSymbol() { + return symbol; + } - public void setShort(String _short) { - this._short = _short; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getLong() { + return _long; + } - public PositionReference getPositionReference() { - return positionReference; - } + public void setLong(String _long) { + this._long = _long; + } + public String getShort() { + return _short; + } - public void setPositionReference(PositionReference positionReference) { - this.positionReference = positionReference; - } + public void setShort(String _short) { + this._short = _short; + } + public PositionReference getPositionReference() { + return positionReference; + } - public static class Builder { - private String symbol; + public void setPositionReference(PositionReference positionReference) { + this.positionReference = positionReference; + } + public static class Builder { + private String symbol; - private String _long; + private String _long; - private String _short; + private String _short; - private PositionReference positionReference; + private PositionReference positionReference; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder _long(String _long) { - this._long = _long; - return this; - } + public Builder _long(String _long) { + this._long = _long; + return this; + } - public Builder _short(String _short) { - this._short = _short; - return this; - } + public Builder _short(String _short) { + this._short = _short; + return this; + } - public Builder positionReference(PositionReference positionReference) { - this.positionReference = positionReference; - return this; - } + public Builder positionReference(PositionReference positionReference) { + this.positionReference = positionReference; + return this; + } - public Position build() { - return new Position(this); + public Position build() { + return new Position(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PositionReference.java b/src/main/java/com/coinbase/prime/model/PositionReference.java index c3baac4..dd15ee1 100644 --- a/src/main/java/com/coinbase/prime/model/PositionReference.java +++ b/src/main/java/com/coinbase/prime/model/PositionReference.java @@ -17,55 +17,55 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.PositionReferenceType; public class PositionReference { - /** Reference ID */ - private String id; - - private PositionReferenceType type; - - public PositionReference() {} - - public PositionReference(Builder builder) { - this.id = builder.id; - this.type = builder.type; - } + /** + * Reference ID + */ + private String id; - public String getId() { - return id; - } + private PositionReferenceType type; - public void setId(String id) { - this.id = id; - } + public PositionReference() { + } - public PositionReferenceType getType() { - return type; - } + public PositionReference(Builder builder) { + this.id = builder.id; + this.type = builder.type; + } + public String getId() { + return id; + } - public void setType(PositionReferenceType type) { - this.type = type; - } + public void setId(String id) { + this.id = id; + } + public PositionReferenceType getType() { + return type; + } - public static class Builder { - private String id; + public void setType(PositionReferenceType type) { + this.type = type; + } + public static class Builder { + private String id; - private PositionReferenceType type; + private PositionReferenceType type; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder type(PositionReferenceType type) { - this.type = type; - return this; - } + public Builder type(PositionReferenceType type) { + this.type = type; + return this; + } - public PositionReference build() { - return new PositionReference(this); + public PositionReference build() { + return new PositionReference(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java index 29ae30f..dc61b95 100644 --- a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java +++ b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java @@ -17,232 +17,242 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.AmountDue; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class PostTradeCreditInformation { - /** The unique ID of the portfolio */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** The currency symbol credit is denoted in */ - private String currency; - - /** The maximum credit limit */ - private String limit; - - /** The amount of credit used */ - private String utilized; - - /** The amount of credit available */ - private String available; - - /** Whether or not a portfolio is frozen due to balance outstanding or other reason */ - private boolean frozen; + /** + * The unique ID of the portfolio + */ + @JsonProperty("portfolio_id") + private String portfolioId; - /** The reason why the portfolio is frozen */ - @JsonProperty("frozen_reason") - private String frozenReason; + /** + * The currency symbol credit is denoted in + */ + private String currency; - @JsonProperty("amounts_due") - private List amountsDue; + /** + * The maximum credit limit + */ + private String limit; - /** Whether the portfolio has credit enabled */ - private boolean enabled; + /** + * The amount of credit used + */ + private String utilized; - /** The amount of adjusted credit used */ - @JsonProperty("adjusted_credit_utilized") - private String adjustedCreditUtilized; + /** + * The amount of credit available + */ + private String available; - /** The amount of adjusted portfolio equity */ - @JsonProperty("adjusted_portfolio_equity") - private String adjustedPortfolioEquity; + /** + * Whether or not a portfolio is frozen due to balance outstanding or other reason + */ + private boolean frozen; - public PostTradeCreditInformation() {} + /** + * The reason why the portfolio is frozen + */ + @JsonProperty("frozen_reason") + private String frozenReason; - public PostTradeCreditInformation(Builder builder) { - this.portfolioId = builder.portfolioId; - this.currency = builder.currency; - this.limit = builder.limit; - this.utilized = builder.utilized; - this.available = builder.available; - this.frozen = builder.frozen; - this.frozenReason = builder.frozenReason; - this.amountsDue = builder.amountsDue; - this.enabled = builder.enabled; - this.adjustedCreditUtilized = builder.adjustedCreditUtilized; - this.adjustedPortfolioEquity = builder.adjustedPortfolioEquity; - } + @JsonProperty("amounts_due") + private List amountsDue; - public String getPortfolioId() { - return portfolioId; - } + /** + * Whether the portfolio has credit enabled + */ + private boolean enabled; - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } + /** + * The amount of adjusted credit used + */ + @JsonProperty("adjusted_credit_utilized") + private String adjustedCreditUtilized; - public String getCurrency() { - return currency; - } + /** + * The amount of adjusted portfolio equity + */ + @JsonProperty("adjusted_portfolio_equity") + private String adjustedPortfolioEquity; - public void setCurrency(String currency) { - this.currency = currency; - } + public PostTradeCreditInformation() { + } - public String getLimit() { - return limit; - } + public PostTradeCreditInformation(Builder builder) { + this.portfolioId = builder.portfolioId; + this.currency = builder.currency; + this.limit = builder.limit; + this.utilized = builder.utilized; + this.available = builder.available; + this.frozen = builder.frozen; + this.frozenReason = builder.frozenReason; + this.amountsDue = builder.amountsDue; + this.enabled = builder.enabled; + this.adjustedCreditUtilized = builder.adjustedCreditUtilized; + this.adjustedPortfolioEquity = builder.adjustedPortfolioEquity; + } + public String getPortfolioId() { + return portfolioId; + } - public void setLimit(String limit) { - this.limit = limit; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getCurrency() { + return currency; + } - public String getUtilized() { - return utilized; - } + public void setCurrency(String currency) { + this.currency = currency; + } + public String getLimit() { + return limit; + } - public void setUtilized(String utilized) { - this.utilized = utilized; - } + public void setLimit(String limit) { + this.limit = limit; + } + public String getUtilized() { + return utilized; + } - public String getAvailable() { - return available; - } + public void setUtilized(String utilized) { + this.utilized = utilized; + } + public String getAvailable() { + return available; + } - public void setAvailable(String available) { - this.available = available; - } + public void setAvailable(String available) { + this.available = available; + } + public boolean getFrozen() { + return frozen; + } - public boolean getFrozen() { - return frozen; - } + public void setFrozen(boolean frozen) { + this.frozen = frozen; + } + public String getFrozenReason() { + return frozenReason; + } - public void setFrozen(boolean frozen) { - this.frozen = frozen; - } + public void setFrozenReason(String frozenReason) { + this.frozenReason = frozenReason; + } + public List getAmountsDue() { + return amountsDue; + } - public String getFrozenReason() { - return frozenReason; - } + public void setAmountsDue(List amountsDue) { + this.amountsDue = amountsDue; + } + public boolean getEnabled() { + return enabled; + } - public void setFrozenReason(String frozenReason) { - this.frozenReason = frozenReason; - } + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + public String getAdjustedCreditUtilized() { + return adjustedCreditUtilized; + } - public List getAmountsDue() { - return amountsDue; - } + public void setAdjustedCreditUtilized(String adjustedCreditUtilized) { + this.adjustedCreditUtilized = adjustedCreditUtilized; + } + public String getAdjustedPortfolioEquity() { + return adjustedPortfolioEquity; + } - public void setAmountsDue(List amountsDue) { - this.amountsDue = amountsDue; - } - - public boolean getEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public String getAdjustedCreditUtilized() { - return adjustedCreditUtilized; - } - - public void setAdjustedCreditUtilized(String adjustedCreditUtilized) { - this.adjustedCreditUtilized = adjustedCreditUtilized; - } - - public String getAdjustedPortfolioEquity() { - return adjustedPortfolioEquity; - } - - public void setAdjustedPortfolioEquity(String adjustedPortfolioEquity) { - this.adjustedPortfolioEquity = adjustedPortfolioEquity; - } - - public static class Builder { - private String portfolioId; + public void setAdjustedPortfolioEquity(String adjustedPortfolioEquity) { + this.adjustedPortfolioEquity = adjustedPortfolioEquity; + } + public static class Builder { + private String portfolioId; - private String currency; + private String currency; - private String limit; + private String limit; - private String utilized; + private String utilized; - private String available; + private String available; - private boolean frozen; + private boolean frozen; - private String frozenReason; + private String frozenReason; - private List amountsDue; + private List amountsDue; - private boolean enabled; + private boolean enabled; - private String adjustedCreditUtilized; + private String adjustedCreditUtilized; - private String adjustedPortfolioEquity; + private String adjustedPortfolioEquity; - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } - public Builder currency(String currency) { - this.currency = currency; - return this; - } + public Builder currency(String currency) { + this.currency = currency; + return this; + } - public Builder limit(String limit) { - this.limit = limit; - return this; - } + public Builder limit(String limit) { + this.limit = limit; + return this; + } - public Builder utilized(String utilized) { - this.utilized = utilized; - return this; - } + public Builder utilized(String utilized) { + this.utilized = utilized; + return this; + } - public Builder available(String available) { - this.available = available; - return this; - } + public Builder available(String available) { + this.available = available; + return this; + } - public Builder frozen(boolean frozen) { - this.frozen = frozen; - return this; - } + public Builder frozen(boolean frozen) { + this.frozen = frozen; + return this; + } - public Builder frozenReason(String frozenReason) { - this.frozenReason = frozenReason; - return this; - } + public Builder frozenReason(String frozenReason) { + this.frozenReason = frozenReason; + return this; + } - public Builder amountsDue(List amountsDue) { - this.amountsDue = amountsDue; - return this; - } + public Builder amountsDue(List amountsDue) { + this.amountsDue = amountsDue; + return this; + } - public Builder enabled(boolean enabled) { - this.enabled = enabled; - return this; - } + public Builder enabled(boolean enabled) { + this.enabled = enabled; + return this; + } - public Builder adjustedCreditUtilized(String adjustedCreditUtilized) { - this.adjustedCreditUtilized = adjustedCreditUtilized; - return this; - } + public Builder adjustedCreditUtilized(String adjustedCreditUtilized) { + this.adjustedCreditUtilized = adjustedCreditUtilized; + return this; + } - public Builder adjustedPortfolioEquity(String adjustedPortfolioEquity) { - this.adjustedPortfolioEquity = adjustedPortfolioEquity; - return this; - } + public Builder adjustedPortfolioEquity(String adjustedPortfolioEquity) { + this.adjustedPortfolioEquity = adjustedPortfolioEquity; + return this; + } - public PostTradeCreditInformation build() { - return new PostTradeCreditInformation(this); + public PostTradeCreditInformation build() { + return new PostTradeCreditInformation(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java index d13b04c..f0014b3 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java @@ -17,119 +17,125 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.PrimeXMMarginThreshold; 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; - } + /** + * Deficit threshold (DT). + */ + @JsonProperty("deficit_threshold") + private String deficitThreshold; - public String getDeficitThreshold() { - return deficitThreshold; - } + /** + * Warning threshold (WT). + */ + @JsonProperty("warning_threshold") + private String warningThreshold; - public void setDeficitThreshold(String deficitThreshold) { - this.deficitThreshold = deficitThreshold; - } + /** + * Urgent margin call threshold (UMCT). + */ + @JsonProperty("critical_threshold") + private String criticalThreshold; - public String getWarningThreshold() { - return warningThreshold; - } + /** + * Liquidation threshold (LT). + */ + @JsonProperty("liquidation_threshold") + private String liquidationThreshold; - public void setWarningThreshold(String warningThreshold) { - this.warningThreshold = warningThreshold; - } + /** + * Structured margin thresholds by margin level. + */ + @JsonProperty("margin_thresholds") + private List marginThresholds; - public String getCriticalThreshold() { - return criticalThreshold; - } + public PrimeXMMarginCallThresholds() { + } - public void setCriticalThreshold(String criticalThreshold) { - this.criticalThreshold = criticalThreshold; - } + 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 String getLiquidationThreshold() { - return liquidationThreshold; - } + public void setDeficitThreshold(String deficitThreshold) { + this.deficitThreshold = deficitThreshold; + } + public String getWarningThreshold() { + return warningThreshold; + } - public void setLiquidationThreshold(String liquidationThreshold) { - this.liquidationThreshold = liquidationThreshold; - } + public void setWarningThreshold(String warningThreshold) { + this.warningThreshold = warningThreshold; + } + public String getCriticalThreshold() { + return criticalThreshold; + } - public List getMarginThresholds() { - return marginThresholds; - } + public void setCriticalThreshold(String criticalThreshold) { + this.criticalThreshold = criticalThreshold; + } + public String getLiquidationThreshold() { + return liquidationThreshold; + } - public void setMarginThresholds(List marginThresholds) { - this.marginThresholds = marginThresholds; - } + public void setLiquidationThreshold(String liquidationThreshold) { + this.liquidationThreshold = liquidationThreshold; + } + public List getMarginThresholds() { + return marginThresholds; + } - public static class Builder { - private String deficitThreshold; + public void setMarginThresholds(List marginThresholds) { + this.marginThresholds = marginThresholds; + } + public static class Builder { + private String deficitThreshold; - private String warningThreshold; + private String warningThreshold; - private String criticalThreshold; + private String criticalThreshold; - private String liquidationThreshold; + private String liquidationThreshold; - private List marginThresholds; + private List marginThresholds; - public Builder deficitThreshold(String deficitThreshold) { - this.deficitThreshold = deficitThreshold; - return this; - } + public Builder deficitThreshold(String deficitThreshold) { + this.deficitThreshold = deficitThreshold; + return this; + } - public Builder warningThreshold(String warningThreshold) { - this.warningThreshold = warningThreshold; - return this; - } + public Builder warningThreshold(String warningThreshold) { + this.warningThreshold = warningThreshold; + return this; + } - public Builder criticalThreshold(String criticalThreshold) { - this.criticalThreshold = criticalThreshold; - return this; - } + public Builder criticalThreshold(String criticalThreshold) { + this.criticalThreshold = criticalThreshold; + return this; + } - public Builder liquidationThreshold(String liquidationThreshold) { - this.liquidationThreshold = liquidationThreshold; - return this; - } + public Builder liquidationThreshold(String liquidationThreshold) { + this.liquidationThreshold = liquidationThreshold; + return this; + } - public Builder marginThresholds(List marginThresholds) { - this.marginThresholds = marginThresholds; - return this; - } + public Builder marginThresholds(List marginThresholds) { + this.marginThresholds = marginThresholds; + return this; + } - public PrimeXMMarginCallThresholds build() { - return new PrimeXMMarginCallThresholds(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 index 9a0202c..518b8a8 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java @@ -17,121 +17,123 @@ */ 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 { + /** + * 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 Builder baseMargin(String baseMargin) { - this.baseMargin = baseMargin; - return this; + 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 Builder volatilityAddon(String volatilityAddon) { - this.volatilityAddon = volatilityAddon; - return this; + public void setVolatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + } + public String getLiquidityAddon() { + return liquidityAddon; } - public Builder liquidityAddon(String liquidityAddon) { - this.liquidityAddon = liquidityAddon; - return this; + public void setLiquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + } + public String getOffsetCredit() { + return offsetCredit; } - public Builder offsetCredit(String offsetCredit) { - this.offsetCredit = offsetCredit; - return this; + public void setOffsetCredit(String offsetCredit) { + this.offsetCredit = offsetCredit; + } + public String getFuturesMargin() { + return futuresMargin; } - public Builder futuresMargin(String futuresMargin) { - this.futuresMargin = futuresMargin; - return this; + public void setFuturesMargin(String futuresMargin) { + this.futuresMargin = futuresMargin; } + public static class Builder { + private String baseMargin; - public PrimeXMMarginRequirementBreakdown build() { - return new PrimeXMMarginRequirementBreakdown(this); + 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 index afc3a5c..f4315fc 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java @@ -17,95 +17,85 @@ */ 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 { + /** + * - 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 Builder marginLevel(XMMarginLevel marginLevel) { - this.marginLevel = marginLevel; - return this; + 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 Builder thresholdType(PrimeXMMarginThresholdType thresholdType) { - this.thresholdType = thresholdType; - return this; + public void setThresholdType(PrimeXMMarginThresholdType thresholdType) { + this.thresholdType = thresholdType; + } + public String getThresholdValue() { + return thresholdValue; } - public Builder thresholdValue(String thresholdValue) { - this.thresholdValue = thresholdValue; - return this; + 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 PrimeXMMarginThreshold build() { - return new PrimeXMMarginThreshold(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 index 55a2f2b..0d483d2 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java @@ -17,138 +17,144 @@ */ 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 { + /** + * 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 Builder basisCredit(String basisCredit) { - this.basisCredit = basisCredit; - return this; + 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 Builder longShortCredit(String longShortCredit) { - this.longShortCredit = longShortCredit; - return this; + public void setBasisCredit(String basisCredit) { + this.basisCredit = basisCredit; + } + public String getLongShortCredit() { + return longShortCredit; } - public Builder longLongCredit(String longLongCredit) { - this.longLongCredit = longLongCredit; - return this; + public void setLongShortCredit(String longShortCredit) { + this.longShortCredit = longShortCredit; + } + public String getLongLongCredit() { + return longLongCredit; } - public Builder shortShortCredit(String shortShortCredit) { - this.shortShortCredit = shortShortCredit; - return this; + public void setLongLongCredit(String longLongCredit) { + this.longLongCredit = longLongCredit; + } + public String getShortShortCredit() { + return shortShortCredit; } - public Builder sameTierCredit(String sameTierCredit) { - this.sameTierCredit = sameTierCredit; - return this; + public void setShortShortCredit(String shortShortCredit) { + this.shortShortCredit = shortShortCredit; + } + public String getSameTierCredit() { + return sameTierCredit; } - public Builder totalCredit(String totalCredit) { - this.totalCredit = totalCredit; - return this; + public void setSameTierCredit(String sameTierCredit) { + this.sameTierCredit = sameTierCredit; + } + public String getTotalCredit() { + return totalCredit; } - public PrimeXMOffsetCreditBreakdown build() { - return new PrimeXMOffsetCreditBreakdown(this); + 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/ProcessRequirements.java b/src/main/java/com/coinbase/prime/model/ProcessRequirements.java index 2021ef7..81cd835 100644 --- a/src/main/java/com/coinbase/prime/model/ProcessRequirements.java +++ b/src/main/java/com/coinbase/prime/model/ProcessRequirements.java @@ -17,40 +17,39 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.TravelRuleStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents the status of various process requirements for a transaction */ public class ProcessRequirements { - /** Travel rule compliance status for a transaction */ - @JsonProperty("travel_rule_status") - private TravelRuleStatus travelRuleStatus; - - public ProcessRequirements() {} - - public ProcessRequirements(Builder builder) { - this.travelRuleStatus = builder.travelRuleStatus; - } - - public TravelRuleStatus getTravelRuleStatus() { - return travelRuleStatus; - } + /** Travel rule compliance status for a transaction */ + @JsonProperty("travel_rule_status") + private TravelRuleStatus travelRuleStatus; - public void setTravelRuleStatus(TravelRuleStatus travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - } + public ProcessRequirements() { + } - public static class Builder { - private TravelRuleStatus travelRuleStatus; + public ProcessRequirements(Builder builder) { + this.travelRuleStatus = builder.travelRuleStatus; + } + public TravelRuleStatus getTravelRuleStatus() { + return travelRuleStatus; + } - public Builder travelRuleStatus(TravelRuleStatus travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - return this; + public void setTravelRuleStatus(TravelRuleStatus travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; } + public static class Builder { + private TravelRuleStatus travelRuleStatus; - public ProcessRequirements build() { - return new ProcessRequirements(this); + public Builder travelRuleStatus(TravelRuleStatus travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; + return this; + } + + public ProcessRequirements build() { + return new ProcessRequirements(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Product.java b/src/main/java/com/coinbase/prime/model/Product.java index a6a9fde..ef248f9 100644 --- a/src/main/java/com/coinbase/prime/model/Product.java +++ b/src/main/java/com/coinbase/prime/model/Product.java @@ -17,278 +17,290 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.FcmTradingSessionDetails; +import com.coinbase.prime.model.FutureProductDetails; import com.coinbase.prime.model.enums.ProductPermissions; import com.coinbase.prime.model.enums.ProductType; +import com.coinbase.prime.model.RfqProductDetails; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Product { - /** The product ID, written as `BASE-QUOTE` */ - private String id; - - /** The smallest permitted unit of denomination for the base asset (varies by product) */ - @JsonProperty("base_increment") - private String baseIncrement; - - /** The smallest permitted unit of denomination for the quote asset (varies by product) */ - @JsonProperty("quote_increment") - private String quoteIncrement; - - /** The minimum size (in base asset units) for which an order can be placed */ - @JsonProperty("base_min_size") - private String baseMinSize; - - /** The minimum size (in quote asset units) for which an order can be placed */ - @JsonProperty("quote_min_size") - private String quoteMinSize; - - /** The maximum size (in base asset units) for which an order can be placed */ - @JsonProperty("base_max_size") - private String baseMaxSize; - - /** The maximum size (in quote asset units) for which an order can be placed */ - @JsonProperty("quote_max_size") - private String quoteMaxSize; - - /** Permissions given to the user for a product */ - private List permissions; - - /** The smallest permitted price increment for the product */ - @JsonProperty("price_increment") - private String priceIncrement; - - @JsonProperty("rfq_product_details") - private RfqProductDetails rfqProductDetails; - - /** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ - @JsonProperty("product_type") - private ProductType productType; - - /** FcmTradingSessionDetails contains trading session details for FCM products */ - @JsonProperty("fcm_trading_session_details") - private FcmTradingSessionDetails fcmTradingSessionDetails; - - /** FutureProductDetails contains details specific to futures products */ - @JsonProperty("future_product_details") - private FutureProductDetails futureProductDetails; - - public Product() {} - - public Product(Builder builder) { - this.id = builder.id; - this.baseIncrement = builder.baseIncrement; - this.quoteIncrement = builder.quoteIncrement; - this.baseMinSize = builder.baseMinSize; - this.quoteMinSize = builder.quoteMinSize; - this.baseMaxSize = builder.baseMaxSize; - this.quoteMaxSize = builder.quoteMaxSize; - this.permissions = builder.permissions; - this.priceIncrement = builder.priceIncrement; - this.rfqProductDetails = builder.rfqProductDetails; - this.productType = builder.productType; - this.fcmTradingSessionDetails = builder.fcmTradingSessionDetails; - this.futureProductDetails = builder.futureProductDetails; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getBaseIncrement() { - return baseIncrement; - } - - public void setBaseIncrement(String baseIncrement) { - this.baseIncrement = baseIncrement; - } - - public String getQuoteIncrement() { - return quoteIncrement; - } - - public void setQuoteIncrement(String quoteIncrement) { - this.quoteIncrement = quoteIncrement; - } - - public String getBaseMinSize() { - return baseMinSize; - } - - public void setBaseMinSize(String baseMinSize) { - this.baseMinSize = baseMinSize; - } - - public String getQuoteMinSize() { - return quoteMinSize; - } - - public void setQuoteMinSize(String quoteMinSize) { - this.quoteMinSize = quoteMinSize; - } - - public String getBaseMaxSize() { - return baseMaxSize; - } - - public void setBaseMaxSize(String baseMaxSize) { - this.baseMaxSize = baseMaxSize; - } - - public String getQuoteMaxSize() { - return quoteMaxSize; - } - - public void setQuoteMaxSize(String quoteMaxSize) { - this.quoteMaxSize = quoteMaxSize; - } - - public List getPermissions() { - return permissions; - } - - public void setPermissions(List permissions) { - this.permissions = permissions; - } - - public String getPriceIncrement() { - return priceIncrement; - } - - public void setPriceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - } - - public RfqProductDetails getRfqProductDetails() { - return rfqProductDetails; - } - - public void setRfqProductDetails(RfqProductDetails rfqProductDetails) { - this.rfqProductDetails = rfqProductDetails; - } - - public ProductType getProductType() { - return productType; - } - - public void setProductType(ProductType productType) { - this.productType = productType; - } - - public FcmTradingSessionDetails getFcmTradingSessionDetails() { - return fcmTradingSessionDetails; - } - - public void setFcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { - this.fcmTradingSessionDetails = fcmTradingSessionDetails; - } - - public FutureProductDetails getFutureProductDetails() { - return futureProductDetails; - } - - public void setFutureProductDetails(FutureProductDetails futureProductDetails) { - this.futureProductDetails = futureProductDetails; - } - - public static class Builder { + /** + * The product ID, written as `BASE-QUOTE` + */ private String id; + /** + * The smallest permitted unit of denomination for the base asset (varies by product) + */ + @JsonProperty("base_increment") private String baseIncrement; + /** + * The smallest permitted unit of denomination for the quote asset (varies by product) + */ + @JsonProperty("quote_increment") private String quoteIncrement; + /** + * The minimum size (in base asset units) for which an order can be placed + */ + @JsonProperty("base_min_size") private String baseMinSize; + /** + * The minimum size (in quote asset units) for which an order can be placed + */ + @JsonProperty("quote_min_size") private String quoteMinSize; + /** + * The maximum size (in base asset units) for which an order can be placed + */ + @JsonProperty("base_max_size") private String baseMaxSize; + /** + * The maximum size (in quote asset units) for which an order can be placed + */ + @JsonProperty("quote_max_size") private String quoteMaxSize; + /** + * Permissions given to the user for a product + */ private List permissions; + /** + * The smallest permitted price increment for the product + */ + @JsonProperty("price_increment") private String priceIncrement; + @JsonProperty("rfq_product_details") private RfqProductDetails rfqProductDetails; + /** + * - UNKNOWN_PRODUCT_TYPE: Unknown product type + * - SPOT: Spot product + * - FUTURE: Future product + */ + @JsonProperty("product_type") private ProductType productType; + /** FcmTradingSessionDetails contains trading session details for FCM products */ + @JsonProperty("fcm_trading_session_details") private FcmTradingSessionDetails fcmTradingSessionDetails; + /** FutureProductDetails contains details specific to futures products */ + @JsonProperty("future_product_details") private FutureProductDetails futureProductDetails; - public Builder id(String id) { - this.id = id; - return this; + public Product() { + } + + public Product(Builder builder) { + this.id = builder.id; + this.baseIncrement = builder.baseIncrement; + this.quoteIncrement = builder.quoteIncrement; + this.baseMinSize = builder.baseMinSize; + this.quoteMinSize = builder.quoteMinSize; + this.baseMaxSize = builder.baseMaxSize; + this.quoteMaxSize = builder.quoteMaxSize; + this.permissions = builder.permissions; + this.priceIncrement = builder.priceIncrement; + this.rfqProductDetails = builder.rfqProductDetails; + this.productType = builder.productType; + this.fcmTradingSessionDetails = builder.fcmTradingSessionDetails; + this.futureProductDetails = builder.futureProductDetails; + } + public String getId() { + return id; } - public Builder baseIncrement(String baseIncrement) { - this.baseIncrement = baseIncrement; - return this; + public void setId(String id) { + this.id = id; + } + public String getBaseIncrement() { + return baseIncrement; } - public Builder quoteIncrement(String quoteIncrement) { - this.quoteIncrement = quoteIncrement; - return this; + public void setBaseIncrement(String baseIncrement) { + this.baseIncrement = baseIncrement; + } + public String getQuoteIncrement() { + return quoteIncrement; } - public Builder baseMinSize(String baseMinSize) { - this.baseMinSize = baseMinSize; - return this; + public void setQuoteIncrement(String quoteIncrement) { + this.quoteIncrement = quoteIncrement; + } + public String getBaseMinSize() { + return baseMinSize; } - public Builder quoteMinSize(String quoteMinSize) { - this.quoteMinSize = quoteMinSize; - return this; + public void setBaseMinSize(String baseMinSize) { + this.baseMinSize = baseMinSize; + } + public String getQuoteMinSize() { + return quoteMinSize; } - public Builder baseMaxSize(String baseMaxSize) { - this.baseMaxSize = baseMaxSize; - return this; + public void setQuoteMinSize(String quoteMinSize) { + this.quoteMinSize = quoteMinSize; + } + public String getBaseMaxSize() { + return baseMaxSize; } - public Builder quoteMaxSize(String quoteMaxSize) { - this.quoteMaxSize = quoteMaxSize; - return this; + public void setBaseMaxSize(String baseMaxSize) { + this.baseMaxSize = baseMaxSize; + } + public String getQuoteMaxSize() { + return quoteMaxSize; } - public Builder permissions(List permissions) { - this.permissions = permissions; - return this; + public void setQuoteMaxSize(String quoteMaxSize) { + this.quoteMaxSize = quoteMaxSize; + } + public List getPermissions() { + return permissions; } - public Builder priceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - return this; + public void setPermissions(List permissions) { + this.permissions = permissions; + } + public String getPriceIncrement() { + return priceIncrement; } - public Builder rfqProductDetails(RfqProductDetails rfqProductDetails) { - this.rfqProductDetails = rfqProductDetails; - return this; + public void setPriceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + } + public RfqProductDetails getRfqProductDetails() { + return rfqProductDetails; } - public Builder productType(ProductType productType) { - this.productType = productType; - return this; + public void setRfqProductDetails(RfqProductDetails rfqProductDetails) { + this.rfqProductDetails = rfqProductDetails; + } + public ProductType getProductType() { + return productType; } - public Builder fcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { - this.fcmTradingSessionDetails = fcmTradingSessionDetails; - return this; + public void setProductType(ProductType productType) { + this.productType = productType; + } + public FcmTradingSessionDetails getFcmTradingSessionDetails() { + return fcmTradingSessionDetails; } - public Builder futureProductDetails(FutureProductDetails futureProductDetails) { - this.futureProductDetails = futureProductDetails; - return this; + public void setFcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + } + public FutureProductDetails getFutureProductDetails() { + return futureProductDetails; } - public Product build() { - return new Product(this); + public void setFutureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + } + public static class Builder { + private String id; + + private String baseIncrement; + + private String quoteIncrement; + + private String baseMinSize; + + private String quoteMinSize; + + private String baseMaxSize; + + private String quoteMaxSize; + + private List permissions; + + private String priceIncrement; + + private RfqProductDetails rfqProductDetails; + + private ProductType productType; + + private FcmTradingSessionDetails fcmTradingSessionDetails; + + private FutureProductDetails futureProductDetails; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder baseIncrement(String baseIncrement) { + this.baseIncrement = baseIncrement; + return this; + } + + public Builder quoteIncrement(String quoteIncrement) { + this.quoteIncrement = quoteIncrement; + return this; + } + + public Builder baseMinSize(String baseMinSize) { + this.baseMinSize = baseMinSize; + return this; + } + + public Builder quoteMinSize(String quoteMinSize) { + this.quoteMinSize = quoteMinSize; + return this; + } + + public Builder baseMaxSize(String baseMaxSize) { + this.baseMaxSize = baseMaxSize; + return this; + } + + public Builder quoteMaxSize(String quoteMaxSize) { + this.quoteMaxSize = quoteMaxSize; + return this; + } + + public Builder permissions(List permissions) { + this.permissions = permissions; + return this; + } + + public Builder priceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + return this; + } + + public Builder rfqProductDetails(RfqProductDetails rfqProductDetails) { + this.rfqProductDetails = rfqProductDetails; + return this; + } + + public Builder productType(ProductType productType) { + this.productType = productType; + return this; + } + + public Builder fcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + return this; + } + + public Builder futureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + return this; + } + + public Product build() { + return new Product(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java index 1663fcc..6f8ec0a 100644 --- a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java +++ b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java @@ -17,92 +17,89 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.TravelRuleParty; import com.fasterxml.jackson.annotation.JsonProperty; public class RequestToSubmitTravelRuleDataForAnExistingDepositTransaction { - private TravelRuleParty originator; - - private TravelRuleParty beneficiary; - - @JsonProperty("is_self") - private boolean isSelf; - - @JsonProperty("opt_out_of_ownership_verification") - private boolean optOutOfOwnershipVerification; - - public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction() {} - - public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(Builder builder) { - this.originator = builder.originator; - this.beneficiary = builder.beneficiary; - this.isSelf = builder.isSelf; - this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; - } + private TravelRuleParty originator; - public TravelRuleParty getOriginator() { - return originator; - } + private TravelRuleParty beneficiary; - public void setOriginator(TravelRuleParty originator) { - this.originator = originator; - } + @JsonProperty("is_self") + private boolean isSelf; - public TravelRuleParty getBeneficiary() { - return beneficiary; - } + @JsonProperty("opt_out_of_ownership_verification") + private boolean optOutOfOwnershipVerification; - public void setBeneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - } + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction() { + } - public boolean getIsSelf() { - return isSelf; - } + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(Builder builder) { + this.originator = builder.originator; + this.beneficiary = builder.beneficiary; + this.isSelf = builder.isSelf; + this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; + } + public TravelRuleParty getOriginator() { + return originator; + } - public void setIsSelf(boolean isSelf) { - this.isSelf = isSelf; - } + public void setOriginator(TravelRuleParty originator) { + this.originator = originator; + } + public TravelRuleParty getBeneficiary() { + return beneficiary; + } - public boolean getOptOutOfOwnershipVerification() { - return optOutOfOwnershipVerification; - } + public void setBeneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + } + public boolean getIsSelf() { + return isSelf; + } - public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - } + public void setIsSelf(boolean isSelf) { + this.isSelf = isSelf; + } + public boolean getOptOutOfOwnershipVerification() { + return optOutOfOwnershipVerification; + } - public static class Builder { - private TravelRuleParty originator; + public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + } + public static class Builder { + private TravelRuleParty originator; - private TravelRuleParty beneficiary; + private TravelRuleParty beneficiary; - private boolean isSelf; + private boolean isSelf; - private boolean optOutOfOwnershipVerification; + private boolean optOutOfOwnershipVerification; - public Builder originator(TravelRuleParty originator) { - this.originator = originator; - return this; - } + public Builder originator(TravelRuleParty originator) { + this.originator = originator; + return this; + } - public Builder beneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - return this; - } + public Builder beneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + return this; + } - public Builder isSelf(boolean isSelf) { - this.isSelf = isSelf; - return this; - } + public Builder isSelf(boolean isSelf) { + this.isSelf = isSelf; + return this; + } - public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - return this; - } + public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + return this; + } - public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction build() { - return new RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(this); + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction build() { + return new RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/RewardMetadata.java b/src/main/java/com/coinbase/prime/model/RewardMetadata.java index c5dc33a..95f2ee7 100644 --- a/src/main/java/com/coinbase/prime/model/RewardMetadata.java +++ b/src/main/java/com/coinbase/prime/model/RewardMetadata.java @@ -17,70 +17,75 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.CustomStablecoinRewardDetails; import com.coinbase.prime.model.enums.RewardSubtype; import com.fasterxml.jackson.annotation.JsonProperty; public class RewardMetadata { - /** - * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the - * API response yet - MEV_REWARD: A maximal extractable value reward i.e. sol mev rewards - - * INFLATION_REWARD: An inflationary reward i.e. solana inflationary rewards - BLOCK_REWARD: A - * block reward i.e. solana block rewards - VALIDATOR_REWARD: A validator reward i.e. ethereum - * 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 - CUSTOM_STABLECOIN_REWARD: A custom - * stablecoin reward i.e. USDC reward payouts - */ - 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; - } + /** + * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the API response yet + * - MEV_REWARD: A maximal extractable value reward + * i.e. sol mev rewards + * - INFLATION_REWARD: An inflationary reward + * i.e. solana inflationary rewards + * - BLOCK_REWARD: A block reward + * i.e. solana block rewards + * - VALIDATOR_REWARD: A validator reward + * i.e. ethereum 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 + * - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward + * i.e. USDC reward payouts + */ + private RewardSubtype subtype; - public RewardSubtype getSubtype() { - return subtype; - } + /** Details for a custom stablecoin reward payout transaction */ + @JsonProperty("custom_stablecoin_reward_details") + private CustomStablecoinRewardDetails customStablecoinRewardDetails; - public void setSubtype(RewardSubtype subtype) { - this.subtype = subtype; - } + public RewardMetadata() { + } - public CustomStablecoinRewardDetails getCustomStablecoinRewardDetails() { - return customStablecoinRewardDetails; - } + public RewardMetadata(Builder builder) { + this.subtype = builder.subtype; + this.customStablecoinRewardDetails = builder.customStablecoinRewardDetails; + } + public RewardSubtype getSubtype() { + return subtype; + } - public void setCustomStablecoinRewardDetails( - CustomStablecoinRewardDetails customStablecoinRewardDetails) { - this.customStablecoinRewardDetails = customStablecoinRewardDetails; - } + public void setSubtype(RewardSubtype subtype) { + this.subtype = subtype; + } + public CustomStablecoinRewardDetails getCustomStablecoinRewardDetails() { + return customStablecoinRewardDetails; + } - public static class Builder { - private RewardSubtype subtype; + public void setCustomStablecoinRewardDetails(CustomStablecoinRewardDetails customStablecoinRewardDetails) { + this.customStablecoinRewardDetails = customStablecoinRewardDetails; + } + public static class Builder { + private RewardSubtype subtype; - private CustomStablecoinRewardDetails customStablecoinRewardDetails; + private CustomStablecoinRewardDetails customStablecoinRewardDetails; - public Builder subtype(RewardSubtype subtype) { - this.subtype = subtype; - return this; - } + public Builder subtype(RewardSubtype subtype) { + this.subtype = subtype; + return this; + } - public Builder customStablecoinRewardDetails( - CustomStablecoinRewardDetails customStablecoinRewardDetails) { - this.customStablecoinRewardDetails = customStablecoinRewardDetails; - return this; - } + public Builder customStablecoinRewardDetails(CustomStablecoinRewardDetails customStablecoinRewardDetails) { + this.customStablecoinRewardDetails = customStablecoinRewardDetails; + return this; + } - public RewardMetadata build() { - return new RewardMetadata(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 b164c2a..78ae8c3 100644 --- a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java @@ -17,157 +17,164 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class RfqProductDetails { - /** Whether the product is tradable via RFQ */ - private boolean tradable; - - /** Deprecated: Value will be an empty string */ - @JsonProperty("min_notional_size") - private String minNotionalSize; - - /** Deprecated: Value will be an empty string */ - @JsonProperty("max_notional_size") - private String maxNotionalSize; - - /** Minimum base size for RFQ */ - @JsonProperty("min_base_size") - private String minBaseSize; - - /** Maximum base size for RFQ */ - @JsonProperty("max_base_size") - private String maxBaseSize; - - /** Minimum quote size for RFQ */ - @JsonProperty("min_quote_size") - private String minQuoteSize; - - /** Maximum quote size for RFQ */ - @JsonProperty("max_quote_size") - private String maxQuoteSize; - - public RfqProductDetails() {} - - public RfqProductDetails(Builder builder) { - this.tradable = builder.tradable; - this.minNotionalSize = builder.minNotionalSize; - this.maxNotionalSize = builder.maxNotionalSize; - this.minBaseSize = builder.minBaseSize; - this.maxBaseSize = builder.maxBaseSize; - this.minQuoteSize = builder.minQuoteSize; - this.maxQuoteSize = builder.maxQuoteSize; - } - - public boolean getTradable() { - return tradable; - } - - public void setTradable(boolean tradable) { - this.tradable = tradable; - } - - public String getMinNotionalSize() { - return minNotionalSize; - } - - public void setMinNotionalSize(String minNotionalSize) { - this.minNotionalSize = minNotionalSize; - } - - public String getMaxNotionalSize() { - return maxNotionalSize; - } - - public void setMaxNotionalSize(String maxNotionalSize) { - this.maxNotionalSize = maxNotionalSize; - } - - public String getMinBaseSize() { - return minBaseSize; - } - - public void setMinBaseSize(String minBaseSize) { - this.minBaseSize = minBaseSize; - } - - public String getMaxBaseSize() { - return maxBaseSize; - } - - public void setMaxBaseSize(String maxBaseSize) { - this.maxBaseSize = maxBaseSize; - } - - public String getMinQuoteSize() { - return minQuoteSize; - } - - public void setMinQuoteSize(String minQuoteSize) { - this.minQuoteSize = minQuoteSize; - } - - public String getMaxQuoteSize() { - return maxQuoteSize; - } - - public void setMaxQuoteSize(String maxQuoteSize) { - this.maxQuoteSize = maxQuoteSize; - } - - public static class Builder { + /** + * Whether the product is tradable via RFQ + */ private boolean tradable; + /** + * Deprecated: Value will be an empty string + */ + @JsonProperty("min_notional_size") private String minNotionalSize; + /** + * Deprecated: Value will be an empty string + */ + @JsonProperty("max_notional_size") private String maxNotionalSize; + /** + * Minimum base size for RFQ + */ + @JsonProperty("min_base_size") private String minBaseSize; + /** + * Maximum base size for RFQ + */ + @JsonProperty("max_base_size") private String maxBaseSize; + /** + * Minimum quote size for RFQ + */ + @JsonProperty("min_quote_size") private String minQuoteSize; + /** + * Maximum quote size for RFQ + */ + @JsonProperty("max_quote_size") private String maxQuoteSize; - public Builder tradable(boolean tradable) { - this.tradable = tradable; - return this; + public RfqProductDetails() { } - public Builder minNotionalSize(String minNotionalSize) { - this.minNotionalSize = minNotionalSize; - return this; + public RfqProductDetails(Builder builder) { + this.tradable = builder.tradable; + this.minNotionalSize = builder.minNotionalSize; + this.maxNotionalSize = builder.maxNotionalSize; + this.minBaseSize = builder.minBaseSize; + this.maxBaseSize = builder.maxBaseSize; + this.minQuoteSize = builder.minQuoteSize; + this.maxQuoteSize = builder.maxQuoteSize; + } + public boolean getTradable() { + return tradable; } - public Builder maxNotionalSize(String maxNotionalSize) { - this.maxNotionalSize = maxNotionalSize; - return this; + public void setTradable(boolean tradable) { + this.tradable = tradable; + } + public String getMinNotionalSize() { + return minNotionalSize; } - public Builder minBaseSize(String minBaseSize) { - this.minBaseSize = minBaseSize; - return this; + public void setMinNotionalSize(String minNotionalSize) { + this.minNotionalSize = minNotionalSize; + } + public String getMaxNotionalSize() { + return maxNotionalSize; } - public Builder maxBaseSize(String maxBaseSize) { - this.maxBaseSize = maxBaseSize; - return this; + public void setMaxNotionalSize(String maxNotionalSize) { + this.maxNotionalSize = maxNotionalSize; + } + public String getMinBaseSize() { + return minBaseSize; } - public Builder minQuoteSize(String minQuoteSize) { - this.minQuoteSize = minQuoteSize; - return this; + public void setMinBaseSize(String minBaseSize) { + this.minBaseSize = minBaseSize; + } + public String getMaxBaseSize() { + return maxBaseSize; } - public Builder maxQuoteSize(String maxQuoteSize) { - this.maxQuoteSize = maxQuoteSize; - return this; + public void setMaxBaseSize(String maxBaseSize) { + this.maxBaseSize = maxBaseSize; + } + public String getMinQuoteSize() { + return minQuoteSize; } - public RfqProductDetails build() { - return new RfqProductDetails(this); + public void setMinQuoteSize(String minQuoteSize) { + this.minQuoteSize = minQuoteSize; + } + public String getMaxQuoteSize() { + return maxQuoteSize; + } + + public void setMaxQuoteSize(String maxQuoteSize) { + this.maxQuoteSize = maxQuoteSize; + } + public static class Builder { + private boolean tradable; + + private String minNotionalSize; + + private String maxNotionalSize; + + private String minBaseSize; + + private String maxBaseSize; + + private String minQuoteSize; + + private String maxQuoteSize; + + public Builder tradable(boolean tradable) { + this.tradable = tradable; + return this; + } + + public Builder minNotionalSize(String minNotionalSize) { + this.minNotionalSize = minNotionalSize; + return this; + } + + public Builder maxNotionalSize(String maxNotionalSize) { + this.maxNotionalSize = maxNotionalSize; + return this; + } + + public Builder minBaseSize(String minBaseSize) { + this.minBaseSize = minBaseSize; + return this; + } + + public Builder maxBaseSize(String maxBaseSize) { + this.maxBaseSize = maxBaseSize; + return this; + } + + public Builder minQuoteSize(String minQuoteSize) { + this.minQuoteSize = minQuoteSize; + return this; + } + + public Builder maxQuoteSize(String maxQuoteSize) { + this.maxQuoteSize = maxQuoteSize; + return this; + } + + public RfqProductDetails build() { + return new RfqProductDetails(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/RiskAssessment.java b/src/main/java/com/coinbase/prime/model/RiskAssessment.java index 4779699..fc50261 100644 --- a/src/main/java/com/coinbase/prime/model/RiskAssessment.java +++ b/src/main/java/com/coinbase/prime/model/RiskAssessment.java @@ -17,59 +17,61 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** New message for risk assessment details */ public class RiskAssessment { - /** Indicates if the transaction has been flagged for compliance concerns */ - @JsonProperty("compliance_risk_detected") - private boolean complianceRiskDetected; - - /** Indicates if the transaction has been flagged for security concerns */ - @JsonProperty("security_risk_detected") - private boolean securityRiskDetected; - - public RiskAssessment() {} - - public RiskAssessment(Builder builder) { - this.complianceRiskDetected = builder.complianceRiskDetected; - this.securityRiskDetected = builder.securityRiskDetected; - } + /** + * Indicates if the transaction has been flagged for compliance concerns + */ + @JsonProperty("compliance_risk_detected") + private boolean complianceRiskDetected; - public boolean getComplianceRiskDetected() { - return complianceRiskDetected; - } + /** + * Indicates if the transaction has been flagged for security concerns + */ + @JsonProperty("security_risk_detected") + private boolean securityRiskDetected; - public void setComplianceRiskDetected(boolean complianceRiskDetected) { - this.complianceRiskDetected = complianceRiskDetected; - } + public RiskAssessment() { + } - public boolean getSecurityRiskDetected() { - return securityRiskDetected; - } + public RiskAssessment(Builder builder) { + this.complianceRiskDetected = builder.complianceRiskDetected; + this.securityRiskDetected = builder.securityRiskDetected; + } + public boolean getComplianceRiskDetected() { + return complianceRiskDetected; + } - public void setSecurityRiskDetected(boolean securityRiskDetected) { - this.securityRiskDetected = securityRiskDetected; - } + public void setComplianceRiskDetected(boolean complianceRiskDetected) { + this.complianceRiskDetected = complianceRiskDetected; + } + public boolean getSecurityRiskDetected() { + return securityRiskDetected; + } - public static class Builder { - private boolean complianceRiskDetected; + public void setSecurityRiskDetected(boolean securityRiskDetected) { + this.securityRiskDetected = securityRiskDetected; + } + public static class Builder { + private boolean complianceRiskDetected; - private boolean securityRiskDetected; + private boolean securityRiskDetected; - public Builder complianceRiskDetected(boolean complianceRiskDetected) { - this.complianceRiskDetected = complianceRiskDetected; - return this; - } + public Builder complianceRiskDetected(boolean complianceRiskDetected) { + this.complianceRiskDetected = complianceRiskDetected; + return this; + } - public Builder securityRiskDetected(boolean securityRiskDetected) { - this.securityRiskDetected = securityRiskDetected; - return this; - } + public Builder securityRiskDetected(boolean securityRiskDetected) { + this.securityRiskDetected = securityRiskDetected; + return this; + } - public RiskAssessment build() { - return new RiskAssessment(this); + public RiskAssessment build() { + return new RiskAssessment(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/RpcConfig.java b/src/main/java/com/coinbase/prime/model/RpcConfig.java index a829249..f320bc0 100644 --- a/src/main/java/com/coinbase/prime/model/RpcConfig.java +++ b/src/main/java/com/coinbase/prime/model/RpcConfig.java @@ -17,57 +17,59 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class RpcConfig { - /** If true, transaction will not be broadcast to the network */ - @JsonProperty("skip_broadcast") - private boolean skipBroadcast; - - /** Custom blockchain node RPC URL. (EVM-only) */ - private String url; - - public RpcConfig() {} - - public RpcConfig(Builder builder) { - this.skipBroadcast = builder.skipBroadcast; - this.url = builder.url; - } + /** + * If true, transaction will not be broadcast to the network + */ + @JsonProperty("skip_broadcast") + private boolean skipBroadcast; - public boolean getSkipBroadcast() { - return skipBroadcast; - } + /** + * Custom blockchain node RPC URL. (EVM-only) + */ + private String url; - public void setSkipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - } + public RpcConfig() { + } - public String getUrl() { - return url; - } + public RpcConfig(Builder builder) { + this.skipBroadcast = builder.skipBroadcast; + this.url = builder.url; + } + public boolean getSkipBroadcast() { + return skipBroadcast; + } - public void setUrl(String url) { - this.url = url; - } + public void setSkipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + } + public String getUrl() { + return url; + } - public static class Builder { - private boolean skipBroadcast; + public void setUrl(String url) { + this.url = url; + } + public static class Builder { + private boolean skipBroadcast; - private String url; + private String url; - public Builder skipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - return this; - } + public Builder skipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + return this; + } - public Builder url(String url) { - this.url = url; - return this; - } + public Builder url(String url) { + this.url = url; + return this; + } - public RpcConfig build() { - return new RpcConfig(this); + public RpcConfig build() { + return new RpcConfig(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ShortCollateral.java b/src/main/java/com/coinbase/prime/model/ShortCollateral.java index 4ac65a6..d8641f1 100644 --- a/src/main/java/com/coinbase/prime/model/ShortCollateral.java +++ b/src/main/java/com/coinbase/prime/model/ShortCollateral.java @@ -17,98 +17,102 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; public class ShortCollateral { - /** Existing short collateral balance */ - @JsonProperty("old_balance") - private String oldBalance; - - /** New short collateral balance required */ - @JsonProperty("new_balance") - private String newBalance; - - /** Loan interest rate */ - @JsonProperty("loan_interest_rate") - private String loanInterestRate; - - /** Collateral interest rate */ - @JsonProperty("collateral_interest_rate") - private String collateralInterestRate; - - public ShortCollateral() {} - - public ShortCollateral(Builder builder) { - this.oldBalance = builder.oldBalance; - this.newBalance = builder.newBalance; - this.loanInterestRate = builder.loanInterestRate; - this.collateralInterestRate = builder.collateralInterestRate; - } + /** + * Existing short collateral balance + */ + @JsonProperty("old_balance") + private String oldBalance; - public String getOldBalance() { - return oldBalance; - } + /** + * New short collateral balance required + */ + @JsonProperty("new_balance") + private String newBalance; - public void setOldBalance(String oldBalance) { - this.oldBalance = oldBalance; - } + /** + * Loan interest rate + */ + @JsonProperty("loan_interest_rate") + private String loanInterestRate; - public String getNewBalance() { - return newBalance; - } + /** + * Collateral interest rate + */ + @JsonProperty("collateral_interest_rate") + private String collateralInterestRate; - public void setNewBalance(String newBalance) { - this.newBalance = newBalance; - } + public ShortCollateral() { + } - public String getLoanInterestRate() { - return loanInterestRate; - } + public ShortCollateral(Builder builder) { + this.oldBalance = builder.oldBalance; + this.newBalance = builder.newBalance; + this.loanInterestRate = builder.loanInterestRate; + this.collateralInterestRate = builder.collateralInterestRate; + } + public String getOldBalance() { + return oldBalance; + } - public void setLoanInterestRate(String loanInterestRate) { - this.loanInterestRate = loanInterestRate; - } + public void setOldBalance(String oldBalance) { + this.oldBalance = oldBalance; + } + public String getNewBalance() { + return newBalance; + } - public String getCollateralInterestRate() { - return collateralInterestRate; - } + public void setNewBalance(String newBalance) { + this.newBalance = newBalance; + } + public String getLoanInterestRate() { + return loanInterestRate; + } - public void setCollateralInterestRate(String collateralInterestRate) { - this.collateralInterestRate = collateralInterestRate; - } + public void setLoanInterestRate(String loanInterestRate) { + this.loanInterestRate = loanInterestRate; + } + public String getCollateralInterestRate() { + return collateralInterestRate; + } - public static class Builder { - private String oldBalance; + public void setCollateralInterestRate(String collateralInterestRate) { + this.collateralInterestRate = collateralInterestRate; + } + public static class Builder { + private String oldBalance; - private String newBalance; + private String newBalance; - private String loanInterestRate; + private String loanInterestRate; - private String collateralInterestRate; + private String collateralInterestRate; - public Builder oldBalance(String oldBalance) { - this.oldBalance = oldBalance; - return this; - } + public Builder oldBalance(String oldBalance) { + this.oldBalance = oldBalance; + return this; + } - public Builder newBalance(String newBalance) { - this.newBalance = newBalance; - return this; - } + public Builder newBalance(String newBalance) { + this.newBalance = newBalance; + return this; + } - public Builder loanInterestRate(String loanInterestRate) { - this.loanInterestRate = loanInterestRate; - return this; - } + public Builder loanInterestRate(String loanInterestRate) { + this.loanInterestRate = loanInterestRate; + return this; + } - public Builder collateralInterestRate(String collateralInterestRate) { - this.collateralInterestRate = collateralInterestRate; - return this; - } + public Builder collateralInterestRate(String collateralInterestRate) { + this.collateralInterestRate = collateralInterestRate; + return this; + } - public ShortCollateral build() { - return new ShortCollateral(this); + public ShortCollateral build() { + return new ShortCollateral(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/StakingStatus.java b/src/main/java/com/coinbase/prime/model/StakingStatus.java index 9b0fff8..3ed5451 100644 --- a/src/main/java/com/coinbase/prime/model/StakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/StakingStatus.java @@ -17,118 +17,121 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.StakeType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class StakingStatus { - /** Amount being staked (whole amount, e.g., 16 ETH) */ - private String amount; - - @JsonProperty("stake_type") - private StakeType stakeType; - - /** Estimated date when staking will complete (ISO 8601 format) */ - @JsonProperty("estimated_stake_date") - private OffsetDateTime estimatedStakeDate; - - /** Estimated hours until this staking request completes */ - @JsonProperty("estimated_hours_to_stake") - private Long estimatedHoursToStake; - - /** Timestamp when the stake request was originally created */ - @JsonProperty("requested_at") - private OffsetDateTime requestedAt; - - public StakingStatus() {} - - public StakingStatus(Builder builder) { - this.amount = builder.amount; - this.stakeType = builder.stakeType; - this.estimatedStakeDate = builder.estimatedStakeDate; - this.estimatedHoursToStake = builder.estimatedHoursToStake; - this.requestedAt = builder.requestedAt; - } + /** + * Amount being staked (whole amount, e.g., 16 ETH) + */ + private String amount; - public String getAmount() { - return amount; - } + @JsonProperty("stake_type") + private StakeType stakeType; - public void setAmount(String amount) { - this.amount = amount; - } + /** + * Estimated date when staking will complete (ISO 8601 format) + */ + @JsonProperty("estimated_stake_date") + private OffsetDateTime estimatedStakeDate; - public StakeType getStakeType() { - return stakeType; - } + /** + * Estimated hours until this staking request completes + */ + @JsonProperty("estimated_hours_to_stake") + private Long estimatedHoursToStake; - public void setStakeType(StakeType stakeType) { - this.stakeType = stakeType; - } + /** + * Timestamp when the stake request was originally created + */ + @JsonProperty("requested_at") + private OffsetDateTime requestedAt; - public OffsetDateTime getEstimatedStakeDate() { - return estimatedStakeDate; - } + public StakingStatus() { + } - public void setEstimatedStakeDate(OffsetDateTime estimatedStakeDate) { - this.estimatedStakeDate = estimatedStakeDate; - } + public StakingStatus(Builder builder) { + this.amount = builder.amount; + this.stakeType = builder.stakeType; + this.estimatedStakeDate = builder.estimatedStakeDate; + this.estimatedHoursToStake = builder.estimatedHoursToStake; + this.requestedAt = builder.requestedAt; + } + public String getAmount() { + return amount; + } - public Long getEstimatedHoursToStake() { - return estimatedHoursToStake; - } + public void setAmount(String amount) { + this.amount = amount; + } + public StakeType getStakeType() { + return stakeType; + } - public void setEstimatedHoursToStake(Long estimatedHoursToStake) { - this.estimatedHoursToStake = estimatedHoursToStake; - } + public void setStakeType(StakeType stakeType) { + this.stakeType = stakeType; + } + public OffsetDateTime getEstimatedStakeDate() { + return estimatedStakeDate; + } - public OffsetDateTime getRequestedAt() { - return requestedAt; - } + public void setEstimatedStakeDate(OffsetDateTime estimatedStakeDate) { + this.estimatedStakeDate = estimatedStakeDate; + } + public Long getEstimatedHoursToStake() { + return estimatedHoursToStake; + } - public void setRequestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - } + public void setEstimatedHoursToStake(Long estimatedHoursToStake) { + this.estimatedHoursToStake = estimatedHoursToStake; + } + public OffsetDateTime getRequestedAt() { + return requestedAt; + } - public static class Builder { - private String amount; + public void setRequestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + } + public static class Builder { + private String amount; - private StakeType stakeType; + private StakeType stakeType; - private OffsetDateTime estimatedStakeDate; + private OffsetDateTime estimatedStakeDate; - private Long estimatedHoursToStake; + private Long estimatedHoursToStake; - private OffsetDateTime requestedAt; + private OffsetDateTime requestedAt; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder stakeType(StakeType stakeType) { - this.stakeType = stakeType; - return this; - } + public Builder stakeType(StakeType stakeType) { + this.stakeType = stakeType; + return this; + } - public Builder estimatedStakeDate(OffsetDateTime estimatedStakeDate) { - this.estimatedStakeDate = estimatedStakeDate; - return this; - } + public Builder estimatedStakeDate(OffsetDateTime estimatedStakeDate) { + this.estimatedStakeDate = estimatedStakeDate; + return this; + } - public Builder estimatedHoursToStake(Long estimatedHoursToStake) { - this.estimatedHoursToStake = estimatedHoursToStake; - return this; - } + public Builder estimatedHoursToStake(Long estimatedHoursToStake) { + this.estimatedHoursToStake = estimatedHoursToStake; + return this; + } - public Builder requestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - return this; - } + public Builder requestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + return this; + } - public StakingStatus build() { - return new StakingStatus(this); + public StakingStatus build() { + return new StakingStatus(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/SweepAmount.java b/src/main/java/com/coinbase/prime/model/SweepAmount.java index 9616df6..1d9b87b 100644 --- a/src/main/java/com/coinbase/prime/model/SweepAmount.java +++ b/src/main/java/com/coinbase/prime/model/SweepAmount.java @@ -19,52 +19,55 @@ package com.coinbase.prime.model; public class SweepAmount { - /** Currency */ - private String currency; - - /** Amount */ - private String amount; - - public SweepAmount() {} - - public SweepAmount(Builder builder) { - this.currency = builder.currency; - this.amount = builder.amount; - } + /** + * Currency + */ + private String currency; - public String getCurrency() { - return currency; - } + /** + * Amount + */ + private String amount; - public void setCurrency(String currency) { - this.currency = currency; - } + public SweepAmount() { + } - public String getAmount() { - return amount; - } + public SweepAmount(Builder builder) { + this.currency = builder.currency; + this.amount = builder.amount; + } + public String getCurrency() { + return currency; + } - public void setAmount(String amount) { - this.amount = amount; - } + public void setCurrency(String currency) { + this.currency = currency; + } + public String getAmount() { + return amount; + } - public static class Builder { - private String currency; + public void setAmount(String amount) { + this.amount = amount; + } + public static class Builder { + private String currency; - private String amount; + private String amount; - public Builder currency(String currency) { - this.currency = currency; - return this; - } + public Builder currency(String currency) { + this.currency = currency; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public SweepAmount build() { - return new SweepAmount(this); + public SweepAmount build() { + return new SweepAmount(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TfAsset.java b/src/main/java/com/coinbase/prime/model/TfAsset.java index 2cd8de5..507aafe 100644 --- a/src/main/java/com/coinbase/prime/model/TfAsset.java +++ b/src/main/java/com/coinbase/prime/model/TfAsset.java @@ -17,78 +17,81 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** TFAsset represents an asset eligible for Trade Finance with adjustment factors */ public class TfAsset { - /** The asset symbol */ - private String symbol; - - /** The asset adjustment factor for Trade Finance */ - @JsonProperty("asset_adjustment") - private String assetAdjustment; - - /** The liability adjustment factor for Trade Finance */ - @JsonProperty("liability_adjustment") - private String liabilityAdjustment; - - public TfAsset() {} - - public TfAsset(Builder builder) { - this.symbol = builder.symbol; - this.assetAdjustment = builder.assetAdjustment; - this.liabilityAdjustment = builder.liabilityAdjustment; - } + /** + * The asset symbol + */ + private String symbol; - public String getSymbol() { - return symbol; - } + /** + * The asset adjustment factor for Trade Finance + */ + @JsonProperty("asset_adjustment") + private String assetAdjustment; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * The liability adjustment factor for Trade Finance + */ + @JsonProperty("liability_adjustment") + private String liabilityAdjustment; - public String getAssetAdjustment() { - return assetAdjustment; - } + public TfAsset() { + } - public void setAssetAdjustment(String assetAdjustment) { - this.assetAdjustment = assetAdjustment; - } + public TfAsset(Builder builder) { + this.symbol = builder.symbol; + this.assetAdjustment = builder.assetAdjustment; + this.liabilityAdjustment = builder.liabilityAdjustment; + } + public String getSymbol() { + return symbol; + } - public String getLiabilityAdjustment() { - return liabilityAdjustment; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getAssetAdjustment() { + return assetAdjustment; + } - public void setLiabilityAdjustment(String liabilityAdjustment) { - this.liabilityAdjustment = liabilityAdjustment; - } + public void setAssetAdjustment(String assetAdjustment) { + this.assetAdjustment = assetAdjustment; + } + public String getLiabilityAdjustment() { + return liabilityAdjustment; + } - public static class Builder { - private String symbol; + public void setLiabilityAdjustment(String liabilityAdjustment) { + this.liabilityAdjustment = liabilityAdjustment; + } + public static class Builder { + private String symbol; - private String assetAdjustment; + private String assetAdjustment; - private String liabilityAdjustment; + private String liabilityAdjustment; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder assetAdjustment(String assetAdjustment) { - this.assetAdjustment = assetAdjustment; - return this; - } + public Builder assetAdjustment(String assetAdjustment) { + this.assetAdjustment = assetAdjustment; + return this; + } - public Builder liabilityAdjustment(String liabilityAdjustment) { - this.liabilityAdjustment = liabilityAdjustment; - return this; - } + public Builder liabilityAdjustment(String liabilityAdjustment) { + this.liabilityAdjustment = liabilityAdjustment; + return this; + } - public TfAsset build() { - return new TfAsset(this); + public TfAsset build() { + return new TfAsset(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TfObligation.java b/src/main/java/com/coinbase/prime/model/TfObligation.java index 4ccb1c4..73fa872 100644 --- a/src/main/java/com/coinbase/prime/model/TfObligation.java +++ b/src/main/java/com/coinbase/prime/model/TfObligation.java @@ -17,118 +17,123 @@ */ package com.coinbase.prime.model; - 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 */ - private String symbol; - - /** Current amount due */ - @JsonProperty("amount_due") - private String amountDue; - - /** Loan notional amount */ - @JsonProperty("notional_amount") - private String notionalAmount; - - /** Settlement due date */ - @JsonProperty("due_date") - private String dueDate; - - public TfObligation() {} - - public TfObligation(Builder builder) { - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.amountDue = builder.amountDue; - this.notionalAmount = builder.notionalAmount; - this.dueDate = builder.dueDate; - } + /** + * The unique ID of the portfolio + */ + @JsonProperty("portfolio_id") + private String portfolioId; - public String getPortfolioId() { - return portfolioId; - } + /** + * The currency symbol + */ + private String symbol; - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } + /** + * Current amount due + */ + @JsonProperty("amount_due") + private String amountDue; - public String getSymbol() { - return symbol; - } + /** + * Loan notional amount + */ + @JsonProperty("notional_amount") + private String notionalAmount; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + /** + * Settlement due date + */ + @JsonProperty("due_date") + private String dueDate; - public String getAmountDue() { - return amountDue; - } + public TfObligation() { + } - public void setAmountDue(String amountDue) { - this.amountDue = amountDue; - } + public TfObligation(Builder builder) { + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.amountDue = builder.amountDue; + this.notionalAmount = builder.notionalAmount; + this.dueDate = builder.dueDate; + } + public String getPortfolioId() { + return portfolioId; + } - public String getNotionalAmount() { - return notionalAmount; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public String getSymbol() { + return symbol; + } - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getAmountDue() { + return amountDue; + } - public String getDueDate() { - return dueDate; - } + public void setAmountDue(String amountDue) { + this.amountDue = amountDue; + } + public String getNotionalAmount() { + return notionalAmount; + } - public void setDueDate(String dueDate) { - this.dueDate = dueDate; - } + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } + public String getDueDate() { + return dueDate; + } - public static class Builder { - private String portfolioId; + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + public static class Builder { + private String portfolioId; - private String symbol; + private String symbol; - private String amountDue; + private String amountDue; - private String notionalAmount; + private String notionalAmount; - private String dueDate; + private String dueDate; - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder amountDue(String amountDue) { - this.amountDue = amountDue; - return this; - } + public Builder amountDue(String amountDue) { + this.amountDue = amountDue; + return this; + } - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; - } + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; + } - public Builder dueDate(String dueDate) { - this.dueDate = dueDate; - return this; - } + public Builder dueDate(String dueDate) { + this.dueDate = dueDate; + return this; + } - public TfObligation build() { - return new TfObligation(this); + public TfObligation build() { + return new TfObligation(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java index eb33282..e18b0f4 100644 --- a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java +++ b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java @@ -17,80 +17,81 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; -/** - * 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. */ - @JsonProperty("tier_a") - private String tierA; - - /** Second tier in the pair. */ - @JsonProperty("tier_b") - private String tierB; - - /** Credit rate for this tier pair. */ - private String rate; - - public TierPairRateEntry() {} - - public TierPairRateEntry(Builder builder) { - this.tierA = builder.tierA; - this.tierB = builder.tierB; - this.rate = builder.rate; - } + /** + * First tier in the pair. + */ + @JsonProperty("tier_a") + private String tierA; - public String getTierA() { - return tierA; - } + /** + * Second tier in the pair. + */ + @JsonProperty("tier_b") + private String tierB; - public void setTierA(String tierA) { - this.tierA = tierA; - } + /** + * Credit rate for this tier pair. + */ + private String rate; - public String getTierB() { - return tierB; - } + public TierPairRateEntry() { + } - public void setTierB(String tierB) { - this.tierB = tierB; - } + public TierPairRateEntry(Builder builder) { + this.tierA = builder.tierA; + this.tierB = builder.tierB; + this.rate = builder.rate; + } + public String getTierA() { + return tierA; + } - public String getRate() { - return rate; - } + public void setTierA(String tierA) { + this.tierA = tierA; + } + public String getTierB() { + return tierB; + } - public void setRate(String rate) { - this.rate = rate; - } + public void setTierB(String tierB) { + this.tierB = tierB; + } + public String getRate() { + return rate; + } - public static class Builder { - private String tierA; + public void setRate(String rate) { + this.rate = rate; + } + public static class Builder { + private String tierA; - private String tierB; + private String tierB; - private String rate; + private String rate; - public Builder tierA(String tierA) { - this.tierA = tierA; - return this; - } + public Builder tierA(String tierA) { + this.tierA = tierA; + return this; + } - public Builder tierB(String tierB) { - this.tierB = tierB; - return this; - } + public Builder tierB(String tierB) { + this.tierB = tierB; + return this; + } - public Builder rate(String rate) { - this.rate = rate; - return this; - } + public Builder rate(String rate) { + this.rate = rate; + return this; + } - public TierPairRateEntry build() { - return new TierPairRateEntry(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 f8ad16a..7ea7387 100644 --- a/src/main/java/com/coinbase/prime/model/TieredPricingFee.java +++ b/src/main/java/com/coinbase/prime/model/TieredPricingFee.java @@ -19,52 +19,55 @@ package com.coinbase.prime.model; public class TieredPricingFee { - /** Asset symbol */ - private String symbol; - - /** The fee in bps */ - private String fee; - - public TieredPricingFee() {} - - public TieredPricingFee(Builder builder) { - this.symbol = builder.symbol; - this.fee = builder.fee; - } + /** + * Asset symbol + */ + private String symbol; - public String getSymbol() { - return symbol; - } + /** + * The fee in bps + */ + private String fee; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + public TieredPricingFee() { + } - public String getFee() { - return fee; - } + public TieredPricingFee(Builder builder) { + this.symbol = builder.symbol; + this.fee = builder.fee; + } + public String getSymbol() { + return symbol; + } - public void setFee(String fee) { - this.fee = fee; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getFee() { + return fee; + } - public static class Builder { - private String symbol; + public void setFee(String fee) { + this.fee = fee; + } + public static class Builder { + private String symbol; - private String fee; + private String fee; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder fee(String fee) { - this.fee = fee; - return this; - } + public Builder fee(String fee) { + this.fee = fee; + return this; + } - public TieredPricingFee build() { - return new TieredPricingFee(this); + public TieredPricingFee build() { + return new TieredPricingFee(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Transaction.java b/src/main/java/com/coinbase/prime/model/Transaction.java index 01d8cd4..ed19072 100644 --- a/src/main/java/com/coinbase/prime/model/Transaction.java +++ b/src/main/java/com/coinbase/prime/model/Transaction.java @@ -17,567 +17,604 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.AssetChange; +import com.coinbase.prime.model.EstimatedNetworkFees; +import com.coinbase.prime.model.Network; +import com.coinbase.prime.model.OnchainTransactionDetails; +import com.coinbase.prime.model.ProcessRequirements; +import com.coinbase.prime.model.TransactionMetadata; import com.coinbase.prime.model.enums.TransactionStatus; import com.coinbase.prime.model.enums.TransactionType; +import com.coinbase.prime.model.TransferLocation; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; public class Transaction { - /** The ID of the transaction */ - private String id; - - /** The wallet ID of the transaction */ - @JsonProperty("wallet_id") - private String walletId; - - /** The portfolio ID of the transaction */ - @JsonProperty("portfolio_id") - private String portfolioId; - - /** - * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type - DEPOSIT: A fiat or crypto deposit - - * WITHDRAWAL: A fiat or crypto withdrawal - INTERNAL_DEPOSIT: An internal fiat or crypto deposit - * - INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal - SWEEP_DEPOSIT: Internal - * automated deposit to a cold address from a restored address - SWEEP_WITHDRAWAL: Internal - * automated withdrawal from a restored address to a cold address - PROXY_DEPOSIT: On-chain - * deposit of funds into proxy contract from cold address - PROXY_WITHDRAWAL: On-chain withdrawal - * of funds from proxy contract to cold address - BILLING_WITHDRAWAL: Coinbase Prime automated - * invoice settlement payment - REWARD: Reward payment to an associated address for a staked asset - * - COINBASE_REFUND: Coinbase Prime refund for the leftover amount for a CPFP (child pays for - * parent) transaction - TRANSACTION_TYPE_OTHER: An OTHER type of transaction - - * WITHDRAWAL_ADJUSTMENT: A manual adjustment withdrawal transaction - DEPOSIT_ADJUSTMENT: A - * manual adjustment deposit transaction - KEY_REGISTRATION: An on-chain registration for an - * address - DELEGATION: An on-chain delegation transaction - UNDELEGATION: An on-chain - * undelegation transaction - RESTAKE: On-chain restaking transaction - COMPLETE_UNBONDING: - * On-chain unbonding event transaction - WITHDRAW_UNBONDED: On-chain event indicating unbonding - * period is over - STAKE_ACCOUNT_CREATE: On-chain transaction to begin staking from an address - - * CHANGE_VALIDATOR: On-chain transaction alter validator - STAKE: On-chain transaction to begin - * staking in Cryptocurrency network - UNSTAKE: On-chain transaction to stop staking in - * Cryptocurrency network - REMOVE_AUTHORIZED_PARTY: On-chain transaction to remove a party from a - * multi-signature wallet - STAKE_AUTHORIZE_WITH_SEED: On-chain transaction to begin staking from - * a seed account - SLASH: On-chain transaction indicating a slash event has occurred - - * COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of transaction operations - - * CONVERSION: Internal conversion between two assets - CLAIM_REWARDS: On-chain transaction to - * claim rewards from Vote Account - VOTE_AUTHORIZE: On-chain transaction to transfer the reward - * claiming permission to other pubkey - WEB3_TRANSACTION: On-chain transaction initiated with - * Prime Onchain Wallet Deprecated: Use ONCHAIN_TRANSACTION instead - ONCHAIN_TRANSACTION: - * On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: Portfolio-level - * staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation - */ - private TransactionType type; - - /** - * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status - TRANSACTION_CREATED: The - * Transaction has been created and is awaiting Consensus approval This is a non-terminal status - - * TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase - * Prime approval This is a non-terminal status - TRANSACTION_APPROVED: The Transaction has been - * authorized by Coinbase Prime This is a non-terminal status - TRANSACTION_GASSING: The - * transaction is awaiting blockchain resources for broadcast This is a non-terminal status - - * TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting This is - * a non-terminal status - TRANSACTION_PROVISIONED: The transaction has been provisioned and is - * awaiting planning This is a non-terminal status - TRANSACTION_PLANNED: The transaction has been - * constructed. This is a non-terminal status - TRANSACTION_PROCESSING: The transaction is - * currently processing and awaiting finalization This is a non-terminal status - - * TRANSACTION_RESTORED: The transaction has been broadcasted to the network. This is a - * non-terminal status - TRANSACTION_DONE: The transaction has confirmed on-chain and finished. - * This is a terminal status - TRANSACTION_IMPORT_PENDING: The transaction deposit has been - * detected and is awaiting finalization. This is a non-terminal status - TRANSACTION_IMPORTED: - * The transaction deposit and reward has been detected. This is a terminal status - - * TRANSACTION_CANCELLED: The transaction has been cancelled This is a terminal status - - * TRANSACTION_REJECTED: The transaction was rejected before construction and broadcasting. This - * is a terminal status - TRANSACTION_DELAYED: The transaction s taking longer than expected to - * confirm on-chain. This is a non-terminal status - TRANSACTION_RETRIED: The transaction has been - * recreated and retried, this occurs when network congestion results in transfers becoming - * extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET This - * is a terminal status - TRANSACTION_FAILED: The transaction failed on-chain (the fee was spent - * but the operation failed). This is a terminal status - TRANSACTION_EXPIRED: The transaction has - * expired. This is a terminal status - TRANSACTION_BROADCASTING: The transaction is currently - * broadcasting to the cryptocurrency network. This is a non-terminal status - - * OTHER_TRANSACTION_STATUS: The transaction has reached an OTHER status. This is a non-terminal - * status - TRANSACTION_CONSTRUCTED: The transaction bctx is constructed but not yet broadcasting - * on chain This is a non-terminal status - */ - private TransactionStatus status; - - /** The asset symbol */ - private String symbol; - - /** The transaction creation time (as a UTC timestamp) */ - @JsonProperty("created_at") - private OffsetDateTime createdAt; - - /** The transaction completion time (as a UTC timestamp) */ - @JsonProperty("completed_at") - private OffsetDateTime completedAt; - - /** The transaction amount in whole units */ - private String amount; - - @JsonProperty("transfer_from") - private TransferLocation transferFrom; - - @JsonProperty("transfer_to") - private TransferLocation transferTo; - - /** The blockchain network fees (in whole units) required in order to broadcast the transaction */ - @JsonProperty("network_fees") - private String networkFees; - - /** The fees that the customer paid for the transaction (in whole units) */ - private String fees; - - /** The asset in which fees will be paid */ - @JsonProperty("fee_symbol") - private String feeSymbol; - - /** The cryptocurrency network transaction hashes/IDs generated upon broadcast */ - @JsonProperty("blockchain_ids") - private List blockchainIds; - - /** The 8 character alphanumeric short form id for the transaction */ - @JsonProperty("transaction_id") - private String transactionId; - - /** The destination asset symbol */ - @JsonProperty("destination_symbol") - private String destinationSymbol; - - @JsonProperty("estimated_network_fees") - private EstimatedNetworkFees estimatedNetworkFees; - - /** The network name specific to onchain/onchain wallet transactions */ - private String network; - - /** The estimated asset changes (onchain) */ - @JsonProperty("estimated_asset_changes") - private List estimatedAssetChanges; - - private TransactionMetadata metadata; - - /** The idempotency key associated with the transaction creation request */ - @JsonProperty("idempotency_key") - private String idempotencyKey; - - @JsonProperty("web3_details") - private OnchainTransactionDetails onchainDetails; - - @JsonProperty("network_info") - private Network networkInfo; - - /** Represents the status of various process requirements for a transaction */ - @JsonProperty("process_requirements") - private ProcessRequirements processRequirements; - - public Transaction() {} - - public Transaction(Builder builder) { - this.id = builder.id; - this.walletId = builder.walletId; - this.portfolioId = builder.portfolioId; - this.type = builder.type; - this.status = builder.status; - this.symbol = builder.symbol; - this.createdAt = builder.createdAt; - this.completedAt = builder.completedAt; - this.amount = builder.amount; - this.transferFrom = builder.transferFrom; - this.transferTo = builder.transferTo; - this.networkFees = builder.networkFees; - this.fees = builder.fees; - this.feeSymbol = builder.feeSymbol; - this.blockchainIds = builder.blockchainIds; - this.transactionId = builder.transactionId; - this.destinationSymbol = builder.destinationSymbol; - this.estimatedNetworkFees = builder.estimatedNetworkFees; - this.network = builder.network; - this.estimatedAssetChanges = builder.estimatedAssetChanges; - this.metadata = builder.metadata; - this.idempotencyKey = builder.idempotencyKey; - this.onchainDetails = builder.onchainDetails; - this.networkInfo = builder.networkInfo; - this.processRequirements = builder.processRequirements; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getWalletId() { - return walletId; - } - - public void setWalletId(String walletId) { - this.walletId = walletId; - } - - public String getPortfolioId() { - return portfolioId; - } - - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - - public TransactionType getType() { - return type; - } - - public void setType(TransactionType type) { - this.type = type; - } - - public TransactionStatus getStatus() { - return status; - } - - public void setStatus(TransactionStatus status) { - this.status = status; - } - - public String getSymbol() { - return symbol; - } - - public void setSymbol(String symbol) { - this.symbol = symbol; - } - - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public OffsetDateTime getCompletedAt() { - return completedAt; - } - - public void setCompletedAt(OffsetDateTime completedAt) { - this.completedAt = completedAt; - } - - public String getAmount() { - return amount; - } - - public void setAmount(String amount) { - this.amount = amount; - } - - public TransferLocation getTransferFrom() { - return transferFrom; - } - - public void setTransferFrom(TransferLocation transferFrom) { - this.transferFrom = transferFrom; - } - - public TransferLocation getTransferTo() { - return transferTo; - } - - public void setTransferTo(TransferLocation transferTo) { - this.transferTo = transferTo; - } - - public String getNetworkFees() { - return networkFees; - } - - public void setNetworkFees(String networkFees) { - this.networkFees = networkFees; - } - - public String getFees() { - return fees; - } - - public void setFees(String fees) { - this.fees = fees; - } - - public String getFeeSymbol() { - return feeSymbol; - } - - public void setFeeSymbol(String feeSymbol) { - this.feeSymbol = feeSymbol; - } - - public List getBlockchainIds() { - return blockchainIds; - } - - public void setBlockchainIds(List blockchainIds) { - this.blockchainIds = blockchainIds; - } - - public String getTransactionId() { - return transactionId; - } - - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } - - public String getDestinationSymbol() { - return destinationSymbol; - } - - public void setDestinationSymbol(String destinationSymbol) { - this.destinationSymbol = destinationSymbol; - } - - public EstimatedNetworkFees getEstimatedNetworkFees() { - return estimatedNetworkFees; - } - - public void setEstimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { - this.estimatedNetworkFees = estimatedNetworkFees; - } - - public String getNetwork() { - return network; - } - - public void setNetwork(String network) { - this.network = network; - } - - public List getEstimatedAssetChanges() { - return estimatedAssetChanges; - } - - public void setEstimatedAssetChanges(List estimatedAssetChanges) { - this.estimatedAssetChanges = estimatedAssetChanges; - } - - public TransactionMetadata getMetadata() { - return metadata; - } - - public void setMetadata(TransactionMetadata metadata) { - this.metadata = metadata; - } - - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - - public OnchainTransactionDetails getOnchainDetails() { - return onchainDetails; - } - - public void setOnchainDetails(OnchainTransactionDetails onchainDetails) { - this.onchainDetails = onchainDetails; - } - - public Network getNetworkInfo() { - return networkInfo; - } - - public void setNetworkInfo(Network networkInfo) { - this.networkInfo = networkInfo; - } - - public ProcessRequirements getProcessRequirements() { - return processRequirements; - } - - public void setProcessRequirements(ProcessRequirements processRequirements) { - this.processRequirements = processRequirements; - } - - public static class Builder { + /** + * The ID of the transaction + */ private String id; + /** + * The wallet ID of the transaction + */ + @JsonProperty("wallet_id") private String walletId; + /** + * The portfolio ID of the transaction + */ + @JsonProperty("portfolio_id") private String portfolioId; + /** + * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type + * - DEPOSIT: A fiat or crypto deposit + * - WITHDRAWAL: A fiat or crypto withdrawal + * - INTERNAL_DEPOSIT: An internal fiat or crypto deposit + * - INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal + * - SWEEP_DEPOSIT: Internal automated deposit to a cold address from a restored address + * - SWEEP_WITHDRAWAL: Internal automated withdrawal from a restored address to a cold address + * - PROXY_DEPOSIT: On-chain deposit of funds into proxy contract from cold address + * - PROXY_WITHDRAWAL: On-chain withdrawal of funds from proxy contract to cold address + * - BILLING_WITHDRAWAL: Coinbase Prime automated invoice settlement payment + * - REWARD: Reward payment to an associated address for a staked asset + * - COINBASE_REFUND: Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction + * - TRANSACTION_TYPE_OTHER: An OTHER type of transaction + * - WITHDRAWAL_ADJUSTMENT: A manual adjustment withdrawal transaction + * - DEPOSIT_ADJUSTMENT: A manual adjustment deposit transaction + * - KEY_REGISTRATION: An on-chain registration for an address + * - DELEGATION: An on-chain delegation transaction + * - UNDELEGATION: An on-chain undelegation transaction + * - RESTAKE: On-chain restaking transaction + * - COMPLETE_UNBONDING: On-chain unbonding event transaction + * - WITHDRAW_UNBONDED: On-chain event indicating unbonding period is over + * - STAKE_ACCOUNT_CREATE: On-chain transaction to begin staking from an address + * - CHANGE_VALIDATOR: On-chain transaction alter validator + * - STAKE: On-chain transaction to begin staking in Cryptocurrency network + * - UNSTAKE: On-chain transaction to stop staking in Cryptocurrency network + * - REMOVE_AUTHORIZED_PARTY: On-chain transaction to remove a party from a multi-signature wallet + * - STAKE_AUTHORIZE_WITH_SEED: On-chain transaction to begin staking from a seed account + * - SLASH: On-chain transaction indicating a slash event has occurred + * - COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of transaction operations + * - CONVERSION: Internal conversion between two assets + * - CLAIM_REWARDS: On-chain transaction to claim rewards from Vote Account + * - VOTE_AUTHORIZE: On-chain transaction to transfer the reward claiming permission to other pubkey + * - WEB3_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet + * Deprecated: Use ONCHAIN_TRANSACTION instead + * - ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet + * - PORTFOLIO_STAKE: Portfolio-level staking operation + * - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation + */ private TransactionType type; + /** + * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status + * - TRANSACTION_CREATED: The Transaction has been created and is awaiting Consensus approval + * This is a non-terminal status + * - TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase Prime approval + * This is a non-terminal status + * - TRANSACTION_APPROVED: The Transaction has been authorized by Coinbase Prime + * This is a non-terminal status + * - TRANSACTION_GASSING: The transaction is awaiting blockchain resources for broadcast + * This is a non-terminal status + * - TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting + * This is a non-terminal status + * - TRANSACTION_PROVISIONED: The transaction has been provisioned and is awaiting planning + * This is a non-terminal status + * - TRANSACTION_PLANNED: The transaction has been constructed. + * This is a non-terminal status + * - TRANSACTION_PROCESSING: The transaction is currently processing and awaiting finalization + * This is a non-terminal status + * - TRANSACTION_RESTORED: The transaction has been broadcasted to the network. + * This is a non-terminal status + * - TRANSACTION_DONE: The transaction has confirmed on-chain and finished. + * This is a terminal status + * - TRANSACTION_IMPORT_PENDING: The transaction deposit has been detected and is awaiting finalization. + * This is a non-terminal status + * - TRANSACTION_IMPORTED: The transaction deposit and reward has been detected. + * This is a terminal status + * - TRANSACTION_CANCELLED: The transaction has been cancelled + * This is a terminal status + * - TRANSACTION_REJECTED: The transaction was rejected before construction and broadcasting. + * This is a terminal status + * - TRANSACTION_DELAYED: The transaction s taking longer than expected to confirm on-chain. + * This is a non-terminal status + * - TRANSACTION_RETRIED: The transaction has been recreated and retried, this occurs when network congestion results in transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET + * This is a terminal status + * - TRANSACTION_FAILED: The transaction failed on-chain (the fee was spent but the operation failed). + * This is a terminal status + * - TRANSACTION_EXPIRED: The transaction has expired. + * This is a terminal status + * - TRANSACTION_BROADCASTING: The transaction is currently broadcasting to the cryptocurrency network. + * This is a non-terminal status + * - OTHER_TRANSACTION_STATUS: The transaction has reached an OTHER status. + * This is a non-terminal status + * - TRANSACTION_CONSTRUCTED: The transaction bctx is constructed but not yet broadcasting on chain + * This is a non-terminal status + */ private TransactionStatus status; + /** + * The asset symbol + */ private String symbol; + /** + * The transaction creation time (as a UTC timestamp) + */ + @JsonProperty("created_at") private OffsetDateTime createdAt; + /** + * The transaction completion time (as a UTC timestamp) + */ + @JsonProperty("completed_at") private OffsetDateTime completedAt; + /** + * The transaction amount in whole units + */ private String amount; + @JsonProperty("transfer_from") private TransferLocation transferFrom; + @JsonProperty("transfer_to") private TransferLocation transferTo; + /** + * The blockchain network fees (in whole units) required in order to broadcast the transaction + */ + @JsonProperty("network_fees") private String networkFees; + /** + * The fees that the customer paid for the transaction (in whole units) + */ private String fees; + /** + * The asset in which fees will be paid + */ + @JsonProperty("fee_symbol") private String feeSymbol; + /** + * The cryptocurrency network transaction hashes/IDs generated upon broadcast + */ + @JsonProperty("blockchain_ids") private List blockchainIds; + /** + * The 8 character alphanumeric short form id for the transaction + */ + @JsonProperty("transaction_id") private String transactionId; + /** + * The destination asset symbol + */ + @JsonProperty("destination_symbol") private String destinationSymbol; + @JsonProperty("estimated_network_fees") private EstimatedNetworkFees estimatedNetworkFees; + /** + * The network name specific to onchain/onchain wallet transactions + */ private String network; + /** + * The estimated asset changes (onchain) + */ + @JsonProperty("estimated_asset_changes") private List estimatedAssetChanges; private TransactionMetadata metadata; + /** + * The idempotency key associated with the transaction creation request + */ + @JsonProperty("idempotency_key") private String idempotencyKey; + @JsonProperty("web3_details") private OnchainTransactionDetails onchainDetails; + @JsonProperty("network_info") private Network networkInfo; + /** Represents the status of various process requirements for a transaction */ + @JsonProperty("process_requirements") private ProcessRequirements processRequirements; - public Builder id(String id) { - this.id = id; - return this; + public Transaction() { } - public Builder walletId(String walletId) { - this.walletId = walletId; - return this; + public Transaction(Builder builder) { + this.id = builder.id; + this.walletId = builder.walletId; + this.portfolioId = builder.portfolioId; + this.type = builder.type; + this.status = builder.status; + this.symbol = builder.symbol; + this.createdAt = builder.createdAt; + this.completedAt = builder.completedAt; + this.amount = builder.amount; + this.transferFrom = builder.transferFrom; + this.transferTo = builder.transferTo; + this.networkFees = builder.networkFees; + this.fees = builder.fees; + this.feeSymbol = builder.feeSymbol; + this.blockchainIds = builder.blockchainIds; + this.transactionId = builder.transactionId; + this.destinationSymbol = builder.destinationSymbol; + this.estimatedNetworkFees = builder.estimatedNetworkFees; + this.network = builder.network; + this.estimatedAssetChanges = builder.estimatedAssetChanges; + this.metadata = builder.metadata; + this.idempotencyKey = builder.idempotencyKey; + this.onchainDetails = builder.onchainDetails; + this.networkInfo = builder.networkInfo; + this.processRequirements = builder.processRequirements; + } + public String getId() { + return id; } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; + public void setId(String id) { + this.id = id; + } + public String getWalletId() { + return walletId; } - public Builder type(TransactionType type) { - this.type = type; - return this; + public void setWalletId(String walletId) { + this.walletId = walletId; + } + public String getPortfolioId() { + return portfolioId; } - public Builder status(TransactionStatus status) { - this.status = status; - return this; + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + public TransactionType getType() { + return type; } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; + public void setType(TransactionType type) { + this.type = type; + } + public TransactionStatus getStatus() { + return status; } - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; + public void setStatus(TransactionStatus status) { + this.status = status; + } + public String getSymbol() { + return symbol; } - public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = completedAt; - return this; + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public OffsetDateTime getCreatedAt() { + return createdAt; } - public Builder amount(String amount) { - this.amount = amount; - return this; + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + public OffsetDateTime getCompletedAt() { + return completedAt; } - public Builder transferFrom(TransferLocation transferFrom) { - this.transferFrom = transferFrom; - return this; + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = completedAt; + } + public String getAmount() { + return amount; } - public Builder transferTo(TransferLocation transferTo) { - this.transferTo = transferTo; - return this; + public void setAmount(String amount) { + this.amount = amount; + } + public TransferLocation getTransferFrom() { + return transferFrom; } - public Builder networkFees(String networkFees) { - this.networkFees = networkFees; - return this; + public void setTransferFrom(TransferLocation transferFrom) { + this.transferFrom = transferFrom; + } + public TransferLocation getTransferTo() { + return transferTo; } - public Builder fees(String fees) { - this.fees = fees; - return this; + public void setTransferTo(TransferLocation transferTo) { + this.transferTo = transferTo; + } + public String getNetworkFees() { + return networkFees; } - public Builder feeSymbol(String feeSymbol) { - this.feeSymbol = feeSymbol; - return this; + public void setNetworkFees(String networkFees) { + this.networkFees = networkFees; + } + public String getFees() { + return fees; } - public Builder blockchainIds(List blockchainIds) { - this.blockchainIds = blockchainIds; - return this; + public void setFees(String fees) { + this.fees = fees; + } + public String getFeeSymbol() { + return feeSymbol; } - public Builder transactionId(String transactionId) { - this.transactionId = transactionId; - return this; + public void setFeeSymbol(String feeSymbol) { + this.feeSymbol = feeSymbol; + } + public List getBlockchainIds() { + return blockchainIds; } - public Builder destinationSymbol(String destinationSymbol) { - this.destinationSymbol = destinationSymbol; - return this; + public void setBlockchainIds(List blockchainIds) { + this.blockchainIds = blockchainIds; + } + public String getTransactionId() { + return transactionId; } - public Builder estimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { - this.estimatedNetworkFees = estimatedNetworkFees; - return this; + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + public String getDestinationSymbol() { + return destinationSymbol; } - public Builder network(String network) { - this.network = network; - return this; + public void setDestinationSymbol(String destinationSymbol) { + this.destinationSymbol = destinationSymbol; + } + public EstimatedNetworkFees getEstimatedNetworkFees() { + return estimatedNetworkFees; } - public Builder estimatedAssetChanges(List estimatedAssetChanges) { - this.estimatedAssetChanges = estimatedAssetChanges; - return this; + public void setEstimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { + this.estimatedNetworkFees = estimatedNetworkFees; + } + public String getNetwork() { + return network; } - public Builder metadata(TransactionMetadata metadata) { - this.metadata = metadata; - return this; + public void setNetwork(String network) { + this.network = network; + } + public List getEstimatedAssetChanges() { + return estimatedAssetChanges; } - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; + public void setEstimatedAssetChanges(List estimatedAssetChanges) { + this.estimatedAssetChanges = estimatedAssetChanges; + } + public TransactionMetadata getMetadata() { + return metadata; } - public Builder onchainDetails(OnchainTransactionDetails onchainDetails) { - this.onchainDetails = onchainDetails; - return this; + public void setMetadata(TransactionMetadata metadata) { + this.metadata = metadata; + } + public String getIdempotencyKey() { + return idempotencyKey; + } + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + public OnchainTransactionDetails getOnchainDetails() { + return onchainDetails; + } + + public void setOnchainDetails(OnchainTransactionDetails onchainDetails) { + this.onchainDetails = onchainDetails; + } + public Network getNetworkInfo() { + return networkInfo; } - public Builder networkInfo(Network networkInfo) { - this.networkInfo = networkInfo; - return this; + public void setNetworkInfo(Network networkInfo) { + this.networkInfo = networkInfo; + } + public ProcessRequirements getProcessRequirements() { + return processRequirements; } - public Builder processRequirements(ProcessRequirements processRequirements) { - this.processRequirements = processRequirements; - return this; + public void setProcessRequirements(ProcessRequirements processRequirements) { + this.processRequirements = processRequirements; } + public static class Builder { + private String id; + + private String walletId; + + private String portfolioId; + + private TransactionType type; + + private TransactionStatus status; + + private String symbol; + + private OffsetDateTime createdAt; + + private OffsetDateTime completedAt; + + private String amount; + + private TransferLocation transferFrom; + + private TransferLocation transferTo; + + private String networkFees; + + private String fees; + + private String feeSymbol; + + private List blockchainIds; + + private String transactionId; + + private String destinationSymbol; - public Transaction build() { - return new Transaction(this); + private EstimatedNetworkFees estimatedNetworkFees; + + private String network; + + private List estimatedAssetChanges; + + private TransactionMetadata metadata; + + private String idempotencyKey; + + private OnchainTransactionDetails onchainDetails; + + private Network networkInfo; + + private ProcessRequirements processRequirements; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder walletId(String walletId) { + this.walletId = walletId; + return this; + } + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder type(TransactionType type) { + this.type = type; + return this; + } + + public Builder status(TransactionStatus status) { + this.status = status; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder completedAt(OffsetDateTime completedAt) { + this.completedAt = completedAt; + return this; + } + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder transferFrom(TransferLocation transferFrom) { + this.transferFrom = transferFrom; + return this; + } + + public Builder transferTo(TransferLocation transferTo) { + this.transferTo = transferTo; + return this; + } + + public Builder networkFees(String networkFees) { + this.networkFees = networkFees; + return this; + } + + public Builder fees(String fees) { + this.fees = fees; + return this; + } + + public Builder feeSymbol(String feeSymbol) { + this.feeSymbol = feeSymbol; + return this; + } + + public Builder blockchainIds(List blockchainIds) { + this.blockchainIds = blockchainIds; + return this; + } + + public Builder transactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } + + public Builder destinationSymbol(String destinationSymbol) { + this.destinationSymbol = destinationSymbol; + return this; + } + + public Builder estimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { + this.estimatedNetworkFees = estimatedNetworkFees; + return this; + } + + public Builder network(String network) { + this.network = network; + return this; + } + + public Builder estimatedAssetChanges(List estimatedAssetChanges) { + this.estimatedAssetChanges = estimatedAssetChanges; + return this; + } + + public Builder metadata(TransactionMetadata metadata) { + this.metadata = metadata; + return this; + } + + public Builder idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder onchainDetails(OnchainTransactionDetails onchainDetails) { + this.onchainDetails = onchainDetails; + return this; + } + + public Builder networkInfo(Network networkInfo) { + this.networkInfo = networkInfo; + return this; + } + + public Builder processRequirements(ProcessRequirements processRequirements) { + this.processRequirements = processRequirements; + return this; + } + + public Transaction build() { + return new Transaction(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TransactionMetadata.java b/src/main/java/com/coinbase/prime/model/TransactionMetadata.java index d132085..46d2ced 100644 --- a/src/main/java/com/coinbase/prime/model/TransactionMetadata.java +++ b/src/main/java/com/coinbase/prime/model/TransactionMetadata.java @@ -17,76 +17,75 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.MatchMetadata; +import com.coinbase.prime.model.RewardMetadata; +import com.coinbase.prime.model.OnchainTransactionMetadata; import com.fasterxml.jackson.annotation.JsonProperty; public class TransactionMetadata { - @JsonProperty("match_metadata") - private MatchMetadata matchMetadata; - - @JsonProperty("web3_transaction_metadata") - private OnchainTransactionMetadata onchainTransactionMetadata; - - @JsonProperty("reward_metadata") - private RewardMetadata rewardMetadata; - - public TransactionMetadata() {} - - public TransactionMetadata(Builder builder) { - this.matchMetadata = builder.matchMetadata; - this.onchainTransactionMetadata = builder.onchainTransactionMetadata; - this.rewardMetadata = builder.rewardMetadata; - } + @JsonProperty("match_metadata") + private MatchMetadata matchMetadata; - public MatchMetadata getMatchMetadata() { - return matchMetadata; - } + @JsonProperty("web3_transaction_metadata") + private OnchainTransactionMetadata onchainTransactionMetadata; - public void setMatchMetadata(MatchMetadata matchMetadata) { - this.matchMetadata = matchMetadata; - } + @JsonProperty("reward_metadata") + private RewardMetadata rewardMetadata; - public OnchainTransactionMetadata getWeb3TransactionMetadata() { - return onchainTransactionMetadata; - } + public TransactionMetadata() { + } - public void setWeb3TransactionMetadata(OnchainTransactionMetadata onchainTransactionMetadata) { - this.onchainTransactionMetadata = onchainTransactionMetadata; - } + public TransactionMetadata(Builder builder) { + this.matchMetadata = builder.matchMetadata; + this.onchainTransactionMetadata = builder.onchainTransactionMetadata; + this.rewardMetadata = builder.rewardMetadata; + } + public MatchMetadata getMatchMetadata() { + return matchMetadata; + } - public RewardMetadata getRewardMetadata() { - return rewardMetadata; - } + public void setMatchMetadata(MatchMetadata matchMetadata) { + this.matchMetadata = matchMetadata; + } + public OnchainTransactionMetadata getWeb3TransactionMetadata() { + return onchainTransactionMetadata; + } - public void setRewardMetadata(RewardMetadata rewardMetadata) { - this.rewardMetadata = rewardMetadata; - } + public void setWeb3TransactionMetadata(OnchainTransactionMetadata onchainTransactionMetadata) { + this.onchainTransactionMetadata = onchainTransactionMetadata; + } + public RewardMetadata getRewardMetadata() { + return rewardMetadata; + } - public static class Builder { - private MatchMetadata matchMetadata; + public void setRewardMetadata(RewardMetadata rewardMetadata) { + this.rewardMetadata = rewardMetadata; + } + public static class Builder { + private MatchMetadata matchMetadata; - private OnchainTransactionMetadata onchainTransactionMetadata; + private OnchainTransactionMetadata onchainTransactionMetadata; - private RewardMetadata rewardMetadata; + private RewardMetadata rewardMetadata; - public Builder matchMetadata(MatchMetadata matchMetadata) { - this.matchMetadata = matchMetadata; - return this; - } + public Builder matchMetadata(MatchMetadata matchMetadata) { + this.matchMetadata = matchMetadata; + return this; + } - public Builder onchainTransactionMetadata( - OnchainTransactionMetadata onchainTransactionMetadata) { - this.onchainTransactionMetadata = onchainTransactionMetadata; - return this; - } + public Builder onchainTransactionMetadata(OnchainTransactionMetadata onchainTransactionMetadata) { + this.onchainTransactionMetadata = onchainTransactionMetadata; + return this; + } - public Builder rewardMetadata(RewardMetadata rewardMetadata) { - this.rewardMetadata = rewardMetadata; - return this; - } + public Builder rewardMetadata(RewardMetadata rewardMetadata) { + this.rewardMetadata = rewardMetadata; + return this; + } - public TransactionMetadata build() { - return new TransactionMetadata(this); + public TransactionMetadata build() { + return new TransactionMetadata(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TransactionValidator.java b/src/main/java/com/coinbase/prime/model/TransactionValidator.java index 93d2354..fa75726 100644 --- a/src/main/java/com/coinbase/prime/model/TransactionValidator.java +++ b/src/main/java/com/coinbase/prime/model/TransactionValidator.java @@ -17,78 +17,79 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.ValidatorStatus; import com.fasterxml.jackson.annotation.JsonProperty; public class TransactionValidator { - /** The ID of the transaction which staked to this validator */ - @JsonProperty("transaction_id") - private String transactionId; - - /** The address (public key) of the validator */ - @JsonProperty("validator_address") - private String validatorAddress; - - @JsonProperty("validator_status") - private ValidatorStatus validatorStatus; - - public TransactionValidator() {} - - public TransactionValidator(Builder builder) { - this.transactionId = builder.transactionId; - this.validatorAddress = builder.validatorAddress; - this.validatorStatus = builder.validatorStatus; - } + /** + * The ID of the transaction which staked to this validator + */ + @JsonProperty("transaction_id") + private String transactionId; - public String getTransactionId() { - return transactionId; - } + /** + * The address (public key) of the validator + */ + @JsonProperty("validator_address") + private String validatorAddress; - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } + @JsonProperty("validator_status") + private ValidatorStatus validatorStatus; - public String getValidatorAddress() { - return validatorAddress; - } + public TransactionValidator() { + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } + public TransactionValidator(Builder builder) { + this.transactionId = builder.transactionId; + this.validatorAddress = builder.validatorAddress; + this.validatorStatus = builder.validatorStatus; + } + public String getTransactionId() { + return transactionId; + } - public ValidatorStatus getValidatorStatus() { - return validatorStatus; - } + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + public String getValidatorAddress() { + return validatorAddress; + } - public void setValidatorStatus(ValidatorStatus validatorStatus) { - this.validatorStatus = validatorStatus; - } + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public ValidatorStatus getValidatorStatus() { + return validatorStatus; + } - public static class Builder { - private String transactionId; + public void setValidatorStatus(ValidatorStatus validatorStatus) { + this.validatorStatus = validatorStatus; + } + public static class Builder { + private String transactionId; - private String validatorAddress; + private String validatorAddress; - private ValidatorStatus validatorStatus; + private ValidatorStatus validatorStatus; - public Builder transactionId(String transactionId) { - this.transactionId = transactionId; - return this; - } + public Builder transactionId(String transactionId) { + this.transactionId = transactionId; + return this; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } - public Builder validatorStatus(ValidatorStatus validatorStatus) { - this.validatorStatus = validatorStatus; - return this; - } + public Builder validatorStatus(ValidatorStatus validatorStatus) { + this.validatorStatus = validatorStatus; + return this; + } - public TransactionValidator build() { - return new TransactionValidator(this); + public TransactionValidator build() { + return new TransactionValidator(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TransferLocation.java b/src/main/java/com/coinbase/prime/model/TransferLocation.java index 5bcea1a..59d11ae 100644 --- a/src/main/java/com/coinbase/prime/model/TransferLocation.java +++ b/src/main/java/com/coinbase/prime/model/TransferLocation.java @@ -17,103 +17,106 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.TransferLocationType; import com.fasterxml.jackson.annotation.JsonProperty; public class TransferLocation { - /** - * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value - PAYMENT_METHOD: The ID of a fiat payment - * method - WALLET: The ID of a wallet - ADDRESS: A cryptocurrency address - OTHER: Another type - * of transfer location: Blockchain Network, Coinbase - MULTIPLE_ADDRESSES: Multiple - * cryptocurrency addresses - COUNTERPARTY_ID: Counterparty ID - */ - private TransferLocationType type; - - /** The value of the transfer location: payment method ID, wallet ID or crypto address */ - private String value; - - /** The crypto address of the transfer location */ - private String address; - - /** - * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) - */ - @JsonProperty("account_identifier") - private String accountIdentifier; - - public TransferLocation() {} - - public TransferLocation(Builder builder) { - this.type = builder.type; - this.value = builder.value; - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - } - - public TransferLocationType getType() { - return type; - } - - public void setType(TransferLocationType type) { - this.type = type; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getAccountIdentifier() { - return accountIdentifier; - } - - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } - - public static class Builder { + /** + * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value + * - PAYMENT_METHOD: The ID of a fiat payment method + * - WALLET: The ID of a wallet + * - ADDRESS: A cryptocurrency address + * - OTHER: Another type of transfer location: Blockchain Network, Coinbase + * - MULTIPLE_ADDRESSES: Multiple cryptocurrency addresses + * - COUNTERPARTY_ID: Counterparty ID + */ private TransferLocationType type; + /** + * The value of the transfer location: payment method ID, wallet ID or crypto address + */ private String value; + /** + * The crypto address of the transfer location + */ private String address; + /** + * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) + */ + @JsonProperty("account_identifier") private String accountIdentifier; - public Builder type(TransferLocationType type) { - this.type = type; - return this; + public TransferLocation() { } - public Builder value(String value) { - this.value = value; - return this; + public TransferLocation(Builder builder) { + this.type = builder.type; + this.value = builder.value; + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + } + public TransferLocationType getType() { + return type; } - public Builder address(String address) { - this.address = address; - return this; + public void setType(TransferLocationType type) { + this.type = type; + } + public String getValue() { + return value; } - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; + public void setValue(String value) { + this.value = value; + } + public String getAddress() { + return address; } - public TransferLocation build() { - return new TransferLocation(this); + public void setAddress(String address) { + this.address = address; + } + public String getAccountIdentifier() { + return accountIdentifier; + } + + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } + public static class Builder { + private TransferLocationType type; + + private String value; + + private String address; + + private String accountIdentifier; + + public Builder type(TransferLocationType type) { + this.type = type; + return this; + } + + public Builder value(String value) { + this.value = value; + return this; + } + + public Builder address(String address) { + this.address = address; + return this; + } + + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; + } + + public TransferLocation build() { + return new TransferLocation(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index 6a7b8e7..5ace1a6 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -17,140 +17,136 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.TravelRuleParty; import com.fasterxml.jackson.annotation.JsonProperty; /** Data object used for withdrawals. */ public class TravelRuleData { - /** Represents a party in a travel rule transfer (originator or beneficiary). */ - private TravelRuleParty beneficiary; - - /** Represents a party in a travel rule transfer (originator or beneficiary). */ - private TravelRuleParty originator; - - /** True if user owns the counterparty address (self-transfer) */ - @JsonProperty("is_self") - private boolean isSelf; - - /** True if Coinbase is being used as an intermediary for a customer transfer. */ - @JsonProperty("is_intermediary") - private boolean isIntermediary; - - /** True to skip wallet ownership verification */ - @JsonProperty("opt_out_of_ownership_verification") - private boolean optOutOfOwnershipVerification; - - /** - * Whether the originating VASP attests to verified wallet ownership. When true with - * is_intermediary, enables automatic VASP data enrichment from the legal entity. - */ - @JsonProperty("attest_verified_wallet_ownership") - private boolean attestVerifiedWalletOwnership; - - public TravelRuleData() {} - - public TravelRuleData(Builder builder) { - this.beneficiary = builder.beneficiary; - this.originator = builder.originator; - this.isSelf = builder.isSelf; - this.isIntermediary = builder.isIntermediary; - this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; - this.attestVerifiedWalletOwnership = builder.attestVerifiedWalletOwnership; - } - - public TravelRuleParty getBeneficiary() { - return beneficiary; - } - - public void setBeneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - } - - public TravelRuleParty getOriginator() { - return originator; - } - - public void setOriginator(TravelRuleParty originator) { - this.originator = originator; - } - - public boolean getIsSelf() { - return isSelf; - } - - public void setIsSelf(boolean isSelf) { - this.isSelf = isSelf; - } - - public boolean getIsIntermediary() { - return isIntermediary; - } - - public void setIsIntermediary(boolean isIntermediary) { - this.isIntermediary = isIntermediary; - } - - public boolean getOptOutOfOwnershipVerification() { - return optOutOfOwnershipVerification; - } - - public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - } - - public boolean getAttestVerifiedWalletOwnership() { - return attestVerifiedWalletOwnership; - } - - public void setAttestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { - this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; - } - - public static class Builder { + /** Represents a party in a travel rule transfer (originator or beneficiary). */ private TravelRuleParty beneficiary; + /** Represents a party in a travel rule transfer (originator or beneficiary). */ private TravelRuleParty originator; + /** True if user owns the counterparty address (self-transfer) */ + @JsonProperty("is_self") private boolean isSelf; + /** + * True if Coinbase is being used as an intermediary for a customer transfer. + */ + @JsonProperty("is_intermediary") private boolean isIntermediary; + /** True to skip wallet ownership verification */ + @JsonProperty("opt_out_of_ownership_verification") private boolean optOutOfOwnershipVerification; + /** + * Whether the originating VASP attests to verified wallet ownership. When true with is_intermediary, enables automatic VASP data enrichment from the legal entity. + */ + @JsonProperty("attest_verified_wallet_ownership") private boolean attestVerifiedWalletOwnership; - public Builder beneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - return this; + public TravelRuleData() { + } + + public TravelRuleData(Builder builder) { + this.beneficiary = builder.beneficiary; + this.originator = builder.originator; + this.isSelf = builder.isSelf; + this.isIntermediary = builder.isIntermediary; + this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; + this.attestVerifiedWalletOwnership = builder.attestVerifiedWalletOwnership; + } + public TravelRuleParty getBeneficiary() { + return beneficiary; } - public Builder originator(TravelRuleParty originator) { - this.originator = originator; - return this; + public void setBeneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + } + public TravelRuleParty getOriginator() { + return originator; } - public Builder isSelf(boolean isSelf) { - this.isSelf = isSelf; - return this; + public void setOriginator(TravelRuleParty originator) { + this.originator = originator; + } + public boolean getIsSelf() { + return isSelf; } - public Builder isIntermediary(boolean isIntermediary) { - this.isIntermediary = isIntermediary; - return this; + public void setIsSelf(boolean isSelf) { + this.isSelf = isSelf; + } + public boolean getIsIntermediary() { + return isIntermediary; } - public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - return this; + public void setIsIntermediary(boolean isIntermediary) { + this.isIntermediary = isIntermediary; + } + public boolean getOptOutOfOwnershipVerification() { + return optOutOfOwnershipVerification; } - public Builder attestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { - this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; - return this; + public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + } + public boolean getAttestVerifiedWalletOwnership() { + return attestVerifiedWalletOwnership; } - public TravelRuleData build() { - return new TravelRuleData(this); + public void setAttestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { + this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; + } + public static class Builder { + private TravelRuleParty beneficiary; + + private TravelRuleParty originator; + + private boolean isSelf; + + private boolean isIntermediary; + + private boolean optOutOfOwnershipVerification; + + private boolean attestVerifiedWalletOwnership; + + public Builder beneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + return this; + } + + public Builder originator(TravelRuleParty originator) { + this.originator = originator; + return this; + } + + public Builder isSelf(boolean isSelf) { + this.isSelf = isSelf; + return this; + } + + public Builder isIntermediary(boolean isIntermediary) { + this.isIntermediary = isIntermediary; + return this; + } + + public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + return this; + } + + public Builder attestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { + this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; + return this; + } + + public TravelRuleData build() { + return new TravelRuleData(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java index b401be3..b1c956d 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -17,231 +17,231 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.DetailedAddress; +import com.coinbase.prime.model.NaturalPersonName; import com.coinbase.prime.model.enums.TravelRuleWalletType; +import com.coinbase.prime.model.DateOfBirth; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a party in a travel rule transfer (originator or beneficiary). */ public class TravelRuleParty { - /** Legal name (for entities or simple name format) */ - private String name; - - /** Natural person name components */ - @JsonProperty("natural_person_name") - private NaturalPersonName naturalPersonName; - - /** Detailed address information */ - private DetailedAddress address; - - /** - * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type - - * TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet - - * TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet - */ - @JsonProperty("wallet_type") - private TravelRuleWalletType walletType; - - /** VASP identifier when wallet_type is VASP */ - @JsonProperty("vasp_id") - private String vaspId; - - /** VASP name fallback when vasp_id is unknown */ - @JsonProperty("vasp_name") - private String vaspName; - - /** - * Personal identifier for travel rule compliance. For individuals: passport number, national ID, - * driver's license. For institutions: LEI (Legal Entity Identifier). - */ - @JsonProperty("personal_id") - private String personalId; - - /** - * * 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; - - /** Telephone number for contact purposes. */ - @JsonProperty("telephone_number") - private String telephoneNumber; - - /** Account identifier for travel rule compliance. If not provided, defaults to portfolio ID. */ - @JsonProperty("account_id") - private String accountId; - - public TravelRuleParty() {} - - public TravelRuleParty(Builder builder) { - this.name = builder.name; - this.naturalPersonName = builder.naturalPersonName; - this.address = builder.address; - this.walletType = builder.walletType; - this.vaspId = builder.vaspId; - this.vaspName = builder.vaspName; - this.personalId = builder.personalId; - this.dateOfBirth = builder.dateOfBirth; - this.telephoneNumber = builder.telephoneNumber; - this.accountId = builder.accountId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public NaturalPersonName getNaturalPersonName() { - return naturalPersonName; - } - - public void setNaturalPersonName(NaturalPersonName naturalPersonName) { - this.naturalPersonName = naturalPersonName; - } - - public DetailedAddress getAddress() { - return address; - } - - public void setAddress(DetailedAddress address) { - this.address = address; - } - - public TravelRuleWalletType getWalletType() { - return walletType; - } - - public void setWalletType(TravelRuleWalletType walletType) { - this.walletType = walletType; - } - - public String getVaspId() { - return vaspId; - } - - public void setVaspId(String vaspId) { - this.vaspId = vaspId; - } - - public String getVaspName() { - return vaspName; - } - - public void setVaspName(String vaspName) { - this.vaspName = vaspName; - } - - public String getPersonalId() { - return personalId; - } - - public void setPersonalId(String personalId) { - this.personalId = personalId; - } - - public DateOfBirth getDateOfBirth() { - return dateOfBirth; - } - - public void setDateOfBirth(DateOfBirth dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - - public String getTelephoneNumber() { - return telephoneNumber; - } - - public void setTelephoneNumber(String telephoneNumber) { - this.telephoneNumber = telephoneNumber; - } - - public String getAccountId() { - return accountId; - } - - public void setAccountId(String accountId) { - this.accountId = accountId; - } - - public static class Builder { + /** Legal name (for entities or simple name format) */ private String name; + /** Natural person name components */ + @JsonProperty("natural_person_name") private NaturalPersonName naturalPersonName; + /** Detailed address information */ private DetailedAddress address; + /** + * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type + * - TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet + * - TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet + */ + @JsonProperty("wallet_type") private TravelRuleWalletType walletType; + /** VASP identifier when wallet_type is VASP */ + @JsonProperty("vasp_id") private String vaspId; + /** VASP name fallback when vasp_id is unknown */ + @JsonProperty("vasp_name") private String vaspName; + /** + * Personal identifier for travel rule compliance. For individuals: passport number, national ID, driver's license. For institutions: LEI (Legal Entity Identifier). + */ + @JsonProperty("personal_id") private String personalId; + /** + * * 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; + /** + * Telephone number for contact purposes. + */ + @JsonProperty("telephone_number") private String telephoneNumber; + /** + * Account identifier for travel rule compliance. If not provided, defaults to portfolio ID. + */ + @JsonProperty("account_id") private String accountId; - public Builder name(String name) { - this.name = name; - return this; + public TravelRuleParty() { } - public Builder naturalPersonName(NaturalPersonName naturalPersonName) { - this.naturalPersonName = naturalPersonName; - return this; + public TravelRuleParty(Builder builder) { + this.name = builder.name; + this.naturalPersonName = builder.naturalPersonName; + this.address = builder.address; + this.walletType = builder.walletType; + this.vaspId = builder.vaspId; + this.vaspName = builder.vaspName; + this.personalId = builder.personalId; + this.dateOfBirth = builder.dateOfBirth; + this.telephoneNumber = builder.telephoneNumber; + this.accountId = builder.accountId; + } + public String getName() { + return name; } - public Builder address(DetailedAddress address) { - this.address = address; - return this; + public void setName(String name) { + this.name = name; + } + public NaturalPersonName getNaturalPersonName() { + return naturalPersonName; } - public Builder walletType(TravelRuleWalletType walletType) { - this.walletType = walletType; - return this; + public void setNaturalPersonName(NaturalPersonName naturalPersonName) { + this.naturalPersonName = naturalPersonName; + } + public DetailedAddress getAddress() { + return address; } - public Builder vaspId(String vaspId) { - this.vaspId = vaspId; - return this; + public void setAddress(DetailedAddress address) { + this.address = address; + } + public TravelRuleWalletType getWalletType() { + return walletType; } - public Builder vaspName(String vaspName) { - this.vaspName = vaspName; - return this; + public void setWalletType(TravelRuleWalletType walletType) { + this.walletType = walletType; + } + public String getVaspId() { + return vaspId; + } + + public void setVaspId(String vaspId) { + this.vaspId = vaspId; + } + public String getVaspName() { + return vaspName; } - public Builder personalId(String personalId) { - this.personalId = personalId; - return this; + public void setVaspName(String vaspName) { + this.vaspName = vaspName; + } + public String getPersonalId() { + return personalId; } - public Builder dateOfBirth(DateOfBirth dateOfBirth) { - this.dateOfBirth = dateOfBirth; - return this; + public void setPersonalId(String personalId) { + this.personalId = personalId; + } + public DateOfBirth getDateOfBirth() { + return dateOfBirth; } - public Builder telephoneNumber(String telephoneNumber) { - this.telephoneNumber = telephoneNumber; - return this; + public void setDateOfBirth(DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + public String getTelephoneNumber() { + return telephoneNumber; } - public Builder accountId(String accountId) { - this.accountId = accountId; - return this; + public void setTelephoneNumber(String telephoneNumber) { + this.telephoneNumber = telephoneNumber; + } + public String getAccountId() { + return accountId; } - public TravelRuleParty build() { - return new TravelRuleParty(this); + public void setAccountId(String accountId) { + this.accountId = accountId; + } + public static class Builder { + private String name; + + private NaturalPersonName naturalPersonName; + + private DetailedAddress address; + + private TravelRuleWalletType walletType; + + private String vaspId; + + private String vaspName; + + private String personalId; + + private DateOfBirth dateOfBirth; + + private String telephoneNumber; + + private String accountId; + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder naturalPersonName(NaturalPersonName naturalPersonName) { + this.naturalPersonName = naturalPersonName; + return this; + } + + public Builder address(DetailedAddress address) { + this.address = address; + return this; + } + + public Builder walletType(TravelRuleWalletType walletType) { + this.walletType = walletType; + return this; + } + + public Builder vaspId(String vaspId) { + this.vaspId = vaspId; + return this; + } + + public Builder vaspName(String vaspName) { + this.vaspName = vaspName; + return this; + } + + public Builder personalId(String personalId) { + this.personalId = personalId; + return this; + } + + public Builder dateOfBirth(DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + public Builder telephoneNumber(String telephoneNumber) { + this.telephoneNumber = telephoneNumber; + return this; + } + + public Builder accountId(String accountId) { + this.accountId = accountId; + return this; + } + + public TravelRuleParty build() { + return new TravelRuleParty(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java index e73f531..b948ca7 100644 --- a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java @@ -17,158 +17,161 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.EstimateType; import com.coinbase.prime.model.enums.UnstakeType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class UnstakingStatus { - /** Amount being unstaked (whole amount, e.g., 16 ETH) */ - private String amount; - - @JsonProperty("unstake_type") - private UnstakeType unstakeType; - - /** Estimated date when unstaking will complete (ISO 8601 format) */ - @JsonProperty("finishing_at") - private OffsetDateTime finishingAt; - - /** Estimated hours until this unstaking request completes */ - @JsonProperty("remaining_hours") - private Long remainingHours; - - /** Timestamp when the unstake request was originally created */ - @JsonProperty("requested_at") - private OffsetDateTime requestedAt; - - @JsonProperty("estimate_type") - private EstimateType estimateType; - - /** Detailed explanation of the estimate status for display to users. */ - @JsonProperty("estimate_description") - private String estimateDescription; - - public UnstakingStatus() {} - - public UnstakingStatus(Builder builder) { - this.amount = builder.amount; - this.unstakeType = builder.unstakeType; - this.finishingAt = builder.finishingAt; - this.remainingHours = builder.remainingHours; - this.requestedAt = builder.requestedAt; - this.estimateType = builder.estimateType; - this.estimateDescription = builder.estimateDescription; - } + /** + * Amount being unstaked (whole amount, e.g., 16 ETH) + */ + private String amount; - public String getAmount() { - return amount; - } + @JsonProperty("unstake_type") + private UnstakeType unstakeType; - public void setAmount(String amount) { - this.amount = amount; - } + /** + * Estimated date when unstaking will complete (ISO 8601 format) + */ + @JsonProperty("finishing_at") + private OffsetDateTime finishingAt; - public UnstakeType getUnstakeType() { - return unstakeType; - } + /** + * Estimated hours until this unstaking request completes + */ + @JsonProperty("remaining_hours") + private Long remainingHours; - public void setUnstakeType(UnstakeType unstakeType) { - this.unstakeType = unstakeType; - } + /** + * Timestamp when the unstake request was originally created + */ + @JsonProperty("requested_at") + private OffsetDateTime requestedAt; - public OffsetDateTime getFinishingAt() { - return finishingAt; - } + @JsonProperty("estimate_type") + private EstimateType estimateType; - public void setFinishingAt(OffsetDateTime finishingAt) { - this.finishingAt = finishingAt; - } + /** + * Detailed explanation of the estimate status for display to users. + */ + @JsonProperty("estimate_description") + private String estimateDescription; - public Long getRemainingHours() { - return remainingHours; - } + public UnstakingStatus() { + } - public void setRemainingHours(Long remainingHours) { - this.remainingHours = remainingHours; - } + public UnstakingStatus(Builder builder) { + this.amount = builder.amount; + this.unstakeType = builder.unstakeType; + this.finishingAt = builder.finishingAt; + this.remainingHours = builder.remainingHours; + this.requestedAt = builder.requestedAt; + this.estimateType = builder.estimateType; + this.estimateDescription = builder.estimateDescription; + } + public String getAmount() { + return amount; + } - public OffsetDateTime getRequestedAt() { - return requestedAt; - } + public void setAmount(String amount) { + this.amount = amount; + } + public UnstakeType getUnstakeType() { + return unstakeType; + } - public void setRequestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - } + public void setUnstakeType(UnstakeType unstakeType) { + this.unstakeType = unstakeType; + } + public OffsetDateTime getFinishingAt() { + return finishingAt; + } - public EstimateType getEstimateType() { - return estimateType; - } + public void setFinishingAt(OffsetDateTime finishingAt) { + this.finishingAt = finishingAt; + } + public Long getRemainingHours() { + return remainingHours; + } - public void setEstimateType(EstimateType estimateType) { - this.estimateType = estimateType; - } + public void setRemainingHours(Long remainingHours) { + this.remainingHours = remainingHours; + } + public OffsetDateTime getRequestedAt() { + return requestedAt; + } - public String getEstimateDescription() { - return estimateDescription; - } + public void setRequestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + } + public EstimateType getEstimateType() { + return estimateType; + } - public void setEstimateDescription(String estimateDescription) { - this.estimateDescription = estimateDescription; - } + public void setEstimateType(EstimateType estimateType) { + this.estimateType = estimateType; + } + public String getEstimateDescription() { + return estimateDescription; + } - public static class Builder { - private String amount; + public void setEstimateDescription(String estimateDescription) { + this.estimateDescription = estimateDescription; + } + public static class Builder { + private String amount; - private UnstakeType unstakeType; + private UnstakeType unstakeType; - private OffsetDateTime finishingAt; + private OffsetDateTime finishingAt; - private Long remainingHours; + private Long remainingHours; - private OffsetDateTime requestedAt; + private OffsetDateTime requestedAt; - private EstimateType estimateType; + private EstimateType estimateType; - private String estimateDescription; + private String estimateDescription; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder unstakeType(UnstakeType unstakeType) { - this.unstakeType = unstakeType; - return this; - } + public Builder unstakeType(UnstakeType unstakeType) { + this.unstakeType = unstakeType; + return this; + } - public Builder finishingAt(OffsetDateTime finishingAt) { - this.finishingAt = finishingAt; - return this; - } + public Builder finishingAt(OffsetDateTime finishingAt) { + this.finishingAt = finishingAt; + return this; + } - public Builder remainingHours(Long remainingHours) { - this.remainingHours = remainingHours; - return this; - } + public Builder remainingHours(Long remainingHours) { + this.remainingHours = remainingHours; + return this; + } - public Builder requestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - return this; - } + public Builder requestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + return this; + } - public Builder estimateType(EstimateType estimateType) { - this.estimateType = estimateType; - return this; - } + public Builder estimateType(EstimateType estimateType) { + this.estimateType = estimateType; + return this; + } - public Builder estimateDescription(String estimateDescription) { - this.estimateDescription = estimateDescription; - return this; - } + public Builder estimateDescription(String estimateDescription) { + this.estimateDescription = estimateDescription; + return this; + } - public UnstakingStatus build() { - return new UnstakingStatus(this); + public UnstakingStatus build() { + return new UnstakingStatus(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/UserAction.java b/src/main/java/com/coinbase/prime/model/UserAction.java index 1df1943..e86fbed 100644 --- a/src/main/java/com/coinbase/prime/model/UserAction.java +++ b/src/main/java/com/coinbase/prime/model/UserAction.java @@ -17,77 +17,78 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.Action; import com.fasterxml.jackson.annotation.JsonProperty; public class UserAction { - /** Action is the available user action types */ - private Action action; - - /** Id of the user who executed the action */ - @JsonProperty("user_id") - private String userId; - - /** Time the action was taken */ - private String timestamp; - - public UserAction() {} - - public UserAction(Builder builder) { - this.action = builder.action; - this.userId = builder.userId; - this.timestamp = builder.timestamp; - } + /** Action is the available user action types */ + private Action action; - public Action getAction() { - return action; - } + /** + * Id of the user who executed the action + */ + @JsonProperty("user_id") + private String userId; - public void setAction(Action action) { - this.action = action; - } + /** + * Time the action was taken + */ + private String timestamp; - public String getUserId() { - return userId; - } + public UserAction() { + } - public void setUserId(String userId) { - this.userId = userId; - } + public UserAction(Builder builder) { + this.action = builder.action; + this.userId = builder.userId; + this.timestamp = builder.timestamp; + } + public Action getAction() { + return action; + } - public String getTimestamp() { - return timestamp; - } + public void setAction(Action action) { + this.action = action; + } + public String getUserId() { + return userId; + } - public void setTimestamp(String timestamp) { - this.timestamp = timestamp; - } + public void setUserId(String userId) { + this.userId = userId; + } + public String getTimestamp() { + return timestamp; + } - public static class Builder { - private Action action; + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } + public static class Builder { + private Action action; - private String userId; + private String userId; - private String timestamp; + private String timestamp; - public Builder action(Action action) { - this.action = action; - return this; - } + public Builder action(Action action) { + this.action = action; + return this; + } - public Builder userId(String userId) { - this.userId = userId; - return this; - } + public Builder userId(String userId) { + this.userId = userId; + return this; + } - public Builder timestamp(String timestamp) { - this.timestamp = timestamp; - return this; - } + public Builder timestamp(String timestamp) { + this.timestamp = timestamp; + return this; + } - public UserAction build() { - return new UserAction(this); + public UserAction build() { + return new UserAction(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java index 3c488fe..f0d68e1 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -17,61 +17,63 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** - * ValidatorAllocation specifies the validator and amount for staking or unstaking. Used for - * granular ETH V2 validator-level staking or unstaking operations. + * ValidatorAllocation specifies the validator and amount for staking or unstaking. + * Used for granular ETH V2 validator-level staking or unstaking operations. */ public class ValidatorAllocation { - /** The validator address for performing staking operations */ - @JsonProperty("validator_address") - private String validatorAddress; - - /** Amount for performing staking operations with this validator */ - private String amount; - - public ValidatorAllocation() {} - - public ValidatorAllocation(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.amount = builder.amount; - } + /** + * The validator address for performing staking operations + */ + @JsonProperty("validator_address") + private String validatorAddress; - public String getValidatorAddress() { - return validatorAddress; - } + /** + * Amount for performing staking operations with this validator + */ + private String amount; - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } + public ValidatorAllocation() { + } - public String getAmount() { - return amount; - } + public ValidatorAllocation(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.amount = builder.amount; + } + public String getValidatorAddress() { + return validatorAddress; + } - public void setAmount(String amount) { - this.amount = amount; - } + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public String getAmount() { + return amount; + } - public static class Builder { - private String validatorAddress; + public void setAmount(String amount) { + this.amount = amount; + } + public static class Builder { + private String validatorAddress; - private String amount; + private String amount; - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public ValidatorAllocation build() { - return new ValidatorAllocation(this); + public ValidatorAllocation build() { + return new ValidatorAllocation(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java index 448437d..7540329 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java @@ -17,58 +17,61 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.StakingStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class ValidatorStakingInfo { - /** The validator address (public key) */ - @JsonProperty("validator_address") - private String validatorAddress; - - /** List of active staking requests for this validator */ - private List statuses; - - public ValidatorStakingInfo() {} - - public ValidatorStakingInfo(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.statuses = builder.statuses; - } + /** + * The validator address (public key) + */ + @JsonProperty("validator_address") + private String validatorAddress; - public String getValidatorAddress() { - return validatorAddress; - } + /** + * List of active staking requests for this validator + */ + private List statuses; - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } + public ValidatorStakingInfo() { + } - public List getStatuses() { - return statuses; - } + public ValidatorStakingInfo(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.statuses = builder.statuses; + } + public String getValidatorAddress() { + return validatorAddress; + } - public void setStatuses(List statuses) { - this.statuses = statuses; - } + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public List getStatuses() { + return statuses; + } - public static class Builder { - private String validatorAddress; + public void setStatuses(List statuses) { + this.statuses = statuses; + } + public static class Builder { + private String validatorAddress; - private List statuses; + private List statuses; - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } - public Builder statuses(List statuses) { - this.statuses = statuses; - return this; - } + public Builder statuses(List statuses) { + this.statuses = statuses; + return this; + } - public ValidatorStakingInfo build() { - return new ValidatorStakingInfo(this); + public ValidatorStakingInfo build() { + return new ValidatorStakingInfo(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java b/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java index 982a0d1..f610b1c 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java @@ -17,99 +17,103 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** ValidatorUnstakePreview contains the per-validator breakdown for an unstake preview. */ public class ValidatorUnstakePreview { - /** Public address of the validator being unstaked from */ - @JsonProperty("validator_address") - private String validatorAddress; - - /** Estimated amount that would be unstaked from this validator (in ETH) */ - @JsonProperty("estimated_unstaking_amount") - private String estimatedUnstakingAmount; - - /** Estimated time until this validator's unstake completes, in hours */ - @JsonProperty("unstake_time_estimate_in_hours") - private Double unstakeTimeEstimateInHours; - - /** Estimated date when this validator's unstake will complete (ISO 8601) */ - @JsonProperty("estimated_unstake_date") - private String estimatedUnstakeDate; - - public ValidatorUnstakePreview() {} - - public ValidatorUnstakePreview(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.estimatedUnstakingAmount = builder.estimatedUnstakingAmount; - this.unstakeTimeEstimateInHours = builder.unstakeTimeEstimateInHours; - this.estimatedUnstakeDate = builder.estimatedUnstakeDate; - } + /** + * Public address of the validator being unstaked from + */ + @JsonProperty("validator_address") + private String validatorAddress; - public String getValidatorAddress() { - return validatorAddress; - } + /** + * Estimated amount that would be unstaked from this validator (in ETH) + */ + @JsonProperty("estimated_unstaking_amount") + private String estimatedUnstakingAmount; - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } + /** + * Estimated time until this validator's unstake completes, in hours + */ + @JsonProperty("unstake_time_estimate_in_hours") + private Double unstakeTimeEstimateInHours; - public String getEstimatedUnstakingAmount() { - return estimatedUnstakingAmount; - } + /** + * Estimated date when this validator's unstake will complete (ISO 8601) + */ + @JsonProperty("estimated_unstake_date") + private String estimatedUnstakeDate; - public void setEstimatedUnstakingAmount(String estimatedUnstakingAmount) { - this.estimatedUnstakingAmount = estimatedUnstakingAmount; - } + public ValidatorUnstakePreview() { + } - public Double getUnstakeTimeEstimateInHours() { - return unstakeTimeEstimateInHours; - } + public ValidatorUnstakePreview(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.estimatedUnstakingAmount = builder.estimatedUnstakingAmount; + this.unstakeTimeEstimateInHours = builder.unstakeTimeEstimateInHours; + this.estimatedUnstakeDate = builder.estimatedUnstakeDate; + } + public String getValidatorAddress() { + return validatorAddress; + } - public void setUnstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { - this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; - } + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public String getEstimatedUnstakingAmount() { + return estimatedUnstakingAmount; + } - public String getEstimatedUnstakeDate() { - return estimatedUnstakeDate; - } + public void setEstimatedUnstakingAmount(String estimatedUnstakingAmount) { + this.estimatedUnstakingAmount = estimatedUnstakingAmount; + } + public Double getUnstakeTimeEstimateInHours() { + return unstakeTimeEstimateInHours; + } - public void setEstimatedUnstakeDate(String estimatedUnstakeDate) { - this.estimatedUnstakeDate = estimatedUnstakeDate; - } + public void setUnstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { + this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; + } + public String getEstimatedUnstakeDate() { + return estimatedUnstakeDate; + } - public static class Builder { - private String validatorAddress; + public void setEstimatedUnstakeDate(String estimatedUnstakeDate) { + this.estimatedUnstakeDate = estimatedUnstakeDate; + } + public static class Builder { + private String validatorAddress; - private String estimatedUnstakingAmount; + private String estimatedUnstakingAmount; - private Double unstakeTimeEstimateInHours; + private Double unstakeTimeEstimateInHours; - private String estimatedUnstakeDate; + private String estimatedUnstakeDate; - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } - public Builder estimatedUnstakingAmount(String estimatedUnstakingAmount) { - this.estimatedUnstakingAmount = estimatedUnstakingAmount; - return this; - } + public Builder estimatedUnstakingAmount(String estimatedUnstakingAmount) { + this.estimatedUnstakingAmount = estimatedUnstakingAmount; + return this; + } - public Builder unstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { - this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; - return this; - } + public Builder unstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { + this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; + return this; + } - public Builder estimatedUnstakeDate(String estimatedUnstakeDate) { - this.estimatedUnstakeDate = estimatedUnstakeDate; - return this; - } + public Builder estimatedUnstakeDate(String estimatedUnstakeDate) { + this.estimatedUnstakeDate = estimatedUnstakeDate; + return this; + } - public ValidatorUnstakePreview build() { - return new ValidatorUnstakePreview(this); + public ValidatorUnstakePreview build() { + return new ValidatorUnstakePreview(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java index 7a2698c..074da63 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java @@ -17,58 +17,61 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.UnstakingStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class ValidatorUnstakingInfo { - /** The validator address (public key) */ - @JsonProperty("validator_address") - private String validatorAddress; - - /** List of active unstaking requests for this validator */ - private List statuses; - - public ValidatorUnstakingInfo() {} - - public ValidatorUnstakingInfo(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.statuses = builder.statuses; - } + /** + * The validator address (public key) + */ + @JsonProperty("validator_address") + private String validatorAddress; - public String getValidatorAddress() { - return validatorAddress; - } + /** + * List of active unstaking requests for this validator + */ + private List statuses; - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } + public ValidatorUnstakingInfo() { + } - public List getStatuses() { - return statuses; - } + public ValidatorUnstakingInfo(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.statuses = builder.statuses; + } + public String getValidatorAddress() { + return validatorAddress; + } - public void setStatuses(List statuses) { - this.statuses = statuses; - } + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public List getStatuses() { + return statuses; + } - public static class Builder { - private String validatorAddress; + public void setStatuses(List statuses) { + this.statuses = statuses; + } + public static class Builder { + private String validatorAddress; - private List statuses; + private List statuses; - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } - public Builder statuses(List statuses) { - this.statuses = statuses; - return this; - } + public Builder statuses(List statuses) { + this.statuses = statuses; + return this; + } - public ValidatorUnstakingInfo build() { - return new ValidatorUnstakingInfo(this); + public ValidatorUnstakingInfo build() { + return new ValidatorUnstakingInfo(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/Wallet.java b/src/main/java/com/coinbase/prime/model/Wallet.java index 3cb886e..e0ec10f 100644 --- a/src/main/java/com/coinbase/prime/model/Wallet.java +++ b/src/main/java/com/coinbase/prime/model/Wallet.java @@ -17,175 +17,171 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.Network; import com.coinbase.prime.model.enums.WalletType; import com.coinbase.prime.model.enums.WalletVisibility; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class Wallet { - /** The unique UUID for the wallet */ - private String id; - - /** The name of the wallet */ - private String name; - - /** The asset stored in the wallet */ - 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 - */ - private WalletType type; - - /** The UTC timestamp when this wallet was created */ - @JsonProperty("created_at") - private OffsetDateTime createdAt; - - /** The active address of the wallet */ - private String address; - - private WalletVisibility visibility; - - private Network network; - - public Wallet() {} - - public Wallet(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.symbol = builder.symbol; - this.type = builder.type; - this.createdAt = builder.createdAt; - this.address = builder.address; - this.visibility = builder.visibility; - this.network = builder.network; - } + /** The unique UUID for the wallet */ + private String id; - public String getId() { - return id; - } + /** The name of the wallet */ + private String name; - public void setId(String id) { - this.id = id; - } + /** The asset stored in the wallet */ + private String symbol; - public String getName() { - return name; - } + /** + * - 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 + */ + private WalletType type; - public void setName(String name) { - this.name = name; - } + /** The UTC timestamp when this wallet was created */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; - public String getSymbol() { - return symbol; - } + /** The active address of the wallet */ + private String address; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + private WalletVisibility visibility; - public WalletType getType() { - return type; - } + private Network network; - public void setType(WalletType type) { - this.type = type; - } + public Wallet() { + } - public OffsetDateTime getCreatedAt() { - return createdAt; - } + public Wallet(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.symbol = builder.symbol; + this.type = builder.type; + this.createdAt = builder.createdAt; + this.address = builder.address; + this.visibility = builder.visibility; + this.network = builder.network; + } + public String getId() { + return id; + } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } - public String getAddress() { - return address; - } + public void setName(String name) { + this.name = name; + } + public String getSymbol() { + return symbol; + } - public void setAddress(String address) { - this.address = address; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public WalletType getType() { + return type; + } - public WalletVisibility getVisibility() { - return visibility; - } + public void setType(WalletType type) { + this.type = type; + } + public OffsetDateTime getCreatedAt() { + return createdAt; + } - public void setVisibility(WalletVisibility visibility) { - this.visibility = visibility; - } + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + public String getAddress() { + return address; + } - public Network getNetwork() { - return network; - } + public void setAddress(String address) { + this.address = address; + } + public WalletVisibility getVisibility() { + return visibility; + } - public void setNetwork(Network network) { - this.network = network; - } + public void setVisibility(WalletVisibility visibility) { + this.visibility = visibility; + } + public Network getNetwork() { + return network; + } - public static class Builder { - private String id; + public void setNetwork(Network network) { + this.network = network; + } + public static class Builder { + private String id; - private String name; + private String name; - private String symbol; + private String symbol; - private WalletType type; + private WalletType type; - private OffsetDateTime createdAt; + private OffsetDateTime createdAt; - private String address; + private String address; - private WalletVisibility visibility; + private WalletVisibility visibility; - private Network network; + private Network network; - public Builder id(String id) { - this.id = id; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public Builder name(String name) { - this.name = name; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder type(WalletType type) { - this.type = type; - return this; - } + public Builder type(WalletType type) { + this.type = type; + return this; + } - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } - public Builder address(String address) { - this.address = address; - return this; - } + public Builder address(String address) { + this.address = address; + return this; + } - public Builder visibility(WalletVisibility visibility) { - this.visibility = visibility; - return this; - } + public Builder visibility(WalletVisibility visibility) { + this.visibility = visibility; + return this; + } - public Builder network(Network network) { - this.network = network; - return this; - } + public Builder network(Network network) { + this.network = network; + return this; + } - public Wallet build() { - return new Wallet(this); + public Wallet build() { + return new Wallet(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java index 91898d1..8919998 100644 --- a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java @@ -23,36 +23,35 @@ * Requirements and supported fields vary by asset type. */ public class WalletClaimRewardsInputs { - /** - * Optional amount to claim rewards (ETH only). If omitted, the wallet will claim the maximum - * amount available - */ - private String amount; - - public WalletClaimRewardsInputs() {} - - public WalletClaimRewardsInputs(Builder builder) { - this.amount = builder.amount; - } - - public String getAmount() { - return amount; - } + /** + * Optional amount to claim rewards (ETH only). If omitted, the wallet will claim the maximum amount available + */ + private String amount; - public void setAmount(String amount) { - this.amount = amount; - } + public WalletClaimRewardsInputs() { + } - public static class Builder { - private String amount; + public WalletClaimRewardsInputs(Builder builder) { + this.amount = builder.amount; + } + public String getAmount() { + return amount; + } - public Builder amount(String amount) { - this.amount = amount; - return this; + public void setAmount(String amount) { + this.amount = amount; } + public static class Builder { + private String amount; - public WalletClaimRewardsInputs build() { - return new WalletClaimRewardsInputs(this); + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public WalletClaimRewardsInputs build() { + return new WalletClaimRewardsInputs(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java index 5991653..71f7ec1 100644 --- a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java @@ -17,163 +17,164 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.Network; import com.coinbase.prime.model.enums.WalletDepositInstructionType; import com.fasterxml.jackson.annotation.JsonProperty; public class WalletCryptoDepositInstructions { - /** The ID of the wallet */ - private String id; - - /** The name of the wallet */ - private String name; - - /** - * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - CRYPTO: A cryptocurrency deposit - WIRE: A wire - * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - - * SEPA: A SEPA deposit (Single Euro Payments Area) - */ - private WalletDepositInstructionType type; - - /** The address of the wallet */ - private String address; - - /** - * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) - */ - @JsonProperty("account_identifier") - private String accountIdentifier; - - /** - * 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`) - */ - @JsonProperty("account_identifier_name") - private String accountIdentifierName; - - private Network network; - - public WalletCryptoDepositInstructions() {} - - public WalletCryptoDepositInstructions(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.type = builder.type; - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - this.accountIdentifierName = builder.accountIdentifierName; - this.network = builder.network; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public WalletDepositInstructionType getType() { - return type; - } - - public void setType(WalletDepositInstructionType type) { - this.type = type; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getAccountIdentifier() { - return accountIdentifier; - } - - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } - - public String getAccountIdentifierName() { - return accountIdentifierName; - } - - public void setAccountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - } - - public Network getNetwork() { - return network; - } - - public void setNetwork(Network network) { - this.network = network; - } - - public static class Builder { + /** + * The ID of the wallet + */ private String id; + /** + * The name of the wallet + */ private String name; + /** + * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value + * - CRYPTO: A cryptocurrency deposit + * - WIRE: A wire deposit + * - SEN: DEPRECATED. A Silvergate Exchange Network deposit + * - SWIFT: A SWIFT deposit + * - SEPA: A SEPA deposit (Single Euro Payments Area) + */ private WalletDepositInstructionType type; + /** + * The address of the wallet + */ private String address; + /** + * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) + */ + @JsonProperty("account_identifier") private String accountIdentifier; + /** + * 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`) + */ + @JsonProperty("account_identifier_name") private String accountIdentifierName; private Network network; - public Builder id(String id) { - this.id = id; - return this; + public WalletCryptoDepositInstructions() { } - public Builder name(String name) { - this.name = name; - return this; + public WalletCryptoDepositInstructions(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.type = builder.type; + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + this.accountIdentifierName = builder.accountIdentifierName; + this.network = builder.network; + } + public String getId() { + return id; } - public Builder type(WalletDepositInstructionType type) { - this.type = type; - return this; + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; } - public Builder address(String address) { - this.address = address; - return this; + public void setName(String name) { + this.name = name; + } + public WalletDepositInstructionType getType() { + return type; } - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; + public void setType(WalletDepositInstructionType type) { + this.type = type; + } + public String getAddress() { + return address; } - public Builder accountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - return this; + public void setAddress(String address) { + this.address = address; + } + public String getAccountIdentifier() { + return accountIdentifier; } - public Builder network(Network network) { - this.network = network; - return this; + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } + public String getAccountIdentifierName() { + return accountIdentifierName; } - public WalletCryptoDepositInstructions build() { - return new WalletCryptoDepositInstructions(this); + public void setAccountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + } + public Network getNetwork() { + return network; + } + + public void setNetwork(Network network) { + this.network = network; + } + public static class Builder { + private String id; + + private String name; + + private WalletDepositInstructionType type; + + private String address; + + private String accountIdentifier; + + private String accountIdentifierName; + + private Network network; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder type(WalletDepositInstructionType type) { + this.type = type; + return this; + } + + public Builder address(String address) { + this.address = address; + return this; + } + + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; + } + + public Builder accountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + return this; + } + + public Builder network(Network network) { + this.network = network; + return this; + } + + public WalletCryptoDepositInstructions build() { + return new WalletCryptoDepositInstructions(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java index 5b8e011..6ca843c 100644 --- a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java @@ -17,140 +17,137 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.WalletDepositInstructionType; import com.fasterxml.jackson.annotation.JsonProperty; public class WalletFiatDepositInstructions { - /** The id of the wallet */ - private String id; - - /** The name of the wallet */ - private String name; - - /** - * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - CRYPTO: A cryptocurrency deposit - WIRE: A wire - * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - - * SEPA: A SEPA deposit (Single Euro Payments Area) - */ - private WalletDepositInstructionType type; - - /** The fiat account number */ - @JsonProperty("account_number") - private String accountNumber; - - /** The fiat routing number */ - @JsonProperty("routing_number") - private String routingNumber; - - /** Reference code to be used as a memo/description */ - @JsonProperty("reference_code") - private String referenceCode; - - public WalletFiatDepositInstructions() {} - - public WalletFiatDepositInstructions(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.type = builder.type; - this.accountNumber = builder.accountNumber; - this.routingNumber = builder.routingNumber; - this.referenceCode = builder.referenceCode; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public WalletDepositInstructionType getType() { - return type; - } - - public void setType(WalletDepositInstructionType type) { - this.type = type; - } - - public String getAccountNumber() { - return accountNumber; - } - - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - - public String getRoutingNumber() { - return routingNumber; - } - - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - - public String getReferenceCode() { - return referenceCode; - } - - public void setReferenceCode(String referenceCode) { - this.referenceCode = referenceCode; - } - - public static class Builder { + /** The id of the wallet */ private String id; + /** The name of the wallet */ private String name; + /** + * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value + * - CRYPTO: A cryptocurrency deposit + * - WIRE: A wire deposit + * - SEN: DEPRECATED. A Silvergate Exchange Network deposit + * - SWIFT: A SWIFT deposit + * - SEPA: A SEPA deposit (Single Euro Payments Area) + */ private WalletDepositInstructionType type; + /** The fiat account number */ + @JsonProperty("account_number") private String accountNumber; + /** The fiat routing number */ + @JsonProperty("routing_number") private String routingNumber; + /** Reference code to be used as a memo/description */ + @JsonProperty("reference_code") private String referenceCode; - public Builder id(String id) { - this.id = id; - return this; + public WalletFiatDepositInstructions() { + } + + public WalletFiatDepositInstructions(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.type = builder.type; + this.accountNumber = builder.accountNumber; + this.routingNumber = builder.routingNumber; + this.referenceCode = builder.referenceCode; + } + public String getId() { + return id; } - public Builder name(String name) { - this.name = name; - return this; + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; } - public Builder type(WalletDepositInstructionType type) { - this.type = type; - return this; + public void setName(String name) { + this.name = name; + } + public WalletDepositInstructionType getType() { + return type; } - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; + public void setType(WalletDepositInstructionType type) { + this.type = type; + } + public String getAccountNumber() { + return accountNumber; } - public Builder routingNumber(String routingNumber) { - this.routingNumber = routingNumber; - return this; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + public String getRoutingNumber() { + return routingNumber; } - public Builder referenceCode(String referenceCode) { - this.referenceCode = referenceCode; - return this; + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + public String getReferenceCode() { + return referenceCode; } - public WalletFiatDepositInstructions build() { - return new WalletFiatDepositInstructions(this); + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + public static class Builder { + private String id; + + private String name; + + private WalletDepositInstructionType type; + + private String accountNumber; + + private String routingNumber; + + private String referenceCode; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder type(WalletDepositInstructionType type) { + this.type = type; + return this; + } + + public Builder accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + public Builder routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; + } + + public Builder referenceCode(String referenceCode) { + this.referenceCode = referenceCode; + return this; + } + + public WalletFiatDepositInstructions build() { + return new WalletFiatDepositInstructions(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java index 58b080a..4e8849a 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java @@ -17,67 +17,63 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** - * WalletStakeInputs contains the custom inputs for staking operations on a wallet. Requirements and - * supported fields vary by asset type. + * WalletStakeInputs contains the custom inputs for staking operations on a wallet. + * Requirements and supported fields vary by asset type. */ public class WalletStakeInputs { - /** - * Optional amount to stake (ETH only). If omitted, the wallet will stake the maximum amount - * available - */ - private String amount; - - /** - * Optional validator address, defaults to Coinbase validator. For SOL, must be the vote account - * address. Ignored for ETH. - */ - @JsonProperty("validator_address") - private String validatorAddress; - - public WalletStakeInputs() {} - - public WalletStakeInputs(Builder builder) { - this.amount = builder.amount; - this.validatorAddress = builder.validatorAddress; - } + /** + * Optional amount to stake (ETH only). If omitted, the wallet will stake the maximum amount available + */ + private String amount; - public String getAmount() { - return amount; - } + /** + * Optional validator address, defaults to Coinbase validator. For SOL, must be the vote account address. Ignored for ETH. + */ + @JsonProperty("validator_address") + private String validatorAddress; - public void setAmount(String amount) { - this.amount = amount; - } + public WalletStakeInputs() { + } - public String getValidatorAddress() { - return validatorAddress; - } + public WalletStakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAddress = builder.validatorAddress; + } + public String getAmount() { + return amount; + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } + public void setAmount(String amount) { + this.amount = amount; + } + public String getValidatorAddress() { + return validatorAddress; + } - public static class Builder { - private String amount; + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } + public static class Builder { + private String amount; - private String validatorAddress; + private String validatorAddress; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } - public WalletStakeInputs build() { - return new WalletStakeInputs(this); + public WalletStakeInputs build() { + return new WalletStakeInputs(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java index f703778..da001ba 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java @@ -17,49 +17,44 @@ */ 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. + * 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; - } + /** + * 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 void setExternalId(String externalId) { - this.externalId = externalId; - } + public WalletStakingMetadata() { + } - public static class Builder { - private String externalId; + public WalletStakingMetadata(Builder builder) { + this.externalId = builder.externalId; + } + public String getExternalId() { + return externalId; + } - public Builder externalId(String externalId) { - this.externalId = externalId; - return this; + public void setExternalId(String externalId) { + this.externalId = externalId; } + public static class Builder { + private String externalId; - public WalletStakingMetadata build() { - return new WalletStakingMetadata(this); + 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 4817ca7..965b95b 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -17,69 +17,65 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.ValidatorAllocation; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** - * WalletUnstakeInputs contains the custom inputs for unstaking operations on a wallet. Requirements - * and supported fields vary by asset type. + * WalletUnstakeInputs contains the custom inputs for unstaking operations on a wallet. + * Requirements and supported fields vary by asset type. */ public class WalletUnstakeInputs { - /** - * Optional amount to unstake (ETH only). If omitted, the wallet will unstake the maximum amount - * available - */ - private String amount; - - /** - * (Alpha) Optional validator-level allocations for ETH V2 unstaking. Allows specifying which - * validators to unstake from and how much. This feature is in alpha. Please reach out to your - * Coinbase Prime account manager for more information - */ - @JsonProperty("validator_allocations") - private List validatorAllocations; - - public WalletUnstakeInputs() {} - - public WalletUnstakeInputs(Builder builder) { - this.amount = builder.amount; - this.validatorAllocations = builder.validatorAllocations; - } + /** + * Optional amount to unstake (ETH only). If omitted, the wallet will unstake the maximum amount available + */ + private String amount; - public String getAmount() { - return amount; - } + /** + * (Alpha) Optional validator-level allocations for ETH V2 unstaking. Allows specifying which validators to unstake from and how much. This feature is in alpha. Please reach out to your Coinbase Prime account manager for more information + */ + @JsonProperty("validator_allocations") + private List validatorAllocations; - public void setAmount(String amount) { - this.amount = amount; - } + public WalletUnstakeInputs() { + } - public List getValidatorAllocations() { - return validatorAllocations; - } + public WalletUnstakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAllocations = builder.validatorAllocations; + } + public String getAmount() { + return amount; + } - public void setValidatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - } + public void setAmount(String amount) { + this.amount = amount; + } + public List getValidatorAllocations() { + return validatorAllocations; + } - public static class Builder { - private String amount; + public void setValidatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + } + public static class Builder { + private String amount; - private List validatorAllocations; + private List validatorAllocations; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public Builder validatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - return this; - } + public Builder validatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + return this; + } - public WalletUnstakeInputs build() { - return new WalletUnstakeInputs(this); + public WalletUnstakeInputs build() { + return new WalletUnstakeInputs(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java index 532669d..cd1950e 100644 --- a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java +++ b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java @@ -19,52 +19,55 @@ package com.coinbase.prime.model; public class WithdrawalPower { - /** The currency symbol */ - private String symbol; - - /** Withdrawal power */ - private String amount; - - public WithdrawalPower() {} - - public WithdrawalPower(Builder builder) { - this.symbol = builder.symbol; - this.amount = builder.amount; - } + /** + * The currency symbol + */ + private String symbol; - public String getSymbol() { - return symbol; - } + /** + * Withdrawal power + */ + private String amount; - public void setSymbol(String symbol) { - this.symbol = symbol; - } + public WithdrawalPower() { + } - public String getAmount() { - return amount; - } + public WithdrawalPower(Builder builder) { + this.symbol = builder.symbol; + this.amount = builder.amount; + } + public String getSymbol() { + return symbol; + } - public void setAmount(String amount) { - this.amount = amount; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } + public String getAmount() { + return amount; + } - public static class Builder { - private String symbol; + public void setAmount(String amount) { + this.amount = amount; + } + public static class Builder { + private String symbol; - private String amount; + private String amount; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public WithdrawalPower build() { - return new WithdrawalPower(this); + public WithdrawalPower build() { + return new WithdrawalPower(this); + } } - } } + diff --git a/src/main/java/com/coinbase/prime/model/XMLoan.java b/src/main/java/com/coinbase/prime/model/XMLoan.java index 2ffa0d0..b148d91 100644 --- a/src/main/java/com/coinbase/prime/model/XMLoan.java +++ b/src/main/java/com/coinbase/prime/model/XMLoan.java @@ -17,184 +17,190 @@ */ package com.coinbase.prime.model; - import com.coinbase.prime.model.enums.XMParty; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** 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; - - /** Loan principal currency */ - @JsonProperty("principal_currency") - private String principalCurrency; - - /** Loan principal currency market price */ - @JsonProperty("principal_currency_market_price") - private String principalCurrencyMarketPrice; - - /** Principal amount (nominal) as of loan initiation */ - @JsonProperty("initial_principal_amount") - private String initialPrincipalAmount; - - /** Current outstanding amount (nominal) */ - @JsonProperty("outstanding_principal_amount") - private String outstandingPrincipalAmount; - - /** Timestamp when the loan was created / initiated */ - @JsonProperty("created_at") - private OffsetDateTime createdAt; - - /** Timestamp when the loan was last updated */ - @JsonProperty("updated_at") - private OffsetDateTime updatedAt; - - public XMLoan() {} - - public XMLoan(Builder builder) { - this.loanId = builder.loanId; - this.loanParty = builder.loanParty; - this.principalCurrency = builder.principalCurrency; - this.principalCurrencyMarketPrice = builder.principalCurrencyMarketPrice; - this.initialPrincipalAmount = builder.initialPrincipalAmount; - this.outstandingPrincipalAmount = builder.outstandingPrincipalAmount; - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - } - - public String getLoanId() { - return loanId; - } - - public void setLoanId(String loanId) { - this.loanId = loanId; - } - - public XMParty getLoanParty() { - return loanParty; - } - - public void setLoanParty(XMParty loanParty) { - this.loanParty = loanParty; - } - - public String getPrincipalCurrency() { - return principalCurrency; - } - - public void setPrincipalCurrency(String principalCurrency) { - this.principalCurrency = principalCurrency; - } - - public String getPrincipalCurrencyMarketPrice() { - return principalCurrencyMarketPrice; - } - - public void setPrincipalCurrencyMarketPrice(String principalCurrencyMarketPrice) { - this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; - } - - public String getInitialPrincipalAmount() { - return initialPrincipalAmount; - } - - public void setInitialPrincipalAmount(String initialPrincipalAmount) { - this.initialPrincipalAmount = initialPrincipalAmount; - } - - public String getOutstandingPrincipalAmount() { - return outstandingPrincipalAmount; - } - - public void setOutstandingPrincipalAmount(String outstandingPrincipalAmount) { - this.outstandingPrincipalAmount = outstandingPrincipalAmount; - } - - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - public static class Builder { + /** + * 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; + /** + * Loan principal currency + */ + @JsonProperty("principal_currency") private String principalCurrency; + /** + * Loan principal currency market price + */ + @JsonProperty("principal_currency_market_price") private String principalCurrencyMarketPrice; + /** + * Principal amount (nominal) as of loan initiation + */ + @JsonProperty("initial_principal_amount") private String initialPrincipalAmount; + /** + * Current outstanding amount (nominal) + */ + @JsonProperty("outstanding_principal_amount") private String outstandingPrincipalAmount; + /** + * Timestamp when the loan was created / initiated + */ + @JsonProperty("created_at") private OffsetDateTime createdAt; + /** + * Timestamp when the loan was last updated + */ + @JsonProperty("updated_at") private OffsetDateTime updatedAt; - public Builder loanId(String loanId) { - this.loanId = loanId; - return this; + public XMLoan() { } - public Builder loanParty(XMParty loanParty) { - this.loanParty = loanParty; - return this; + public XMLoan(Builder builder) { + this.loanId = builder.loanId; + this.loanParty = builder.loanParty; + this.principalCurrency = builder.principalCurrency; + this.principalCurrencyMarketPrice = builder.principalCurrencyMarketPrice; + this.initialPrincipalAmount = builder.initialPrincipalAmount; + this.outstandingPrincipalAmount = builder.outstandingPrincipalAmount; + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + } + public String getLoanId() { + return loanId; } - public Builder principalCurrency(String principalCurrency) { - this.principalCurrency = principalCurrency; - return this; + public void setLoanId(String loanId) { + this.loanId = loanId; + } + public XMParty getLoanParty() { + return loanParty; } - public Builder principalCurrencyMarketPrice(String principalCurrencyMarketPrice) { - this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; - return this; + public void setLoanParty(XMParty loanParty) { + this.loanParty = loanParty; + } + public String getPrincipalCurrency() { + return principalCurrency; } - public Builder initialPrincipalAmount(String initialPrincipalAmount) { - this.initialPrincipalAmount = initialPrincipalAmount; - return this; + public void setPrincipalCurrency(String principalCurrency) { + this.principalCurrency = principalCurrency; + } + public String getPrincipalCurrencyMarketPrice() { + return principalCurrencyMarketPrice; } - public Builder outstandingPrincipalAmount(String outstandingPrincipalAmount) { - this.outstandingPrincipalAmount = outstandingPrincipalAmount; - return this; + public void setPrincipalCurrencyMarketPrice(String principalCurrencyMarketPrice) { + this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; + } + public String getInitialPrincipalAmount() { + return initialPrincipalAmount; } - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; + public void setInitialPrincipalAmount(String initialPrincipalAmount) { + this.initialPrincipalAmount = initialPrincipalAmount; + } + public String getOutstandingPrincipalAmount() { + return outstandingPrincipalAmount; } - public Builder updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; + public void setOutstandingPrincipalAmount(String outstandingPrincipalAmount) { + this.outstandingPrincipalAmount = outstandingPrincipalAmount; + } + public OffsetDateTime getCreatedAt() { + return createdAt; } - public XMLoan build() { - return new XMLoan(this); + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + public static class Builder { + private String loanId; + + private XMParty loanParty; + + private String principalCurrency; + + private String principalCurrencyMarketPrice; + + private String initialPrincipalAmount; + + private String outstandingPrincipalAmount; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + public Builder loanId(String loanId) { + this.loanId = loanId; + return this; + } + + public Builder loanParty(XMParty loanParty) { + this.loanParty = loanParty; + return this; + } + + public Builder principalCurrency(String principalCurrency) { + this.principalCurrency = principalCurrency; + return this; + } + + public Builder principalCurrencyMarketPrice(String principalCurrencyMarketPrice) { + this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; + return this; + } + + public Builder initialPrincipalAmount(String initialPrincipalAmount) { + this.initialPrincipalAmount = initialPrincipalAmount; + return this; + } + + public Builder outstandingPrincipalAmount(String outstandingPrincipalAmount) { + this.outstandingPrincipalAmount = outstandingPrincipalAmount; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return 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 index 31455a3..fe5603f 100644 --- a/src/main/java/com/coinbase/prime/model/XMMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/XMMarginCall.java @@ -17,261 +17,261 @@ */ 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.XMSummary; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** 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 */ - private String currency; - - /** Call amount (notional) as of the margin call creation */ - @JsonProperty("initial_notional_amount") - private String initialNotionalAmount; - - /** Current outstanding call amount (notional) */ - @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; - - /** - * - 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; - - /** - * - 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; - - /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ - @JsonProperty("called_with_margin_summary") - private XMSummary calledWithMarginSummary; - - /** Timestamp when the margin call settlement is due */ - @JsonProperty("due_at") - private OffsetDateTime dueAt; - - /** Timestamp when the margin call was created */ - @JsonProperty("created_at") - private OffsetDateTime createdAt; - - /** Timestamp when the margin call was last updated */ - @JsonProperty("updated_at") - private OffsetDateTime updatedAt; - - public XMMarginCall() {} - - public XMMarginCall(Builder builder) { - this.marginCallId = builder.marginCallId; - this.currency = builder.currency; - this.initialNotionalAmount = builder.initialNotionalAmount; - this.outstandingNotionalAmount = builder.outstandingNotionalAmount; - this.marginCallType = builder.marginCallType; - this.marginCallStatus = builder.marginCallStatus; - this.calledWithMarginLevel = builder.calledWithMarginLevel; - this.calledWithMarginSummary = builder.calledWithMarginSummary; - this.dueAt = builder.dueAt; - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - } - - public String getMarginCallId() { - return marginCallId; - } - - public void setMarginCallId(String marginCallId) { - this.marginCallId = marginCallId; - } - - public String getCurrency() { - return currency; - } - - public void setCurrency(String currency) { - this.currency = currency; - } - - public String getInitialNotionalAmount() { - return initialNotionalAmount; - } - - public void setInitialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - } - - public String getOutstandingNotionalAmount() { - return outstandingNotionalAmount; - } - - public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - } - - public XMCallType getMarginCallType() { - return marginCallType; - } - - public void setMarginCallType(XMCallType marginCallType) { - this.marginCallType = marginCallType; - } - - public XMCallStatus getMarginCallStatus() { - return marginCallStatus; - } - - public void setMarginCallStatus(XMCallStatus marginCallStatus) { - this.marginCallStatus = marginCallStatus; - } - - public XMMarginLevel getCalledWithMarginLevel() { - return calledWithMarginLevel; - } - - public void setCalledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { - this.calledWithMarginLevel = calledWithMarginLevel; - } - - public XMSummary getCalledWithMarginSummary() { - return calledWithMarginSummary; - } - - public void setCalledWithMarginSummary(XMSummary calledWithMarginSummary) { - this.calledWithMarginSummary = calledWithMarginSummary; - } - - public OffsetDateTime getDueAt() { - return dueAt; - } - - public void setDueAt(OffsetDateTime dueAt) { - this.dueAt = dueAt; - } - - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - - public static class Builder { + /** + * Financing margin call UUID + */ + @JsonProperty("margin_call_id") private String marginCallId; + /** + * Margin call currency + */ private String currency; + /** + * Call amount (notional) as of the margin call creation + */ + @JsonProperty("initial_notional_amount") private String initialNotionalAmount; + /** + * Current outstanding call amount (notional) + */ + @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; + /** + * - 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; + /** + * - 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; + /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ + @JsonProperty("called_with_margin_summary") private XMSummary calledWithMarginSummary; + /** + * Timestamp when the margin call settlement is due + */ + @JsonProperty("due_at") private OffsetDateTime dueAt; + /** + * Timestamp when the margin call was created + */ + @JsonProperty("created_at") private OffsetDateTime createdAt; + /** + * Timestamp when the margin call was last updated + */ + @JsonProperty("updated_at") private OffsetDateTime updatedAt; - public Builder marginCallId(String marginCallId) { - this.marginCallId = marginCallId; - return this; + public XMMarginCall() { } - public Builder currency(String currency) { - this.currency = currency; - return this; + public XMMarginCall(Builder builder) { + this.marginCallId = builder.marginCallId; + this.currency = builder.currency; + this.initialNotionalAmount = builder.initialNotionalAmount; + this.outstandingNotionalAmount = builder.outstandingNotionalAmount; + this.marginCallType = builder.marginCallType; + this.marginCallStatus = builder.marginCallStatus; + this.calledWithMarginLevel = builder.calledWithMarginLevel; + this.calledWithMarginSummary = builder.calledWithMarginSummary; + this.dueAt = builder.dueAt; + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + } + public String getMarginCallId() { + return marginCallId; } - public Builder initialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - return this; + public void setMarginCallId(String marginCallId) { + this.marginCallId = marginCallId; + } + public String getCurrency() { + return currency; } - public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - return this; + public void setCurrency(String currency) { + this.currency = currency; + } + public String getInitialNotionalAmount() { + return initialNotionalAmount; } - public Builder marginCallType(XMCallType marginCallType) { - this.marginCallType = marginCallType; - return this; + public void setInitialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + } + public String getOutstandingNotionalAmount() { + return outstandingNotionalAmount; } - public Builder marginCallStatus(XMCallStatus marginCallStatus) { - this.marginCallStatus = marginCallStatus; - return this; + public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + } + public XMCallType getMarginCallType() { + return marginCallType; } - public Builder calledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { - this.calledWithMarginLevel = calledWithMarginLevel; - return this; + public void setMarginCallType(XMCallType marginCallType) { + this.marginCallType = marginCallType; + } + public XMCallStatus getMarginCallStatus() { + return marginCallStatus; } - public Builder calledWithMarginSummary(XMSummary calledWithMarginSummary) { - this.calledWithMarginSummary = calledWithMarginSummary; - return this; + public void setMarginCallStatus(XMCallStatus marginCallStatus) { + this.marginCallStatus = marginCallStatus; + } + public XMMarginLevel getCalledWithMarginLevel() { + return calledWithMarginLevel; } - public Builder dueAt(OffsetDateTime dueAt) { - this.dueAt = dueAt; - return this; + public void setCalledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { + this.calledWithMarginLevel = calledWithMarginLevel; + } + public XMSummary getCalledWithMarginSummary() { + return calledWithMarginSummary; } - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; + public void setCalledWithMarginSummary(XMSummary calledWithMarginSummary) { + this.calledWithMarginSummary = calledWithMarginSummary; + } + public OffsetDateTime getDueAt() { + return dueAt; } - public Builder updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - return this; + public void setDueAt(OffsetDateTime dueAt) { + this.dueAt = dueAt; } + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + public static class Builder { + private String marginCallId; + + private String currency; + + private String initialNotionalAmount; + + private String outstandingNotionalAmount; - public XMMarginCall build() { - return new XMMarginCall(this); + private XMCallType marginCallType; + + private XMCallStatus marginCallStatus; + + private XMMarginLevel calledWithMarginLevel; + + private XMSummary calledWithMarginSummary; + + private OffsetDateTime dueAt; + + private OffsetDateTime createdAt; + + private OffsetDateTime updatedAt; + + public Builder marginCallId(String marginCallId) { + this.marginCallId = marginCallId; + return this; + } + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + public Builder initialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + return this; + } + + public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + return this; + } + + public Builder marginCallType(XMCallType marginCallType) { + this.marginCallType = marginCallType; + return this; + } + + public Builder marginCallStatus(XMCallStatus marginCallStatus) { + this.marginCallStatus = marginCallStatus; + return this; + } + + public Builder calledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { + this.calledWithMarginLevel = calledWithMarginLevel; + return this; + } + + public Builder calledWithMarginSummary(XMSummary calledWithMarginSummary) { + this.calledWithMarginSummary = calledWithMarginSummary; + return this; + } + + public Builder dueAt(OffsetDateTime dueAt) { + this.dueAt = dueAt; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return 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 index 89cc692..1f67ec5 100644 --- a/src/main/java/com/coinbase/prime/model/XMPosition.java +++ b/src/main/java/com/coinbase/prime/model/XMPosition.java @@ -17,518 +17,543 @@ */ package com.coinbase.prime.model; - import com.fasterxml.jackson.annotation.JsonProperty; /** XMPosition */ public class XMPosition { - /** Position currency */ - private String currency; - - /** Current market price */ - @JsonProperty("market_price") - private String marketPrice; - - /** True if margin eligible, false otherwise */ - @JsonProperty("margin_eligible") - private boolean marginEligible; - - /** Total market capitalization */ - @JsonProperty("market_cap") - private String marketCap; - - /** Average daily volume calculated over a 30-day period */ - @JsonProperty("adv30_days") - private String adv30Days; - - /** Historic volatility calculated over a 5-day period */ - @JsonProperty("hist5d_vol") - private String hist5dVol; - - /** Historic volatility calculated over a 30-day period */ - @JsonProperty("hist30d_vol") - private String hist30dVol; - - /** Historic volatility calculated over a 90-day period */ - @JsonProperty("hist90d_vol") - private String hist90dVol; - - /** Base margin requirement for the specific asset */ - @JsonProperty("margin_requirement") - private String marginRequirement; - - /** XM spot balance nominal */ - @JsonProperty("spot_balance") - private String spotBalance; - - /** XM spot balance notional */ - @JsonProperty("spot_balance_notional") - private String spotBalanceNotional; - - /** Pre-netted spot total position margin */ - @JsonProperty("spot_total_position_margin") - private String spotTotalPositionMargin; - - /** XM futures balance nominal */ - @JsonProperty("futures_balance") - private String futuresBalance; - - /** XM futures balance notional */ - @JsonProperty("futures_balance_notional") - private String futuresBalanceNotional; - - /** Pre-netted futures total position margin */ - @JsonProperty("futures_total_position_margin") - private String futuresTotalPositionMargin; - - /** Basis GMV = |futures| + |spot| - |unnetted position| */ - @JsonProperty("gmv_basis") - private String gmvBasis; - - /** Base margin requirement notional */ - @JsonProperty("base_requirement") - private String baseRequirement; - - /** Effective liquidity add-on for the short positions */ - @JsonProperty("liq_shorts_add_on") - private String liqShortsAddOn; - - /** Effective liquidity add-on for the long positions */ - @JsonProperty("liq_longs_add_on") - private String liqLongsAddOn; - - /** Effective volatility add-on for the short positions */ - @JsonProperty("vol_shorts_add_on") - private String volShortsAddOn; - - /** Effective volatility add-on for the long positions */ - @JsonProperty("vol_longs_add_on") - private String volLongsAddOn; - - /** 5-day volatility add-on */ - @JsonProperty("vol5days_add_on") - private String vol5daysAddOn; - - /** 30-day volatility add-on */ - @JsonProperty("vol30days_add_on") - private String vol30daysAddOn; - - /** 90-day volatility add-on */ - @JsonProperty("vol90days_add_on") - private String vol90daysAddOn; - - /** Total margin required */ - @JsonProperty("total_position_margin") - private String totalPositionMargin; - - public XMPosition() {} - - public XMPosition(Builder builder) { - this.currency = builder.currency; - this.marketPrice = builder.marketPrice; - this.marginEligible = builder.marginEligible; - this.marketCap = builder.marketCap; - this.adv30Days = builder.adv30Days; - this.hist5dVol = builder.hist5dVol; - this.hist30dVol = builder.hist30dVol; - this.hist90dVol = builder.hist90dVol; - this.marginRequirement = builder.marginRequirement; - this.spotBalance = builder.spotBalance; - this.spotBalanceNotional = builder.spotBalanceNotional; - this.spotTotalPositionMargin = builder.spotTotalPositionMargin; - this.futuresBalance = builder.futuresBalance; - this.futuresBalanceNotional = builder.futuresBalanceNotional; - this.futuresTotalPositionMargin = builder.futuresTotalPositionMargin; - this.gmvBasis = builder.gmvBasis; - this.baseRequirement = builder.baseRequirement; - this.liqShortsAddOn = builder.liqShortsAddOn; - this.liqLongsAddOn = builder.liqLongsAddOn; - this.volShortsAddOn = builder.volShortsAddOn; - this.volLongsAddOn = builder.volLongsAddOn; - this.vol5daysAddOn = builder.vol5daysAddOn; - this.vol30daysAddOn = builder.vol30daysAddOn; - this.vol90daysAddOn = builder.vol90daysAddOn; - this.totalPositionMargin = builder.totalPositionMargin; - } - - 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 boolean getMarginEligible() { - return marginEligible; - } - - public void setMarginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - } - - public String getMarketCap() { - return marketCap; - } - - public void setMarketCap(String marketCap) { - this.marketCap = marketCap; - } - - public String getAdv30Days() { - return adv30Days; - } - - public void setAdv30Days(String adv30Days) { - this.adv30Days = adv30Days; - } - - public String getHist5dVol() { - return hist5dVol; - } - - public void setHist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - } - - public String getHist30dVol() { - return hist30dVol; - } - - public void setHist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - } - - public String getHist90dVol() { - return hist90dVol; - } - - public void setHist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - } - - public String getMarginRequirement() { - return marginRequirement; - } - - public void setMarginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - } - - 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 getSpotTotalPositionMargin() { - return spotTotalPositionMargin; - } - - public void setSpotTotalPositionMargin(String spotTotalPositionMargin) { - this.spotTotalPositionMargin = spotTotalPositionMargin; - } - - 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 getFuturesTotalPositionMargin() { - return futuresTotalPositionMargin; - } - - public void setFuturesTotalPositionMargin(String futuresTotalPositionMargin) { - this.futuresTotalPositionMargin = futuresTotalPositionMargin; - } - - public String getGmvBasis() { - return gmvBasis; - } - - public void setGmvBasis(String gmvBasis) { - this.gmvBasis = gmvBasis; - } - - public String getBaseRequirement() { - return baseRequirement; - } - - public void setBaseRequirement(String baseRequirement) { - this.baseRequirement = baseRequirement; - } - - public String getLiqShortsAddOn() { - return liqShortsAddOn; - } - - public void setLiqShortsAddOn(String liqShortsAddOn) { - this.liqShortsAddOn = liqShortsAddOn; - } - - public String getLiqLongsAddOn() { - return liqLongsAddOn; - } - - public void setLiqLongsAddOn(String liqLongsAddOn) { - this.liqLongsAddOn = liqLongsAddOn; - } - - public String getVolShortsAddOn() { - return volShortsAddOn; - } - - public void setVolShortsAddOn(String volShortsAddOn) { - this.volShortsAddOn = volShortsAddOn; - } - - public String getVolLongsAddOn() { - return volLongsAddOn; - } - - public void setVolLongsAddOn(String volLongsAddOn) { - this.volLongsAddOn = volLongsAddOn; - } - - public String getVol5daysAddOn() { - return vol5daysAddOn; - } - - public void setVol5daysAddOn(String vol5daysAddOn) { - this.vol5daysAddOn = vol5daysAddOn; - } - - public String getVol30daysAddOn() { - return vol30daysAddOn; - } - - public void setVol30daysAddOn(String vol30daysAddOn) { - this.vol30daysAddOn = vol30daysAddOn; - } - - public String getVol90daysAddOn() { - return vol90daysAddOn; - } - - public void setVol90daysAddOn(String vol90daysAddOn) { - this.vol90daysAddOn = vol90daysAddOn; - } - - public String getTotalPositionMargin() { - return totalPositionMargin; - } - - public void setTotalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - } - - public static class Builder { + /** + * Position currency + */ private String currency; + /** + * Current market price + */ + @JsonProperty("market_price") private String marketPrice; + /** + * True if margin eligible, false otherwise + */ + @JsonProperty("margin_eligible") private boolean marginEligible; + /** + * Total market capitalization + */ + @JsonProperty("market_cap") private String marketCap; + /** + * Average daily volume calculated over a 30-day period + */ + @JsonProperty("adv30_days") private String adv30Days; + /** + * Historic volatility calculated over a 5-day period + */ + @JsonProperty("hist5d_vol") private String hist5dVol; + /** + * Historic volatility calculated over a 30-day period + */ + @JsonProperty("hist30d_vol") private String hist30dVol; + /** + * Historic volatility calculated over a 90-day period + */ + @JsonProperty("hist90d_vol") private String hist90dVol; + /** + * Base margin requirement for the specific asset + */ + @JsonProperty("margin_requirement") private String marginRequirement; + /** + * XM spot balance nominal + */ + @JsonProperty("spot_balance") private String spotBalance; + /** + * XM spot balance notional + */ + @JsonProperty("spot_balance_notional") private String spotBalanceNotional; + /** + * Pre-netted spot total position margin + */ + @JsonProperty("spot_total_position_margin") private String spotTotalPositionMargin; + /** + * XM futures balance nominal + */ + @JsonProperty("futures_balance") private String futuresBalance; + /** + * XM futures balance notional + */ + @JsonProperty("futures_balance_notional") private String futuresBalanceNotional; + /** + * Pre-netted futures total position margin + */ + @JsonProperty("futures_total_position_margin") private String futuresTotalPositionMargin; + /** + * Basis GMV = |futures| + |spot| - |unnetted position| + */ + @JsonProperty("gmv_basis") private String gmvBasis; + /** + * Base margin requirement notional + */ + @JsonProperty("base_requirement") private String baseRequirement; + /** + * Effective liquidity add-on for the short positions + */ + @JsonProperty("liq_shorts_add_on") private String liqShortsAddOn; + /** + * Effective liquidity add-on for the long positions + */ + @JsonProperty("liq_longs_add_on") private String liqLongsAddOn; + /** + * Effective volatility add-on for the short positions + */ + @JsonProperty("vol_shorts_add_on") private String volShortsAddOn; + /** + * Effective volatility add-on for the long positions + */ + @JsonProperty("vol_longs_add_on") private String volLongsAddOn; + /** + * 5-day volatility add-on + */ + @JsonProperty("vol5days_add_on") private String vol5daysAddOn; + /** + * 30-day volatility add-on + */ + @JsonProperty("vol30days_add_on") private String vol30daysAddOn; + /** + * 90-day volatility add-on + */ + @JsonProperty("vol90days_add_on") private String vol90daysAddOn; + /** + * Total margin required + */ + @JsonProperty("total_position_margin") private String totalPositionMargin; - public Builder currency(String currency) { - this.currency = currency; - return this; + public XMPosition() { } - public Builder marketPrice(String marketPrice) { - this.marketPrice = marketPrice; - return this; + public XMPosition(Builder builder) { + this.currency = builder.currency; + this.marketPrice = builder.marketPrice; + this.marginEligible = builder.marginEligible; + this.marketCap = builder.marketCap; + this.adv30Days = builder.adv30Days; + this.hist5dVol = builder.hist5dVol; + this.hist30dVol = builder.hist30dVol; + this.hist90dVol = builder.hist90dVol; + this.marginRequirement = builder.marginRequirement; + this.spotBalance = builder.spotBalance; + this.spotBalanceNotional = builder.spotBalanceNotional; + this.spotTotalPositionMargin = builder.spotTotalPositionMargin; + this.futuresBalance = builder.futuresBalance; + this.futuresBalanceNotional = builder.futuresBalanceNotional; + this.futuresTotalPositionMargin = builder.futuresTotalPositionMargin; + this.gmvBasis = builder.gmvBasis; + this.baseRequirement = builder.baseRequirement; + this.liqShortsAddOn = builder.liqShortsAddOn; + this.liqLongsAddOn = builder.liqLongsAddOn; + this.volShortsAddOn = builder.volShortsAddOn; + this.volLongsAddOn = builder.volLongsAddOn; + this.vol5daysAddOn = builder.vol5daysAddOn; + this.vol30daysAddOn = builder.vol30daysAddOn; + this.vol90daysAddOn = builder.vol90daysAddOn; + this.totalPositionMargin = builder.totalPositionMargin; + } + public String getCurrency() { + return currency; } - public Builder marginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - return this; + public void setCurrency(String currency) { + this.currency = currency; + } + public String getMarketPrice() { + return marketPrice; } - public Builder marketCap(String marketCap) { - this.marketCap = marketCap; - return this; + public void setMarketPrice(String marketPrice) { + this.marketPrice = marketPrice; + } + public boolean getMarginEligible() { + return marginEligible; } - public Builder adv30Days(String adv30Days) { - this.adv30Days = adv30Days; - return this; + public void setMarginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + } + public String getMarketCap() { + return marketCap; } - public Builder hist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - return this; + public void setMarketCap(String marketCap) { + this.marketCap = marketCap; + } + public String getAdv30Days() { + return adv30Days; } - public Builder hist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - return this; + public void setAdv30Days(String adv30Days) { + this.adv30Days = adv30Days; + } + public String getHist5dVol() { + return hist5dVol; } - public Builder hist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - return this; + public void setHist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + } + public String getHist30dVol() { + return hist30dVol; } - public Builder marginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - return this; + public void setHist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + } + public String getHist90dVol() { + return hist90dVol; } - public Builder spotBalance(String spotBalance) { - this.spotBalance = spotBalance; - return this; + public void setHist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + } + public String getMarginRequirement() { + return marginRequirement; } - public Builder spotBalanceNotional(String spotBalanceNotional) { - this.spotBalanceNotional = spotBalanceNotional; - return this; + public void setMarginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + } + public String getSpotBalance() { + return spotBalance; } - public Builder spotTotalPositionMargin(String spotTotalPositionMargin) { - this.spotTotalPositionMargin = spotTotalPositionMargin; - return this; + public void setSpotBalance(String spotBalance) { + this.spotBalance = spotBalance; + } + public String getSpotBalanceNotional() { + return spotBalanceNotional; } - public Builder futuresBalance(String futuresBalance) { - this.futuresBalance = futuresBalance; - return this; + public void setSpotBalanceNotional(String spotBalanceNotional) { + this.spotBalanceNotional = spotBalanceNotional; + } + public String getSpotTotalPositionMargin() { + return spotTotalPositionMargin; } - public Builder futuresBalanceNotional(String futuresBalanceNotional) { - this.futuresBalanceNotional = futuresBalanceNotional; - return this; + public void setSpotTotalPositionMargin(String spotTotalPositionMargin) { + this.spotTotalPositionMargin = spotTotalPositionMargin; + } + public String getFuturesBalance() { + return futuresBalance; } - public Builder futuresTotalPositionMargin(String futuresTotalPositionMargin) { - this.futuresTotalPositionMargin = futuresTotalPositionMargin; - return this; + public void setFuturesBalance(String futuresBalance) { + this.futuresBalance = futuresBalance; + } + public String getFuturesBalanceNotional() { + return futuresBalanceNotional; } - public Builder gmvBasis(String gmvBasis) { - this.gmvBasis = gmvBasis; - return this; + public void setFuturesBalanceNotional(String futuresBalanceNotional) { + this.futuresBalanceNotional = futuresBalanceNotional; + } + public String getFuturesTotalPositionMargin() { + return futuresTotalPositionMargin; } - public Builder baseRequirement(String baseRequirement) { - this.baseRequirement = baseRequirement; - return this; + public void setFuturesTotalPositionMargin(String futuresTotalPositionMargin) { + this.futuresTotalPositionMargin = futuresTotalPositionMargin; + } + public String getGmvBasis() { + return gmvBasis; } - public Builder liqShortsAddOn(String liqShortsAddOn) { - this.liqShortsAddOn = liqShortsAddOn; - return this; + public void setGmvBasis(String gmvBasis) { + this.gmvBasis = gmvBasis; + } + public String getBaseRequirement() { + return baseRequirement; } - public Builder liqLongsAddOn(String liqLongsAddOn) { - this.liqLongsAddOn = liqLongsAddOn; - return this; + public void setBaseRequirement(String baseRequirement) { + this.baseRequirement = baseRequirement; + } + public String getLiqShortsAddOn() { + return liqShortsAddOn; } - public Builder volShortsAddOn(String volShortsAddOn) { - this.volShortsAddOn = volShortsAddOn; - return this; + public void setLiqShortsAddOn(String liqShortsAddOn) { + this.liqShortsAddOn = liqShortsAddOn; + } + public String getLiqLongsAddOn() { + return liqLongsAddOn; } - public Builder volLongsAddOn(String volLongsAddOn) { - this.volLongsAddOn = volLongsAddOn; - return this; + public void setLiqLongsAddOn(String liqLongsAddOn) { + this.liqLongsAddOn = liqLongsAddOn; + } + public String getVolShortsAddOn() { + return volShortsAddOn; } - public Builder vol5daysAddOn(String vol5daysAddOn) { - this.vol5daysAddOn = vol5daysAddOn; - return this; + public void setVolShortsAddOn(String volShortsAddOn) { + this.volShortsAddOn = volShortsAddOn; + } + public String getVolLongsAddOn() { + return volLongsAddOn; } - public Builder vol30daysAddOn(String vol30daysAddOn) { - this.vol30daysAddOn = vol30daysAddOn; - return this; + public void setVolLongsAddOn(String volLongsAddOn) { + this.volLongsAddOn = volLongsAddOn; + } + public String getVol5daysAddOn() { + return vol5daysAddOn; } - public Builder vol90daysAddOn(String vol90daysAddOn) { - this.vol90daysAddOn = vol90daysAddOn; - return this; + public void setVol5daysAddOn(String vol5daysAddOn) { + this.vol5daysAddOn = vol5daysAddOn; + } + public String getVol30daysAddOn() { + return vol30daysAddOn; } - public Builder totalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - return this; + public void setVol30daysAddOn(String vol30daysAddOn) { + this.vol30daysAddOn = vol30daysAddOn; + } + public String getVol90daysAddOn() { + return vol90daysAddOn; + } + + public void setVol90daysAddOn(String vol90daysAddOn) { + this.vol90daysAddOn = vol90daysAddOn; + } + public String getTotalPositionMargin() { + return totalPositionMargin; } - public XMPosition build() { - return new XMPosition(this); + public void setTotalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + } + public static class Builder { + private String currency; + + private String marketPrice; + + private boolean marginEligible; + + private String marketCap; + + private String adv30Days; + + private String hist5dVol; + + private String hist30dVol; + + private String hist90dVol; + + private String marginRequirement; + + private String spotBalance; + + private String spotBalanceNotional; + + private String spotTotalPositionMargin; + + private String futuresBalance; + + private String futuresBalanceNotional; + + private String futuresTotalPositionMargin; + + private String gmvBasis; + + private String baseRequirement; + + private String liqShortsAddOn; + + private String liqLongsAddOn; + + private String volShortsAddOn; + + private String volLongsAddOn; + + private String vol5daysAddOn; + + private String vol30daysAddOn; + + private String vol90daysAddOn; + + private String totalPositionMargin; + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + public Builder marketPrice(String marketPrice) { + this.marketPrice = marketPrice; + return this; + } + + public Builder marginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + return this; + } + + public Builder marketCap(String marketCap) { + this.marketCap = marketCap; + return this; + } + + public Builder adv30Days(String adv30Days) { + this.adv30Days = adv30Days; + return this; + } + + public Builder hist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + return this; + } + + public Builder hist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + return this; + } + + public Builder hist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + return this; + } + + public Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + return this; + } + + public Builder spotBalance(String spotBalance) { + this.spotBalance = spotBalance; + return this; + } + + public Builder spotBalanceNotional(String spotBalanceNotional) { + this.spotBalanceNotional = spotBalanceNotional; + return this; + } + + public Builder spotTotalPositionMargin(String spotTotalPositionMargin) { + this.spotTotalPositionMargin = spotTotalPositionMargin; + return this; + } + + public Builder futuresBalance(String futuresBalance) { + this.futuresBalance = futuresBalance; + return this; + } + + public Builder futuresBalanceNotional(String futuresBalanceNotional) { + this.futuresBalanceNotional = futuresBalanceNotional; + return this; + } + + public Builder futuresTotalPositionMargin(String futuresTotalPositionMargin) { + this.futuresTotalPositionMargin = futuresTotalPositionMargin; + return this; + } + + public Builder gmvBasis(String gmvBasis) { + this.gmvBasis = gmvBasis; + return this; + } + + public Builder baseRequirement(String baseRequirement) { + this.baseRequirement = baseRequirement; + return this; + } + + public Builder liqShortsAddOn(String liqShortsAddOn) { + this.liqShortsAddOn = liqShortsAddOn; + return this; + } + + public Builder liqLongsAddOn(String liqLongsAddOn) { + this.liqLongsAddOn = liqLongsAddOn; + return this; + } + + public Builder volShortsAddOn(String volShortsAddOn) { + this.volShortsAddOn = volShortsAddOn; + return this; + } + + public Builder volLongsAddOn(String volLongsAddOn) { + this.volLongsAddOn = volLongsAddOn; + return this; + } + + public Builder vol5daysAddOn(String vol5daysAddOn) { + this.vol5daysAddOn = vol5daysAddOn; + return this; + } + + public Builder vol30daysAddOn(String vol30daysAddOn) { + this.vol30daysAddOn = vol30daysAddOn; + return this; + } + + public Builder vol90daysAddOn(String vol90daysAddOn) { + this.vol90daysAddOn = vol90daysAddOn; + return this; + } + + public Builder totalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + return 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 index 4c7069e..5005a1b 100644 --- a/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java @@ -17,312 +17,312 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.MarginAddOn; +import com.coinbase.prime.model.XMPosition; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; 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("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, via the XM model with - * one-leg netting - */ - @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; - - /** Position margin requirement for all spot positions */ - @JsonProperty("position_margin_requirement") - private String positionMarginRequirement; - - /** Portfolio margin addon for all spot positions */ - @JsonProperty("portfolio_margin_addon") - private String portfolioMarginAddon; - - /** Position margin requirement for spot + futures positions */ - @JsonProperty("integrated_position_margin_requirement") - private String integratedPositionMarginRequirement; - - /** Portfolio margin addon for spot + futures positions */ - @JsonProperty("integrated_portfolio_margin_addon") - private String integratedPortfolioMarginAddon; - - /** Post-netting USD notional for all futures positions */ - @JsonProperty("netted_futures_notional") - private String nettedFuturesNotional; - - /** Total basis gross market value of all XM-eligible positions (i.e. crypto underliers) */ - @JsonProperty("total_gmv_basis") - private String totalGmvBasis; - - /** Integrated Portfolio Margin cash balance */ - @JsonProperty("ipm_cash_balance") - private String ipmCashBalance; - - @JsonProperty("integrated_scenario_addon") - private MarginAddOn integratedScenarioAddon; - - /** All integrated scenario add-ons */ - @JsonProperty("all_integrated_scenario_addons") - private List allIntegratedScenarioAddons; - - /** Netted positions used in the model calculation */ - @JsonProperty("xm_positions") - private List xmPositions; - - public XMRiskNettingInfo() {} - - public XMRiskNettingInfo(Builder builder) { - this.dcoMarginRequirement = builder.dcoMarginRequirement; - this.portfolioMarginRequirement = builder.portfolioMarginRequirement; - this.integratedPortfolioMarginRequirement = builder.integratedPortfolioMarginRequirement; - this.ineligibleFuturesMarginRequirement = builder.ineligibleFuturesMarginRequirement; - this.positionMarginRequirement = builder.positionMarginRequirement; - this.portfolioMarginAddon = builder.portfolioMarginAddon; - this.integratedPositionMarginRequirement = builder.integratedPositionMarginRequirement; - this.integratedPortfolioMarginAddon = builder.integratedPortfolioMarginAddon; - this.nettedFuturesNotional = builder.nettedFuturesNotional; - this.totalGmvBasis = builder.totalGmvBasis; - this.ipmCashBalance = builder.ipmCashBalance; - this.integratedScenarioAddon = builder.integratedScenarioAddon; - this.allIntegratedScenarioAddons = builder.allIntegratedScenarioAddons; - 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 String getPositionMarginRequirement() { - return positionMarginRequirement; - } - - public void setPositionMarginRequirement(String positionMarginRequirement) { - this.positionMarginRequirement = positionMarginRequirement; - } - - public String getPortfolioMarginAddon() { - return portfolioMarginAddon; - } - - public void setPortfolioMarginAddon(String portfolioMarginAddon) { - this.portfolioMarginAddon = portfolioMarginAddon; - } - - public String getIntegratedPositionMarginRequirement() { - return integratedPositionMarginRequirement; - } - - public void setIntegratedPositionMarginRequirement(String integratedPositionMarginRequirement) { - this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; - } - - public String getIntegratedPortfolioMarginAddon() { - return integratedPortfolioMarginAddon; - } - - public void setIntegratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { - this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; - } - - public String getNettedFuturesNotional() { - return nettedFuturesNotional; - } - - public void setNettedFuturesNotional(String nettedFuturesNotional) { - this.nettedFuturesNotional = nettedFuturesNotional; - } - - public String getTotalGmvBasis() { - return totalGmvBasis; - } - - public void setTotalGmvBasis(String totalGmvBasis) { - this.totalGmvBasis = totalGmvBasis; - } - - public String getIpmCashBalance() { - return ipmCashBalance; - } - - public void setIpmCashBalance(String ipmCashBalance) { - this.ipmCashBalance = ipmCashBalance; - } - - public MarginAddOn getIntegratedScenarioAddon() { - return integratedScenarioAddon; - } - - public void setIntegratedScenarioAddon(MarginAddOn integratedScenarioAddon) { - this.integratedScenarioAddon = integratedScenarioAddon; - } - - public List getAllIntegratedScenarioAddons() { - return allIntegratedScenarioAddons; - } - - public void setAllIntegratedScenarioAddons(List allIntegratedScenarioAddons) { - this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; - } - - public List getXMPositions() { - return xmPositions; - } - - public void setXMPositions(List xmPositions) { - this.xmPositions = xmPositions; - } - - public static class Builder { + /** + * 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, via the XM model with one-leg netting + */ + @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; + /** + * Position margin requirement for all spot positions + */ + @JsonProperty("position_margin_requirement") private String positionMarginRequirement; + /** + * Portfolio margin addon for all spot positions + */ + @JsonProperty("portfolio_margin_addon") private String portfolioMarginAddon; + /** + * Position margin requirement for spot + futures positions + */ + @JsonProperty("integrated_position_margin_requirement") private String integratedPositionMarginRequirement; + /** + * Portfolio margin addon for spot + futures positions + */ + @JsonProperty("integrated_portfolio_margin_addon") private String integratedPortfolioMarginAddon; + /** + * Post-netting USD notional for all futures positions + */ + @JsonProperty("netted_futures_notional") private String nettedFuturesNotional; + /** + * Total basis gross market value of all XM-eligible positions (i.e. crypto underliers) + */ + @JsonProperty("total_gmv_basis") private String totalGmvBasis; + /** + * Integrated Portfolio Margin cash balance + */ + @JsonProperty("ipm_cash_balance") private String ipmCashBalance; + @JsonProperty("integrated_scenario_addon") private MarginAddOn integratedScenarioAddon; + /** + * All integrated scenario add-ons + */ + @JsonProperty("all_integrated_scenario_addons") private List allIntegratedScenarioAddons; + /** + * Netted positions used in the model calculation + */ + @JsonProperty("xm_positions") private List xmPositions; - public Builder dcoMarginRequirement(String dcoMarginRequirement) { - this.dcoMarginRequirement = dcoMarginRequirement; - return this; + public XMRiskNettingInfo() { } - public Builder portfolioMarginRequirement(String portfolioMarginRequirement) { - this.portfolioMarginRequirement = portfolioMarginRequirement; - return this; + public XMRiskNettingInfo(Builder builder) { + this.dcoMarginRequirement = builder.dcoMarginRequirement; + this.portfolioMarginRequirement = builder.portfolioMarginRequirement; + this.integratedPortfolioMarginRequirement = builder.integratedPortfolioMarginRequirement; + this.ineligibleFuturesMarginRequirement = builder.ineligibleFuturesMarginRequirement; + this.positionMarginRequirement = builder.positionMarginRequirement; + this.portfolioMarginAddon = builder.portfolioMarginAddon; + this.integratedPositionMarginRequirement = builder.integratedPositionMarginRequirement; + this.integratedPortfolioMarginAddon = builder.integratedPortfolioMarginAddon; + this.nettedFuturesNotional = builder.nettedFuturesNotional; + this.totalGmvBasis = builder.totalGmvBasis; + this.ipmCashBalance = builder.ipmCashBalance; + this.integratedScenarioAddon = builder.integratedScenarioAddon; + this.allIntegratedScenarioAddons = builder.allIntegratedScenarioAddons; + 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 Builder integratedPortfolioMarginRequirement( - String integratedPortfolioMarginRequirement) { - this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; - return this; + public void setIntegratedPortfolioMarginRequirement(String integratedPortfolioMarginRequirement) { + this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; + } + public String getIneligibleFuturesMarginRequirement() { + return ineligibleFuturesMarginRequirement; } - public Builder ineligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { - this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; - return this; + public void setIneligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { + this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; + } + public String getPositionMarginRequirement() { + return positionMarginRequirement; } - public Builder positionMarginRequirement(String positionMarginRequirement) { - this.positionMarginRequirement = positionMarginRequirement; - return this; + public void setPositionMarginRequirement(String positionMarginRequirement) { + this.positionMarginRequirement = positionMarginRequirement; + } + public String getPortfolioMarginAddon() { + return portfolioMarginAddon; } - public Builder portfolioMarginAddon(String portfolioMarginAddon) { - this.portfolioMarginAddon = portfolioMarginAddon; - return this; + public void setPortfolioMarginAddon(String portfolioMarginAddon) { + this.portfolioMarginAddon = portfolioMarginAddon; + } + public String getIntegratedPositionMarginRequirement() { + return integratedPositionMarginRequirement; } - public Builder integratedPositionMarginRequirement(String integratedPositionMarginRequirement) { - this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; - return this; + public void setIntegratedPositionMarginRequirement(String integratedPositionMarginRequirement) { + this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; + } + public String getIntegratedPortfolioMarginAddon() { + return integratedPortfolioMarginAddon; } - public Builder integratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { - this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; - return this; + public void setIntegratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { + this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; + } + public String getNettedFuturesNotional() { + return nettedFuturesNotional; } - public Builder nettedFuturesNotional(String nettedFuturesNotional) { - this.nettedFuturesNotional = nettedFuturesNotional; - return this; + public void setNettedFuturesNotional(String nettedFuturesNotional) { + this.nettedFuturesNotional = nettedFuturesNotional; + } + public String getTotalGmvBasis() { + return totalGmvBasis; } - public Builder totalGmvBasis(String totalGmvBasis) { - this.totalGmvBasis = totalGmvBasis; - return this; + public void setTotalGmvBasis(String totalGmvBasis) { + this.totalGmvBasis = totalGmvBasis; + } + public String getIpmCashBalance() { + return ipmCashBalance; } - public Builder ipmCashBalance(String ipmCashBalance) { - this.ipmCashBalance = ipmCashBalance; - return this; + public void setIpmCashBalance(String ipmCashBalance) { + this.ipmCashBalance = ipmCashBalance; + } + public MarginAddOn getIntegratedScenarioAddon() { + return integratedScenarioAddon; } - public Builder integratedScenarioAddon(MarginAddOn integratedScenarioAddon) { - this.integratedScenarioAddon = integratedScenarioAddon; - return this; + public void setIntegratedScenarioAddon(MarginAddOn integratedScenarioAddon) { + this.integratedScenarioAddon = integratedScenarioAddon; + } + public List getAllIntegratedScenarioAddons() { + return allIntegratedScenarioAddons; } - public Builder allIntegratedScenarioAddons(List allIntegratedScenarioAddons) { - this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; - return this; + public void setAllIntegratedScenarioAddons(List allIntegratedScenarioAddons) { + this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; + } + public List getXMPositions() { + return xmPositions; } - public Builder xmPositions(List xmPositions) { - this.xmPositions = xmPositions; - return this; + public void setXMPositions(List xmPositions) { + this.xmPositions = xmPositions; } + public static class Builder { + private String dcoMarginRequirement; + + private String portfolioMarginRequirement; + + private String integratedPortfolioMarginRequirement; - public XMRiskNettingInfo build() { - return new XMRiskNettingInfo(this); + private String ineligibleFuturesMarginRequirement; + + private String positionMarginRequirement; + + private String portfolioMarginAddon; + + private String integratedPositionMarginRequirement; + + private String integratedPortfolioMarginAddon; + + private String nettedFuturesNotional; + + private String totalGmvBasis; + + private String ipmCashBalance; + + private MarginAddOn integratedScenarioAddon; + + private List allIntegratedScenarioAddons; + + 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 positionMarginRequirement(String positionMarginRequirement) { + this.positionMarginRequirement = positionMarginRequirement; + return this; + } + + public Builder portfolioMarginAddon(String portfolioMarginAddon) { + this.portfolioMarginAddon = portfolioMarginAddon; + return this; + } + + public Builder integratedPositionMarginRequirement(String integratedPositionMarginRequirement) { + this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; + return this; + } + + public Builder integratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { + this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; + return this; + } + + public Builder nettedFuturesNotional(String nettedFuturesNotional) { + this.nettedFuturesNotional = nettedFuturesNotional; + return this; + } + + public Builder totalGmvBasis(String totalGmvBasis) { + this.totalGmvBasis = totalGmvBasis; + return this; + } + + public Builder ipmCashBalance(String ipmCashBalance) { + this.ipmCashBalance = ipmCashBalance; + return this; + } + + public Builder integratedScenarioAddon(MarginAddOn integratedScenarioAddon) { + this.integratedScenarioAddon = integratedScenarioAddon; + return this; + } + + public Builder allIntegratedScenarioAddons(List allIntegratedScenarioAddons) { + this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; + return this; + } + + public Builder xmPositions(List xmPositions) { + this.xmPositions = xmPositions; + return 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 index 36d60ea..fe66290 100644 --- a/src/main/java/com/coinbase/prime/model/XMSummary.java +++ b/src/main/java/com/coinbase/prime/model/XMSummary.java @@ -17,198 +17,206 @@ */ package com.coinbase.prime.model; - +import com.coinbase.prime.model.XMRiskNettingInfo; import com.fasterxml.jackson.annotation.JsonProperty; /** 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; - - /** Equity notional */ - @JsonProperty("account_equity") - private String accountEquity; - - /** Equity - XMMR (margin excess is > 0) */ - @JsonProperty("margin_excess_shortfall") - private String marginExcessShortfall; - - /** Credit consumed from Cross Margin Credit Limit (XMCL) */ - @JsonProperty("consumed_credit") - private String consumedCredit; - - /** XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans */ - @JsonProperty("xm_credit_limit") - private String xmCreditLimit; - - /** XM Margin Limit (XMML) is the maximum notional USD deficit */ - @JsonProperty("xm_margin_limit") - private String xmMarginLimit; - - /** Equity attributed by spot */ - @JsonProperty("spot_equity") - private String spotEquity; - - /** Equity attributed by futures */ - @JsonProperty("futures_equity") - private String futuresEquity; - - @JsonProperty("risk_netting_info") - private XMRiskNettingInfo riskNettingInfo; - - public XMSummary() {} - - public XMSummary(Builder builder) { - this.marginRequirement = builder.marginRequirement; - this.accountEquity = builder.accountEquity; - this.marginExcessShortfall = builder.marginExcessShortfall; - this.consumedCredit = builder.consumedCredit; - this.xmCreditLimit = builder.xmCreditLimit; - this.xmMarginLimit = builder.xmMarginLimit; - this.spotEquity = builder.spotEquity; - this.futuresEquity = builder.futuresEquity; - this.riskNettingInfo = builder.riskNettingInfo; - } - - public String getMarginRequirement() { - return marginRequirement; - } - - public void setMarginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - } - - public String getAccountEquity() { - return accountEquity; - } - - public void setAccountEquity(String accountEquity) { - this.accountEquity = accountEquity; - } - - public String getMarginExcessShortfall() { - return marginExcessShortfall; - } - - public void setMarginExcessShortfall(String marginExcessShortfall) { - this.marginExcessShortfall = marginExcessShortfall; - } - - public String getConsumedCredit() { - return consumedCredit; - } - - public void setConsumedCredit(String consumedCredit) { - this.consumedCredit = consumedCredit; - } - - public String getXMCreditLimit() { - return xmCreditLimit; - } - - public void setXMCreditLimit(String xmCreditLimit) { - this.xmCreditLimit = xmCreditLimit; - } - - public String getXMMarginLimit() { - return xmMarginLimit; - } - - public void setXMMarginLimit(String xmMarginLimit) { - this.xmMarginLimit = xmMarginLimit; - } - - public String getSpotEquity() { - return spotEquity; - } - - public void setSpotEquity(String spotEquity) { - this.spotEquity = spotEquity; - } - - public String getFuturesEquity() { - return futuresEquity; - } - - public void setFuturesEquity(String futuresEquity) { - this.futuresEquity = futuresEquity; - } - - public XMRiskNettingInfo getRiskNettingInfo() { - return riskNettingInfo; - } - - public void setRiskNettingInfo(XMRiskNettingInfo riskNettingInfo) { - this.riskNettingInfo = riskNettingInfo; - } - - public static class Builder { + /** + * Cross Margin Margin Requirement (XMMR) notional + */ + @JsonProperty("margin_requirement") private String marginRequirement; + /** + * Equity notional + */ + @JsonProperty("account_equity") private String accountEquity; + /** + * Equity - XMMR (margin excess is > 0) + */ + @JsonProperty("margin_excess_shortfall") private String marginExcessShortfall; + /** + * Credit consumed from Cross Margin Credit Limit (XMCL) + */ + @JsonProperty("consumed_credit") private String consumedCredit; + /** + * XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans + */ + @JsonProperty("xm_credit_limit") private String xmCreditLimit; + /** + * XM Margin Limit (XMML) is the maximum notional USD deficit + */ + @JsonProperty("xm_margin_limit") private String xmMarginLimit; + /** + * Equity attributed by spot + */ + @JsonProperty("spot_equity") private String spotEquity; + /** + * Equity attributed by futures + */ + @JsonProperty("futures_equity") private String futuresEquity; + @JsonProperty("risk_netting_info") private XMRiskNettingInfo riskNettingInfo; - public Builder marginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - return this; + public XMSummary() { + } + + public XMSummary(Builder builder) { + this.marginRequirement = builder.marginRequirement; + this.accountEquity = builder.accountEquity; + this.marginExcessShortfall = builder.marginExcessShortfall; + this.consumedCredit = builder.consumedCredit; + this.xmCreditLimit = builder.xmCreditLimit; + this.xmMarginLimit = builder.xmMarginLimit; + this.spotEquity = builder.spotEquity; + this.futuresEquity = builder.futuresEquity; + this.riskNettingInfo = builder.riskNettingInfo; + } + public String getMarginRequirement() { + return marginRequirement; + } + + public void setMarginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + } + public String getAccountEquity() { + return accountEquity; } - public Builder accountEquity(String accountEquity) { - this.accountEquity = accountEquity; - return this; + public void setAccountEquity(String accountEquity) { + this.accountEquity = accountEquity; + } + public String getMarginExcessShortfall() { + return marginExcessShortfall; } - public Builder marginExcessShortfall(String marginExcessShortfall) { - this.marginExcessShortfall = marginExcessShortfall; - return this; + public void setMarginExcessShortfall(String marginExcessShortfall) { + this.marginExcessShortfall = marginExcessShortfall; + } + public String getConsumedCredit() { + return consumedCredit; } - public Builder consumedCredit(String consumedCredit) { - this.consumedCredit = consumedCredit; - return this; + public void setConsumedCredit(String consumedCredit) { + this.consumedCredit = consumedCredit; + } + public String getXMCreditLimit() { + return xmCreditLimit; } - public Builder xmCreditLimit(String xmCreditLimit) { - this.xmCreditLimit = xmCreditLimit; - return this; + public void setXMCreditLimit(String xmCreditLimit) { + this.xmCreditLimit = xmCreditLimit; + } + public String getXMMarginLimit() { + return xmMarginLimit; } - public Builder xmMarginLimit(String xmMarginLimit) { - this.xmMarginLimit = xmMarginLimit; - return this; + public void setXMMarginLimit(String xmMarginLimit) { + this.xmMarginLimit = xmMarginLimit; + } + public String getSpotEquity() { + return spotEquity; } - public Builder spotEquity(String spotEquity) { - this.spotEquity = spotEquity; - return this; + public void setSpotEquity(String spotEquity) { + this.spotEquity = spotEquity; + } + public String getFuturesEquity() { + return futuresEquity; } - public Builder futuresEquity(String futuresEquity) { - this.futuresEquity = futuresEquity; - return this; + public void setFuturesEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + } + public XMRiskNettingInfo getRiskNettingInfo() { + return riskNettingInfo; } - public Builder riskNettingInfo(XMRiskNettingInfo riskNettingInfo) { - this.riskNettingInfo = riskNettingInfo; - return this; + public void setRiskNettingInfo(XMRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; } + public static class Builder { + private String marginRequirement; + + private String accountEquity; + + private String marginExcessShortfall; - public XMSummary build() { - return new XMSummary(this); + private String consumedCredit; + + private String xmCreditLimit; + + private String xmMarginLimit; + + private String spotEquity; + + private String futuresEquity; + + private XMRiskNettingInfo riskNettingInfo; + + public Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + 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 spotEquity(String spotEquity) { + this.spotEquity = spotEquity; + return this; + } + + public Builder futuresEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + return this; + } + + public Builder riskNettingInfo(XMRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; + return this; + } + + public XMSummary build() { + return new XMSummary(this); + } } - } } + 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 2815e30..0d3244b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Action.java +++ b/src/main/java/com/coinbase/prime/model/enums/Action.java @@ -18,7 +18,9 @@ package com.coinbase.prime.model.enums; -/** Action is the available user action types */ +/** + * Action is the available user action types + */ public enum Action { OTHER_ACTION, ACTION_APPROVE, @@ -26,3 +28,4 @@ public enum Action { ACTION_INITIATE, ACTION_CANCEL } + 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 26d8ee7..5f542ed 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java @@ -26,3 +26,4 @@ public enum ActivityCategory { ACTIVITY_CATEGORY_ALLOCATION, ACTIVITY_CATEGORY_LENDING } + 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 8206e0a..a26ab85 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java @@ -23,3 +23,4 @@ public enum ActivityLevel { ACTIVITY_LEVEL_PORTFOLIO, ACTIVITY_LEVEL_ENTITY } + 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 db7f5fd..78f58ff 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java @@ -19,18 +19,26 @@ package com.coinbase.prime.model.enums; /** - * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types - ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: - * Transaction secondary types - ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types + * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types + * - ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: Transaction secondary types + * - ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types */ public enum ActivitySecondaryType { NO_SECONDARY_TYPE, - /** Order secondary types */ + /** + * Order secondary types + */ ACTIVITY_SECONDARY_TYPE_BUY, ACTIVITY_SECONDARY_TYPE_SELL, - /** Transaction secondary types */ + /** + * Transaction secondary types + */ ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER, ACTIVITY_SECONDARY_TYPE_SWEEP_TRANSFER_TYPE, - /** Onchain secondary types */ + /** + * Onchain secondary types + */ ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER, ACTIVITY_SECONDARY_TYPE_WEB3_WALLET } + 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 0ed4689..4dc402a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java @@ -27,3 +27,4 @@ public enum ActivityStatus { ACTIVITY_STATUS_REJECTED, ACTIVITY_STATUS_FAILED } + 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 07b0e26..0d4b9db 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java @@ -23,3 +23,4 @@ public enum AddressBookType { ADDRESS_BOOK_TYPE_ADDRESS, ADDRESS_BOOK_TYPE_COUNTERPARTY_ID } + 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 f1240a2..c4f17a6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java @@ -18,7 +18,9 @@ package com.coinbase.prime.model.enums; -/** AdvancedTransferState represents the lifecycle state of an advanced transfer. */ +/** + * AdvancedTransferState represents the lifecycle state of an advanced transfer. + */ public enum AdvancedTransferState { ADVANCED_TRANSFER_STATE_CREATED, ADVANCED_TRANSFER_STATE_PROCESSING, @@ -27,3 +29,4 @@ public enum AdvancedTransferState { ADVANCED_TRANSFER_STATE_FAILED, ADVANCED_TRANSFER_STATE_EXPIRED } + diff --git a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java index 6004744..c7e1523 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java @@ -18,7 +18,10 @@ package com.coinbase.prime.model.enums; -/** AdvancedTransferType specifies the type of advanced transfer. */ +/** + * AdvancedTransferType specifies the type of advanced transfer. + */ public enum AdvancedTransferType { ADVANCED_TRANSFER_TYPE_BLIND_MATCH } + 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 d4a71e8..dd15581 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java @@ -23,3 +23,4 @@ public enum AllocationSizeType { QUOTE, PERCENT } + 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 7e6c6a6..b8b21d2 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java @@ -25,3 +25,4 @@ public enum AllocationStatus { ALLOCATION_STATUS_ALLOCATION_ALLOCATED, ALLOCATION_STATUS_ALLOCATION_REJECTED } + 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 5c2b2e1..16b287d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java @@ -18,7 +18,9 @@ package com.coinbase.prime.model.enums; -/** AssetChangeType identifies the type of asset change */ +/** + * AssetChangeType identifies the type of asset change + */ public enum AssetChangeType { BALANCE_TRANSFER, BALANCE_APPROVAL, @@ -26,3 +28,4 @@ public enum AssetChangeType { ITEM_APPROVAL, ITEM_APPROVAL_ALL } + 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 ac8a646..0a5f886 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Benchmark.java +++ b/src/main/java/com/coinbase/prime/model/enums/Benchmark.java @@ -25,3 +25,4 @@ public enum Benchmark { SOFR_365, CRYPTO_RFR } + 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 1d33cdc..410cd25 100644 --- a/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java +++ b/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java @@ -18,7 +18,9 @@ package com.coinbase.prime.model.enums; -/** Enum for candle granularity (time intervals) */ +/** + * Enum for candle granularity (time intervals) + */ public enum CandlesGranularity { ONE_MINUTE, FIVE_MINUTES, @@ -30,3 +32,4 @@ public enum CandlesGranularity { TWO_HOURS, FOUR_HOURS } + 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 d38db0b..b5cecd3 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java @@ -19,15 +19,22 @@ package com.coinbase.prime.model.enums; /** - * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type - - * CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract - CONTRACT_EXPIRY_TYPE_PERPETUAL: - * Perpetual futures contract (no expiry) + * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type + * - CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract + * - CONTRACT_EXPIRY_TYPE_PERPETUAL: Perpetual futures contract (no expiry) */ public enum ContractExpiryType { - /** Unspecified contract expiry type */ + /** + * Unspecified contract expiry type + */ CONTRACT_EXPIRY_TYPE_UNSPECIFIED, - /** Expiring futures contract */ + /** + * Expiring futures contract + */ CONTRACT_EXPIRY_TYPE_EXPIRING, - /** Perpetual futures contract (no expiry) */ + /** + * Perpetual futures contract (no expiry) + */ CONTRACT_EXPIRY_TYPE_PERPETUAL } + 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 b9c04f5..d0e100c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java +++ b/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java @@ -49,3 +49,4 @@ public enum CustodyActivityType { ACTIVITY_TYPE_WEB3_MESSAGE, ACTIVITY_TYPE_CLAIM_REWARDS } + 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 a3f4223..a51dd3d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/DestinationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/DestinationType.java @@ -19,18 +19,30 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_DESTINATION: nil value - DESTINATION_PAYMENT_METHOD: A fiat bank account linked to a - * payment method id via Payment Method Service - DESTINATION_BLOCKCHAIN: A blockchain network - * address - DESTINATION_WALLET: An on platform wallet UUID NOTE: this is not usable in the - * withdrawals endpoint only transfers - DESTINATION_COUNTERPARTY: Counterparty ID + * - UNKNOWN_DESTINATION: nil value + * - DESTINATION_PAYMENT_METHOD: A fiat bank account linked to a payment method id via Payment Method Service + * - DESTINATION_BLOCKCHAIN: A blockchain network address + * - DESTINATION_WALLET: An on platform wallet UUID + * NOTE: this is not usable in the 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 */ + /** + * A fiat bank account linked to a payment method id via Payment Method Service + */ DESTINATION_PAYMENT_METHOD, - /** A blockchain network address */ + /** + * A blockchain network address + */ DESTINATION_BLOCKCHAIN, - /** An on platform wallet UUID */ + /** + * An on platform wallet UUID + */ DESTINATION_WALLET, - /** Counterparty ID */ + /** + * Counterparty ID + */ DESTINATION_COUNTERPARTY } + 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 5f22984..60f328e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/EstimateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/EstimateType.java @@ -23,3 +23,4 @@ public enum EstimateType { LIVE, INTERIM } + 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 0d6ad82..b9a787d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java @@ -19,17 +19,23 @@ package com.coinbase.prime.model.enums; /** - * - EXPIRING_CONTRACT_STATUS_UNKNOWN: Unknown/unset — returns all expiring contracts (backward - * compatible default) - EXPIRING_CONTRACT_STATUS_UNEXPIRED: Only unexpired contracts - * (contract_expiry is in the future) - EXPIRING_CONTRACT_STATUS_EXPIRED: Only expired contracts - * (contract_expiry is in the past) - EXPIRING_CONTRACT_STATUS_ALL: All contracts regardless of - * expiry status + * - EXPIRING_CONTRACT_STATUS_UNKNOWN: Unknown/unset — returns all expiring contracts (backward compatible default) + * - EXPIRING_CONTRACT_STATUS_UNEXPIRED: Only unexpired contracts (contract_expiry is in the future) + * - EXPIRING_CONTRACT_STATUS_EXPIRED: Only expired contracts (contract_expiry is in the past) + * - EXPIRING_CONTRACT_STATUS_ALL: All contracts regardless of expiry status */ public enum ExpiringContractStatus { - /** Only unexpired contracts (contract_expiry is in the future) */ + /** + * Only unexpired contracts (contract_expiry is in the future) + */ EXPIRING_CONTRACT_STATUS_UNEXPIRED, - /** Only expired contracts (contract_expiry is in the past) */ + /** + * Only expired contracts (contract_expiry is in the past) + */ EXPIRING_CONTRACT_STATUS_EXPIRED, - /** All contracts regardless of expiry status */ + /** + * All contracts regardless of expiry status + */ EXPIRING_CONTRACT_STATUS_ALL } + 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 0899ba4..41de29e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java @@ -25,3 +25,4 @@ public enum FcmMarginCallState { FCM_MARGIN_CALL_STATE_DEFAULT, FCM_MARGIN_CALL_STATE_OFFICIAL } + 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 faf6005..a9e18bb 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java @@ -23,3 +23,4 @@ public enum FcmMarginCallType { FCM_MARGIN_CALL_TYPE_URGENT, FCM_MARGIN_CALL_TYPE_REGULAR } + 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 8a79aa6..7ba3c94 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java @@ -19,21 +19,33 @@ package com.coinbase.prime.model.enums; /** - * The margin health state of an FCM account. - FCM_MARGIN_HEALTH_STATE_UNSPECIFIED: Unspecified - * margin health state. - FCM_MARGIN_HEALTH_STATE_HEALTHY: Account margin is healthy. - - * FCM_MARGIN_HEALTH_STATE_RESTRICTED: Account margin is restricted. - - * FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION: Account is approaching liquidation. - - * FCM_MARGIN_HEALTH_STATE_LIQUIDATION: Account is in liquidation. + * The margin health state of an FCM account. + * - FCM_MARGIN_HEALTH_STATE_UNSPECIFIED: Unspecified margin health state. + * - FCM_MARGIN_HEALTH_STATE_HEALTHY: Account margin is healthy. + * - FCM_MARGIN_HEALTH_STATE_RESTRICTED: Account margin is restricted. + * - FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION: Account is approaching liquidation. + * - FCM_MARGIN_HEALTH_STATE_LIQUIDATION: Account is in liquidation. */ public enum FcmMarginHealthState { - /** Unspecified margin health state. */ + /** + * Unspecified margin health state. + */ FCM_MARGIN_HEALTH_STATE_UNSPECIFIED, - /** Account margin is healthy. */ + /** + * Account margin is healthy. + */ FCM_MARGIN_HEALTH_STATE_HEALTHY, - /** Account margin is restricted. */ + /** + * Account margin is restricted. + */ FCM_MARGIN_HEALTH_STATE_RESTRICTED, - /** Account is approaching liquidation. */ + /** + * Account is approaching liquidation. + */ FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION, - /** Account is in liquidation. */ + /** + * Account is in liquidation. + */ FCM_MARGIN_HEALTH_STATE_LIQUIDATION } + 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 5e6cb96..a8dce00 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java @@ -23,3 +23,4 @@ public enum FcmPositionSide { LONG, SHORT } + 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 9055adc..d477a29 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java @@ -19,18 +19,27 @@ package com.coinbase.prime.model.enums; /** - * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason - - * FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close - - * FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance - - * FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance + * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason + * - FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close + * - FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance + * - FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance */ public enum FcmTradingSessionClosedReason { - /** Undefined closed reason */ + /** + * Undefined closed reason + */ FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED, - /** Regular market close */ + /** + * Regular market close + */ FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE, - /** Exchange maintenance */ + /** + * Exchange maintenance + */ FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE, - /** Vendor maintenance */ + /** + * Vendor maintenance + */ FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE } + 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 727051c..70b4623 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java @@ -19,23 +19,37 @@ package com.coinbase.prime.model.enums; /** - * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state - - * FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled - - * FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled - - * FCM_TRADING_SESSION_STATE_OPEN: Trading session is open - FCM_TRADING_SESSION_STATE_CLOSE: - * Trading session is closed - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted + * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state + * - FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled + * - FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled + * - FCM_TRADING_SESSION_STATE_OPEN: Trading session is open + * - FCM_TRADING_SESSION_STATE_CLOSE: Trading session is closed + * - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted */ public enum FcmTradingSessionState { - /** Undefined session state */ + /** + * Undefined session state + */ FCM_TRADING_SESSION_STATE_UNDEFINED, - /** Pre-open state, orders can be placed and cancelled */ + /** + * Pre-open state, orders can be placed and cancelled + */ FCM_TRADING_SESSION_STATE_PRE_OPEN, - /** Pre-open state, orders cannot be cancelled */ + /** + * Pre-open state, orders cannot be cancelled + */ FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL, - /** Trading session is open */ + /** + * Trading session is open + */ FCM_TRADING_SESSION_STATE_OPEN, - /** Trading session is closed */ + /** + * Trading session is closed + */ FCM_TRADING_SESSION_STATE_CLOSE, - /** Trading session is halted */ + /** + * Trading session is halted + */ FCM_TRADING_SESSION_STATE_HALTED } + 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 49152e0..667d7a6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java @@ -25,3 +25,4 @@ public enum FuturesSweepStatus { FCM_FUTURES_SWEEP_STATUS_CANCELED, FCM_FUTURES_SWEEP_STATUS_PROCESSING } + 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 80af7a6..a316d21 100644 --- a/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java +++ b/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java @@ -19,11 +19,11 @@ package com.coinbase.prime.model.enums; /** - * HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, - * Portfolio + * HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, Portfolio */ public enum HierarchyType { HIERARCHY_TYPE_UNSPECIFIED, HIERARCHY_TYPE_PORTFOLIO, HIERARCHY_TYPE_ENTITY } + 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 a4f1490..987d053 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java @@ -18,7 +18,9 @@ package com.coinbase.prime.model.enums; -/** States */ +/** + * States + */ public enum InvoiceState { INVOICE_STATE_UNSPECIFIED, INVOICE_STATE_IMPORTED, @@ -26,3 +28,4 @@ public enum InvoiceState { INVOICE_STATE_PARTIALLY_PAID, INVOICE_STATE_PAID } + 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 f69fc41..fe18bb6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java @@ -18,7 +18,9 @@ package com.coinbase.prime.model.enums; -/** Types */ +/** + * Types + */ public enum InvoiceType { INVOICE_TYPE_UNSPECIFIED, INVOICE_TYPE_AUC_FEE, @@ -27,3 +29,4 @@ public enum InvoiceType { INVOICE_TYPE_NEW_WALLET_FEE, INVOICE_TYPE_STAKING_FEE } + 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 b93f60e..bf76f86 100644 --- a/src/main/java/com/coinbase/prime/model/enums/LoanType.java +++ b/src/main/java/com/coinbase/prime/model/enums/LoanType.java @@ -27,3 +27,4 @@ public enum LoanType { SHORT_COLLATERAL, CROSS_MARGIN } + 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 691d526..10116a8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java +++ b/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java @@ -25,3 +25,4 @@ public enum MarginAddOnType { MACRO_STRESS, SHORT_BIASED_STRESS } + 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 929cad8..5258e7a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java @@ -23,3 +23,4 @@ public enum NetworkFamily { NETWORK_FAMILY_EVM, NETWORK_FAMILY_SOLANA } + 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 6480120..2df5d21 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkType.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkType.java @@ -23,3 +23,4 @@ public enum NetworkType { NETWORK_TYPE_EVM, NETWORK_TYPE_SOLANA } + 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 54b9891..e68e939 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderSide.java @@ -18,10 +18,19 @@ package com.coinbase.prime.model.enums; -/** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ +/** + * - UNKNOWN_ORDER_SIDE: nil value + * - BUY: Buy order + * - SELL: Sell order + */ public enum OrderSide { - /** Buy order */ + /** + * Buy order + */ BUY, - /** Sell order */ + /** + * Sell order + */ SELL } + 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 2417a3e..14f4d8d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java @@ -19,21 +19,38 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_ORDER_STATUS: nil value - OPEN: The order is open but unfilled - FILLED: The 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 + * - UNKNOWN_ORDER_STATUS: nil value + * - OPEN: The order is open but unfilled + * - FILLED: The 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 */ public enum OrderStatus { - /** The order is open but unfilled */ + /** + * The order is open but unfilled + */ OPEN, - /** The order was filled */ + /** + * The order was filled + */ FILLED, - /** The order was cancelled */ + /** + * The order was cancelled + */ CANCELLED, - /** The order has expired */ + /** + * The order has expired + */ EXPIRED, - /** Order submission failed */ + /** + * Order submission failed + */ FAILED, - /** The order has been sent but is not yet confirmed */ + /** + * The order has been sent but is not yet confirmed + */ PENDING } + 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 2550fa9..78268a6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderType.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderType.java @@ -19,45 +19,48 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_ORDER_TYPE: nil value - MARKET: A [market - * order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) - LIMIT: A [limit - * order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) - TWAP: A [time-weighted - * average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) - BLOCK: A [block - * trade](https://en.wikipedia.org/wiki/Block_trade) - VWAP: A [volume-weighted average price - * order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) - STOP_LIMIT: A [conditional - * order combined of stop order and limit - * order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) - RFQ: A [request for - * quote](https://en.wikipedia.org/wiki/Request_for_quote) - PEG: A pegged order that dynamically - * adjust based on market conditions while maintaining execution discretion and avoiding adverse - * selection + * - UNKNOWN_ORDER_TYPE: nil value + * - MARKET: A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) + * - LIMIT: A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) + * - TWAP: A [time-weighted average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) + * - BLOCK: A [block trade](https://en.wikipedia.org/wiki/Block_trade) + * - VWAP: A [volume-weighted average price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) + * - STOP_LIMIT: A [conditional order combined of stop order and limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) + * - RFQ: A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) + * - PEG: A pegged order that dynamically adjust based on market conditions while maintaining execution discretion and avoiding adverse selection */ public enum OrderType { - /** A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) */ + /** + * A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) + */ MARKET, - /** A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) */ + /** + * A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) + */ LIMIT, /** - * A [time-weighted average price - * order](https://en.wikipedia.org/wiki/Time-weighted_average_price) + * A [time-weighted average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) */ TWAP, - /** A [block trade](https://en.wikipedia.org/wiki/Block_trade) */ + /** + * A [block trade](https://en.wikipedia.org/wiki/Block_trade) + */ BLOCK, /** - * A [volume-weighted average price - * order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) + * A [volume-weighted average price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) */ VWAP, /** - * A [conditional order combined of stop order and limit - * order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) + * A [conditional order combined of stop order and limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) */ STOP_LIMIT, - /** A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) */ + /** + * A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) + */ RFQ, /** - * A pegged order that dynamically adjust based on market conditions while maintaining execution - * discretion and avoiding adverse selection + * A pegged order that dynamically adjust based on market conditions while maintaining execution discretion and avoiding adverse selection */ PEG } + 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 2e558cd..f95388d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java @@ -19,14 +19,23 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - METHOD_WIRE: Wire transfer - METHOD_SEN: Silvergate - * exchange network - METHOD_SWIFT: Swift + * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value + * - METHOD_WIRE: Wire transfer + * - METHOD_SEN: Silvergate exchange network + * - METHOD_SWIFT: Swift */ public enum PaymentMethodType { - /** Wire transfer */ + /** + * Wire transfer + */ METHOD_WIRE, - /** Silvergate exchange network */ + /** + * Silvergate exchange network + */ METHOD_SEN, - /** Swift */ + /** + * Swift + */ METHOD_SWIFT } + 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 7b7404d..fa23d08 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java @@ -19,15 +19,23 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_PEG_OFFSET_TYPE: nil value - PEG_OFFSET_TYPE_PRICE: Offset specified in price units - - * PEG_OFFSET_TYPE_BPS: Offset specified in basis points (BPS) - PEG_OFFSET_TYPE_DEPTH: Offset - * specified in depth + * - UNKNOWN_PEG_OFFSET_TYPE: nil value + * - PEG_OFFSET_TYPE_PRICE: Offset specified in price units + * - PEG_OFFSET_TYPE_BPS: Offset specified in basis points (BPS) + * - PEG_OFFSET_TYPE_DEPTH: Offset specified in depth */ public enum PegOffsetType { - /** Offset specified in price units */ + /** + * Offset specified in price units + */ PEG_OFFSET_TYPE_PRICE, - /** Offset specified in basis points (BPS) */ + /** + * Offset specified in basis points (BPS) + */ PEG_OFFSET_TYPE_BPS, - /** Offset specified in depth */ + /** + * Offset specified in depth + */ PEG_OFFSET_TYPE_DEPTH } + 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 9f71124..b1a24dd 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java @@ -19,20 +19,33 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_BALANCE_TYPE: nil - TRADING_BALANCES: Trading balances - VAULT_BALANCES: Vault balances - * - TOTAL_BALANCES: Total balances (The sum of vault and trading + prime custody) - - * PRIME_CUSTODY_BALANCES: Prime custody balances - UNIFIED_TOTAL_BALANCES: Unified total balance - * across networks and wallet types (vault + trading + prime custody) + * - UNKNOWN_BALANCE_TYPE: nil + * - TRADING_BALANCES: Trading balances + * - VAULT_BALANCES: Vault balances + * - TOTAL_BALANCES: Total balances (The sum of vault and trading + prime custody) + * - PRIME_CUSTODY_BALANCES: Prime custody balances + * - UNIFIED_TOTAL_BALANCES: Unified total balance across networks and wallet types (vault + trading + prime custody) */ public enum PortfolioBalanceType { - /** Trading balances */ + /** + * Trading balances + */ TRADING_BALANCES, - /** Vault balances */ + /** + * Vault balances + */ VAULT_BALANCES, - /** Total balances (The sum of vault and trading + prime custody) */ + /** + * Total balances (The sum of vault and trading + prime custody) + */ TOTAL_BALANCES, - /** Prime custody balances */ + /** + * Prime custody balances + */ PRIME_CUSTODY_BALANCES, - /** Unified total balance across networks and wallet types (vault + trading + prime custody) */ + /** + * 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/PositionReferenceType.java b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java index 5cecbb6..1586fc0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java @@ -23,3 +23,4 @@ public enum PositionReferenceType { ENTITY, PORTFOLIO } + 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 735a272..4a4f05b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java @@ -62,3 +62,4 @@ public enum PrimeActivityType { ACTIVITY_TYPE_WEB3_RECREATE_BACKUP, ACTIVITY_TYPE_WEB3_ONBOARDING } + 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 84ce0ea..cd747df 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java @@ -19,27 +19,23 @@ 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. + * - 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. + * 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. + * 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. + * 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 index 3f1d78e..9644380 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java @@ -19,50 +19,47 @@ 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). + * - 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. */ + /** + * 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. + * 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. + * 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. */ + /** + * Trading and withdrawals are suspended per XM margin methodology. + */ HEALTH_STATUS_SUSPENDED, - /** Account is in a restricted state per XM margin methodology. */ + /** + * 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. + * 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. */ + /** + * 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). + * 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 f154024..55e12b7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java @@ -19,43 +19,33 @@ 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. + * - 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 */ + /** + * 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) + * 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 + * 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 + * 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. + * 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 index bb8f79c..91be3a2 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java @@ -19,18 +19,18 @@ 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). + * - 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. */ + /** + * 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). + * 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/PrimeXMMarginThresholdType.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java index 28dfd3e..4981bbe 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java @@ -19,18 +19,19 @@ package com.coinbase.prime.model.enums; /** - * - 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. + * - 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. */ + /** + * 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. + * 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/ProductPermissions.java b/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java index 6c76a1d..f54d3ee 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java +++ b/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java @@ -23,3 +23,4 @@ public enum ProductPermissions { PRODUCT_PERMISSION_TRADE, PRODUCT_PERMISSION_LENDING } + 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 4a3a454..6a91423 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ProductType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ProductType.java @@ -18,10 +18,19 @@ package com.coinbase.prime.model.enums; -/** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ +/** + * - UNKNOWN_PRODUCT_TYPE: Unknown product type + * - SPOT: Spot product + * - FUTURE: Future product + */ public enum ProductType { - /** Spot product */ + /** + * Spot product + */ SPOT, - /** Future product */ + /** + * Future product + */ FUTURE } + 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 4def497..ce2decc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RateType.java @@ -25,3 +25,4 @@ public enum RateType { APR_365, APR } + 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 40e2176..9f84323 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java +++ b/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java @@ -19,31 +19,56 @@ package com.coinbase.prime.model.enums; /** - * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the - * API response yet - MEV_REWARD: A maximal extractable value reward i.e. sol mev rewards - - * INFLATION_REWARD: An inflationary reward i.e. solana inflationary rewards - BLOCK_REWARD: A block - * reward i.e. solana block rewards - VALIDATOR_REWARD: A validator reward i.e. ethereum 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 - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward + * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the API response yet + * - MEV_REWARD: A maximal extractable value reward + * i.e. sol mev rewards + * - INFLATION_REWARD: An inflationary reward + * i.e. solana inflationary rewards + * - BLOCK_REWARD: A block reward + * i.e. solana block rewards + * - VALIDATOR_REWARD: A validator reward + * i.e. ethereum 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 + * - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward * i.e. USDC reward payouts */ public enum RewardSubtype { - /** A maximal extractable value reward */ + /** + * A maximal extractable value reward + */ MEV_REWARD, - /** An inflationary reward */ + /** + * An inflationary reward + */ INFLATION_REWARD, - /** A block reward */ + /** + * A block reward + */ BLOCK_REWARD, - /** A validator reward */ + /** + * A validator reward + */ VALIDATOR_REWARD, - /** A transaction reward */ + /** + * A transaction reward + */ TRANSACTION_REWARD, - /** A staking fee rebate reward */ + /** + * A staking fee rebate reward + */ STAKING_FEE_REBATE_REWARD, - /** A BUIDL dividend reward */ + /** + * A BUIDL dividend reward + */ BUIDL_DIVIDEND, - /** A custom stablecoin reward */ + /** + * A custom stablecoin reward + */ CUSTOM_STABLECOIN_REWARD } + 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 15d8f96..c970fbf 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java @@ -19,15 +19,22 @@ package com.coinbase.prime.model.enums; /** - * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type - - * RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) - - * RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue + * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type + * - RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) + * - RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue */ public enum RiskManagementType { - /** Unspecified risk management type */ + /** + * Unspecified risk management type + */ RISK_MANAGEMENT_TYPE_UNSPECIFIED, - /** Risk is managed by FCM (Futures Commission Merchant) */ + /** + * Risk is managed by FCM (Futures Commission Merchant) + */ RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM, - /** Risk is managed by the venue */ + /** + * Risk is managed by the venue + */ RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE } + 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 5eb5ca0..7c10474 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java +++ b/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java @@ -19,14 +19,23 @@ package com.coinbase.prime.model.enums; /** - * - SECONDARY_PERMISSION_UNKNOWN: nil value - VIDEO_APPROVER: A video approver - TEAM_APPROVER: A - * team approver - WEB3_SIGNER: A web3 signer + * - SECONDARY_PERMISSION_UNKNOWN: nil value + * - VIDEO_APPROVER: A video approver + * - TEAM_APPROVER: A team approver + * - WEB3_SIGNER: A web3 signer */ public enum SecondaryPermission { - /** A video approver */ + /** + * A video approver + */ VIDEO_APPROVER, - /** A team approver */ + /** + * A team approver + */ TEAM_APPROVER, - /** A web3 signer */ + /** + * A web3 signer + */ WEB3_SIGNER } + 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 3a120f8..48abbe1 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java @@ -19,12 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - SIGNING_STATUS_UNKNOWN: Unknown signing status - SIGNED: Transaction has been signed - - * UNSIGNED: Transaction is unsigned + * - SIGNING_STATUS_UNKNOWN: Unknown signing status + * - SIGNED: Transaction has been signed + * - UNSIGNED: Transaction is unsigned */ public enum SigningStatus { - /** Transaction has been signed */ + /** + * Transaction has been signed + */ SIGNED, - /** Transaction is unsigned */ + /** + * Transaction is unsigned + */ UNSIGNED } + 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 37697a0..0d644b6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SortDirection.java +++ b/src/main/java/com/coinbase/prime/model/enums/SortDirection.java @@ -22,3 +22,4 @@ public enum SortDirection { DESC, ASC } + 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 7b557a7..97ebbbb 100644 --- a/src/main/java/com/coinbase/prime/model/enums/StakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/StakeType.java @@ -23,3 +23,4 @@ public enum StakeType { STAKE_TYPE_INITIAL_DEPOSIT, STAKE_TYPE_TOP_UP } + 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 a1b3807..333a575 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java @@ -19,18 +19,28 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_TIME_IN_FORCE: nil value - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time - - * GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled - IMMEDIATE_OR_CANCEL: Order is - * executed immediately at submission or is cancelled - FILL_OR_KILL: Order is executed immediately - * and fully at submission or is cancelled + * - UNKNOWN_TIME_IN_FORCE: nil value + * - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time + * - GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled + * - IMMEDIATE_OR_CANCEL: Order is executed immediately at submission or is cancelled + * - FILL_OR_KILL: Order is executed immediately and fully at submission or is cancelled */ public enum TimeInForceType { - /** Expires at a certain date/time */ + /** + * Expires at a certain date/time + */ GOOD_UNTIL_DATE_TIME, - /** Order stays on the books until cancelled */ + /** + * Order stays on the books until cancelled + */ GOOD_UNTIL_CANCELLED, - /** Order is executed immediately at submission or is cancelled */ + /** + * Order is executed immediately at submission or is cancelled + */ IMMEDIATE_OR_CANCEL, - /** Order is executed immediately and fully at submission or is cancelled */ + /** + * Order is executed immediately and fully at submission or is cancelled + */ FILL_OR_KILL } + 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 29c1e28..c5f18fc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java @@ -19,80 +19,134 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status - TRANSACTION_CREATED: The - * Transaction has been created and is awaiting Consensus approval This is a non-terminal status - - * TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase Prime - * approval This is a non-terminal status - TRANSACTION_APPROVED: The Transaction has been - * authorized by Coinbase Prime This is a non-terminal status - TRANSACTION_GASSING: The transaction - * is awaiting blockchain resources for broadcast This is a non-terminal status - - * TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting This is a - * non-terminal status - TRANSACTION_PROVISIONED: The transaction has been provisioned and is - * awaiting planning This is a non-terminal status - TRANSACTION_PLANNED: The transaction has been - * constructed. This is a non-terminal status - TRANSACTION_PROCESSING: The transaction is currently - * processing and awaiting finalization This is a non-terminal status - TRANSACTION_RESTORED: The - * transaction has been broadcasted to the network. This is a non-terminal status - - * TRANSACTION_DONE: The transaction has confirmed on-chain and finished. This is a terminal status - * - TRANSACTION_IMPORT_PENDING: The transaction deposit has been detected and is awaiting - * finalization. This is a non-terminal status - TRANSACTION_IMPORTED: The transaction deposit and - * reward has been detected. This is a terminal status - TRANSACTION_CANCELLED: The transaction has - * been cancelled This is a terminal status - TRANSACTION_REJECTED: The transaction was rejected - * before construction and broadcasting. This is a terminal status - TRANSACTION_DELAYED: The - * transaction s taking longer than expected to confirm on-chain. This is a non-terminal status - - * TRANSACTION_RETRIED: The transaction has been recreated and retried, this occurs when network - * congestion results in transfers becoming extremely delayed due to insufficient fees or network - * resources such as CPU, RAM, or NET This is a terminal status - TRANSACTION_FAILED: The - * transaction failed on-chain (the fee was spent but the operation failed). This is a terminal - * status - TRANSACTION_EXPIRED: The transaction has expired. This is a terminal status - - * TRANSACTION_BROADCASTING: The transaction is currently broadcasting to the cryptocurrency - * network. This is a non-terminal status - OTHER_TRANSACTION_STATUS: The transaction has reached an - * OTHER status. This is a non-terminal status - TRANSACTION_CONSTRUCTED: The transaction bctx is - * constructed but not yet broadcasting on chain This is a non-terminal status + * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status + * - TRANSACTION_CREATED: The Transaction has been created and is awaiting Consensus approval + * This is a non-terminal status + * - TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase Prime approval + * This is a non-terminal status + * - TRANSACTION_APPROVED: The Transaction has been authorized by Coinbase Prime + * This is a non-terminal status + * - TRANSACTION_GASSING: The transaction is awaiting blockchain resources for broadcast + * This is a non-terminal status + * - TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting + * This is a non-terminal status + * - TRANSACTION_PROVISIONED: The transaction has been provisioned and is awaiting planning + * This is a non-terminal status + * - TRANSACTION_PLANNED: The transaction has been constructed. + * This is a non-terminal status + * - TRANSACTION_PROCESSING: The transaction is currently processing and awaiting finalization + * This is a non-terminal status + * - TRANSACTION_RESTORED: The transaction has been broadcasted to the network. + * This is a non-terminal status + * - TRANSACTION_DONE: The transaction has confirmed on-chain and finished. + * This is a terminal status + * - TRANSACTION_IMPORT_PENDING: The transaction deposit has been detected and is awaiting finalization. + * This is a non-terminal status + * - TRANSACTION_IMPORTED: The transaction deposit and reward has been detected. + * This is a terminal status + * - TRANSACTION_CANCELLED: The transaction has been cancelled + * This is a terminal status + * - TRANSACTION_REJECTED: The transaction was rejected before construction and broadcasting. + * This is a terminal status + * - TRANSACTION_DELAYED: The transaction s taking longer than expected to confirm on-chain. + * This is a non-terminal status + * - TRANSACTION_RETRIED: The transaction has been recreated and retried, this occurs when network congestion results in transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET + * This is a terminal status + * - TRANSACTION_FAILED: The transaction failed on-chain (the fee was spent but the operation failed). + * This is a terminal status + * - TRANSACTION_EXPIRED: The transaction has expired. + * This is a terminal status + * - TRANSACTION_BROADCASTING: The transaction is currently broadcasting to the cryptocurrency network. + * This is a non-terminal status + * - OTHER_TRANSACTION_STATUS: The transaction has reached an OTHER status. + * This is a non-terminal status + * - TRANSACTION_CONSTRUCTED: The transaction bctx is constructed but not yet broadcasting on chain + * This is a non-terminal status */ public enum TransactionStatus { - /** The Transaction has been created and is awaiting Consensus approval */ + /** + * The Transaction has been created and is awaiting Consensus approval + */ TRANSACTION_CREATED, - /** The Transaction has reached User Consensus and is awaiting Coinbase Prime approval */ + /** + * The Transaction has reached User Consensus and is awaiting Coinbase Prime approval + */ TRANSACTION_REQUESTED, - /** The Transaction has been authorized by Coinbase Prime */ + /** + * The Transaction has been authorized by Coinbase Prime + */ TRANSACTION_APPROVED, - /** The transaction is awaiting blockchain resources for broadcast */ + /** + * The transaction is awaiting blockchain resources for broadcast + */ TRANSACTION_GASSING, - /** The transaction has received blockchain resources for broadcasting */ + /** + * The transaction has received blockchain resources for broadcasting + */ TRANSACTION_GASSED, - /** The transaction has been provisioned and is awaiting planning */ + /** + * The transaction has been provisioned and is awaiting planning + */ TRANSACTION_PROVISIONED, - /** The transaction has been constructed. */ + /** + * The transaction has been constructed. + */ TRANSACTION_PLANNED, - /** The transaction is currently processing and awaiting finalization */ + /** + * The transaction is currently processing and awaiting finalization + */ TRANSACTION_PROCESSING, - /** The transaction has been broadcasted to the network. */ + /** + * The transaction has been broadcasted to the network. + */ TRANSACTION_RESTORED, - /** The transaction has confirmed on-chain and finished. */ + /** + * The transaction has confirmed on-chain and finished. + */ TRANSACTION_DONE, - /** The transaction deposit has been detected and is awaiting finalization. */ + /** + * The transaction deposit has been detected and is awaiting finalization. + */ TRANSACTION_IMPORT_PENDING, - /** The transaction deposit and reward has been detected. */ + /** + * The transaction deposit and reward has been detected. + */ TRANSACTION_IMPORTED, - /** The transaction has been cancelled */ + /** + * The transaction has been cancelled + */ TRANSACTION_CANCELLED, - /** The transaction was rejected before construction and broadcasting. */ + /** + * The transaction was rejected before construction and broadcasting. + */ TRANSACTION_REJECTED, - /** The transaction s taking longer than expected to confirm on-chain. */ + /** + * The transaction s taking longer than expected to confirm on-chain. + */ TRANSACTION_DELAYED, /** - * The transaction has been recreated and retried, this occurs when network congestion results in - * transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, - * RAM, or NET + * The transaction has been recreated and retried, this occurs when network congestion results in transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET */ TRANSACTION_RETRIED, - /** The transaction failed on-chain (the fee was spent but the operation failed). */ + /** + * The transaction failed on-chain (the fee was spent but the operation failed). + */ TRANSACTION_FAILED, - /** The transaction has expired. */ + /** + * The transaction has expired. + */ TRANSACTION_EXPIRED, - /** The transaction is currently broadcasting to the cryptocurrency network. */ + /** + * The transaction is currently broadcasting to the cryptocurrency network. + */ TRANSACTION_BROADCASTING, - /** The transaction has reached an OTHER status. */ + /** + * The transaction has reached an OTHER status. + */ OTHER_TRANSACTION_STATUS, - /** The transaction bctx is constructed but not yet broadcasting on chain */ + /** + * The transaction bctx is constructed but not yet broadcasting on chain + */ TRANSACTION_CONSTRUCTED } + 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 33446ae..d17860a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransactionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransactionType.java @@ -19,105 +19,184 @@ package com.coinbase.prime.model.enums; /** - * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type - DEPOSIT: A fiat or crypto deposit - - * WITHDRAWAL: A fiat or crypto withdrawal - INTERNAL_DEPOSIT: An internal fiat or crypto deposit - - * INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal - SWEEP_DEPOSIT: Internal automated - * deposit to a cold address from a restored address - SWEEP_WITHDRAWAL: Internal automated - * withdrawal from a restored address to a cold address - PROXY_DEPOSIT: On-chain deposit of funds - * into proxy contract from cold address - PROXY_WITHDRAWAL: On-chain withdrawal of funds from proxy - * contract to cold address - BILLING_WITHDRAWAL: Coinbase Prime automated invoice settlement - * payment - REWARD: Reward payment to an associated address for a staked asset - COINBASE_REFUND: - * Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction - - * TRANSACTION_TYPE_OTHER: An OTHER type of transaction - WITHDRAWAL_ADJUSTMENT: A manual adjustment - * withdrawal transaction - DEPOSIT_ADJUSTMENT: A manual adjustment deposit transaction - - * KEY_REGISTRATION: An on-chain registration for an address - DELEGATION: An on-chain delegation - * transaction - UNDELEGATION: An on-chain undelegation transaction - RESTAKE: On-chain restaking - * transaction - COMPLETE_UNBONDING: On-chain unbonding event transaction - WITHDRAW_UNBONDED: - * On-chain event indicating unbonding period is over - STAKE_ACCOUNT_CREATE: On-chain transaction - * to begin staking from an address - CHANGE_VALIDATOR: On-chain transaction alter validator - - * STAKE: On-chain transaction to begin staking in Cryptocurrency network - UNSTAKE: On-chain - * transaction to stop staking in Cryptocurrency network - REMOVE_AUTHORIZED_PARTY: On-chain - * transaction to remove a party from a multi-signature wallet - STAKE_AUTHORIZE_WITH_SEED: On-chain - * transaction to begin staking from a seed account - SLASH: On-chain transaction indicating a slash - * event has occurred - COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of - * transaction operations - CONVERSION: Internal conversion between two assets - CLAIM_REWARDS: - * On-chain transaction to claim rewards from Vote Account - VOTE_AUTHORIZE: On-chain transaction to - * transfer the reward claiming permission to other pubkey - WEB3_TRANSACTION: On-chain transaction - * initiated with Prime Onchain Wallet Deprecated: Use ONCHAIN_TRANSACTION instead - - * ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: - * Portfolio-level staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation + * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type + * - DEPOSIT: A fiat or crypto deposit + * - WITHDRAWAL: A fiat or crypto withdrawal + * - INTERNAL_DEPOSIT: An internal fiat or crypto deposit + * - INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal + * - SWEEP_DEPOSIT: Internal automated deposit to a cold address from a restored address + * - SWEEP_WITHDRAWAL: Internal automated withdrawal from a restored address to a cold address + * - PROXY_DEPOSIT: On-chain deposit of funds into proxy contract from cold address + * - PROXY_WITHDRAWAL: On-chain withdrawal of funds from proxy contract to cold address + * - BILLING_WITHDRAWAL: Coinbase Prime automated invoice settlement payment + * - REWARD: Reward payment to an associated address for a staked asset + * - COINBASE_REFUND: Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction + * - TRANSACTION_TYPE_OTHER: An OTHER type of transaction + * - WITHDRAWAL_ADJUSTMENT: A manual adjustment withdrawal transaction + * - DEPOSIT_ADJUSTMENT: A manual adjustment deposit transaction + * - KEY_REGISTRATION: An on-chain registration for an address + * - DELEGATION: An on-chain delegation transaction + * - UNDELEGATION: An on-chain undelegation transaction + * - RESTAKE: On-chain restaking transaction + * - COMPLETE_UNBONDING: On-chain unbonding event transaction + * - WITHDRAW_UNBONDED: On-chain event indicating unbonding period is over + * - STAKE_ACCOUNT_CREATE: On-chain transaction to begin staking from an address + * - CHANGE_VALIDATOR: On-chain transaction alter validator + * - STAKE: On-chain transaction to begin staking in Cryptocurrency network + * - UNSTAKE: On-chain transaction to stop staking in Cryptocurrency network + * - REMOVE_AUTHORIZED_PARTY: On-chain transaction to remove a party from a multi-signature wallet + * - STAKE_AUTHORIZE_WITH_SEED: On-chain transaction to begin staking from a seed account + * - SLASH: On-chain transaction indicating a slash event has occurred + * - COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of transaction operations + * - CONVERSION: Internal conversion between two assets + * - CLAIM_REWARDS: On-chain transaction to claim rewards from Vote Account + * - VOTE_AUTHORIZE: On-chain transaction to transfer the reward claiming permission to other pubkey + * - WEB3_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet + * Deprecated: Use ONCHAIN_TRANSACTION instead + * - ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet + * - PORTFOLIO_STAKE: Portfolio-level staking operation + * - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation */ public enum TransactionType { - /** A fiat or crypto deposit */ + /** + * A fiat or crypto deposit + */ DEPOSIT, - /** A fiat or crypto withdrawal */ + /** + * A fiat or crypto withdrawal + */ WITHDRAWAL, - /** An internal fiat or crypto deposit */ + /** + * An internal fiat or crypto deposit + */ INTERNAL_DEPOSIT, - /** An internal fiat or crypto withdrawal */ + /** + * An internal fiat or crypto withdrawal + */ INTERNAL_WITHDRAWAL, - /** Internal automated deposit to a cold address from a restored address */ + /** + * Internal automated deposit to a cold address from a restored address + */ SWEEP_DEPOSIT, - /** Internal automated withdrawal from a restored address to a cold address */ + /** + * Internal automated withdrawal from a restored address to a cold address + */ SWEEP_WITHDRAWAL, - /** On-chain deposit of funds into proxy contract from cold address */ + /** + * On-chain deposit of funds into proxy contract from cold address + */ PROXY_DEPOSIT, - /** On-chain withdrawal of funds from proxy contract to cold address */ + /** + * On-chain withdrawal of funds from proxy contract to cold address + */ PROXY_WITHDRAWAL, - /** Coinbase Prime automated invoice settlement payment */ + /** + * Coinbase Prime automated invoice settlement payment + */ BILLING_WITHDRAWAL, - /** Reward payment to an associated address for a staked asset */ + /** + * Reward payment to an associated address for a staked asset + */ REWARD, /** * Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction */ COINBASE_REFUND, - /** An OTHER type of transaction */ + /** + * An OTHER type of transaction + */ TRANSACTION_TYPE_OTHER, - /** A manual adjustment withdrawal transaction */ + /** + * A manual adjustment withdrawal transaction + */ WITHDRAWAL_ADJUSTMENT, - /** A manual adjustment deposit transaction */ + /** + * A manual adjustment deposit transaction + */ DEPOSIT_ADJUSTMENT, - /** An on-chain registration for an address */ + /** + * An on-chain registration for an address + */ KEY_REGISTRATION, - /** An on-chain delegation transaction */ + /** + * An on-chain delegation transaction + */ DELEGATION, - /** An on-chain undelegation transaction */ + /** + * An on-chain undelegation transaction + */ UNDELEGATION, - /** On-chain restaking transaction */ + /** + * On-chain restaking transaction + */ RESTAKE, - /** On-chain unbonding event transaction */ + /** + * On-chain unbonding event transaction + */ COMPLETE_UNBONDING, - /** On-chain event indicating unbonding period is over */ + /** + * On-chain event indicating unbonding period is over + */ WITHDRAW_UNBONDED, - /** On-chain transaction to begin staking from an address */ + /** + * On-chain transaction to begin staking from an address + */ STAKE_ACCOUNT_CREATE, - /** On-chain transaction alter validator */ + /** + * On-chain transaction alter validator + */ CHANGE_VALIDATOR, - /** On-chain transaction to begin staking in Cryptocurrency network */ + /** + * On-chain transaction to begin staking in Cryptocurrency network + */ STAKE, - /** On-chain transaction to stop staking in Cryptocurrency network */ + /** + * On-chain transaction to stop staking in Cryptocurrency network + */ UNSTAKE, - /** On-chain transaction to remove a party from a multi-signature wallet */ + /** + * On-chain transaction to remove a party from a multi-signature wallet + */ REMOVE_AUTHORIZED_PARTY, - /** On-chain transaction to begin staking from a seed account */ + /** + * On-chain transaction to begin staking from a seed account + */ STAKE_AUTHORIZE_WITH_SEED, - /** On-chain transaction indicating a slash event has occurred */ + /** + * On-chain transaction indicating a slash event has occurred + */ SLASH, - /** On-chain transaction deposit for the purpose of transaction operations */ + /** + * On-chain transaction deposit for the purpose of transaction operations + */ COINBASE_DEPOSIT, - /** Internal conversion between two assets */ + /** + * Internal conversion between two assets + */ CONVERSION, - /** On-chain transaction to claim rewards from Vote Account */ + /** + * On-chain transaction to claim rewards from Vote Account + */ CLAIM_REWARDS, - /** On-chain transaction to transfer the reward claiming permission to other pubkey */ + /** + * On-chain transaction to transfer the reward claiming permission to other pubkey + */ VOTE_AUTHORIZE, - /** On-chain transaction initiated with Prime Onchain Wallet */ + /** + * On-chain transaction initiated with Prime Onchain Wallet + */ WEB3_TRANSACTION, - /** On-chain transaction initiated with Prime Onchain Wallet */ + /** + * On-chain transaction initiated with Prime Onchain Wallet + */ ONCHAIN_TRANSACTION, - /** Portfolio-level staking operation */ + /** + * Portfolio-level staking operation + */ PORTFOLIO_STAKE, - /** Portfolio-level unstaking operation */ + /** + * Portfolio-level unstaking operation + */ PORTFOLIO_UNSTAKE } + 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 7dfe4c1..28d2e56 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java @@ -19,22 +19,38 @@ package com.coinbase.prime.model.enums; /** - * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value - PAYMENT_METHOD: The ID of a fiat payment method - * - WALLET: The ID of a wallet - ADDRESS: A cryptocurrency address - OTHER: Another type of - * transfer location: Blockchain Network, Coinbase - MULTIPLE_ADDRESSES: Multiple cryptocurrency - * addresses - COUNTERPARTY_ID: Counterparty ID + * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value + * - PAYMENT_METHOD: The ID of a fiat payment method + * - WALLET: The ID of a wallet + * - ADDRESS: A cryptocurrency address + * - OTHER: Another type of transfer location: Blockchain Network, Coinbase + * - MULTIPLE_ADDRESSES: Multiple cryptocurrency addresses + * - COUNTERPARTY_ID: Counterparty ID */ public enum TransferLocationType { - /** The ID of a fiat payment method */ + /** + * The ID of a fiat payment method + */ PAYMENT_METHOD, - /** The ID of a wallet */ + /** + * The ID of a wallet + */ WALLET, - /** A cryptocurrency address */ + /** + * A cryptocurrency address + */ ADDRESS, - /** Another type of transfer location: Blockchain Network, Coinbase */ + /** + * Another type of transfer location: Blockchain Network, Coinbase + */ OTHER, - /** Multiple cryptocurrency addresses */ + /** + * Multiple cryptocurrency addresses + */ MULTIPLE_ADDRESSES, - /** Counterparty ID */ + /** + * Counterparty ID + */ COUNTERPARTY_ID } + 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 f5cdd05..ec46b02 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java @@ -18,9 +18,12 @@ package com.coinbase.prime.model.enums; -/** Travel rule compliance status for a transaction */ +/** + * Travel rule compliance status for a transaction + */ public enum TravelRuleStatus { TRAVEL_RULE_STATUS_UNSPECIFIED, TRAVEL_RULE_STATUS_PENDING, TRAVEL_RULE_STATUS_SUBMITTED } + 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 3cebb9f..13b3c7c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java @@ -19,15 +19,22 @@ package com.coinbase.prime.model.enums; /** - * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type - - * TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet - - * TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet + * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type + * - TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet + * - TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet */ public enum TravelRuleWalletType { - /** Default unspecified wallet type */ + /** + * Default unspecified wallet type + */ TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED, - /** Centralized exchange wallet */ + /** + * Centralized exchange wallet + */ TRAVEL_RULE_WALLET_TYPE_VASP, - /** Self-hosted/custodial wallet */ + /** + * Self-hosted/custodial wallet + */ TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED } + 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 02b315a..c1a89a9 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java @@ -23,3 +23,4 @@ public enum UnstakeType { UNSTAKE_TYPE_PARTIAL, UNSTAKE_TYPE_FULL } + 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 30945e8..e319477 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UserRole.java +++ b/src/main/java/com/coinbase/prime/model/enums/UserRole.java @@ -19,32 +19,63 @@ package com.coinbase.prime.model.enums; /** - * - USER_ROLE_UNKNOWN: nil value - AUDITOR: An auditor - SIGNATORY: A signatory - ADMIN: An admin - - * INITIATOR: An initiator - REVIEWER: A reviewer - TRADER: A trader - FULL_TRADER: A trader with - * full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A tax - * manager - BUSINESS_MANAGER: A business manager + * - USER_ROLE_UNKNOWN: nil value + * - AUDITOR: An auditor + * - SIGNATORY: A signatory + * - ADMIN: An admin + * - INITIATOR: An initiator + * - REVIEWER: A reviewer + * - TRADER: A trader + * - FULL_TRADER: A trader with full permissions + * - TEAM_MANAGER: A team manager + * - APPROVER: An approver + * - TAX_MANAGER: A tax manager + * - BUSINESS_MANAGER: A business manager */ public enum UserRole { - /** An auditor */ + /** + * An auditor + */ AUDITOR, - /** A signatory */ + /** + * A signatory + */ SIGNATORY, - /** An admin */ + /** + * An admin + */ ADMIN, - /** An initiator */ + /** + * An initiator + */ INITIATOR, - /** A reviewer */ + /** + * A reviewer + */ REVIEWER, - /** A trader */ + /** + * A trader + */ TRADER, - /** A trader with full permissions */ + /** + * A trader with full permissions + */ FULL_TRADER, - /** A team manager */ + /** + * A team manager + */ TEAM_MANAGER, - /** An approver */ + /** + * An approver + */ APPROVER, - /** A tax manager */ + /** + * A tax manager + */ TAX_MANAGER, - /** A business manager */ + /** + * A business manager + */ BUSINESS_MANAGER } + 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 c1c1468..383ac78 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java @@ -20,9 +20,9 @@ /** * 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. + * 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, @@ -33,3 +33,4 @@ public enum ValidatorProvider { VALIDATOR_PROVIDER_ATTESTANT, VALIDATOR_PROVIDER_GALAXY } + 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 ca90685..382d0d5 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java @@ -26,3 +26,4 @@ public enum ValidatorStatus { VALIDATOR_STATUS_EXITED, VALIDATOR_STATUS_WITHDRAWN } + 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 7511547..06a66e1 100644 --- a/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java @@ -18,12 +18,24 @@ package com.coinbase.prime.model.enums; -/** - UNKNOWN_VISIBILITY_STATUS: nil - VISIBLE: Visible - HIDDEN: Hidden - SPAM: Spam */ +/** + * - UNKNOWN_VISIBILITY_STATUS: nil + * - VISIBLE: Visible + * - HIDDEN: Hidden + * - SPAM: Spam + */ public enum VisibilityStatus { - /** Visible */ + /** + * Visible + */ VISIBLE, - /** Hidden */ + /** + * Hidden + */ HIDDEN, - /** Spam */ + /** + * Spam + */ SPAM } + 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 04d7749..b6e849d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java @@ -19,19 +19,33 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - CRYPTO: A cryptocurrency deposit - WIRE: A wire - * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - SEPA: - * A SEPA deposit (Single Euro Payments Area) + * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value + * - CRYPTO: A cryptocurrency deposit + * - WIRE: A wire deposit + * - SEN: DEPRECATED. A Silvergate Exchange Network deposit + * - SWIFT: A SWIFT deposit + * - SEPA: A SEPA deposit (Single Euro Payments Area) */ public enum WalletDepositInstructionType { - /** A cryptocurrency deposit */ + /** + * A cryptocurrency deposit + */ CRYPTO, - /** A wire deposit */ + /** + * A wire deposit + */ WIRE, - /** DEPRECATED. A Silvergate Exchange Network deposit */ + /** + * DEPRECATED. A Silvergate Exchange Network deposit + */ SEN, - /** A SWIFT deposit */ + /** + * A SWIFT deposit + */ SWIFT, - /** A SEPA deposit (Single Euro Payments Area) */ + /** + * A SEPA deposit (Single Euro Payments Area) + */ SEPA } + 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 71f277a..481e8b2 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletType.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletType.java @@ -19,18 +19,32 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 */ public enum WalletType { - /** A crypto vault */ + /** + * A crypto vault + */ VAULT, - /** A trading wallet */ + /** + * A trading wallet + */ TRADING, - /** Other wallet types (like consumer, etc) */ + /** + * Other wallet types (like consumer, etc) + */ WALLET_TYPE_OTHER, - /** A QC Wallet */ + /** + * A QC Wallet + */ QC, - /** An Onchain wallet */ + /** + * An Onchain wallet + */ ONCHAIN } + 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 1b3ac96..0476f0f 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java @@ -23,3 +23,4 @@ public enum WalletVisibility { WALLET_VISIBILITY_VISIBLE, WALLET_VISIBILITY_HIDDEN } + 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 2882aed..30b10d4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java @@ -19,18 +19,28 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 */ + /** + * Margin call is open and not expired + */ CALL_STATUS_OPEN, - /** Margin call is open and it is expired */ + /** + * Margin call is open and it is expired + */ CALL_STATUS_AGED, - /** Margin call is fully settled */ + /** + * Margin call is fully settled + */ CALL_STATUS_SETTLED, - /** Margin call was canceled by Credit Risk */ + /** + * 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 index 90b01c8..60205d4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallType.java @@ -19,15 +19,23 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 */ + /** + * Evaluated at standard margin call evaluation time + */ CALL_TYPE_STANDARD, - /** Evaluated in realtime */ + /** + * Evaluated in realtime + */ CALL_TYPE_URGENT, - /** Evaluated at debit call evaluation time */ + /** + * 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 index cb90db0..8d1229e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java @@ -19,27 +19,23 @@ 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. + * - 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. + * 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. + * 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. + * 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 index 5e9b304..f3ced3d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java @@ -19,38 +19,35 @@ 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. + * 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. */ + /** + * 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.. + * 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. + * 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. + * 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. + * 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 index d4286ce..00e7966 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java @@ -19,22 +19,33 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 */ + /** + * Liquidation is in the pre-liquidation phase + */ XM_LIQUIDATION_STATUS_PRE_LIQUIDATION, - /** Liquidation is actively in progress */ + /** + * Liquidation is actively in progress + */ XM_LIQUIDATION_STATUS_LIQUIDATING, - /** Liquidation has completed successfully */ + /** + * Liquidation has completed successfully + */ XM_LIQUIDATION_STATUS_LIQUIDATED, - /** Liquidation was canceled */ + /** + * Liquidation was canceled + */ XM_LIQUIDATION_STATUS_CANCELED, - /** Liquidation failed */ + /** + * 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 index 76d25bc..571d718 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java @@ -19,43 +19,33 @@ 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. + * - 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 */ + /** + * 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) + * 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 + * 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 + * 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. + * 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 index 1155e6b..f5369c9 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMParty.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMParty.java @@ -19,13 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 */ + /** + * Coinbase Exchange, trading venue that can receive the XM loan + */ CBE, - /** Coinbase’s Futures Commission Merchant, trading venue that can receive the XM loan */ + /** + * Coinbase’s Futures Commission Merchant, trading venue that can receive the XM loan + */ FCM } + From 990767f948546f8f1a62d1a77787524848a15cd0 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Wed, 17 Jun 2026 12:36:33 -0700 Subject: [PATCH 10/11] add make commands for format and run format --- Makefile | 8 +- .../com/coinbase/prime/model/Accrual.java | 561 ++++--- .../prime/model/ActiveLiquidationSummary.java | 127 +- .../com/coinbase/prime/model/Activity.java | 555 ++++--- .../prime/model/ActivityMetadataAccount.java | 45 +- .../model/ActivityMetadataConsensus.java | 84 +- .../model/ActivityMetadataTransactions.java | 45 +- .../prime/model/AddressBookEntry.java | 432 +++--- .../coinbase/prime/model/AddressEntry.java | 103 +- .../coinbase/prime/model/AddressGroup.java | 160 +- .../prime/model/AdvancedTransfer.java | 165 +-- .../prime/model/AggregatedFiatBalance.java | 71 +- .../com/coinbase/prime/model/Allocation.java | 519 ++++--- .../coinbase/prime/model/AllocationLeg.java | 115 +- .../com/coinbase/prime/model/AmountDue.java | 113 +- .../java/com/coinbase/prime/model/Asset.java | 211 ++- .../coinbase/prime/model/AssetBalance.java | 179 ++- .../com/coinbase/prime/model/AssetChange.java | 165 ++- .../com/coinbase/prime/model/Balance.java | 485 +++---- .../prime/model/BlindMatchMetadata.java | 151 +- .../prime/model/BlockchainAddress.java | 110 +- .../com/coinbase/prime/model/BuyingPower.java | 183 ++- .../java/com/coinbase/prime/model/Candle.java | 202 ++- .../com/coinbase/prime/model/Commission.java | 113 +- .../prime/model/CommissionDetailTotal.java | 251 ++-- .../com/coinbase/prime/model/Conversion.java | 148 +- .../prime/model/ConversionDetail.java | 249 ++-- .../coinbase/prime/model/Counterparty.java | 51 +- .../prime/model/CounterpartyDestination.java | 49 +- .../model/CreateAllocationResponseBody.java | 115 +- .../CreateNetAllocationResponseBody.java | 181 ++- .../prime/model/CrossMarginOverview.java | 293 ++-- ...MarginPrimeDerivativesEquityBreakdown.java | 150 +- .../model/CrossMarginPrimeMarginSummary.java | 770 +++++----- .../CrossMarginPrimeRiskNettingInfo.java | 324 +++-- .../CrossMarginPrimeSpotEquityBreakdown.java | 183 ++- .../model/CrossMarginPrimeXMPosition.java | 518 ++++--- .../model/CrossMarginRiskParameters.java | 416 +++--- .../model/CustomStablecoinRewardDetails.java | 84 +- .../com/coinbase/prime/model/DateOfBirth.java | 113 +- .../com/coinbase/prime/model/DefiBalance.java | 107 +- .../prime/model/DestinationAlloc.java | 188 ++- .../coinbase/prime/model/DetailedAddress.java | 231 +-- .../com/coinbase/prime/model/DisplayUser.java | 113 +- .../coinbase/prime/model/EntityBalance.java | 181 ++- .../com/coinbase/prime/model/EntityUser.java | 257 ++-- .../prime/model/EstimatedNetworkFees.java | 84 +- .../com/coinbase/prime/model/EvmParams.java | 196 +-- .../coinbase/prime/model/ExistingLocate.java | 379 +++-- .../coinbase/prime/model/FcmMarginCall.java | 204 ++- .../com/coinbase/prime/model/FcmPosition.java | 278 ++-- .../prime/model/FcmScheduledMaintenance.java | 84 +- .../prime/model/FcmTradingSessionDetails.java | 333 +++-- .../java/com/coinbase/prime/model/Fill.java | 504 ++++--- .../coinbase/prime/model/FundMovement.java | 153 +- .../prime/model/FutureProductDetails.java | 392 +++-- .../coinbase/prime/model/FuturesSweep.java | 172 ++- .../com/coinbase/prime/model/Invoice.java | 278 ++-- .../com/coinbase/prime/model/InvoiceItem.java | 242 +-- .../coinbase/prime/model/LimitOrderEdit.java | 264 ++-- .../com/coinbase/prime/model/LoanInfo.java | 179 ++- .../java/com/coinbase/prime/model/Locate.java | 110 +- .../com/coinbase/prime/model/MarginAddOn.java | 78 +- .../prime/model/MarginCallRecord.java | 183 ++- .../prime/model/MarginInformation.java | 82 +- .../coinbase/prime/model/MarginSummary.java | 1093 +++++++------- .../prime/model/MarginSummaryHistorical.java | 114 +- .../com/coinbase/prime/model/MarketData.java | 219 ++- .../com/coinbase/prime/model/MarketRate.java | 79 +- .../coinbase/prime/model/MatchMetadata.java | 84 +- .../prime/model/NaturalPersonName.java | 111 +- .../com/coinbase/prime/model/Network.java | 79 +- .../coinbase/prime/model/NetworkDetails.java | 454 +++--- .../coinbase/prime/model/NftCollection.java | 48 +- .../com/coinbase/prime/model/NftItem.java | 48 +- .../coinbase/prime/model/OnchainAsset.java | 175 ++- .../coinbase/prime/model/OnchainBalance.java | 113 +- .../model/OnchainTransactionDetails.java | 323 ++-- .../model/OnchainTransactionMetadata.java | 83 +- .../java/com/coinbase/prime/model/Order.java | 1293 ++++++++--------- .../com/coinbase/prime/model/OrderEdit.java | 300 ++-- .../prime/model/PaymentMethodDestination.java | 49 +- .../prime/model/PaymentMethodDetails.java | 196 +-- .../prime/model/PaymentMethodSummary.java | 198 +-- .../prime/model/PerpetualProductDetails.java | 183 ++- .../com/coinbase/prime/model/PmAssetInfo.java | 575 ++++---- .../com/coinbase/prime/model/Portfolio.java | 179 ++- .../prime/model/PortfolioStakingMetadata.java | 54 +- .../coinbase/prime/model/PortfolioUser.java | 290 ++-- .../com/coinbase/prime/model/Position.java | 145 +- .../prime/model/PositionReference.java | 76 +- .../model/PostTradeCreditInformation.java | 366 +++-- .../model/PrimeXMMarginCallThresholds.java | 184 ++- .../PrimeXMMarginRequirementBreakdown.java | 188 ++- .../prime/model/PrimeXMMarginThreshold.java | 136 +- .../model/PrimeXMOffsetCreditBreakdown.java | 218 ++- .../prime/model/ProcessRequirements.java | 49 +- .../com/coinbase/prime/model/Product.java | 442 +++--- ...leDataForAnExistingDepositTransaction.java | 131 +- .../coinbase/prime/model/RewardMetadata.java | 109 +- .../prime/model/RfqProductDetails.java | 249 ++-- .../coinbase/prime/model/RiskAssessment.java | 84 +- .../com/coinbase/prime/model/RpcConfig.java | 82 +- .../coinbase/prime/model/ShortCollateral.java | 150 +- .../coinbase/prime/model/StakingStatus.java | 177 ++- .../com/coinbase/prime/model/SweepAmount.java | 79 +- .../com/coinbase/prime/model/TfAsset.java | 115 +- .../coinbase/prime/model/TfObligation.java | 181 ++- .../prime/model/TierPairRateEntry.java | 119 +- .../prime/model/TieredPricingFee.java | 79 +- .../com/coinbase/prime/model/Transaction.java | 947 ++++++------ .../prime/model/TransactionMetadata.java | 109 +- .../prime/model/TransactionValidator.java | 113 +- .../prime/model/TransferLocation.java | 159 +- .../coinbase/prime/model/TravelRuleData.java | 210 +-- .../coinbase/prime/model/TravelRuleParty.java | 362 ++--- .../coinbase/prime/model/UnstakingStatus.java | 239 ++- .../com/coinbase/prime/model/UserAction.java | 111 +- .../prime/model/ValidatorAllocation.java | 86 +- .../prime/model/ValidatorStakingInfo.java | 83 +- .../prime/model/ValidatorUnstakePreview.java | 150 +- .../prime/model/ValidatorUnstakingInfo.java | 83 +- .../java/com/coinbase/prime/model/Wallet.java | 258 ++-- .../prime/model/WalletClaimRewardsInputs.java | 51 +- .../WalletCryptoDepositInstructions.java | 253 ++-- .../model/WalletFiatDepositInstructions.java | 211 +-- .../prime/model/WalletStakeInputs.java | 92 +- .../prime/model/WalletStakingMetadata.java | 63 +- .../prime/model/WalletUnstakeInputs.java | 94 +- .../coinbase/prime/model/WithdrawalPower.java | 79 +- .../java/com/coinbase/prime/model/XMLoan.java | 288 ++-- .../coinbase/prime/model/XMMarginCall.java | 408 +++--- .../com/coinbase/prime/model/XMPosition.java | 843 ++++++----- .../prime/model/XMRiskNettingInfo.java | 494 +++---- .../com/coinbase/prime/model/XMSummary.java | 314 ++-- .../coinbase/prime/model/enums/Action.java | 5 +- .../prime/model/enums/ActivityCategory.java | 1 - .../prime/model/enums/ActivityLevel.java | 1 - .../model/enums/ActivitySecondaryType.java | 18 +- .../prime/model/enums/ActivityStatus.java | 1 - .../prime/model/enums/AddressBookType.java | 1 - .../model/enums/AdvancedTransferState.java | 5 +- .../model/enums/AdvancedTransferType.java | 5 +- .../prime/model/enums/AllocationSizeType.java | 1 - .../prime/model/enums/AllocationStatus.java | 1 - .../prime/model/enums/AssetChangeType.java | 5 +- .../coinbase/prime/model/enums/Benchmark.java | 1 - .../prime/model/enums/CandlesGranularity.java | 5 +- .../prime/model/enums/ContractExpiryType.java | 19 +- .../model/enums/CustodyActivityType.java | 1 - .../prime/model/enums/DestinationType.java | 28 +- .../prime/model/enums/EstimateType.java | 1 - .../model/enums/ExpiringContractStatus.java | 22 +- .../prime/model/enums/FcmMarginCallState.java | 1 - .../prime/model/enums/FcmMarginCallType.java | 1 - .../model/enums/FcmMarginHealthState.java | 32 +- .../prime/model/enums/FcmPositionSide.java | 1 - .../enums/FcmTradingSessionClosedReason.java | 25 +- .../model/enums/FcmTradingSessionState.java | 36 +- .../prime/model/enums/FuturesSweepStatus.java | 1 - .../prime/model/enums/HierarchyType.java | 4 +- .../prime/model/enums/InvoiceState.java | 5 +- .../prime/model/enums/InvoiceType.java | 5 +- .../coinbase/prime/model/enums/LoanType.java | 1 - .../prime/model/enums/MarginAddOnType.java | 1 - .../prime/model/enums/NetworkFamily.java | 1 - .../prime/model/enums/NetworkType.java | 1 - .../coinbase/prime/model/enums/OrderSide.java | 15 +- .../prime/model/enums/OrderStatus.java | 35 +- .../coinbase/prime/model/enums/OrderType.java | 49 +- .../prime/model/enums/PaymentMethodType.java | 19 +- .../prime/model/enums/PegOffsetType.java | 20 +- .../model/enums/PortfolioBalanceType.java | 31 +- .../model/enums/PositionReferenceType.java | 1 - .../prime/model/enums/PrimeActivityType.java | 1 - .../model/enums/PrimeXMControlStatus.java | 18 +- .../model/enums/PrimeXMHealthStatus.java | 53 +- .../prime/model/enums/PrimeXMMarginLevel.java | 36 +- .../enums/PrimeXMMarginRequirementType.java | 14 +- .../enums/PrimeXMMarginThresholdType.java | 13 +- .../prime/model/enums/ProductPermissions.java | 1 - .../prime/model/enums/ProductType.java | 15 +- .../coinbase/prime/model/enums/RateType.java | 1 - .../prime/model/enums/RewardSubtype.java | 57 +- .../prime/model/enums/RiskManagementType.java | 19 +- .../model/enums/SecondaryPermission.java | 19 +- .../prime/model/enums/SigningStatus.java | 14 +- .../prime/model/enums/SortDirection.java | 1 - .../coinbase/prime/model/enums/StakeType.java | 1 - .../prime/model/enums/TimeInForceType.java | 26 +- .../prime/model/enums/TransactionStatus.java | 156 +- .../prime/model/enums/TransactionType.java | 201 +-- .../model/enums/TransferLocationType.java | 36 +- .../prime/model/enums/TravelRuleStatus.java | 5 +- .../model/enums/TravelRuleWalletType.java | 19 +- .../prime/model/enums/UnstakeType.java | 1 - .../coinbase/prime/model/enums/UserRole.java | 61 +- .../prime/model/enums/ValidatorProvider.java | 7 +- .../prime/model/enums/ValidatorStatus.java | 1 - .../prime/model/enums/VisibilityStatus.java | 20 +- .../enums/WalletDepositInstructionType.java | 30 +- .../prime/model/enums/WalletType.java | 28 +- .../prime/model/enums/WalletVisibility.java | 1 - .../prime/model/enums/XMCallStatus.java | 24 +- .../prime/model/enums/XMCallType.java | 18 +- .../prime/model/enums/XMControlStatus.java | 18 +- .../prime/model/enums/XMEntityCallStatus.java | 33 +- .../model/enums/XMLiquidationStatus.java | 31 +- .../prime/model/enums/XMMarginLevel.java | 36 +- .../coinbase/prime/model/enums/XMParty.java | 13 +- 210 files changed, 15240 insertions(+), 16062 deletions(-) diff --git a/Makefile b/Makefile index a986570..c58bc97 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,10 @@ -.PHONY: fetch-spec +.PHONY: fetch-spec compile format fetch-spec: @mkdir -p apiSpec @curl -fsSL -o apiSpec/prime-public-spec.yaml https://api.prime.coinbase.com/v1/openapi.yaml + +compile: + mvn -B compile + +format: + mvn -B spotless:apply diff --git a/src/main/java/com/coinbase/prime/model/Accrual.java b/src/main/java/com/coinbase/prime/model/Accrual.java index 58fc4be..420d8d6 100644 --- a/src/main/java/com/coinbase/prime/model/Accrual.java +++ b/src/main/java/com/coinbase/prime/model/Accrual.java @@ -17,365 +17,354 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.Benchmark; import com.coinbase.prime.model.enums.LoanType; import com.coinbase.prime.model.enums.RateType; import com.fasterxml.jackson.annotation.JsonProperty; public class Accrual { - /** - * The accrual ID - */ - @JsonProperty("accrual_id") + /** The accrual ID */ + @JsonProperty("accrual_id") + private String accrualId; + + /** The date of accrual in UTC */ + private String date; + + /** The unique ID of the portfolio */ + @JsonProperty("portfolio_id") + private String portfolioId; + + /** The currency symbol */ + private String symbol; + + @JsonProperty("loan_type") + private LoanType loanType; + + /** The daily or annualized interest rate for the loan, see rate_type */ + @JsonProperty("interest_rate") + private String interestRate; + + /** Daily accrual amount in the principal currency */ + @JsonProperty("nominal_accrual") + private String nominalAccrual; + + /** Daily USD accrued interest */ + @JsonProperty("notional_accrual") + private String notionalAccrual; + + /** Accrual rate used to convert from principal to USD accrual */ + @JsonProperty("conversion_rate") + private String conversionRate; + + /** Outstanding principal of the loan */ + @JsonProperty("loan_amount") + private String loanAmount; + + private Benchmark benchmark; + + /** Daily interest rate fetched from the benchmark source */ + @JsonProperty("benchmark_rate") + private String benchmarkRate; + + /** Daily spread offset from the benchmark rate */ + private String spread; + + @JsonProperty("rate_type") + private RateType rateType; + + /** Outstanding principal of the loan in USD */ + @JsonProperty("loan_amount_notional") + private String loanAmountNotional; + + /** Settled open borrow as of start-of-day in the principal currency */ + @JsonProperty("nominal_open_borrow_sod") + private String nominalOpenBorrowSod; + + /** Settled open borrow as of start-of-day in USD */ + @JsonProperty("notional_open_borrow_sod") + private String notionalOpenBorrowSod; + + public Accrual() {} + + public Accrual(Builder builder) { + this.accrualId = builder.accrualId; + this.date = builder.date; + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.loanType = builder.loanType; + this.interestRate = builder.interestRate; + this.nominalAccrual = builder.nominalAccrual; + this.notionalAccrual = builder.notionalAccrual; + this.conversionRate = builder.conversionRate; + this.loanAmount = builder.loanAmount; + this.benchmark = builder.benchmark; + this.benchmarkRate = builder.benchmarkRate; + this.spread = builder.spread; + this.rateType = builder.rateType; + this.loanAmountNotional = builder.loanAmountNotional; + this.nominalOpenBorrowSod = builder.nominalOpenBorrowSod; + this.notionalOpenBorrowSod = builder.notionalOpenBorrowSod; + } + + public String getAccrualId() { + return accrualId; + } + + public void setAccrualId(String accrualId) { + this.accrualId = accrualId; + } + + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getSymbol() { + return symbol; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public LoanType getLoanType() { + return loanType; + } + + public void setLoanType(LoanType loanType) { + this.loanType = loanType; + } + + public String getInterestRate() { + return interestRate; + } + + public void setInterestRate(String interestRate) { + this.interestRate = interestRate; + } + + public String getNominalAccrual() { + return nominalAccrual; + } + + public void setNominalAccrual(String nominalAccrual) { + this.nominalAccrual = nominalAccrual; + } + + public String getNotionalAccrual() { + return notionalAccrual; + } + + public void setNotionalAccrual(String notionalAccrual) { + this.notionalAccrual = notionalAccrual; + } + + public String getConversionRate() { + return conversionRate; + } + + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } + + public String getLoanAmount() { + return loanAmount; + } + + public void setLoanAmount(String loanAmount) { + this.loanAmount = loanAmount; + } + + public Benchmark getBenchmark() { + return benchmark; + } + + public void setBenchmark(Benchmark benchmark) { + this.benchmark = benchmark; + } + + public String getBenchmarkRate() { + return benchmarkRate; + } + + public void setBenchmarkRate(String benchmarkRate) { + this.benchmarkRate = benchmarkRate; + } + + public String getSpread() { + return spread; + } + + public void setSpread(String spread) { + this.spread = spread; + } + + public RateType getRateType() { + return rateType; + } + + public void setRateType(RateType rateType) { + this.rateType = rateType; + } + + public String getLoanAmountNotional() { + return loanAmountNotional; + } + + public void setLoanAmountNotional(String loanAmountNotional) { + this.loanAmountNotional = loanAmountNotional; + } + + public String getNominalOpenBorrowSod() { + return nominalOpenBorrowSod; + } + + public void setNominalOpenBorrowSod(String nominalOpenBorrowSod) { + this.nominalOpenBorrowSod = nominalOpenBorrowSod; + } + + public String getNotionalOpenBorrowSod() { + return notionalOpenBorrowSod; + } + + public void setNotionalOpenBorrowSod(String notionalOpenBorrowSod) { + this.notionalOpenBorrowSod = notionalOpenBorrowSod; + } + + public static class Builder { private String accrualId; - /** - * The date of accrual in UTC - */ private String date; - /** - * The unique ID of the portfolio - */ - @JsonProperty("portfolio_id") private String portfolioId; - /** - * The currency symbol - */ private String symbol; - @JsonProperty("loan_type") private LoanType loanType; - /** - * The daily or annualized interest rate for the loan, see rate_type - */ - @JsonProperty("interest_rate") private String interestRate; - /** - * Daily accrual amount in the principal currency - */ - @JsonProperty("nominal_accrual") private String nominalAccrual; - /** - * Daily USD accrued interest - */ - @JsonProperty("notional_accrual") private String notionalAccrual; - /** - * Accrual rate used to convert from principal to USD accrual - */ - @JsonProperty("conversion_rate") private String conversionRate; - /** - * Outstanding principal of the loan - */ - @JsonProperty("loan_amount") private String loanAmount; private Benchmark benchmark; - /** - * Daily interest rate fetched from the benchmark source - */ - @JsonProperty("benchmark_rate") private String benchmarkRate; - /** - * Daily spread offset from the benchmark rate - */ private String spread; - @JsonProperty("rate_type") private RateType rateType; - /** - * Outstanding principal of the loan in USD - */ - @JsonProperty("loan_amount_notional") private String loanAmountNotional; - /** - * Settled open borrow as of start-of-day in the principal currency - */ - @JsonProperty("nominal_open_borrow_sod") private String nominalOpenBorrowSod; - /** - * Settled open borrow as of start-of-day in USD - */ - @JsonProperty("notional_open_borrow_sod") private String notionalOpenBorrowSod; - public Accrual() { + public Builder accrualId(String accrualId) { + this.accrualId = accrualId; + return this; } - public Accrual(Builder builder) { - this.accrualId = builder.accrualId; - this.date = builder.date; - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.loanType = builder.loanType; - this.interestRate = builder.interestRate; - this.nominalAccrual = builder.nominalAccrual; - this.notionalAccrual = builder.notionalAccrual; - this.conversionRate = builder.conversionRate; - this.loanAmount = builder.loanAmount; - this.benchmark = builder.benchmark; - this.benchmarkRate = builder.benchmarkRate; - this.spread = builder.spread; - this.rateType = builder.rateType; - this.loanAmountNotional = builder.loanAmountNotional; - this.nominalOpenBorrowSod = builder.nominalOpenBorrowSod; - this.notionalOpenBorrowSod = builder.notionalOpenBorrowSod; - } - public String getAccrualId() { - return accrualId; + public Builder date(String date) { + this.date = date; + return this; } - public void setAccrualId(String accrualId) { - this.accrualId = accrualId; - } - public String getDate() { - return date; + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; } - public void setDate(String date) { - this.date = date; - } - public String getPortfolioId() { - return portfolioId; + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getSymbol() { - return symbol; + public Builder loanType(LoanType loanType) { + this.loanType = loanType; + return this; } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public LoanType getLoanType() { - return loanType; + public Builder interestRate(String interestRate) { + this.interestRate = interestRate; + return this; } - public void setLoanType(LoanType loanType) { - this.loanType = loanType; - } - public String getInterestRate() { - return interestRate; - } - - public void setInterestRate(String interestRate) { - this.interestRate = interestRate; - } - public String getNominalAccrual() { - return nominalAccrual; + public Builder nominalAccrual(String nominalAccrual) { + this.nominalAccrual = nominalAccrual; + return this; } - public void setNominalAccrual(String nominalAccrual) { - this.nominalAccrual = nominalAccrual; - } - public String getNotionalAccrual() { - return notionalAccrual; - } - - public void setNotionalAccrual(String notionalAccrual) { - this.notionalAccrual = notionalAccrual; - } - public String getConversionRate() { - return conversionRate; + public Builder notionalAccrual(String notionalAccrual) { + this.notionalAccrual = notionalAccrual; + return this; } - public void setConversionRate(String conversionRate) { - this.conversionRate = conversionRate; - } - public String getLoanAmount() { - return loanAmount; + public Builder conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; } - public void setLoanAmount(String loanAmount) { - this.loanAmount = loanAmount; - } - public Benchmark getBenchmark() { - return benchmark; + public Builder loanAmount(String loanAmount) { + this.loanAmount = loanAmount; + return this; } - public void setBenchmark(Benchmark benchmark) { - this.benchmark = benchmark; - } - public String getBenchmarkRate() { - return benchmarkRate; + public Builder benchmark(Benchmark benchmark) { + this.benchmark = benchmark; + return this; } - public void setBenchmarkRate(String benchmarkRate) { - this.benchmarkRate = benchmarkRate; - } - public String getSpread() { - return spread; + public Builder benchmarkRate(String benchmarkRate) { + this.benchmarkRate = benchmarkRate; + return this; } - public void setSpread(String spread) { - this.spread = spread; - } - public RateType getRateType() { - return rateType; + public Builder spread(String spread) { + this.spread = spread; + return this; } - public void setRateType(RateType rateType) { - this.rateType = rateType; - } - public String getLoanAmountNotional() { - return loanAmountNotional; + public Builder rateType(RateType rateType) { + this.rateType = rateType; + return this; } - public void setLoanAmountNotional(String loanAmountNotional) { - this.loanAmountNotional = loanAmountNotional; - } - public String getNominalOpenBorrowSod() { - return nominalOpenBorrowSod; + public Builder loanAmountNotional(String loanAmountNotional) { + this.loanAmountNotional = loanAmountNotional; + return this; } - public void setNominalOpenBorrowSod(String nominalOpenBorrowSod) { - this.nominalOpenBorrowSod = nominalOpenBorrowSod; - } - public String getNotionalOpenBorrowSod() { - return notionalOpenBorrowSod; + public Builder nominalOpenBorrowSod(String nominalOpenBorrowSod) { + this.nominalOpenBorrowSod = nominalOpenBorrowSod; + return this; } - public void setNotionalOpenBorrowSod(String notionalOpenBorrowSod) { - this.notionalOpenBorrowSod = notionalOpenBorrowSod; + public Builder notionalOpenBorrowSod(String notionalOpenBorrowSod) { + this.notionalOpenBorrowSod = notionalOpenBorrowSod; + return this; } - public static class Builder { - private String accrualId; - private String date; - - private String portfolioId; - - private String symbol; - - private LoanType loanType; - - private String interestRate; - - private String nominalAccrual; - - private String notionalAccrual; - - private String conversionRate; - - private String loanAmount; - - private Benchmark benchmark; - - private String benchmarkRate; - - private String spread; - - private RateType rateType; - - private String loanAmountNotional; - - private String nominalOpenBorrowSod; - - private String notionalOpenBorrowSod; - - public Builder accrualId(String accrualId) { - this.accrualId = accrualId; - return this; - } - - public Builder date(String date) { - this.date = date; - return this; - } - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } - - public Builder loanType(LoanType loanType) { - this.loanType = loanType; - return this; - } - - public Builder interestRate(String interestRate) { - this.interestRate = interestRate; - return this; - } - - public Builder nominalAccrual(String nominalAccrual) { - this.nominalAccrual = nominalAccrual; - return this; - } - - public Builder notionalAccrual(String notionalAccrual) { - this.notionalAccrual = notionalAccrual; - return this; - } - - public Builder conversionRate(String conversionRate) { - this.conversionRate = conversionRate; - return this; - } - - public Builder loanAmount(String loanAmount) { - this.loanAmount = loanAmount; - return this; - } - - public Builder benchmark(Benchmark benchmark) { - this.benchmark = benchmark; - return this; - } - - public Builder benchmarkRate(String benchmarkRate) { - this.benchmarkRate = benchmarkRate; - return this; - } - - public Builder spread(String spread) { - this.spread = spread; - return this; - } - - public Builder rateType(RateType rateType) { - this.rateType = rateType; - return this; - } - - public Builder loanAmountNotional(String loanAmountNotional) { - this.loanAmountNotional = loanAmountNotional; - return this; - } - - public Builder nominalOpenBorrowSod(String nominalOpenBorrowSod) { - this.nominalOpenBorrowSod = nominalOpenBorrowSod; - return this; - } - - public Builder notionalOpenBorrowSod(String notionalOpenBorrowSod) { - this.notionalOpenBorrowSod = notionalOpenBorrowSod; - return this; - } - - public Accrual build() { - return new Accrual(this); - } + public Accrual build() { + return new Accrual(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java index 79ea8b0..ad4c7a7 100644 --- a/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java +++ b/src/main/java/com/coinbase/prime/model/ActiveLiquidationSummary.java @@ -17,86 +17,85 @@ */ package com.coinbase.prime.model; + 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 */ public class ActiveLiquidationSummary { - /** - * Financing liquidation UUID - */ - @JsonProperty("liquidation_id") + /** Financing liquidation UUID */ + @JsonProperty("liquidation_id") + private String liquidationId; + + /** + * - 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 + */ + private XMLiquidationStatus status; + + /** USD notional shortfall amount that triggered the liquidation */ + @JsonProperty("shortfall_amount") + private String shortfallAmount; + + public ActiveLiquidationSummary() {} + + public ActiveLiquidationSummary(Builder builder) { + this.liquidationId = builder.liquidationId; + this.status = builder.status; + this.shortfallAmount = builder.shortfallAmount; + } + + public String getLiquidationId() { + return liquidationId; + } + + public void setLiquidationId(String liquidationId) { + this.liquidationId = liquidationId; + } + + public XMLiquidationStatus getStatus() { + return status; + } + + public void setStatus(XMLiquidationStatus status) { + this.status = status; + } + + public String getShortfallAmount() { + return shortfallAmount; + } + + public void setShortfallAmount(String shortfallAmount) { + this.shortfallAmount = shortfallAmount; + } + + public static class Builder { private String liquidationId; - /** - * - 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 - */ private XMLiquidationStatus status; - /** - * USD notional shortfall amount that triggered the liquidation - */ - @JsonProperty("shortfall_amount") private String shortfallAmount; - public ActiveLiquidationSummary() { - } - - public ActiveLiquidationSummary(Builder builder) { - this.liquidationId = builder.liquidationId; - this.status = builder.status; - this.shortfallAmount = builder.shortfallAmount; - } - public String getLiquidationId() { - return liquidationId; - } - - public void setLiquidationId(String liquidationId) { - this.liquidationId = liquidationId; - } - public XMLiquidationStatus getStatus() { - return status; + public Builder liquidationId(String liquidationId) { + this.liquidationId = liquidationId; + return this; } - public void setStatus(XMLiquidationStatus status) { - this.status = status; - } - public String getShortfallAmount() { - return shortfallAmount; + public Builder status(XMLiquidationStatus status) { + this.status = status; + return this; } - public void setShortfallAmount(String shortfallAmount) { - this.shortfallAmount = shortfallAmount; + public Builder shortfallAmount(String shortfallAmount) { + this.shortfallAmount = shortfallAmount; + return this; } - public static class Builder { - private String liquidationId; - - private XMLiquidationStatus status; - - private String shortfallAmount; - - public Builder liquidationId(String liquidationId) { - this.liquidationId = liquidationId; - return this; - } - public Builder status(XMLiquidationStatus status) { - this.status = status; - return this; - } - - public Builder shortfallAmount(String shortfallAmount) { - this.shortfallAmount = shortfallAmount; - return this; - } - - public ActiveLiquidationSummary build() { - return new ActiveLiquidationSummary(this); - } + public ActiveLiquidationSummary build() { + return new ActiveLiquidationSummary(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/Activity.java b/src/main/java/com/coinbase/prime/model/Activity.java index 348c2b7..19de362 100644 --- a/src/main/java/com/coinbase/prime/model/Activity.java +++ b/src/main/java/com/coinbase/prime/model/Activity.java @@ -17,359 +17,358 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.ActivityCategory; -import com.coinbase.prime.model.ActivityMetadataAccount; -import com.coinbase.prime.model.ActivityMetadataTransactions; import com.coinbase.prime.model.enums.ActivitySecondaryType; import com.coinbase.prime.model.enums.ActivityStatus; -import com.coinbase.prime.model.enums.PrimeActivityType; import com.coinbase.prime.model.enums.HierarchyType; -import com.coinbase.prime.model.UserAction; +import com.coinbase.prime.model.enums.PrimeActivityType; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Activity { - /** - * A unique id for the account activity - */ + /** A unique id for the account activity */ + private String id; + + /** A reference for orders and transactions, n/a for other category types */ + @JsonProperty("reference_id") + private String referenceId; + + private ActivityCategory category; + + private PrimeActivityType type; + + /** + * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types - + * ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: Transaction secondary types - + * ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types + */ + @JsonProperty("secondary_type") + private ActivitySecondaryType secondaryType; + + private ActivityStatus status; + + /** Id of user who created the activity */ + @JsonProperty("created_by") + private String createdBy; + + /** Title of the activity */ + private String title; + + /** Description detail of the activity */ + private String description; + + /** Actions related to the Activity */ + @JsonProperty("user_actions") + private List userActions; + + @JsonProperty("transactions_metadata") + private ActivityMetadataTransactions transactionsMetadata; + + @JsonProperty("account_metadata") + private ActivityMetadataAccount accountMetadata; + + @JsonProperty("orders_metadata") + private Object ordersMetadata; + + /** List of currencies included in an activity */ + private List symbols; + + /** Time activity was created at */ + @JsonProperty("created_at") + private String createdAt; + + /** Time for latest status update of account activity */ + @JsonProperty("updated_at") + private String updatedAt; + + /** + * HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, + * Portfolio + */ + @JsonProperty("hierarchy_type") + private HierarchyType hierarchyType; + + public Activity() {} + + public Activity(Builder builder) { + this.id = builder.id; + this.referenceId = builder.referenceId; + this.category = builder.category; + this.type = builder.type; + this.secondaryType = builder.secondaryType; + this.status = builder.status; + this.createdBy = builder.createdBy; + this.title = builder.title; + this.description = builder.description; + this.userActions = builder.userActions; + this.transactionsMetadata = builder.transactionsMetadata; + this.accountMetadata = builder.accountMetadata; + this.ordersMetadata = builder.ordersMetadata; + this.symbols = builder.symbols; + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + this.hierarchyType = builder.hierarchyType; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + public ActivityCategory getCategory() { + return category; + } + + public void setCategory(ActivityCategory category) { + this.category = category; + } + + public PrimeActivityType getType() { + return type; + } + + public void setType(PrimeActivityType type) { + this.type = type; + } + + public ActivitySecondaryType getSecondaryType() { + return secondaryType; + } + + public void setSecondaryType(ActivitySecondaryType secondaryType) { + this.secondaryType = secondaryType; + } + + public ActivityStatus getStatus() { + return status; + } + + public void setStatus(ActivityStatus status) { + this.status = status; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List getUserActions() { + return userActions; + } + + public void setUserActions(List userActions) { + this.userActions = userActions; + } + + public ActivityMetadataTransactions getTransactionsMetadata() { + return transactionsMetadata; + } + + public void setTransactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { + this.transactionsMetadata = transactionsMetadata; + } + + public ActivityMetadataAccount getAccountMetadata() { + return accountMetadata; + } + + public void setAccountMetadata(ActivityMetadataAccount accountMetadata) { + this.accountMetadata = accountMetadata; + } + + public Object getOrdersMetadata() { + return ordersMetadata; + } + + public void setOrdersMetadata(Object ordersMetadata) { + this.ordersMetadata = ordersMetadata; + } + + public List getSymbols() { + return symbols; + } + + public void setSymbols(List symbols) { + this.symbols = symbols; + } + + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public String getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + public HierarchyType getHierarchyType() { + return hierarchyType; + } + + public void setHierarchyType(HierarchyType hierarchyType) { + this.hierarchyType = hierarchyType; + } + + public static class Builder { private String id; - /** - * A reference for orders and transactions, n/a for other category types - */ - @JsonProperty("reference_id") private String referenceId; private ActivityCategory category; private PrimeActivityType type; - /** - * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types - * - ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: Transaction secondary types - * - ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types - */ - @JsonProperty("secondary_type") private ActivitySecondaryType secondaryType; private ActivityStatus status; - /** - * Id of user who created the activity - */ - @JsonProperty("created_by") private String createdBy; - /** - * Title of the activity - */ private String title; - /** - * Description detail of the activity - */ private String description; - /** - * Actions related to the Activity - */ - @JsonProperty("user_actions") private List userActions; - @JsonProperty("transactions_metadata") private ActivityMetadataTransactions transactionsMetadata; - @JsonProperty("account_metadata") private ActivityMetadataAccount accountMetadata; - @JsonProperty("orders_metadata") private Object ordersMetadata; - /** - * List of currencies included in an activity - */ private List symbols; - /** - * Time activity was created at - */ - @JsonProperty("created_at") private String createdAt; - /** - * Time for latest status update of account activity - */ - @JsonProperty("updated_at") private String updatedAt; - /** HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, Portfolio */ - @JsonProperty("hierarchy_type") private HierarchyType hierarchyType; - public Activity() { - } - - public Activity(Builder builder) { - this.id = builder.id; - this.referenceId = builder.referenceId; - this.category = builder.category; - this.type = builder.type; - this.secondaryType = builder.secondaryType; - this.status = builder.status; - this.createdBy = builder.createdBy; - this.title = builder.title; - this.description = builder.description; - this.userActions = builder.userActions; - this.transactionsMetadata = builder.transactionsMetadata; - this.accountMetadata = builder.accountMetadata; - this.ordersMetadata = builder.ordersMetadata; - this.symbols = builder.symbols; - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - this.hierarchyType = builder.hierarchyType; - } - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - public String getReferenceId() { - return referenceId; + public Builder id(String id) { + this.id = id; + return this; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - public ActivityCategory getCategory() { - return category; + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; } - public void setCategory(ActivityCategory category) { - this.category = category; - } - public PrimeActivityType getType() { - return type; + public Builder category(ActivityCategory category) { + this.category = category; + return this; } - public void setType(PrimeActivityType type) { - this.type = type; - } - public ActivitySecondaryType getSecondaryType() { - return secondaryType; + public Builder type(PrimeActivityType type) { + this.type = type; + return this; } - public void setSecondaryType(ActivitySecondaryType secondaryType) { - this.secondaryType = secondaryType; - } - public ActivityStatus getStatus() { - return status; + public Builder secondaryType(ActivitySecondaryType secondaryType) { + this.secondaryType = secondaryType; + return this; } - public void setStatus(ActivityStatus status) { - this.status = status; - } - public String getCreatedBy() { - return createdBy; + public Builder status(ActivityStatus status) { + this.status = status; + return this; } - public void setCreatedBy(String createdBy) { - this.createdBy = createdBy; - } - public String getTitle() { - return title; + public Builder createdBy(String createdBy) { + this.createdBy = createdBy; + return this; } - public void setTitle(String title) { - this.title = title; - } - public String getDescription() { - return description; + public Builder title(String title) { + this.title = title; + return this; } - public void setDescription(String description) { - this.description = description; - } - public List getUserActions() { - return userActions; + public Builder description(String description) { + this.description = description; + return this; } - public void setUserActions(List userActions) { - this.userActions = userActions; - } - public ActivityMetadataTransactions getTransactionsMetadata() { - return transactionsMetadata; + public Builder userActions(List userActions) { + this.userActions = userActions; + return this; } - public void setTransactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { - this.transactionsMetadata = transactionsMetadata; - } - public ActivityMetadataAccount getAccountMetadata() { - return accountMetadata; + public Builder transactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { + this.transactionsMetadata = transactionsMetadata; + return this; } - public void setAccountMetadata(ActivityMetadataAccount accountMetadata) { - this.accountMetadata = accountMetadata; - } - public Object getOrdersMetadata() { - return ordersMetadata; + public Builder accountMetadata(ActivityMetadataAccount accountMetadata) { + this.accountMetadata = accountMetadata; + return this; } - public void setOrdersMetadata(Object ordersMetadata) { - this.ordersMetadata = ordersMetadata; - } - public List getSymbols() { - return symbols; + public Builder ordersMetadata(Object ordersMetadata) { + this.ordersMetadata = ordersMetadata; + return this; } - public void setSymbols(List symbols) { - this.symbols = symbols; - } - public String getCreatedAt() { - return createdAt; + public Builder symbols(List symbols) { + this.symbols = symbols; + return this; } - public void setCreatedAt(String createdAt) { - this.createdAt = createdAt; - } - public String getUpdatedAt() { - return updatedAt; + public Builder createdAt(String createdAt) { + this.createdAt = createdAt; + return this; } - public void setUpdatedAt(String updatedAt) { - this.updatedAt = updatedAt; - } - public HierarchyType getHierarchyType() { - return hierarchyType; + public Builder updatedAt(String updatedAt) { + this.updatedAt = updatedAt; + return this; } - public void setHierarchyType(HierarchyType hierarchyType) { - this.hierarchyType = hierarchyType; + public Builder hierarchyType(HierarchyType hierarchyType) { + this.hierarchyType = hierarchyType; + return this; } - public static class Builder { - private String id; - - private String referenceId; - - private ActivityCategory category; - - private PrimeActivityType type; - - private ActivitySecondaryType secondaryType; - - private ActivityStatus status; - - private String createdBy; - - private String title; - - private String description; - - private List userActions; - - private ActivityMetadataTransactions transactionsMetadata; - - private ActivityMetadataAccount accountMetadata; - - private Object ordersMetadata; - - private List symbols; - - private String createdAt; - - private String updatedAt; - - private HierarchyType hierarchyType; - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - public Builder category(ActivityCategory category) { - this.category = category; - return this; - } - - public Builder type(PrimeActivityType type) { - this.type = type; - return this; - } - - public Builder secondaryType(ActivitySecondaryType secondaryType) { - this.secondaryType = secondaryType; - return this; - } - - public Builder status(ActivityStatus status) { - this.status = status; - return this; - } - - public Builder createdBy(String createdBy) { - this.createdBy = createdBy; - return this; - } - - public Builder title(String title) { - this.title = title; - return this; - } - - public Builder description(String description) { - this.description = description; - return this; - } - - public Builder userActions(List userActions) { - this.userActions = userActions; - return this; - } - - public Builder transactionsMetadata(ActivityMetadataTransactions transactionsMetadata) { - this.transactionsMetadata = transactionsMetadata; - return this; - } - - public Builder accountMetadata(ActivityMetadataAccount accountMetadata) { - this.accountMetadata = accountMetadata; - return this; - } - - public Builder ordersMetadata(Object ordersMetadata) { - this.ordersMetadata = ordersMetadata; - return this; - } - - public Builder symbols(List symbols) { - this.symbols = symbols; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder updatedAt(String updatedAt) { - this.updatedAt = updatedAt; - return this; - } - - public Builder hierarchyType(HierarchyType hierarchyType) { - this.hierarchyType = hierarchyType; - return this; - } - - public Activity build() { - return new Activity(this); - } + public Activity build() { + return new Activity(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java index f74ca5a..b6c3341 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataAccount.java @@ -17,35 +17,34 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.ActivityMetadataConsensus; public class ActivityMetadataAccount { - private ActivityMetadataConsensus consensus; + private ActivityMetadataConsensus consensus; - public ActivityMetadataAccount() { - } + public ActivityMetadataAccount() {} - public ActivityMetadataAccount(Builder builder) { - this.consensus = builder.consensus; - } - public ActivityMetadataConsensus getConsensus() { - return consensus; - } + public ActivityMetadataAccount(Builder builder) { + this.consensus = builder.consensus; + } - public void setConsensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - } - public static class Builder { - private ActivityMetadataConsensus consensus; + public ActivityMetadataConsensus getConsensus() { + return consensus; + } - public Builder consensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - return this; - } + public void setConsensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; + } - public ActivityMetadataAccount build() { - return new ActivityMetadataAccount(this); - } + public static class Builder { + private ActivityMetadataConsensus consensus; + + public Builder consensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; + return this; } -} + public ActivityMetadataAccount build() { + return new ActivityMetadataAccount(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java index 40a9571..5a2ae77 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataConsensus.java @@ -17,60 +17,58 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class ActivityMetadataConsensus { - /** - * Deadline for approval of an activity - */ - @JsonProperty("approval_deadline") - private String approvalDeadline; + /** Deadline for approval of an activity */ + @JsonProperty("approval_deadline") + private String approvalDeadline; - /** - * If activity has passed consensus threshold - */ - @JsonProperty("has_passed_consensus") - private boolean hasPassedConsensus; + /** If activity has passed consensus threshold */ + @JsonProperty("has_passed_consensus") + private boolean hasPassedConsensus; - public ActivityMetadataConsensus() { - } + public ActivityMetadataConsensus() {} - public ActivityMetadataConsensus(Builder builder) { - this.approvalDeadline = builder.approvalDeadline; - this.hasPassedConsensus = builder.hasPassedConsensus; - } - public String getApprovalDeadline() { - return approvalDeadline; - } + public ActivityMetadataConsensus(Builder builder) { + this.approvalDeadline = builder.approvalDeadline; + this.hasPassedConsensus = builder.hasPassedConsensus; + } - public void setApprovalDeadline(String approvalDeadline) { - this.approvalDeadline = approvalDeadline; - } - public boolean getHasPassedConsensus() { - return hasPassedConsensus; - } + public String getApprovalDeadline() { + return approvalDeadline; + } - public void setHasPassedConsensus(boolean hasPassedConsensus) { - this.hasPassedConsensus = hasPassedConsensus; - } - public static class Builder { - private String approvalDeadline; + public void setApprovalDeadline(String approvalDeadline) { + this.approvalDeadline = approvalDeadline; + } - private boolean hasPassedConsensus; + public boolean getHasPassedConsensus() { + return hasPassedConsensus; + } - public Builder approvalDeadline(String approvalDeadline) { - this.approvalDeadline = approvalDeadline; - return this; - } + public void setHasPassedConsensus(boolean hasPassedConsensus) { + this.hasPassedConsensus = hasPassedConsensus; + } - public Builder hasPassedConsensus(boolean hasPassedConsensus) { - this.hasPassedConsensus = hasPassedConsensus; - return this; - } + public static class Builder { + private String approvalDeadline; + + private boolean hasPassedConsensus; - public ActivityMetadataConsensus build() { - return new ActivityMetadataConsensus(this); - } + public Builder approvalDeadline(String approvalDeadline) { + this.approvalDeadline = approvalDeadline; + return this; } -} + public Builder hasPassedConsensus(boolean hasPassedConsensus) { + this.hasPassedConsensus = hasPassedConsensus; + return this; + } + + public ActivityMetadataConsensus build() { + return new ActivityMetadataConsensus(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java index 05a0ab0..a345160 100644 --- a/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java +++ b/src/main/java/com/coinbase/prime/model/ActivityMetadataTransactions.java @@ -17,35 +17,34 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.ActivityMetadataConsensus; public class ActivityMetadataTransactions { - private ActivityMetadataConsensus consensus; + private ActivityMetadataConsensus consensus; - public ActivityMetadataTransactions() { - } + public ActivityMetadataTransactions() {} - public ActivityMetadataTransactions(Builder builder) { - this.consensus = builder.consensus; - } - public ActivityMetadataConsensus getConsensus() { - return consensus; - } + public ActivityMetadataTransactions(Builder builder) { + this.consensus = builder.consensus; + } - public void setConsensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - } - public static class Builder { - private ActivityMetadataConsensus consensus; + public ActivityMetadataConsensus getConsensus() { + return consensus; + } - public Builder consensus(ActivityMetadataConsensus consensus) { - this.consensus = consensus; - return this; - } + public void setConsensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; + } - public ActivityMetadataTransactions build() { - return new ActivityMetadataTransactions(this); - } + public static class Builder { + private ActivityMetadataConsensus consensus; + + public Builder consensus(ActivityMetadataConsensus consensus) { + this.consensus = consensus; + return this; } -} + public ActivityMetadataTransactions build() { + return new ActivityMetadataTransactions(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java index c5bc51b..f9848a6 100644 --- a/src/main/java/com/coinbase/prime/model/AddressBookEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressBookEntry.java @@ -17,283 +17,273 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.AddressBookType; -import com.coinbase.prime.model.DisplayUser; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class AddressBookEntry { - /** - * UUID identifying this address book entry - */ + /** UUID identifying this address book entry */ + private String id; + + /** Currency symbol */ + @JsonProperty("currency_symbol") + private String currencySymbol; + + /** Name for this address book entry */ + private String name; + + /** Cryptocurrency address */ + private String address; + + /** Memo or destination tag for currencies which support them */ + @JsonProperty("account_identifier") + private String accountIdentifier; + + /** Name of the account identifier. For instance Destination Tag */ + @JsonProperty("account_identifier_name") + private String accountIdentifierName; + + /** State of this address book entry */ + private String state; + + /** Link to a blockchain explorer */ + @JsonProperty("explorer_link") + private String explorerLink; + + /** When this entry was last used for a transaction */ + @JsonProperty("last_used_at") + private OffsetDateTime lastUsedAt; + + /** When this entry was added to the address book */ + @JsonProperty("added_at") + private OffsetDateTime addedAt; + + @JsonProperty("added_by") + private DisplayUser addedBy; + + private AddressBookType type; + + /** counterparty id */ + @JsonProperty("counterparty_id") + private String counterpartyId; + + public AddressBookEntry() {} + + public AddressBookEntry(Builder builder) { + this.id = builder.id; + this.currencySymbol = builder.currencySymbol; + this.name = builder.name; + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + this.accountIdentifierName = builder.accountIdentifierName; + this.state = builder.state; + this.explorerLink = builder.explorerLink; + this.lastUsedAt = builder.lastUsedAt; + this.addedAt = builder.addedAt; + this.addedBy = builder.addedBy; + this.type = builder.type; + this.counterpartyId = builder.counterpartyId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getCurrencySymbol() { + return currencySymbol; + } + + public void setCurrencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAccountIdentifier() { + return accountIdentifier; + } + + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } + + public String getAccountIdentifierName() { + return accountIdentifierName; + } + + public void setAccountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public String getExplorerLink() { + return explorerLink; + } + + public void setExplorerLink(String explorerLink) { + this.explorerLink = explorerLink; + } + + public OffsetDateTime getLastUsedAt() { + return lastUsedAt; + } + + public void setLastUsedAt(OffsetDateTime lastUsedAt) { + this.lastUsedAt = lastUsedAt; + } + + public OffsetDateTime getAddedAt() { + return addedAt; + } + + public void setAddedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + } + + public DisplayUser getAddedBy() { + return addedBy; + } + + public void setAddedBy(DisplayUser addedBy) { + this.addedBy = addedBy; + } + + public AddressBookType getType() { + return type; + } + + public void setType(AddressBookType type) { + this.type = type; + } + + public String getCounterpartyId() { + return counterpartyId; + } + + public void setCounterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + } + + public static class Builder { private String id; - /** - * Currency symbol - */ - @JsonProperty("currency_symbol") private String currencySymbol; - /** - * Name for this address book entry - */ private String name; - /** - * Cryptocurrency address - */ private String address; - /** - * Memo or destination tag for currencies which support them - */ - @JsonProperty("account_identifier") private String accountIdentifier; - /** - * Name of the account identifier. For instance Destination Tag - */ - @JsonProperty("account_identifier_name") private String accountIdentifierName; - /** - * State of this address book entry - */ private String state; - /** - * Link to a blockchain explorer - */ - @JsonProperty("explorer_link") private String explorerLink; - /** - * When this entry was last used for a transaction - */ - @JsonProperty("last_used_at") private OffsetDateTime lastUsedAt; - /** - * When this entry was added to the address book - */ - @JsonProperty("added_at") private OffsetDateTime addedAt; - @JsonProperty("added_by") private DisplayUser addedBy; private AddressBookType type; - /** - * counterparty id - */ - @JsonProperty("counterparty_id") private String counterpartyId; - public AddressBookEntry() { - } - - public AddressBookEntry(Builder builder) { - this.id = builder.id; - this.currencySymbol = builder.currencySymbol; - this.name = builder.name; - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - this.accountIdentifierName = builder.accountIdentifierName; - this.state = builder.state; - this.explorerLink = builder.explorerLink; - this.lastUsedAt = builder.lastUsedAt; - this.addedAt = builder.addedAt; - this.addedBy = builder.addedBy; - this.type = builder.type; - this.counterpartyId = builder.counterpartyId; - } - public String getId() { - return id; + public Builder id(String id) { + this.id = id; + return this; } - public void setId(String id) { - this.id = id; - } - public String getCurrencySymbol() { - return currencySymbol; + public Builder currencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + return this; } - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } - public String getName() { - return name; + public Builder name(String name) { + this.name = name; + return this; } - public void setName(String name) { - this.name = name; - } - public String getAddress() { - return address; + public Builder address(String address) { + this.address = address; + return this; } - public void setAddress(String address) { - this.address = address; - } - public String getAccountIdentifier() { - return accountIdentifier; + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; } - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } - public String getAccountIdentifierName() { - return accountIdentifierName; + public Builder accountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + return this; } - public void setAccountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - } - public String getState() { - return state; + public Builder state(String state) { + this.state = state; + return this; } - public void setState(String state) { - this.state = state; - } - public String getExplorerLink() { - return explorerLink; + public Builder explorerLink(String explorerLink) { + this.explorerLink = explorerLink; + return this; } - public void setExplorerLink(String explorerLink) { - this.explorerLink = explorerLink; - } - public OffsetDateTime getLastUsedAt() { - return lastUsedAt; + public Builder lastUsedAt(OffsetDateTime lastUsedAt) { + this.lastUsedAt = lastUsedAt; + return this; } - public void setLastUsedAt(OffsetDateTime lastUsedAt) { - this.lastUsedAt = lastUsedAt; - } - public OffsetDateTime getAddedAt() { - return addedAt; + public Builder addedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + return this; } - public void setAddedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - } - public DisplayUser getAddedBy() { - return addedBy; + public Builder addedBy(DisplayUser addedBy) { + this.addedBy = addedBy; + return this; } - public void setAddedBy(DisplayUser addedBy) { - this.addedBy = addedBy; - } - public AddressBookType getType() { - return type; + public Builder type(AddressBookType type) { + this.type = type; + return this; } - public void setType(AddressBookType type) { - this.type = type; - } - public String getCounterpartyId() { - return counterpartyId; + public Builder counterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + return this; } - public void setCounterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - } - public static class Builder { - private String id; - - private String currencySymbol; - - private String name; - - private String address; - - private String accountIdentifier; - - private String accountIdentifierName; - - private String state; - - private String explorerLink; - - private OffsetDateTime lastUsedAt; - - private OffsetDateTime addedAt; - - private DisplayUser addedBy; - - private AddressBookType type; - - private String counterpartyId; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder address(String address) { - this.address = address; - return this; - } - - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; - } - - public Builder accountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - return this; - } - - public Builder state(String state) { - this.state = state; - return this; - } - - public Builder explorerLink(String explorerLink) { - this.explorerLink = explorerLink; - return this; - } - - public Builder lastUsedAt(OffsetDateTime lastUsedAt) { - this.lastUsedAt = lastUsedAt; - return this; - } - - public Builder addedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - return this; - } - - public Builder addedBy(DisplayUser addedBy) { - this.addedBy = addedBy; - return this; - } - - public Builder type(AddressBookType type) { - this.type = type; - return this; - } - - public Builder counterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - return this; - } - - public AddressBookEntry build() { - return new AddressBookEntry(this); - } + public AddressBookEntry build() { + return new AddressBookEntry(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/AddressEntry.java b/src/main/java/com/coinbase/prime/model/AddressEntry.java index 3d33f1f..361e823 100644 --- a/src/main/java/com/coinbase/prime/model/AddressEntry.java +++ b/src/main/java/com/coinbase/prime/model/AddressEntry.java @@ -17,72 +17,75 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class AddressEntry { - private String name; + private String name; - private String address; + private String address; - /** List of compatible chain IDs for a given address, empty for Solana */ - @JsonProperty("chain_ids") - private List chainIds; + /** List of compatible chain IDs for a given address, empty for Solana */ + @JsonProperty("chain_ids") + private List chainIds; - public AddressEntry() { - } + public AddressEntry() {} - public AddressEntry(Builder builder) { - this.name = builder.name; - this.address = builder.address; - this.chainIds = builder.chainIds; - } - public String getName() { - return name; - } + public AddressEntry(Builder builder) { + this.name = builder.name; + this.address = builder.address; + this.chainIds = builder.chainIds; + } - public void setName(String name) { - this.name = name; - } - public String getAddress() { - return address; - } + public String getName() { + return name; + } - public void setAddress(String address) { - this.address = address; - } - public List getChainIds() { - return chainIds; - } + public void setName(String name) { + this.name = name; + } - public void setChainIds(List chainIds) { - this.chainIds = chainIds; - } - public static class Builder { - private String name; + public String getAddress() { + return address; + } - private String address; + public void setAddress(String address) { + this.address = address; + } - private List chainIds; + public List getChainIds() { + return chainIds; + } - public Builder name(String name) { - this.name = name; - return this; - } + public void setChainIds(List chainIds) { + this.chainIds = chainIds; + } - public Builder address(String address) { - this.address = address; - return this; - } + public static class Builder { + private String name; + + private String address; - public Builder chainIds(List chainIds) { - this.chainIds = chainIds; - return this; - } + private List chainIds; - public AddressEntry build() { - return new AddressEntry(this); - } + public Builder name(String name) { + this.name = name; + return this; } -} + public Builder address(String address) { + this.address = address; + return this; + } + + public Builder chainIds(List chainIds) { + this.chainIds = chainIds; + return this; + } + + public AddressEntry build() { + return new AddressEntry(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/AddressGroup.java b/src/main/java/com/coinbase/prime/model/AddressGroup.java index c977cc8..38fa3f6 100644 --- a/src/main/java/com/coinbase/prime/model/AddressGroup.java +++ b/src/main/java/com/coinbase/prime/model/AddressGroup.java @@ -17,110 +17,114 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.AddressEntry; + import com.coinbase.prime.model.enums.NetworkType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; public class AddressGroup { - private String id; + private String id; - private String name; + private String name; - @JsonProperty("network_type") - private NetworkType networkType; + @JsonProperty("network_type") + private NetworkType networkType; - /** A list of addresses within the group */ - private List addresses; + /** A list of addresses within the group */ + private List addresses; - @JsonProperty("added_at") - private OffsetDateTime addedAt; + @JsonProperty("added_at") + private OffsetDateTime addedAt; - public AddressGroup() { - } + public AddressGroup() {} - public AddressGroup(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.networkType = builder.networkType; - this.addresses = builder.addresses; - this.addedAt = builder.addedAt; - } - public String getId() { - return id; - } + public AddressGroup(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.networkType = builder.networkType; + this.addresses = builder.addresses; + this.addedAt = builder.addedAt; + } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } + public String getId() { + return id; + } - public void setName(String name) { - this.name = name; - } - public NetworkType getNetworkType() { - return networkType; - } + public void setId(String id) { + this.id = id; + } - public void setNetworkType(NetworkType networkType) { - this.networkType = networkType; - } - public List getAddresses() { - return addresses; - } + public String getName() { + return name; + } - public void setAddresses(List addresses) { - this.addresses = addresses; - } - public OffsetDateTime getAddedAt() { - return addedAt; - } + public void setName(String name) { + this.name = name; + } - public void setAddedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - } - public static class Builder { - private String id; + public NetworkType getNetworkType() { + return networkType; + } - private String name; + public void setNetworkType(NetworkType networkType) { + this.networkType = networkType; + } - private NetworkType networkType; + public List getAddresses() { + return addresses; + } - private List addresses; + public void setAddresses(List addresses) { + this.addresses = addresses; + } - private OffsetDateTime addedAt; + public OffsetDateTime getAddedAt() { + return addedAt; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setAddedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + } - public Builder name(String name) { - this.name = name; - return this; - } + public static class Builder { + private String id; - public Builder networkType(NetworkType networkType) { - this.networkType = networkType; - return this; - } + private String name; - public Builder addresses(List addresses) { - this.addresses = addresses; - return this; - } + private NetworkType networkType; - public Builder addedAt(OffsetDateTime addedAt) { - this.addedAt = addedAt; - return this; - } + private List addresses; - public AddressGroup build() { - return new AddressGroup(this); - } + private OffsetDateTime addedAt; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; } -} + public Builder networkType(NetworkType networkType) { + this.networkType = networkType; + return this; + } + + public Builder addresses(List addresses) { + this.addresses = addresses; + return this; + } + + public Builder addedAt(OffsetDateTime addedAt) { + this.addedAt = addedAt; + return this; + } + + public AddressGroup build() { + return new AddressGroup(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java index 6177759..fcad19e 100644 --- a/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java +++ b/src/main/java/com/coinbase/prime/model/AdvancedTransfer.java @@ -17,114 +17,117 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.AdvancedTransferState; import com.coinbase.prime.model.enums.AdvancedTransferType; -import com.coinbase.prime.model.BlindMatchMetadata; -import com.coinbase.prime.model.FundMovement; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** AdvancedTransfer represents a complex transfer operation such as a blind match settlement. */ public class AdvancedTransfer { - private String id; + private String id; - /** AdvancedTransferType specifies the type of advanced transfer. */ - private AdvancedTransferType type; + /** AdvancedTransferType specifies the type of advanced transfer. */ + private AdvancedTransferType type; - /** AdvancedTransferState represents the lifecycle state of an advanced transfer. */ - private AdvancedTransferState state; + /** AdvancedTransferState represents the lifecycle state of an advanced transfer. */ + private AdvancedTransferState state; - @JsonProperty("fund_movements") - private List fundMovements; + @JsonProperty("fund_movements") + private List fundMovements; - /** BlindMatchMetadata contains metadata specific to blind match advanced transfers. */ - @JsonProperty("blind_match_metadata") - private BlindMatchMetadata blindMatchMetadata; + /** BlindMatchMetadata contains metadata specific to blind match advanced transfers. */ + @JsonProperty("blind_match_metadata") + private BlindMatchMetadata blindMatchMetadata; - public AdvancedTransfer() { - } + public AdvancedTransfer() {} - public AdvancedTransfer(Builder builder) { - this.id = builder.id; - this.type = builder.type; - this.state = builder.state; - this.fundMovements = builder.fundMovements; - this.blindMatchMetadata = builder.blindMatchMetadata; - } - public String getId() { - return id; - } + public AdvancedTransfer(Builder builder) { + this.id = builder.id; + this.type = builder.type; + this.state = builder.state; + this.fundMovements = builder.fundMovements; + this.blindMatchMetadata = builder.blindMatchMetadata; + } - public void setId(String id) { - this.id = id; - } - public AdvancedTransferType getType() { - return type; - } + public String getId() { + return id; + } - public void setType(AdvancedTransferType type) { - this.type = type; - } - public AdvancedTransferState getState() { - return state; - } + public void setId(String id) { + this.id = id; + } - public void setState(AdvancedTransferState state) { - this.state = state; - } - public List getFundMovements() { - return fundMovements; - } + public AdvancedTransferType getType() { + return type; + } - public void setFundMovements(List fundMovements) { - this.fundMovements = fundMovements; - } - public BlindMatchMetadata getBlindMatchMetadata() { - return blindMatchMetadata; - } + public void setType(AdvancedTransferType type) { + this.type = type; + } - public void setBlindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { - this.blindMatchMetadata = blindMatchMetadata; - } - public static class Builder { - private String id; + public AdvancedTransferState getState() { + return state; + } - private AdvancedTransferType type; + public void setState(AdvancedTransferState state) { + this.state = state; + } - private AdvancedTransferState state; + public List getFundMovements() { + return fundMovements; + } - private List fundMovements; + public void setFundMovements(List fundMovements) { + this.fundMovements = fundMovements; + } - private BlindMatchMetadata blindMatchMetadata; + public BlindMatchMetadata getBlindMatchMetadata() { + return blindMatchMetadata; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setBlindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { + this.blindMatchMetadata = blindMatchMetadata; + } - public Builder type(AdvancedTransferType type) { - this.type = type; - return this; - } + public static class Builder { + private String id; - public Builder state(AdvancedTransferState state) { - this.state = state; - return this; - } + private AdvancedTransferType type; - public Builder fundMovements(List fundMovements) { - this.fundMovements = fundMovements; - return this; - } + private AdvancedTransferState state; - public Builder blindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { - this.blindMatchMetadata = blindMatchMetadata; - return this; - } + private List fundMovements; - public AdvancedTransfer build() { - return new AdvancedTransfer(this); - } + private BlindMatchMetadata blindMatchMetadata; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder type(AdvancedTransferType type) { + this.type = type; + return this; } -} + public Builder state(AdvancedTransferState state) { + this.state = state; + return this; + } + + public Builder fundMovements(List fundMovements) { + this.fundMovements = fundMovements; + return this; + } + + public Builder blindMatchMetadata(BlindMatchMetadata blindMatchMetadata) { + this.blindMatchMetadata = blindMatchMetadata; + return this; + } + + public AdvancedTransfer build() { + return new AdvancedTransfer(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java index 98f2588..c1bfb53 100644 --- a/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java +++ b/src/main/java/com/coinbase/prime/model/AggregatedFiatBalance.java @@ -19,49 +19,50 @@ package com.coinbase.prime.model; public class AggregatedFiatBalance { - private String total; + private String total; - private String holds; + private String holds; - public AggregatedFiatBalance() { - } + public AggregatedFiatBalance() {} - public AggregatedFiatBalance(Builder builder) { - this.total = builder.total; - this.holds = builder.holds; - } - public String getTotal() { - return total; - } + public AggregatedFiatBalance(Builder builder) { + this.total = builder.total; + this.holds = builder.holds; + } - public void setTotal(String total) { - this.total = total; - } - public String getHolds() { - return holds; - } + public String getTotal() { + return total; + } - public void setHolds(String holds) { - this.holds = holds; - } - public static class Builder { - private String total; + public void setTotal(String total) { + this.total = total; + } - private String holds; + public String getHolds() { + return holds; + } - public Builder total(String total) { - this.total = total; - return this; - } + public void setHolds(String holds) { + this.holds = holds; + } - public Builder holds(String holds) { - this.holds = holds; - return this; - } + public static class Builder { + private String total; + + private String holds; - public AggregatedFiatBalance build() { - return new AggregatedFiatBalance(this); - } + public Builder total(String total) { + this.total = total; + return this; } -} + public Builder holds(String holds) { + this.holds = holds; + return this; + } + + public AggregatedFiatBalance build() { + return new AggregatedFiatBalance(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Allocation.java b/src/main/java/com/coinbase/prime/model/Allocation.java index 6bc495c..3d8f2a5 100644 --- a/src/main/java/com/coinbase/prime/model/Allocation.java +++ b/src/main/java/com/coinbase/prime/model/Allocation.java @@ -17,333 +17,330 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.AllocationStatus; -import com.coinbase.prime.model.DestinationAlloc; import com.coinbase.prime.model.enums.OrderSide; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; public class Allocation { - /** - * The ID that ties together an allocation and all of its legs. - */ - @JsonProperty("root_id") + /** The ID that ties together an allocation and all of its legs. */ + @JsonProperty("root_id") + private String rootId; + + /** + * The ID of the allocation if this allocation is a reversal. In this case, the root_id would be + * the original allocation ID. + */ + @JsonProperty("reversal_id") + private String reversalId; + + /** Time the final leg of the root allocation was completed. */ + @JsonProperty("allocation_completed_at") + private OffsetDateTime allocationCompletedAt; + + /** The ID of the user that created the allocation. */ + @JsonProperty("user_id") + private String userId; + + /** The ID of the product of the orders allocated. */ + @JsonProperty("product_id") + private String productId; + + /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ + private OrderSide side; + + /** Price the allocation was done at. */ + @JsonProperty("avg_price") + private String avgPrice; + + /** Amount allocated in base asset units. */ + @JsonProperty("base_quantity") + private String baseQuantity; + + /** Amount allocated in quote asset units. */ + @JsonProperty("quote_value") + private String quoteValue; + + /** Fees from original trade execution allocated in quote asset units. */ + @JsonProperty("fees_allocated") + private String feesAllocated; + + private AllocationStatus status; + + /** Portfolio ID of the source portfolio. */ + private String source; + + /** + * All order IDs that were aggregated to calculate the avg_price, quantity to allocate in each + * leg. Each order_id should tie back to the single allocation root_id. + */ + @JsonProperty("order_ids") + private List orderIds; + + /** + * Array of objects, each containing the leg ID, destination portfolio ID and amount in chosen + * units allocated to each portfolio: [{leg_id, portfolio_id, allocation_base, allocation_quote}, + * {leg_id, portfolio_id, allocation_base, allocation_quote}...] + */ + private List destinations; + + /** + * The netting ID of the allocation, not empty if the allocation was submitted as part of a net + * allocation + */ + @JsonProperty("netting_id") + private String nettingId; + + public Allocation() {} + + public Allocation(Builder builder) { + this.rootId = builder.rootId; + this.reversalId = builder.reversalId; + this.allocationCompletedAt = builder.allocationCompletedAt; + this.userId = builder.userId; + this.productId = builder.productId; + this.side = builder.side; + this.avgPrice = builder.avgPrice; + this.baseQuantity = builder.baseQuantity; + this.quoteValue = builder.quoteValue; + this.feesAllocated = builder.feesAllocated; + this.status = builder.status; + this.source = builder.source; + this.orderIds = builder.orderIds; + this.destinations = builder.destinations; + this.nettingId = builder.nettingId; + } + + public String getRootId() { + return rootId; + } + + public void setRootId(String rootId) { + this.rootId = rootId; + } + + public String getReversalId() { + return reversalId; + } + + public void setReversalId(String reversalId) { + this.reversalId = reversalId; + } + + public OffsetDateTime getAllocationCompletedAt() { + return allocationCompletedAt; + } + + public void setAllocationCompletedAt(OffsetDateTime allocationCompletedAt) { + this.allocationCompletedAt = allocationCompletedAt; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public OrderSide getSide() { + return side; + } + + public void setSide(OrderSide side) { + this.side = side; + } + + public String getAvgPrice() { + return avgPrice; + } + + public void setAvgPrice(String avgPrice) { + this.avgPrice = avgPrice; + } + + public String getBaseQuantity() { + return baseQuantity; + } + + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + + public String getQuoteValue() { + return quoteValue; + } + + public void setQuoteValue(String quoteValue) { + this.quoteValue = quoteValue; + } + + public String getFeesAllocated() { + return feesAllocated; + } + + public void setFeesAllocated(String feesAllocated) { + this.feesAllocated = feesAllocated; + } + + public AllocationStatus getStatus() { + return status; + } + + public void setStatus(AllocationStatus status) { + this.status = status; + } + + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public List getOrderIds() { + return orderIds; + } + + public void setOrderIds(List orderIds) { + this.orderIds = orderIds; + } + + public List getDestinations() { + return destinations; + } + + public void setDestinations(List destinations) { + this.destinations = destinations; + } + + public String getNettingId() { + return nettingId; + } + + public void setNettingId(String nettingId) { + this.nettingId = nettingId; + } + + public static class Builder { private String rootId; - /** - * The ID of the allocation if this allocation is a reversal. In this case, the root_id would be the original allocation ID. - */ - @JsonProperty("reversal_id") private String reversalId; - /** - * Time the final leg of the root allocation was completed. - */ - @JsonProperty("allocation_completed_at") private OffsetDateTime allocationCompletedAt; - /** - * The ID of the user that created the allocation. - */ - @JsonProperty("user_id") private String userId; - /** - * The ID of the product of the orders allocated. - */ - @JsonProperty("product_id") private String productId; - /** - * - UNKNOWN_ORDER_SIDE: nil value - * - BUY: Buy order - * - SELL: Sell order - */ private OrderSide side; - /** - * Price the allocation was done at. - */ - @JsonProperty("avg_price") private String avgPrice; - /** - * Amount allocated in base asset units. - */ - @JsonProperty("base_quantity") private String baseQuantity; - /** - * Amount allocated in quote asset units. - */ - @JsonProperty("quote_value") private String quoteValue; - /** - * Fees from original trade execution allocated in quote asset units. - */ - @JsonProperty("fees_allocated") private String feesAllocated; private AllocationStatus status; - /** - * Portfolio ID of the source portfolio. - */ private String source; - /** - * All order IDs that were aggregated to calculate the avg_price, quantity to allocate in each leg. Each order_id should tie back to the single allocation root_id. - */ - @JsonProperty("order_ids") private List orderIds; - /** - * Array of objects, each containing the leg ID, destination portfolio ID and amount in chosen units allocated to each portfolio: [{leg_id, portfolio_id, allocation_base, allocation_quote}, {leg_id, portfolio_id, allocation_base, allocation_quote}...] - */ private List destinations; - /** - * The netting ID of the allocation, not empty if the allocation was submitted as part of a net allocation - */ - @JsonProperty("netting_id") private String nettingId; - public Allocation() { + public Builder rootId(String rootId) { + this.rootId = rootId; + return this; } - public Allocation(Builder builder) { - this.rootId = builder.rootId; - this.reversalId = builder.reversalId; - this.allocationCompletedAt = builder.allocationCompletedAt; - this.userId = builder.userId; - this.productId = builder.productId; - this.side = builder.side; - this.avgPrice = builder.avgPrice; - this.baseQuantity = builder.baseQuantity; - this.quoteValue = builder.quoteValue; - this.feesAllocated = builder.feesAllocated; - this.status = builder.status; - this.source = builder.source; - this.orderIds = builder.orderIds; - this.destinations = builder.destinations; - this.nettingId = builder.nettingId; - } - public String getRootId() { - return rootId; + public Builder reversalId(String reversalId) { + this.reversalId = reversalId; + return this; } - public void setRootId(String rootId) { - this.rootId = rootId; - } - public String getReversalId() { - return reversalId; + public Builder allocationCompletedAt(OffsetDateTime allocationCompletedAt) { + this.allocationCompletedAt = allocationCompletedAt; + return this; } - public void setReversalId(String reversalId) { - this.reversalId = reversalId; - } - public OffsetDateTime getAllocationCompletedAt() { - return allocationCompletedAt; + public Builder userId(String userId) { + this.userId = userId; + return this; } - public void setAllocationCompletedAt(OffsetDateTime allocationCompletedAt) { - this.allocationCompletedAt = allocationCompletedAt; - } - public String getUserId() { - return userId; + public Builder productId(String productId) { + this.productId = productId; + return this; } - public void setUserId(String userId) { - this.userId = userId; - } - public String getProductId() { - return productId; + public Builder side(OrderSide side) { + this.side = side; + return this; } - public void setProductId(String productId) { - this.productId = productId; - } - public OrderSide getSide() { - return side; + public Builder avgPrice(String avgPrice) { + this.avgPrice = avgPrice; + return this; } - public void setSide(OrderSide side) { - this.side = side; - } - public String getAvgPrice() { - return avgPrice; + public Builder baseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + return this; } - public void setAvgPrice(String avgPrice) { - this.avgPrice = avgPrice; - } - public String getBaseQuantity() { - return baseQuantity; + public Builder quoteValue(String quoteValue) { + this.quoteValue = quoteValue; + return this; } - public void setBaseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - } - public String getQuoteValue() { - return quoteValue; + public Builder feesAllocated(String feesAllocated) { + this.feesAllocated = feesAllocated; + return this; } - public void setQuoteValue(String quoteValue) { - this.quoteValue = quoteValue; - } - public String getFeesAllocated() { - return feesAllocated; + public Builder status(AllocationStatus status) { + this.status = status; + return this; } - public void setFeesAllocated(String feesAllocated) { - this.feesAllocated = feesAllocated; - } - public AllocationStatus getStatus() { - return status; - } - - public void setStatus(AllocationStatus status) { - this.status = status; - } - public String getSource() { - return source; + public Builder source(String source) { + this.source = source; + return this; } - public void setSource(String source) { - this.source = source; - } - public List getOrderIds() { - return orderIds; + public Builder orderIds(List orderIds) { + this.orderIds = orderIds; + return this; } - public void setOrderIds(List orderIds) { - this.orderIds = orderIds; - } - public List getDestinations() { - return destinations; + public Builder destinations(List destinations) { + this.destinations = destinations; + return this; } - public void setDestinations(List destinations) { - this.destinations = destinations; - } - public String getNettingId() { - return nettingId; + public Builder nettingId(String nettingId) { + this.nettingId = nettingId; + return this; } - public void setNettingId(String nettingId) { - this.nettingId = nettingId; - } - public static class Builder { - private String rootId; - - private String reversalId; - - private OffsetDateTime allocationCompletedAt; - - private String userId; - - private String productId; - - private OrderSide side; - - private String avgPrice; - - private String baseQuantity; - - private String quoteValue; - - private String feesAllocated; - - private AllocationStatus status; - - private String source; - - private List orderIds; - - private List destinations; - - private String nettingId; - - public Builder rootId(String rootId) { - this.rootId = rootId; - return this; - } - - public Builder reversalId(String reversalId) { - this.reversalId = reversalId; - return this; - } - - public Builder allocationCompletedAt(OffsetDateTime allocationCompletedAt) { - this.allocationCompletedAt = allocationCompletedAt; - return this; - } - - public Builder userId(String userId) { - this.userId = userId; - return this; - } - - public Builder productId(String productId) { - this.productId = productId; - return this; - } - - public Builder side(OrderSide side) { - this.side = side; - return this; - } - - public Builder avgPrice(String avgPrice) { - this.avgPrice = avgPrice; - return this; - } - - public Builder baseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - return this; - } - - public Builder quoteValue(String quoteValue) { - this.quoteValue = quoteValue; - return this; - } - - public Builder feesAllocated(String feesAllocated) { - this.feesAllocated = feesAllocated; - return this; - } - - public Builder status(AllocationStatus status) { - this.status = status; - return this; - } - - public Builder source(String source) { - this.source = source; - return this; - } - - public Builder orderIds(List orderIds) { - this.orderIds = orderIds; - return this; - } - - public Builder destinations(List destinations) { - this.destinations = destinations; - return this; - } - - public Builder nettingId(String nettingId) { - this.nettingId = nettingId; - return this; - } - - public Allocation build() { - return new Allocation(this); - } + public Allocation build() { + return new Allocation(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/AllocationLeg.java b/src/main/java/com/coinbase/prime/model/AllocationLeg.java index 6ec60f2..7f64cea 100644 --- a/src/main/java/com/coinbase/prime/model/AllocationLeg.java +++ b/src/main/java/com/coinbase/prime/model/AllocationLeg.java @@ -17,80 +17,77 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class AllocationLeg { - /** - * The ID of the portfolio of the allocation leg - */ - @JsonProperty("allocation_leg_id") - private String allocationLegId; + /** The ID of the portfolio of the allocation leg */ + @JsonProperty("allocation_leg_id") + private String allocationLegId; - /** - * The ID of the destination portfolio of the allocation leg - */ - @JsonProperty("destination_portfolio_id") - private String destinationPortfolioId; + /** The ID of the destination portfolio of the allocation leg */ + @JsonProperty("destination_portfolio_id") + private String destinationPortfolioId; - /** - * The amount size for the allocation leg - */ - private String amount; + /** The amount size for the allocation leg */ + private String amount; - public AllocationLeg() { - } + public AllocationLeg() {} - public AllocationLeg(Builder builder) { - this.allocationLegId = builder.allocationLegId; - this.destinationPortfolioId = builder.destinationPortfolioId; - this.amount = builder.amount; - } - public String getAllocationLegId() { - return allocationLegId; - } + public AllocationLeg(Builder builder) { + this.allocationLegId = builder.allocationLegId; + this.destinationPortfolioId = builder.destinationPortfolioId; + this.amount = builder.amount; + } - public void setAllocationLegId(String allocationLegId) { - this.allocationLegId = allocationLegId; - } - public String getDestinationPortfolioId() { - return destinationPortfolioId; - } + public String getAllocationLegId() { + return allocationLegId; + } - public void setDestinationPortfolioId(String destinationPortfolioId) { - this.destinationPortfolioId = destinationPortfolioId; - } - public String getAmount() { - return amount; - } + public void setAllocationLegId(String allocationLegId) { + this.allocationLegId = allocationLegId; + } - public void setAmount(String amount) { - this.amount = amount; - } - public static class Builder { - private String allocationLegId; + public String getDestinationPortfolioId() { + return destinationPortfolioId; + } - private String destinationPortfolioId; + public void setDestinationPortfolioId(String destinationPortfolioId) { + this.destinationPortfolioId = destinationPortfolioId; + } - private String amount; + public String getAmount() { + return amount; + } - public Builder allocationLegId(String allocationLegId) { - this.allocationLegId = allocationLegId; - return this; - } + public void setAmount(String amount) { + this.amount = amount; + } - public Builder destinationPortfolioId(String destinationPortfolioId) { - this.destinationPortfolioId = destinationPortfolioId; - return this; - } + public static class Builder { + private String allocationLegId; + + private String destinationPortfolioId; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + private String amount; - public AllocationLeg build() { - return new AllocationLeg(this); - } + public Builder allocationLegId(String allocationLegId) { + this.allocationLegId = allocationLegId; + return this; } -} + public Builder destinationPortfolioId(String destinationPortfolioId) { + this.destinationPortfolioId = destinationPortfolioId; + return this; + } + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public AllocationLeg build() { + return new AllocationLeg(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/AmountDue.java b/src/main/java/com/coinbase/prime/model/AmountDue.java index 9bb4029..16f8af2 100644 --- a/src/main/java/com/coinbase/prime/model/AmountDue.java +++ b/src/main/java/com/coinbase/prime/model/AmountDue.java @@ -17,80 +17,77 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class AmountDue { - /** - * The currency this loan is due in - */ - private String currency; + /** The currency this loan is due in */ + private String currency; - /** - * The amount due - */ - private String amount; + /** The amount due */ + private String amount; - /** - * The date this settlement is due, expressed in UTC - */ - @JsonProperty("due_date") - private OffsetDateTime dueDate; + /** The date this settlement is due, expressed in UTC */ + @JsonProperty("due_date") + private OffsetDateTime dueDate; - public AmountDue() { - } + public AmountDue() {} - public AmountDue(Builder builder) { - this.currency = builder.currency; - this.amount = builder.amount; - this.dueDate = builder.dueDate; - } - public String getCurrency() { - return currency; - } + public AmountDue(Builder builder) { + this.currency = builder.currency; + this.amount = builder.amount; + this.dueDate = builder.dueDate; + } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getAmount() { - return amount; - } + public String getCurrency() { + return currency; + } - public void setAmount(String amount) { - this.amount = amount; - } - public OffsetDateTime getDueDate() { - return dueDate; - } + public void setCurrency(String currency) { + this.currency = currency; + } - public void setDueDate(OffsetDateTime dueDate) { - this.dueDate = dueDate; - } - public static class Builder { - private String currency; + public String getAmount() { + return amount; + } - private String amount; + public void setAmount(String amount) { + this.amount = amount; + } - private OffsetDateTime dueDate; + public OffsetDateTime getDueDate() { + return dueDate; + } - public Builder currency(String currency) { - this.currency = currency; - return this; - } + public void setDueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public static class Builder { + private String currency; + + private String amount; - public Builder dueDate(OffsetDateTime dueDate) { - this.dueDate = dueDate; - return this; - } + private OffsetDateTime dueDate; - public AmountDue build() { - return new AmountDue(this); - } + public Builder currency(String currency) { + this.currency = currency; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder dueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + return this; + } + + public AmountDue build() { + return new AmountDue(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Asset.java b/src/main/java/com/coinbase/prime/model/Asset.java index 86462a2..f7a6a37 100644 --- a/src/main/java/com/coinbase/prime/model/Asset.java +++ b/src/main/java/com/coinbase/prime/model/Asset.java @@ -17,143 +17,136 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.NetworkDetails; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Asset { - /** - * The name of the asset - */ - private String name; + /** The name of the asset */ + private String name; - /** - * The mutable series of letters used to identify the asset - */ - private String symbol; + /** The mutable series of letters used to identify the asset */ + private String symbol; - /** - * The number of decimals supported for the asset - */ - @JsonProperty("decimal_precision") - private String decimalPrecision; + /** The number of decimals supported for the asset */ + @JsonProperty("decimal_precision") + private String decimalPrecision; - /** - * Indicates whether this asset can be traded - */ - @JsonProperty("trading_supported") - private boolean tradingSupported; + /** Indicates whether this asset can be traded */ + @JsonProperty("trading_supported") + private boolean tradingSupported; - /** - * Base URL to our recommended block explorer (crypto only) - */ - @JsonProperty("explorer_url") - private String explorerUrl; + /** Base URL to our recommended block explorer (crypto only) */ + @JsonProperty("explorer_url") + private String explorerUrl; - /** - * List of networks supported by this asset - */ - private List networks; + /** List of networks supported by this asset */ + private List networks; - public Asset() { - } + public Asset() {} - public Asset(Builder builder) { - this.name = builder.name; - this.symbol = builder.symbol; - this.decimalPrecision = builder.decimalPrecision; - this.tradingSupported = builder.tradingSupported; - this.explorerUrl = builder.explorerUrl; - this.networks = builder.networks; - } - public String getName() { - return name; - } + public Asset(Builder builder) { + this.name = builder.name; + this.symbol = builder.symbol; + this.decimalPrecision = builder.decimalPrecision; + this.tradingSupported = builder.tradingSupported; + this.explorerUrl = builder.explorerUrl; + this.networks = builder.networks; + } - public void setName(String name) { - this.name = name; - } - public String getSymbol() { - return symbol; - } + public String getName() { + return name; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getDecimalPrecision() { - return decimalPrecision; - } + public void setName(String name) { + this.name = name; + } - public void setDecimalPrecision(String decimalPrecision) { - this.decimalPrecision = decimalPrecision; - } - public boolean getTradingSupported() { - return tradingSupported; - } + public String getSymbol() { + return symbol; + } - public void setTradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - } - public String getExplorerUrl() { - return explorerUrl; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setExplorerUrl(String explorerUrl) { - this.explorerUrl = explorerUrl; - } - public List getNetworks() { - return networks; - } + public String getDecimalPrecision() { + return decimalPrecision; + } - public void setNetworks(List networks) { - this.networks = networks; - } - public static class Builder { - private String name; + public void setDecimalPrecision(String decimalPrecision) { + this.decimalPrecision = decimalPrecision; + } - private String symbol; + public boolean getTradingSupported() { + return tradingSupported; + } - private String decimalPrecision; + public void setTradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + } - private boolean tradingSupported; + public String getExplorerUrl() { + return explorerUrl; + } - private String explorerUrl; + public void setExplorerUrl(String explorerUrl) { + this.explorerUrl = explorerUrl; + } - private List networks; + public List getNetworks() { + return networks; + } - public Builder name(String name) { - this.name = name; - return this; - } + public void setNetworks(List networks) { + this.networks = networks; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public static class Builder { + private String name; + + private String symbol; + + private String decimalPrecision; - public Builder decimalPrecision(String decimalPrecision) { - this.decimalPrecision = decimalPrecision; - return this; - } + private boolean tradingSupported; - public Builder tradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - return this; - } + private String explorerUrl; - public Builder explorerUrl(String explorerUrl) { - this.explorerUrl = explorerUrl; - return this; - } + private List networks; - public Builder networks(List networks) { - this.networks = networks; - return this; - } + public Builder name(String name) { + this.name = name; + return this; + } - public Asset build() { - return new Asset(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder decimalPrecision(String decimalPrecision) { + this.decimalPrecision = decimalPrecision; + return this; + } + + public Builder tradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + return this; + } + + public Builder explorerUrl(String explorerUrl) { + this.explorerUrl = explorerUrl; + return this; + } + + public Builder networks(List networks) { + this.networks = networks; + return this; + } + + public Asset build() { + return new Asset(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/AssetBalance.java b/src/main/java/com/coinbase/prime/model/AssetBalance.java index ffbc3b0..bab77eb 100644 --- a/src/main/java/com/coinbase/prime/model/AssetBalance.java +++ b/src/main/java/com/coinbase/prime/model/AssetBalance.java @@ -17,121 +17,116 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class AssetBalance { - /** - * The unique ID of the portfolio - */ - @JsonProperty("portfolio_id") - private String portfolioId; + /** The unique ID of the portfolio */ + @JsonProperty("portfolio_id") + private String portfolioId; - /** - * The currency symbol - */ - private String symbol; + /** The currency symbol */ + private String symbol; - /** - * Balance amount - */ - private String amount; + /** Balance amount */ + private String amount; - /** - * Notional balance amount - */ - @JsonProperty("notional_amount") - private String notionalAmount; + /** Notional balance amount */ + @JsonProperty("notional_amount") + private String notionalAmount; - /** - * Conversion rate - */ - @JsonProperty("conversion_rate") - private String conversionRate; + /** Conversion rate */ + @JsonProperty("conversion_rate") + private String conversionRate; - public AssetBalance() { - } + public AssetBalance() {} - public AssetBalance(Builder builder) { - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.amount = builder.amount; - this.notionalAmount = builder.notionalAmount; - this.conversionRate = builder.conversionRate; - } - public String getPortfolioId() { - return portfolioId; - } + public AssetBalance(Builder builder) { + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.amount = builder.amount; + this.notionalAmount = builder.notionalAmount; + this.conversionRate = builder.conversionRate; + } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getSymbol() { - return symbol; - } + public String getPortfolioId() { + return portfolioId; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getAmount() { - return amount; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } - public void setAmount(String amount) { - this.amount = amount; - } - public String getNotionalAmount() { - return notionalAmount; - } + public String getSymbol() { + return symbol; + } - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } - public String getConversionRate() { - return conversionRate; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setConversionRate(String conversionRate) { - this.conversionRate = conversionRate; - } - public static class Builder { - private String portfolioId; + public String getAmount() { + return amount; + } - private String symbol; + public void setAmount(String amount) { + this.amount = amount; + } - private String amount; + public String getNotionalAmount() { + return notionalAmount; + } - private String notionalAmount; + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } - private String conversionRate; + public String getConversionRate() { + return conversionRate; + } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public static class Builder { + private String portfolioId; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + private String symbol; - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; - } + private String amount; - public Builder conversionRate(String conversionRate) { - this.conversionRate = conversionRate; - return this; - } + private String notionalAmount; - public AssetBalance build() { - return new AssetBalance(this); - } + private String conversionRate; + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; + } + + public Builder conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; + } + + public AssetBalance build() { + return new AssetBalance(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/AssetChange.java b/src/main/java/com/coinbase/prime/model/AssetChange.java index bde8a45..32d43bf 100644 --- a/src/main/java/com/coinbase/prime/model/AssetChange.java +++ b/src/main/java/com/coinbase/prime/model/AssetChange.java @@ -17,112 +17,111 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.AssetChangeType; -import com.coinbase.prime.model.NftCollection; -import com.coinbase.prime.model.NftItem; public class AssetChange { - /** AssetChangeType identifies the type of asset change */ - private AssetChangeType type; + /** AssetChangeType identifies the type of asset change */ + private AssetChangeType type; - /** - * The currency symbol associated with the balance operation - */ - private String symbol; + /** The currency symbol associated with the balance operation */ + private String symbol; - /** - * The amount in whole units being transferred or approved - */ - private String amount; + /** The amount in whole units being transferred or approved */ + private String amount; - private NftCollection collection; + private NftCollection collection; - private NftItem item; + private NftItem item; - public AssetChange() { - } + public AssetChange() {} - public AssetChange(Builder builder) { - this.type = builder.type; - this.symbol = builder.symbol; - this.amount = builder.amount; - this.collection = builder.collection; - this.item = builder.item; - } - public AssetChangeType getType() { - return type; - } + public AssetChange(Builder builder) { + this.type = builder.type; + this.symbol = builder.symbol; + this.amount = builder.amount; + this.collection = builder.collection; + this.item = builder.item; + } - public void setType(AssetChangeType type) { - this.type = type; - } - public String getSymbol() { - return symbol; - } + public AssetChangeType getType() { + return type; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getAmount() { - return amount; - } + public void setType(AssetChangeType type) { + this.type = type; + } - public void setAmount(String amount) { - this.amount = amount; - } - public NftCollection getCollection() { - return collection; - } + public String getSymbol() { + return symbol; + } - public void setCollection(NftCollection collection) { - this.collection = collection; - } - public NftItem getItem() { - return item; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setItem(NftItem item) { - this.item = item; - } - public static class Builder { - private AssetChangeType type; + public String getAmount() { + return amount; + } - private String symbol; + public void setAmount(String amount) { + this.amount = amount; + } - private String amount; + public NftCollection getCollection() { + return collection; + } - private NftCollection collection; + public void setCollection(NftCollection collection) { + this.collection = collection; + } - private NftItem item; + public NftItem getItem() { + return item; + } - public Builder type(AssetChangeType type) { - this.type = type; - return this; - } + public void setItem(NftItem item) { + this.item = item; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public static class Builder { + private AssetChangeType type; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + private String symbol; - public Builder collection(NftCollection collection) { - this.collection = collection; - return this; - } + private String amount; - public Builder item(NftItem item) { - this.item = item; - return this; - } + private NftCollection collection; - public AssetChange build() { - return new AssetChange(this); - } + private NftItem item; + + public Builder type(AssetChangeType type) { + this.type = type; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder collection(NftCollection collection) { + this.collection = collection; + return this; + } + + public Builder item(NftItem item) { + this.item = item; + return this; + } + + public AssetChange build() { + return new AssetChange(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Balance.java b/src/main/java/com/coinbase/prime/model/Balance.java index 668152a..afd769a 100644 --- a/src/main/java/com/coinbase/prime/model/Balance.java +++ b/src/main/java/com/coinbase/prime/model/Balance.java @@ -17,309 +17,304 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class Balance { - /** - * The display symbol for the asset - */ + /** The display symbol for the asset */ + private String symbol; + + /** 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 + */ + private String holds; + + /** + * Amount that is currently locked due to bonding/staking, potentially subject to an unbonding + * period, in whole units + */ + @JsonProperty("bonded_amount") + private String bondedAmount; + + /** Amount that must remain in the wallet due to the protocol, in whole units */ + @JsonProperty("reserved_amount") + private String reservedAmount; + + /** Amount that is in the process of unbonding, in whole units */ + @JsonProperty("unbonding_amount") + private String unbondingAmount; + + /** Unrealized amount subject to a vesting schedule, in whole units */ + @JsonProperty("unvested_amount") + private String unvestedAmount; + + /** Pending bonding/staking rewards that have not yet been realized, in whole units */ + @JsonProperty("pending_rewards_amount") + private String pendingRewardsAmount; + + /** Previously realized bonding/staking rewards, in whole units */ + @JsonProperty("past_rewards_amount") + private String pastRewardsAmount; + + /** Amount available for bonding/staking, in whole units */ + @JsonProperty("bondable_amount") + private String bondableAmount; + + /** Amount available to withdraw, in whole units */ + @JsonProperty("withdrawable_amount") + private String withdrawableAmount; + + /** The total amount in fiat unit */ + @JsonProperty("fiat_amount") + private String fiatAmount; + + /** Amount available for unbonding/unstaking, in whole units */ + @JsonProperty("unbondable_amount") + private String unbondableAmount; + + /** + * ETH staking rewards currently available to claim, in whole units. This field is returned only + * in GetWalletBalance responses for ETH wallets. It is omitted or empty for portfolio-level + * responses and for non-ETH assets; use pending_rewards_amount where applicable. + */ + @JsonProperty("claimable_rewards_amount") + private String claimableRewardsAmount; + + public Balance() {} + + public Balance(Builder builder) { + this.symbol = builder.symbol; + this.amount = builder.amount; + this.holds = builder.holds; + this.bondedAmount = builder.bondedAmount; + this.reservedAmount = builder.reservedAmount; + this.unbondingAmount = builder.unbondingAmount; + this.unvestedAmount = builder.unvestedAmount; + this.pendingRewardsAmount = builder.pendingRewardsAmount; + this.pastRewardsAmount = builder.pastRewardsAmount; + this.bondableAmount = builder.bondableAmount; + this.withdrawableAmount = builder.withdrawableAmount; + this.fiatAmount = builder.fiatAmount; + this.unbondableAmount = builder.unbondableAmount; + this.claimableRewardsAmount = builder.claimableRewardsAmount; + } + + 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 getHolds() { + return holds; + } + + public void setHolds(String holds) { + this.holds = holds; + } + + public String getBondedAmount() { + return bondedAmount; + } + + public void setBondedAmount(String bondedAmount) { + this.bondedAmount = bondedAmount; + } + + public String getReservedAmount() { + return reservedAmount; + } + + public void setReservedAmount(String reservedAmount) { + this.reservedAmount = reservedAmount; + } + + public String getUnbondingAmount() { + return unbondingAmount; + } + + public void setUnbondingAmount(String unbondingAmount) { + this.unbondingAmount = unbondingAmount; + } + + public String getUnvestedAmount() { + return unvestedAmount; + } + + public void setUnvestedAmount(String unvestedAmount) { + this.unvestedAmount = unvestedAmount; + } + + public String getPendingRewardsAmount() { + return pendingRewardsAmount; + } + + public void setPendingRewardsAmount(String pendingRewardsAmount) { + this.pendingRewardsAmount = pendingRewardsAmount; + } + + public String getPastRewardsAmount() { + return pastRewardsAmount; + } + + public void setPastRewardsAmount(String pastRewardsAmount) { + this.pastRewardsAmount = pastRewardsAmount; + } + + public String getBondableAmount() { + return bondableAmount; + } + + public void setBondableAmount(String bondableAmount) { + this.bondableAmount = bondableAmount; + } + + public String getWithdrawableAmount() { + return withdrawableAmount; + } + + public void setWithdrawableAmount(String withdrawableAmount) { + this.withdrawableAmount = withdrawableAmount; + } + + public String getFiatAmount() { + return fiatAmount; + } + + public void setFiatAmount(String fiatAmount) { + this.fiatAmount = fiatAmount; + } + + public String getUnbondableAmount() { + return unbondableAmount; + } + + public void setUnbondableAmount(String unbondableAmount) { + this.unbondableAmount = unbondableAmount; + } + + public String getClaimableRewardsAmount() { + return claimableRewardsAmount; + } + + public void setClaimableRewardsAmount(String claimableRewardsAmount) { + this.claimableRewardsAmount = claimableRewardsAmount; + } + + public static class Builder { private String symbol; - /** - * 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 - */ private String holds; - /** - * Amount that is currently locked due to bonding/staking, potentially subject to an unbonding period, in whole units - */ - @JsonProperty("bonded_amount") private String bondedAmount; - /** - * Amount that must remain in the wallet due to the protocol, in whole units - */ - @JsonProperty("reserved_amount") private String reservedAmount; - /** - * Amount that is in the process of unbonding, in whole units - */ - @JsonProperty("unbonding_amount") private String unbondingAmount; - /** - * Unrealized amount subject to a vesting schedule, in whole units - */ - @JsonProperty("unvested_amount") private String unvestedAmount; - /** - * Pending bonding/staking rewards that have not yet been realized, in whole units - */ - @JsonProperty("pending_rewards_amount") private String pendingRewardsAmount; - /** - * Previously realized bonding/staking rewards, in whole units - */ - @JsonProperty("past_rewards_amount") private String pastRewardsAmount; - /** - * Amount available for bonding/staking, in whole units - */ - @JsonProperty("bondable_amount") private String bondableAmount; - /** - * Amount available to withdraw, in whole units - */ - @JsonProperty("withdrawable_amount") private String withdrawableAmount; - /** - * The total amount in fiat unit - */ - @JsonProperty("fiat_amount") private String fiatAmount; - /** - * Amount available for unbonding/unstaking, in whole units - */ - @JsonProperty("unbondable_amount") private String unbondableAmount; - /** - * ETH staking rewards currently available to claim, in whole units. This field is returned only in GetWalletBalance responses for ETH wallets. It is omitted or empty for portfolio-level responses and for non-ETH assets; use pending_rewards_amount where applicable. - */ - @JsonProperty("claimable_rewards_amount") private String claimableRewardsAmount; - public Balance() { + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } - public Balance(Builder builder) { - this.symbol = builder.symbol; - this.amount = builder.amount; - this.holds = builder.holds; - this.bondedAmount = builder.bondedAmount; - this.reservedAmount = builder.reservedAmount; - this.unbondingAmount = builder.unbondingAmount; - this.unvestedAmount = builder.unvestedAmount; - this.pendingRewardsAmount = builder.pendingRewardsAmount; - this.pastRewardsAmount = builder.pastRewardsAmount; - this.bondableAmount = builder.bondableAmount; - this.withdrawableAmount = builder.withdrawableAmount; - this.fiatAmount = builder.fiatAmount; - this.unbondableAmount = builder.unbondableAmount; - this.claimableRewardsAmount = builder.claimableRewardsAmount; - } - 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 getHolds() { - return holds; + public Builder amount(String amount) { + this.amount = amount; + return this; } - public void setHolds(String holds) { - this.holds = holds; - } - public String getBondedAmount() { - return bondedAmount; + public Builder holds(String holds) { + this.holds = holds; + return this; } - public void setBondedAmount(String bondedAmount) { - this.bondedAmount = bondedAmount; - } - public String getReservedAmount() { - return reservedAmount; + public Builder bondedAmount(String bondedAmount) { + this.bondedAmount = bondedAmount; + return this; } - public void setReservedAmount(String reservedAmount) { - this.reservedAmount = reservedAmount; - } - public String getUnbondingAmount() { - return unbondingAmount; + public Builder reservedAmount(String reservedAmount) { + this.reservedAmount = reservedAmount; + return this; } - public void setUnbondingAmount(String unbondingAmount) { - this.unbondingAmount = unbondingAmount; - } - public String getUnvestedAmount() { - return unvestedAmount; + public Builder unbondingAmount(String unbondingAmount) { + this.unbondingAmount = unbondingAmount; + return this; } - public void setUnvestedAmount(String unvestedAmount) { - this.unvestedAmount = unvestedAmount; - } - public String getPendingRewardsAmount() { - return pendingRewardsAmount; + public Builder unvestedAmount(String unvestedAmount) { + this.unvestedAmount = unvestedAmount; + return this; } - public void setPendingRewardsAmount(String pendingRewardsAmount) { - this.pendingRewardsAmount = pendingRewardsAmount; - } - public String getPastRewardsAmount() { - return pastRewardsAmount; + public Builder pendingRewardsAmount(String pendingRewardsAmount) { + this.pendingRewardsAmount = pendingRewardsAmount; + return this; } - public void setPastRewardsAmount(String pastRewardsAmount) { - this.pastRewardsAmount = pastRewardsAmount; - } - public String getBondableAmount() { - return bondableAmount; + public Builder pastRewardsAmount(String pastRewardsAmount) { + this.pastRewardsAmount = pastRewardsAmount; + return this; } - public void setBondableAmount(String bondableAmount) { - this.bondableAmount = bondableAmount; - } - public String getWithdrawableAmount() { - return withdrawableAmount; + public Builder bondableAmount(String bondableAmount) { + this.bondableAmount = bondableAmount; + return this; } - public void setWithdrawableAmount(String withdrawableAmount) { - this.withdrawableAmount = withdrawableAmount; - } - public String getFiatAmount() { - return fiatAmount; + public Builder withdrawableAmount(String withdrawableAmount) { + this.withdrawableAmount = withdrawableAmount; + return this; } - public void setFiatAmount(String fiatAmount) { - this.fiatAmount = fiatAmount; - } - public String getUnbondableAmount() { - return unbondableAmount; + public Builder fiatAmount(String fiatAmount) { + this.fiatAmount = fiatAmount; + return this; } - public void setUnbondableAmount(String unbondableAmount) { - this.unbondableAmount = unbondableAmount; - } - public String getClaimableRewardsAmount() { - return claimableRewardsAmount; + public Builder unbondableAmount(String unbondableAmount) { + this.unbondableAmount = unbondableAmount; + return this; } - public void setClaimableRewardsAmount(String claimableRewardsAmount) { - this.claimableRewardsAmount = claimableRewardsAmount; + public Builder claimableRewardsAmount(String claimableRewardsAmount) { + this.claimableRewardsAmount = claimableRewardsAmount; + return this; } - public static class Builder { - private String symbol; - - private String amount; - - private String holds; - private String bondedAmount; - - private String reservedAmount; - - private String unbondingAmount; - - private String unvestedAmount; - - private String pendingRewardsAmount; - - private String pastRewardsAmount; - - private String bondableAmount; - - private String withdrawableAmount; - - private String fiatAmount; - - private String unbondableAmount; - - private String claimableRewardsAmount; - - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder holds(String holds) { - this.holds = holds; - return this; - } - - public Builder bondedAmount(String bondedAmount) { - this.bondedAmount = bondedAmount; - return this; - } - - public Builder reservedAmount(String reservedAmount) { - this.reservedAmount = reservedAmount; - return this; - } - - public Builder unbondingAmount(String unbondingAmount) { - this.unbondingAmount = unbondingAmount; - return this; - } - - public Builder unvestedAmount(String unvestedAmount) { - this.unvestedAmount = unvestedAmount; - return this; - } - - public Builder pendingRewardsAmount(String pendingRewardsAmount) { - this.pendingRewardsAmount = pendingRewardsAmount; - return this; - } - - public Builder pastRewardsAmount(String pastRewardsAmount) { - this.pastRewardsAmount = pastRewardsAmount; - return this; - } - - public Builder bondableAmount(String bondableAmount) { - this.bondableAmount = bondableAmount; - return this; - } - - public Builder withdrawableAmount(String withdrawableAmount) { - this.withdrawableAmount = withdrawableAmount; - return this; - } - - public Builder fiatAmount(String fiatAmount) { - this.fiatAmount = fiatAmount; - return this; - } - - public Builder unbondableAmount(String unbondableAmount) { - this.unbondableAmount = unbondableAmount; - return this; - } - - public Builder claimableRewardsAmount(String claimableRewardsAmount) { - this.claimableRewardsAmount = claimableRewardsAmount; - return this; - } - - public Balance build() { - return new Balance(this); - } + public Balance build() { + return new Balance(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java index 8a07e94..f53a2ec 100644 --- a/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java +++ b/src/main/java/com/coinbase/prime/model/BlindMatchMetadata.java @@ -17,100 +17,101 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** BlindMatchMetadata contains metadata specific to blind match advanced transfers. */ public class BlindMatchMetadata { - @JsonProperty("reference_id") + @JsonProperty("reference_id") + private String referenceId; + + /** The intended time of Transfer settlement in YYYYMMDD format */ + @JsonProperty("settlement_date") + private String settlementDate; + + /** Optional date of the original Trade in YYYYMMMDD format */ + @JsonProperty("trade_date") + private String tradeDate; + + /** + * Optional time of transfer settlement in HHMM format in UTC. If not provided, it defaults to + * 09:30 Eastern Time. + */ + @JsonProperty("settlement_time") + private String settlementTime; + + public BlindMatchMetadata() {} + + public BlindMatchMetadata(Builder builder) { + this.referenceId = builder.referenceId; + this.settlementDate = builder.settlementDate; + this.tradeDate = builder.tradeDate; + this.settlementTime = builder.settlementTime; + } + + public String getReferenceId() { + return referenceId; + } + + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } + + public String getSettlementDate() { + return settlementDate; + } + + public void setSettlementDate(String settlementDate) { + this.settlementDate = settlementDate; + } + + public String getTradeDate() { + return tradeDate; + } + + public void setTradeDate(String tradeDate) { + this.tradeDate = tradeDate; + } + + public String getSettlementTime() { + return settlementTime; + } + + public void setSettlementTime(String settlementTime) { + this.settlementTime = settlementTime; + } + + public static class Builder { private String referenceId; - /** - * The intended time of Transfer settlement in YYYYMMDD format - */ - @JsonProperty("settlement_date") private String settlementDate; - /** - * Optional date of the original Trade in YYYYMMMDD format - */ - @JsonProperty("trade_date") private String tradeDate; - /** - * Optional time of transfer settlement in HHMM format in UTC. If not provided, it defaults to 09:30 Eastern Time. - */ - @JsonProperty("settlement_time") private String settlementTime; - public BlindMatchMetadata() { + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; } - public BlindMatchMetadata(Builder builder) { - this.referenceId = builder.referenceId; - this.settlementDate = builder.settlementDate; - this.tradeDate = builder.tradeDate; - this.settlementTime = builder.settlementTime; - } - public String getReferenceId() { - return referenceId; + public Builder settlementDate(String settlementDate) { + this.settlementDate = settlementDate; + return this; } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - public String getSettlementDate() { - return settlementDate; + public Builder tradeDate(String tradeDate) { + this.tradeDate = tradeDate; + return this; } - public void setSettlementDate(String settlementDate) { - this.settlementDate = settlementDate; - } - public String getTradeDate() { - return tradeDate; + public Builder settlementTime(String settlementTime) { + this.settlementTime = settlementTime; + return this; } - public void setTradeDate(String tradeDate) { - this.tradeDate = tradeDate; - } - public String getSettlementTime() { - return settlementTime; - } - - public void setSettlementTime(String settlementTime) { - this.settlementTime = settlementTime; - } - public static class Builder { - private String referenceId; - - private String settlementDate; - - private String tradeDate; - - private String settlementTime; - - public Builder referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } - - public Builder settlementDate(String settlementDate) { - this.settlementDate = settlementDate; - return this; - } - - public Builder tradeDate(String tradeDate) { - this.tradeDate = tradeDate; - return this; - } - - public Builder settlementTime(String settlementTime) { - this.settlementTime = settlementTime; - return this; - } - - public BlindMatchMetadata build() { - return new BlindMatchMetadata(this); - } + public BlindMatchMetadata build() { + return new BlindMatchMetadata(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java index a07667e..6e55858 100644 --- a/src/main/java/com/coinbase/prime/model/BlockchainAddress.java +++ b/src/main/java/com/coinbase/prime/model/BlockchainAddress.java @@ -17,77 +17,75 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.Network; + import com.fasterxml.jackson.annotation.JsonProperty; public class BlockchainAddress { - /** - * The address on the network - */ - private String address; + /** The address on the network */ + private String address; - /** - * The account identifier (used on some chains to distinguish accounts using the same address) - */ - @JsonProperty("account_identifier") - private String accountIdentifier; + /** The account identifier (used on some chains to distinguish accounts using the same address) */ + @JsonProperty("account_identifier") + private String accountIdentifier; - private Network network; + private Network network; - public BlockchainAddress() { - } + public BlockchainAddress() {} - public BlockchainAddress(Builder builder) { - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - this.network = builder.network; - } - public String getAddress() { - return address; - } + public BlockchainAddress(Builder builder) { + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + this.network = builder.network; + } - public void setAddress(String address) { - this.address = address; - } - public String getAccountIdentifier() { - return accountIdentifier; - } + public String getAddress() { + return address; + } - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } - public Network getNetwork() { - return network; - } + public void setAddress(String address) { + this.address = address; + } - public void setNetwork(Network network) { - this.network = network; - } - public static class Builder { - private String address; + public String getAccountIdentifier() { + return accountIdentifier; + } - private String accountIdentifier; + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } - private Network network; + public Network getNetwork() { + return network; + } - public Builder address(String address) { - this.address = address; - return this; - } + public void setNetwork(Network network) { + this.network = network; + } - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; - } + public static class Builder { + private String address; + + private String accountIdentifier; - public Builder network(Network network) { - this.network = network; - return this; - } + private Network network; - public BlockchainAddress build() { - return new BlockchainAddress(this); - } + public Builder address(String address) { + this.address = address; + return this; } -} + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; + } + + public Builder network(Network network) { + this.network = network; + return this; + } + + public BlockchainAddress build() { + return new BlockchainAddress(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/BuyingPower.java b/src/main/java/com/coinbase/prime/model/BuyingPower.java index b0ffa81..10db8ca 100644 --- a/src/main/java/com/coinbase/prime/model/BuyingPower.java +++ b/src/main/java/com/coinbase/prime/model/BuyingPower.java @@ -17,123 +17,118 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class BuyingPower { - /** - * The unique ID of the portfolio - */ - @JsonProperty("portfolio_id") - private String portfolioId; + /** The unique ID of the portfolio */ + @JsonProperty("portfolio_id") + private String portfolioId; - /** - * The symbol for the base currency - */ - @JsonProperty("base_currency") - private String baseCurrency; + /** The symbol for the base currency */ + @JsonProperty("base_currency") + private String baseCurrency; - /** - * The symbol for the quote currency - */ - @JsonProperty("quote_currency") - private String quoteCurrency; + /** The symbol for the quote currency */ + @JsonProperty("quote_currency") + private String quoteCurrency; - /** - * The buying power for the base currency - */ - @JsonProperty("base_buying_power") - private String baseBuyingPower; + /** The buying power for the base currency */ + @JsonProperty("base_buying_power") + private String baseBuyingPower; - /** - * The buying power for the quote currency - */ - @JsonProperty("quote_buying_power") - private String quoteBuyingPower; + /** The buying power for the quote currency */ + @JsonProperty("quote_buying_power") + private String quoteBuyingPower; - public BuyingPower() { - } + public BuyingPower() {} - public BuyingPower(Builder builder) { - this.portfolioId = builder.portfolioId; - this.baseCurrency = builder.baseCurrency; - this.quoteCurrency = builder.quoteCurrency; - this.baseBuyingPower = builder.baseBuyingPower; - this.quoteBuyingPower = builder.quoteBuyingPower; - } - public String getPortfolioId() { - return portfolioId; - } + public BuyingPower(Builder builder) { + this.portfolioId = builder.portfolioId; + this.baseCurrency = builder.baseCurrency; + this.quoteCurrency = builder.quoteCurrency; + this.baseBuyingPower = builder.baseBuyingPower; + this.quoteBuyingPower = builder.quoteBuyingPower; + } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getBaseCurrency() { - return baseCurrency; - } + public String getPortfolioId() { + return portfolioId; + } - public void setBaseCurrency(String baseCurrency) { - this.baseCurrency = baseCurrency; - } - public String getQuoteCurrency() { - return quoteCurrency; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } - public void setQuoteCurrency(String quoteCurrency) { - this.quoteCurrency = quoteCurrency; - } - public String getBaseBuyingPower() { - return baseBuyingPower; - } + public String getBaseCurrency() { + return baseCurrency; + } - public void setBaseBuyingPower(String baseBuyingPower) { - this.baseBuyingPower = baseBuyingPower; - } - public String getQuoteBuyingPower() { - return quoteBuyingPower; - } + public void setBaseCurrency(String baseCurrency) { + this.baseCurrency = baseCurrency; + } - public void setQuoteBuyingPower(String quoteBuyingPower) { - this.quoteBuyingPower = quoteBuyingPower; - } - public static class Builder { - private String portfolioId; + public String getQuoteCurrency() { + return quoteCurrency; + } - private String baseCurrency; + public void setQuoteCurrency(String quoteCurrency) { + this.quoteCurrency = quoteCurrency; + } - private String quoteCurrency; + public String getBaseBuyingPower() { + return baseBuyingPower; + } - private String baseBuyingPower; + public void setBaseBuyingPower(String baseBuyingPower) { + this.baseBuyingPower = baseBuyingPower; + } - private String quoteBuyingPower; + public String getQuoteBuyingPower() { + return quoteBuyingPower; + } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public void setQuoteBuyingPower(String quoteBuyingPower) { + this.quoteBuyingPower = quoteBuyingPower; + } - public Builder baseCurrency(String baseCurrency) { - this.baseCurrency = baseCurrency; - return this; - } + public static class Builder { + private String portfolioId; - public Builder quoteCurrency(String quoteCurrency) { - this.quoteCurrency = quoteCurrency; - return this; - } + private String baseCurrency; - public Builder baseBuyingPower(String baseBuyingPower) { - this.baseBuyingPower = baseBuyingPower; - return this; - } + private String quoteCurrency; - public Builder quoteBuyingPower(String quoteBuyingPower) { - this.quoteBuyingPower = quoteBuyingPower; - return this; - } + private String baseBuyingPower; - public BuyingPower build() { - return new BuyingPower(this); - } + private String quoteBuyingPower; + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder baseCurrency(String baseCurrency) { + this.baseCurrency = baseCurrency; + return this; } -} + public Builder quoteCurrency(String quoteCurrency) { + this.quoteCurrency = quoteCurrency; + return this; + } + + public Builder baseBuyingPower(String baseBuyingPower) { + this.baseBuyingPower = baseBuyingPower; + return this; + } + + public Builder quoteBuyingPower(String quoteBuyingPower) { + this.quoteBuyingPower = quoteBuyingPower; + return this; + } + + public BuyingPower build() { + return new BuyingPower(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Candle.java b/src/main/java/com/coinbase/prime/model/Candle.java index 09975bf..5594bd2 100644 --- a/src/main/java/com/coinbase/prime/model/Candle.java +++ b/src/main/java/com/coinbase/prime/model/Candle.java @@ -17,137 +17,133 @@ */ package com.coinbase.prime.model; + import java.time.OffsetDateTime; /** Represents a single candle data point */ public class Candle { - /** Timestamp for the start of the candle period */ - private OffsetDateTime timestamp; + /** Timestamp for the start of the candle period */ + private OffsetDateTime timestamp; - /** - * Opening price for the period - */ - private String open; + /** Opening price for the period */ + private String open; - /** - * Highest price during the period - */ - private String high; + /** Highest price during the period */ + private String high; - /** - * Lowest price during the period - */ - private String low; + /** Lowest price during the period */ + private String low; - /** - * Closing price for the period - */ - private String close; + /** Closing price for the period */ + private String close; - /** - * Volume traded during the period - */ - private String volume; + /** Volume traded during the period */ + private String volume; - public Candle() { - } + public Candle() {} - public Candle(Builder builder) { - this.timestamp = builder.timestamp; - this.open = builder.open; - this.high = builder.high; - this.low = builder.low; - this.close = builder.close; - this.volume = builder.volume; - } - public OffsetDateTime getTimestamp() { - return timestamp; - } + public Candle(Builder builder) { + this.timestamp = builder.timestamp; + this.open = builder.open; + this.high = builder.high; + this.low = builder.low; + this.close = builder.close; + this.volume = builder.volume; + } - public void setTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - } - public String getOpen() { - return open; - } + public OffsetDateTime getTimestamp() { + return timestamp; + } - public void setOpen(String open) { - this.open = open; - } - public String getHigh() { - return high; - } + public void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } - public void setHigh(String high) { - this.high = high; - } - public String getLow() { - return low; - } + public String getOpen() { + return open; + } - public void setLow(String low) { - this.low = low; - } - public String getClose() { - return close; - } + public void setOpen(String open) { + this.open = open; + } - public void setClose(String close) { - this.close = close; - } - public String getVolume() { - return volume; - } + public String getHigh() { + return high; + } - public void setVolume(String volume) { - this.volume = volume; - } - public static class Builder { - private OffsetDateTime timestamp; + public void setHigh(String high) { + this.high = high; + } - private String open; + public String getLow() { + return low; + } - private String high; + public void setLow(String low) { + this.low = low; + } - private String low; + public String getClose() { + return close; + } - private String close; + public void setClose(String close) { + this.close = close; + } - private String volume; + public String getVolume() { + return volume; + } - public Builder timestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - return this; - } + public void setVolume(String volume) { + this.volume = volume; + } - public Builder open(String open) { - this.open = open; - return this; - } + public static class Builder { + private OffsetDateTime timestamp; + + private String open; + + private String high; - public Builder high(String high) { - this.high = high; - return this; - } + private String low; - public Builder low(String low) { - this.low = low; - return this; - } + private String close; - public Builder close(String close) { - this.close = close; - return this; - } + private String volume; - public Builder volume(String volume) { - this.volume = volume; - return this; - } + public Builder timestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } - public Candle build() { - return new Candle(this); - } + public Builder open(String open) { + this.open = open; + return this; } -} + public Builder high(String high) { + this.high = high; + return this; + } + + public Builder low(String low) { + this.low = low; + return this; + } + + public Builder close(String close) { + this.close = close; + return this; + } + + public Builder volume(String volume) { + this.volume = volume; + return this; + } + + public Candle build() { + return new Candle(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Commission.java b/src/main/java/com/coinbase/prime/model/Commission.java index f57238d..2e6ec81 100644 --- a/src/main/java/com/coinbase/prime/model/Commission.java +++ b/src/main/java/com/coinbase/prime/model/Commission.java @@ -17,79 +17,76 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class Commission { - /** - * Fee model (all_in or cost_plus) - */ - private String type; + /** Fee model (all_in or cost_plus) */ + private String type; - /** - * Commission rate (in whole percentage. Commission of 15bps is \"0.0015\") - */ - private String 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) - */ - @JsonProperty("trading_volume") - private String tradingVolume; + /** Average 30 days over past 3 months (e.g. 90 days divided by 3) */ + @JsonProperty("trading_volume") + private String tradingVolume; - public Commission() { - } + public Commission() {} - public Commission(Builder builder) { - this.type = builder.type; - this.rate = builder.rate; - this.tradingVolume = builder.tradingVolume; - } - public String getType() { - return type; - } + public Commission(Builder builder) { + this.type = builder.type; + this.rate = builder.rate; + this.tradingVolume = builder.tradingVolume; + } - public void setType(String type) { - this.type = type; - } - public String getRate() { - return rate; - } + public String getType() { + return type; + } - public void setRate(String rate) { - this.rate = rate; - } - public String getTradingVolume() { - return tradingVolume; - } + public void setType(String type) { + this.type = type; + } - public void setTradingVolume(String tradingVolume) { - this.tradingVolume = tradingVolume; - } - public static class Builder { - private String type; + public String getRate() { + return rate; + } - private String rate; + public void setRate(String rate) { + this.rate = rate; + } - private String tradingVolume; + public String getTradingVolume() { + return tradingVolume; + } - public Builder type(String type) { - this.type = type; - return this; - } + public void setTradingVolume(String tradingVolume) { + this.tradingVolume = tradingVolume; + } - public Builder rate(String rate) { - this.rate = rate; - return this; - } + public static class Builder { + private String type; + + private String rate; - public Builder tradingVolume(String tradingVolume) { - this.tradingVolume = tradingVolume; - return this; - } + private String tradingVolume; - public Commission build() { - return new Commission(this); - } + public Builder type(String type) { + this.type = type; + return this; } -} + public Builder rate(String rate) { + this.rate = rate; + return this; + } + + public Builder tradingVolume(String tradingVolume) { + this.tradingVolume = tradingVolume; + return this; + } + + public Commission build() { + return new Commission(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java index b9b6d2c..dd68544 100644 --- a/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java +++ b/src/main/java/com/coinbase/prime/model/CommissionDetailTotal.java @@ -17,162 +17,161 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class CommissionDetailTotal { - /** - * Total commission amount charged for the order - * This is the sum of all commission charged on the order - */ - @JsonProperty("total_commission") + /** + * Total commission amount charged for the order This is the sum of all commission charged on the + * order + */ + @JsonProperty("total_commission") + private String totalCommission; + + /** CB fee */ + @JsonProperty("client_commission") + private String clientCommission; + + /** Exchange fees */ + @JsonProperty("venue_commission") + private String venueCommission; + + /** CES Commission */ + @JsonProperty("ces_commission") + private String cesCommission; + + /** Financing Commission */ + @JsonProperty("financing_commission") + private String financingCommission; + + /** NFA fees */ + @JsonProperty("regulatory_commission") + private String regulatoryCommission; + + /** Clearing fees */ + @JsonProperty("clearing_commission") + private String clearingCommission; + + public CommissionDetailTotal() {} + + public CommissionDetailTotal(Builder builder) { + this.totalCommission = builder.totalCommission; + this.clientCommission = builder.clientCommission; + this.venueCommission = builder.venueCommission; + this.cesCommission = builder.cesCommission; + this.financingCommission = builder.financingCommission; + this.regulatoryCommission = builder.regulatoryCommission; + this.clearingCommission = builder.clearingCommission; + } + + public String getTotalCommission() { + return totalCommission; + } + + public void setTotalCommission(String totalCommission) { + this.totalCommission = totalCommission; + } + + public String getClientCommission() { + return clientCommission; + } + + public void setClientCommission(String clientCommission) { + this.clientCommission = clientCommission; + } + + public String getVenueCommission() { + return venueCommission; + } + + public void setVenueCommission(String venueCommission) { + this.venueCommission = venueCommission; + } + + public String getCesCommission() { + return cesCommission; + } + + public void setCesCommission(String cesCommission) { + this.cesCommission = cesCommission; + } + + public String getFinancingCommission() { + return financingCommission; + } + + public void setFinancingCommission(String financingCommission) { + this.financingCommission = financingCommission; + } + + public String getRegulatoryCommission() { + return regulatoryCommission; + } + + public void setRegulatoryCommission(String regulatoryCommission) { + this.regulatoryCommission = regulatoryCommission; + } + + public String getClearingCommission() { + return clearingCommission; + } + + public void setClearingCommission(String clearingCommission) { + this.clearingCommission = clearingCommission; + } + + public static class Builder { private String totalCommission; - /** - * CB fee - */ - @JsonProperty("client_commission") private String clientCommission; - /** - * Exchange fees - */ - @JsonProperty("venue_commission") private String venueCommission; - /** CES Commission */ - @JsonProperty("ces_commission") private String cesCommission; - /** Financing Commission */ - @JsonProperty("financing_commission") private String financingCommission; - /** - * NFA fees - */ - @JsonProperty("regulatory_commission") private String regulatoryCommission; - /** - * Clearing fees - */ - @JsonProperty("clearing_commission") private String clearingCommission; - public CommissionDetailTotal() { + public Builder totalCommission(String totalCommission) { + this.totalCommission = totalCommission; + return this; } - public CommissionDetailTotal(Builder builder) { - this.totalCommission = builder.totalCommission; - this.clientCommission = builder.clientCommission; - this.venueCommission = builder.venueCommission; - this.cesCommission = builder.cesCommission; - this.financingCommission = builder.financingCommission; - this.regulatoryCommission = builder.regulatoryCommission; - this.clearingCommission = builder.clearingCommission; - } - public String getTotalCommission() { - return totalCommission; + public Builder clientCommission(String clientCommission) { + this.clientCommission = clientCommission; + return this; } - public void setTotalCommission(String totalCommission) { - this.totalCommission = totalCommission; - } - public String getClientCommission() { - return clientCommission; + public Builder venueCommission(String venueCommission) { + this.venueCommission = venueCommission; + return this; } - public void setClientCommission(String clientCommission) { - this.clientCommission = clientCommission; - } - public String getVenueCommission() { - return venueCommission; + public Builder cesCommission(String cesCommission) { + this.cesCommission = cesCommission; + return this; } - public void setVenueCommission(String venueCommission) { - this.venueCommission = venueCommission; - } - public String getCesCommission() { - return cesCommission; + public Builder financingCommission(String financingCommission) { + this.financingCommission = financingCommission; + return this; } - public void setCesCommission(String cesCommission) { - this.cesCommission = cesCommission; - } - public String getFinancingCommission() { - return financingCommission; + public Builder regulatoryCommission(String regulatoryCommission) { + this.regulatoryCommission = regulatoryCommission; + return this; } - public void setFinancingCommission(String financingCommission) { - this.financingCommission = financingCommission; - } - public String getRegulatoryCommission() { - return regulatoryCommission; + public Builder clearingCommission(String clearingCommission) { + this.clearingCommission = clearingCommission; + return this; } - public void setRegulatoryCommission(String regulatoryCommission) { - this.regulatoryCommission = regulatoryCommission; - } - public String getClearingCommission() { - return clearingCommission; - } - - public void setClearingCommission(String clearingCommission) { - this.clearingCommission = clearingCommission; - } - public static class Builder { - private String totalCommission; - - private String clientCommission; - - private String venueCommission; - - private String cesCommission; - - private String financingCommission; - - private String regulatoryCommission; - - private String clearingCommission; - - public Builder totalCommission(String totalCommission) { - this.totalCommission = totalCommission; - return this; - } - - public Builder clientCommission(String clientCommission) { - this.clientCommission = clientCommission; - return this; - } - - public Builder venueCommission(String venueCommission) { - this.venueCommission = venueCommission; - return this; - } - - public Builder cesCommission(String cesCommission) { - this.cesCommission = cesCommission; - return this; - } - - public Builder financingCommission(String financingCommission) { - this.financingCommission = financingCommission; - return this; - } - - public Builder regulatoryCommission(String regulatoryCommission) { - this.regulatoryCommission = regulatoryCommission; - return this; - } - - public Builder clearingCommission(String clearingCommission) { - this.clearingCommission = clearingCommission; - return this; - } - - public CommissionDetailTotal build() { - return new CommissionDetailTotal(this); - } + public CommissionDetailTotal build() { + return new CommissionDetailTotal(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/Conversion.java b/src/main/java/com/coinbase/prime/model/Conversion.java index 6389647..f26ae77 100644 --- a/src/main/java/com/coinbase/prime/model/Conversion.java +++ b/src/main/java/com/coinbase/prime/model/Conversion.java @@ -17,102 +17,98 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.ConversionDetail; -import com.coinbase.prime.model.ShortCollateral; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Conversion { - /** - * Conversion details - */ - @JsonProperty("conversion_details") - private List conversionDetails; + /** Conversion details */ + @JsonProperty("conversion_details") + private List conversionDetails; - @JsonProperty("short_collateral") - private ShortCollateral shortCollateral; + @JsonProperty("short_collateral") + private ShortCollateral shortCollateral; - /** - * The UTC date time used for conversion - */ - @JsonProperty("conversion_datetime") - private String conversionDatetime; + /** The UTC date time used for conversion */ + @JsonProperty("conversion_datetime") + private String conversionDatetime; - /** - * Portfolio Id - */ - @JsonProperty("portfolio_id") - private String portfolioId; + /** Portfolio Id */ + @JsonProperty("portfolio_id") + private String portfolioId; - public Conversion() { - } + public Conversion() {} - public Conversion(Builder builder) { - this.conversionDetails = builder.conversionDetails; - this.shortCollateral = builder.shortCollateral; - this.conversionDatetime = builder.conversionDatetime; - this.portfolioId = builder.portfolioId; - } - public List getConversionDetails() { - return conversionDetails; - } + public Conversion(Builder builder) { + this.conversionDetails = builder.conversionDetails; + this.shortCollateral = builder.shortCollateral; + this.conversionDatetime = builder.conversionDatetime; + this.portfolioId = builder.portfolioId; + } - public void setConversionDetails(List conversionDetails) { - this.conversionDetails = conversionDetails; - } - public ShortCollateral getShortCollateral() { - return shortCollateral; - } + public List getConversionDetails() { + return conversionDetails; + } - public void setShortCollateral(ShortCollateral shortCollateral) { - this.shortCollateral = shortCollateral; - } - public String getConversionDatetime() { - return conversionDatetime; - } + public void setConversionDetails(List conversionDetails) { + this.conversionDetails = conversionDetails; + } - public void setConversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - } - public String getPortfolioId() { - return portfolioId; - } + public ShortCollateral getShortCollateral() { + return shortCollateral; + } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public static class Builder { - private List conversionDetails; + public void setShortCollateral(ShortCollateral shortCollateral) { + this.shortCollateral = shortCollateral; + } - private ShortCollateral shortCollateral; + public String getConversionDatetime() { + return conversionDatetime; + } - private String conversionDatetime; + public void setConversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + } - private String portfolioId; + public String getPortfolioId() { + return portfolioId; + } - public Builder conversionDetails(List conversionDetails) { - this.conversionDetails = conversionDetails; - return this; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } - public Builder shortCollateral(ShortCollateral shortCollateral) { - this.shortCollateral = shortCollateral; - return this; - } + public static class Builder { + private List conversionDetails; - public Builder conversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - return this; - } + private ShortCollateral shortCollateral; - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + private String conversionDatetime; - public Conversion build() { - return new Conversion(this); - } + private String portfolioId; + + public Builder conversionDetails(List conversionDetails) { + this.conversionDetails = conversionDetails; + return this; + } + + public Builder shortCollateral(ShortCollateral shortCollateral) { + this.shortCollateral = shortCollateral; + return this; + } + + public Builder conversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + return this; } -} + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Conversion build() { + return new Conversion(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ConversionDetail.java b/src/main/java/com/coinbase/prime/model/ConversionDetail.java index 44f4920..b55b319 100644 --- a/src/main/java/com/coinbase/prime/model/ConversionDetail.java +++ b/src/main/java/com/coinbase/prime/model/ConversionDetail.java @@ -17,164 +17,157 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class ConversionDetail { - /** - * The currency symbol - */ + /** The currency symbol */ + private String symbol; + + /** Trade finance balance after the conversion */ + @JsonProperty("tf_balance") + private String tfBalance; + + /** Notional trade finance balance after the conversion */ + @JsonProperty("notional_tf_balance") + private String notionalTfBalance; + + /** Converted balance */ + @JsonProperty("converted_balance") + private String convertedBalance; + + /** Notional converted balance */ + @JsonProperty("notional_converted_balance") + private String notionalConvertedBalance; + + /** Interest rate */ + @JsonProperty("interest_rate") + private String interestRate; + + /** Conversion rate */ + @JsonProperty("conversion_rate") + private String conversionRate; + + public ConversionDetail() {} + + public ConversionDetail(Builder builder) { + this.symbol = builder.symbol; + this.tfBalance = builder.tfBalance; + this.notionalTfBalance = builder.notionalTfBalance; + this.convertedBalance = builder.convertedBalance; + this.notionalConvertedBalance = builder.notionalConvertedBalance; + this.interestRate = builder.interestRate; + this.conversionRate = builder.conversionRate; + } + + public String getSymbol() { + return symbol; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public String getTfBalance() { + return tfBalance; + } + + public void setTfBalance(String tfBalance) { + this.tfBalance = tfBalance; + } + + public String getNotionalTfBalance() { + return notionalTfBalance; + } + + public void setNotionalTfBalance(String notionalTfBalance) { + this.notionalTfBalance = notionalTfBalance; + } + + public String getConvertedBalance() { + return convertedBalance; + } + + public void setConvertedBalance(String convertedBalance) { + this.convertedBalance = convertedBalance; + } + + public String getNotionalConvertedBalance() { + return notionalConvertedBalance; + } + + public void setNotionalConvertedBalance(String notionalConvertedBalance) { + this.notionalConvertedBalance = notionalConvertedBalance; + } + + public String getInterestRate() { + return interestRate; + } + + public void setInterestRate(String interestRate) { + this.interestRate = interestRate; + } + + public String getConversionRate() { + return conversionRate; + } + + public void setConversionRate(String conversionRate) { + this.conversionRate = conversionRate; + } + + public static class Builder { private String symbol; - /** - * Trade finance balance after the conversion - */ - @JsonProperty("tf_balance") private String tfBalance; - /** - * Notional trade finance balance after the conversion - */ - @JsonProperty("notional_tf_balance") private String notionalTfBalance; - /** - * Converted balance - */ - @JsonProperty("converted_balance") private String convertedBalance; - /** - * Notional converted balance - */ - @JsonProperty("notional_converted_balance") private String notionalConvertedBalance; - /** - * Interest rate - */ - @JsonProperty("interest_rate") private String interestRate; - /** - * Conversion rate - */ - @JsonProperty("conversion_rate") private String conversionRate; - public ConversionDetail() { + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } - public ConversionDetail(Builder builder) { - this.symbol = builder.symbol; - this.tfBalance = builder.tfBalance; - this.notionalTfBalance = builder.notionalTfBalance; - this.convertedBalance = builder.convertedBalance; - this.notionalConvertedBalance = builder.notionalConvertedBalance; - this.interestRate = builder.interestRate; - this.conversionRate = builder.conversionRate; - } - public String getSymbol() { - return symbol; + public Builder tfBalance(String tfBalance) { + this.tfBalance = tfBalance; + return this; } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getTfBalance() { - return tfBalance; + public Builder notionalTfBalance(String notionalTfBalance) { + this.notionalTfBalance = notionalTfBalance; + return this; } - public void setTfBalance(String tfBalance) { - this.tfBalance = tfBalance; - } - public String getNotionalTfBalance() { - return notionalTfBalance; + public Builder convertedBalance(String convertedBalance) { + this.convertedBalance = convertedBalance; + return this; } - public void setNotionalTfBalance(String notionalTfBalance) { - this.notionalTfBalance = notionalTfBalance; - } - public String getConvertedBalance() { - return convertedBalance; + public Builder notionalConvertedBalance(String notionalConvertedBalance) { + this.notionalConvertedBalance = notionalConvertedBalance; + return this; } - public void setConvertedBalance(String convertedBalance) { - this.convertedBalance = convertedBalance; - } - public String getNotionalConvertedBalance() { - return notionalConvertedBalance; + public Builder interestRate(String interestRate) { + this.interestRate = interestRate; + return this; } - public void setNotionalConvertedBalance(String notionalConvertedBalance) { - this.notionalConvertedBalance = notionalConvertedBalance; - } - public String getInterestRate() { - return interestRate; + public Builder conversionRate(String conversionRate) { + this.conversionRate = conversionRate; + return this; } - public void setInterestRate(String interestRate) { - this.interestRate = interestRate; - } - public String getConversionRate() { - return conversionRate; - } - - public void setConversionRate(String conversionRate) { - this.conversionRate = conversionRate; - } - public static class Builder { - private String symbol; - - private String tfBalance; - - private String notionalTfBalance; - - private String convertedBalance; - - private String notionalConvertedBalance; - - private String interestRate; - - private String conversionRate; - - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } - - public Builder tfBalance(String tfBalance) { - this.tfBalance = tfBalance; - return this; - } - - public Builder notionalTfBalance(String notionalTfBalance) { - this.notionalTfBalance = notionalTfBalance; - return this; - } - - public Builder convertedBalance(String convertedBalance) { - this.convertedBalance = convertedBalance; - return this; - } - - public Builder notionalConvertedBalance(String notionalConvertedBalance) { - this.notionalConvertedBalance = notionalConvertedBalance; - return this; - } - - public Builder interestRate(String interestRate) { - this.interestRate = interestRate; - return this; - } - - public Builder conversionRate(String conversionRate) { - this.conversionRate = conversionRate; - return this; - } - - public ConversionDetail build() { - return new ConversionDetail(this); - } + public ConversionDetail build() { + return new ConversionDetail(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/Counterparty.java b/src/main/java/com/coinbase/prime/model/Counterparty.java index c64b2d6..5aa627d 100644 --- a/src/main/java/com/coinbase/prime/model/Counterparty.java +++ b/src/main/java/com/coinbase/prime/model/Counterparty.java @@ -17,39 +17,38 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class Counterparty { - /** - * The unique counterparty ID for the portfolio - */ - @JsonProperty("counterparty_id") - private String counterpartyId; + /** The unique counterparty ID for the portfolio */ + @JsonProperty("counterparty_id") + private String counterpartyId; - public Counterparty() { - } + public Counterparty() {} - public Counterparty(Builder builder) { - this.counterpartyId = builder.counterpartyId; - } - public String getCounterpartyId() { - return counterpartyId; - } + public Counterparty(Builder builder) { + this.counterpartyId = builder.counterpartyId; + } - public void setCounterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - } - public static class Builder { - private String counterpartyId; + public String getCounterpartyId() { + return counterpartyId; + } - public Builder counterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - return this; - } + public void setCounterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + } - public Counterparty build() { - return new Counterparty(this); - } + public static class Builder { + private String counterpartyId; + + public Builder counterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + return this; } -} + public Counterparty build() { + return new Counterparty(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java b/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java index c32c5c8..1d98213 100644 --- a/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java +++ b/src/main/java/com/coinbase/prime/model/CounterpartyDestination.java @@ -17,38 +17,39 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a destination for a counterparty payment */ public class CounterpartyDestination { - /** The counterparty ID to pay out */ - @JsonProperty("counterparty_id") - private String counterpartyId; + /** The counterparty ID to pay out */ + @JsonProperty("counterparty_id") + private String counterpartyId; - public CounterpartyDestination() { - } + public CounterpartyDestination() {} - public CounterpartyDestination(Builder builder) { - this.counterpartyId = builder.counterpartyId; - } - public String getCounterpartyId() { - return counterpartyId; - } + public CounterpartyDestination(Builder builder) { + this.counterpartyId = builder.counterpartyId; + } - public void setCounterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - } - public static class Builder { - private String counterpartyId; + public String getCounterpartyId() { + return counterpartyId; + } - public Builder counterpartyId(String counterpartyId) { - this.counterpartyId = counterpartyId; - return this; - } + public void setCounterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + } - public CounterpartyDestination build() { - return new CounterpartyDestination(this); - } + public static class Builder { + private String counterpartyId; + + public Builder counterpartyId(String counterpartyId) { + this.counterpartyId = counterpartyId; + return this; } -} + public CounterpartyDestination build() { + return new CounterpartyDestination(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java index b20934d..41b9f63 100644 --- a/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateAllocationResponseBody.java @@ -17,80 +17,77 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class CreateAllocationResponseBody { - /** - * The success boolean for the post allocation - */ - private boolean success; + /** The success boolean for the post allocation */ + private boolean success; - /** - * The allocation id for the post allocation - */ - @JsonProperty("allocation_id") - private String allocationId; + /** The allocation id for the post allocation */ + @JsonProperty("allocation_id") + private String allocationId; - /** - * The failure reason for the post allocation - */ - @JsonProperty("failure_reason") - private String failureReason; + /** The failure reason for the post allocation */ + @JsonProperty("failure_reason") + private String failureReason; - public CreateAllocationResponseBody() { - } + public CreateAllocationResponseBody() {} - public CreateAllocationResponseBody(Builder builder) { - this.success = builder.success; - this.allocationId = builder.allocationId; - this.failureReason = builder.failureReason; - } - public boolean getSuccess() { - return success; - } + public CreateAllocationResponseBody(Builder builder) { + this.success = builder.success; + this.allocationId = builder.allocationId; + this.failureReason = builder.failureReason; + } - public void setSuccess(boolean success) { - this.success = success; - } - public String getAllocationId() { - return allocationId; - } + public boolean getSuccess() { + return success; + } - public void setAllocationId(String allocationId) { - this.allocationId = allocationId; - } - public String getFailureReason() { - return failureReason; - } + public void setSuccess(boolean success) { + this.success = success; + } - public void setFailureReason(String failureReason) { - this.failureReason = failureReason; - } - public static class Builder { - private boolean success; + public String getAllocationId() { + return allocationId; + } - private String allocationId; + public void setAllocationId(String allocationId) { + this.allocationId = allocationId; + } - private String failureReason; + public String getFailureReason() { + return failureReason; + } - public Builder success(boolean success) { - this.success = success; - return this; - } + public void setFailureReason(String failureReason) { + this.failureReason = failureReason; + } - public Builder allocationId(String allocationId) { - this.allocationId = allocationId; - return this; - } + public static class Builder { + private boolean success; + + private String allocationId; - public Builder failureReason(String failureReason) { - this.failureReason = failureReason; - return this; - } + private String failureReason; - public CreateAllocationResponseBody build() { - return new CreateAllocationResponseBody(this); - } + public Builder success(boolean success) { + this.success = success; + return this; } -} + public Builder allocationId(String allocationId) { + this.allocationId = allocationId; + return this; + } + + public Builder failureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + public CreateAllocationResponseBody build() { + return new CreateAllocationResponseBody(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java index a513d8d..400fa72 100644 --- a/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java +++ b/src/main/java/com/coinbase/prime/model/CreateNetAllocationResponseBody.java @@ -17,122 +17,117 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class CreateNetAllocationResponseBody { - /** - * The success boolean for the post net allocation - */ - private boolean success; + /** The success boolean for the post net allocation */ + private boolean success; - /** - * The netting_id for the post net allocation - */ - @JsonProperty("netting_id") - private String nettingId; + /** The netting_id for the post net allocation */ + @JsonProperty("netting_id") + private String nettingId; - /** - * The allocation id of the buy allocation in net allocation - */ - @JsonProperty("buy_allocation_id") - private String buyAllocationId; + /** The allocation id of the buy allocation in net allocation */ + @JsonProperty("buy_allocation_id") + private String buyAllocationId; - /** - * The allocation id of the sell allocation in net allocation - */ - @JsonProperty("sell_allocation_id") - private String sellAllocationId; + /** The allocation id of the sell allocation in net allocation */ + @JsonProperty("sell_allocation_id") + private String sellAllocationId; - /** - * The failure reason for the post net allocation - */ - @JsonProperty("failure_reason") - private String failureReason; + /** The failure reason for the post net allocation */ + @JsonProperty("failure_reason") + private String failureReason; - public CreateNetAllocationResponseBody() { - } + public CreateNetAllocationResponseBody() {} - public CreateNetAllocationResponseBody(Builder builder) { - this.success = builder.success; - this.nettingId = builder.nettingId; - this.buyAllocationId = builder.buyAllocationId; - this.sellAllocationId = builder.sellAllocationId; - this.failureReason = builder.failureReason; - } - public boolean getSuccess() { - return success; - } + public CreateNetAllocationResponseBody(Builder builder) { + this.success = builder.success; + this.nettingId = builder.nettingId; + this.buyAllocationId = builder.buyAllocationId; + this.sellAllocationId = builder.sellAllocationId; + this.failureReason = builder.failureReason; + } - public void setSuccess(boolean success) { - this.success = success; - } - public String getNettingId() { - return nettingId; - } + public boolean getSuccess() { + return success; + } - public void setNettingId(String nettingId) { - this.nettingId = nettingId; - } - public String getBuyAllocationId() { - return buyAllocationId; - } + public void setSuccess(boolean success) { + this.success = success; + } - public void setBuyAllocationId(String buyAllocationId) { - this.buyAllocationId = buyAllocationId; - } - public String getSellAllocationId() { - return sellAllocationId; - } + public String getNettingId() { + return nettingId; + } - public void setSellAllocationId(String sellAllocationId) { - this.sellAllocationId = sellAllocationId; - } - public String getFailureReason() { - return failureReason; - } + public void setNettingId(String nettingId) { + this.nettingId = nettingId; + } - public void setFailureReason(String failureReason) { - this.failureReason = failureReason; - } - public static class Builder { - private boolean success; + public String getBuyAllocationId() { + return buyAllocationId; + } - private String nettingId; + public void setBuyAllocationId(String buyAllocationId) { + this.buyAllocationId = buyAllocationId; + } - private String buyAllocationId; + public String getSellAllocationId() { + return sellAllocationId; + } - private String sellAllocationId; + public void setSellAllocationId(String sellAllocationId) { + this.sellAllocationId = sellAllocationId; + } - private String failureReason; + public String getFailureReason() { + return failureReason; + } - public Builder success(boolean success) { - this.success = success; - return this; - } + public void setFailureReason(String failureReason) { + this.failureReason = failureReason; + } - public Builder nettingId(String nettingId) { - this.nettingId = nettingId; - return this; - } + public static class Builder { + private boolean success; - public Builder buyAllocationId(String buyAllocationId) { - this.buyAllocationId = buyAllocationId; - return this; - } + private String nettingId; - public Builder sellAllocationId(String sellAllocationId) { - this.sellAllocationId = sellAllocationId; - return this; - } + private String buyAllocationId; - public Builder failureReason(String failureReason) { - this.failureReason = failureReason; - return this; - } + private String sellAllocationId; - public CreateNetAllocationResponseBody build() { - return new CreateNetAllocationResponseBody(this); - } + private String failureReason; + + public Builder success(boolean success) { + this.success = success; + return this; + } + + public Builder nettingId(String nettingId) { + this.nettingId = nettingId; + return this; } -} + public Builder buyAllocationId(String buyAllocationId) { + this.buyAllocationId = buyAllocationId; + return this; + } + + public Builder sellAllocationId(String sellAllocationId) { + this.sellAllocationId = sellAllocationId; + return this; + } + + public Builder failureReason(String failureReason) { + this.failureReason = failureReason; + return this; + } + + public CreateNetAllocationResponseBody build() { + return new CreateNetAllocationResponseBody(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java index b7f3e92..8727ef7 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginOverview.java @@ -17,181 +17,192 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.ActiveLiquidationSummary; + import com.coinbase.prime.model.enums.XMControlStatus; import com.coinbase.prime.model.enums.XMEntityCallStatus; -import com.coinbase.prime.model.XMLoan; -import com.coinbase.prime.model.XMMarginCall; import com.coinbase.prime.model.enums.XMMarginLevel; -import com.coinbase.prime.model.XMSummary; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class CrossMarginOverview { - /** - * - 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. - */ - @JsonProperty("control_status") + /** + * - 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. + */ + @JsonProperty("control_status") + 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. - + * 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; + + /** + * - 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; + + /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ + @JsonProperty("margin_summary") + private XMSummary marginSummary; + + /** List of active XM margin calls */ + @JsonProperty("active_margin_calls") + private List activeMarginCalls; + + /** List of active XM loans */ + @JsonProperty("active_loans") + private List activeLoans; + + /** ActiveLiquidationSummary provides a summary of the active or most recent XM liquidation */ + @JsonProperty("active_liquidation") + private ActiveLiquidationSummary activeLiquidation; + + public CrossMarginOverview() {} + + public CrossMarginOverview(Builder builder) { + this.controlStatus = builder.controlStatus; + this.callStatus = builder.callStatus; + this.marginLevel = builder.marginLevel; + this.marginSummary = builder.marginSummary; + this.activeMarginCalls = builder.activeMarginCalls; + this.activeLoans = builder.activeLoans; + this.activeLiquidation = builder.activeLiquidation; + } + + public XMControlStatus getControlStatus() { + return controlStatus; + } + + public void setControlStatus(XMControlStatus controlStatus) { + this.controlStatus = controlStatus; + } + + public XMEntityCallStatus getCallStatus() { + return callStatus; + } + + public void setCallStatus(XMEntityCallStatus callStatus) { + this.callStatus = callStatus; + } + + public XMMarginLevel getMarginLevel() { + return marginLevel; + } + + public void setMarginLevel(XMMarginLevel marginLevel) { + this.marginLevel = marginLevel; + } + + public XMSummary getMarginSummary() { + return marginSummary; + } + + public void setMarginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + } + + public List getActiveMarginCalls() { + return activeMarginCalls; + } + + public void setActiveMarginCalls(List activeMarginCalls) { + this.activeMarginCalls = activeMarginCalls; + } + + public List getActiveLoans() { + return activeLoans; + } + + public void setActiveLoans(List activeLoans) { + this.activeLoans = activeLoans; + } + + public ActiveLiquidationSummary getActiveLiquidation() { + return activeLiquidation; + } + + public void setActiveLiquidation(ActiveLiquidationSummary activeLiquidation) { + this.activeLiquidation = activeLiquidation; + } + + public static class Builder { 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. - * - 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; - /** - * - 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; - /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ - @JsonProperty("margin_summary") private XMSummary marginSummary; - /** - * List of active XM margin calls - */ - @JsonProperty("active_margin_calls") private List activeMarginCalls; - /** - * List of active XM loans - */ - @JsonProperty("active_loans") private List activeLoans; - /** ActiveLiquidationSummary provides a summary of the active or most recent XM liquidation */ - @JsonProperty("active_liquidation") private ActiveLiquidationSummary activeLiquidation; - public CrossMarginOverview() { + public Builder controlStatus(XMControlStatus controlStatus) { + this.controlStatus = controlStatus; + return this; } - public CrossMarginOverview(Builder builder) { - this.controlStatus = builder.controlStatus; - this.callStatus = builder.callStatus; - this.marginLevel = builder.marginLevel; - this.marginSummary = builder.marginSummary; - this.activeMarginCalls = builder.activeMarginCalls; - this.activeLoans = builder.activeLoans; - this.activeLiquidation = builder.activeLiquidation; - } - public XMControlStatus getControlStatus() { - return controlStatus; + public Builder callStatus(XMEntityCallStatus callStatus) { + this.callStatus = callStatus; + return this; } - public void setControlStatus(XMControlStatus controlStatus) { - this.controlStatus = controlStatus; - } - public XMEntityCallStatus getCallStatus() { - return callStatus; + public Builder marginLevel(XMMarginLevel marginLevel) { + this.marginLevel = marginLevel; + return this; } - public void setCallStatus(XMEntityCallStatus callStatus) { - this.callStatus = callStatus; - } - public XMMarginLevel getMarginLevel() { - return marginLevel; + public Builder marginSummary(XMSummary marginSummary) { + this.marginSummary = marginSummary; + return this; } - public void setMarginLevel(XMMarginLevel marginLevel) { - this.marginLevel = marginLevel; - } - public XMSummary getMarginSummary() { - return marginSummary; + public Builder activeMarginCalls(List activeMarginCalls) { + this.activeMarginCalls = activeMarginCalls; + return this; } - public void setMarginSummary(XMSummary marginSummary) { - this.marginSummary = marginSummary; - } - public List getActiveMarginCalls() { - return activeMarginCalls; + public Builder activeLoans(List activeLoans) { + this.activeLoans = activeLoans; + return this; } - public void setActiveMarginCalls(List activeMarginCalls) { - this.activeMarginCalls = activeMarginCalls; - } - public List getActiveLoans() { - return activeLoans; + public Builder activeLiquidation(ActiveLiquidationSummary activeLiquidation) { + this.activeLiquidation = activeLiquidation; + return this; } - public void setActiveLoans(List activeLoans) { - this.activeLoans = activeLoans; - } - public ActiveLiquidationSummary getActiveLiquidation() { - return activeLiquidation; - } - - public void setActiveLiquidation(ActiveLiquidationSummary activeLiquidation) { - this.activeLiquidation = activeLiquidation; - } - public static class Builder { - private XMControlStatus controlStatus; - - private XMEntityCallStatus callStatus; - - private XMMarginLevel marginLevel; - - private XMSummary marginSummary; - - private List activeMarginCalls; - - private List activeLoans; - - private ActiveLiquidationSummary activeLiquidation; - - public Builder controlStatus(XMControlStatus controlStatus) { - this.controlStatus = controlStatus; - return this; - } - - public Builder callStatus(XMEntityCallStatus callStatus) { - this.callStatus = callStatus; - return this; - } - - public Builder marginLevel(XMMarginLevel marginLevel) { - this.marginLevel = marginLevel; - return this; - } - - public Builder marginSummary(XMSummary marginSummary) { - this.marginSummary = marginSummary; - return this; - } - - public Builder activeMarginCalls(List activeMarginCalls) { - this.activeMarginCalls = activeMarginCalls; - return this; - } - - public Builder activeLoans(List activeLoans) { - this.activeLoans = activeLoans; - return this; - } - - public Builder activeLiquidation(ActiveLiquidationSummary activeLiquidation) { - this.activeLiquidation = activeLiquidation; - return this; - } - - public CrossMarginOverview build() { - return new CrossMarginOverview(this); - } + public CrossMarginOverview build() { + return new CrossMarginOverview(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java index 8fbc2f7..bb84bcb 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeDerivativesEquityBreakdown.java @@ -17,103 +17,99 @@ */ 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; + /** Derivatives cash balance component. */ + @JsonProperty("cash_balance") + private String cashBalance; - /** - * Unrealized PnL component of derivatives equity. - */ - @JsonProperty("unrealized_pnl") - private String unrealizedPnl; + /** Unrealized PnL component of derivatives equity. */ + @JsonProperty("unrealized_pnl") + private String unrealizedPnl; - /** - * Realized PnL component of derivatives equity. - */ - @JsonProperty("realized_pnl") - private String realizedPnl; + /** 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; + /** Accrued funding PnL component of derivatives equity. */ + @JsonProperty("accrued_funding_pnl") + private String accruedFundingPnl; - public CrossMarginPrimeDerivativesEquityBreakdown() { - } + 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 CrossMarginPrimeDerivativesEquityBreakdown(Builder builder) { + this.cashBalance = builder.cashBalance; + this.unrealizedPnl = builder.unrealizedPnl; + this.realizedPnl = builder.realizedPnl; + this.accruedFundingPnl = builder.accruedFundingPnl; + } - public void setCashBalance(String cashBalance) { - this.cashBalance = cashBalance; - } - public String getUnrealizedPnl() { - return unrealizedPnl; - } + public String getCashBalance() { + return cashBalance; + } - public void setUnrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - } - public String getRealizedPnl() { - return realizedPnl; - } + public void setCashBalance(String cashBalance) { + this.cashBalance = cashBalance; + } - public void setRealizedPnl(String realizedPnl) { - this.realizedPnl = realizedPnl; - } - public String getAccruedFundingPnl() { - return accruedFundingPnl; - } + public String getUnrealizedPnl() { + return unrealizedPnl; + } - public void setAccruedFundingPnl(String accruedFundingPnl) { - this.accruedFundingPnl = accruedFundingPnl; - } - public static class Builder { - private String cashBalance; + public void setUnrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + } - private String unrealizedPnl; + public String getRealizedPnl() { + return realizedPnl; + } - private String realizedPnl; + public void setRealizedPnl(String realizedPnl) { + this.realizedPnl = realizedPnl; + } - private String accruedFundingPnl; + public String getAccruedFundingPnl() { + return accruedFundingPnl; + } - public Builder cashBalance(String cashBalance) { - this.cashBalance = cashBalance; - return this; - } + public void setAccruedFundingPnl(String accruedFundingPnl) { + this.accruedFundingPnl = accruedFundingPnl; + } - public Builder unrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - return this; - } + public static class Builder { + private String cashBalance; - public Builder realizedPnl(String realizedPnl) { - this.realizedPnl = realizedPnl; - return this; - } + private String unrealizedPnl; - public Builder accruedFundingPnl(String accruedFundingPnl) { - this.accruedFundingPnl = accruedFundingPnl; - return this; - } + private String realizedPnl; - public CrossMarginPrimeDerivativesEquityBreakdown build() { - return new CrossMarginPrimeDerivativesEquityBreakdown(this); - } + 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 feef16f..4a7487f 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeMarginSummary.java @@ -17,486 +17,482 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.CrossMarginPrimeDerivativesEquityBreakdown; -import com.coinbase.prime.model.CrossMarginPrimeRiskNettingInfo; -import com.coinbase.prime.model.CrossMarginPrimeSpotEquityBreakdown; + import com.coinbase.prime.model.enums.PrimeXMHealthStatus; -import com.coinbase.prime.model.PrimeXMMarginCallThresholds; import com.coinbase.prime.model.enums.PrimeXMMarginRequirementType; import com.fasterxml.jackson.annotation.JsonProperty; /** Cross-margin account summary and nested breakdowns. */ public class CrossMarginPrimeMarginSummary { - /** - * Cross Margin Margin Requirement (XMMR) notional. - */ - @JsonProperty("margin_requirement") + /** 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). */ + @JsonProperty("margin_excess_shortfall") + private String marginExcessShortfall; + + /** Credit consumed from Cross Margin Credit Limit (XMCL). */ + @JsonProperty("consumed_credit") + private String consumedCredit; + + /** XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans. */ + @JsonProperty("xm_credit_limit") + private String xmCreditLimit; + + /** XM Margin Limit (XMML) is the maximum notional USD deficit. */ + @JsonProperty("xm_margin_limit") + private String xmMarginLimit; + + /** Amount of the XM margin limit consumed by excess deficit. */ + @JsonProperty("consumed_margin_limit") + private String consumedMarginLimit; + + /** Equity attributed by spot. */ + @JsonProperty("spot_equity") + private String spotEquity; + + /** Equity attributed by futures. */ + @JsonProperty("futures_equity") + private String futuresEquity; + + /** Gross market value. */ + @JsonProperty("gross_market_value") + private String grossMarketValue; + + /** Net market value. */ + @JsonProperty("net_market_value") + private String netMarketValue; + + /** Net exposure. */ + @JsonProperty("net_exposure") + private String netExposure; + + /** Gross leverage. */ + @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; + + /** Deficit ratio. */ + @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; + } + + 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; + } + + public void setAccountEquity(String accountEquity) { + this.accountEquity = accountEquity; + } + + public String getMarginExcessShortfall() { + return marginExcessShortfall; + } + + public void setMarginExcessShortfall(String marginExcessShortfall) { + this.marginExcessShortfall = marginExcessShortfall; + } + + public String getConsumedCredit() { + return consumedCredit; + } + + public void setConsumedCredit(String consumedCredit) { + this.consumedCredit = consumedCredit; + } + + public String getXMCreditLimit() { + return xmCreditLimit; + } + + public void setXMCreditLimit(String xmCreditLimit) { + this.xmCreditLimit = xmCreditLimit; + } + + public String getXMMarginLimit() { + return xmMarginLimit; + } + + public void setXMMarginLimit(String xmMarginLimit) { + this.xmMarginLimit = xmMarginLimit; + } + + public String getConsumedMarginLimit() { + return consumedMarginLimit; + } + + public void setConsumedMarginLimit(String consumedMarginLimit) { + this.consumedMarginLimit = consumedMarginLimit; + } + + public String getSpotEquity() { + return spotEquity; + } + + public void setSpotEquity(String spotEquity) { + this.spotEquity = spotEquity; + } + + public String getFuturesEquity() { + return futuresEquity; + } + + public void setFuturesEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + } + + public String getGrossMarketValue() { + return grossMarketValue; + } + + public void setGrossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + } + + public String getNetMarketValue() { + return netMarketValue; + } + + public void setNetMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + } + + public String getNetExposure() { + return netExposure; + } + + public void setNetExposure(String netExposure) { + this.netExposure = netExposure; + } + + public String getGrossLeverage() { + return grossLeverage; + } + + 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; + } + + public void setEquityRatio(String equityRatio) { + this.equityRatio = equityRatio; + } + + public String getDeficitRatio() { + return deficitRatio; + } + + 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; + } + + public void setFcmExcessAvailableToReturn(String fcmExcessAvailableToReturn) { + this.fcmExcessAvailableToReturn = fcmExcessAvailableToReturn; + } + + public static class Builder { 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). - */ - @JsonProperty("margin_excess_shortfall") private String marginExcessShortfall; - /** - * Credit consumed from Cross Margin Credit Limit (XMCL). - */ - @JsonProperty("consumed_credit") private String consumedCredit; - /** - * XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans. - */ - @JsonProperty("xm_credit_limit") private String xmCreditLimit; - /** - * XM Margin Limit (XMML) is the maximum notional USD deficit. - */ - @JsonProperty("xm_margin_limit") private String xmMarginLimit; - /** - * Amount of the XM margin limit consumed by excess deficit. - */ - @JsonProperty("consumed_margin_limit") private String consumedMarginLimit; - /** - * Equity attributed by spot. - */ - @JsonProperty("spot_equity") private String spotEquity; - /** - * Equity attributed by futures. - */ - @JsonProperty("futures_equity") private String futuresEquity; - /** - * Gross market value. - */ - @JsonProperty("gross_market_value") private String grossMarketValue; - /** - * Net market value. - */ - @JsonProperty("net_market_value") private String netMarketValue; - /** - * Net exposure. - */ - @JsonProperty("net_exposure") private String netExposure; - /** - * Gross leverage. - */ - @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; - /** - * Deficit ratio. - */ - @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 Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + return this; } - 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; + public Builder marginRequirementType(PrimeXMMarginRequirementType marginRequirementType) { + this.marginRequirementType = marginRequirementType; + return this; } - public void setMarginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - } - public PrimeXMMarginRequirementType getMarginRequirementType() { - return marginRequirementType; + public Builder accountEquity(String accountEquity) { + this.accountEquity = accountEquity; + return this; } - public void setMarginRequirementType(PrimeXMMarginRequirementType marginRequirementType) { - this.marginRequirementType = marginRequirementType; - } - public String getAccountEquity() { - return accountEquity; + public Builder marginExcessShortfall(String marginExcessShortfall) { + this.marginExcessShortfall = marginExcessShortfall; + return this; } - public void setAccountEquity(String accountEquity) { - this.accountEquity = accountEquity; - } - public String getMarginExcessShortfall() { - return marginExcessShortfall; + public Builder consumedCredit(String consumedCredit) { + this.consumedCredit = consumedCredit; + return this; } - public void setMarginExcessShortfall(String marginExcessShortfall) { - this.marginExcessShortfall = marginExcessShortfall; - } - public String getConsumedCredit() { - return consumedCredit; + public Builder xmCreditLimit(String xmCreditLimit) { + this.xmCreditLimit = xmCreditLimit; + return this; } - public void setConsumedCredit(String consumedCredit) { - this.consumedCredit = consumedCredit; - } - public String getXMCreditLimit() { - return xmCreditLimit; + public Builder xmMarginLimit(String xmMarginLimit) { + this.xmMarginLimit = xmMarginLimit; + return this; } - public void setXMCreditLimit(String xmCreditLimit) { - this.xmCreditLimit = xmCreditLimit; - } - public String getXMMarginLimit() { - return xmMarginLimit; + public Builder consumedMarginLimit(String consumedMarginLimit) { + this.consumedMarginLimit = consumedMarginLimit; + return this; } - public void setXMMarginLimit(String xmMarginLimit) { - this.xmMarginLimit = xmMarginLimit; - } - public String getConsumedMarginLimit() { - return consumedMarginLimit; + public Builder spotEquity(String spotEquity) { + this.spotEquity = spotEquity; + return this; } - public void setConsumedMarginLimit(String consumedMarginLimit) { - this.consumedMarginLimit = consumedMarginLimit; - } - public String getSpotEquity() { - return spotEquity; + public Builder futuresEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + return this; } - public void setSpotEquity(String spotEquity) { - this.spotEquity = spotEquity; - } - public String getFuturesEquity() { - return futuresEquity; + public Builder grossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + return this; } - public void setFuturesEquity(String futuresEquity) { - this.futuresEquity = futuresEquity; - } - public String getGrossMarketValue() { - return grossMarketValue; + public Builder netMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + return this; } - public void setGrossMarketValue(String grossMarketValue) { - this.grossMarketValue = grossMarketValue; - } - public String getNetMarketValue() { - return netMarketValue; - } - - public void setNetMarketValue(String netMarketValue) { - this.netMarketValue = netMarketValue; - } - public String getNetExposure() { - return netExposure; - } - - public void setNetExposure(String netExposure) { - this.netExposure = netExposure; - } - public String getGrossLeverage() { - return grossLeverage; + public Builder netExposure(String netExposure) { + this.netExposure = netExposure; + return this; } - public void setGrossLeverage(String grossLeverage) { - this.grossLeverage = grossLeverage; - } - public CrossMarginPrimeSpotEquityBreakdown getSpotEquityBreakdown() { - return spotEquityBreakdown; + public Builder grossLeverage(String grossLeverage) { + this.grossLeverage = grossLeverage; + return this; } - public void setSpotEquityBreakdown(CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown) { - this.spotEquityBreakdown = spotEquityBreakdown; - } - public CrossMarginPrimeDerivativesEquityBreakdown getDerivativesEquityBreakdown() { - return derivativesEquityBreakdown; + public Builder spotEquityBreakdown(CrossMarginPrimeSpotEquityBreakdown spotEquityBreakdown) { + this.spotEquityBreakdown = spotEquityBreakdown; + return this; } - public void setDerivativesEquityBreakdown(CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown) { - this.derivativesEquityBreakdown = derivativesEquityBreakdown; - } - public CrossMarginPrimeRiskNettingInfo getRiskNettingInfo() { - return riskNettingInfo; + public Builder derivativesEquityBreakdown( + CrossMarginPrimeDerivativesEquityBreakdown derivativesEquityBreakdown) { + this.derivativesEquityBreakdown = derivativesEquityBreakdown; + return this; } - public void setRiskNettingInfo(CrossMarginPrimeRiskNettingInfo riskNettingInfo) { - this.riskNettingInfo = riskNettingInfo; - } - public PrimeXMHealthStatus getHealthStatus() { - return healthStatus; + public Builder riskNettingInfo(CrossMarginPrimeRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; + return this; } - public void setHealthStatus(PrimeXMHealthStatus healthStatus) { - this.healthStatus = healthStatus; - } - public String getEquityRatio() { - return equityRatio; + public Builder healthStatus(PrimeXMHealthStatus healthStatus) { + this.healthStatus = healthStatus; + return this; } - public void setEquityRatio(String equityRatio) { - this.equityRatio = equityRatio; - } - public String getDeficitRatio() { - return deficitRatio; + public Builder equityRatio(String equityRatio) { + this.equityRatio = equityRatio; + return this; } - public void setDeficitRatio(String deficitRatio) { - this.deficitRatio = deficitRatio; - } - public PrimeXMMarginCallThresholds getMarginThresholds() { - return marginThresholds; + public Builder deficitRatio(String deficitRatio) { + this.deficitRatio = deficitRatio; + return this; } - public void setMarginThresholds(PrimeXMMarginCallThresholds marginThresholds) { - this.marginThresholds = marginThresholds; - } - public String getFcmExcessAvailableToReturn() { - return fcmExcessAvailableToReturn; + public Builder marginThresholds(PrimeXMMarginCallThresholds marginThresholds) { + this.marginThresholds = marginThresholds; + return this; } - public void setFcmExcessAvailableToReturn(String fcmExcessAvailableToReturn) { - this.fcmExcessAvailableToReturn = fcmExcessAvailableToReturn; + public Builder fcmExcessAvailableToReturn(String fcmExcessAvailableToReturn) { + this.fcmExcessAvailableToReturn = fcmExcessAvailableToReturn; + return this; } - 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); - } + 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 index 5fab1bf..531628b 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeRiskNettingInfo.java @@ -17,200 +17,216 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.CrossMarginPrimeXMPosition; -import com.coinbase.prime.model.PrimeXMMarginRequirementBreakdown; -import com.coinbase.prime.model.PrimeXMOffsetCreditBreakdown; + 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") + /** + * 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; - /** - * 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 Builder dcoMarginRequirement(String dcoMarginRequirement) { + this.dcoMarginRequirement = dcoMarginRequirement; + return this; } - public void setPortfolioMarginRequirement(String portfolioMarginRequirement) { - this.portfolioMarginRequirement = portfolioMarginRequirement; - } - public String getIntegratedPortfolioMarginRequirement() { - return integratedPortfolioMarginRequirement; + public Builder portfolioMarginRequirement(String portfolioMarginRequirement) { + this.portfolioMarginRequirement = portfolioMarginRequirement; + return this; } - public void setIntegratedPortfolioMarginRequirement(String integratedPortfolioMarginRequirement) { - this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; - } - public String getIneligibleFuturesMarginRequirement() { - return ineligibleFuturesMarginRequirement; + public Builder integratedPortfolioMarginRequirement( + String integratedPortfolioMarginRequirement) { + this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; + return this; } - public void setIneligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { - this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; - } - public PrimeXMMarginRequirementBreakdown getPmrBreakdown() { - return pmrBreakdown; + public Builder ineligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { + this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; + return this; } - public void setPmrBreakdown(PrimeXMMarginRequirementBreakdown pmrBreakdown) { - this.pmrBreakdown = pmrBreakdown; - } - public PrimeXMMarginRequirementBreakdown getIpmrBreakdown() { - return ipmrBreakdown; + public Builder pmrBreakdown(PrimeXMMarginRequirementBreakdown pmrBreakdown) { + this.pmrBreakdown = pmrBreakdown; + return this; } - public void setIpmrBreakdown(PrimeXMMarginRequirementBreakdown ipmrBreakdown) { - this.ipmrBreakdown = ipmrBreakdown; - } - public PrimeXMOffsetCreditBreakdown getPortfolioMarginOffsetCreditBreakdown() { - return portfolioMarginOffsetCreditBreakdown; + public Builder ipmrBreakdown(PrimeXMMarginRequirementBreakdown ipmrBreakdown) { + this.ipmrBreakdown = ipmrBreakdown; + return this; } - public void setPortfolioMarginOffsetCreditBreakdown(PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown) { - this.portfolioMarginOffsetCreditBreakdown = portfolioMarginOffsetCreditBreakdown; - } - public PrimeXMOffsetCreditBreakdown getIntegratedPortfolioMarginOffsetCreditBreakdown() { - return integratedPortfolioMarginOffsetCreditBreakdown; + public Builder portfolioMarginOffsetCreditBreakdown( + PrimeXMOffsetCreditBreakdown portfolioMarginOffsetCreditBreakdown) { + this.portfolioMarginOffsetCreditBreakdown = portfolioMarginOffsetCreditBreakdown; + return this; } - public void setIntegratedPortfolioMarginOffsetCreditBreakdown(PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown) { - this.integratedPortfolioMarginOffsetCreditBreakdown = integratedPortfolioMarginOffsetCreditBreakdown; - } - public List getXMPositions() { - return xmPositions; + public Builder integratedPortfolioMarginOffsetCreditBreakdown( + PrimeXMOffsetCreditBreakdown integratedPortfolioMarginOffsetCreditBreakdown) { + this.integratedPortfolioMarginOffsetCreditBreakdown = + integratedPortfolioMarginOffsetCreditBreakdown; + return this; } - public void setXMPositions(List xmPositions) { - this.xmPositions = xmPositions; + public Builder xmPositions(List xmPositions) { + this.xmPositions = xmPositions; + return this; } - 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); - } + 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 index d246142..f29a85e 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeSpotEquityBreakdown.java @@ -17,124 +17,119 @@ */ 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; + /** 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; + /** 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 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; + /** Short collateral component of spot equity. */ + @JsonProperty("short_collateral") + private String shortCollateral; - /** - * Pending transfers affecting spot equity. - */ - @JsonProperty("pending_transfers") - private String pendingTransfers; + /** Pending transfers affecting spot equity. */ + @JsonProperty("pending_transfers") + private String pendingTransfers; - public CrossMarginPrimeSpotEquityBreakdown() { - } + 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 CrossMarginPrimeSpotEquityBreakdown(Builder builder) { + this.cashBalance = builder.cashBalance; + this.longMarketValue = builder.longMarketValue; + this.shortMarketValue = builder.shortMarketValue; + this.shortCollateral = builder.shortCollateral; + this.pendingTransfers = builder.pendingTransfers; + } - public void setCashBalance(String cashBalance) { - this.cashBalance = cashBalance; - } - public String getLongMarketValue() { - return longMarketValue; - } + public String getCashBalance() { + return cashBalance; + } - public void setLongMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - } - public String getShortMarketValue() { - return shortMarketValue; - } + public void setCashBalance(String cashBalance) { + this.cashBalance = cashBalance; + } - public void setShortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - } - public String getShortCollateral() { - return shortCollateral; - } + public String getLongMarketValue() { + return longMarketValue; + } - public void setShortCollateral(String shortCollateral) { - this.shortCollateral = shortCollateral; - } - public String getPendingTransfers() { - return pendingTransfers; - } + public void setLongMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + } - public void setPendingTransfers(String pendingTransfers) { - this.pendingTransfers = pendingTransfers; - } - public static class Builder { - private String cashBalance; + public String getShortMarketValue() { + return shortMarketValue; + } - private String longMarketValue; + public void setShortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + } - private String shortMarketValue; + public String getShortCollateral() { + return shortCollateral; + } - private String shortCollateral; + public void setShortCollateral(String shortCollateral) { + this.shortCollateral = shortCollateral; + } - private String pendingTransfers; + public String getPendingTransfers() { + return pendingTransfers; + } - public Builder cashBalance(String cashBalance) { - this.cashBalance = cashBalance; - return this; - } + public void setPendingTransfers(String pendingTransfers) { + this.pendingTransfers = pendingTransfers; + } - public Builder longMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - return this; - } + public static class Builder { + private String cashBalance; - public Builder shortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - return this; - } + private String longMarketValue; - public Builder shortCollateral(String shortCollateral) { - this.shortCollateral = shortCollateral; - return this; - } + private String shortMarketValue; - public Builder pendingTransfers(String pendingTransfers) { - this.pendingTransfers = pendingTransfers; - return this; - } + private String shortCollateral; - public CrossMarginPrimeSpotEquityBreakdown build() { - return new CrossMarginPrimeSpotEquityBreakdown(this); - } + 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 index 9a8f9f0..6987007 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginPrimeXMPosition.java @@ -17,333 +17,321 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; -/** CrossMarginPrimeXMPosition is a single per-asset XM row (proto-backed fields from XMPositionDetails). */ +/** + * CrossMarginPrimeXMPosition is a single per-asset XM row (proto-backed fields from + * XMPositionDetails). + */ public class CrossMarginPrimeXMPosition { - /** - * Position currency - */ + /** 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; - /** - * 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 Builder currency(String currency) { + this.currency = currency; + return this; } - 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 Builder marketPrice(String marketPrice) { + this.marketPrice = marketPrice; + return this; } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getMarketPrice() { - return marketPrice; + public Builder spotBalance(String spotBalance) { + this.spotBalance = spotBalance; + return this; } - public void setMarketPrice(String marketPrice) { - this.marketPrice = marketPrice; - } - public String getSpotBalance() { - return spotBalance; + public Builder spotBalanceNotional(String spotBalanceNotional) { + this.spotBalanceNotional = spotBalanceNotional; + return this; } - public void setSpotBalance(String spotBalance) { - this.spotBalance = spotBalance; - } - public String getSpotBalanceNotional() { - return spotBalanceNotional; + public Builder futuresBalance(String futuresBalance) { + this.futuresBalance = futuresBalance; + return this; } - public void setSpotBalanceNotional(String spotBalanceNotional) { - this.spotBalanceNotional = spotBalanceNotional; - } - public String getFuturesBalance() { - return futuresBalance; + public Builder futuresBalanceNotional(String futuresBalanceNotional) { + this.futuresBalanceNotional = futuresBalanceNotional; + return this; } - public void setFuturesBalance(String futuresBalance) { - this.futuresBalance = futuresBalance; - } - public String getFuturesBalanceNotional() { - return futuresBalanceNotional; + public Builder baseRequirement(String baseRequirement) { + this.baseRequirement = baseRequirement; + return this; } - 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 Builder totalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + return this; } - public void setBasisCredit(String basisCredit) { - this.basisCredit = basisCredit; - } - public String getFuturesNettedNotional() { - return futuresNettedNotional; + public Builder basisCredit(String basisCredit) { + this.basisCredit = basisCredit; + return this; } - public void setFuturesNettedNotional(String futuresNettedNotional) { - this.futuresNettedNotional = futuresNettedNotional; - } - public String getFuturesNettingMargin() { - return futuresNettingMargin; + public Builder futuresNettedNotional(String futuresNettedNotional) { + this.futuresNettedNotional = futuresNettedNotional; + return this; } - public void setFuturesNettingMargin(String futuresNettingMargin) { - this.futuresNettingMargin = futuresNettingMargin; - } - public String getLongAmount() { - return longAmount; + public Builder futuresNettingMargin(String futuresNettingMargin) { + this.futuresNettingMargin = futuresNettingMargin; + return this; } - public void setLongAmount(String longAmount) { - this.longAmount = longAmount; - } - public String getShortAmount() { - return shortAmount; + public Builder longAmount(String longAmount) { + this.longAmount = longAmount; + return this; } - public void setShortAmount(String shortAmount) { - this.shortAmount = shortAmount; - } - public String getVolatilityAddon() { - return volatilityAddon; + public Builder shortAmount(String shortAmount) { + this.shortAmount = shortAmount; + return this; } - public void setVolatilityAddon(String volatilityAddon) { - this.volatilityAddon = volatilityAddon; - } - public String getLiquidityAddon() { - return liquidityAddon; + public Builder volatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + return this; } - public void setLiquidityAddon(String liquidityAddon) { - this.liquidityAddon = liquidityAddon; + public Builder liquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + return this; } - 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); - } + 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 2db20d5..6d73dde 100644 --- a/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java +++ b/src/main/java/com/coinbase/prime/model/CrossMarginRiskParameters.java @@ -17,271 +17,259 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** XM 2.0 risk parameters for an asset tier. */ public class CrossMarginRiskParameters { - /** - * Asset tier identifier. - */ - @JsonProperty("asset_tier") + /** Asset tier identifier. */ + @JsonProperty("asset_tier") + private String assetTier; + + /** Base ratio for long positions. */ + @JsonProperty("base_ratio_long") + private String baseRatioLong; + + /** Base ratio for short positions. */ + @JsonProperty("base_ratio_short") + private String baseRatioShort; + + /** Volatility rate for long positions. */ + @JsonProperty("volatility_rate_long") + private String volatilityRateLong; + + /** Volatility rate for short positions. */ + @JsonProperty("volatility_rate_short") + private String volatilityRateShort; + + /** Volatility low threshold. */ + @JsonProperty("volatility_low_threshold") + private String volatilityLowThreshold; + + /** Volatility high threshold. */ + @JsonProperty("volatility_high_threshold") + private String volatilityHighThreshold; + + /** Liquidity A for long positions. */ + @JsonProperty("liquidity_a_long") + private String liquidityALong; + + /** Liquidity A for short positions. */ + @JsonProperty("liquidity_a_short") + private String liquidityAShort; + + /** Liquidity B for short positions. */ + @JsonProperty("liquidity_b_short") + private String liquidityBShort; + + /** Liquidity threshold. */ + @JsonProperty("liquidity_threshold") + private String liquidityThreshold; + + /** Basis offset credit rate. */ + @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; + } + + public void setAssetTier(String assetTier) { + this.assetTier = assetTier; + } + + public String getBaseRatioLong() { + return baseRatioLong; + } + + public void setBaseRatioLong(String baseRatioLong) { + this.baseRatioLong = baseRatioLong; + } + + public String getBaseRatioShort() { + return baseRatioShort; + } + + public void setBaseRatioShort(String baseRatioShort) { + this.baseRatioShort = baseRatioShort; + } + + public String getVolatilityRateLong() { + return volatilityRateLong; + } + + public void setVolatilityRateLong(String volatilityRateLong) { + this.volatilityRateLong = volatilityRateLong; + } + + public String getVolatilityRateShort() { + return volatilityRateShort; + } + + public void setVolatilityRateShort(String volatilityRateShort) { + this.volatilityRateShort = volatilityRateShort; + } + + public String getVolatilityLowThreshold() { + return volatilityLowThreshold; + } + + public void setVolatilityLowThreshold(String volatilityLowThreshold) { + this.volatilityLowThreshold = volatilityLowThreshold; + } + + public String getVolatilityHighThreshold() { + return volatilityHighThreshold; + } + + public void setVolatilityHighThreshold(String volatilityHighThreshold) { + this.volatilityHighThreshold = volatilityHighThreshold; + } + + public String getLiquidityALong() { + return liquidityALong; + } + + public void setLiquidityALong(String liquidityALong) { + this.liquidityALong = liquidityALong; + } + + public String getLiquidityAShort() { + return liquidityAShort; + } + + public void setLiquidityAShort(String liquidityAShort) { + this.liquidityAShort = liquidityAShort; + } + + public String getLiquidityBShort() { + return liquidityBShort; + } + + public void setLiquidityBShort(String liquidityBShort) { + this.liquidityBShort = liquidityBShort; + } + + public String getLiquidityThreshold() { + return liquidityThreshold; + } + + public void setLiquidityThreshold(String liquidityThreshold) { + this.liquidityThreshold = liquidityThreshold; + } + + public String getBasisOffsetCreditRate() { + return basisOffsetCreditRate; + } + + public void setBasisOffsetCreditRate(String basisOffsetCreditRate) { + this.basisOffsetCreditRate = basisOffsetCreditRate; + } + + public static class Builder { private String assetTier; - /** - * Base ratio for long positions. - */ - @JsonProperty("base_ratio_long") private String baseRatioLong; - /** - * Base ratio for short positions. - */ - @JsonProperty("base_ratio_short") private String baseRatioShort; - /** - * Volatility rate for long positions. - */ - @JsonProperty("volatility_rate_long") private String volatilityRateLong; - /** - * Volatility rate for short positions. - */ - @JsonProperty("volatility_rate_short") private String volatilityRateShort; - /** - * Volatility low threshold. - */ - @JsonProperty("volatility_low_threshold") private String volatilityLowThreshold; - /** - * Volatility high threshold. - */ - @JsonProperty("volatility_high_threshold") private String volatilityHighThreshold; - /** - * Liquidity A for long positions. - */ - @JsonProperty("liquidity_a_long") private String liquidityALong; - /** - * Liquidity A for short positions. - */ - @JsonProperty("liquidity_a_short") private String liquidityAShort; - /** - * Liquidity B for short positions. - */ - @JsonProperty("liquidity_b_short") private String liquidityBShort; - /** - * Liquidity threshold. - */ - @JsonProperty("liquidity_threshold") private String liquidityThreshold; - /** - * Basis offset credit rate. - */ - @JsonProperty("basis_offset_credit_rate") private String basisOffsetCreditRate; - public CrossMarginRiskParameters() { + public Builder assetTier(String assetTier) { + this.assetTier = assetTier; + return this; } - 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; + public Builder baseRatioLong(String baseRatioLong) { + this.baseRatioLong = baseRatioLong; + return this; } - public void setAssetTier(String assetTier) { - this.assetTier = assetTier; - } - public String getBaseRatioLong() { - return baseRatioLong; + public Builder baseRatioShort(String baseRatioShort) { + this.baseRatioShort = baseRatioShort; + return this; } - public void setBaseRatioLong(String baseRatioLong) { - this.baseRatioLong = baseRatioLong; - } - public String getBaseRatioShort() { - return baseRatioShort; + public Builder volatilityRateLong(String volatilityRateLong) { + this.volatilityRateLong = volatilityRateLong; + return this; } - public void setBaseRatioShort(String baseRatioShort) { - this.baseRatioShort = baseRatioShort; - } - public String getVolatilityRateLong() { - return volatilityRateLong; + public Builder volatilityRateShort(String volatilityRateShort) { + this.volatilityRateShort = volatilityRateShort; + return this; } - public void setVolatilityRateLong(String volatilityRateLong) { - this.volatilityRateLong = volatilityRateLong; - } - public String getVolatilityRateShort() { - return volatilityRateShort; + public Builder volatilityLowThreshold(String volatilityLowThreshold) { + this.volatilityLowThreshold = volatilityLowThreshold; + return this; } - public void setVolatilityRateShort(String volatilityRateShort) { - this.volatilityRateShort = volatilityRateShort; - } - public String getVolatilityLowThreshold() { - return volatilityLowThreshold; + public Builder volatilityHighThreshold(String volatilityHighThreshold) { + this.volatilityHighThreshold = volatilityHighThreshold; + return this; } - public void setVolatilityLowThreshold(String volatilityLowThreshold) { - this.volatilityLowThreshold = volatilityLowThreshold; - } - public String getVolatilityHighThreshold() { - return volatilityHighThreshold; + public Builder liquidityALong(String liquidityALong) { + this.liquidityALong = liquidityALong; + return this; } - public void setVolatilityHighThreshold(String volatilityHighThreshold) { - this.volatilityHighThreshold = volatilityHighThreshold; - } - public String getLiquidityALong() { - return liquidityALong; + public Builder liquidityAShort(String liquidityAShort) { + this.liquidityAShort = liquidityAShort; + return this; } - public void setLiquidityALong(String liquidityALong) { - this.liquidityALong = liquidityALong; - } - public String getLiquidityAShort() { - return liquidityAShort; + public Builder liquidityBShort(String liquidityBShort) { + this.liquidityBShort = liquidityBShort; + return this; } - public void setLiquidityAShort(String liquidityAShort) { - this.liquidityAShort = liquidityAShort; - } - public String getLiquidityBShort() { - return liquidityBShort; - } - - public void setLiquidityBShort(String liquidityBShort) { - this.liquidityBShort = liquidityBShort; - } - public String getLiquidityThreshold() { - return liquidityThreshold; - } - - public void setLiquidityThreshold(String liquidityThreshold) { - this.liquidityThreshold = liquidityThreshold; - } - public String getBasisOffsetCreditRate() { - return basisOffsetCreditRate; + public Builder liquidityThreshold(String liquidityThreshold) { + this.liquidityThreshold = liquidityThreshold; + return this; } - public void setBasisOffsetCreditRate(String basisOffsetCreditRate) { - this.basisOffsetCreditRate = basisOffsetCreditRate; + public Builder basisOffsetCreditRate(String basisOffsetCreditRate) { + this.basisOffsetCreditRate = basisOffsetCreditRate; + return this; } - 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); - } + 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 index e287b4b..de3469a 100644 --- a/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java +++ b/src/main/java/com/coinbase/prime/model/CustomStablecoinRewardDetails.java @@ -17,61 +17,59 @@ */ 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 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; + /** 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() {} - public CustomStablecoinRewardDetails(Builder builder) { - this.startDate = builder.startDate; - this.endDate = builder.endDate; - } - public String getStartDate() { - return startDate; - } + public CustomStablecoinRewardDetails(Builder builder) { + this.startDate = builder.startDate; + this.endDate = builder.endDate; + } - public void setStartDate(String startDate) { - this.startDate = startDate; - } - public String getEndDate() { - return endDate; - } + public String getStartDate() { + return startDate; + } - public void setEndDate(String endDate) { - this.endDate = endDate; - } - public static class Builder { - private String startDate; + public void setStartDate(String startDate) { + this.startDate = startDate; + } - private String endDate; + public String getEndDate() { + return endDate; + } - public Builder startDate(String startDate) { - this.startDate = startDate; - return this; - } + public void setEndDate(String endDate) { + this.endDate = endDate; + } - public Builder endDate(String endDate) { - this.endDate = endDate; - return this; - } + public static class Builder { + private String startDate; + + private String endDate; - public CustomStablecoinRewardDetails build() { - return new CustomStablecoinRewardDetails(this); - } + 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 c3da2d5..9b65542 100644 --- a/src/main/java/com/coinbase/prime/model/DateOfBirth.java +++ b/src/main/java/com/coinbase/prime/model/DateOfBirth.java @@ -19,75 +19,74 @@ package com.coinbase.prime.model; public class DateOfBirth { - /** - * Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. - */ - private int year; + /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a 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 int month; + /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */ + 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 int 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 int day; - public DateOfBirth() { - } + public DateOfBirth() {} - public DateOfBirth(Builder builder) { - this.year = builder.year; - this.month = builder.month; - this.day = builder.day; - } - public int getYear() { - return year; - } + public DateOfBirth(Builder builder) { + this.year = builder.year; + this.month = builder.month; + this.day = builder.day; + } - public void setYear(int year) { - this.year = year; - } - public int getMonth() { - return month; - } + public int getYear() { + return year; + } - public void setMonth(int month) { - this.month = month; - } - public int getDay() { - return day; - } + public void setYear(int year) { + this.year = year; + } - public void setDay(int day) { - this.day = day; - } - public static class Builder { - private int year; + public int getMonth() { + return month; + } - private int month; + public void setMonth(int month) { + this.month = month; + } - private int day; + public int getDay() { + return day; + } - public Builder year(int year) { - this.year = year; - return this; - } + public void setDay(int day) { + this.day = day; + } - public Builder month(int month) { - this.month = month; - return this; - } + public static class Builder { + private int year; + + private int month; - public Builder day(int day) { - this.day = day; - return this; - } + private int day; - public DateOfBirth build() { - return new DateOfBirth(this); - } + public Builder year(int year) { + this.year = year; + return this; } -} + public Builder month(int month) { + this.month = month; + return this; + } + + public Builder day(int day) { + this.day = day; + return this; + } + + public DateOfBirth build() { + return new DateOfBirth(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/DefiBalance.java b/src/main/java/com/coinbase/prime/model/DefiBalance.java index c4baeb7..bc53f3d 100644 --- a/src/main/java/com/coinbase/prime/model/DefiBalance.java +++ b/src/main/java/com/coinbase/prime/model/DefiBalance.java @@ -17,73 +17,76 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class DefiBalance { - /** Network this asset is on (ie "ethereum-mainnet") */ - private String network; + /** Network this asset is on (ie "ethereum-mainnet") */ + private String network; - /** a set of rules and standards that define how data is exchanged (ie "Aave V4 ") */ - private String protocol; + /** a set of rules and standards that define how data is exchanged (ie "Aave V4 ") */ + private String protocol; - /** Total USD value */ - @JsonProperty("net_usd_value") - private String netUsdValue; + /** Total USD value */ + @JsonProperty("net_usd_value") + private String netUsdValue; - public DefiBalance() { - } + public DefiBalance() {} - public DefiBalance(Builder builder) { - this.network = builder.network; - this.protocol = builder.protocol; - this.netUsdValue = builder.netUsdValue; - } - public String getNetwork() { - return network; - } + public DefiBalance(Builder builder) { + this.network = builder.network; + this.protocol = builder.protocol; + this.netUsdValue = builder.netUsdValue; + } - public void setNetwork(String network) { - this.network = network; - } - public String getProtocol() { - return protocol; - } + public String getNetwork() { + return network; + } - public void setProtocol(String protocol) { - this.protocol = protocol; - } - public String getNetUsdValue() { - return netUsdValue; - } + public void setNetwork(String network) { + this.network = network; + } - public void setNetUsdValue(String netUsdValue) { - this.netUsdValue = netUsdValue; - } - public static class Builder { - private String network; + public String getProtocol() { + return protocol; + } - private String protocol; + public void setProtocol(String protocol) { + this.protocol = protocol; + } - private String netUsdValue; + public String getNetUsdValue() { + return netUsdValue; + } - public Builder network(String network) { - this.network = network; - return this; - } + public void setNetUsdValue(String netUsdValue) { + this.netUsdValue = netUsdValue; + } - public Builder protocol(String protocol) { - this.protocol = protocol; - return this; - } + public static class Builder { + private String network; + + private String protocol; - public Builder netUsdValue(String netUsdValue) { - this.netUsdValue = netUsdValue; - return this; - } + private String netUsdValue; - public DefiBalance build() { - return new DefiBalance(this); - } + public Builder network(String network) { + this.network = network; + return this; } -} + public Builder protocol(String protocol) { + this.protocol = protocol; + return this; + } + + public Builder netUsdValue(String netUsdValue) { + this.netUsdValue = netUsdValue; + return this; + } + + public DefiBalance build() { + return new DefiBalance(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java index 11eacdc..59fc803 100644 --- a/src/main/java/com/coinbase/prime/model/DestinationAlloc.java +++ b/src/main/java/com/coinbase/prime/model/DestinationAlloc.java @@ -17,123 +17,121 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class DestinationAlloc { - /** - * The ID unique to each leg of an allocation. - */ - @JsonProperty("leg_id") + /** The ID unique to each leg of an allocation. */ + @JsonProperty("leg_id") + private String legId; + + /** Portfolio ID of the source portfolio. */ + @JsonProperty("portfolio_id") + private String portfolioId; + + /** Amount allocated in base asset units. */ + @JsonProperty("allocation_base") + private String allocationBase; + + /** Amount allocated in quote asset units. */ + @JsonProperty("allocation_quote") + private String allocationQuote; + + /** + * Pro rata fees for each leg. Adding up the fees for each leg will sum up to equal the total + * allocation level fees. + */ + @JsonProperty("fees_allocated_leg") + private String feesAllocatedLeg; + + public DestinationAlloc() {} + + public DestinationAlloc(Builder builder) { + this.legId = builder.legId; + this.portfolioId = builder.portfolioId; + this.allocationBase = builder.allocationBase; + this.allocationQuote = builder.allocationQuote; + this.feesAllocatedLeg = builder.feesAllocatedLeg; + } + + public String getLegId() { + return legId; + } + + public void setLegId(String legId) { + this.legId = legId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getAllocationBase() { + return allocationBase; + } + + public void setAllocationBase(String allocationBase) { + this.allocationBase = allocationBase; + } + + public String getAllocationQuote() { + return allocationQuote; + } + + public void setAllocationQuote(String allocationQuote) { + this.allocationQuote = allocationQuote; + } + + public String getFeesAllocatedLeg() { + return feesAllocatedLeg; + } + + public void setFeesAllocatedLeg(String feesAllocatedLeg) { + this.feesAllocatedLeg = feesAllocatedLeg; + } + + public static class Builder { private String legId; - /** - * Portfolio ID of the source portfolio. - */ - @JsonProperty("portfolio_id") private String portfolioId; - /** - * Amount allocated in base asset units. - */ - @JsonProperty("allocation_base") private String allocationBase; - /** - * Amount allocated in quote asset units. - */ - @JsonProperty("allocation_quote") private String allocationQuote; - /** - * Pro rata fees for each leg. Adding up the fees for each leg will sum up to equal the total allocation level fees. - */ - @JsonProperty("fees_allocated_leg") private String feesAllocatedLeg; - public DestinationAlloc() { - } - - public DestinationAlloc(Builder builder) { - this.legId = builder.legId; - this.portfolioId = builder.portfolioId; - this.allocationBase = builder.allocationBase; - this.allocationQuote = builder.allocationQuote; - this.feesAllocatedLeg = builder.feesAllocatedLeg; - } - public String getLegId() { - return legId; - } - - public void setLegId(String legId) { - this.legId = legId; - } - public String getPortfolioId() { - return portfolioId; + public Builder legId(String legId) { + this.legId = legId; + return this; } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getAllocationBase() { - return allocationBase; + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; } - public void setAllocationBase(String allocationBase) { - this.allocationBase = allocationBase; - } - public String getAllocationQuote() { - return allocationQuote; + public Builder allocationBase(String allocationBase) { + this.allocationBase = allocationBase; + return this; } - public void setAllocationQuote(String allocationQuote) { - this.allocationQuote = allocationQuote; - } - public String getFeesAllocatedLeg() { - return feesAllocatedLeg; + public Builder allocationQuote(String allocationQuote) { + this.allocationQuote = allocationQuote; + return this; } - public void setFeesAllocatedLeg(String feesAllocatedLeg) { - this.feesAllocatedLeg = feesAllocatedLeg; + public Builder feesAllocatedLeg(String feesAllocatedLeg) { + this.feesAllocatedLeg = feesAllocatedLeg; + return this; } - public static class Builder { - private String legId; - private String portfolioId; - - private String allocationBase; - - private String allocationQuote; - - private String feesAllocatedLeg; - - public Builder legId(String legId) { - this.legId = legId; - return this; - } - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder allocationBase(String allocationBase) { - this.allocationBase = allocationBase; - return this; - } - - public Builder allocationQuote(String allocationQuote) { - this.allocationQuote = allocationQuote; - return this; - } - - public Builder feesAllocatedLeg(String feesAllocatedLeg) { - this.feesAllocatedLeg = feesAllocatedLeg; - return this; - } - - public DestinationAlloc build() { - return new DestinationAlloc(this); - } + public DestinationAlloc build() { + return new DestinationAlloc(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/DetailedAddress.java b/src/main/java/com/coinbase/prime/model/DetailedAddress.java index 6ef150b..9627d47 100644 --- a/src/main/java/com/coinbase/prime/model/DetailedAddress.java +++ b/src/main/java/com/coinbase/prime/model/DetailedAddress.java @@ -17,150 +17,157 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** Detailed address information */ public class DetailedAddress { - /** Primary address line */ - @JsonProperty("address_1") - private String address1; + /** Primary address line */ + @JsonProperty("address_1") + private String address1; - /** Secondary address line (optional) */ - @JsonProperty("address_2") - private String address2; + /** Secondary address line (optional) */ + @JsonProperty("address_2") + private String address2; - /** Tertiary address line (optional) */ - @JsonProperty("address_3") - private String address3; + /** Tertiary address line (optional) */ + @JsonProperty("address_3") + private String address3; - /** City name */ - private String city; + /** City name */ + private String city; - /** State or province */ - private String state; + /** State or province */ + private String state; - /** ISO 3166-1 alpha-2 country code */ - @JsonProperty("country_code") - private String countryCode; + /** ISO 3166-1 alpha-2 country code */ + @JsonProperty("country_code") + private String countryCode; - /** Postal/ZIP code */ - @JsonProperty("postal_code") - private String postalCode; + /** Postal/ZIP code */ + @JsonProperty("postal_code") + private String postalCode; - public DetailedAddress() { - } + public DetailedAddress() {} - public DetailedAddress(Builder builder) { - this.address1 = builder.address1; - this.address2 = builder.address2; - this.address3 = builder.address3; - this.city = builder.city; - this.state = builder.state; - this.countryCode = builder.countryCode; - this.postalCode = builder.postalCode; - } - public String getAddress1() { - return address1; - } + public DetailedAddress(Builder builder) { + this.address1 = builder.address1; + this.address2 = builder.address2; + this.address3 = builder.address3; + this.city = builder.city; + this.state = builder.state; + this.countryCode = builder.countryCode; + this.postalCode = builder.postalCode; + } - public void setAddress1(String address1) { - this.address1 = address1; - } - public String getAddress2() { - return address2; - } + public String getAddress1() { + return address1; + } - public void setAddress2(String address2) { - this.address2 = address2; - } - public String getAddress3() { - return address3; - } + public void setAddress1(String address1) { + this.address1 = address1; + } - public void setAddress3(String address3) { - this.address3 = address3; - } - public String getCity() { - return city; - } + public String getAddress2() { + return address2; + } - public void setCity(String city) { - this.city = city; - } - public String getState() { - return state; - } + public void setAddress2(String address2) { + this.address2 = address2; + } - public void setState(String state) { - this.state = state; - } - public String getCountryCode() { - return countryCode; - } + public String getAddress3() { + return address3; + } - public void setCountryCode(String countryCode) { - this.countryCode = countryCode; - } - public String getPostalCode() { - return postalCode; - } + public void setAddress3(String address3) { + this.address3 = address3; + } - public void setPostalCode(String postalCode) { - this.postalCode = postalCode; - } - public static class Builder { - private String address1; + public String getCity() { + return city; + } - private String address2; + public void setCity(String city) { + this.city = city; + } - private String address3; + public String getState() { + return state; + } - private String city; + public void setState(String state) { + this.state = state; + } - private String state; + public String getCountryCode() { + return countryCode; + } - private String countryCode; + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } - private String postalCode; + public String getPostalCode() { + return postalCode; + } - public Builder address1(String address1) { - this.address1 = address1; - return this; - } + public void setPostalCode(String postalCode) { + this.postalCode = postalCode; + } - public Builder address2(String address2) { - this.address2 = address2; - return this; - } + public static class Builder { + private String address1; + + private String address2; - public Builder address3(String address3) { - this.address3 = address3; - return this; - } + private String address3; + + private String city; - public Builder city(String city) { - this.city = city; - return this; - } + private String state; - public Builder state(String state) { - this.state = state; - return this; - } + private String countryCode; - public Builder countryCode(String countryCode) { - this.countryCode = countryCode; - return this; - } + private String postalCode; - public Builder postalCode(String postalCode) { - this.postalCode = postalCode; - return this; - } + public Builder address1(String address1) { + this.address1 = address1; + return this; + } - public DetailedAddress build() { - return new DetailedAddress(this); - } + public Builder address2(String address2) { + this.address2 = address2; + return this; } -} + public Builder address3(String address3) { + this.address3 = address3; + return this; + } + + public Builder city(String city) { + this.city = city; + return this; + } + + public Builder state(String state) { + this.state = state; + return this; + } + + public Builder countryCode(String countryCode) { + this.countryCode = countryCode; + return this; + } + + public Builder postalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + public DetailedAddress build() { + return new DetailedAddress(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/DisplayUser.java b/src/main/java/com/coinbase/prime/model/DisplayUser.java index d2fb74f..db14b2d 100644 --- a/src/main/java/com/coinbase/prime/model/DisplayUser.java +++ b/src/main/java/com/coinbase/prime/model/DisplayUser.java @@ -17,79 +17,76 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class DisplayUser { - /** - * User UUID - */ - private String id; + /** User UUID */ + private String id; - /** - * User full name - */ - private String name; + /** User full name */ + private String name; - /** - * User avatar URL - */ - @JsonProperty("avatar_url") - private String avatarUrl; + /** User avatar URL */ + @JsonProperty("avatar_url") + private String avatarUrl; - public DisplayUser() { - } + public DisplayUser() {} - public DisplayUser(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.avatarUrl = builder.avatarUrl; - } - public String getId() { - return id; - } + public DisplayUser(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.avatarUrl = builder.avatarUrl; + } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } + public String getId() { + return id; + } - public void setName(String name) { - this.name = name; - } - public String getAvatarUrl() { - return avatarUrl; - } + public void setId(String id) { + this.id = id; + } - public void setAvatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - } - public static class Builder { - private String id; + public String getName() { + return name; + } - private String name; + public void setName(String name) { + this.name = name; + } - private String avatarUrl; + public String getAvatarUrl() { + return avatarUrl; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl; + } - public Builder name(String name) { - this.name = name; - return this; - } + public static class Builder { + private String id; + + private String name; - public Builder avatarUrl(String avatarUrl) { - this.avatarUrl = avatarUrl; - return this; - } + private String avatarUrl; - public DisplayUser build() { - return new DisplayUser(this); - } + public Builder id(String id) { + this.id = id; + return this; } -} + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder avatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl; + return this; + } + + public DisplayUser build() { + return new DisplayUser(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/EntityBalance.java b/src/main/java/com/coinbase/prime/model/EntityBalance.java index ceb692a..ad0fd08 100644 --- a/src/main/java/com/coinbase/prime/model/EntityBalance.java +++ b/src/main/java/com/coinbase/prime/model/EntityBalance.java @@ -17,122 +17,117 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class EntityBalance { - /** - * The display symbol for the asset - */ - private String symbol; + /** The display symbol for the asset */ + private String symbol; - /** - * The long balance - */ - @JsonProperty("long_amount") - private String longAmount; + /** The long balance */ + @JsonProperty("long_amount") + private String longAmount; - /** - * The long balance in notional value - */ - @JsonProperty("long_notional") - private String longNotional; + /** The long balance in notional value */ + @JsonProperty("long_notional") + private String longNotional; - /** - * The short balance - */ - @JsonProperty("short_amount") - private String shortAmount; + /** The short balance */ + @JsonProperty("short_amount") + private String shortAmount; - /** - * The short balance in notional value - */ - @JsonProperty("short_notional") - private String shortNotional; + /** The short balance in notional value */ + @JsonProperty("short_notional") + private String shortNotional; - public EntityBalance() { - } + public EntityBalance() {} - public EntityBalance(Builder builder) { - this.symbol = builder.symbol; - this.longAmount = builder.longAmount; - this.longNotional = builder.longNotional; - this.shortAmount = builder.shortAmount; - this.shortNotional = builder.shortNotional; - } - public String getSymbol() { - return symbol; - } + public EntityBalance(Builder builder) { + this.symbol = builder.symbol; + this.longAmount = builder.longAmount; + this.longNotional = builder.longNotional; + this.shortAmount = builder.shortAmount; + this.shortNotional = builder.shortNotional; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getLongAmount() { - return longAmount; - } + public String getSymbol() { + return symbol; + } - public void setLongAmount(String longAmount) { - this.longAmount = longAmount; - } - public String getLongNotional() { - return longNotional; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setLongNotional(String longNotional) { - this.longNotional = longNotional; - } - public String getShortAmount() { - return shortAmount; - } + public String getLongAmount() { + return longAmount; + } - public void setShortAmount(String shortAmount) { - this.shortAmount = shortAmount; - } - public String getShortNotional() { - return shortNotional; - } + public void setLongAmount(String longAmount) { + this.longAmount = longAmount; + } - public void setShortNotional(String shortNotional) { - this.shortNotional = shortNotional; - } - public static class Builder { - private String symbol; + public String getLongNotional() { + return longNotional; + } - private String longAmount; + public void setLongNotional(String longNotional) { + this.longNotional = longNotional; + } - private String longNotional; + public String getShortAmount() { + return shortAmount; + } - private String shortAmount; + public void setShortAmount(String shortAmount) { + this.shortAmount = shortAmount; + } - private String shortNotional; + public String getShortNotional() { + return shortNotional; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setShortNotional(String shortNotional) { + this.shortNotional = shortNotional; + } - public Builder longAmount(String longAmount) { - this.longAmount = longAmount; - return this; - } + public static class Builder { + private String symbol; - public Builder longNotional(String longNotional) { - this.longNotional = longNotional; - return this; - } + private String longAmount; - public Builder shortAmount(String shortAmount) { - this.shortAmount = shortAmount; - return this; - } + private String longNotional; - public Builder shortNotional(String shortNotional) { - this.shortNotional = shortNotional; - return this; - } + private String shortAmount; - public EntityBalance build() { - return new EntityBalance(this); - } + private String shortNotional; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder longAmount(String longAmount) { + this.longAmount = longAmount; + return this; } -} + public Builder longNotional(String longNotional) { + this.longNotional = longNotional; + return this; + } + + public Builder shortAmount(String shortAmount) { + this.shortAmount = shortAmount; + return this; + } + + public Builder shortNotional(String shortNotional) { + this.shortNotional = shortNotional; + return this; + } + + public EntityBalance build() { + return new EntityBalance(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/EntityUser.java b/src/main/java/com/coinbase/prime/model/EntityUser.java index c6422d8..2e97ec7 100644 --- a/src/main/java/com/coinbase/prime/model/EntityUser.java +++ b/src/main/java/com/coinbase/prime/model/EntityUser.java @@ -17,174 +17,161 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.SecondaryPermission; import com.coinbase.prime.model.enums.UserRole; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class EntityUser { - /** - * The unique ID of the user - */ + /** The unique ID of the user */ + private String id; + + /** The name of the user */ + private String name; + + /** The email of the user */ + private String email; + + /** The entity to which this user and associated permissions are identified */ + @JsonProperty("entity_id") + private String entityId; + + /** + * - USER_ROLE_UNKNOWN: nil value - AUDITOR: An auditor - SIGNATORY: A signatory - ADMIN: An admin + * - INITIATOR: An initiator - REVIEWER: A reviewer - TRADER: A trader - FULL_TRADER: A trader + * with full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A + * tax manager - BUSINESS_MANAGER: A business manager + */ + private UserRole role; + + /** All primary roles assigned to the user. */ + private List roles; + + /** All secondary permissions assigned to the user. */ + @JsonProperty("secondary_permissions") + private List secondaryPermissions; + + public EntityUser() {} + + public EntityUser(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.email = builder.email; + this.entityId = builder.entityId; + this.role = builder.role; + this.roles = builder.roles; + this.secondaryPermissions = builder.secondaryPermissions; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public UserRole getRole() { + return role; + } + + public void setRole(UserRole role) { + this.role = role; + } + + public List getRoles() { + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + + public List getSecondaryPermissions() { + return secondaryPermissions; + } + + public void setSecondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + } + + public static class Builder { private String id; - /** - * The name of the user - */ private String name; - /** - * The email of the user - */ private String email; - /** - * The entity to which this user and associated permissions are identified - */ - @JsonProperty("entity_id") private String entityId; - /** - * - USER_ROLE_UNKNOWN: nil value - * - AUDITOR: An auditor - * - SIGNATORY: A signatory - * - ADMIN: An admin - * - INITIATOR: An initiator - * - REVIEWER: A reviewer - * - TRADER: A trader - * - FULL_TRADER: A trader with full permissions - * - TEAM_MANAGER: A team manager - * - APPROVER: An approver - * - TAX_MANAGER: A tax manager - * - BUSINESS_MANAGER: A business manager - */ private UserRole role; - /** - * All primary roles assigned to the user. - */ private List roles; - /** - * All secondary permissions assigned to the user. - */ - @JsonProperty("secondary_permissions") private List secondaryPermissions; - public EntityUser() { + public Builder id(String id) { + this.id = id; + return this; } - public EntityUser(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.email = builder.email; - this.entityId = builder.entityId; - this.role = builder.role; - this.roles = builder.roles; - this.secondaryPermissions = builder.secondaryPermissions; - } - public String getId() { - return id; + public Builder name(String name) { + this.name = name; + return this; } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; + public Builder email(String email) { + this.email = email; + return this; } - public void setName(String name) { - this.name = name; - } - public String getEmail() { - return email; + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; } - public void setEmail(String email) { - this.email = email; - } - public String getEntityId() { - return entityId; + public Builder role(UserRole role) { + this.role = role; + return this; } - public void setEntityId(String entityId) { - this.entityId = entityId; - } - public UserRole getRole() { - return role; + public Builder roles(List roles) { + this.roles = roles; + return this; } - public void setRole(UserRole role) { - this.role = role; - } - public List getRoles() { - return roles; + public Builder secondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + return this; } - public void setRoles(List roles) { - this.roles = roles; - } - public List getSecondaryPermissions() { - return secondaryPermissions; - } - - public void setSecondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - } - public static class Builder { - private String id; - - private String name; - - private String email; - - private String entityId; - - private UserRole role; - - private List roles; - - private List secondaryPermissions; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder email(String email) { - this.email = email; - return this; - } - - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } - - public Builder role(UserRole role) { - this.role = role; - return this; - } - - public Builder roles(List roles) { - this.roles = roles; - return this; - } - - public Builder secondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - return this; - } - - public EntityUser build() { - return new EntityUser(this); - } + public EntityUser build() { + return new EntityUser(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java b/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java index fbef7ea..cff61ee 100644 --- a/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java +++ b/src/main/java/com/coinbase/prime/model/EstimatedNetworkFees.java @@ -17,60 +17,58 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class EstimatedNetworkFees { - /** - * Estimated lower bound for networks fees (in whole units) - */ - @JsonProperty("lower_bound") - private String lowerBound; + /** Estimated lower bound for networks fees (in whole units) */ + @JsonProperty("lower_bound") + private String lowerBound; - /** - * Estimated upper bound for network fees (in whole units) - */ - @JsonProperty("upper_bound") - private String upperBound; + /** Estimated upper bound for network fees (in whole units) */ + @JsonProperty("upper_bound") + private String upperBound; - public EstimatedNetworkFees() { - } + public EstimatedNetworkFees() {} - public EstimatedNetworkFees(Builder builder) { - this.lowerBound = builder.lowerBound; - this.upperBound = builder.upperBound; - } - public String getLowerBound() { - return lowerBound; - } + public EstimatedNetworkFees(Builder builder) { + this.lowerBound = builder.lowerBound; + this.upperBound = builder.upperBound; + } - public void setLowerBound(String lowerBound) { - this.lowerBound = lowerBound; - } - public String getUpperBound() { - return upperBound; - } + public String getLowerBound() { + return lowerBound; + } - public void setUpperBound(String upperBound) { - this.upperBound = upperBound; - } - public static class Builder { - private String lowerBound; + public void setLowerBound(String lowerBound) { + this.lowerBound = lowerBound; + } - private String upperBound; + public String getUpperBound() { + return upperBound; + } - public Builder lowerBound(String lowerBound) { - this.lowerBound = lowerBound; - return this; - } + public void setUpperBound(String upperBound) { + this.upperBound = upperBound; + } - public Builder upperBound(String upperBound) { - this.upperBound = upperBound; - return this; - } + public static class Builder { + private String lowerBound; + + private String upperBound; - public EstimatedNetworkFees build() { - return new EstimatedNetworkFees(this); - } + public Builder lowerBound(String lowerBound) { + this.lowerBound = lowerBound; + return this; } -} + public Builder upperBound(String upperBound) { + this.upperBound = upperBound; + return this; + } + + public EstimatedNetworkFees build() { + return new EstimatedNetworkFees(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/EvmParams.java b/src/main/java/com/coinbase/prime/model/EvmParams.java index 486270e..de7c401 100644 --- a/src/main/java/com/coinbase/prime/model/EvmParams.java +++ b/src/main/java/com/coinbase/prime/model/EvmParams.java @@ -17,123 +17,129 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class EvmParams { - /** - * Option to disable dynamic gas price adjustment for EVM transactions prior to signing and broadcast. Defaults to false. - */ - @JsonProperty("disable_dynamic_gas") + /** + * Option to disable dynamic gas price adjustment for EVM transactions prior to signing and + * broadcast. Defaults to false. + */ + @JsonProperty("disable_dynamic_gas") + private boolean disableDynamicGas; + + /** Option to disable dynamic nonce when creating a transaction. Defaults to false. */ + @JsonProperty("disable_dynamic_nonce") + private boolean disableDynamicNonce; + + /** + * Transaction ID to replace (for speed-up/cancel operations). Common use cases: 1) Gas Price + * Adjustments: When a transaction is stuck due to low gas price, a new transaction with the same + * nonce but higher gas price can be submitted to replace it. 2) Transaction Cancellation: A user + * might want to cancel a pending transaction by replacing it with a new transaction (often a + * 0-value transfer to themselves with higher gas price). Note: When using this field, the + * disable_dynamic_nonce option must be set to false because the nonce would be automatically + * managed by the system. + */ + @JsonProperty("replaced_transaction_id") + private String replacedTransactionId; + + /** Chain ID for EVM transactions. (EVM-only) */ + @JsonProperty("chain_id") + private String chainId; + + /** Network name for EVM transactions. (EVM-only) */ + @JsonProperty("network_name") + private String networkName; + + public EvmParams() {} + + public EvmParams(Builder builder) { + this.disableDynamicGas = builder.disableDynamicGas; + this.disableDynamicNonce = builder.disableDynamicNonce; + this.replacedTransactionId = builder.replacedTransactionId; + this.chainId = builder.chainId; + this.networkName = builder.networkName; + } + + public boolean getDisableDynamicGas() { + return disableDynamicGas; + } + + public void setDisableDynamicGas(boolean disableDynamicGas) { + this.disableDynamicGas = disableDynamicGas; + } + + public boolean getDisableDynamicNonce() { + return disableDynamicNonce; + } + + public void setDisableDynamicNonce(boolean disableDynamicNonce) { + this.disableDynamicNonce = disableDynamicNonce; + } + + public String getReplacedTransactionId() { + return replacedTransactionId; + } + + public void setReplacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + } + + public String getChainId() { + return chainId; + } + + public void setChainId(String chainId) { + this.chainId = chainId; + } + + public String getNetworkName() { + return networkName; + } + + public void setNetworkName(String networkName) { + this.networkName = networkName; + } + + public static class Builder { private boolean disableDynamicGas; - /** - * Option to disable dynamic nonce when creating a transaction. Defaults to false. - */ - @JsonProperty("disable_dynamic_nonce") private boolean disableDynamicNonce; - /** - * Transaction ID to replace (for speed-up/cancel operations). Common use cases: 1) Gas Price Adjustments: When a transaction is stuck due to low gas price, a new transaction with the same nonce but higher gas price can be submitted to replace it. 2) Transaction Cancellation: A user might want to cancel a pending transaction by replacing it with a new transaction (often a 0-value transfer to themselves with higher gas price). Note: When using this field, the disable_dynamic_nonce option must be set to false because the nonce would be automatically managed by the system. - */ - @JsonProperty("replaced_transaction_id") private String replacedTransactionId; - /** - * Chain ID for EVM transactions. (EVM-only) - */ - @JsonProperty("chain_id") private String chainId; - /** - * Network name for EVM transactions. (EVM-only) - */ - @JsonProperty("network_name") private String networkName; - public EvmParams() { - } - - public EvmParams(Builder builder) { - this.disableDynamicGas = builder.disableDynamicGas; - this.disableDynamicNonce = builder.disableDynamicNonce; - this.replacedTransactionId = builder.replacedTransactionId; - this.chainId = builder.chainId; - this.networkName = builder.networkName; - } - public boolean getDisableDynamicGas() { - return disableDynamicGas; - } - - public void setDisableDynamicGas(boolean disableDynamicGas) { - this.disableDynamicGas = disableDynamicGas; - } - public boolean getDisableDynamicNonce() { - return disableDynamicNonce; + public Builder disableDynamicGas(boolean disableDynamicGas) { + this.disableDynamicGas = disableDynamicGas; + return this; } - public void setDisableDynamicNonce(boolean disableDynamicNonce) { - this.disableDynamicNonce = disableDynamicNonce; - } - public String getReplacedTransactionId() { - return replacedTransactionId; + public Builder disableDynamicNonce(boolean disableDynamicNonce) { + this.disableDynamicNonce = disableDynamicNonce; + return this; } - public void setReplacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - } - public String getChainId() { - return chainId; + public Builder replacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + return this; } - public void setChainId(String chainId) { - this.chainId = chainId; - } - public String getNetworkName() { - return networkName; + public Builder chainId(String chainId) { + this.chainId = chainId; + return this; } - public void setNetworkName(String networkName) { - this.networkName = networkName; + public Builder networkName(String networkName) { + this.networkName = networkName; + return this; } - public static class Builder { - private boolean disableDynamicGas; - private boolean disableDynamicNonce; - - private String replacedTransactionId; - - private String chainId; - - private String networkName; - - public Builder disableDynamicGas(boolean disableDynamicGas) { - this.disableDynamicGas = disableDynamicGas; - return this; - } - - public Builder disableDynamicNonce(boolean disableDynamicNonce) { - this.disableDynamicNonce = disableDynamicNonce; - return this; - } - - public Builder replacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - return this; - } - - public Builder chainId(String chainId) { - this.chainId = chainId; - return this; - } - - public Builder networkName(String networkName) { - this.networkName = networkName; - return this; - } - - public EvmParams build() { - return new EvmParams(this); - } + public EvmParams build() { + return new EvmParams(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/ExistingLocate.java b/src/main/java/com/coinbase/prime/model/ExistingLocate.java index 758af2b..c8a65d3 100644 --- a/src/main/java/com/coinbase/prime/model/ExistingLocate.java +++ b/src/main/java/com/coinbase/prime/model/ExistingLocate.java @@ -17,247 +17,236 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class ExistingLocate { - /** - * The locate ID - */ - @JsonProperty("locate_id") + /** The locate ID */ + @JsonProperty("locate_id") + private String locateId; + + /** The unique ID of the entity */ + @JsonProperty("entity_id") + private String entityId; + + /** The unique ID of the portfolio */ + @JsonProperty("portfolio_id") + private String portfolioId; + + /** The currency symbol */ + private String symbol; + + /** The requested locate amount */ + @JsonProperty("requested_amount") + private String requestedAmount; + + /** The interest rate of PM loan */ + @JsonProperty("interest_rate") + private String interestRate; + + /** The locate status */ + private String status; + + /** The approved locate amount */ + @JsonProperty("approved_amount") + private String approvedAmount; + + /** Deprecated: Use locate_date instead */ + @JsonProperty("conversion_date") + private String conversionDate; + + /** The date when the locate was submitted in RFC3339 format */ + @JsonProperty("created_at") + private String createdAt; + + /** The locate date from the CreateNewLocatesRequest in RFC3339 format */ + @JsonProperty("locate_date") + private String locateDate; + + public ExistingLocate() {} + + public ExistingLocate(Builder builder) { + this.locateId = builder.locateId; + this.entityId = builder.entityId; + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.requestedAmount = builder.requestedAmount; + this.interestRate = builder.interestRate; + this.status = builder.status; + this.approvedAmount = builder.approvedAmount; + this.conversionDate = builder.conversionDate; + this.createdAt = builder.createdAt; + this.locateDate = builder.locateDate; + } + + public String getLocateId() { + return locateId; + } + + public void setLocateId(String locateId) { + this.locateId = locateId; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getSymbol() { + return symbol; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public String getRequestedAmount() { + return requestedAmount; + } + + public void setRequestedAmount(String requestedAmount) { + this.requestedAmount = requestedAmount; + } + + public String getInterestRate() { + return interestRate; + } + + public void setInterestRate(String interestRate) { + this.interestRate = interestRate; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getApprovedAmount() { + return approvedAmount; + } + + public void setApprovedAmount(String approvedAmount) { + this.approvedAmount = approvedAmount; + } + + public String getConversionDate() { + return conversionDate; + } + + public void setConversionDate(String conversionDate) { + this.conversionDate = conversionDate; + } + + public String getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + public String getLocateDate() { + return locateDate; + } + + public void setLocateDate(String locateDate) { + this.locateDate = locateDate; + } + + public static class Builder { private String locateId; - /** - * The unique ID of the entity - */ - @JsonProperty("entity_id") private String entityId; - /** - * The unique ID of the portfolio - */ - @JsonProperty("portfolio_id") private String portfolioId; - /** - * The currency symbol - */ private String symbol; - /** - * The requested locate amount - */ - @JsonProperty("requested_amount") private String requestedAmount; - /** - * The interest rate of PM loan - */ - @JsonProperty("interest_rate") private String interestRate; - /** - * The locate status - */ private String status; - /** - * The approved locate amount - */ - @JsonProperty("approved_amount") private String approvedAmount; - /** - * Deprecated: Use locate_date instead - */ - @JsonProperty("conversion_date") private String conversionDate; - /** - * The date when the locate was submitted in RFC3339 format - */ - @JsonProperty("created_at") private String createdAt; - /** - * The locate date from the CreateNewLocatesRequest in RFC3339 format - */ - @JsonProperty("locate_date") private String locateDate; - public ExistingLocate() { + public Builder locateId(String locateId) { + this.locateId = locateId; + return this; } - public ExistingLocate(Builder builder) { - this.locateId = builder.locateId; - this.entityId = builder.entityId; - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.requestedAmount = builder.requestedAmount; - this.interestRate = builder.interestRate; - this.status = builder.status; - this.approvedAmount = builder.approvedAmount; - this.conversionDate = builder.conversionDate; - this.createdAt = builder.createdAt; - this.locateDate = builder.locateDate; - } - public String getLocateId() { - return locateId; + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; } - public void setLocateId(String locateId) { - this.locateId = locateId; - } - public String getEntityId() { - return entityId; + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; } - public void setEntityId(String entityId) { - this.entityId = entityId; - } - public String getPortfolioId() { - return portfolioId; + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getSymbol() { - return symbol; + public Builder requestedAmount(String requestedAmount) { + this.requestedAmount = requestedAmount; + return this; } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getRequestedAmount() { - return requestedAmount; + public Builder interestRate(String interestRate) { + this.interestRate = interestRate; + return this; } - public void setRequestedAmount(String requestedAmount) { - this.requestedAmount = requestedAmount; - } - public String getInterestRate() { - return interestRate; + public Builder status(String status) { + this.status = status; + return this; } - public void setInterestRate(String interestRate) { - this.interestRate = interestRate; - } - public String getStatus() { - return status; + public Builder approvedAmount(String approvedAmount) { + this.approvedAmount = approvedAmount; + return this; } - public void setStatus(String status) { - this.status = status; - } - public String getApprovedAmount() { - return approvedAmount; + public Builder conversionDate(String conversionDate) { + this.conversionDate = conversionDate; + return this; } - public void setApprovedAmount(String approvedAmount) { - this.approvedAmount = approvedAmount; - } - public String getConversionDate() { - return conversionDate; + public Builder createdAt(String createdAt) { + this.createdAt = createdAt; + return this; } - public void setConversionDate(String conversionDate) { - this.conversionDate = conversionDate; + public Builder locateDate(String locateDate) { + this.locateDate = locateDate; + return this; } - public String getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(String createdAt) { - this.createdAt = createdAt; - } - public String getLocateDate() { - return locateDate; - } - - public void setLocateDate(String locateDate) { - this.locateDate = locateDate; - } - public static class Builder { - private String locateId; - - private String entityId; - - private String portfolioId; - - private String symbol; - private String requestedAmount; - - private String interestRate; - - private String status; - - private String approvedAmount; - - private String conversionDate; - - private String createdAt; - - private String locateDate; - - public Builder locateId(String locateId) { - this.locateId = locateId; - return this; - } - - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } - - public Builder requestedAmount(String requestedAmount) { - this.requestedAmount = requestedAmount; - return this; - } - - public Builder interestRate(String interestRate) { - this.interestRate = interestRate; - return this; - } - - public Builder status(String status) { - this.status = status; - return this; - } - - public Builder approvedAmount(String approvedAmount) { - this.approvedAmount = approvedAmount; - return this; - } - - public Builder conversionDate(String conversionDate) { - this.conversionDate = conversionDate; - return this; - } - - public Builder createdAt(String createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder locateDate(String locateDate) { - this.locateDate = locateDate; - return this; - } - - public ExistingLocate build() { - return new ExistingLocate(this); - } + public ExistingLocate build() { + return new ExistingLocate(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java index 696588e..a727e2e 100644 --- a/src/main/java/com/coinbase/prime/model/FcmMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/FcmMarginCall.java @@ -17,139 +17,137 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.FcmMarginCallState; import com.coinbase.prime.model.enums.FcmMarginCallType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class FcmMarginCall { - private FcmMarginCallType type; + private FcmMarginCallType type; - private FcmMarginCallState state; + private FcmMarginCallState state; - /** - * Initial margin call amount to settle - */ - @JsonProperty("initial_amount") - private String initialAmount; + /** Initial margin call amount to settle */ + @JsonProperty("initial_amount") + private String initialAmount; - /** - * Remaining margin call amount to settle - */ - @JsonProperty("remaining_amount") - private String remainingAmount; + /** Remaining margin call amount to settle */ + @JsonProperty("remaining_amount") + private String remainingAmount; - /** - * Business date when the margin call was opened - */ - @JsonProperty("business_date") - private OffsetDateTime businessDate; + /** Business date when the margin call was opened */ + @JsonProperty("business_date") + private OffsetDateTime businessDate; - /** - * The deadline by which the margin call must be satisfied - */ - @JsonProperty("cure_deadline") - private OffsetDateTime cureDeadline; + /** The deadline by which the margin call must be satisfied */ + @JsonProperty("cure_deadline") + private OffsetDateTime cureDeadline; - public FcmMarginCall() { - } + public FcmMarginCall() {} - public FcmMarginCall(Builder builder) { - this.type = builder.type; - this.state = builder.state; - this.initialAmount = builder.initialAmount; - this.remainingAmount = builder.remainingAmount; - this.businessDate = builder.businessDate; - this.cureDeadline = builder.cureDeadline; - } - public FcmMarginCallType getType() { - return type; - } + public FcmMarginCall(Builder builder) { + this.type = builder.type; + this.state = builder.state; + this.initialAmount = builder.initialAmount; + this.remainingAmount = builder.remainingAmount; + this.businessDate = builder.businessDate; + this.cureDeadline = builder.cureDeadline; + } - public void setType(FcmMarginCallType type) { - this.type = type; - } - public FcmMarginCallState getState() { - return state; - } + public FcmMarginCallType getType() { + return type; + } - public void setState(FcmMarginCallState state) { - this.state = state; - } - public String getInitialAmount() { - return initialAmount; - } + public void setType(FcmMarginCallType type) { + this.type = type; + } - public void setInitialAmount(String initialAmount) { - this.initialAmount = initialAmount; - } - public String getRemainingAmount() { - return remainingAmount; - } + public FcmMarginCallState getState() { + return state; + } - public void setRemainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - } - public OffsetDateTime getBusinessDate() { - return businessDate; - } + public void setState(FcmMarginCallState state) { + this.state = state; + } - public void setBusinessDate(OffsetDateTime businessDate) { - this.businessDate = businessDate; - } - public OffsetDateTime getCureDeadline() { - return cureDeadline; - } + public String getInitialAmount() { + return initialAmount; + } - public void setCureDeadline(OffsetDateTime cureDeadline) { - this.cureDeadline = cureDeadline; - } - public static class Builder { - private FcmMarginCallType type; + public void setInitialAmount(String initialAmount) { + this.initialAmount = initialAmount; + } - private FcmMarginCallState state; + public String getRemainingAmount() { + return remainingAmount; + } - private String initialAmount; + public void setRemainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + } - private String remainingAmount; + public OffsetDateTime getBusinessDate() { + return businessDate; + } - private OffsetDateTime businessDate; + public void setBusinessDate(OffsetDateTime businessDate) { + this.businessDate = businessDate; + } - private OffsetDateTime cureDeadline; + public OffsetDateTime getCureDeadline() { + return cureDeadline; + } - public Builder type(FcmMarginCallType type) { - this.type = type; - return this; - } + public void setCureDeadline(OffsetDateTime cureDeadline) { + this.cureDeadline = cureDeadline; + } - public Builder state(FcmMarginCallState state) { - this.state = state; - return this; - } + public static class Builder { + private FcmMarginCallType type; + + private FcmMarginCallState state; + + private String initialAmount; - public Builder initialAmount(String initialAmount) { - this.initialAmount = initialAmount; - return this; - } + private String remainingAmount; - public Builder remainingAmount(String remainingAmount) { - this.remainingAmount = remainingAmount; - return this; - } + private OffsetDateTime businessDate; - public Builder businessDate(OffsetDateTime businessDate) { - this.businessDate = businessDate; - return this; - } + private OffsetDateTime cureDeadline; - public Builder cureDeadline(OffsetDateTime cureDeadline) { - this.cureDeadline = cureDeadline; - return this; - } + public Builder type(FcmMarginCallType type) { + this.type = type; + return this; + } - public FcmMarginCall build() { - return new FcmMarginCall(this); - } + public Builder state(FcmMarginCallState state) { + this.state = state; + return this; } -} + public Builder initialAmount(String initialAmount) { + this.initialAmount = initialAmount; + return this; + } + + public Builder remainingAmount(String remainingAmount) { + this.remainingAmount = remainingAmount; + return this; + } + + public Builder businessDate(OffsetDateTime businessDate) { + this.businessDate = businessDate; + return this; + } + + public Builder cureDeadline(OffsetDateTime cureDeadline) { + this.cureDeadline = cureDeadline; + return this; + } + + public FcmMarginCall build() { + return new FcmMarginCall(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/FcmPosition.java b/src/main/java/com/coinbase/prime/model/FcmPosition.java index cfa33e9..f3ea0a3 100644 --- a/src/main/java/com/coinbase/prime/model/FcmPosition.java +++ b/src/main/java/com/coinbase/prime/model/FcmPosition.java @@ -17,184 +17,178 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.FcmPositionSide; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class FcmPosition { - /** - * Product ID - */ - @JsonProperty("product_id") + /** Product ID */ + @JsonProperty("product_id") + private String productId; + + private FcmPositionSide side; + + /** Number of contracts */ + @JsonProperty("number_of_contracts") + private String numberOfContracts; + + /** Daily realized PNL */ + @JsonProperty("daily_realized_pnl") + private String dailyRealizedPnl; + + /** Unrealized PNL */ + @JsonProperty("unrealized_pnl") + private String unrealizedPnl; + + /** Current price of position */ + @JsonProperty("current_price") + private String currentPrice; + + /** Average entry price */ + @JsonProperty("avg_entry_price") + private String avgEntryPrice; + + /** Expiration time of position */ + @JsonProperty("expiration_time") + private OffsetDateTime expirationTime; + + public FcmPosition() {} + + public FcmPosition(Builder builder) { + this.productId = builder.productId; + this.side = builder.side; + this.numberOfContracts = builder.numberOfContracts; + this.dailyRealizedPnl = builder.dailyRealizedPnl; + this.unrealizedPnl = builder.unrealizedPnl; + this.currentPrice = builder.currentPrice; + this.avgEntryPrice = builder.avgEntryPrice; + this.expirationTime = builder.expirationTime; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public FcmPositionSide getSide() { + return side; + } + + public void setSide(FcmPositionSide side) { + this.side = side; + } + + public String getNumberOfContracts() { + return numberOfContracts; + } + + public void setNumberOfContracts(String numberOfContracts) { + this.numberOfContracts = numberOfContracts; + } + + public String getDailyRealizedPnl() { + return dailyRealizedPnl; + } + + public void setDailyRealizedPnl(String dailyRealizedPnl) { + this.dailyRealizedPnl = dailyRealizedPnl; + } + + public String getUnrealizedPnl() { + return unrealizedPnl; + } + + public void setUnrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + } + + public String getCurrentPrice() { + return currentPrice; + } + + public void setCurrentPrice(String currentPrice) { + this.currentPrice = currentPrice; + } + + public String getAvgEntryPrice() { + return avgEntryPrice; + } + + public void setAvgEntryPrice(String avgEntryPrice) { + this.avgEntryPrice = avgEntryPrice; + } + + public OffsetDateTime getExpirationTime() { + return expirationTime; + } + + public void setExpirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + } + + public static class Builder { private String productId; private FcmPositionSide side; - /** - * Number of contracts - */ - @JsonProperty("number_of_contracts") private String numberOfContracts; - /** - * Daily realized PNL - */ - @JsonProperty("daily_realized_pnl") private String dailyRealizedPnl; - /** - * Unrealized PNL - */ - @JsonProperty("unrealized_pnl") private String unrealizedPnl; - /** - * Current price of position - */ - @JsonProperty("current_price") private String currentPrice; - /** - * Average entry price - */ - @JsonProperty("avg_entry_price") private String avgEntryPrice; - /** - * Expiration time of position - */ - @JsonProperty("expiration_time") private OffsetDateTime expirationTime; - public FcmPosition() { + public Builder productId(String productId) { + this.productId = productId; + return this; } - public FcmPosition(Builder builder) { - this.productId = builder.productId; - this.side = builder.side; - this.numberOfContracts = builder.numberOfContracts; - this.dailyRealizedPnl = builder.dailyRealizedPnl; - this.unrealizedPnl = builder.unrealizedPnl; - this.currentPrice = builder.currentPrice; - this.avgEntryPrice = builder.avgEntryPrice; - this.expirationTime = builder.expirationTime; - } - public String getProductId() { - return productId; + public Builder side(FcmPositionSide side) { + this.side = side; + return this; } - public void setProductId(String productId) { - this.productId = productId; - } - public FcmPositionSide getSide() { - return side; + public Builder numberOfContracts(String numberOfContracts) { + this.numberOfContracts = numberOfContracts; + return this; } - public void setSide(FcmPositionSide side) { - this.side = side; - } - public String getNumberOfContracts() { - return numberOfContracts; + public Builder dailyRealizedPnl(String dailyRealizedPnl) { + this.dailyRealizedPnl = dailyRealizedPnl; + return this; } - public void setNumberOfContracts(String numberOfContracts) { - this.numberOfContracts = numberOfContracts; - } - public String getDailyRealizedPnl() { - return dailyRealizedPnl; + public Builder unrealizedPnl(String unrealizedPnl) { + this.unrealizedPnl = unrealizedPnl; + return this; } - public void setDailyRealizedPnl(String dailyRealizedPnl) { - this.dailyRealizedPnl = dailyRealizedPnl; - } - public String getUnrealizedPnl() { - return unrealizedPnl; + public Builder currentPrice(String currentPrice) { + this.currentPrice = currentPrice; + return this; } - public void setUnrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - } - public String getCurrentPrice() { - return currentPrice; + public Builder avgEntryPrice(String avgEntryPrice) { + this.avgEntryPrice = avgEntryPrice; + return this; } - public void setCurrentPrice(String currentPrice) { - this.currentPrice = currentPrice; + public Builder expirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; } - public String getAvgEntryPrice() { - return avgEntryPrice; - } - - public void setAvgEntryPrice(String avgEntryPrice) { - this.avgEntryPrice = avgEntryPrice; - } - public OffsetDateTime getExpirationTime() { - return expirationTime; - } - - public void setExpirationTime(OffsetDateTime expirationTime) { - this.expirationTime = expirationTime; - } - public static class Builder { - private String productId; - - private FcmPositionSide side; - private String numberOfContracts; - - private String dailyRealizedPnl; - - private String unrealizedPnl; - - private String currentPrice; - - private String avgEntryPrice; - - private OffsetDateTime expirationTime; - - public Builder productId(String productId) { - this.productId = productId; - return this; - } - - public Builder side(FcmPositionSide side) { - this.side = side; - return this; - } - - public Builder numberOfContracts(String numberOfContracts) { - this.numberOfContracts = numberOfContracts; - return this; - } - - public Builder dailyRealizedPnl(String dailyRealizedPnl) { - this.dailyRealizedPnl = dailyRealizedPnl; - return this; - } - - public Builder unrealizedPnl(String unrealizedPnl) { - this.unrealizedPnl = unrealizedPnl; - return this; - } - - public Builder currentPrice(String currentPrice) { - this.currentPrice = currentPrice; - return this; - } - - public Builder avgEntryPrice(String avgEntryPrice) { - this.avgEntryPrice = avgEntryPrice; - return this; - } - - public Builder expirationTime(OffsetDateTime expirationTime) { - this.expirationTime = expirationTime; - return this; - } - - public FcmPosition build() { - return new FcmPosition(this); - } + public FcmPosition build() { + return new FcmPosition(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java index 9edaba2..c00b686 100644 --- a/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java +++ b/src/main/java/com/coinbase/prime/model/FcmScheduledMaintenance.java @@ -17,62 +17,60 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** FcmScheduledMaintenance contains scheduled maintenance window information */ public class FcmScheduledMaintenance { - /** - * Maintenance window start time - */ - @JsonProperty("start_time") - private OffsetDateTime startTime; + /** Maintenance window start time */ + @JsonProperty("start_time") + private OffsetDateTime startTime; - /** - * Maintenance window end time - */ - @JsonProperty("end_time") - private OffsetDateTime endTime; + /** Maintenance window end time */ + @JsonProperty("end_time") + private OffsetDateTime endTime; - public FcmScheduledMaintenance() { - } + public FcmScheduledMaintenance() {} - public FcmScheduledMaintenance(Builder builder) { - this.startTime = builder.startTime; - this.endTime = builder.endTime; - } - public OffsetDateTime getStartTime() { - return startTime; - } + public FcmScheduledMaintenance(Builder builder) { + this.startTime = builder.startTime; + this.endTime = builder.endTime; + } - public void setStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - } - public OffsetDateTime getEndTime() { - return endTime; - } + public OffsetDateTime getStartTime() { + return startTime; + } - public void setEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - } - public static class Builder { - private OffsetDateTime startTime; + public void setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + } - private OffsetDateTime endTime; + public OffsetDateTime getEndTime() { + return endTime; + } - public Builder startTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } + public void setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + } - public Builder endTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } + public static class Builder { + private OffsetDateTime startTime; + + private OffsetDateTime endTime; - public FcmScheduledMaintenance build() { - return new FcmScheduledMaintenance(this); - } + public Builder startTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; } -} + public Builder endTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + public FcmScheduledMaintenance build() { + return new FcmScheduledMaintenance(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java index a90e7e8..adf59b8 100644 --- a/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java +++ b/src/main/java/com/coinbase/prime/model/FcmTradingSessionDetails.java @@ -17,7 +17,7 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.FcmScheduledMaintenance; + import com.coinbase.prime.model.enums.FcmTradingSessionClosedReason; import com.coinbase.prime.model.enums.FcmTradingSessionState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -25,209 +25,204 @@ /** FcmTradingSessionDetails contains trading session details for FCM products */ public class FcmTradingSessionDetails { - /** - * Whether the trading session is currently open - */ - @JsonProperty("session_open") + /** Whether the trading session is currently open */ + @JsonProperty("session_open") + private boolean sessionOpen; + + /** Trading session open time */ + @JsonProperty("open_time") + private OffsetDateTime openTime; + + /** Trading session close time */ + @JsonProperty("close_time") + private OffsetDateTime closeTime; + + /** + * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state - + * FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled - + * FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled - + * FCM_TRADING_SESSION_STATE_OPEN: Trading session is open - FCM_TRADING_SESSION_STATE_CLOSE: + * Trading session is closed - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted + */ + @JsonProperty("session_state") + private FcmTradingSessionState sessionState; + + /** Whether after-hours order entry is disabled */ + @JsonProperty("after_hours_order_entry_disabled") + private boolean afterHoursOrderEntryDisabled; + + /** + * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason - + * FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close - + * FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance - + * FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance + */ + @JsonProperty("closed_reason") + private FcmTradingSessionClosedReason closedReason; + + /** FcmScheduledMaintenance contains scheduled maintenance window information */ + private FcmScheduledMaintenance maintenance; + + /** Settlement timestamp from previous trading day */ + @JsonProperty("settlement_timestamp") + private OffsetDateTime settlementTimestamp; + + /** Settlement price from previous trading day */ + @JsonProperty("settlement_price") + private String settlementPrice; + + public FcmTradingSessionDetails() {} + + public FcmTradingSessionDetails(Builder builder) { + this.sessionOpen = builder.sessionOpen; + this.openTime = builder.openTime; + this.closeTime = builder.closeTime; + this.sessionState = builder.sessionState; + this.afterHoursOrderEntryDisabled = builder.afterHoursOrderEntryDisabled; + this.closedReason = builder.closedReason; + this.maintenance = builder.maintenance; + this.settlementTimestamp = builder.settlementTimestamp; + this.settlementPrice = builder.settlementPrice; + } + + public boolean getSessionOpen() { + return sessionOpen; + } + + public void setSessionOpen(boolean sessionOpen) { + this.sessionOpen = sessionOpen; + } + + public OffsetDateTime getOpenTime() { + return openTime; + } + + public void setOpenTime(OffsetDateTime openTime) { + this.openTime = openTime; + } + + public OffsetDateTime getCloseTime() { + return closeTime; + } + + public void setCloseTime(OffsetDateTime closeTime) { + this.closeTime = closeTime; + } + + public FcmTradingSessionState getSessionState() { + return sessionState; + } + + public void setSessionState(FcmTradingSessionState sessionState) { + this.sessionState = sessionState; + } + + public boolean getAfterHoursOrderEntryDisabled() { + return afterHoursOrderEntryDisabled; + } + + public void setAfterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { + this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; + } + + public FcmTradingSessionClosedReason getClosedReason() { + return closedReason; + } + + public void setClosedReason(FcmTradingSessionClosedReason closedReason) { + this.closedReason = closedReason; + } + + public FcmScheduledMaintenance getMaintenance() { + return maintenance; + } + + public void setMaintenance(FcmScheduledMaintenance maintenance) { + this.maintenance = maintenance; + } + + public OffsetDateTime getSettlementTimestamp() { + return settlementTimestamp; + } + + public void setSettlementTimestamp(OffsetDateTime settlementTimestamp) { + this.settlementTimestamp = settlementTimestamp; + } + + public String getSettlementPrice() { + return settlementPrice; + } + + public void setSettlementPrice(String settlementPrice) { + this.settlementPrice = settlementPrice; + } + + public static class Builder { private boolean sessionOpen; - /** - * Trading session open time - */ - @JsonProperty("open_time") private OffsetDateTime openTime; - /** - * Trading session close time - */ - @JsonProperty("close_time") private OffsetDateTime closeTime; - /** - * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state - * - FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled - * - FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled - * - FCM_TRADING_SESSION_STATE_OPEN: Trading session is open - * - FCM_TRADING_SESSION_STATE_CLOSE: Trading session is closed - * - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted - */ - @JsonProperty("session_state") private FcmTradingSessionState sessionState; - /** - * Whether after-hours order entry is disabled - */ - @JsonProperty("after_hours_order_entry_disabled") private boolean afterHoursOrderEntryDisabled; - /** - * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason - * - FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close - * - FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance - * - FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance - */ - @JsonProperty("closed_reason") private FcmTradingSessionClosedReason closedReason; - /** FcmScheduledMaintenance contains scheduled maintenance window information */ private FcmScheduledMaintenance maintenance; - /** - * Settlement timestamp from previous trading day - */ - @JsonProperty("settlement_timestamp") private OffsetDateTime settlementTimestamp; - /** - * Settlement price from previous trading day - */ - @JsonProperty("settlement_price") private String settlementPrice; - public FcmTradingSessionDetails() { - } - - public FcmTradingSessionDetails(Builder builder) { - this.sessionOpen = builder.sessionOpen; - this.openTime = builder.openTime; - this.closeTime = builder.closeTime; - this.sessionState = builder.sessionState; - this.afterHoursOrderEntryDisabled = builder.afterHoursOrderEntryDisabled; - this.closedReason = builder.closedReason; - this.maintenance = builder.maintenance; - this.settlementTimestamp = builder.settlementTimestamp; - this.settlementPrice = builder.settlementPrice; - } - public boolean getSessionOpen() { - return sessionOpen; - } - - public void setSessionOpen(boolean sessionOpen) { - this.sessionOpen = sessionOpen; - } - public OffsetDateTime getOpenTime() { - return openTime; + public Builder sessionOpen(boolean sessionOpen) { + this.sessionOpen = sessionOpen; + return this; } - public void setOpenTime(OffsetDateTime openTime) { - this.openTime = openTime; - } - public OffsetDateTime getCloseTime() { - return closeTime; + public Builder openTime(OffsetDateTime openTime) { + this.openTime = openTime; + return this; } - public void setCloseTime(OffsetDateTime closeTime) { - this.closeTime = closeTime; - } - public FcmTradingSessionState getSessionState() { - return sessionState; + public Builder closeTime(OffsetDateTime closeTime) { + this.closeTime = closeTime; + return this; } - public void setSessionState(FcmTradingSessionState sessionState) { - this.sessionState = sessionState; - } - public boolean getAfterHoursOrderEntryDisabled() { - return afterHoursOrderEntryDisabled; + public Builder sessionState(FcmTradingSessionState sessionState) { + this.sessionState = sessionState; + return this; } - public void setAfterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { - this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; - } - public FcmTradingSessionClosedReason getClosedReason() { - return closedReason; + public Builder afterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { + this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; + return this; } - public void setClosedReason(FcmTradingSessionClosedReason closedReason) { - this.closedReason = closedReason; - } - public FcmScheduledMaintenance getMaintenance() { - return maintenance; + public Builder closedReason(FcmTradingSessionClosedReason closedReason) { + this.closedReason = closedReason; + return this; } - public void setMaintenance(FcmScheduledMaintenance maintenance) { - this.maintenance = maintenance; - } - public OffsetDateTime getSettlementTimestamp() { - return settlementTimestamp; + public Builder maintenance(FcmScheduledMaintenance maintenance) { + this.maintenance = maintenance; + return this; } - public void setSettlementTimestamp(OffsetDateTime settlementTimestamp) { - this.settlementTimestamp = settlementTimestamp; - } - public String getSettlementPrice() { - return settlementPrice; + public Builder settlementTimestamp(OffsetDateTime settlementTimestamp) { + this.settlementTimestamp = settlementTimestamp; + return this; } - public void setSettlementPrice(String settlementPrice) { - this.settlementPrice = settlementPrice; + public Builder settlementPrice(String settlementPrice) { + this.settlementPrice = settlementPrice; + return this; } - public static class Builder { - private boolean sessionOpen; - - private OffsetDateTime openTime; - - private OffsetDateTime closeTime; - private FcmTradingSessionState sessionState; - - private boolean afterHoursOrderEntryDisabled; - - private FcmTradingSessionClosedReason closedReason; - - private FcmScheduledMaintenance maintenance; - - private OffsetDateTime settlementTimestamp; - - private String settlementPrice; - - public Builder sessionOpen(boolean sessionOpen) { - this.sessionOpen = sessionOpen; - return this; - } - - public Builder openTime(OffsetDateTime openTime) { - this.openTime = openTime; - return this; - } - - public Builder closeTime(OffsetDateTime closeTime) { - this.closeTime = closeTime; - return this; - } - - public Builder sessionState(FcmTradingSessionState sessionState) { - this.sessionState = sessionState; - return this; - } - - public Builder afterHoursOrderEntryDisabled(boolean afterHoursOrderEntryDisabled) { - this.afterHoursOrderEntryDisabled = afterHoursOrderEntryDisabled; - return this; - } - - public Builder closedReason(FcmTradingSessionClosedReason closedReason) { - this.closedReason = closedReason; - return this; - } - - public Builder maintenance(FcmScheduledMaintenance maintenance) { - this.maintenance = maintenance; - return this; - } - - public Builder settlementTimestamp(OffsetDateTime settlementTimestamp) { - this.settlementTimestamp = settlementTimestamp; - return this; - } - - public Builder settlementPrice(String settlementPrice) { - this.settlementPrice = settlementPrice; - return this; - } - - public FcmTradingSessionDetails build() { - return new FcmTradingSessionDetails(this); - } + public FcmTradingSessionDetails build() { + return new FcmTradingSessionDetails(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/Fill.java b/src/main/java/com/coinbase/prime/model/Fill.java index 77b81f0..5a000cf 100644 --- a/src/main/java/com/coinbase/prime/model/Fill.java +++ b/src/main/java/com/coinbase/prime/model/Fill.java @@ -17,332 +17,314 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.CommissionDetailTotal; + import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.ProductType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class Fill { - /** - * The unique ID of the fill - */ + /** The unique ID of the fill */ + private String id; + + /** The order ID of the fill */ + @JsonProperty("order_id") + private String orderId; + + /** The product ID of the fill */ + @JsonProperty("product_id") + private String productId; + + /** The client product ID of the fill indictating the settlment currency */ + @JsonProperty("client_product_id") + private String clientProductId; + + /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ + private OrderSide side; + + /** Filled size (in base asset units) */ + @JsonProperty("filled_quantity") + private String filledQuantity; + + /** Filled value (in quote asset units) */ + @JsonProperty("filled_value") + private String filledValue; + + /** The price of the fill */ + private String price; + + /** The date and time of the fill */ + private OffsetDateTime time; + + /** The commission incurred for the fill */ + private String commission; + + /** The name of the venue */ + private String venue; + + /** The venue fees incurred for the fill */ + @JsonProperty("venue_fees") + private String venueFees; + + /** The CES commission incurred for the fill */ + @JsonProperty("ces_commission") + private String cesCommission; + + /** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ + @JsonProperty("product_type") + private ProductType productType; + + @JsonProperty("commission_detail_total") + private CommissionDetailTotal commissionDetailTotal; + + public Fill() {} + + public Fill(Builder builder) { + this.id = builder.id; + this.orderId = builder.orderId; + this.productId = builder.productId; + this.clientProductId = builder.clientProductId; + this.side = builder.side; + this.filledQuantity = builder.filledQuantity; + this.filledValue = builder.filledValue; + this.price = builder.price; + this.time = builder.time; + this.commission = builder.commission; + this.venue = builder.venue; + this.venueFees = builder.venueFees; + this.cesCommission = builder.cesCommission; + this.productType = builder.productType; + this.commissionDetailTotal = builder.commissionDetailTotal; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getOrderId() { + return orderId; + } + + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public String getClientProductId() { + return clientProductId; + } + + public void setClientProductId(String clientProductId) { + this.clientProductId = clientProductId; + } + + public OrderSide getSide() { + return side; + } + + public void setSide(OrderSide side) { + this.side = side; + } + + public String getFilledQuantity() { + return filledQuantity; + } + + public void setFilledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + } + + public String getFilledValue() { + return filledValue; + } + + public void setFilledValue(String filledValue) { + this.filledValue = filledValue; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public OffsetDateTime getTime() { + return time; + } + + public void setTime(OffsetDateTime time) { + this.time = time; + } + + public String getCommission() { + return commission; + } + + public void setCommission(String commission) { + this.commission = commission; + } + + public String getVenue() { + return venue; + } + + public void setVenue(String venue) { + this.venue = venue; + } + + public String getVenueFees() { + return venueFees; + } + + public void setVenueFees(String venueFees) { + this.venueFees = venueFees; + } + + public String getCesCommission() { + return cesCommission; + } + + public void setCesCommission(String cesCommission) { + this.cesCommission = cesCommission; + } + + public ProductType getProductType() { + return productType; + } + + public void setProductType(ProductType productType) { + this.productType = productType; + } + + public CommissionDetailTotal getCommissionDetailTotal() { + return commissionDetailTotal; + } + + public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + } + + public static class Builder { private String id; - /** - * The order ID of the fill - */ - @JsonProperty("order_id") private String orderId; - /** - * The product ID of the fill - */ - @JsonProperty("product_id") private String productId; - /** - * The client product ID of the fill indictating the settlment currency - */ - @JsonProperty("client_product_id") private String clientProductId; - /** - * - UNKNOWN_ORDER_SIDE: nil value - * - BUY: Buy order - * - SELL: Sell order - */ private OrderSide side; - /** - * Filled size (in base asset units) - */ - @JsonProperty("filled_quantity") private String filledQuantity; - /** - * Filled value (in quote asset units) - */ - @JsonProperty("filled_value") private String filledValue; - /** - * The price of the fill - */ private String price; - /** - * The date and time of the fill - */ private OffsetDateTime time; - /** - * The commission incurred for the fill - */ private String commission; - /** - * The name of the venue - */ private String venue; - /** - * The venue fees incurred for the fill - */ - @JsonProperty("venue_fees") private String venueFees; - /** - * The CES commission incurred for the fill - */ - @JsonProperty("ces_commission") private String cesCommission; - /** - * - UNKNOWN_PRODUCT_TYPE: Unknown product type - * - SPOT: Spot product - * - FUTURE: Future product - */ - @JsonProperty("product_type") private ProductType productType; - @JsonProperty("commission_detail_total") private CommissionDetailTotal commissionDetailTotal; - public Fill() { + public Builder id(String id) { + this.id = id; + return this; } - public Fill(Builder builder) { - this.id = builder.id; - this.orderId = builder.orderId; - this.productId = builder.productId; - this.clientProductId = builder.clientProductId; - this.side = builder.side; - this.filledQuantity = builder.filledQuantity; - this.filledValue = builder.filledValue; - this.price = builder.price; - this.time = builder.time; - this.commission = builder.commission; - this.venue = builder.venue; - this.venueFees = builder.venueFees; - this.cesCommission = builder.cesCommission; - this.productType = builder.productType; - this.commissionDetailTotal = builder.commissionDetailTotal; - } - public String getId() { - return id; + public Builder orderId(String orderId) { + this.orderId = orderId; + return this; } - public void setId(String id) { - this.id = id; - } - public String getOrderId() { - return orderId; + public Builder productId(String productId) { + this.productId = productId; + return this; } - public void setOrderId(String orderId) { - this.orderId = orderId; - } - public String getProductId() { - return productId; + public Builder clientProductId(String clientProductId) { + this.clientProductId = clientProductId; + return this; } - public void setProductId(String productId) { - this.productId = productId; - } - public String getClientProductId() { - return clientProductId; + public Builder side(OrderSide side) { + this.side = side; + return this; } - public void setClientProductId(String clientProductId) { - this.clientProductId = clientProductId; - } - public OrderSide getSide() { - return side; + public Builder filledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + return this; } - public void setSide(OrderSide side) { - this.side = side; - } - public String getFilledQuantity() { - return filledQuantity; + public Builder filledValue(String filledValue) { + this.filledValue = filledValue; + return this; } - public void setFilledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - } - public String getFilledValue() { - return filledValue; + public Builder price(String price) { + this.price = price; + return this; } - public void setFilledValue(String filledValue) { - this.filledValue = filledValue; - } - public String getPrice() { - return price; + public Builder time(OffsetDateTime time) { + this.time = time; + return this; } - public void setPrice(String price) { - this.price = price; - } - public OffsetDateTime getTime() { - return time; + public Builder commission(String commission) { + this.commission = commission; + return this; } - public void setTime(OffsetDateTime time) { - this.time = time; - } - public String getCommission() { - return commission; + public Builder venue(String venue) { + this.venue = venue; + return this; } - public void setCommission(String commission) { - this.commission = commission; - } - public String getVenue() { - return venue; - } - - public void setVenue(String venue) { - this.venue = venue; - } - public String getVenueFees() { - return venueFees; + public Builder venueFees(String venueFees) { + this.venueFees = venueFees; + return this; } - public void setVenueFees(String venueFees) { - this.venueFees = venueFees; - } - public String getCesCommission() { - return cesCommission; + public Builder cesCommission(String cesCommission) { + this.cesCommission = cesCommission; + return this; } - public void setCesCommission(String cesCommission) { - this.cesCommission = cesCommission; - } - public ProductType getProductType() { - return productType; + public Builder productType(ProductType productType) { + this.productType = productType; + return this; } - public void setProductType(ProductType productType) { - this.productType = productType; - } - public CommissionDetailTotal getCommissionDetailTotal() { - return commissionDetailTotal; + public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + return this; } - public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - } - public static class Builder { - private String id; - - private String orderId; - - private String productId; - - private String clientProductId; - - private OrderSide side; - - private String filledQuantity; - - private String filledValue; - - private String price; - - private OffsetDateTime time; - - private String commission; - - private String venue; - - private String venueFees; - - private String cesCommission; - - private ProductType productType; - - private CommissionDetailTotal commissionDetailTotal; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder orderId(String orderId) { - this.orderId = orderId; - return this; - } - - public Builder productId(String productId) { - this.productId = productId; - return this; - } - - public Builder clientProductId(String clientProductId) { - this.clientProductId = clientProductId; - return this; - } - - public Builder side(OrderSide side) { - this.side = side; - return this; - } - - public Builder filledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - return this; - } - - public Builder filledValue(String filledValue) { - this.filledValue = filledValue; - return this; - } - - public Builder price(String price) { - this.price = price; - return this; - } - - public Builder time(OffsetDateTime time) { - this.time = time; - return this; - } - - public Builder commission(String commission) { - this.commission = commission; - return this; - } - - public Builder venue(String venue) { - this.venue = venue; - return this; - } - - public Builder venueFees(String venueFees) { - this.venueFees = venueFees; - return this; - } - - public Builder cesCommission(String cesCommission) { - this.cesCommission = cesCommission; - return this; - } - - public Builder productType(ProductType productType) { - this.productType = productType; - return this; - } - - public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - return this; - } - - public Fill build() { - return new Fill(this); - } + public Fill build() { + return new Fill(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/FundMovement.java b/src/main/java/com/coinbase/prime/model/FundMovement.java index 4cee772..fa7f62d 100644 --- a/src/main/java/com/coinbase/prime/model/FundMovement.java +++ b/src/main/java/com/coinbase/prime/model/FundMovement.java @@ -17,104 +17,107 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.TransferLocation; /** FundMovement represents a single movement of funds between two counterparties. */ public class FundMovement { - private String id; + private String id; - private TransferLocation source; + private TransferLocation source; - private TransferLocation target; + private TransferLocation target; - private String currency; + private String currency; - private String amount; + private String amount; - public FundMovement() { - } + public FundMovement() {} - public FundMovement(Builder builder) { - this.id = builder.id; - this.source = builder.source; - this.target = builder.target; - this.currency = builder.currency; - this.amount = builder.amount; - } - public String getId() { - return id; - } + public FundMovement(Builder builder) { + this.id = builder.id; + this.source = builder.source; + this.target = builder.target; + this.currency = builder.currency; + this.amount = builder.amount; + } - public void setId(String id) { - this.id = id; - } - public TransferLocation getSource() { - return source; - } + public String getId() { + return id; + } - public void setSource(TransferLocation source) { - this.source = source; - } - public TransferLocation getTarget() { - return target; - } + public void setId(String id) { + this.id = id; + } - public void setTarget(TransferLocation target) { - this.target = target; - } - public String getCurrency() { - return currency; - } + public TransferLocation getSource() { + return source; + } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getAmount() { - return amount; - } + public void setSource(TransferLocation source) { + this.source = source; + } - public void setAmount(String amount) { - this.amount = amount; - } - public static class Builder { - private String id; + public TransferLocation getTarget() { + return target; + } - private TransferLocation source; + public void setTarget(TransferLocation target) { + this.target = target; + } - private TransferLocation target; + public String getCurrency() { + return currency; + } - private String currency; + public void setCurrency(String currency) { + this.currency = currency; + } - private String amount; + public String getAmount() { + return amount; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setAmount(String amount) { + this.amount = amount; + } - public Builder source(TransferLocation source) { - this.source = source; - return this; - } + public static class Builder { + private String id; - public Builder target(TransferLocation target) { - this.target = target; - return this; - } + private TransferLocation source; - public Builder currency(String currency) { - this.currency = currency; - return this; - } + private TransferLocation target; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + private String currency; - public FundMovement build() { - return new FundMovement(this); - } + private String amount; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder source(TransferLocation source) { + this.source = source; + return this; } -} + public Builder target(TransferLocation target) { + this.target = target; + return this; + } + + public Builder currency(String currency) { + this.currency = currency; + return this; + } + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public FundMovement build() { + return new FundMovement(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java index 96c3e0b..28bc4b3 100644 --- a/src/main/java/com/coinbase/prime/model/FutureProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/FutureProductDetails.java @@ -17,255 +17,249 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.ContractExpiryType; -import com.coinbase.prime.model.PerpetualProductDetails; import com.coinbase.prime.model.enums.RiskManagementType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** FutureProductDetails contains details specific to futures products */ public class FutureProductDetails { - /** - * Contract code identifier - */ - @JsonProperty("contract_code") + /** Contract code identifier */ + @JsonProperty("contract_code") + private String contractCode; + + /** Contract size */ + @JsonProperty("contract_size") + private String contractSize; + + /** Contract expiry timestamp */ + @JsonProperty("contract_expiry") + private OffsetDateTime contractExpiry; + + /** Contract root unit (underlying asset) */ + @JsonProperty("contract_root_unit") + private String contractRootUnit; + + /** + * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type - + * CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract - CONTRACT_EXPIRY_TYPE_PERPETUAL: + * Perpetual futures contract (no expiry) + */ + @JsonProperty("contract_expiry_type") + private ContractExpiryType contractExpiryType; + + /** + * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type - + * RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) - + * RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue + */ + @JsonProperty("risk_managed_by") + private RiskManagementType riskManagedBy; + + /** The venue this product trades on */ + private String venue; + + /** Descriptive name for the product group */ + @JsonProperty("group_description") + private String groupDescription; + + /** IANA time zone for contract expiration */ + @JsonProperty("contract_expiry_timezone") + private String contractExpiryTimezone; + + /** Short version of the group description */ + @JsonProperty("group_short_description") + private String groupShortDescription; + + /** PerpetualProductDetails contains details specific to perpetual futures products */ + @JsonProperty("perpetual_details") + private PerpetualProductDetails perpetualDetails; + + public FutureProductDetails() {} + + public FutureProductDetails(Builder builder) { + this.contractCode = builder.contractCode; + this.contractSize = builder.contractSize; + this.contractExpiry = builder.contractExpiry; + this.contractRootUnit = builder.contractRootUnit; + this.contractExpiryType = builder.contractExpiryType; + this.riskManagedBy = builder.riskManagedBy; + this.venue = builder.venue; + this.groupDescription = builder.groupDescription; + this.contractExpiryTimezone = builder.contractExpiryTimezone; + this.groupShortDescription = builder.groupShortDescription; + this.perpetualDetails = builder.perpetualDetails; + } + + public String getContractCode() { + return contractCode; + } + + public void setContractCode(String contractCode) { + this.contractCode = contractCode; + } + + public String getContractSize() { + return contractSize; + } + + public void setContractSize(String contractSize) { + this.contractSize = contractSize; + } + + public OffsetDateTime getContractExpiry() { + return contractExpiry; + } + + public void setContractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + } + + public String getContractRootUnit() { + return contractRootUnit; + } + + public void setContractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + } + + public ContractExpiryType getContractExpiryType() { + return contractExpiryType; + } + + public void setContractExpiryType(ContractExpiryType contractExpiryType) { + this.contractExpiryType = contractExpiryType; + } + + public RiskManagementType getRiskManagedBy() { + return riskManagedBy; + } + + public void setRiskManagedBy(RiskManagementType riskManagedBy) { + this.riskManagedBy = riskManagedBy; + } + + public String getVenue() { + return venue; + } + + public void setVenue(String venue) { + this.venue = venue; + } + + public String getGroupDescription() { + return groupDescription; + } + + public void setGroupDescription(String groupDescription) { + this.groupDescription = groupDescription; + } + + public String getContractExpiryTimezone() { + return contractExpiryTimezone; + } + + public void setContractExpiryTimezone(String contractExpiryTimezone) { + this.contractExpiryTimezone = contractExpiryTimezone; + } + + public String getGroupShortDescription() { + return groupShortDescription; + } + + public void setGroupShortDescription(String groupShortDescription) { + this.groupShortDescription = groupShortDescription; + } + + public PerpetualProductDetails getPerpetualDetails() { + return perpetualDetails; + } + + public void setPerpetualDetails(PerpetualProductDetails perpetualDetails) { + this.perpetualDetails = perpetualDetails; + } + + public static class Builder { private String contractCode; - /** - * Contract size - */ - @JsonProperty("contract_size") private String contractSize; - /** - * Contract expiry timestamp - */ - @JsonProperty("contract_expiry") private OffsetDateTime contractExpiry; - /** - * Contract root unit (underlying asset) - */ - @JsonProperty("contract_root_unit") private String contractRootUnit; - /** - * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type - * - CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract - * - CONTRACT_EXPIRY_TYPE_PERPETUAL: Perpetual futures contract (no expiry) - */ - @JsonProperty("contract_expiry_type") private ContractExpiryType contractExpiryType; - /** - * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type - * - RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) - * - RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue - */ - @JsonProperty("risk_managed_by") private RiskManagementType riskManagedBy; - /** - * The venue this product trades on - */ private String venue; - /** - * Descriptive name for the product group - */ - @JsonProperty("group_description") private String groupDescription; - /** - * IANA time zone for contract expiration - */ - @JsonProperty("contract_expiry_timezone") private String contractExpiryTimezone; - /** - * Short version of the group description - */ - @JsonProperty("group_short_description") private String groupShortDescription; - /** PerpetualProductDetails contains details specific to perpetual futures products */ - @JsonProperty("perpetual_details") private PerpetualProductDetails perpetualDetails; - public FutureProductDetails() { + public Builder contractCode(String contractCode) { + this.contractCode = contractCode; + return this; } - public FutureProductDetails(Builder builder) { - this.contractCode = builder.contractCode; - this.contractSize = builder.contractSize; - this.contractExpiry = builder.contractExpiry; - this.contractRootUnit = builder.contractRootUnit; - this.contractExpiryType = builder.contractExpiryType; - this.riskManagedBy = builder.riskManagedBy; - this.venue = builder.venue; - this.groupDescription = builder.groupDescription; - this.contractExpiryTimezone = builder.contractExpiryTimezone; - this.groupShortDescription = builder.groupShortDescription; - this.perpetualDetails = builder.perpetualDetails; - } - public String getContractCode() { - return contractCode; + public Builder contractSize(String contractSize) { + this.contractSize = contractSize; + return this; } - public void setContractCode(String contractCode) { - this.contractCode = contractCode; - } - public String getContractSize() { - return contractSize; + public Builder contractExpiry(OffsetDateTime contractExpiry) { + this.contractExpiry = contractExpiry; + return this; } - public void setContractSize(String contractSize) { - this.contractSize = contractSize; - } - public OffsetDateTime getContractExpiry() { - return contractExpiry; + public Builder contractRootUnit(String contractRootUnit) { + this.contractRootUnit = contractRootUnit; + return this; } - public void setContractExpiry(OffsetDateTime contractExpiry) { - this.contractExpiry = contractExpiry; - } - public String getContractRootUnit() { - return contractRootUnit; + public Builder contractExpiryType(ContractExpiryType contractExpiryType) { + this.contractExpiryType = contractExpiryType; + return this; } - public void setContractRootUnit(String contractRootUnit) { - this.contractRootUnit = contractRootUnit; - } - public ContractExpiryType getContractExpiryType() { - return contractExpiryType; + public Builder riskManagedBy(RiskManagementType riskManagedBy) { + this.riskManagedBy = riskManagedBy; + return this; } - public void setContractExpiryType(ContractExpiryType contractExpiryType) { - this.contractExpiryType = contractExpiryType; - } - public RiskManagementType getRiskManagedBy() { - return riskManagedBy; + public Builder venue(String venue) { + this.venue = venue; + return this; } - public void setRiskManagedBy(RiskManagementType riskManagedBy) { - this.riskManagedBy = riskManagedBy; - } - public String getVenue() { - return venue; + public Builder groupDescription(String groupDescription) { + this.groupDescription = groupDescription; + return this; } - public void setVenue(String venue) { - this.venue = venue; - } - public String getGroupDescription() { - return groupDescription; + public Builder contractExpiryTimezone(String contractExpiryTimezone) { + this.contractExpiryTimezone = contractExpiryTimezone; + return this; } - public void setGroupDescription(String groupDescription) { - this.groupDescription = groupDescription; - } - public String getContractExpiryTimezone() { - return contractExpiryTimezone; + public Builder groupShortDescription(String groupShortDescription) { + this.groupShortDescription = groupShortDescription; + return this; } - public void setContractExpiryTimezone(String contractExpiryTimezone) { - this.contractExpiryTimezone = contractExpiryTimezone; + public Builder perpetualDetails(PerpetualProductDetails perpetualDetails) { + this.perpetualDetails = perpetualDetails; + return this; } - public String getGroupShortDescription() { - return groupShortDescription; - } - - public void setGroupShortDescription(String groupShortDescription) { - this.groupShortDescription = groupShortDescription; - } - public PerpetualProductDetails getPerpetualDetails() { - return perpetualDetails; - } - - public void setPerpetualDetails(PerpetualProductDetails perpetualDetails) { - this.perpetualDetails = perpetualDetails; - } - public static class Builder { - private String contractCode; - - private String contractSize; - - private OffsetDateTime contractExpiry; - - private String contractRootUnit; - private ContractExpiryType contractExpiryType; - - private RiskManagementType riskManagedBy; - - private String venue; - - private String groupDescription; - - private String contractExpiryTimezone; - - private String groupShortDescription; - - private PerpetualProductDetails perpetualDetails; - - public Builder contractCode(String contractCode) { - this.contractCode = contractCode; - return this; - } - - public Builder contractSize(String contractSize) { - this.contractSize = contractSize; - return this; - } - - public Builder contractExpiry(OffsetDateTime contractExpiry) { - this.contractExpiry = contractExpiry; - return this; - } - - public Builder contractRootUnit(String contractRootUnit) { - this.contractRootUnit = contractRootUnit; - return this; - } - - public Builder contractExpiryType(ContractExpiryType contractExpiryType) { - this.contractExpiryType = contractExpiryType; - return this; - } - - public Builder riskManagedBy(RiskManagementType riskManagedBy) { - this.riskManagedBy = riskManagedBy; - return this; - } - - public Builder venue(String venue) { - this.venue = venue; - return this; - } - - public Builder groupDescription(String groupDescription) { - this.groupDescription = groupDescription; - return this; - } - - public Builder contractExpiryTimezone(String contractExpiryTimezone) { - this.contractExpiryTimezone = contractExpiryTimezone; - return this; - } - - public Builder groupShortDescription(String groupShortDescription) { - this.groupShortDescription = groupShortDescription; - return this; - } - - public Builder perpetualDetails(PerpetualProductDetails perpetualDetails) { - this.perpetualDetails = perpetualDetails; - return this; - } - - public FutureProductDetails build() { - return new FutureProductDetails(this); - } + public FutureProductDetails build() { + return new FutureProductDetails(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/FuturesSweep.java b/src/main/java/com/coinbase/prime/model/FuturesSweep.java index 3f07869..c5ddc69 100644 --- a/src/main/java/com/coinbase/prime/model/FuturesSweep.java +++ b/src/main/java/com/coinbase/prime/model/FuturesSweep.java @@ -17,118 +17,116 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.SweepAmount; + import com.coinbase.prime.model.enums.FuturesSweepStatus; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class FuturesSweep { - /** - * Sweep ID - */ - private String id; + /** Sweep ID */ + private String id; - @JsonProperty("requested_amount") - private SweepAmount requestedAmount; + @JsonProperty("requested_amount") + private SweepAmount requestedAmount; - /** - * Should sweep all - */ - @JsonProperty("should_sweep_all") - private boolean shouldSweepAll; + /** Should sweep all */ + @JsonProperty("should_sweep_all") + private boolean shouldSweepAll; - private FuturesSweepStatus status; + private FuturesSweepStatus status; - /** - * Scheduled time - */ - @JsonProperty("scheduled_time") - private OffsetDateTime scheduledTime; + /** Scheduled time */ + @JsonProperty("scheduled_time") + private OffsetDateTime scheduledTime; - public FuturesSweep() { - } + public FuturesSweep() {} - public FuturesSweep(Builder builder) { - this.id = builder.id; - this.requestedAmount = builder.requestedAmount; - this.shouldSweepAll = builder.shouldSweepAll; - this.status = builder.status; - this.scheduledTime = builder.scheduledTime; - } - public String getId() { - return id; - } + public FuturesSweep(Builder builder) { + this.id = builder.id; + this.requestedAmount = builder.requestedAmount; + this.shouldSweepAll = builder.shouldSweepAll; + this.status = builder.status; + this.scheduledTime = builder.scheduledTime; + } - public void setId(String id) { - this.id = id; - } - public SweepAmount getRequestedAmount() { - return requestedAmount; - } + public String getId() { + return id; + } - public void setRequestedAmount(SweepAmount requestedAmount) { - this.requestedAmount = requestedAmount; - } - public boolean getShouldSweepAll() { - return shouldSweepAll; - } + public void setId(String id) { + this.id = id; + } - public void setShouldSweepAll(boolean shouldSweepAll) { - this.shouldSweepAll = shouldSweepAll; - } - public FuturesSweepStatus getStatus() { - return status; - } + public SweepAmount getRequestedAmount() { + return requestedAmount; + } - public void setStatus(FuturesSweepStatus status) { - this.status = status; - } - public OffsetDateTime getScheduledTime() { - return scheduledTime; - } + public void setRequestedAmount(SweepAmount requestedAmount) { + this.requestedAmount = requestedAmount; + } - public void setScheduledTime(OffsetDateTime scheduledTime) { - this.scheduledTime = scheduledTime; - } - public static class Builder { - private String id; + public boolean getShouldSweepAll() { + return shouldSweepAll; + } - private SweepAmount requestedAmount; + public void setShouldSweepAll(boolean shouldSweepAll) { + this.shouldSweepAll = shouldSweepAll; + } - private boolean shouldSweepAll; + public FuturesSweepStatus getStatus() { + return status; + } - private FuturesSweepStatus status; + public void setStatus(FuturesSweepStatus status) { + this.status = status; + } - private OffsetDateTime scheduledTime; + public OffsetDateTime getScheduledTime() { + return scheduledTime; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setScheduledTime(OffsetDateTime scheduledTime) { + this.scheduledTime = scheduledTime; + } - public Builder requestedAmount(SweepAmount requestedAmount) { - this.requestedAmount = requestedAmount; - return this; - } + public static class Builder { + private String id; - public Builder shouldSweepAll(boolean shouldSweepAll) { - this.shouldSweepAll = shouldSweepAll; - return this; - } + private SweepAmount requestedAmount; - public Builder status(FuturesSweepStatus status) { - this.status = status; - return this; - } + private boolean shouldSweepAll; - public Builder scheduledTime(OffsetDateTime scheduledTime) { - this.scheduledTime = scheduledTime; - return this; - } + private FuturesSweepStatus status; - public FuturesSweep build() { - return new FuturesSweep(this); - } + private OffsetDateTime scheduledTime; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder requestedAmount(SweepAmount requestedAmount) { + this.requestedAmount = requestedAmount; + return this; } -} + public Builder shouldSweepAll(boolean shouldSweepAll) { + this.shouldSweepAll = shouldSweepAll; + return this; + } + + public Builder status(FuturesSweepStatus status) { + this.status = status; + return this; + } + + public Builder scheduledTime(OffsetDateTime scheduledTime) { + this.scheduledTime = scheduledTime; + return this; + } + + public FuturesSweep build() { + return new FuturesSweep(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Invoice.java b/src/main/java/com/coinbase/prime/model/Invoice.java index c666a2c..95598d6 100644 --- a/src/main/java/com/coinbase/prime/model/Invoice.java +++ b/src/main/java/com/coinbase/prime/model/Invoice.java @@ -17,183 +17,191 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.InvoiceItem; + import com.coinbase.prime.model.enums.InvoiceState; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Invoice */ public class Invoice { - private String id; + private String id; - @JsonProperty("billing_month") - private Integer billingMonth; + @JsonProperty("billing_month") + private Integer billingMonth; - @JsonProperty("billing_year") - private Integer billingYear; + @JsonProperty("billing_year") + private Integer billingYear; - @JsonProperty("due_date") - private String dueDate; + @JsonProperty("due_date") + private String dueDate; - @JsonProperty("invoice_number") - private String invoiceNumber; + @JsonProperty("invoice_number") + private String invoiceNumber; - /** States */ - private InvoiceState state; + /** States */ + private InvoiceState state; - @JsonProperty("usd_amount_paid") - private Double usdAmountPaid; + @JsonProperty("usd_amount_paid") + private Double usdAmountPaid; - @JsonProperty("usd_amount_owed") - private Double usdAmountOwed; + @JsonProperty("usd_amount_owed") + private Double usdAmountOwed; - @JsonProperty("invoice_items") - private List invoiceItems; + @JsonProperty("invoice_items") + private List invoiceItems; - public Invoice() { - } + public Invoice() {} - public Invoice(Builder builder) { - this.id = builder.id; - this.billingMonth = builder.billingMonth; - this.billingYear = builder.billingYear; - this.dueDate = builder.dueDate; - this.invoiceNumber = builder.invoiceNumber; - this.state = builder.state; - this.usdAmountPaid = builder.usdAmountPaid; - this.usdAmountOwed = builder.usdAmountOwed; - this.invoiceItems = builder.invoiceItems; - } - public String getId() { - return id; - } + public Invoice(Builder builder) { + this.id = builder.id; + this.billingMonth = builder.billingMonth; + this.billingYear = builder.billingYear; + this.dueDate = builder.dueDate; + this.invoiceNumber = builder.invoiceNumber; + this.state = builder.state; + this.usdAmountPaid = builder.usdAmountPaid; + this.usdAmountOwed = builder.usdAmountOwed; + this.invoiceItems = builder.invoiceItems; + } - public void setId(String id) { - this.id = id; - } - public Integer getBillingMonth() { - return billingMonth; - } + public String getId() { + return id; + } - public void setBillingMonth(Integer billingMonth) { - this.billingMonth = billingMonth; - } - public Integer getBillingYear() { - return billingYear; - } + public void setId(String id) { + this.id = id; + } - public void setBillingYear(Integer billingYear) { - this.billingYear = billingYear; - } - public String getDueDate() { - return dueDate; - } + public Integer getBillingMonth() { + return billingMonth; + } - public void setDueDate(String dueDate) { - this.dueDate = dueDate; - } - public String getInvoiceNumber() { - return invoiceNumber; - } + public void setBillingMonth(Integer billingMonth) { + this.billingMonth = billingMonth; + } - public void setInvoiceNumber(String invoiceNumber) { - this.invoiceNumber = invoiceNumber; - } - public InvoiceState getState() { - return state; - } + public Integer getBillingYear() { + return billingYear; + } - public void setState(InvoiceState state) { - this.state = state; - } - public Double getUsdAmountPaid() { - return usdAmountPaid; - } + public void setBillingYear(Integer billingYear) { + this.billingYear = billingYear; + } - public void setUsdAmountPaid(Double usdAmountPaid) { - this.usdAmountPaid = usdAmountPaid; - } - public Double getUsdAmountOwed() { - return usdAmountOwed; - } + public String getDueDate() { + return dueDate; + } - public void setUsdAmountOwed(Double usdAmountOwed) { - this.usdAmountOwed = usdAmountOwed; - } - public List getInvoiceItems() { - return invoiceItems; - } + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } - public void setInvoiceItems(List invoiceItems) { - this.invoiceItems = invoiceItems; - } - public static class Builder { - private String id; + public String getInvoiceNumber() { + return invoiceNumber; + } - private Integer billingMonth; + public void setInvoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + } - private Integer billingYear; + public InvoiceState getState() { + return state; + } - private String dueDate; + public void setState(InvoiceState state) { + this.state = state; + } - private String invoiceNumber; + public Double getUsdAmountPaid() { + return usdAmountPaid; + } - private InvoiceState state; + public void setUsdAmountPaid(Double usdAmountPaid) { + this.usdAmountPaid = usdAmountPaid; + } - private Double usdAmountPaid; + public Double getUsdAmountOwed() { + return usdAmountOwed; + } - private Double usdAmountOwed; + public void setUsdAmountOwed(Double usdAmountOwed) { + this.usdAmountOwed = usdAmountOwed; + } - private List invoiceItems; + public List getInvoiceItems() { + return invoiceItems; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setInvoiceItems(List invoiceItems) { + this.invoiceItems = invoiceItems; + } - public Builder billingMonth(Integer billingMonth) { - this.billingMonth = billingMonth; - return this; - } + public static class Builder { + private String id; - public Builder billingYear(Integer billingYear) { - this.billingYear = billingYear; - return this; - } + private Integer billingMonth; - public Builder dueDate(String dueDate) { - this.dueDate = dueDate; - return this; - } + private Integer billingYear; - public Builder invoiceNumber(String invoiceNumber) { - this.invoiceNumber = invoiceNumber; - return this; - } + private String dueDate; - public Builder state(InvoiceState state) { - this.state = state; - return this; - } + private String invoiceNumber; - public Builder usdAmountPaid(Double usdAmountPaid) { - this.usdAmountPaid = usdAmountPaid; - return this; - } + private InvoiceState state; - public Builder usdAmountOwed(Double usdAmountOwed) { - this.usdAmountOwed = usdAmountOwed; - return this; - } + private Double usdAmountPaid; - public Builder invoiceItems(List invoiceItems) { - this.invoiceItems = invoiceItems; - return this; - } + private Double usdAmountOwed; - public Invoice build() { - return new Invoice(this); - } + private List invoiceItems; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder billingMonth(Integer billingMonth) { + this.billingMonth = billingMonth; + return this; + } + + public Builder billingYear(Integer billingYear) { + this.billingYear = billingYear; + return this; } -} + public Builder dueDate(String dueDate) { + this.dueDate = dueDate; + return this; + } + + public Builder invoiceNumber(String invoiceNumber) { + this.invoiceNumber = invoiceNumber; + return this; + } + + public Builder state(InvoiceState state) { + this.state = state; + return this; + } + + public Builder usdAmountPaid(Double usdAmountPaid) { + this.usdAmountPaid = usdAmountPaid; + return this; + } + + public Builder usdAmountOwed(Double usdAmountOwed) { + this.usdAmountOwed = usdAmountOwed; + return this; + } + + public Builder invoiceItems(List invoiceItems) { + this.invoiceItems = invoiceItems; + return this; + } + + public Invoice build() { + return new Invoice(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/InvoiceItem.java b/src/main/java/com/coinbase/prime/model/InvoiceItem.java index 286f0a7..780c6dd 100644 --- a/src/main/java/com/coinbase/prime/model/InvoiceItem.java +++ b/src/main/java/com/coinbase/prime/model/InvoiceItem.java @@ -17,160 +17,168 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.InvoiceType; import com.fasterxml.jackson.annotation.JsonProperty; /** Invoice item */ public class InvoiceItem { - private String description; + private String description; - @JsonProperty("currency_symbol") - private String currencySymbol; + @JsonProperty("currency_symbol") + private String currencySymbol; - /** Types */ - @JsonProperty("invoice_type") - private InvoiceType invoiceType; + /** Types */ + @JsonProperty("invoice_type") + private InvoiceType invoiceType; - private Double rate; + private Double rate; - private Double quantity; + private Double quantity; - private Double price; + private Double price; - @JsonProperty("average_auc") - private Double averageAuc; + @JsonProperty("average_auc") + private Double averageAuc; - private Double total; + private Double total; - public InvoiceItem() { - } + public InvoiceItem() {} - public InvoiceItem(Builder builder) { - this.description = builder.description; - this.currencySymbol = builder.currencySymbol; - this.invoiceType = builder.invoiceType; - this.rate = builder.rate; - this.quantity = builder.quantity; - this.price = builder.price; - this.averageAuc = builder.averageAuc; - this.total = builder.total; - } - public String getDescription() { - return description; - } + public InvoiceItem(Builder builder) { + this.description = builder.description; + this.currencySymbol = builder.currencySymbol; + this.invoiceType = builder.invoiceType; + this.rate = builder.rate; + this.quantity = builder.quantity; + this.price = builder.price; + this.averageAuc = builder.averageAuc; + this.total = builder.total; + } - public void setDescription(String description) { - this.description = description; - } - public String getCurrencySymbol() { - return currencySymbol; - } + public String getDescription() { + return description; + } - public void setCurrencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - } - public InvoiceType getInvoiceType() { - return invoiceType; - } + public void setDescription(String description) { + this.description = description; + } - public void setInvoiceType(InvoiceType invoiceType) { - this.invoiceType = invoiceType; - } - public Double getRate() { - return rate; - } + public String getCurrencySymbol() { + return currencySymbol; + } - public void setRate(Double rate) { - this.rate = rate; - } - public Double getQuantity() { - return quantity; - } + public void setCurrencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + } - public void setQuantity(Double quantity) { - this.quantity = quantity; - } - public Double getPrice() { - return price; - } + public InvoiceType getInvoiceType() { + return invoiceType; + } - public void setPrice(Double price) { - this.price = price; - } - public Double getAverageAuc() { - return averageAuc; - } + public void setInvoiceType(InvoiceType invoiceType) { + this.invoiceType = invoiceType; + } - public void setAverageAuc(Double averageAuc) { - this.averageAuc = averageAuc; - } - public Double getTotal() { - return total; - } + public Double getRate() { + return rate; + } - public void setTotal(Double total) { - this.total = total; - } - public static class Builder { - private String description; + public void setRate(Double rate) { + this.rate = rate; + } - private String currencySymbol; + public Double getQuantity() { + return quantity; + } - private InvoiceType invoiceType; + public void setQuantity(Double quantity) { + this.quantity = quantity; + } - private Double rate; + public Double getPrice() { + return price; + } - private Double quantity; + public void setPrice(Double price) { + this.price = price; + } - private Double price; + public Double getAverageAuc() { + return averageAuc; + } - private Double averageAuc; + public void setAverageAuc(Double averageAuc) { + this.averageAuc = averageAuc; + } - private Double total; + public Double getTotal() { + return total; + } - public Builder description(String description) { - this.description = description; - return this; - } + public void setTotal(Double total) { + this.total = total; + } - public Builder currencySymbol(String currencySymbol) { - this.currencySymbol = currencySymbol; - return this; - } + public static class Builder { + private String description; - public Builder invoiceType(InvoiceType invoiceType) { - this.invoiceType = invoiceType; - return this; - } + private String currencySymbol; - public Builder rate(Double rate) { - this.rate = rate; - return this; - } + private InvoiceType invoiceType; - public Builder quantity(Double quantity) { - this.quantity = quantity; - return this; - } + private Double rate; - public Builder price(Double price) { - this.price = price; - return this; - } + private Double quantity; - public Builder averageAuc(Double averageAuc) { - this.averageAuc = averageAuc; - return this; - } + private Double price; - public Builder total(Double total) { - this.total = total; - return this; - } + private Double averageAuc; - public InvoiceItem build() { - return new InvoiceItem(this); - } + private Double total; + + public Builder description(String description) { + this.description = description; + return this; + } + + public Builder currencySymbol(String currencySymbol) { + this.currencySymbol = currencySymbol; + return this; + } + + public Builder invoiceType(InvoiceType invoiceType) { + this.invoiceType = invoiceType; + return this; + } + + public Builder rate(Double rate) { + this.rate = rate; + return this; + } + + public Builder quantity(Double quantity) { + this.quantity = quantity; + return this; + } + + public Builder price(Double price) { + this.price = price; + return this; } -} + public Builder averageAuc(Double averageAuc) { + this.averageAuc = averageAuc; + return this; + } + + public Builder total(Double total) { + this.total = total; + return this; + } + + public InvoiceItem build() { + return new InvoiceItem(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java index 47b85d6..d22753e 100644 --- a/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/LimitOrderEdit.java @@ -17,170 +17,178 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** LimitOrderEdit represents an order edit that is accepted */ public class LimitOrderEdit { - /** New price for the edited order */ + /** New price for the edited order */ + private String price; + + /** New size for the edited order */ + private String size; + + /** New display size for the edited order */ + @JsonProperty("display_size") + private String displaySize; + + /** New stop price for the edited order */ + @JsonProperty("stop_price") + private String stopPrice; + + /** New stop limit price for the edited order */ + @JsonProperty("stop_limit_price") + private String stopLimitPrice; + + /** New end time for the edited order */ + @JsonProperty("end_time") + private OffsetDateTime endTime; + + /** Time when the edit was accepted */ + @JsonProperty("accept_time") + private OffsetDateTime acceptTime; + + /** Client order id of the order being replaced */ + @JsonProperty("client_order_id") + private String clientOrderId; + + public LimitOrderEdit() {} + + public LimitOrderEdit(Builder builder) { + this.price = builder.price; + this.size = builder.size; + this.displaySize = builder.displaySize; + this.stopPrice = builder.stopPrice; + this.stopLimitPrice = builder.stopLimitPrice; + this.endTime = builder.endTime; + this.acceptTime = builder.acceptTime; + this.clientOrderId = builder.clientOrderId; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size; + } + + public String getDisplaySize() { + return displaySize; + } + + public void setDisplaySize(String displaySize) { + this.displaySize = displaySize; + } + + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(String stopPrice) { + this.stopPrice = stopPrice; + } + + public String getStopLimitPrice() { + return stopLimitPrice; + } + + public void setStopLimitPrice(String stopLimitPrice) { + this.stopLimitPrice = stopLimitPrice; + } + + public OffsetDateTime getEndTime() { + return endTime; + } + + public void setEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + } + + public OffsetDateTime getAcceptTime() { + return acceptTime; + } + + public void setAcceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + } + + public String getClientOrderId() { + return clientOrderId; + } + + public void setClientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + } + + public static class Builder { private String price; - /** New size for the edited order */ private String size; - /** New display size for the edited order */ - @JsonProperty("display_size") private String displaySize; - /** New stop price for the edited order */ - @JsonProperty("stop_price") private String stopPrice; - /** New stop limit price for the edited order */ - @JsonProperty("stop_limit_price") private String stopLimitPrice; - /** New end time for the edited order */ - @JsonProperty("end_time") private OffsetDateTime endTime; - /** Time when the edit was accepted */ - @JsonProperty("accept_time") private OffsetDateTime acceptTime; - /** Client order id of the order being replaced */ - @JsonProperty("client_order_id") private String clientOrderId; - public LimitOrderEdit() { - } - - public LimitOrderEdit(Builder builder) { - this.price = builder.price; - this.size = builder.size; - this.displaySize = builder.displaySize; - this.stopPrice = builder.stopPrice; - this.stopLimitPrice = builder.stopLimitPrice; - this.endTime = builder.endTime; - this.acceptTime = builder.acceptTime; - this.clientOrderId = builder.clientOrderId; - } - public String getPrice() { - return price; + public Builder price(String price) { + this.price = price; + return this; } - public void setPrice(String price) { - this.price = price; - } - public String getSize() { - return size; + public Builder size(String size) { + this.size = size; + return this; } - public void setSize(String size) { - this.size = size; - } - public String getDisplaySize() { - return displaySize; + public Builder displaySize(String displaySize) { + this.displaySize = displaySize; + return this; } - public void setDisplaySize(String displaySize) { - this.displaySize = displaySize; - } - public String getStopPrice() { - return stopPrice; + public Builder stopPrice(String stopPrice) { + this.stopPrice = stopPrice; + return this; } - public void setStopPrice(String stopPrice) { - this.stopPrice = stopPrice; - } - public String getStopLimitPrice() { - return stopLimitPrice; + public Builder stopLimitPrice(String stopLimitPrice) { + this.stopLimitPrice = stopLimitPrice; + return this; } - public void setStopLimitPrice(String stopLimitPrice) { - this.stopLimitPrice = stopLimitPrice; - } - public OffsetDateTime getEndTime() { - return endTime; + public Builder endTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; } - public void setEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - } - public OffsetDateTime getAcceptTime() { - return acceptTime; + public Builder acceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + return this; } - public void setAcceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - } - public String getClientOrderId() { - return clientOrderId; + public Builder clientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; } - public void setClientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - } - public static class Builder { - private String price; - - private String size; - - private String displaySize; - - private String stopPrice; - - private String stopLimitPrice; - - private OffsetDateTime endTime; - - private OffsetDateTime acceptTime; - - private String clientOrderId; - - public Builder price(String price) { - this.price = price; - return this; - } - - public Builder size(String size) { - this.size = size; - return this; - } - - public Builder displaySize(String displaySize) { - this.displaySize = displaySize; - return this; - } - - public Builder stopPrice(String stopPrice) { - this.stopPrice = stopPrice; - return this; - } - - public Builder stopLimitPrice(String stopLimitPrice) { - this.stopLimitPrice = stopLimitPrice; - return this; - } - - public Builder endTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - public Builder acceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - return this; - } - - public Builder clientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; - } - - public LimitOrderEdit build() { - return new LimitOrderEdit(this); - } + public LimitOrderEdit build() { + return new LimitOrderEdit(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/LoanInfo.java b/src/main/java/com/coinbase/prime/model/LoanInfo.java index 2d91acd..8a30363 100644 --- a/src/main/java/com/coinbase/prime/model/LoanInfo.java +++ b/src/main/java/com/coinbase/prime/model/LoanInfo.java @@ -17,121 +17,116 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class LoanInfo { - /** - * The unique ID of the portfolio - */ - @JsonProperty("portfolio_id") - private String portfolioId; + /** The unique ID of the portfolio */ + @JsonProperty("portfolio_id") + private String portfolioId; - /** - * The currency symbol - */ - private String symbol; + /** The currency symbol */ + private String symbol; - /** - * Balance amount - */ - private String amount; + /** Balance amount */ + private String amount; - /** - * Notional balance amount - */ - @JsonProperty("notional_amount") - private String notionalAmount; + /** Notional balance amount */ + @JsonProperty("notional_amount") + private String notionalAmount; - /** - * Settlement due date - */ - @JsonProperty("due_date") - private String dueDate; + /** Settlement due date */ + @JsonProperty("due_date") + private String dueDate; - public LoanInfo() { - } + public LoanInfo() {} - public LoanInfo(Builder builder) { - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.amount = builder.amount; - this.notionalAmount = builder.notionalAmount; - this.dueDate = builder.dueDate; - } - public String getPortfolioId() { - return portfolioId; - } + public LoanInfo(Builder builder) { + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.amount = builder.amount; + this.notionalAmount = builder.notionalAmount; + this.dueDate = builder.dueDate; + } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getSymbol() { - return symbol; - } + public String getPortfolioId() { + return portfolioId; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getAmount() { - return amount; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } - public void setAmount(String amount) { - this.amount = amount; - } - public String getNotionalAmount() { - return notionalAmount; - } + public String getSymbol() { + return symbol; + } - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } - public String getDueDate() { - return dueDate; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setDueDate(String dueDate) { - this.dueDate = dueDate; - } - public static class Builder { - private String portfolioId; + public String getAmount() { + return amount; + } - private String symbol; + public void setAmount(String amount) { + this.amount = amount; + } - private String amount; + public String getNotionalAmount() { + return notionalAmount; + } - private String notionalAmount; + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } - private String dueDate; + public String getDueDate() { + return dueDate; + } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public static class Builder { + private String portfolioId; - public Builder amount(String amount) { - this.amount = amount; - return this; - } + private String symbol; - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; - } + private String amount; - public Builder dueDate(String dueDate) { - this.dueDate = dueDate; - return this; - } + private String notionalAmount; - public LoanInfo build() { - return new LoanInfo(this); - } + private String dueDate; + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; + } + + public Builder dueDate(String dueDate) { + this.dueDate = dueDate; + return this; + } + + public LoanInfo build() { + return new LoanInfo(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Locate.java b/src/main/java/com/coinbase/prime/model/Locate.java index e6cba3c..be312b2 100644 --- a/src/main/java/com/coinbase/prime/model/Locate.java +++ b/src/main/java/com/coinbase/prime/model/Locate.java @@ -19,75 +19,71 @@ package com.coinbase.prime.model; public class Locate { - /** - * The currency symbol - */ - private String symbol; + /** The currency symbol */ + private String symbol; - /** - * The available quantity located - */ - private String quantity; + /** The available quantity located */ + private String quantity; - /** - * The interest rate for located symbol - */ - private String rate; + /** The interest rate for located symbol */ + private String rate; - public Locate() { - } + public Locate() {} - public Locate(Builder builder) { - this.symbol = builder.symbol; - this.quantity = builder.quantity; - this.rate = builder.rate; - } - public String getSymbol() { - return symbol; - } + public Locate(Builder builder) { + this.symbol = builder.symbol; + this.quantity = builder.quantity; + this.rate = builder.rate; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getQuantity() { - return quantity; - } + public String getSymbol() { + return symbol; + } - public void setQuantity(String quantity) { - this.quantity = quantity; - } - public String getRate() { - return rate; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setRate(String rate) { - this.rate = rate; - } - public static class Builder { - private String symbol; + public String getQuantity() { + return quantity; + } - private String quantity; + public void setQuantity(String quantity) { + this.quantity = quantity; + } - private String rate; + public String getRate() { + return rate; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setRate(String rate) { + this.rate = rate; + } - public Builder quantity(String quantity) { - this.quantity = quantity; - return this; - } + public static class Builder { + private String symbol; + + private String quantity; - public Builder rate(String rate) { - this.rate = rate; - return this; - } + private String rate; - public Locate build() { - return new Locate(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder quantity(String quantity) { + this.quantity = quantity; + return this; + } + + public Builder rate(String rate) { + this.rate = rate; + return this; + } + + public Locate build() { + return new Locate(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/MarginAddOn.java b/src/main/java/com/coinbase/prime/model/MarginAddOn.java index 4d320be..d0c49cd 100644 --- a/src/main/java/com/coinbase/prime/model/MarginAddOn.java +++ b/src/main/java/com/coinbase/prime/model/MarginAddOn.java @@ -17,57 +17,57 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.MarginAddOnType; import com.fasterxml.jackson.annotation.JsonProperty; public class MarginAddOn { - /** - * margin add on amount - */ - private String amount; + /** margin add on amount */ + private String amount; - @JsonProperty("add_on_type") - private MarginAddOnType addOnType; + @JsonProperty("add_on_type") + private MarginAddOnType addOnType; - public MarginAddOn() { - } + public MarginAddOn() {} - public MarginAddOn(Builder builder) { - this.amount = builder.amount; - this.addOnType = builder.addOnType; - } - public String getAmount() { - return amount; - } + public MarginAddOn(Builder builder) { + this.amount = builder.amount; + this.addOnType = builder.addOnType; + } - public void setAmount(String amount) { - this.amount = amount; - } - public MarginAddOnType getAddOnType() { - return addOnType; - } + public String getAmount() { + return amount; + } - public void setAddOnType(MarginAddOnType addOnType) { - this.addOnType = addOnType; - } - public static class Builder { - private String amount; + public void setAmount(String amount) { + this.amount = amount; + } - private MarginAddOnType addOnType; + public MarginAddOnType getAddOnType() { + return addOnType; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public void setAddOnType(MarginAddOnType addOnType) { + this.addOnType = addOnType; + } - public Builder addOnType(MarginAddOnType addOnType) { - this.addOnType = addOnType; - return this; - } + public static class Builder { + private String amount; + + private MarginAddOnType addOnType; - public MarginAddOn build() { - return new MarginAddOn(this); - } + public Builder amount(String amount) { + this.amount = amount; + return this; } -} + public Builder addOnType(MarginAddOnType addOnType) { + this.addOnType = addOnType; + return this; + } + + public MarginAddOn build() { + return new MarginAddOn(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/MarginCallRecord.java b/src/main/java/com/coinbase/prime/model/MarginCallRecord.java index ee52984..3c87f9f 100644 --- a/src/main/java/com/coinbase/prime/model/MarginCallRecord.java +++ b/src/main/java/com/coinbase/prime/model/MarginCallRecord.java @@ -17,123 +17,118 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class MarginCallRecord { - /** - * The unique ID of the margin call - */ - @JsonProperty("margin_call_id") - private String marginCallId; + /** The unique ID of the margin call */ + @JsonProperty("margin_call_id") + private String marginCallId; - /** - * The initial margin call amount in notional value - */ - @JsonProperty("initial_notional_amount") - private String initialNotionalAmount; + /** The initial margin call amount in notional value */ + @JsonProperty("initial_notional_amount") + private String initialNotionalAmount; - /** - * The outstanding margin call amount in notional value - */ - @JsonProperty("outstanding_notional_amount") - private String outstandingNotionalAmount; + /** The outstanding margin call amount in notional value */ + @JsonProperty("outstanding_notional_amount") + private String outstandingNotionalAmount; - /** - * The time the margin call is created in RFC3330 format - */ - @JsonProperty("created_at") - private String createdAt; + /** The time the margin call is created in RFC3330 format */ + @JsonProperty("created_at") + private String createdAt; - /** - * The time the margin call is due in RFC3339 format - */ - @JsonProperty("due_at") - private String dueAt; + /** The time the margin call is due in RFC3339 format */ + @JsonProperty("due_at") + private String dueAt; - public MarginCallRecord() { - } + public MarginCallRecord() {} - public MarginCallRecord(Builder builder) { - this.marginCallId = builder.marginCallId; - this.initialNotionalAmount = builder.initialNotionalAmount; - this.outstandingNotionalAmount = builder.outstandingNotionalAmount; - this.createdAt = builder.createdAt; - this.dueAt = builder.dueAt; - } - public String getMarginCallId() { - return marginCallId; - } + public MarginCallRecord(Builder builder) { + this.marginCallId = builder.marginCallId; + this.initialNotionalAmount = builder.initialNotionalAmount; + this.outstandingNotionalAmount = builder.outstandingNotionalAmount; + this.createdAt = builder.createdAt; + this.dueAt = builder.dueAt; + } - public void setMarginCallId(String marginCallId) { - this.marginCallId = marginCallId; - } - public String getInitialNotionalAmount() { - return initialNotionalAmount; - } + public String getMarginCallId() { + return marginCallId; + } - public void setInitialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - } - public String getOutstandingNotionalAmount() { - return outstandingNotionalAmount; - } + public void setMarginCallId(String marginCallId) { + this.marginCallId = marginCallId; + } - public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - } - public String getCreatedAt() { - return createdAt; - } + public String getInitialNotionalAmount() { + return initialNotionalAmount; + } - public void setCreatedAt(String createdAt) { - this.createdAt = createdAt; - } - public String getDueAt() { - return dueAt; - } + public void setInitialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + } - public void setDueAt(String dueAt) { - this.dueAt = dueAt; - } - public static class Builder { - private String marginCallId; + public String getOutstandingNotionalAmount() { + return outstandingNotionalAmount; + } - private String initialNotionalAmount; + public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + } - private String outstandingNotionalAmount; + public String getCreatedAt() { + return createdAt; + } - private String createdAt; + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } - private String dueAt; + public String getDueAt() { + return dueAt; + } - public Builder marginCallId(String marginCallId) { - this.marginCallId = marginCallId; - return this; - } + public void setDueAt(String dueAt) { + this.dueAt = dueAt; + } - public Builder initialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - return this; - } + public static class Builder { + private String marginCallId; - public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - return this; - } + private String initialNotionalAmount; - public Builder createdAt(String createdAt) { - this.createdAt = createdAt; - return this; - } + private String outstandingNotionalAmount; - public Builder dueAt(String dueAt) { - this.dueAt = dueAt; - return this; - } + private String createdAt; - public MarginCallRecord build() { - return new MarginCallRecord(this); - } + private String dueAt; + + public Builder marginCallId(String marginCallId) { + this.marginCallId = marginCallId; + return this; + } + + public Builder initialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + return this; } -} + public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + return this; + } + + public Builder createdAt(String createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder dueAt(String dueAt) { + this.dueAt = dueAt; + return this; + } + + public MarginCallRecord build() { + return new MarginCallRecord(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/MarginInformation.java b/src/main/java/com/coinbase/prime/model/MarginInformation.java index 625c2f0..5eca711 100644 --- a/src/main/java/com/coinbase/prime/model/MarginInformation.java +++ b/src/main/java/com/coinbase/prime/model/MarginInformation.java @@ -17,60 +17,58 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.MarginCallRecord; -import com.coinbase.prime.model.MarginSummary; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class MarginInformation { - /** - * The current margin call records - */ - @JsonProperty("margin_call_records") - private List marginCallRecords; + /** The current margin call records */ + @JsonProperty("margin_call_records") + private List marginCallRecords; - @JsonProperty("margin_summary") - private MarginSummary marginSummary; + @JsonProperty("margin_summary") + private MarginSummary marginSummary; - public MarginInformation() { - } + public MarginInformation() {} - public MarginInformation(Builder builder) { - this.marginCallRecords = builder.marginCallRecords; - this.marginSummary = builder.marginSummary; - } - public List getMarginCallRecords() { - return marginCallRecords; - } + public MarginInformation(Builder builder) { + this.marginCallRecords = builder.marginCallRecords; + this.marginSummary = builder.marginSummary; + } - public void setMarginCallRecords(List marginCallRecords) { - this.marginCallRecords = marginCallRecords; - } - public MarginSummary getMarginSummary() { - return marginSummary; - } + public List getMarginCallRecords() { + return marginCallRecords; + } - public void setMarginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - } - public static class Builder { - private List marginCallRecords; + public void setMarginCallRecords(List marginCallRecords) { + this.marginCallRecords = marginCallRecords; + } - private MarginSummary marginSummary; + public MarginSummary getMarginSummary() { + return marginSummary; + } - public Builder marginCallRecords(List marginCallRecords) { - this.marginCallRecords = marginCallRecords; - return this; - } + public void setMarginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + } - public Builder marginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - return this; - } + public static class Builder { + private List marginCallRecords; + + private MarginSummary marginSummary; - public MarginInformation build() { - return new MarginInformation(this); - } + public Builder marginCallRecords(List marginCallRecords) { + this.marginCallRecords = marginCallRecords; + return this; } -} + public Builder marginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + return this; + } + + public MarginInformation build() { + return new MarginInformation(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/MarginSummary.java b/src/main/java/com/coinbase/prime/model/MarginSummary.java index d414573..7da1753 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummary.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummary.java @@ -17,692 +17,675 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.AssetBalance; -import com.coinbase.prime.model.LoanInfo; -import com.coinbase.prime.model.MarginAddOn; -import com.coinbase.prime.model.MarketRate; -import com.coinbase.prime.model.PmAssetInfo; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class MarginSummary { - /** - * The unique ID of the entity - */ - @JsonProperty("entity_id") + /** The unique ID of the entity */ + @JsonProperty("entity_id") + private String entityId; + + /** + * The margin equity at the entity level. Margin Equity = LMV + SMV + Trading Cash Balance + + * Short Collateral - Pending Withdrawals + */ + @JsonProperty("margin_equity") + private String marginEquity; + + /** USD notional value of required equity in entity portfolios */ + @JsonProperty("margin_requirement") + private String marginRequirement; + + /** margin_equity - margin_requirement */ + @JsonProperty("excess_deficit") + private String excessDeficit; + + /** The raw amount of portfolio margin credit used */ + @JsonProperty("pm_credit_consumed") + private String pmCreditConsumed; + + /** + * The maximum trade finance credit limit. This field is deprecated and will be removed in the + * future. + */ + @JsonProperty("tf_credit_limit") + private String tfCreditLimit; + + /** + * The amount of trade finance credit used (USD). This field is deprecated and will be removed in + * the future. + */ + @JsonProperty("tf_credit_consumed") + private String tfCreditConsumed; + + /** TF Asset Adjusted Value (USD). This field is deprecated and will be removed in the future. */ + @JsonProperty("tf_adjusted_asset_value") + private String tfAdjustedAssetValue; + + /** + * TF Adjusted Liability Value (USD). This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_adjusted_liability_value") + private String tfAdjustedLiabilityValue; + + /** + * The amount of adjusted credit used. This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_adjusted_credit_consumed") + private String tfAdjustedCreditConsumed; + + /** The amount of adjusted equity. This field is deprecated and will be removed in the future. */ + @JsonProperty("tf_adjusted_equity") + private String tfAdjustedEquity; + + /** Whether or not a entity is frozen due to balance outstanding or other reason */ + private boolean frozen; + + /** The reason why a entity is frozen */ + @JsonProperty("frozen_reason") + private String frozenReason; + + /** + * Whether TF is enabled for the entity. This field is deprecated and will be removed in the + * future. + */ + @JsonProperty("tf_enabled") + private boolean tfEnabled; + + /** Whether PM is enabled for the entity */ + @JsonProperty("pm_enabled") + private boolean pmEnabled; + + /** Market rates for the list of assets */ + @JsonProperty("market_rates") + private List marketRates; + + /** Asset Balances across portfolios */ + @JsonProperty("asset_balances") + private List assetBalances; + + /** + * Trade finance debit loan amounts. This field is deprecated and will be removed in the future. + */ + @JsonProperty("tf_loans") + private List tfLoans; + + /** Portfolio Margin debit loan amounts */ + @JsonProperty("pm_loans") + private List pmLoans; + + /** Short collateral amounts */ + @JsonProperty("short_collateral") + private List shortCollateral; + + /** Gross market value (GMV) = LMV + Abs (SMV) */ + @JsonProperty("gross_market_value") + private String grossMarketValue; + + /** Net Market Value (NMV) = LMV + SMV */ + @JsonProperty("net_market_value") + private String netMarketValue; + + /** Long Market Value (LMV) = Sum of positive notional for all assets */ + @JsonProperty("long_market_value") + private String longMarketValue; + + /** Non_Marginable LMV: Sum of positive notional for each non-margin eligible coin */ + @JsonProperty("non_marginable_long_market_value") + private String nonMarginableLongMarketValue; + + /** 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 */ + @JsonProperty("gross_leverage") + private String grossLeverage; + + /** Net Exposure = (LMV + SMV) / GMV */ + @JsonProperty("net_exposure") + private String netExposure; + + @JsonProperty("portfolio_stress_triggered") + private MarginAddOn portfolioStressTriggered; + + /** PM asset info netted across the entity */ + @JsonProperty("pm_asset_info") + private List pmAssetInfo; + + /** PM limit that monitors gross notional borrowings (crypto + fiat) */ + @JsonProperty("pm_credit_limit") + private String pmCreditLimit; + + /** PM limit that monitors excess deficit */ + @JsonProperty("pm_margin_limit") + private String pmMarginLimit; + + /** The amount of the margin limit that is consumed by the excess deficit */ + @JsonProperty("pm_margin_consumed") + private String pmMarginConsumed; + + public MarginSummary() {} + + public MarginSummary(Builder builder) { + this.entityId = builder.entityId; + this.marginEquity = builder.marginEquity; + this.marginRequirement = builder.marginRequirement; + this.excessDeficit = builder.excessDeficit; + this.pmCreditConsumed = builder.pmCreditConsumed; + this.tfCreditLimit = builder.tfCreditLimit; + this.tfCreditConsumed = builder.tfCreditConsumed; + this.tfAdjustedAssetValue = builder.tfAdjustedAssetValue; + this.tfAdjustedLiabilityValue = builder.tfAdjustedLiabilityValue; + this.tfAdjustedCreditConsumed = builder.tfAdjustedCreditConsumed; + this.tfAdjustedEquity = builder.tfAdjustedEquity; + this.frozen = builder.frozen; + this.frozenReason = builder.frozenReason; + this.tfEnabled = builder.tfEnabled; + this.pmEnabled = builder.pmEnabled; + this.marketRates = builder.marketRates; + this.assetBalances = builder.assetBalances; + this.tfLoans = builder.tfLoans; + this.pmLoans = builder.pmLoans; + this.shortCollateral = builder.shortCollateral; + this.grossMarketValue = builder.grossMarketValue; + this.netMarketValue = builder.netMarketValue; + this.longMarketValue = builder.longMarketValue; + this.nonMarginableLongMarketValue = builder.nonMarginableLongMarketValue; + this.shortMarketValue = builder.shortMarketValue; + this.grossLeverage = builder.grossLeverage; + this.netExposure = builder.netExposure; + this.portfolioStressTriggered = builder.portfolioStressTriggered; + this.pmAssetInfo = builder.pmAssetInfo; + this.pmCreditLimit = builder.pmCreditLimit; + this.pmMarginLimit = builder.pmMarginLimit; + this.pmMarginConsumed = builder.pmMarginConsumed; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public String getMarginEquity() { + return marginEquity; + } + + public void setMarginEquity(String marginEquity) { + this.marginEquity = marginEquity; + } + + public String getMarginRequirement() { + return marginRequirement; + } + + public void setMarginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + } + + public String getExcessDeficit() { + return excessDeficit; + } + + public void setExcessDeficit(String excessDeficit) { + this.excessDeficit = excessDeficit; + } + + public String getPmCreditConsumed() { + return pmCreditConsumed; + } + + public void setPmCreditConsumed(String pmCreditConsumed) { + this.pmCreditConsumed = pmCreditConsumed; + } + + public String getTfCreditLimit() { + return tfCreditLimit; + } + + public void setTfCreditLimit(String tfCreditLimit) { + this.tfCreditLimit = tfCreditLimit; + } + + public String getTfCreditConsumed() { + return tfCreditConsumed; + } + + public void setTfCreditConsumed(String tfCreditConsumed) { + this.tfCreditConsumed = tfCreditConsumed; + } + + public String getTfAdjustedAssetValue() { + return tfAdjustedAssetValue; + } + + public void setTfAdjustedAssetValue(String tfAdjustedAssetValue) { + this.tfAdjustedAssetValue = tfAdjustedAssetValue; + } + + public String getTfAdjustedLiabilityValue() { + return tfAdjustedLiabilityValue; + } + + public void setTfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { + this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; + } + + public String getTfAdjustedCreditConsumed() { + return tfAdjustedCreditConsumed; + } + + public void setTfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { + this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; + } + + public String getTfAdjustedEquity() { + return tfAdjustedEquity; + } + + public void setTfAdjustedEquity(String tfAdjustedEquity) { + this.tfAdjustedEquity = tfAdjustedEquity; + } + + public boolean getFrozen() { + return frozen; + } + + public void setFrozen(boolean frozen) { + this.frozen = frozen; + } + + public String getFrozenReason() { + return frozenReason; + } + + public void setFrozenReason(String frozenReason) { + this.frozenReason = frozenReason; + } + + public boolean getTfEnabled() { + return tfEnabled; + } + + public void setTfEnabled(boolean tfEnabled) { + this.tfEnabled = tfEnabled; + } + + public boolean getPmEnabled() { + return pmEnabled; + } + + public void setPmEnabled(boolean pmEnabled) { + this.pmEnabled = pmEnabled; + } + + public List getMarketRates() { + return marketRates; + } + + public void setMarketRates(List marketRates) { + this.marketRates = marketRates; + } + + public List getAssetBalances() { + return assetBalances; + } + + public void setAssetBalances(List assetBalances) { + this.assetBalances = assetBalances; + } + + public List getTfLoans() { + return tfLoans; + } + + public void setTfLoans(List tfLoans) { + this.tfLoans = tfLoans; + } + + public List getPmLoans() { + return pmLoans; + } + + public void setPmLoans(List pmLoans) { + this.pmLoans = pmLoans; + } + + public List getShortCollateral() { + return shortCollateral; + } + + public void setShortCollateral(List shortCollateral) { + this.shortCollateral = shortCollateral; + } + + public String getGrossMarketValue() { + return grossMarketValue; + } + + public void setGrossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + } + + public String getNetMarketValue() { + return netMarketValue; + } + + public void setNetMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + } + + public String getLongMarketValue() { + return longMarketValue; + } + + public void setLongMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + } + + public String getNonMarginableLongMarketValue() { + return nonMarginableLongMarketValue; + } + + public void setNonMarginableLongMarketValue(String nonMarginableLongMarketValue) { + this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; + } + + public String getShortMarketValue() { + return shortMarketValue; + } + + public void setShortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + } + + public String getGrossLeverage() { + return grossLeverage; + } + + public void setGrossLeverage(String grossLeverage) { + this.grossLeverage = grossLeverage; + } + + public String getNetExposure() { + return netExposure; + } + + public void setNetExposure(String netExposure) { + this.netExposure = netExposure; + } + + public MarginAddOn getPortfolioStressTriggered() { + return portfolioStressTriggered; + } + + public void setPortfolioStressTriggered(MarginAddOn portfolioStressTriggered) { + this.portfolioStressTriggered = portfolioStressTriggered; + } + + public List getPmAssetInfo() { + return pmAssetInfo; + } + + public void setPmAssetInfo(List pmAssetInfo) { + this.pmAssetInfo = pmAssetInfo; + } + + public String getPmCreditLimit() { + return pmCreditLimit; + } + + public void setPmCreditLimit(String pmCreditLimit) { + this.pmCreditLimit = pmCreditLimit; + } + + public String getPmMarginLimit() { + return pmMarginLimit; + } + + public void setPmMarginLimit(String pmMarginLimit) { + this.pmMarginLimit = pmMarginLimit; + } + + public String getPmMarginConsumed() { + return pmMarginConsumed; + } + + public void setPmMarginConsumed(String pmMarginConsumed) { + this.pmMarginConsumed = pmMarginConsumed; + } + + public static class Builder { private String entityId; - /** - * The margin equity at the entity level. Margin Equity = LMV + SMV + Trading Cash Balance + Short Collateral - Pending Withdrawals - */ - @JsonProperty("margin_equity") private String marginEquity; - /** - * USD notional value of required equity in entity portfolios - */ - @JsonProperty("margin_requirement") private String marginRequirement; - /** - * margin_equity - margin_requirement - */ - @JsonProperty("excess_deficit") private String excessDeficit; - /** - * The raw amount of portfolio margin credit used - */ - @JsonProperty("pm_credit_consumed") private String pmCreditConsumed; - /** - * The maximum trade finance credit limit. This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_credit_limit") private String tfCreditLimit; - /** - * The amount of trade finance credit used (USD). This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_credit_consumed") private String tfCreditConsumed; - /** - * TF Asset Adjusted Value (USD). This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_adjusted_asset_value") private String tfAdjustedAssetValue; - /** - * TF Adjusted Liability Value (USD). This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_adjusted_liability_value") private String tfAdjustedLiabilityValue; - /** - * The amount of adjusted credit used. This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_adjusted_credit_consumed") private String tfAdjustedCreditConsumed; - /** - * The amount of adjusted equity. This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_adjusted_equity") private String tfAdjustedEquity; - /** - * Whether or not a entity is frozen due to balance outstanding or other reason - */ private boolean frozen; - /** - * The reason why a entity is frozen - */ - @JsonProperty("frozen_reason") private String frozenReason; - /** - * Whether TF is enabled for the entity. This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_enabled") private boolean tfEnabled; - /** - * Whether PM is enabled for the entity - */ - @JsonProperty("pm_enabled") private boolean pmEnabled; - /** - * Market rates for the list of assets - */ - @JsonProperty("market_rates") private List marketRates; - /** - * Asset Balances across portfolios - */ - @JsonProperty("asset_balances") private List assetBalances; - /** - * Trade finance debit loan amounts. This field is deprecated and will be removed in the future. - */ - @JsonProperty("tf_loans") private List tfLoans; - /** - * Portfolio Margin debit loan amounts - */ - @JsonProperty("pm_loans") private List pmLoans; - /** - * Short collateral amounts - */ - @JsonProperty("short_collateral") private List shortCollateral; - /** - * Gross market value (GMV) = LMV + Abs (SMV) - */ - @JsonProperty("gross_market_value") private String grossMarketValue; - /** - * Net Market Value (NMV) = LMV + SMV - */ - @JsonProperty("net_market_value") private String netMarketValue; - /** - * Long Market Value (LMV) = Sum of positive notional for all assets - */ - @JsonProperty("long_market_value") private String longMarketValue; - /** - * Non_Marginable LMV: Sum of positive notional for each non-margin eligible coin - */ - @JsonProperty("non_marginable_long_market_value") private String nonMarginableLongMarketValue; - /** - * 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 - */ - @JsonProperty("gross_leverage") private String grossLeverage; - /** - * Net Exposure = (LMV + SMV) / GMV - */ - @JsonProperty("net_exposure") private String netExposure; - @JsonProperty("portfolio_stress_triggered") private MarginAddOn portfolioStressTriggered; - /** - * PM asset info netted across the entity - */ - @JsonProperty("pm_asset_info") private List pmAssetInfo; - /** - * PM limit that monitors gross notional borrowings (crypto + fiat) - */ - @JsonProperty("pm_credit_limit") private String pmCreditLimit; - /** - * PM limit that monitors excess deficit - */ - @JsonProperty("pm_margin_limit") private String pmMarginLimit; - /** - * The amount of the margin limit that is consumed by the excess deficit - */ - @JsonProperty("pm_margin_consumed") private String pmMarginConsumed; - public MarginSummary() { + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; } - public MarginSummary(Builder builder) { - this.entityId = builder.entityId; - this.marginEquity = builder.marginEquity; - this.marginRequirement = builder.marginRequirement; - this.excessDeficit = builder.excessDeficit; - this.pmCreditConsumed = builder.pmCreditConsumed; - this.tfCreditLimit = builder.tfCreditLimit; - this.tfCreditConsumed = builder.tfCreditConsumed; - this.tfAdjustedAssetValue = builder.tfAdjustedAssetValue; - this.tfAdjustedLiabilityValue = builder.tfAdjustedLiabilityValue; - this.tfAdjustedCreditConsumed = builder.tfAdjustedCreditConsumed; - this.tfAdjustedEquity = builder.tfAdjustedEquity; - this.frozen = builder.frozen; - this.frozenReason = builder.frozenReason; - this.tfEnabled = builder.tfEnabled; - this.pmEnabled = builder.pmEnabled; - this.marketRates = builder.marketRates; - this.assetBalances = builder.assetBalances; - this.tfLoans = builder.tfLoans; - this.pmLoans = builder.pmLoans; - this.shortCollateral = builder.shortCollateral; - this.grossMarketValue = builder.grossMarketValue; - this.netMarketValue = builder.netMarketValue; - this.longMarketValue = builder.longMarketValue; - this.nonMarginableLongMarketValue = builder.nonMarginableLongMarketValue; - this.shortMarketValue = builder.shortMarketValue; - this.grossLeverage = builder.grossLeverage; - this.netExposure = builder.netExposure; - this.portfolioStressTriggered = builder.portfolioStressTriggered; - this.pmAssetInfo = builder.pmAssetInfo; - this.pmCreditLimit = builder.pmCreditLimit; - this.pmMarginLimit = builder.pmMarginLimit; - this.pmMarginConsumed = builder.pmMarginConsumed; - } - public String getEntityId() { - return entityId; + public Builder marginEquity(String marginEquity) { + this.marginEquity = marginEquity; + return this; } - public void setEntityId(String entityId) { - this.entityId = entityId; - } - public String getMarginEquity() { - return marginEquity; + public Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + return this; } - public void setMarginEquity(String marginEquity) { - this.marginEquity = marginEquity; - } - public String getMarginRequirement() { - return marginRequirement; + public Builder excessDeficit(String excessDeficit) { + this.excessDeficit = excessDeficit; + return this; } - public void setMarginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - } - public String getExcessDeficit() { - return excessDeficit; + public Builder pmCreditConsumed(String pmCreditConsumed) { + this.pmCreditConsumed = pmCreditConsumed; + return this; } - public void setExcessDeficit(String excessDeficit) { - this.excessDeficit = excessDeficit; - } - public String getPmCreditConsumed() { - return pmCreditConsumed; + public Builder tfCreditLimit(String tfCreditLimit) { + this.tfCreditLimit = tfCreditLimit; + return this; } - public void setPmCreditConsumed(String pmCreditConsumed) { - this.pmCreditConsumed = pmCreditConsumed; - } - public String getTfCreditLimit() { - return tfCreditLimit; + public Builder tfCreditConsumed(String tfCreditConsumed) { + this.tfCreditConsumed = tfCreditConsumed; + return this; } - public void setTfCreditLimit(String tfCreditLimit) { - this.tfCreditLimit = tfCreditLimit; - } - public String getTfCreditConsumed() { - return tfCreditConsumed; + public Builder tfAdjustedAssetValue(String tfAdjustedAssetValue) { + this.tfAdjustedAssetValue = tfAdjustedAssetValue; + return this; } - public void setTfCreditConsumed(String tfCreditConsumed) { - this.tfCreditConsumed = tfCreditConsumed; - } - public String getTfAdjustedAssetValue() { - return tfAdjustedAssetValue; + public Builder tfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { + this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; + return this; } - public void setTfAdjustedAssetValue(String tfAdjustedAssetValue) { - this.tfAdjustedAssetValue = tfAdjustedAssetValue; - } - public String getTfAdjustedLiabilityValue() { - return tfAdjustedLiabilityValue; + public Builder tfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { + this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; + return this; } - public void setTfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { - this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; - } - public String getTfAdjustedCreditConsumed() { - return tfAdjustedCreditConsumed; + public Builder tfAdjustedEquity(String tfAdjustedEquity) { + this.tfAdjustedEquity = tfAdjustedEquity; + return this; } - public void setTfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { - this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; - } - public String getTfAdjustedEquity() { - return tfAdjustedEquity; + public Builder frozen(boolean frozen) { + this.frozen = frozen; + return this; } - public void setTfAdjustedEquity(String tfAdjustedEquity) { - this.tfAdjustedEquity = tfAdjustedEquity; - } - public boolean getFrozen() { - return frozen; + public Builder frozenReason(String frozenReason) { + this.frozenReason = frozenReason; + return this; } - public void setFrozen(boolean frozen) { - this.frozen = frozen; - } - public String getFrozenReason() { - return frozenReason; + public Builder tfEnabled(boolean tfEnabled) { + this.tfEnabled = tfEnabled; + return this; } - public void setFrozenReason(String frozenReason) { - this.frozenReason = frozenReason; - } - public boolean getTfEnabled() { - return tfEnabled; - } - - public void setTfEnabled(boolean tfEnabled) { - this.tfEnabled = tfEnabled; - } - public boolean getPmEnabled() { - return pmEnabled; - } - - public void setPmEnabled(boolean pmEnabled) { - this.pmEnabled = pmEnabled; - } - public List getMarketRates() { - return marketRates; + public Builder pmEnabled(boolean pmEnabled) { + this.pmEnabled = pmEnabled; + return this; } - public void setMarketRates(List marketRates) { - this.marketRates = marketRates; - } - public List getAssetBalances() { - return assetBalances; + public Builder marketRates(List marketRates) { + this.marketRates = marketRates; + return this; } - public void setAssetBalances(List assetBalances) { - this.assetBalances = assetBalances; - } - public List getTfLoans() { - return tfLoans; + public Builder assetBalances(List assetBalances) { + this.assetBalances = assetBalances; + return this; } - public void setTfLoans(List tfLoans) { - this.tfLoans = tfLoans; - } - public List getPmLoans() { - return pmLoans; + public Builder tfLoans(List tfLoans) { + this.tfLoans = tfLoans; + return this; } - public void setPmLoans(List pmLoans) { - this.pmLoans = pmLoans; - } - public List getShortCollateral() { - return shortCollateral; + public Builder pmLoans(List pmLoans) { + this.pmLoans = pmLoans; + return this; } - public void setShortCollateral(List shortCollateral) { - this.shortCollateral = shortCollateral; - } - public String getGrossMarketValue() { - return grossMarketValue; + public Builder shortCollateral(List shortCollateral) { + this.shortCollateral = shortCollateral; + return this; } - public void setGrossMarketValue(String grossMarketValue) { - this.grossMarketValue = grossMarketValue; - } - public String getNetMarketValue() { - return netMarketValue; + public Builder grossMarketValue(String grossMarketValue) { + this.grossMarketValue = grossMarketValue; + return this; } - public void setNetMarketValue(String netMarketValue) { - this.netMarketValue = netMarketValue; - } - public String getLongMarketValue() { - return longMarketValue; + public Builder netMarketValue(String netMarketValue) { + this.netMarketValue = netMarketValue; + return this; } - public void setLongMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - } - public String getNonMarginableLongMarketValue() { - return nonMarginableLongMarketValue; + public Builder longMarketValue(String longMarketValue) { + this.longMarketValue = longMarketValue; + return this; } - public void setNonMarginableLongMarketValue(String nonMarginableLongMarketValue) { - this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; - } - public String getShortMarketValue() { - return shortMarketValue; + public Builder nonMarginableLongMarketValue(String nonMarginableLongMarketValue) { + this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; + return this; } - public void setShortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - } - public String getGrossLeverage() { - return grossLeverage; + public Builder shortMarketValue(String shortMarketValue) { + this.shortMarketValue = shortMarketValue; + return this; } - public void setGrossLeverage(String grossLeverage) { - this.grossLeverage = grossLeverage; - } - public String getNetExposure() { - return netExposure; + public Builder grossLeverage(String grossLeverage) { + this.grossLeverage = grossLeverage; + return this; } - public void setNetExposure(String netExposure) { - this.netExposure = netExposure; - } - public MarginAddOn getPortfolioStressTriggered() { - return portfolioStressTriggered; + public Builder netExposure(String netExposure) { + this.netExposure = netExposure; + return this; } - public void setPortfolioStressTriggered(MarginAddOn portfolioStressTriggered) { - this.portfolioStressTriggered = portfolioStressTriggered; - } - public List getPmAssetInfo() { - return pmAssetInfo; + public Builder portfolioStressTriggered(MarginAddOn portfolioStressTriggered) { + this.portfolioStressTriggered = portfolioStressTriggered; + return this; } - public void setPmAssetInfo(List pmAssetInfo) { - this.pmAssetInfo = pmAssetInfo; - } - public String getPmCreditLimit() { - return pmCreditLimit; + public Builder pmAssetInfo(List pmAssetInfo) { + this.pmAssetInfo = pmAssetInfo; + return this; } - public void setPmCreditLimit(String pmCreditLimit) { - this.pmCreditLimit = pmCreditLimit; - } - public String getPmMarginLimit() { - return pmMarginLimit; + public Builder pmCreditLimit(String pmCreditLimit) { + this.pmCreditLimit = pmCreditLimit; + return this; } - public void setPmMarginLimit(String pmMarginLimit) { - this.pmMarginLimit = pmMarginLimit; - } - public String getPmMarginConsumed() { - return pmMarginConsumed; + public Builder pmMarginLimit(String pmMarginLimit) { + this.pmMarginLimit = pmMarginLimit; + return this; } - public void setPmMarginConsumed(String pmMarginConsumed) { - this.pmMarginConsumed = pmMarginConsumed; + public Builder pmMarginConsumed(String pmMarginConsumed) { + this.pmMarginConsumed = pmMarginConsumed; + return this; } - public static class Builder { - private String entityId; - - private String marginEquity; - - private String marginRequirement; - - private String excessDeficit; - - private String pmCreditConsumed; - - private String tfCreditLimit; - - private String tfCreditConsumed; - - private String tfAdjustedAssetValue; - - private String tfAdjustedLiabilityValue; - - private String tfAdjustedCreditConsumed; - - private String tfAdjustedEquity; - - private boolean frozen; - - private String frozenReason; - - private boolean tfEnabled; - - private boolean pmEnabled; - - private List marketRates; - private List assetBalances; - - private List tfLoans; - - private List pmLoans; - - private List shortCollateral; - - private String grossMarketValue; - - private String netMarketValue; - - private String longMarketValue; - - private String nonMarginableLongMarketValue; - - private String shortMarketValue; - - private String grossLeverage; - - private String netExposure; - - private MarginAddOn portfolioStressTriggered; - - private List pmAssetInfo; - - private String pmCreditLimit; - - private String pmMarginLimit; - - private String pmMarginConsumed; - - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } - - public Builder marginEquity(String marginEquity) { - this.marginEquity = marginEquity; - return this; - } - - public Builder marginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - return this; - } - - public Builder excessDeficit(String excessDeficit) { - this.excessDeficit = excessDeficit; - return this; - } - - public Builder pmCreditConsumed(String pmCreditConsumed) { - this.pmCreditConsumed = pmCreditConsumed; - return this; - } - - public Builder tfCreditLimit(String tfCreditLimit) { - this.tfCreditLimit = tfCreditLimit; - return this; - } - - public Builder tfCreditConsumed(String tfCreditConsumed) { - this.tfCreditConsumed = tfCreditConsumed; - return this; - } - - public Builder tfAdjustedAssetValue(String tfAdjustedAssetValue) { - this.tfAdjustedAssetValue = tfAdjustedAssetValue; - return this; - } - - public Builder tfAdjustedLiabilityValue(String tfAdjustedLiabilityValue) { - this.tfAdjustedLiabilityValue = tfAdjustedLiabilityValue; - return this; - } - - public Builder tfAdjustedCreditConsumed(String tfAdjustedCreditConsumed) { - this.tfAdjustedCreditConsumed = tfAdjustedCreditConsumed; - return this; - } - - public Builder tfAdjustedEquity(String tfAdjustedEquity) { - this.tfAdjustedEquity = tfAdjustedEquity; - return this; - } - - public Builder frozen(boolean frozen) { - this.frozen = frozen; - return this; - } - - public Builder frozenReason(String frozenReason) { - this.frozenReason = frozenReason; - return this; - } - - public Builder tfEnabled(boolean tfEnabled) { - this.tfEnabled = tfEnabled; - return this; - } - - public Builder pmEnabled(boolean pmEnabled) { - this.pmEnabled = pmEnabled; - return this; - } - - public Builder marketRates(List marketRates) { - this.marketRates = marketRates; - return this; - } - - public Builder assetBalances(List assetBalances) { - this.assetBalances = assetBalances; - return this; - } - - public Builder tfLoans(List tfLoans) { - this.tfLoans = tfLoans; - return this; - } - - public Builder pmLoans(List pmLoans) { - this.pmLoans = pmLoans; - return this; - } - - public Builder shortCollateral(List shortCollateral) { - this.shortCollateral = shortCollateral; - return this; - } - - public Builder grossMarketValue(String grossMarketValue) { - this.grossMarketValue = grossMarketValue; - return this; - } - - public Builder netMarketValue(String netMarketValue) { - this.netMarketValue = netMarketValue; - return this; - } - - public Builder longMarketValue(String longMarketValue) { - this.longMarketValue = longMarketValue; - return this; - } - - public Builder nonMarginableLongMarketValue(String nonMarginableLongMarketValue) { - this.nonMarginableLongMarketValue = nonMarginableLongMarketValue; - return this; - } - - public Builder shortMarketValue(String shortMarketValue) { - this.shortMarketValue = shortMarketValue; - return this; - } - - public Builder grossLeverage(String grossLeverage) { - this.grossLeverage = grossLeverage; - return this; - } - - public Builder netExposure(String netExposure) { - this.netExposure = netExposure; - return this; - } - - public Builder portfolioStressTriggered(MarginAddOn portfolioStressTriggered) { - this.portfolioStressTriggered = portfolioStressTriggered; - return this; - } - - public Builder pmAssetInfo(List pmAssetInfo) { - this.pmAssetInfo = pmAssetInfo; - return this; - } - - public Builder pmCreditLimit(String pmCreditLimit) { - this.pmCreditLimit = pmCreditLimit; - return this; - } - - public Builder pmMarginLimit(String pmMarginLimit) { - this.pmMarginLimit = pmMarginLimit; - return this; - } - - public Builder pmMarginConsumed(String pmMarginConsumed) { - this.pmMarginConsumed = pmMarginConsumed; - return this; - } - - public MarginSummary build() { - return new MarginSummary(this); - } + public MarginSummary build() { + return new MarginSummary(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java b/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java index f59508a..c800149 100644 --- a/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java +++ b/src/main/java/com/coinbase/prime/model/MarginSummaryHistorical.java @@ -17,79 +17,77 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.MarginSummary; + import com.fasterxml.jackson.annotation.JsonProperty; public class MarginSummaryHistorical { - /** - * The UTC date time used for conversion - */ - @JsonProperty("conversion_datetime") - private String conversionDatetime; + /** The UTC date time used for conversion */ + @JsonProperty("conversion_datetime") + private String conversionDatetime; - /** - * The date used for conversion - */ - @JsonProperty("conversion_date") - private String conversionDate; + /** The date used for conversion */ + @JsonProperty("conversion_date") + private String conversionDate; - @JsonProperty("margin_summary") - private MarginSummary marginSummary; + @JsonProperty("margin_summary") + private MarginSummary marginSummary; - public MarginSummaryHistorical() { - } + public MarginSummaryHistorical() {} - public MarginSummaryHistorical(Builder builder) { - this.conversionDatetime = builder.conversionDatetime; - this.conversionDate = builder.conversionDate; - this.marginSummary = builder.marginSummary; - } - public String getConversionDatetime() { - return conversionDatetime; - } + public MarginSummaryHistorical(Builder builder) { + this.conversionDatetime = builder.conversionDatetime; + this.conversionDate = builder.conversionDate; + this.marginSummary = builder.marginSummary; + } - public void setConversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - } - public String getConversionDate() { - return conversionDate; - } + public String getConversionDatetime() { + return conversionDatetime; + } - public void setConversionDate(String conversionDate) { - this.conversionDate = conversionDate; - } - public MarginSummary getMarginSummary() { - return marginSummary; - } + public void setConversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + } - public void setMarginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - } - public static class Builder { - private String conversionDatetime; + public String getConversionDate() { + return conversionDate; + } - private String conversionDate; + public void setConversionDate(String conversionDate) { + this.conversionDate = conversionDate; + } - private MarginSummary marginSummary; + public MarginSummary getMarginSummary() { + return marginSummary; + } - public Builder conversionDatetime(String conversionDatetime) { - this.conversionDatetime = conversionDatetime; - return this; - } + public void setMarginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + } - public Builder conversionDate(String conversionDate) { - this.conversionDate = conversionDate; - return this; - } + public static class Builder { + private String conversionDatetime; + + private String conversionDate; - public Builder marginSummary(MarginSummary marginSummary) { - this.marginSummary = marginSummary; - return this; - } + private MarginSummary marginSummary; - public MarginSummaryHistorical build() { - return new MarginSummaryHistorical(this); - } + public Builder conversionDatetime(String conversionDatetime) { + this.conversionDatetime = conversionDatetime; + return this; } -} + public Builder conversionDate(String conversionDate) { + this.conversionDate = conversionDate; + return this; + } + + public Builder marginSummary(MarginSummary marginSummary) { + this.marginSummary = marginSummary; + return this; + } + + public MarginSummaryHistorical build() { + return new MarginSummaryHistorical(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/MarketData.java b/src/main/java/com/coinbase/prime/model/MarketData.java index 2ace509..640acf9 100644 --- a/src/main/java/com/coinbase/prime/model/MarketData.java +++ b/src/main/java/com/coinbase/prime/model/MarketData.java @@ -17,143 +17,140 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class MarketData { - /** - * Base asset symbol (e.g., BTC, ETH, SOL) - */ + /** Base asset symbol (e.g., BTC, ETH, SOL) */ + private String symbol; + + /** 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%) */ + @JsonProperty("vol_30d") + private String vol30d; + + /** Daily historical volatility over trailing 90 days (decimal, e.g., 0.65 = 65%) */ + @JsonProperty("vol_90d") + private String vol90d; + + /** Average daily trading volume over trailing 30 days (USD) */ + @JsonProperty("adv_30d") + private String adv30d; + + /** + * Weighted blend of the most recent vol_5d and the max vol_5d over last 30 days into a single + * volatility measure (decimal). + */ + @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; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public String getVol5d() { + return vol5d; + } + + public void setVol5d(String vol5d) { + this.vol5d = vol5d; + } + + public String getVol30d() { + return vol30d; + } + + public void setVol30d(String vol30d) { + this.vol30d = vol30d; + } + + public String getVol90d() { + return vol90d; + } + + public void setVol90d(String vol90d) { + this.vol90d = vol90d; + } + + public String getAdv30d() { + return adv30d; + } + + public void setAdv30d(String adv30d) { + this.adv30d = adv30d; + } + + public String getWeightedVol() { + return weightedVol; + } + + public void setWeightedVol(String weightedVol) { + this.weightedVol = weightedVol; + } + + public static class Builder { private String symbol; - /** - * 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%) - */ - @JsonProperty("vol_30d") private String vol30d; - /** - * Daily historical volatility over trailing 90 days (decimal, e.g., 0.65 = 65%) - */ - @JsonProperty("vol_90d") private String vol90d; - /** - * Average daily trading volume over trailing 30 days (USD) - */ - @JsonProperty("adv_30d") private String adv30d; - /** - * Weighted blend of the most recent vol_5d and the max vol_5d over last 30 days into a single volatility measure (decimal). - */ - @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; + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getVol5d() { - return vol5d; + public Builder vol5d(String vol5d) { + this.vol5d = vol5d; + return this; } - public void setVol5d(String vol5d) { - this.vol5d = vol5d; - } - public String getVol30d() { - return vol30d; + public Builder vol30d(String vol30d) { + this.vol30d = vol30d; + return this; } - public void setVol30d(String vol30d) { - this.vol30d = vol30d; - } - public String getVol90d() { - return vol90d; + public Builder vol90d(String vol90d) { + this.vol90d = vol90d; + return this; } - public void setVol90d(String vol90d) { - this.vol90d = vol90d; - } - public String getAdv30d() { - return adv30d; + public Builder adv30d(String adv30d) { + this.adv30d = adv30d; + return this; } - public void setAdv30d(String adv30d) { - this.adv30d = adv30d; - } - public String getWeightedVol() { - return weightedVol; + public Builder weightedVol(String weightedVol) { + this.weightedVol = weightedVol; + return this; } - 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); - } + 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 44491e1..afe822c 100644 --- a/src/main/java/com/coinbase/prime/model/MarketRate.java +++ b/src/main/java/com/coinbase/prime/model/MarketRate.java @@ -19,55 +19,52 @@ package com.coinbase.prime.model; public class MarketRate { - /** - * The currency symbol - */ - private String symbol; + /** The currency symbol */ + private String symbol; - /** - * The current market rate of currency - */ - private String rate; + /** The current market rate of currency */ + private String rate; - public MarketRate() { - } + public MarketRate() {} - public MarketRate(Builder builder) { - this.symbol = builder.symbol; - this.rate = builder.rate; - } - public String getSymbol() { - return symbol; - } + public MarketRate(Builder builder) { + this.symbol = builder.symbol; + this.rate = builder.rate; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getRate() { - return rate; - } + public String getSymbol() { + return symbol; + } - public void setRate(String rate) { - this.rate = rate; - } - public static class Builder { - private String symbol; + public void setSymbol(String symbol) { + this.symbol = symbol; + } - private String rate; + public String getRate() { + return rate; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setRate(String rate) { + this.rate = rate; + } - public Builder rate(String rate) { - this.rate = rate; - return this; - } + public static class Builder { + private String symbol; + + private String rate; - public MarketRate build() { - return new MarketRate(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder rate(String rate) { + this.rate = rate; + return this; + } + + public MarketRate build() { + return new MarketRate(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/MatchMetadata.java b/src/main/java/com/coinbase/prime/model/MatchMetadata.java index 4ab0fbb..90d3e6b 100644 --- a/src/main/java/com/coinbase/prime/model/MatchMetadata.java +++ b/src/main/java/com/coinbase/prime/model/MatchMetadata.java @@ -17,60 +17,58 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class MatchMetadata { - /** - * The reference id of the match - */ - @JsonProperty("reference_id") - private String referenceId; + /** The reference id of the match */ + @JsonProperty("reference_id") + private String referenceId; - /** - * The settlement date of the match - */ - @JsonProperty("settlement_date") - private String settlementDate; + /** The settlement date of the match */ + @JsonProperty("settlement_date") + private String settlementDate; - public MatchMetadata() { - } + public MatchMetadata() {} - public MatchMetadata(Builder builder) { - this.referenceId = builder.referenceId; - this.settlementDate = builder.settlementDate; - } - public String getReferenceId() { - return referenceId; - } + public MatchMetadata(Builder builder) { + this.referenceId = builder.referenceId; + this.settlementDate = builder.settlementDate; + } - public void setReferenceId(String referenceId) { - this.referenceId = referenceId; - } - public String getSettlementDate() { - return settlementDate; - } + public String getReferenceId() { + return referenceId; + } - public void setSettlementDate(String settlementDate) { - this.settlementDate = settlementDate; - } - public static class Builder { - private String referenceId; + public void setReferenceId(String referenceId) { + this.referenceId = referenceId; + } - private String settlementDate; + public String getSettlementDate() { + return settlementDate; + } - public Builder referenceId(String referenceId) { - this.referenceId = referenceId; - return this; - } + public void setSettlementDate(String settlementDate) { + this.settlementDate = settlementDate; + } - public Builder settlementDate(String settlementDate) { - this.settlementDate = settlementDate; - return this; - } + public static class Builder { + private String referenceId; + + private String settlementDate; - public MatchMetadata build() { - return new MatchMetadata(this); - } + public Builder referenceId(String referenceId) { + this.referenceId = referenceId; + return this; } -} + public Builder settlementDate(String settlementDate) { + this.settlementDate = settlementDate; + return this; + } + + public MatchMetadata build() { + return new MatchMetadata(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/NaturalPersonName.java b/src/main/java/com/coinbase/prime/model/NaturalPersonName.java index 7e72428..aa3dd35 100644 --- a/src/main/java/com/coinbase/prime/model/NaturalPersonName.java +++ b/src/main/java/com/coinbase/prime/model/NaturalPersonName.java @@ -17,76 +17,79 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** Natural person name components */ public class NaturalPersonName { - /** Given/first name */ - @JsonProperty("first_name") - private String firstName; + /** Given/first name */ + @JsonProperty("first_name") + private String firstName; - /** optional middle name (currently unused) */ - @JsonProperty("middle_name") - private String middleName; + /** optional middle name (currently unused) */ + @JsonProperty("middle_name") + private String middleName; - /** Family/last name */ - @JsonProperty("last_name") - private String lastName; + /** Family/last name */ + @JsonProperty("last_name") + private String lastName; - public NaturalPersonName() { - } + public NaturalPersonName() {} - public NaturalPersonName(Builder builder) { - this.firstName = builder.firstName; - this.middleName = builder.middleName; - this.lastName = builder.lastName; - } - public String getFirstName() { - return firstName; - } + public NaturalPersonName(Builder builder) { + this.firstName = builder.firstName; + this.middleName = builder.middleName; + this.lastName = builder.lastName; + } - public void setFirstName(String firstName) { - this.firstName = firstName; - } - public String getMiddleName() { - return middleName; - } + public String getFirstName() { + return firstName; + } - public void setMiddleName(String middleName) { - this.middleName = middleName; - } - public String getLastName() { - return lastName; - } + public void setFirstName(String firstName) { + this.firstName = firstName; + } - public void setLastName(String lastName) { - this.lastName = lastName; - } - public static class Builder { - private String firstName; + public String getMiddleName() { + return middleName; + } - private String middleName; + public void setMiddleName(String middleName) { + this.middleName = middleName; + } - private String lastName; + public String getLastName() { + return lastName; + } - public Builder firstName(String firstName) { - this.firstName = firstName; - return this; - } + public void setLastName(String lastName) { + this.lastName = lastName; + } - public Builder middleName(String middleName) { - this.middleName = middleName; - return this; - } + public static class Builder { + private String firstName; + + private String middleName; - public Builder lastName(String lastName) { - this.lastName = lastName; - return this; - } + private String lastName; - public NaturalPersonName build() { - return new NaturalPersonName(this); - } + public Builder firstName(String firstName) { + this.firstName = firstName; + return this; } -} + public Builder middleName(String middleName) { + this.middleName = middleName; + return this; + } + + public Builder lastName(String lastName) { + this.lastName = lastName; + return this; + } + + public NaturalPersonName build() { + return new NaturalPersonName(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Network.java b/src/main/java/com/coinbase/prime/model/Network.java index aafba59..6a46f4c 100644 --- a/src/main/java/com/coinbase/prime/model/Network.java +++ b/src/main/java/com/coinbase/prime/model/Network.java @@ -19,55 +19,52 @@ package com.coinbase.prime.model; public class Network { - /** - * The network id: base, bitcoin, ethereum, solana etc - */ - private String id; + /** The network id: base, bitcoin, ethereum, solana etc */ + private String id; - /** - * The network type: mainnet, testnet, etc - */ - private String type; + /** The network type: mainnet, testnet, etc */ + private String type; - public Network() { - } + public Network() {} - public Network(Builder builder) { - this.id = builder.id; - this.type = builder.type; - } - public String getId() { - return id; - } + public Network(Builder builder) { + this.id = builder.id; + this.type = builder.type; + } - public void setId(String id) { - this.id = id; - } - public String getType() { - return type; - } + public String getId() { + return id; + } - public void setType(String type) { - this.type = type; - } - public static class Builder { - private String id; + public void setId(String id) { + this.id = id; + } - private String type; + public String getType() { + return type; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setType(String type) { + this.type = type; + } - public Builder type(String type) { - this.type = type; - return this; - } + public static class Builder { + private String id; + + private String type; - public Network build() { - return new Network(this); - } + public Builder id(String id) { + this.id = id; + return this; } -} + public Builder type(String type) { + this.type = type; + return this; + } + + public Network build() { + return new Network(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/NetworkDetails.java b/src/main/java/com/coinbase/prime/model/NetworkDetails.java index 5ca5a6c..d57d361 100644 --- a/src/main/java/com/coinbase/prime/model/NetworkDetails.java +++ b/src/main/java/com/coinbase/prime/model/NetworkDetails.java @@ -17,287 +17,287 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.Network; + import com.fasterxml.jackson.annotation.JsonProperty; public class NetworkDetails { + private Network network; + + /** The name of the network */ + private String name; + + /** The maximum number of decimals supported for this network */ + @JsonProperty("max_decimals") + private String maxDecimals; + + /** Indicates whether this network is the default network for the asset */ + @JsonProperty("default") + private boolean _default; + + /** Indicates whether this network supports trading */ + @JsonProperty("trading_supported") + private boolean tradingSupported; + + /** Indicates whether this network supports vault */ + @JsonProperty("vault_supported") + private boolean vaultSupported; + + /** Indicates whether this network supports prime custody */ + @JsonProperty("prime_custody_supported") + private boolean primeCustodySupported; + + /** Indicates whether this network requires a destination tag */ + @JsonProperty("destination_tag_required") + private boolean destinationTagRequired; + + /** Base URL to our recommended block explorer (crypto only) */ + @JsonProperty("network_link") + private String networkLink; + + /** + * Indicates the symbol that can be used to query other endpoints, related to transactions, + * wallets, and activities, to get information particularly for this asset on the network + */ + @JsonProperty("network_scoped_symbol") + private String networkScopedSymbol; + + /** + * The minimum withdrawal amount for this network. Applies to trading, prime custody, and vault + * wallets. + */ + @JsonProperty("min_withdrawal_amount") + private String minWithdrawalAmount; + + /** + * The platform maximum withdrawal amount for this network. Applies to trading, prime custody, and + * vault wallets. Note that Prime Transfer policies may override this value. + */ + @JsonProperty("max_withdrawal_amount") + private String maxWithdrawalAmount; + + /** + * The minimum deposit amount for this network. Applies to trading, prime custody, and vault + * wallets. + */ + @JsonProperty("min_deposit_amount") + private String minDepositAmount; + + public NetworkDetails() {} + + public NetworkDetails(Builder builder) { + this.network = builder.network; + this.name = builder.name; + this.maxDecimals = builder.maxDecimals; + this._default = builder._default; + this.tradingSupported = builder.tradingSupported; + this.vaultSupported = builder.vaultSupported; + this.primeCustodySupported = builder.primeCustodySupported; + this.destinationTagRequired = builder.destinationTagRequired; + this.networkLink = builder.networkLink; + this.networkScopedSymbol = builder.networkScopedSymbol; + this.minWithdrawalAmount = builder.minWithdrawalAmount; + this.maxWithdrawalAmount = builder.maxWithdrawalAmount; + this.minDepositAmount = builder.minDepositAmount; + } + + public Network getNetwork() { + return network; + } + + public void setNetwork(Network network) { + this.network = network; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getMaxDecimals() { + return maxDecimals; + } + + public void setMaxDecimals(String maxDecimals) { + this.maxDecimals = maxDecimals; + } + + public boolean getDefault() { + return _default; + } + + public void setDefault(boolean _default) { + this._default = _default; + } + + public boolean getTradingSupported() { + return tradingSupported; + } + + public void setTradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + } + + public boolean getVaultSupported() { + return vaultSupported; + } + + public void setVaultSupported(boolean vaultSupported) { + this.vaultSupported = vaultSupported; + } + + public boolean getPrimeCustodySupported() { + return primeCustodySupported; + } + + public void setPrimeCustodySupported(boolean primeCustodySupported) { + this.primeCustodySupported = primeCustodySupported; + } + + public boolean getDestinationTagRequired() { + return destinationTagRequired; + } + + public void setDestinationTagRequired(boolean destinationTagRequired) { + this.destinationTagRequired = destinationTagRequired; + } + + public String getNetworkLink() { + return networkLink; + } + + public void setNetworkLink(String networkLink) { + this.networkLink = networkLink; + } + + public String getNetworkScopedSymbol() { + return networkScopedSymbol; + } + + public void setNetworkScopedSymbol(String networkScopedSymbol) { + this.networkScopedSymbol = networkScopedSymbol; + } + + public String getMinWithdrawalAmount() { + return minWithdrawalAmount; + } + + public void setMinWithdrawalAmount(String minWithdrawalAmount) { + this.minWithdrawalAmount = minWithdrawalAmount; + } + + public String getMaxWithdrawalAmount() { + return maxWithdrawalAmount; + } + + public void setMaxWithdrawalAmount(String maxWithdrawalAmount) { + this.maxWithdrawalAmount = maxWithdrawalAmount; + } + + public String getMinDepositAmount() { + return minDepositAmount; + } + + public void setMinDepositAmount(String minDepositAmount) { + this.minDepositAmount = minDepositAmount; + } + + public static class Builder { private Network network; - /** - * The name of the network - */ private String name; - /** - * The maximum number of decimals supported for this network - */ - @JsonProperty("max_decimals") private String maxDecimals; - /** - * Indicates whether this network is the default network for the asset - */ - @JsonProperty("default") private boolean _default; - /** - * Indicates whether this network supports trading - */ - @JsonProperty("trading_supported") private boolean tradingSupported; - /** - * Indicates whether this network supports vault - */ - @JsonProperty("vault_supported") private boolean vaultSupported; - /** - * Indicates whether this network supports prime custody - */ - @JsonProperty("prime_custody_supported") private boolean primeCustodySupported; - /** - * Indicates whether this network requires a destination tag - */ - @JsonProperty("destination_tag_required") private boolean destinationTagRequired; - /** - * Base URL to our recommended block explorer (crypto only) - */ - @JsonProperty("network_link") private String networkLink; - /** - * Indicates the symbol that can be used to query other endpoints, related to transactions, wallets, and activities, to get information particularly for this asset on the network - */ - @JsonProperty("network_scoped_symbol") private String networkScopedSymbol; - /** - * The minimum withdrawal amount for this network. Applies to trading, prime custody, and vault wallets. - */ - @JsonProperty("min_withdrawal_amount") private String minWithdrawalAmount; - /** - * The platform maximum withdrawal amount for this network. Applies to trading, prime custody, and vault wallets. Note that Prime Transfer policies may override this value. - */ - @JsonProperty("max_withdrawal_amount") private String maxWithdrawalAmount; - /** - * The minimum deposit amount for this network. Applies to trading, prime custody, and vault wallets. - */ - @JsonProperty("min_deposit_amount") private String minDepositAmount; - public NetworkDetails() { - } - - public NetworkDetails(Builder builder) { - this.network = builder.network; - this.name = builder.name; - this.maxDecimals = builder.maxDecimals; - this._default = builder._default; - this.tradingSupported = builder.tradingSupported; - this.vaultSupported = builder.vaultSupported; - this.primeCustodySupported = builder.primeCustodySupported; - this.destinationTagRequired = builder.destinationTagRequired; - this.networkLink = builder.networkLink; - this.networkScopedSymbol = builder.networkScopedSymbol; - this.minWithdrawalAmount = builder.minWithdrawalAmount; - this.maxWithdrawalAmount = builder.maxWithdrawalAmount; - this.minDepositAmount = builder.minDepositAmount; - } - public Network getNetwork() { - return network; + public Builder network(Network network) { + this.network = network; + return this; } - public void setNetwork(Network network) { - this.network = network; - } - public String getName() { - return name; + public Builder name(String name) { + this.name = name; + return this; } - public void setName(String name) { - this.name = name; - } - public String getMaxDecimals() { - return maxDecimals; + public Builder maxDecimals(String maxDecimals) { + this.maxDecimals = maxDecimals; + return this; } - public void setMaxDecimals(String maxDecimals) { - this.maxDecimals = maxDecimals; - } - public boolean getDefault() { - return _default; + public Builder _default(boolean _default) { + this._default = _default; + return this; } - public void setDefault(boolean _default) { - this._default = _default; - } - public boolean getTradingSupported() { - return tradingSupported; + public Builder tradingSupported(boolean tradingSupported) { + this.tradingSupported = tradingSupported; + return this; } - public void setTradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - } - public boolean getVaultSupported() { - return vaultSupported; + public Builder vaultSupported(boolean vaultSupported) { + this.vaultSupported = vaultSupported; + return this; } - public void setVaultSupported(boolean vaultSupported) { - this.vaultSupported = vaultSupported; - } - public boolean getPrimeCustodySupported() { - return primeCustodySupported; + public Builder primeCustodySupported(boolean primeCustodySupported) { + this.primeCustodySupported = primeCustodySupported; + return this; } - public void setPrimeCustodySupported(boolean primeCustodySupported) { - this.primeCustodySupported = primeCustodySupported; - } - public boolean getDestinationTagRequired() { - return destinationTagRequired; + public Builder destinationTagRequired(boolean destinationTagRequired) { + this.destinationTagRequired = destinationTagRequired; + return this; } - public void setDestinationTagRequired(boolean destinationTagRequired) { - this.destinationTagRequired = destinationTagRequired; - } - public String getNetworkLink() { - return networkLink; + public Builder networkLink(String networkLink) { + this.networkLink = networkLink; + return this; } - public void setNetworkLink(String networkLink) { - this.networkLink = networkLink; - } - public String getNetworkScopedSymbol() { - return networkScopedSymbol; + public Builder networkScopedSymbol(String networkScopedSymbol) { + this.networkScopedSymbol = networkScopedSymbol; + return this; } - public void setNetworkScopedSymbol(String networkScopedSymbol) { - this.networkScopedSymbol = networkScopedSymbol; - } - public String getMinWithdrawalAmount() { - return minWithdrawalAmount; + public Builder minWithdrawalAmount(String minWithdrawalAmount) { + this.minWithdrawalAmount = minWithdrawalAmount; + return this; } - public void setMinWithdrawalAmount(String minWithdrawalAmount) { - this.minWithdrawalAmount = minWithdrawalAmount; - } - public String getMaxWithdrawalAmount() { - return maxWithdrawalAmount; + public Builder maxWithdrawalAmount(String maxWithdrawalAmount) { + this.maxWithdrawalAmount = maxWithdrawalAmount; + return this; } - public void setMaxWithdrawalAmount(String maxWithdrawalAmount) { - this.maxWithdrawalAmount = maxWithdrawalAmount; - } - public String getMinDepositAmount() { - return minDepositAmount; + public Builder minDepositAmount(String minDepositAmount) { + this.minDepositAmount = minDepositAmount; + return this; } - public void setMinDepositAmount(String minDepositAmount) { - this.minDepositAmount = minDepositAmount; - } - public static class Builder { - private Network network; - - private String name; - - private String maxDecimals; - - private boolean _default; - - private boolean tradingSupported; - - private boolean vaultSupported; - - private boolean primeCustodySupported; - - private boolean destinationTagRequired; - - private String networkLink; - - private String networkScopedSymbol; - - private String minWithdrawalAmount; - - private String maxWithdrawalAmount; - - private String minDepositAmount; - - public Builder network(Network network) { - this.network = network; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder maxDecimals(String maxDecimals) { - this.maxDecimals = maxDecimals; - return this; - } - - public Builder _default(boolean _default) { - this._default = _default; - return this; - } - - public Builder tradingSupported(boolean tradingSupported) { - this.tradingSupported = tradingSupported; - return this; - } - - public Builder vaultSupported(boolean vaultSupported) { - this.vaultSupported = vaultSupported; - return this; - } - - public Builder primeCustodySupported(boolean primeCustodySupported) { - this.primeCustodySupported = primeCustodySupported; - return this; - } - - public Builder destinationTagRequired(boolean destinationTagRequired) { - this.destinationTagRequired = destinationTagRequired; - return this; - } - - public Builder networkLink(String networkLink) { - this.networkLink = networkLink; - return this; - } - - public Builder networkScopedSymbol(String networkScopedSymbol) { - this.networkScopedSymbol = networkScopedSymbol; - return this; - } - - public Builder minWithdrawalAmount(String minWithdrawalAmount) { - this.minWithdrawalAmount = minWithdrawalAmount; - return this; - } - - public Builder maxWithdrawalAmount(String maxWithdrawalAmount) { - this.maxWithdrawalAmount = maxWithdrawalAmount; - return this; - } - - public Builder minDepositAmount(String minDepositAmount) { - this.minDepositAmount = minDepositAmount; - return this; - } - - public NetworkDetails build() { - return new NetworkDetails(this); - } + public NetworkDetails build() { + return new NetworkDetails(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/NftCollection.java b/src/main/java/com/coinbase/prime/model/NftCollection.java index 67bf05b..6507fa6 100644 --- a/src/main/java/com/coinbase/prime/model/NftCollection.java +++ b/src/main/java/com/coinbase/prime/model/NftCollection.java @@ -19,35 +19,33 @@ package com.coinbase.prime.model; public class NftCollection { - /** - * NFT collection name - */ - private String name; + /** NFT collection name */ + private String name; - public NftCollection() { - } + public NftCollection() {} - public NftCollection(Builder builder) { - this.name = builder.name; - } - public String getName() { - return name; - } + public NftCollection(Builder builder) { + this.name = builder.name; + } - public void setName(String name) { - this.name = name; - } - public static class Builder { - private String name; + public String getName() { + return name; + } - public Builder name(String name) { - this.name = name; - return this; - } + public void setName(String name) { + this.name = name; + } - public NftCollection build() { - return new NftCollection(this); - } + public static class Builder { + private String name; + + public Builder name(String name) { + this.name = name; + return this; } -} + public NftCollection build() { + return new NftCollection(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/NftItem.java b/src/main/java/com/coinbase/prime/model/NftItem.java index 4bc0b2e..8fa3b1b 100644 --- a/src/main/java/com/coinbase/prime/model/NftItem.java +++ b/src/main/java/com/coinbase/prime/model/NftItem.java @@ -19,35 +19,33 @@ package com.coinbase.prime.model; public class NftItem { - /** - * NFT item name - */ - private String name; + /** NFT item name */ + private String name; - public NftItem() { - } + public NftItem() {} - public NftItem(Builder builder) { - this.name = builder.name; - } - public String getName() { - return name; - } + public NftItem(Builder builder) { + this.name = builder.name; + } - public void setName(String name) { - this.name = name; - } - public static class Builder { - private String name; + public String getName() { + return name; + } - public Builder name(String name) { - this.name = name; - return this; - } + public void setName(String name) { + this.name = name; + } - public NftItem build() { - return new NftItem(this); - } + public static class Builder { + private String name; + + public Builder name(String name) { + this.name = name; + return this; } -} + public NftItem build() { + return new NftItem(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/OnchainAsset.java b/src/main/java/com/coinbase/prime/model/OnchainAsset.java index d2bdfd6..bee9270 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainAsset.java +++ b/src/main/java/com/coinbase/prime/model/OnchainAsset.java @@ -17,118 +17,115 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainAsset { - /** Network this asset is on (ie "ethereum-mainnet") */ - private String network; + /** Network this asset is on (ie "ethereum-mainnet") */ + private String network; - /** - * Contract Address of this asset (empty for native assets). - */ - @JsonProperty("contract_address") - private String contractAddress; + /** Contract Address of this asset (empty for native assets). */ + @JsonProperty("contract_address") + private String contractAddress; - /** - * Symbol of this asset. - */ - private String symbol; + /** Symbol of this asset. */ + private String symbol; - /** - * Token ID of this asset (empty for non NFT assets). - */ - @JsonProperty("token_id") - private String tokenId; + /** Token ID of this asset (empty for non NFT assets). */ + @JsonProperty("token_id") + private String tokenId; - /** - * Name of this asset, either the name of the crypto token or the NFT collection name. - */ - private String name; + /** Name of this asset, either the name of the crypto token or the NFT collection name. */ + private String name; - public OnchainAsset() { - } + public OnchainAsset() {} - public OnchainAsset(Builder builder) { - this.network = builder.network; - this.contractAddress = builder.contractAddress; - this.symbol = builder.symbol; - this.tokenId = builder.tokenId; - this.name = builder.name; - } - public String getNetwork() { - return network; - } + public OnchainAsset(Builder builder) { + this.network = builder.network; + this.contractAddress = builder.contractAddress; + this.symbol = builder.symbol; + this.tokenId = builder.tokenId; + this.name = builder.name; + } - public void setNetwork(String network) { - this.network = network; - } - public String getContractAddress() { - return contractAddress; - } + public String getNetwork() { + return network; + } - public void setContractAddress(String contractAddress) { - this.contractAddress = contractAddress; - } - public String getSymbol() { - return symbol; - } + public void setNetwork(String network) { + this.network = network; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getTokenId() { - return tokenId; - } + public String getContractAddress() { + return contractAddress; + } - public void setTokenId(String tokenId) { - this.tokenId = tokenId; - } - public String getName() { - return name; - } + public void setContractAddress(String contractAddress) { + this.contractAddress = contractAddress; + } - public void setName(String name) { - this.name = name; - } - public static class Builder { - private String network; + public String getSymbol() { + return symbol; + } - private String contractAddress; + public void setSymbol(String symbol) { + this.symbol = symbol; + } - private String symbol; + public String getTokenId() { + return tokenId; + } - private String tokenId; + public void setTokenId(String tokenId) { + this.tokenId = tokenId; + } - private String name; + public String getName() { + return name; + } - public Builder network(String network) { - this.network = network; - return this; - } + public void setName(String name) { + this.name = name; + } - public Builder contractAddress(String contractAddress) { - this.contractAddress = contractAddress; - return this; - } + public static class Builder { + private String network; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + private String contractAddress; - public Builder tokenId(String tokenId) { - this.tokenId = tokenId; - return this; - } + private String symbol; - public Builder name(String name) { - this.name = name; - return this; - } + private String tokenId; - public OnchainAsset build() { - return new OnchainAsset(this); - } + private String name; + + public Builder network(String network) { + this.network = network; + return this; + } + + public Builder contractAddress(String contractAddress) { + this.contractAddress = contractAddress; + return this; } -} + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder tokenId(String tokenId) { + this.tokenId = tokenId; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public OnchainAsset build() { + return new OnchainAsset(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/OnchainBalance.java b/src/main/java/com/coinbase/prime/model/OnchainBalance.java index c764f5f..3a37efb 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainBalance.java +++ b/src/main/java/com/coinbase/prime/model/OnchainBalance.java @@ -17,81 +17,76 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.VisibilityStatus; -import com.coinbase.prime.model.OnchainAsset; import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainBalance { - private OnchainAsset asset; + private OnchainAsset asset; - /** - * The total amount in whole units with full precision. - */ - private String amount; + /** The total amount in whole units with full precision. */ + private String amount; - /** - * - UNKNOWN_VISIBILITY_STATUS: nil - * - VISIBLE: Visible - * - HIDDEN: Hidden - * - SPAM: Spam - */ - @JsonProperty("visibility_status") - private VisibilityStatus visibilityStatus; + /** - UNKNOWN_VISIBILITY_STATUS: nil - VISIBLE: Visible - HIDDEN: Hidden - SPAM: Spam */ + @JsonProperty("visibility_status") + private VisibilityStatus visibilityStatus; - public OnchainBalance() { - } + public OnchainBalance() {} - public OnchainBalance(Builder builder) { - this.asset = builder.asset; - this.amount = builder.amount; - this.visibilityStatus = builder.visibilityStatus; - } - public OnchainAsset getAsset() { - return asset; - } + public OnchainBalance(Builder builder) { + this.asset = builder.asset; + this.amount = builder.amount; + this.visibilityStatus = builder.visibilityStatus; + } - public void setAsset(OnchainAsset asset) { - this.asset = asset; - } - public String getAmount() { - return amount; - } + public OnchainAsset getAsset() { + return asset; + } - public void setAmount(String amount) { - this.amount = amount; - } - public VisibilityStatus getVisibilityStatus() { - return visibilityStatus; - } + public void setAsset(OnchainAsset asset) { + this.asset = asset; + } - public void setVisibilityStatus(VisibilityStatus visibilityStatus) { - this.visibilityStatus = visibilityStatus; - } - public static class Builder { - private OnchainAsset asset; + public String getAmount() { + return amount; + } - private String amount; + public void setAmount(String amount) { + this.amount = amount; + } - private VisibilityStatus visibilityStatus; + public VisibilityStatus getVisibilityStatus() { + return visibilityStatus; + } - public Builder asset(OnchainAsset asset) { - this.asset = asset; - return this; - } + public void setVisibilityStatus(VisibilityStatus visibilityStatus) { + this.visibilityStatus = visibilityStatus; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public static class Builder { + private OnchainAsset asset; + + private String amount; - public Builder visibilityStatus(VisibilityStatus visibilityStatus) { - this.visibilityStatus = visibilityStatus; - return this; - } + private VisibilityStatus visibilityStatus; - public OnchainBalance build() { - return new OnchainBalance(this); - } + public Builder asset(OnchainAsset asset) { + this.asset = asset; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder visibilityStatus(VisibilityStatus visibilityStatus) { + this.visibilityStatus = visibilityStatus; + return this; + } + + public OnchainBalance build() { + return new OnchainBalance(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java index 22c8ae1..c3896a8 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionDetails.java @@ -17,208 +17,205 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.RiskAssessment; + import com.coinbase.prime.model.enums.SigningStatus; import com.fasterxml.jackson.annotation.JsonProperty; public class OnchainTransactionDetails { - /** - * The signed transaction data - */ - @JsonProperty("signed_transaction") + /** The signed transaction data */ + @JsonProperty("signed_transaction") + private String signedTransaction; + + /** New message for risk assessment details */ + @JsonProperty("risk_assessment") + private RiskAssessment riskAssessment; + + /** The blockchain network chain ID. Will be empty for Solana transactions. */ + @JsonProperty("chain_id") + private String chainId; + + /** The transaction nonce. Only present for EVM-based blockchain transactions. */ + private String nonce; + + /** The ID of the transaction that this transaction replaced */ + @JsonProperty("replaced_transaction_id") + private String replacedTransactionId; + + /** The destination address for the transaction */ + @JsonProperty("destination_address") + private String destinationAddress; + + /** + * If set to true, the transaction will not be broadcast to the network. You can still retrieve + * the signed transaction from the GetTransaction endpoint by transaction ID once the transaction + * is created. + */ + @JsonProperty("skip_broadcast") + private boolean skipBroadcast; + + /** Reason for transaction failure if applicable */ + @JsonProperty("failure_reason") + private String failureReason; + + /** + * - SIGNING_STATUS_UNKNOWN: Unknown signing status - SIGNED: Transaction has been signed - + * UNSIGNED: Transaction is unsigned + */ + @JsonProperty("signing_status") + private SigningStatus signingStatus; + + public OnchainTransactionDetails() {} + + public OnchainTransactionDetails(Builder builder) { + this.signedTransaction = builder.signedTransaction; + this.riskAssessment = builder.riskAssessment; + this.chainId = builder.chainId; + this.nonce = builder.nonce; + this.replacedTransactionId = builder.replacedTransactionId; + this.destinationAddress = builder.destinationAddress; + this.skipBroadcast = builder.skipBroadcast; + this.failureReason = builder.failureReason; + this.signingStatus = builder.signingStatus; + } + + public String getSignedTransaction() { + return signedTransaction; + } + + public void setSignedTransaction(String signedTransaction) { + this.signedTransaction = signedTransaction; + } + + public RiskAssessment getRiskAssessment() { + return riskAssessment; + } + + public void setRiskAssessment(RiskAssessment riskAssessment) { + this.riskAssessment = riskAssessment; + } + + public String getChainId() { + return chainId; + } + + public void setChainId(String chainId) { + this.chainId = chainId; + } + + public String getNonce() { + return nonce; + } + + public void setNonce(String nonce) { + this.nonce = nonce; + } + + public String getReplacedTransactionId() { + return replacedTransactionId; + } + + public void setReplacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + } + + public String getDestinationAddress() { + return destinationAddress; + } + + public void setDestinationAddress(String destinationAddress) { + this.destinationAddress = destinationAddress; + } + + public boolean getSkipBroadcast() { + return skipBroadcast; + } + + public void setSkipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + } + + public String getFailureReason() { + return failureReason; + } + + public void setFailureReason(String failureReason) { + this.failureReason = failureReason; + } + + public SigningStatus getSigningStatus() { + return signingStatus; + } + + public void setSigningStatus(SigningStatus signingStatus) { + this.signingStatus = signingStatus; + } + + public static class Builder { private String signedTransaction; - /** New message for risk assessment details */ - @JsonProperty("risk_assessment") private RiskAssessment riskAssessment; - /** - * The blockchain network chain ID. Will be empty for Solana transactions. - */ - @JsonProperty("chain_id") private String chainId; - /** - * The transaction nonce. Only present for EVM-based blockchain transactions. - */ private String nonce; - /** - * The ID of the transaction that this transaction replaced - */ - @JsonProperty("replaced_transaction_id") private String replacedTransactionId; - /** - * The destination address for the transaction - */ - @JsonProperty("destination_address") private String destinationAddress; - /** - * If set to true, the transaction will not be broadcast to the network. You can still retrieve the signed transaction from the GetTransaction endpoint by transaction ID once the transaction is created. - */ - @JsonProperty("skip_broadcast") private boolean skipBroadcast; - /** - * Reason for transaction failure if applicable - */ - @JsonProperty("failure_reason") private String failureReason; - /** - * - SIGNING_STATUS_UNKNOWN: Unknown signing status - * - SIGNED: Transaction has been signed - * - UNSIGNED: Transaction is unsigned - */ - @JsonProperty("signing_status") private SigningStatus signingStatus; - public OnchainTransactionDetails() { - } - - public OnchainTransactionDetails(Builder builder) { - this.signedTransaction = builder.signedTransaction; - this.riskAssessment = builder.riskAssessment; - this.chainId = builder.chainId; - this.nonce = builder.nonce; - this.replacedTransactionId = builder.replacedTransactionId; - this.destinationAddress = builder.destinationAddress; - this.skipBroadcast = builder.skipBroadcast; - this.failureReason = builder.failureReason; - this.signingStatus = builder.signingStatus; - } - public String getSignedTransaction() { - return signedTransaction; - } - - public void setSignedTransaction(String signedTransaction) { - this.signedTransaction = signedTransaction; - } - public RiskAssessment getRiskAssessment() { - return riskAssessment; + public Builder signedTransaction(String signedTransaction) { + this.signedTransaction = signedTransaction; + return this; } - public void setRiskAssessment(RiskAssessment riskAssessment) { - this.riskAssessment = riskAssessment; - } - public String getChainId() { - return chainId; + public Builder riskAssessment(RiskAssessment riskAssessment) { + this.riskAssessment = riskAssessment; + return this; } - public void setChainId(String chainId) { - this.chainId = chainId; - } - public String getNonce() { - return nonce; + public Builder chainId(String chainId) { + this.chainId = chainId; + return this; } - public void setNonce(String nonce) { - this.nonce = nonce; - } - public String getReplacedTransactionId() { - return replacedTransactionId; + public Builder nonce(String nonce) { + this.nonce = nonce; + return this; } - public void setReplacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - } - public String getDestinationAddress() { - return destinationAddress; + public Builder replacedTransactionId(String replacedTransactionId) { + this.replacedTransactionId = replacedTransactionId; + return this; } - public void setDestinationAddress(String destinationAddress) { - this.destinationAddress = destinationAddress; - } - public boolean getSkipBroadcast() { - return skipBroadcast; + public Builder destinationAddress(String destinationAddress) { + this.destinationAddress = destinationAddress; + return this; } - public void setSkipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - } - public String getFailureReason() { - return failureReason; + public Builder skipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + return this; } - public void setFailureReason(String failureReason) { - this.failureReason = failureReason; - } - public SigningStatus getSigningStatus() { - return signingStatus; + public Builder failureReason(String failureReason) { + this.failureReason = failureReason; + return this; } - public void setSigningStatus(SigningStatus signingStatus) { - this.signingStatus = signingStatus; + public Builder signingStatus(SigningStatus signingStatus) { + this.signingStatus = signingStatus; + return this; } - public static class Builder { - private String signedTransaction; - - private RiskAssessment riskAssessment; - - private String chainId; - private String nonce; - - private String replacedTransactionId; - - private String destinationAddress; - - private boolean skipBroadcast; - - private String failureReason; - - private SigningStatus signingStatus; - - public Builder signedTransaction(String signedTransaction) { - this.signedTransaction = signedTransaction; - return this; - } - - public Builder riskAssessment(RiskAssessment riskAssessment) { - this.riskAssessment = riskAssessment; - return this; - } - - public Builder chainId(String chainId) { - this.chainId = chainId; - return this; - } - - public Builder nonce(String nonce) { - this.nonce = nonce; - return this; - } - - public Builder replacedTransactionId(String replacedTransactionId) { - this.replacedTransactionId = replacedTransactionId; - return this; - } - - public Builder destinationAddress(String destinationAddress) { - this.destinationAddress = destinationAddress; - return this; - } - - public Builder skipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - return this; - } - - public Builder failureReason(String failureReason) { - this.failureReason = failureReason; - return this; - } - - public Builder signingStatus(SigningStatus signingStatus) { - this.signingStatus = signingStatus; - return this; - } - - public OnchainTransactionDetails build() { - return new OnchainTransactionDetails(this); - } + public OnchainTransactionDetails build() { + return new OnchainTransactionDetails(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java index a49114a..23df078 100644 --- a/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java +++ b/src/main/java/com/coinbase/prime/model/OnchainTransactionMetadata.java @@ -17,61 +17,58 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.AssetChange; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class OnchainTransactionMetadata { - /** - * The transaction type label of the confirmed transaction post settlement - */ - private String label; + /** The transaction type label of the confirmed transaction post settlement */ + private String label; - /** - * The confirmed asset changes (onchain) - */ - @JsonProperty("confirmed_asset_changes") - private List confirmedAssetChanges; + /** The confirmed asset changes (onchain) */ + @JsonProperty("confirmed_asset_changes") + private List confirmedAssetChanges; - public OnchainTransactionMetadata() { - } + public OnchainTransactionMetadata() {} - public OnchainTransactionMetadata(Builder builder) { - this.label = builder.label; - this.confirmedAssetChanges = builder.confirmedAssetChanges; - } - public String getLabel() { - return label; - } + public OnchainTransactionMetadata(Builder builder) { + this.label = builder.label; + this.confirmedAssetChanges = builder.confirmedAssetChanges; + } - public void setLabel(String label) { - this.label = label; - } - public List getConfirmedAssetChanges() { - return confirmedAssetChanges; - } + public String getLabel() { + return label; + } - public void setConfirmedAssetChanges(List confirmedAssetChanges) { - this.confirmedAssetChanges = confirmedAssetChanges; - } - public static class Builder { - private String label; + public void setLabel(String label) { + this.label = label; + } - private List confirmedAssetChanges; + public List getConfirmedAssetChanges() { + return confirmedAssetChanges; + } - public Builder label(String label) { - this.label = label; - return this; - } + public void setConfirmedAssetChanges(List confirmedAssetChanges) { + this.confirmedAssetChanges = confirmedAssetChanges; + } - public Builder confirmedAssetChanges(List confirmedAssetChanges) { - this.confirmedAssetChanges = confirmedAssetChanges; - return this; - } + public static class Builder { + private String label; + + private List confirmedAssetChanges; - public OnchainTransactionMetadata build() { - return new OnchainTransactionMetadata(this); - } + public Builder label(String label) { + this.label = label; + return this; } -} + public Builder confirmedAssetChanges(List confirmedAssetChanges) { + this.confirmedAssetChanges = confirmedAssetChanges; + return this; + } + + public OnchainTransactionMetadata build() { + return new OnchainTransactionMetadata(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Order.java b/src/main/java/com/coinbase/prime/model/Order.java index aa77651..eeb2673 100644 --- a/src/main/java/com/coinbase/prime/model/Order.java +++ b/src/main/java/com/coinbase/prime/model/Order.java @@ -17,9 +17,7 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.LimitOrderEdit; -import com.coinbase.prime.model.CommissionDetailTotal; -import com.coinbase.prime.model.OrderEdit; + import com.coinbase.prime.model.enums.OrderSide; import com.coinbase.prime.model.enums.OrderStatus; import com.coinbase.prime.model.enums.OrderType; @@ -30,805 +28,790 @@ import java.util.List; public class Order { - /** - * The unique order ID generated by Coinbase - */ + /** The unique order ID generated by Coinbase */ + private String id; + + /** The ID of the user that created the order */ + @JsonProperty("user_id") + private String userId; + + /** The ID of the portfolio that owns the order */ + @JsonProperty("portfolio_id") + private String portfolioId; + + /** The ID of the product being traded by the order */ + @JsonProperty("product_id") + private String productId; + + /** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ + private OrderSide side; + + /** + * A client-generated order ID used for reference purposes (note: order will be rejected if this + * ID is not unique among all currently active orders) + */ + @JsonProperty("client_order_id") + private String clientOrderId; + + /** + * - UNKNOWN_ORDER_TYPE: nil value - MARKET: A [market + * order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) - LIMIT: A [limit + * order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) - TWAP: A [time-weighted + * average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) - BLOCK: A + * [block trade](https://en.wikipedia.org/wiki/Block_trade) - VWAP: A [volume-weighted average + * price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) - STOP_LIMIT: A + * [conditional order combined of stop order and limit + * order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) - RFQ: A [request for + * quote](https://en.wikipedia.org/wiki/Request_for_quote) - PEG: A pegged order that dynamically + * adjust based on market conditions while maintaining execution discretion and avoiding adverse + * selection + */ + private OrderType type; + + /** 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 + */ + @JsonProperty("quote_value") + private String quoteValue; + + /** The limit price (required for TWAP, VWAP, LIMIT and STOP_LIMIT orders) */ + @JsonProperty("limit_price") + private String limitPrice; + + /** The start time of the order in UTC (only applies to TWAP, VWAP orders.) */ + @JsonProperty("start_time") + private OffsetDateTime startTime; + + /** + * The expiry time of the order in UTC (applies to TWAP, VWAP, LIMIT, and STOP_LIMIT orders with + * `time_in_force` set to `GTD`) + */ + @JsonProperty("expiry_time") + private OffsetDateTime expiryTime; + + /** + * - UNKNOWN_ORDER_STATUS: nil value - OPEN: The order is open but unfilled - FILLED: The 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 + */ + private OrderStatus status; + + /** + * - UNKNOWN_TIME_IN_FORCE: nil value - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time - + * GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled - IMMEDIATE_OR_CANCEL: Order is + * executed immediately at submission or is cancelled - FILL_OR_KILL: Order is executed + * immediately and fully at submission or is cancelled + */ + @JsonProperty("time_in_force") + private TimeInForceType timeInForce; + + /** The order creation time as a UTC timestamp */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** Size filled (in base asset units) */ + @JsonProperty("filled_quantity") + private String filledQuantity; + + /** Market value filled (in quote asset units) */ + @JsonProperty("filled_value") + private String filledValue; + + /** Indicates the average `filled_price` */ + @JsonProperty("average_filled_price") + private String averageFilledPrice; + + /** + * Total commission paid on this order (in quote asset units) -- only applicable for partially- or + * fully-filled orders + */ + private String commission; + + /** + * Fee charged by the exchange for Cost Plus commission configurations. Exchange fee will be 0 for + * All In commission configurations. + */ + @JsonProperty("exchange_fee") + private String exchangeFee; + + /** historical pov for the order */ + @JsonProperty("historical_pov") + private String historicalPov; + + /** + * Specifies the stop price at which the order activates. The order is activated if the last trade + * price on Coinbase Exchange crosses the stop price specified on the order + */ + @JsonProperty("stop_price") + private String stopPrice; + + /** Indicates the average `filled_price` net of commissions and fees */ + @JsonProperty("net_average_filled_price") + private String netAverageFilledPrice; + + /** + * Indicates a user friendly message for regarding various aspects of the order such as + * cancellation or rejection reasons + */ + @JsonProperty("user_context") + private String userContext; + + /** The client product ID of the fill indictating the settlment currency */ + @JsonProperty("client_product_id") + private String clientProductId; + + /** Post-only flag - indicates whether the order was placed as post-only */ + @JsonProperty("post_only") + private boolean postOnly; + + /** The history of order edits (deprecated: use edit_history instead) */ + @JsonProperty("order_edit_history") + private List orderEditHistory; + + /** Indicates if this was a raise exact order (size inclusive of fees for sell orders in quote) */ + @JsonProperty("is_raise_exact") + private boolean isRaiseExact; + + /** Display size for the order */ + @JsonProperty("display_size") + private String displaySize; + + /** The history of order edits */ + @JsonProperty("edit_history") + private List editHistory; + + /** The maximum order size that will show up on venue order books (in quote currency). */ + @JsonProperty("display_quote_size") + private String displayQuoteSize; + + /** The maximum order size that will show up on venue order books (in base currency). */ + @JsonProperty("display_base_size") + private String displayBaseSize; + + /** The peg offset type for PEG orders (PRICE, BASIS_POINTS, or CUMULATIVE_DEPTH_IN_BASE_UNITS) */ + @JsonProperty("peg_offset_type") + private String pegOffsetType; + + /** The offset value for PEG orders */ + private String offset; + + /** The wig (would if good) level for PEG orders - best price opposite to limit_price */ + @JsonProperty("wig_level") + private String wigLevel; + + /** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ + @JsonProperty("product_type") + private ProductType productType; + + @JsonProperty("commission_detail_total") + private CommissionDetailTotal commissionDetailTotal; + + public Order() {} + + public Order(Builder builder) { + this.id = builder.id; + this.userId = builder.userId; + this.portfolioId = builder.portfolioId; + this.productId = builder.productId; + this.side = builder.side; + this.clientOrderId = builder.clientOrderId; + this.type = builder.type; + this.baseQuantity = builder.baseQuantity; + this.quoteValue = builder.quoteValue; + this.limitPrice = builder.limitPrice; + this.startTime = builder.startTime; + this.expiryTime = builder.expiryTime; + this.status = builder.status; + this.timeInForce = builder.timeInForce; + this.createdAt = builder.createdAt; + this.filledQuantity = builder.filledQuantity; + this.filledValue = builder.filledValue; + this.averageFilledPrice = builder.averageFilledPrice; + this.commission = builder.commission; + this.exchangeFee = builder.exchangeFee; + this.historicalPov = builder.historicalPov; + this.stopPrice = builder.stopPrice; + this.netAverageFilledPrice = builder.netAverageFilledPrice; + this.userContext = builder.userContext; + this.clientProductId = builder.clientProductId; + this.postOnly = builder.postOnly; + this.orderEditHistory = builder.orderEditHistory; + this.isRaiseExact = builder.isRaiseExact; + this.displaySize = builder.displaySize; + this.editHistory = builder.editHistory; + this.displayQuoteSize = builder.displayQuoteSize; + this.displayBaseSize = builder.displayBaseSize; + this.pegOffsetType = builder.pegOffsetType; + this.offset = builder.offset; + this.wigLevel = builder.wigLevel; + this.productType = builder.productType; + this.commissionDetailTotal = builder.commissionDetailTotal; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getProductId() { + return productId; + } + + public void setProductId(String productId) { + this.productId = productId; + } + + public OrderSide getSide() { + return side; + } + + public void setSide(OrderSide side) { + this.side = side; + } + + public String getClientOrderId() { + return clientOrderId; + } + + public void setClientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + } + + public OrderType getType() { + return type; + } + + public void setType(OrderType type) { + this.type = type; + } + + public String getBaseQuantity() { + return baseQuantity; + } + + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + + public String getQuoteValue() { + return quoteValue; + } + + public void setQuoteValue(String quoteValue) { + this.quoteValue = quoteValue; + } + + public String getLimitPrice() { + return limitPrice; + } + + public void setLimitPrice(String limitPrice) { + this.limitPrice = limitPrice; + } + + public OffsetDateTime getStartTime() { + return startTime; + } + + public void setStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + } + + public OffsetDateTime getExpiryTime() { + return expiryTime; + } + + public void setExpiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + } + + public OrderStatus getStatus() { + return status; + } + + public void setStatus(OrderStatus status) { + this.status = status; + } + + public TimeInForceType getTimeInForce() { + return timeInForce; + } + + public void setTimeInForce(TimeInForceType timeInForce) { + this.timeInForce = timeInForce; + } + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public String getFilledQuantity() { + return filledQuantity; + } + + public void setFilledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + } + + public String getFilledValue() { + return filledValue; + } + + public void setFilledValue(String filledValue) { + this.filledValue = filledValue; + } + + public String getAverageFilledPrice() { + return averageFilledPrice; + } + + public void setAverageFilledPrice(String averageFilledPrice) { + this.averageFilledPrice = averageFilledPrice; + } + + public String getCommission() { + return commission; + } + + public void setCommission(String commission) { + this.commission = commission; + } + + public String getExchangeFee() { + return exchangeFee; + } + + public void setExchangeFee(String exchangeFee) { + this.exchangeFee = exchangeFee; + } + + public String getHistoricalPov() { + return historicalPov; + } + + public void setHistoricalPov(String historicalPov) { + this.historicalPov = historicalPov; + } + + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(String stopPrice) { + this.stopPrice = stopPrice; + } + + public String getNetAverageFilledPrice() { + return netAverageFilledPrice; + } + + public void setNetAverageFilledPrice(String netAverageFilledPrice) { + this.netAverageFilledPrice = netAverageFilledPrice; + } + + public String getUserContext() { + return userContext; + } + + public void setUserContext(String userContext) { + this.userContext = userContext; + } + + public String getClientProductId() { + return clientProductId; + } + + public void setClientProductId(String clientProductId) { + this.clientProductId = clientProductId; + } + + public boolean getPostOnly() { + return postOnly; + } + + public void setPostOnly(boolean postOnly) { + this.postOnly = postOnly; + } + + public List getOrderEditHistory() { + return orderEditHistory; + } + + public void setOrderEditHistory(List orderEditHistory) { + this.orderEditHistory = orderEditHistory; + } + + public boolean getIsRaiseExact() { + return isRaiseExact; + } + + public void setIsRaiseExact(boolean isRaiseExact) { + this.isRaiseExact = isRaiseExact; + } + + public String getDisplaySize() { + return displaySize; + } + + public void setDisplaySize(String displaySize) { + this.displaySize = displaySize; + } + + public List getEditHistory() { + return editHistory; + } + + public void setEditHistory(List editHistory) { + this.editHistory = editHistory; + } + + public String getDisplayQuoteSize() { + return displayQuoteSize; + } + + public void setDisplayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + } + + public String getDisplayBaseSize() { + return displayBaseSize; + } + + public void setDisplayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + } + + public String getPegOffsetType() { + return pegOffsetType; + } + + public void setPegOffsetType(String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + } + + public String getOffset() { + return offset; + } + + public void setOffset(String offset) { + this.offset = offset; + } + + public String getWigLevel() { + return wigLevel; + } + + public void setWigLevel(String wigLevel) { + this.wigLevel = wigLevel; + } + + public ProductType getProductType() { + return productType; + } + + public void setProductType(ProductType productType) { + this.productType = productType; + } + + public CommissionDetailTotal getCommissionDetailTotal() { + return commissionDetailTotal; + } + + public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + } + + public static class Builder { private String id; - /** - * The ID of the user that created the order - */ - @JsonProperty("user_id") private String userId; - /** - * The ID of the portfolio that owns the order - */ - @JsonProperty("portfolio_id") private String portfolioId; - /** - * The ID of the product being traded by the order - */ - @JsonProperty("product_id") private String productId; - /** - * - UNKNOWN_ORDER_SIDE: nil value - * - BUY: Buy order - * - SELL: Sell order - */ private OrderSide side; - /** - * A client-generated order ID used for reference purposes (note: order will be rejected if this ID is not unique among all currently active orders) - */ - @JsonProperty("client_order_id") private String clientOrderId; - /** - * - UNKNOWN_ORDER_TYPE: nil value - * - MARKET: A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) - * - LIMIT: A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) - * - TWAP: A [time-weighted average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) - * - BLOCK: A [block trade](https://en.wikipedia.org/wiki/Block_trade) - * - VWAP: A [volume-weighted average price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) - * - STOP_LIMIT: A [conditional order combined of stop order and limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) - * - RFQ: A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) - * - PEG: A pegged order that dynamically adjust based on market conditions while maintaining execution discretion and avoiding adverse selection - */ private OrderType type; - /** - * 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 - */ - @JsonProperty("quote_value") private String quoteValue; - /** - * The limit price (required for TWAP, VWAP, LIMIT and STOP_LIMIT orders) - */ - @JsonProperty("limit_price") private String limitPrice; - /** - * The start time of the order in UTC (only applies to TWAP, VWAP orders.) - */ - @JsonProperty("start_time") private OffsetDateTime startTime; - /** - * The expiry time of the order in UTC (applies to TWAP, VWAP, LIMIT, and STOP_LIMIT orders with `time_in_force` set to `GTD`) - */ - @JsonProperty("expiry_time") private OffsetDateTime expiryTime; - /** - * - UNKNOWN_ORDER_STATUS: nil value - * - OPEN: The order is open but unfilled - * - FILLED: The 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 - */ private OrderStatus status; - /** - * - UNKNOWN_TIME_IN_FORCE: nil value - * - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time - * - GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled - * - IMMEDIATE_OR_CANCEL: Order is executed immediately at submission or is cancelled - * - FILL_OR_KILL: Order is executed immediately and fully at submission or is cancelled - */ - @JsonProperty("time_in_force") private TimeInForceType timeInForce; - /** - * The order creation time as a UTC timestamp - */ - @JsonProperty("created_at") private OffsetDateTime createdAt; - /** - * Size filled (in base asset units) - */ - @JsonProperty("filled_quantity") private String filledQuantity; - /** - * Market value filled (in quote asset units) - */ - @JsonProperty("filled_value") private String filledValue; - /** - * Indicates the average `filled_price` - */ - @JsonProperty("average_filled_price") private String averageFilledPrice; - /** - * Total commission paid on this order (in quote asset units) -- only applicable for partially- or fully-filled orders - */ private String commission; - /** - * Fee charged by the exchange for Cost Plus commission configurations. Exchange fee will be 0 for All In commission configurations. - */ - @JsonProperty("exchange_fee") private String exchangeFee; - /** - * historical pov for the order - */ - @JsonProperty("historical_pov") private String historicalPov; - /** - * Specifies the stop price at which the order activates. The order is activated if the last trade price on Coinbase Exchange crosses the stop price specified on the order - */ - @JsonProperty("stop_price") private String stopPrice; - /** - * Indicates the average `filled_price` net of commissions and fees - */ - @JsonProperty("net_average_filled_price") private String netAverageFilledPrice; - /** - * Indicates a user friendly message for regarding various aspects of the order such as cancellation or rejection reasons - */ - @JsonProperty("user_context") private String userContext; - /** - * The client product ID of the fill indictating the settlment currency - */ - @JsonProperty("client_product_id") private String clientProductId; - /** - * Post-only flag - indicates whether the order was placed as post-only - */ - @JsonProperty("post_only") private boolean postOnly; - /** - * The history of order edits (deprecated: use edit_history instead) - */ - @JsonProperty("order_edit_history") private List orderEditHistory; - /** - * Indicates if this was a raise exact order (size inclusive of fees for sell orders in quote) - */ - @JsonProperty("is_raise_exact") private boolean isRaiseExact; - /** - * Display size for the order - */ - @JsonProperty("display_size") private String displaySize; - /** - * The history of order edits - */ - @JsonProperty("edit_history") private List editHistory; - /** - * The maximum order size that will show up on venue order books (in quote currency). - */ - @JsonProperty("display_quote_size") private String displayQuoteSize; - /** - * The maximum order size that will show up on venue order books (in base currency). - */ - @JsonProperty("display_base_size") private String displayBaseSize; - /** - * The peg offset type for PEG orders (PRICE, BASIS_POINTS, or CUMULATIVE_DEPTH_IN_BASE_UNITS) - */ - @JsonProperty("peg_offset_type") private String pegOffsetType; - /** - * The offset value for PEG orders - */ private String offset; - /** - * The wig (would if good) level for PEG orders - best price opposite to limit_price - */ - @JsonProperty("wig_level") private String wigLevel; - /** - * - UNKNOWN_PRODUCT_TYPE: Unknown product type - * - SPOT: Spot product - * - FUTURE: Future product - */ - @JsonProperty("product_type") private ProductType productType; - @JsonProperty("commission_detail_total") private CommissionDetailTotal commissionDetailTotal; - public Order() { - } - - public Order(Builder builder) { - this.id = builder.id; - this.userId = builder.userId; - this.portfolioId = builder.portfolioId; - this.productId = builder.productId; - this.side = builder.side; - this.clientOrderId = builder.clientOrderId; - this.type = builder.type; - this.baseQuantity = builder.baseQuantity; - this.quoteValue = builder.quoteValue; - this.limitPrice = builder.limitPrice; - this.startTime = builder.startTime; - this.expiryTime = builder.expiryTime; - this.status = builder.status; - this.timeInForce = builder.timeInForce; - this.createdAt = builder.createdAt; - this.filledQuantity = builder.filledQuantity; - this.filledValue = builder.filledValue; - this.averageFilledPrice = builder.averageFilledPrice; - this.commission = builder.commission; - this.exchangeFee = builder.exchangeFee; - this.historicalPov = builder.historicalPov; - this.stopPrice = builder.stopPrice; - this.netAverageFilledPrice = builder.netAverageFilledPrice; - this.userContext = builder.userContext; - this.clientProductId = builder.clientProductId; - this.postOnly = builder.postOnly; - this.orderEditHistory = builder.orderEditHistory; - this.isRaiseExact = builder.isRaiseExact; - this.displaySize = builder.displaySize; - this.editHistory = builder.editHistory; - this.displayQuoteSize = builder.displayQuoteSize; - this.displayBaseSize = builder.displayBaseSize; - this.pegOffsetType = builder.pegOffsetType; - this.offset = builder.offset; - this.wigLevel = builder.wigLevel; - this.productType = builder.productType; - this.commissionDetailTotal = builder.commissionDetailTotal; - } - public String getId() { - return id; + public Builder id(String id) { + this.id = id; + return this; } - public void setId(String id) { - this.id = id; - } - public String getUserId() { - return userId; + public Builder userId(String userId) { + this.userId = userId; + return this; } - public void setUserId(String userId) { - this.userId = userId; - } - public String getPortfolioId() { - return portfolioId; + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getProductId() { - return productId; + public Builder productId(String productId) { + this.productId = productId; + return this; } - public void setProductId(String productId) { - this.productId = productId; - } - public OrderSide getSide() { - return side; + public Builder side(OrderSide side) { + this.side = side; + return this; } - public void setSide(OrderSide side) { - this.side = side; - } - public String getClientOrderId() { - return clientOrderId; - } - - public void setClientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - } - public OrderType getType() { - return type; + public Builder clientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; } - public void setType(OrderType type) { - this.type = type; - } - public String getBaseQuantity() { - return baseQuantity; + public Builder type(OrderType type) { + this.type = type; + return this; } - public void setBaseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - } - public String getQuoteValue() { - return quoteValue; + public Builder baseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + return this; } - public void setQuoteValue(String quoteValue) { - this.quoteValue = quoteValue; - } - public String getLimitPrice() { - return limitPrice; + public Builder quoteValue(String quoteValue) { + this.quoteValue = quoteValue; + return this; } - public void setLimitPrice(String limitPrice) { - this.limitPrice = limitPrice; - } - public OffsetDateTime getStartTime() { - return startTime; + public Builder limitPrice(String limitPrice) { + this.limitPrice = limitPrice; + return this; } - public void setStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - } - public OffsetDateTime getExpiryTime() { - return expiryTime; + public Builder startTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; } - public void setExpiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - } - public OrderStatus getStatus() { - return status; + public Builder expiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + return this; } - public void setStatus(OrderStatus status) { - this.status = status; - } - public TimeInForceType getTimeInForce() { - return timeInForce; + public Builder status(OrderStatus status) { + this.status = status; + return this; } - public void setTimeInForce(TimeInForceType timeInForce) { - this.timeInForce = timeInForce; - } - public OffsetDateTime getCreatedAt() { - return createdAt; + public Builder timeInForce(TimeInForceType timeInForce) { + this.timeInForce = timeInForce; + return this; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - public String getFilledQuantity() { - return filledQuantity; + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; } - public void setFilledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - } - public String getFilledValue() { - return filledValue; + public Builder filledQuantity(String filledQuantity) { + this.filledQuantity = filledQuantity; + return this; } - public void setFilledValue(String filledValue) { - this.filledValue = filledValue; - } - public String getAverageFilledPrice() { - return averageFilledPrice; + public Builder filledValue(String filledValue) { + this.filledValue = filledValue; + return this; } - public void setAverageFilledPrice(String averageFilledPrice) { - this.averageFilledPrice = averageFilledPrice; - } - public String getCommission() { - return commission; + public Builder averageFilledPrice(String averageFilledPrice) { + this.averageFilledPrice = averageFilledPrice; + return this; } - public void setCommission(String commission) { - this.commission = commission; - } - public String getExchangeFee() { - return exchangeFee; + public Builder commission(String commission) { + this.commission = commission; + return this; } - public void setExchangeFee(String exchangeFee) { - this.exchangeFee = exchangeFee; - } - public String getHistoricalPov() { - return historicalPov; + public Builder exchangeFee(String exchangeFee) { + this.exchangeFee = exchangeFee; + return this; } - public void setHistoricalPov(String historicalPov) { - this.historicalPov = historicalPov; - } - public String getStopPrice() { - return stopPrice; + public Builder historicalPov(String historicalPov) { + this.historicalPov = historicalPov; + return this; } - public void setStopPrice(String stopPrice) { - this.stopPrice = stopPrice; - } - public String getNetAverageFilledPrice() { - return netAverageFilledPrice; + public Builder stopPrice(String stopPrice) { + this.stopPrice = stopPrice; + return this; } - public void setNetAverageFilledPrice(String netAverageFilledPrice) { - this.netAverageFilledPrice = netAverageFilledPrice; - } - public String getUserContext() { - return userContext; + public Builder netAverageFilledPrice(String netAverageFilledPrice) { + this.netAverageFilledPrice = netAverageFilledPrice; + return this; } - public void setUserContext(String userContext) { - this.userContext = userContext; - } - public String getClientProductId() { - return clientProductId; + public Builder userContext(String userContext) { + this.userContext = userContext; + return this; } - public void setClientProductId(String clientProductId) { - this.clientProductId = clientProductId; - } - public boolean getPostOnly() { - return postOnly; + public Builder clientProductId(String clientProductId) { + this.clientProductId = clientProductId; + return this; } - public void setPostOnly(boolean postOnly) { - this.postOnly = postOnly; - } - public List getOrderEditHistory() { - return orderEditHistory; + public Builder postOnly(boolean postOnly) { + this.postOnly = postOnly; + return this; } - public void setOrderEditHistory(List orderEditHistory) { - this.orderEditHistory = orderEditHistory; - } - public boolean getIsRaiseExact() { - return isRaiseExact; + public Builder orderEditHistory(List orderEditHistory) { + this.orderEditHistory = orderEditHistory; + return this; } - public void setIsRaiseExact(boolean isRaiseExact) { - this.isRaiseExact = isRaiseExact; - } - public String getDisplaySize() { - return displaySize; + public Builder isRaiseExact(boolean isRaiseExact) { + this.isRaiseExact = isRaiseExact; + return this; } - public void setDisplaySize(String displaySize) { - this.displaySize = displaySize; - } - public List getEditHistory() { - return editHistory; + public Builder displaySize(String displaySize) { + this.displaySize = displaySize; + return this; } - public void setEditHistory(List editHistory) { - this.editHistory = editHistory; - } - public String getDisplayQuoteSize() { - return displayQuoteSize; + public Builder editHistory(List editHistory) { + this.editHistory = editHistory; + return this; } - public void setDisplayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - } - public String getDisplayBaseSize() { - return displayBaseSize; + public Builder displayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + return this; } - public void setDisplayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - } - public String getPegOffsetType() { - return pegOffsetType; + public Builder displayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + return this; } - public void setPegOffsetType(String pegOffsetType) { - this.pegOffsetType = pegOffsetType; - } - public String getOffset() { - return offset; + public Builder pegOffsetType(String pegOffsetType) { + this.pegOffsetType = pegOffsetType; + return this; } - public void setOffset(String offset) { - this.offset = offset; - } - public String getWigLevel() { - return wigLevel; + public Builder offset(String offset) { + this.offset = offset; + return this; } - public void setWigLevel(String wigLevel) { - this.wigLevel = wigLevel; - } - public ProductType getProductType() { - return productType; + public Builder wigLevel(String wigLevel) { + this.wigLevel = wigLevel; + return this; } - public void setProductType(ProductType productType) { - this.productType = productType; - } - public CommissionDetailTotal getCommissionDetailTotal() { - return commissionDetailTotal; + public Builder productType(ProductType productType) { + this.productType = productType; + return this; } - public void setCommissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; + public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { + this.commissionDetailTotal = commissionDetailTotal; + return this; } - public static class Builder { - private String id; - - private String userId; - - private String portfolioId; - - private String productId; - - private OrderSide side; - - private String clientOrderId; - - private OrderType type; - - private String baseQuantity; - - private String quoteValue; - - private String limitPrice; - - private OffsetDateTime startTime; - - private OffsetDateTime expiryTime; - - private OrderStatus status; - - private TimeInForceType timeInForce; - - private OffsetDateTime createdAt; - - private String filledQuantity; - private String filledValue; - - private String averageFilledPrice; - - private String commission; - - private String exchangeFee; - - private String historicalPov; - - private String stopPrice; - - private String netAverageFilledPrice; - - private String userContext; - - private String clientProductId; - - private boolean postOnly; - - private List orderEditHistory; - - private boolean isRaiseExact; - - private String displaySize; - - private List editHistory; - - private String displayQuoteSize; - - private String displayBaseSize; - - private String pegOffsetType; - - private String offset; - - private String wigLevel; - - private ProductType productType; - - private CommissionDetailTotal commissionDetailTotal; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder userId(String userId) { - this.userId = userId; - return this; - } - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder productId(String productId) { - this.productId = productId; - return this; - } - - public Builder side(OrderSide side) { - this.side = side; - return this; - } - - public Builder clientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; - } - - public Builder type(OrderType type) { - this.type = type; - return this; - } - - public Builder baseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - return this; - } - - public Builder quoteValue(String quoteValue) { - this.quoteValue = quoteValue; - return this; - } - - public Builder limitPrice(String limitPrice) { - this.limitPrice = limitPrice; - return this; - } - - public Builder startTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - public Builder expiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - return this; - } - - public Builder status(OrderStatus status) { - this.status = status; - return this; - } - - public Builder timeInForce(TimeInForceType timeInForce) { - this.timeInForce = timeInForce; - return this; - } - - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder filledQuantity(String filledQuantity) { - this.filledQuantity = filledQuantity; - return this; - } - - public Builder filledValue(String filledValue) { - this.filledValue = filledValue; - return this; - } - - public Builder averageFilledPrice(String averageFilledPrice) { - this.averageFilledPrice = averageFilledPrice; - return this; - } - - public Builder commission(String commission) { - this.commission = commission; - return this; - } - - public Builder exchangeFee(String exchangeFee) { - this.exchangeFee = exchangeFee; - return this; - } - - public Builder historicalPov(String historicalPov) { - this.historicalPov = historicalPov; - return this; - } - - public Builder stopPrice(String stopPrice) { - this.stopPrice = stopPrice; - return this; - } - - public Builder netAverageFilledPrice(String netAverageFilledPrice) { - this.netAverageFilledPrice = netAverageFilledPrice; - return this; - } - - public Builder userContext(String userContext) { - this.userContext = userContext; - return this; - } - - public Builder clientProductId(String clientProductId) { - this.clientProductId = clientProductId; - return this; - } - - public Builder postOnly(boolean postOnly) { - this.postOnly = postOnly; - return this; - } - - public Builder orderEditHistory(List orderEditHistory) { - this.orderEditHistory = orderEditHistory; - return this; - } - - public Builder isRaiseExact(boolean isRaiseExact) { - this.isRaiseExact = isRaiseExact; - return this; - } - - public Builder displaySize(String displaySize) { - this.displaySize = displaySize; - return this; - } - - public Builder editHistory(List editHistory) { - this.editHistory = editHistory; - return this; - } - - public Builder displayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - return this; - } - - public Builder displayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - return this; - } - - public Builder pegOffsetType(String pegOffsetType) { - this.pegOffsetType = pegOffsetType; - return this; - } - - public Builder offset(String offset) { - this.offset = offset; - return this; - } - - public Builder wigLevel(String wigLevel) { - this.wigLevel = wigLevel; - return this; - } - - public Builder productType(ProductType productType) { - this.productType = productType; - return this; - } - - public Builder commissionDetailTotal(CommissionDetailTotal commissionDetailTotal) { - this.commissionDetailTotal = commissionDetailTotal; - return this; - } - - public Order build() { - return new Order(this); - } + public Order build() { + return new Order(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/OrderEdit.java b/src/main/java/com/coinbase/prime/model/OrderEdit.java index 99c5a6f..d5a6af5 100644 --- a/src/main/java/com/coinbase/prime/model/OrderEdit.java +++ b/src/main/java/com/coinbase/prime/model/OrderEdit.java @@ -17,189 +17,201 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class OrderEdit { - /** New price for the edited order */ + /** New price for the edited order */ + private String price; + + /** New base quantity for the edited order, populated if order is in base size */ + @JsonProperty("base_quantity") + private String baseQuantity; + + /** New quote value for the edited order, populated if order is in quote size */ + @JsonProperty("quote_value") + private String quoteValue; + + /** Display base size for the edited order, populated if order is in base size */ + @JsonProperty("display_base_size") + private String displayBaseSize; + + /** Display quote size for the edited order, populated if order is in quote size */ + @JsonProperty("display_quote_size") + private String displayQuoteSize; + + /** New stop price for the edited order */ + @JsonProperty("stop_price") + private String stopPrice; + + /** New expiry/end time for the edited order */ + @JsonProperty("expiry_time") + private OffsetDateTime expiryTime; + + /** Time when the edit was accepted */ + @JsonProperty("accept_time") + private OffsetDateTime acceptTime; + + /** + * The new client order identifier that the order adopted after the replacement was successfully + * accepted + */ + @JsonProperty("client_order_id") + private String clientOrderId; + + public OrderEdit() {} + + public OrderEdit(Builder builder) { + this.price = builder.price; + this.baseQuantity = builder.baseQuantity; + this.quoteValue = builder.quoteValue; + this.displayBaseSize = builder.displayBaseSize; + this.displayQuoteSize = builder.displayQuoteSize; + this.stopPrice = builder.stopPrice; + this.expiryTime = builder.expiryTime; + this.acceptTime = builder.acceptTime; + this.clientOrderId = builder.clientOrderId; + } + + public String getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getBaseQuantity() { + return baseQuantity; + } + + public void setBaseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + } + + public String getQuoteValue() { + return quoteValue; + } + + public void setQuoteValue(String quoteValue) { + this.quoteValue = quoteValue; + } + + public String getDisplayBaseSize() { + return displayBaseSize; + } + + public void setDisplayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + } + + public String getDisplayQuoteSize() { + return displayQuoteSize; + } + + public void setDisplayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + } + + public String getStopPrice() { + return stopPrice; + } + + public void setStopPrice(String stopPrice) { + this.stopPrice = stopPrice; + } + + public OffsetDateTime getExpiryTime() { + return expiryTime; + } + + public void setExpiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + } + + public OffsetDateTime getAcceptTime() { + return acceptTime; + } + + public void setAcceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + } + + public String getClientOrderId() { + return clientOrderId; + } + + public void setClientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + } + + public static class Builder { private String price; - /** New base quantity for the edited order, populated if order is in base size */ - @JsonProperty("base_quantity") private String baseQuantity; - /** New quote value for the edited order, populated if order is in quote size */ - @JsonProperty("quote_value") private String quoteValue; - /** Display base size for the edited order, populated if order is in base size */ - @JsonProperty("display_base_size") private String displayBaseSize; - /** Display quote size for the edited order, populated if order is in quote size */ - @JsonProperty("display_quote_size") private String displayQuoteSize; - /** New stop price for the edited order */ - @JsonProperty("stop_price") private String stopPrice; - /** New expiry/end time for the edited order */ - @JsonProperty("expiry_time") private OffsetDateTime expiryTime; - /** Time when the edit was accepted */ - @JsonProperty("accept_time") private OffsetDateTime acceptTime; - /** The new client order identifier that the order adopted after the replacement was successfully accepted */ - @JsonProperty("client_order_id") private String clientOrderId; - public OrderEdit() { - } - - public OrderEdit(Builder builder) { - this.price = builder.price; - this.baseQuantity = builder.baseQuantity; - this.quoteValue = builder.quoteValue; - this.displayBaseSize = builder.displayBaseSize; - this.displayQuoteSize = builder.displayQuoteSize; - this.stopPrice = builder.stopPrice; - this.expiryTime = builder.expiryTime; - this.acceptTime = builder.acceptTime; - this.clientOrderId = builder.clientOrderId; - } - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - public String getBaseQuantity() { - return baseQuantity; + public Builder price(String price) { + this.price = price; + return this; } - public void setBaseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - } - public String getQuoteValue() { - return quoteValue; + public Builder baseQuantity(String baseQuantity) { + this.baseQuantity = baseQuantity; + return this; } - public void setQuoteValue(String quoteValue) { - this.quoteValue = quoteValue; - } - public String getDisplayBaseSize() { - return displayBaseSize; + public Builder quoteValue(String quoteValue) { + this.quoteValue = quoteValue; + return this; } - public void setDisplayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - } - public String getDisplayQuoteSize() { - return displayQuoteSize; + public Builder displayBaseSize(String displayBaseSize) { + this.displayBaseSize = displayBaseSize; + return this; } - public void setDisplayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - } - public String getStopPrice() { - return stopPrice; + public Builder displayQuoteSize(String displayQuoteSize) { + this.displayQuoteSize = displayQuoteSize; + return this; } - public void setStopPrice(String stopPrice) { - this.stopPrice = stopPrice; - } - public OffsetDateTime getExpiryTime() { - return expiryTime; + public Builder stopPrice(String stopPrice) { + this.stopPrice = stopPrice; + return this; } - public void setExpiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - } - public OffsetDateTime getAcceptTime() { - return acceptTime; + public Builder expiryTime(OffsetDateTime expiryTime) { + this.expiryTime = expiryTime; + return this; } - public void setAcceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - } - public String getClientOrderId() { - return clientOrderId; + public Builder acceptTime(OffsetDateTime acceptTime) { + this.acceptTime = acceptTime; + return this; } - public void setClientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; + public Builder clientOrderId(String clientOrderId) { + this.clientOrderId = clientOrderId; + return this; } - public static class Builder { - private String price; - - private String baseQuantity; - - private String quoteValue; - private String displayBaseSize; - - private String displayQuoteSize; - - private String stopPrice; - - private OffsetDateTime expiryTime; - - private OffsetDateTime acceptTime; - - private String clientOrderId; - - public Builder price(String price) { - this.price = price; - return this; - } - - public Builder baseQuantity(String baseQuantity) { - this.baseQuantity = baseQuantity; - return this; - } - - public Builder quoteValue(String quoteValue) { - this.quoteValue = quoteValue; - return this; - } - - public Builder displayBaseSize(String displayBaseSize) { - this.displayBaseSize = displayBaseSize; - return this; - } - - public Builder displayQuoteSize(String displayQuoteSize) { - this.displayQuoteSize = displayQuoteSize; - return this; - } - - public Builder stopPrice(String stopPrice) { - this.stopPrice = stopPrice; - return this; - } - - public Builder expiryTime(OffsetDateTime expiryTime) { - this.expiryTime = expiryTime; - return this; - } - - public Builder acceptTime(OffsetDateTime acceptTime) { - this.acceptTime = acceptTime; - return this; - } - - public Builder clientOrderId(String clientOrderId) { - this.clientOrderId = clientOrderId; - return this; - } - - public OrderEdit build() { - return new OrderEdit(this); - } + public OrderEdit build() { + return new OrderEdit(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java b/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java index c174f0e..d5c7000 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodDestination.java @@ -17,37 +17,38 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodDestination { - /** The payment method id to pay out */ - @JsonProperty("payment_method_id") - private String paymentMethodId; + /** The payment method id to pay out */ + @JsonProperty("payment_method_id") + private String paymentMethodId; - public PaymentMethodDestination() { - } + public PaymentMethodDestination() {} - public PaymentMethodDestination(Builder builder) { - this.paymentMethodId = builder.paymentMethodId; - } - public String getPaymentMethodId() { - return paymentMethodId; - } + public PaymentMethodDestination(Builder builder) { + this.paymentMethodId = builder.paymentMethodId; + } - public void setPaymentMethodId(String paymentMethodId) { - this.paymentMethodId = paymentMethodId; - } - public static class Builder { - private String paymentMethodId; + public String getPaymentMethodId() { + return paymentMethodId; + } - public Builder paymentMethodId(String paymentMethodId) { - this.paymentMethodId = paymentMethodId; - return this; - } + public void setPaymentMethodId(String paymentMethodId) { + this.paymentMethodId = paymentMethodId; + } - public PaymentMethodDestination build() { - return new PaymentMethodDestination(this); - } + public static class Builder { + private String paymentMethodId; + + public Builder paymentMethodId(String paymentMethodId) { + this.paymentMethodId = paymentMethodId; + return this; } -} + public PaymentMethodDestination build() { + return new PaymentMethodDestination(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java index 0ffad5e..7c12fac 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodDetails.java @@ -17,130 +17,134 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.PaymentMethodType; import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodDetails { - private String id; + private String id; - private String symbol; + private String symbol; - /** - * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - * - METHOD_WIRE: Wire transfer - * - METHOD_SEN: Silvergate exchange network - * - METHOD_SWIFT: Swift - */ - @JsonProperty("payment_method_type") - private PaymentMethodType paymentMethodType; + /** + * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - METHOD_WIRE: Wire transfer - METHOD_SEN: Silvergate + * exchange network - METHOD_SWIFT: Swift + */ + @JsonProperty("payment_method_type") + private PaymentMethodType paymentMethodType; - private String name; + private String name; - @JsonProperty("account_number") - private String accountNumber; + @JsonProperty("account_number") + private String accountNumber; - @JsonProperty("bank_code") - private String bankCode; + @JsonProperty("bank_code") + private String bankCode; - public PaymentMethodDetails() { - } + public PaymentMethodDetails() {} - public PaymentMethodDetails(Builder builder) { - this.id = builder.id; - this.symbol = builder.symbol; - this.paymentMethodType = builder.paymentMethodType; - this.name = builder.name; - this.accountNumber = builder.accountNumber; - this.bankCode = builder.bankCode; - } - public String getId() { - return id; - } + public PaymentMethodDetails(Builder builder) { + this.id = builder.id; + this.symbol = builder.symbol; + this.paymentMethodType = builder.paymentMethodType; + this.name = builder.name; + this.accountNumber = builder.accountNumber; + this.bankCode = builder.bankCode; + } - public void setId(String id) { - this.id = id; - } - public String getSymbol() { - return symbol; - } + public String getId() { + return id; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public PaymentMethodType getPaymentMethodType() { - return paymentMethodType; - } + public void setId(String id) { + this.id = id; + } - public void setPaymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - } - public String getName() { - return name; - } + public String getSymbol() { + return symbol; + } - public void setName(String name) { - this.name = name; - } - public String getAccountNumber() { - return accountNumber; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public String getBankCode() { - return bankCode; - } + public PaymentMethodType getPaymentMethodType() { + return paymentMethodType; + } - public void setBankCode(String bankCode) { - this.bankCode = bankCode; - } - public static class Builder { - private String id; + public void setPaymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + } - private String symbol; + public String getName() { + return name; + } - private PaymentMethodType paymentMethodType; + public void setName(String name) { + this.name = name; + } - private String name; + public String getAccountNumber() { + return accountNumber; + } - private String accountNumber; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } - private String bankCode; + public String getBankCode() { + return bankCode; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setBankCode(String bankCode) { + this.bankCode = bankCode; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public static class Builder { + private String id; + + private String symbol; + + private PaymentMethodType paymentMethodType; - public Builder paymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - return this; - } + private String name; - public Builder name(String name) { - this.name = name; - return this; - } + private String accountNumber; - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private String bankCode; - public Builder bankCode(String bankCode) { - this.bankCode = bankCode; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public PaymentMethodDetails build() { - return new PaymentMethodDetails(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder paymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + public Builder bankCode(String bankCode) { + this.bankCode = bankCode; + return this; + } + + public PaymentMethodDetails build() { + return new PaymentMethodDetails(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java index 77626dc..1e76f85 100644 --- a/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java +++ b/src/main/java/com/coinbase/prime/model/PaymentMethodSummary.java @@ -17,131 +17,135 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.PaymentMethodType; import com.fasterxml.jackson.annotation.JsonProperty; public class PaymentMethodSummary { - private String id; + private String id; - private String symbol; + private String symbol; - /** - * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - * - METHOD_WIRE: Wire transfer - * - METHOD_SEN: Silvergate exchange network - * - METHOD_SWIFT: Swift - */ - @JsonProperty("payment_method_type") - private PaymentMethodType paymentMethodType; + /** + * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - METHOD_WIRE: Wire transfer - METHOD_SEN: Silvergate + * exchange network - METHOD_SWIFT: Swift + */ + @JsonProperty("payment_method_type") + private PaymentMethodType paymentMethodType; - @JsonProperty("bank_name") - private String bankName; + @JsonProperty("bank_name") + private String bankName; - @JsonProperty("account_number") - private String accountNumber; + @JsonProperty("account_number") + private String accountNumber; - @JsonProperty("bank_name_2") - private String bankName2; + @JsonProperty("bank_name_2") + private String bankName2; - public PaymentMethodSummary() { - } + public PaymentMethodSummary() {} - public PaymentMethodSummary(Builder builder) { - this.id = builder.id; - this.symbol = builder.symbol; - this.paymentMethodType = builder.paymentMethodType; - this.bankName = builder.bankName; - this.accountNumber = builder.accountNumber; - this.bankName2 = builder.bankName2; - } - public String getId() { - return id; - } + public PaymentMethodSummary(Builder builder) { + this.id = builder.id; + this.symbol = builder.symbol; + this.paymentMethodType = builder.paymentMethodType; + this.bankName = builder.bankName; + this.accountNumber = builder.accountNumber; + this.bankName2 = builder.bankName2; + } - public void setId(String id) { - this.id = id; - } - public String getSymbol() { - return symbol; - } + public String getId() { + return id; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public PaymentMethodType getPaymentMethodType() { - return paymentMethodType; - } + public void setId(String id) { + this.id = id; + } - public void setPaymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - } - public String getBankName() { - return bankName; - } + public String getSymbol() { + return symbol; + } - public void setBankName(String bankName) { - this.bankName = bankName; - } - public String getAccountNumber() { - return accountNumber; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public String getBankName2() { - return bankName2; - } + public PaymentMethodType getPaymentMethodType() { + return paymentMethodType; + } - public void setBankName2(String bankName2) { - this.bankName2 = bankName2; - } - public static class Builder { - private String id; + public void setPaymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + } - private String symbol; + public String getBankName() { + return bankName; + } - private PaymentMethodType paymentMethodType; + public void setBankName(String bankName) { + this.bankName = bankName; + } - private String bankName; + public String getAccountNumber() { + return accountNumber; + } - private String accountNumber; + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } - private String bankName2; + public String getBankName2() { + return bankName2; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setBankName2(String bankName2) { + this.bankName2 = bankName2; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public static class Builder { + private String id; + + private String symbol; + + private PaymentMethodType paymentMethodType; - public Builder paymentMethodType(PaymentMethodType paymentMethodType) { - this.paymentMethodType = paymentMethodType; - return this; - } + private String bankName; - public Builder bankName(String bankName) { - this.bankName = bankName; - return this; - } + private String accountNumber; - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } + private String bankName2; - public Builder bankName2(String bankName2) { - this.bankName2 = bankName2; - return this; - } + public Builder id(String id) { + this.id = id; + return this; + } - public PaymentMethodSummary build() { - return new PaymentMethodSummary(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder paymentMethodType(PaymentMethodType paymentMethodType) { + this.paymentMethodType = paymentMethodType; + return this; + } + + public Builder bankName(String bankName) { + this.bankName = bankName; + return this; + } + + public Builder accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + public Builder bankName2(String bankName2) { + this.bankName2 = bankName2; + return this; + } + + public PaymentMethodSummary build() { + return new PaymentMethodSummary(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java index eb28152..a196bd6 100644 --- a/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/PerpetualProductDetails.java @@ -17,125 +17,120 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** PerpetualProductDetails contains details specific to perpetual futures products */ public class PerpetualProductDetails { - /** - * Open interest - */ - @JsonProperty("open_interest") - private String openInterest; + /** Open interest */ + @JsonProperty("open_interest") + private String openInterest; - /** - * Current funding rate - */ - @JsonProperty("funding_rate") - private String fundingRate; + /** Current funding rate */ + @JsonProperty("funding_rate") + private String fundingRate; - /** - * Next funding time - */ - @JsonProperty("funding_time") - private OffsetDateTime fundingTime; + /** Next funding time */ + @JsonProperty("funding_time") + private OffsetDateTime fundingTime; - /** - * Maximum leverage allowed - */ - @JsonProperty("max_leverage") - private String maxLeverage; + /** Maximum leverage allowed */ + @JsonProperty("max_leverage") + private String maxLeverage; - /** - * The type of underlying for the perpetual product - */ - @JsonProperty("underlying_type") - private String underlyingType; + /** The type of underlying for the perpetual product */ + @JsonProperty("underlying_type") + private String underlyingType; - public PerpetualProductDetails() { - } + public PerpetualProductDetails() {} - public PerpetualProductDetails(Builder builder) { - this.openInterest = builder.openInterest; - this.fundingRate = builder.fundingRate; - this.fundingTime = builder.fundingTime; - this.maxLeverage = builder.maxLeverage; - this.underlyingType = builder.underlyingType; - } - public String getOpenInterest() { - return openInterest; - } + public PerpetualProductDetails(Builder builder) { + this.openInterest = builder.openInterest; + this.fundingRate = builder.fundingRate; + this.fundingTime = builder.fundingTime; + this.maxLeverage = builder.maxLeverage; + this.underlyingType = builder.underlyingType; + } - public void setOpenInterest(String openInterest) { - this.openInterest = openInterest; - } - public String getFundingRate() { - return fundingRate; - } + public String getOpenInterest() { + return openInterest; + } - public void setFundingRate(String fundingRate) { - this.fundingRate = fundingRate; - } - public OffsetDateTime getFundingTime() { - return fundingTime; - } + public void setOpenInterest(String openInterest) { + this.openInterest = openInterest; + } - public void setFundingTime(OffsetDateTime fundingTime) { - this.fundingTime = fundingTime; - } - public String getMaxLeverage() { - return maxLeverage; - } + public String getFundingRate() { + return fundingRate; + } - public void setMaxLeverage(String maxLeverage) { - this.maxLeverage = maxLeverage; - } - public String getUnderlyingType() { - return underlyingType; - } + public void setFundingRate(String fundingRate) { + this.fundingRate = fundingRate; + } - public void setUnderlyingType(String underlyingType) { - this.underlyingType = underlyingType; - } - public static class Builder { - private String openInterest; + public OffsetDateTime getFundingTime() { + return fundingTime; + } - private String fundingRate; + public void setFundingTime(OffsetDateTime fundingTime) { + this.fundingTime = fundingTime; + } - private OffsetDateTime fundingTime; + public String getMaxLeverage() { + return maxLeverage; + } - private String maxLeverage; + public void setMaxLeverage(String maxLeverage) { + this.maxLeverage = maxLeverage; + } - private String underlyingType; + public String getUnderlyingType() { + return underlyingType; + } - public Builder openInterest(String openInterest) { - this.openInterest = openInterest; - return this; - } + public void setUnderlyingType(String underlyingType) { + this.underlyingType = underlyingType; + } - public Builder fundingRate(String fundingRate) { - this.fundingRate = fundingRate; - return this; - } + public static class Builder { + private String openInterest; - public Builder fundingTime(OffsetDateTime fundingTime) { - this.fundingTime = fundingTime; - return this; - } + private String fundingRate; - public Builder maxLeverage(String maxLeverage) { - this.maxLeverage = maxLeverage; - return this; - } + private OffsetDateTime fundingTime; - public Builder underlyingType(String underlyingType) { - this.underlyingType = underlyingType; - return this; - } + private String maxLeverage; - public PerpetualProductDetails build() { - return new PerpetualProductDetails(this); - } + private String underlyingType; + + public Builder openInterest(String openInterest) { + this.openInterest = openInterest; + return this; + } + + public Builder fundingRate(String fundingRate) { + this.fundingRate = fundingRate; + return this; } -} + public Builder fundingTime(OffsetDateTime fundingTime) { + this.fundingTime = fundingTime; + return this; + } + + public Builder maxLeverage(String maxLeverage) { + this.maxLeverage = maxLeverage; + return this; + } + + public Builder underlyingType(String underlyingType) { + this.underlyingType = underlyingType; + return this; + } + + public PerpetualProductDetails build() { + return new PerpetualProductDetails(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java index 96e9c1c..7c9bad6 100644 --- a/src/main/java/com/coinbase/prime/model/PmAssetInfo.java +++ b/src/main/java/com/coinbase/prime/model/PmAssetInfo.java @@ -17,372 +17,355 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class PmAssetInfo { - /** - * The currency symbol - */ + /** The currency symbol */ + private String symbol; + + /** Nominal amount of the currency */ + private String amount; + + /** Spot price for the currency */ + private String price; + + /** Notional amount of the currency */ + @JsonProperty("notional_amount") + private String notionalAmount; + + /** Asset tier of the currency */ + @JsonProperty("asset_tier") + private String assetTier; + + /** Whether the currency is margin eligible */ + @JsonProperty("margin_eligible") + private boolean marginEligible; + + /** Base margin requirement of the currency */ + @JsonProperty("base_margin_requirement") + private String baseMarginRequirement; + + /** Notional amount of the currency's base margin requirement */ + @JsonProperty("base_margin_requirement_notional") + private String baseMarginRequirementNotional; + + /** The 30d adv of the currency */ + @JsonProperty("adv_30d") + private String adv30d; + + /** Historic 5d volatility of the currency */ + @JsonProperty("hist_5d_vol") + private String hist5dVol; + + /** Historic 30d volatility of the currency */ + @JsonProperty("hist_30d_vol") + private String hist30dVol; + + /** Historic 90d volatility of the currency */ + @JsonProperty("hist_90d_vol") + private String hist90dVol; + + /** Volatility margin addon of the currency position */ + @JsonProperty("volatility_addon") + private String volatilityAddon; + + /** Liquidity margin addon of the currency position */ + @JsonProperty("liquidity_addon") + private String liquidityAddon; + + /** Total position margin of the currency */ + @JsonProperty("total_position_margin") + private String totalPositionMargin; + + /** Nominal short position of the currency */ + @JsonProperty("short_nominal") + private String shortNominal; + + /** Nominal long position of the currency */ + @JsonProperty("long_nominal") + private String longNominal; + + public PmAssetInfo() {} + + public PmAssetInfo(Builder builder) { + this.symbol = builder.symbol; + this.amount = builder.amount; + this.price = builder.price; + this.notionalAmount = builder.notionalAmount; + this.assetTier = builder.assetTier; + this.marginEligible = builder.marginEligible; + this.baseMarginRequirement = builder.baseMarginRequirement; + this.baseMarginRequirementNotional = builder.baseMarginRequirementNotional; + this.adv30d = builder.adv30d; + this.hist5dVol = builder.hist5dVol; + this.hist30dVol = builder.hist30dVol; + this.hist90dVol = builder.hist90dVol; + this.volatilityAddon = builder.volatilityAddon; + this.liquidityAddon = builder.liquidityAddon; + this.totalPositionMargin = builder.totalPositionMargin; + this.shortNominal = builder.shortNominal; + this.longNominal = builder.longNominal; + } + + 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 getPrice() { + return price; + } + + public void setPrice(String price) { + this.price = price; + } + + public String getNotionalAmount() { + return notionalAmount; + } + + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } + + public String getAssetTier() { + return assetTier; + } + + public void setAssetTier(String assetTier) { + this.assetTier = assetTier; + } + + public boolean getMarginEligible() { + return marginEligible; + } + + public void setMarginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + } + + public String getBaseMarginRequirement() { + return baseMarginRequirement; + } + + public void setBaseMarginRequirement(String baseMarginRequirement) { + this.baseMarginRequirement = baseMarginRequirement; + } + + public String getBaseMarginRequirementNotional() { + return baseMarginRequirementNotional; + } + + public void setBaseMarginRequirementNotional(String baseMarginRequirementNotional) { + this.baseMarginRequirementNotional = baseMarginRequirementNotional; + } + + public String getAdv30d() { + return adv30d; + } + + public void setAdv30d(String adv30d) { + this.adv30d = adv30d; + } + + public String getHist5dVol() { + return hist5dVol; + } + + public void setHist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + } + + public String getHist30dVol() { + return hist30dVol; + } + + public void setHist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + } + + public String getHist90dVol() { + return hist90dVol; + } + + public void setHist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + } + + 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 getTotalPositionMargin() { + return totalPositionMargin; + } + + public void setTotalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + } + + public String getShortNominal() { + return shortNominal; + } + + public void setShortNominal(String shortNominal) { + this.shortNominal = shortNominal; + } + + public String getLongNominal() { + return longNominal; + } + + public void setLongNominal(String longNominal) { + this.longNominal = longNominal; + } + + public static class Builder { private String symbol; - /** - * Nominal amount of the currency - */ private String amount; - /** - * Spot price for the currency - */ private String price; - /** - * Notional amount of the currency - */ - @JsonProperty("notional_amount") private String notionalAmount; - /** - * Asset tier of the currency - */ - @JsonProperty("asset_tier") private String assetTier; - /** - * Whether the currency is margin eligible - */ - @JsonProperty("margin_eligible") private boolean marginEligible; - /** - * Base margin requirement of the currency - */ - @JsonProperty("base_margin_requirement") private String baseMarginRequirement; - /** - * Notional amount of the currency's base margin requirement - */ - @JsonProperty("base_margin_requirement_notional") private String baseMarginRequirementNotional; - /** - * The 30d adv of the currency - */ - @JsonProperty("adv_30d") private String adv30d; - /** - * Historic 5d volatility of the currency - */ - @JsonProperty("hist_5d_vol") private String hist5dVol; - /** - * Historic 30d volatility of the currency - */ - @JsonProperty("hist_30d_vol") private String hist30dVol; - /** - * Historic 90d volatility of the currency - */ - @JsonProperty("hist_90d_vol") private String hist90dVol; - /** - * Volatility margin addon of the currency position - */ - @JsonProperty("volatility_addon") private String volatilityAddon; - /** - * Liquidity margin addon of the currency position - */ - @JsonProperty("liquidity_addon") private String liquidityAddon; - /** - * Total position margin of the currency - */ - @JsonProperty("total_position_margin") private String totalPositionMargin; - /** - * Nominal short position of the currency - */ - @JsonProperty("short_nominal") private String shortNominal; - /** - * Nominal long position of the currency - */ - @JsonProperty("long_nominal") private String longNominal; - public PmAssetInfo() { + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } - public PmAssetInfo(Builder builder) { - this.symbol = builder.symbol; - this.amount = builder.amount; - this.price = builder.price; - this.notionalAmount = builder.notionalAmount; - this.assetTier = builder.assetTier; - this.marginEligible = builder.marginEligible; - this.baseMarginRequirement = builder.baseMarginRequirement; - this.baseMarginRequirementNotional = builder.baseMarginRequirementNotional; - this.adv30d = builder.adv30d; - this.hist5dVol = builder.hist5dVol; - this.hist30dVol = builder.hist30dVol; - this.hist90dVol = builder.hist90dVol; - this.volatilityAddon = builder.volatilityAddon; - this.liquidityAddon = builder.liquidityAddon; - this.totalPositionMargin = builder.totalPositionMargin; - this.shortNominal = builder.shortNominal; - this.longNominal = builder.longNominal; - } - public String getSymbol() { - return symbol; + public Builder amount(String amount) { + this.amount = amount; + return this; } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getAmount() { - return amount; + public Builder price(String price) { + this.price = price; + return this; } - public void setAmount(String amount) { - this.amount = amount; - } - public String getPrice() { - return price; + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; } - public void setPrice(String price) { - this.price = price; - } - public String getNotionalAmount() { - return notionalAmount; + public Builder assetTier(String assetTier) { + this.assetTier = assetTier; + return this; } - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } - public String getAssetTier() { - return assetTier; + public Builder marginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + return this; } - public void setAssetTier(String assetTier) { - this.assetTier = assetTier; - } - public boolean getMarginEligible() { - return marginEligible; - } - - public void setMarginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - } - public String getBaseMarginRequirement() { - return baseMarginRequirement; + public Builder baseMarginRequirement(String baseMarginRequirement) { + this.baseMarginRequirement = baseMarginRequirement; + return this; } - public void setBaseMarginRequirement(String baseMarginRequirement) { - this.baseMarginRequirement = baseMarginRequirement; - } - public String getBaseMarginRequirementNotional() { - return baseMarginRequirementNotional; - } - - public void setBaseMarginRequirementNotional(String baseMarginRequirementNotional) { - this.baseMarginRequirementNotional = baseMarginRequirementNotional; - } - public String getAdv30d() { - return adv30d; + public Builder baseMarginRequirementNotional(String baseMarginRequirementNotional) { + this.baseMarginRequirementNotional = baseMarginRequirementNotional; + return this; } - public void setAdv30d(String adv30d) { - this.adv30d = adv30d; - } - public String getHist5dVol() { - return hist5dVol; + public Builder adv30d(String adv30d) { + this.adv30d = adv30d; + return this; } - public void setHist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - } - public String getHist30dVol() { - return hist30dVol; + public Builder hist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + return this; } - public void setHist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - } - public String getHist90dVol() { - return hist90dVol; + public Builder hist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + return this; } - public void setHist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - } - public String getVolatilityAddon() { - return volatilityAddon; + public Builder hist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + return this; } - public void setVolatilityAddon(String volatilityAddon) { - this.volatilityAddon = volatilityAddon; - } - public String getLiquidityAddon() { - return liquidityAddon; + public Builder volatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + return this; } - public void setLiquidityAddon(String liquidityAddon) { - this.liquidityAddon = liquidityAddon; - } - public String getTotalPositionMargin() { - return totalPositionMargin; + public Builder liquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + return this; } - public void setTotalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - } - public String getShortNominal() { - return shortNominal; + public Builder totalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + return this; } - public void setShortNominal(String shortNominal) { - this.shortNominal = shortNominal; - } - public String getLongNominal() { - return longNominal; + public Builder shortNominal(String shortNominal) { + this.shortNominal = shortNominal; + return this; } - public void setLongNominal(String longNominal) { - this.longNominal = longNominal; + public Builder longNominal(String longNominal) { + this.longNominal = longNominal; + return this; } - public static class Builder { - private String symbol; - private String amount; - - private String price; - - private String notionalAmount; - - private String assetTier; - - private boolean marginEligible; - - private String baseMarginRequirement; - - private String baseMarginRequirementNotional; - - private String adv30d; - - private String hist5dVol; - - private String hist30dVol; - - private String hist90dVol; - - private String volatilityAddon; - - private String liquidityAddon; - - private String totalPositionMargin; - - private String shortNominal; - - private String longNominal; - - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder price(String price) { - this.price = price; - return this; - } - - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; - } - - public Builder assetTier(String assetTier) { - this.assetTier = assetTier; - return this; - } - - public Builder marginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - return this; - } - - public Builder baseMarginRequirement(String baseMarginRequirement) { - this.baseMarginRequirement = baseMarginRequirement; - return this; - } - - public Builder baseMarginRequirementNotional(String baseMarginRequirementNotional) { - this.baseMarginRequirementNotional = baseMarginRequirementNotional; - return this; - } - - public Builder adv30d(String adv30d) { - this.adv30d = adv30d; - return this; - } - - public Builder hist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - return this; - } - - public Builder hist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - return this; - } - - public Builder hist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - return this; - } - - public Builder volatilityAddon(String volatilityAddon) { - this.volatilityAddon = volatilityAddon; - return this; - } - - public Builder liquidityAddon(String liquidityAddon) { - this.liquidityAddon = liquidityAddon; - return this; - } - - public Builder totalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - return this; - } - - public Builder shortNominal(String shortNominal) { - this.shortNominal = shortNominal; - return this; - } - - public Builder longNominal(String longNominal) { - this.longNominal = longNominal; - return this; - } - - public PmAssetInfo build() { - return new PmAssetInfo(this); - } + public PmAssetInfo build() { + return new PmAssetInfo(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/Portfolio.java b/src/main/java/com/coinbase/prime/model/Portfolio.java index aced61a..c5a9c8f 100644 --- a/src/main/java/com/coinbase/prime/model/Portfolio.java +++ b/src/main/java/com/coinbase/prime/model/Portfolio.java @@ -17,121 +17,116 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class Portfolio { - /** - * The unique ID of the portfolio - */ - private String id; + /** The unique ID of the portfolio */ + private String id; - /** - * The name of the portfolio - */ - private String name; + /** The name of the portfolio */ + private String name; - /** - * The ID of the entity to which the portfolio is associated - */ - @JsonProperty("entity_id") - private String entityId; + /** The ID of the entity to which the portfolio is associated */ + @JsonProperty("entity_id") + private String entityId; - /** - * The ID of the organization to which the portfolio is associated - */ - @JsonProperty("organization_id") - private String organizationId; + /** The ID of the organization to which the portfolio is associated */ + @JsonProperty("organization_id") + private String organizationId; - /** - * The name of the entity to which the portfolio is associated - */ - @JsonProperty("entity_name") - private String entityName; + /** The name of the entity to which the portfolio is associated */ + @JsonProperty("entity_name") + private String entityName; - public Portfolio() { - } + public Portfolio() {} - public Portfolio(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.entityId = builder.entityId; - this.organizationId = builder.organizationId; - this.entityName = builder.entityName; - } - public String getId() { - return id; - } + public Portfolio(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.entityId = builder.entityId; + this.organizationId = builder.organizationId; + this.entityName = builder.entityName; + } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } + public String getId() { + return id; + } - public void setName(String name) { - this.name = name; - } - public String getEntityId() { - return entityId; - } + public void setId(String id) { + this.id = id; + } - public void setEntityId(String entityId) { - this.entityId = entityId; - } - public String getOrganizationId() { - return organizationId; - } + public String getName() { + return name; + } - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId; - } - public String getEntityName() { - return entityName; - } + public void setName(String name) { + this.name = name; + } - public void setEntityName(String entityName) { - this.entityName = entityName; - } - public static class Builder { - private String id; + public String getEntityId() { + return entityId; + } - private String name; + public void setEntityId(String entityId) { + this.entityId = entityId; + } - private String entityId; + public String getOrganizationId() { + return organizationId; + } - private String organizationId; + public void setOrganizationId(String organizationId) { + this.organizationId = organizationId; + } - private String entityName; + public String getEntityName() { + return entityName; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setEntityName(String entityName) { + this.entityName = entityName; + } - public Builder name(String name) { - this.name = name; - return this; - } + public static class Builder { + private String id; - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } + private String name; - public Builder organizationId(String organizationId) { - this.organizationId = organizationId; - return this; - } + private String entityId; - public Builder entityName(String entityName) { - this.entityName = entityName; - return this; - } + private String organizationId; - public Portfolio build() { - return new Portfolio(this); - } + private String entityName; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; } -} + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; + } + + public Builder organizationId(String organizationId) { + this.organizationId = organizationId; + return this; + } + + public Builder entityName(String entityName) { + this.entityName = entityName; + return this; + } + + public Portfolio build() { + return new Portfolio(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java b/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java index 1798796..44c43eb 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioStakingMetadata.java @@ -17,39 +17,41 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class PortfolioStakingMetadata { - /** - * An optional custom identifier (up to 255 characters) to attach to the transaction. This is not a searchable transaction field. - */ - @JsonProperty("external_id") - private String externalId; + /** + * An optional custom identifier (up to 255 characters) to attach to the transaction. This is not + * a searchable transaction field. + */ + @JsonProperty("external_id") + private String externalId; - public PortfolioStakingMetadata() { - } + public PortfolioStakingMetadata() {} - public PortfolioStakingMetadata(Builder builder) { - this.externalId = builder.externalId; - } - public String getExternalId() { - return externalId; - } + public PortfolioStakingMetadata(Builder builder) { + this.externalId = builder.externalId; + } - public void setExternalId(String externalId) { - this.externalId = externalId; - } - public static class Builder { - private String externalId; + public String getExternalId() { + return externalId; + } - public Builder externalId(String externalId) { - this.externalId = externalId; - return this; - } + public void setExternalId(String externalId) { + this.externalId = externalId; + } - public PortfolioStakingMetadata build() { - return new PortfolioStakingMetadata(this); - } + public static class Builder { + private String externalId; + + public Builder externalId(String externalId) { + this.externalId = externalId; + return this; } -} + public PortfolioStakingMetadata build() { + return new PortfolioStakingMetadata(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PortfolioUser.java b/src/main/java/com/coinbase/prime/model/PortfolioUser.java index 2cc951b..8ad0a2e 100644 --- a/src/main/java/com/coinbase/prime/model/PortfolioUser.java +++ b/src/main/java/com/coinbase/prime/model/PortfolioUser.java @@ -17,195 +17,181 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.SecondaryPermission; import com.coinbase.prime.model.enums.UserRole; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class PortfolioUser { - /** - * The unique ID of the user. - */ + /** The unique ID of the user. */ + private String id; + + /** The name of the user. */ + private String name; + + /** The email of the user. */ + private String email; + + /** The portfolio to which this user and associated permissions are identified. */ + @JsonProperty("portfolio_id") + private String portfolioId; + + /** The entity to which this user and associated permissions are identified. */ + @JsonProperty("entity_id") + private String entityId; + + /** + * - USER_ROLE_UNKNOWN: nil value - AUDITOR: An auditor - SIGNATORY: A signatory - ADMIN: An admin + * - INITIATOR: An initiator - REVIEWER: A reviewer - TRADER: A trader - FULL_TRADER: A trader + * with full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A + * tax manager - BUSINESS_MANAGER: A business manager + */ + private UserRole role; + + /** All primary roles assigned to the user. */ + private List roles; + + /** All secondary permissions assigned to the user. */ + @JsonProperty("secondary_permissions") + private List secondaryPermissions; + + public PortfolioUser() {} + + public PortfolioUser(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.email = builder.email; + this.portfolioId = builder.portfolioId; + this.entityId = builder.entityId; + this.role = builder.role; + this.roles = builder.roles; + this.secondaryPermissions = builder.secondaryPermissions; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public String getEntityId() { + return entityId; + } + + public void setEntityId(String entityId) { + this.entityId = entityId; + } + + public UserRole getRole() { + return role; + } + + public void setRole(UserRole role) { + this.role = role; + } + + public List getRoles() { + return roles; + } + + public void setRoles(List roles) { + this.roles = roles; + } + + public List getSecondaryPermissions() { + return secondaryPermissions; + } + + public void setSecondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + } + + public static class Builder { private String id; - /** - * The name of the user. - */ private String name; - /** - * The email of the user. - */ private String email; - /** - * The portfolio to which this user and associated permissions are identified. - */ - @JsonProperty("portfolio_id") private String portfolioId; - /** - * The entity to which this user and associated permissions are identified. - */ - @JsonProperty("entity_id") private String entityId; - /** - * - USER_ROLE_UNKNOWN: nil value - * - AUDITOR: An auditor - * - SIGNATORY: A signatory - * - ADMIN: An admin - * - INITIATOR: An initiator - * - REVIEWER: A reviewer - * - TRADER: A trader - * - FULL_TRADER: A trader with full permissions - * - TEAM_MANAGER: A team manager - * - APPROVER: An approver - * - TAX_MANAGER: A tax manager - * - BUSINESS_MANAGER: A business manager - */ private UserRole role; - /** - * All primary roles assigned to the user. - */ private List roles; - /** - * All secondary permissions assigned to the user. - */ - @JsonProperty("secondary_permissions") private List secondaryPermissions; - public PortfolioUser() { + public Builder id(String id) { + this.id = id; + return this; } - public PortfolioUser(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.email = builder.email; - this.portfolioId = builder.portfolioId; - this.entityId = builder.entityId; - this.role = builder.role; - this.roles = builder.roles; - this.secondaryPermissions = builder.secondaryPermissions; - } - public String getId() { - return id; + public Builder name(String name) { + this.name = name; + return this; } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; + public Builder email(String email) { + this.email = email; + return this; } - public void setName(String name) { - this.name = name; - } - public String getEmail() { - return email; + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; } - public void setEmail(String email) { - this.email = email; - } - public String getPortfolioId() { - return portfolioId; + public Builder entityId(String entityId) { + this.entityId = entityId; + return this; } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getEntityId() { - return entityId; + public Builder role(UserRole role) { + this.role = role; + return this; } - public void setEntityId(String entityId) { - this.entityId = entityId; - } - public UserRole getRole() { - return role; + public Builder roles(List roles) { + this.roles = roles; + return this; } - public void setRole(UserRole role) { - this.role = role; - } - public List getRoles() { - return roles; + public Builder secondaryPermissions(List secondaryPermissions) { + this.secondaryPermissions = secondaryPermissions; + return this; } - public void setRoles(List roles) { - this.roles = roles; - } - public List getSecondaryPermissions() { - return secondaryPermissions; - } - - public void setSecondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - } - public static class Builder { - private String id; - - private String name; - - private String email; - - private String portfolioId; - - private String entityId; - - private UserRole role; - - private List roles; - - private List secondaryPermissions; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder email(String email) { - this.email = email; - return this; - } - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder entityId(String entityId) { - this.entityId = entityId; - return this; - } - - public Builder role(UserRole role) { - this.role = role; - return this; - } - - public Builder roles(List roles) { - this.roles = roles; - return this; - } - - public Builder secondaryPermissions(List secondaryPermissions) { - this.secondaryPermissions = secondaryPermissions; - return this; - } - - public PortfolioUser build() { - return new PortfolioUser(this); - } + public PortfolioUser build() { + return new PortfolioUser(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/Position.java b/src/main/java/com/coinbase/prime/model/Position.java index 31594cd..573a815 100644 --- a/src/main/java/com/coinbase/prime/model/Position.java +++ b/src/main/java/com/coinbase/prime/model/Position.java @@ -17,99 +17,96 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.PositionReference; + import com.fasterxml.jackson.annotation.JsonProperty; public class Position { - /** - * Asset symbol - */ - private String symbol; + /** Asset symbol */ + private String symbol; - /** - * The long position based on 'reference' value - */ - @JsonProperty("long") - private String _long; + /** The long position based on 'reference' value */ + @JsonProperty("long") + private String _long; - /** - * The short position based on 'reference' value - */ - @JsonProperty("short") - private String _short; + /** The short position based on 'reference' value */ + @JsonProperty("short") + private String _short; - @JsonProperty("position_reference") - private PositionReference positionReference; + @JsonProperty("position_reference") + private PositionReference positionReference; - public Position() { - } + public Position() {} - public Position(Builder builder) { - this.symbol = builder.symbol; - this._long = builder._long; - this._short = builder._short; - this.positionReference = builder.positionReference; - } - public String getSymbol() { - return symbol; - } + public Position(Builder builder) { + this.symbol = builder.symbol; + this._long = builder._long; + this._short = builder._short; + this.positionReference = builder.positionReference; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getLong() { - return _long; - } + public String getSymbol() { + return symbol; + } - public void setLong(String _long) { - this._long = _long; - } - public String getShort() { - return _short; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setShort(String _short) { - this._short = _short; - } - public PositionReference getPositionReference() { - return positionReference; - } + public String getLong() { + return _long; + } - public void setPositionReference(PositionReference positionReference) { - this.positionReference = positionReference; - } - public static class Builder { - private String symbol; + public void setLong(String _long) { + this._long = _long; + } - private String _long; + public String getShort() { + return _short; + } - private String _short; + public void setShort(String _short) { + this._short = _short; + } - private PositionReference positionReference; + public PositionReference getPositionReference() { + return positionReference; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setPositionReference(PositionReference positionReference) { + this.positionReference = positionReference; + } - public Builder _long(String _long) { - this._long = _long; - return this; - } + public static class Builder { + private String symbol; - public Builder _short(String _short) { - this._short = _short; - return this; - } + private String _long; - public Builder positionReference(PositionReference positionReference) { - this.positionReference = positionReference; - return this; - } + private String _short; - public Position build() { - return new Position(this); - } + private PositionReference positionReference; + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder _long(String _long) { + this._long = _long; + return this; + } + + public Builder _short(String _short) { + this._short = _short; + return this; } -} + public Builder positionReference(PositionReference positionReference) { + this.positionReference = positionReference; + return this; + } + + public Position build() { + return new Position(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PositionReference.java b/src/main/java/com/coinbase/prime/model/PositionReference.java index dd15ee1..c3baac4 100644 --- a/src/main/java/com/coinbase/prime/model/PositionReference.java +++ b/src/main/java/com/coinbase/prime/model/PositionReference.java @@ -17,55 +17,55 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.PositionReferenceType; public class PositionReference { - /** - * Reference ID - */ - private String id; + /** Reference ID */ + private String id; - private PositionReferenceType type; + private PositionReferenceType type; - public PositionReference() { - } + public PositionReference() {} - public PositionReference(Builder builder) { - this.id = builder.id; - this.type = builder.type; - } - public String getId() { - return id; - } + public PositionReference(Builder builder) { + this.id = builder.id; + this.type = builder.type; + } - public void setId(String id) { - this.id = id; - } - public PositionReferenceType getType() { - return type; - } + public String getId() { + return id; + } - public void setType(PositionReferenceType type) { - this.type = type; - } - public static class Builder { - private String id; + public void setId(String id) { + this.id = id; + } - private PositionReferenceType type; + public PositionReferenceType getType() { + return type; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setType(PositionReferenceType type) { + this.type = type; + } - public Builder type(PositionReferenceType type) { - this.type = type; - return this; - } + public static class Builder { + private String id; + + private PositionReferenceType type; - public PositionReference build() { - return new PositionReference(this); - } + public Builder id(String id) { + this.id = id; + return this; } -} + public Builder type(PositionReferenceType type) { + this.type = type; + return this; + } + + public PositionReference build() { + return new PositionReference(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java index dc61b95..29ae30f 100644 --- a/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java +++ b/src/main/java/com/coinbase/prime/model/PostTradeCreditInformation.java @@ -17,242 +17,232 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.AmountDue; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class PostTradeCreditInformation { - /** - * The unique ID of the portfolio - */ - @JsonProperty("portfolio_id") - private String portfolioId; + /** The unique ID of the portfolio */ + @JsonProperty("portfolio_id") + private String portfolioId; + + /** The currency symbol credit is denoted in */ + private String currency; - /** - * The currency symbol credit is denoted in - */ - private String currency; + /** The maximum credit limit */ + private String limit; - /** - * The maximum credit limit - */ - private String limit; + /** The amount of credit used */ + private String utilized; - /** - * The amount of credit used - */ - private String utilized; + /** The amount of credit available */ + private String available; + + /** Whether or not a portfolio is frozen due to balance outstanding or other reason */ + private boolean frozen; - /** - * The amount of credit available - */ - private String available; + /** The reason why the portfolio is frozen */ + @JsonProperty("frozen_reason") + private String frozenReason; - /** - * Whether or not a portfolio is frozen due to balance outstanding or other reason - */ - private boolean frozen; + @JsonProperty("amounts_due") + private List amountsDue; - /** - * The reason why the portfolio is frozen - */ - @JsonProperty("frozen_reason") - private String frozenReason; + /** Whether the portfolio has credit enabled */ + private boolean enabled; - @JsonProperty("amounts_due") - private List amountsDue; + /** The amount of adjusted credit used */ + @JsonProperty("adjusted_credit_utilized") + private String adjustedCreditUtilized; - /** - * Whether the portfolio has credit enabled - */ - private boolean enabled; + /** The amount of adjusted portfolio equity */ + @JsonProperty("adjusted_portfolio_equity") + private String adjustedPortfolioEquity; - /** - * The amount of adjusted credit used - */ - @JsonProperty("adjusted_credit_utilized") - private String adjustedCreditUtilized; + public PostTradeCreditInformation() {} - /** - * The amount of adjusted portfolio equity - */ - @JsonProperty("adjusted_portfolio_equity") - private String adjustedPortfolioEquity; + public PostTradeCreditInformation(Builder builder) { + this.portfolioId = builder.portfolioId; + this.currency = builder.currency; + this.limit = builder.limit; + this.utilized = builder.utilized; + this.available = builder.available; + this.frozen = builder.frozen; + this.frozenReason = builder.frozenReason; + this.amountsDue = builder.amountsDue; + this.enabled = builder.enabled; + this.adjustedCreditUtilized = builder.adjustedCreditUtilized; + this.adjustedPortfolioEquity = builder.adjustedPortfolioEquity; + } - public PostTradeCreditInformation() { - } + public String getPortfolioId() { + return portfolioId; + } - public PostTradeCreditInformation(Builder builder) { - this.portfolioId = builder.portfolioId; - this.currency = builder.currency; - this.limit = builder.limit; - this.utilized = builder.utilized; - this.available = builder.available; - this.frozen = builder.frozen; - this.frozenReason = builder.frozenReason; - this.amountsDue = builder.amountsDue; - this.enabled = builder.enabled; - this.adjustedCreditUtilized = builder.adjustedCreditUtilized; - this.adjustedPortfolioEquity = builder.adjustedPortfolioEquity; - } - public String getPortfolioId() { - return portfolioId; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getCurrency() { - return currency; - } + public String getCurrency() { + return currency; + } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getLimit() { - return limit; - } + public void setCurrency(String currency) { + this.currency = currency; + } - public void setLimit(String limit) { - this.limit = limit; - } - public String getUtilized() { - return utilized; - } + public String getLimit() { + return limit; + } - public void setUtilized(String utilized) { - this.utilized = utilized; - } - public String getAvailable() { - return available; - } + public void setLimit(String limit) { + this.limit = limit; + } - public void setAvailable(String available) { - this.available = available; - } - public boolean getFrozen() { - return frozen; - } + public String getUtilized() { + return utilized; + } - public void setFrozen(boolean frozen) { - this.frozen = frozen; - } - public String getFrozenReason() { - return frozenReason; - } + public void setUtilized(String utilized) { + this.utilized = utilized; + } - public void setFrozenReason(String frozenReason) { - this.frozenReason = frozenReason; - } - public List getAmountsDue() { - return amountsDue; - } + public String getAvailable() { + return available; + } - public void setAmountsDue(List amountsDue) { - this.amountsDue = amountsDue; - } - public boolean getEnabled() { - return enabled; - } + public void setAvailable(String available) { + this.available = available; + } - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - public String getAdjustedCreditUtilized() { - return adjustedCreditUtilized; - } + public boolean getFrozen() { + return frozen; + } - public void setAdjustedCreditUtilized(String adjustedCreditUtilized) { - this.adjustedCreditUtilized = adjustedCreditUtilized; - } - public String getAdjustedPortfolioEquity() { - return adjustedPortfolioEquity; - } + public void setFrozen(boolean frozen) { + this.frozen = frozen; + } - public void setAdjustedPortfolioEquity(String adjustedPortfolioEquity) { - this.adjustedPortfolioEquity = adjustedPortfolioEquity; - } - public static class Builder { - private String portfolioId; + public String getFrozenReason() { + return frozenReason; + } - private String currency; + public void setFrozenReason(String frozenReason) { + this.frozenReason = frozenReason; + } - private String limit; + public List getAmountsDue() { + return amountsDue; + } - private String utilized; + public void setAmountsDue(List amountsDue) { + this.amountsDue = amountsDue; + } + + public boolean getEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public String getAdjustedCreditUtilized() { + return adjustedCreditUtilized; + } + + public void setAdjustedCreditUtilized(String adjustedCreditUtilized) { + this.adjustedCreditUtilized = adjustedCreditUtilized; + } + + public String getAdjustedPortfolioEquity() { + return adjustedPortfolioEquity; + } + + public void setAdjustedPortfolioEquity(String adjustedPortfolioEquity) { + this.adjustedPortfolioEquity = adjustedPortfolioEquity; + } + + public static class Builder { + private String portfolioId; - private String available; + private String currency; - private boolean frozen; + private String limit; - private String frozenReason; + private String utilized; - private List amountsDue; + private String available; - private boolean enabled; + private boolean frozen; - private String adjustedCreditUtilized; + private String frozenReason; - private String adjustedPortfolioEquity; + private List amountsDue; - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + private boolean enabled; - public Builder currency(String currency) { - this.currency = currency; - return this; - } + private String adjustedCreditUtilized; - public Builder limit(String limit) { - this.limit = limit; - return this; - } + private String adjustedPortfolioEquity; - public Builder utilized(String utilized) { - this.utilized = utilized; - return this; - } + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } - public Builder available(String available) { - this.available = available; - return this; - } + public Builder currency(String currency) { + this.currency = currency; + return this; + } - public Builder frozen(boolean frozen) { - this.frozen = frozen; - return this; - } + public Builder limit(String limit) { + this.limit = limit; + return this; + } - public Builder frozenReason(String frozenReason) { - this.frozenReason = frozenReason; - return this; - } + public Builder utilized(String utilized) { + this.utilized = utilized; + return this; + } - public Builder amountsDue(List amountsDue) { - this.amountsDue = amountsDue; - return this; - } + public Builder available(String available) { + this.available = available; + return this; + } - public Builder enabled(boolean enabled) { - this.enabled = enabled; - return this; - } + public Builder frozen(boolean frozen) { + this.frozen = frozen; + return this; + } - public Builder adjustedCreditUtilized(String adjustedCreditUtilized) { - this.adjustedCreditUtilized = adjustedCreditUtilized; - return this; - } + public Builder frozenReason(String frozenReason) { + this.frozenReason = frozenReason; + return this; + } - public Builder adjustedPortfolioEquity(String adjustedPortfolioEquity) { - this.adjustedPortfolioEquity = adjustedPortfolioEquity; - return this; - } + public Builder amountsDue(List amountsDue) { + this.amountsDue = amountsDue; + return this; + } - public PostTradeCreditInformation build() { - return new PostTradeCreditInformation(this); - } + public Builder enabled(boolean enabled) { + this.enabled = enabled; + return this; + } + + public Builder adjustedCreditUtilized(String adjustedCreditUtilized) { + this.adjustedCreditUtilized = adjustedCreditUtilized; + return this; } -} + public Builder adjustedPortfolioEquity(String adjustedPortfolioEquity) { + this.adjustedPortfolioEquity = adjustedPortfolioEquity; + return this; + } + + public PostTradeCreditInformation build() { + return new PostTradeCreditInformation(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java index f0014b3..d13b04c 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginCallThresholds.java @@ -17,125 +17,119 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.PrimeXMMarginThreshold; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class PrimeXMMarginCallThresholds { - /** - * Deficit threshold (DT). - */ - @JsonProperty("deficit_threshold") - private String deficitThreshold; + /** Deficit threshold (DT). */ + @JsonProperty("deficit_threshold") + private String deficitThreshold; - /** - * Warning threshold (WT). - */ - @JsonProperty("warning_threshold") - private String warningThreshold; + /** Warning threshold (WT). */ + @JsonProperty("warning_threshold") + private String warningThreshold; - /** - * Urgent margin call threshold (UMCT). - */ - @JsonProperty("critical_threshold") - private String criticalThreshold; + /** Urgent margin call threshold (UMCT). */ + @JsonProperty("critical_threshold") + private String criticalThreshold; - /** - * Liquidation threshold (LT). - */ - @JsonProperty("liquidation_threshold") - private String liquidationThreshold; + /** Liquidation threshold (LT). */ + @JsonProperty("liquidation_threshold") + private String liquidationThreshold; - /** - * Structured margin thresholds by margin level. - */ - @JsonProperty("margin_thresholds") - private List marginThresholds; + /** Structured margin thresholds by margin level. */ + @JsonProperty("margin_thresholds") + private List marginThresholds; - public PrimeXMMarginCallThresholds() { - } + 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 PrimeXMMarginCallThresholds(Builder builder) { + this.deficitThreshold = builder.deficitThreshold; + this.warningThreshold = builder.warningThreshold; + this.criticalThreshold = builder.criticalThreshold; + this.liquidationThreshold = builder.liquidationThreshold; + this.marginThresholds = builder.marginThresholds; + } - public void setDeficitThreshold(String deficitThreshold) { - this.deficitThreshold = deficitThreshold; - } - public String getWarningThreshold() { - return warningThreshold; - } + public String getDeficitThreshold() { + return deficitThreshold; + } - public void setWarningThreshold(String warningThreshold) { - this.warningThreshold = warningThreshold; - } - public String getCriticalThreshold() { - return criticalThreshold; - } + public void setDeficitThreshold(String deficitThreshold) { + this.deficitThreshold = deficitThreshold; + } - public void setCriticalThreshold(String criticalThreshold) { - this.criticalThreshold = criticalThreshold; - } - public String getLiquidationThreshold() { - return liquidationThreshold; - } + public String getWarningThreshold() { + return warningThreshold; + } - public void setLiquidationThreshold(String liquidationThreshold) { - this.liquidationThreshold = liquidationThreshold; - } - public List getMarginThresholds() { - return marginThresholds; - } + public void setWarningThreshold(String warningThreshold) { + this.warningThreshold = warningThreshold; + } - public void setMarginThresholds(List marginThresholds) { - this.marginThresholds = marginThresholds; - } - public static class Builder { - private String deficitThreshold; + public String getCriticalThreshold() { + return criticalThreshold; + } - private String warningThreshold; + public void setCriticalThreshold(String criticalThreshold) { + this.criticalThreshold = criticalThreshold; + } - private String criticalThreshold; + public String getLiquidationThreshold() { + return liquidationThreshold; + } - private String liquidationThreshold; + public void setLiquidationThreshold(String liquidationThreshold) { + this.liquidationThreshold = liquidationThreshold; + } - private List marginThresholds; + public List getMarginThresholds() { + return marginThresholds; + } - public Builder deficitThreshold(String deficitThreshold) { - this.deficitThreshold = deficitThreshold; - return this; - } + public void setMarginThresholds(List marginThresholds) { + this.marginThresholds = marginThresholds; + } - public Builder warningThreshold(String warningThreshold) { - this.warningThreshold = warningThreshold; - return this; - } + public static class Builder { + private String deficitThreshold; - public Builder criticalThreshold(String criticalThreshold) { - this.criticalThreshold = criticalThreshold; - return this; - } + private String warningThreshold; - public Builder liquidationThreshold(String liquidationThreshold) { - this.liquidationThreshold = liquidationThreshold; - return this; - } + private String criticalThreshold; - public Builder marginThresholds(List marginThresholds) { - this.marginThresholds = marginThresholds; - return this; - } + private String liquidationThreshold; - public PrimeXMMarginCallThresholds build() { - return new PrimeXMMarginCallThresholds(this); - } + 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 index 518b8a8..9a0202c 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginRequirementBreakdown.java @@ -17,123 +17,121 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class PrimeXMMarginRequirementBreakdown { - /** - * Base margin requirement component. - */ - @JsonProperty("base_margin") + /** 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; - /** - * 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 Builder baseMargin(String baseMargin) { + this.baseMargin = baseMargin; + return this; } - public void setVolatilityAddon(String volatilityAddon) { - this.volatilityAddon = volatilityAddon; - } - public String getLiquidityAddon() { - return liquidityAddon; + public Builder volatilityAddon(String volatilityAddon) { + this.volatilityAddon = volatilityAddon; + return this; } - public void setLiquidityAddon(String liquidityAddon) { - this.liquidityAddon = liquidityAddon; - } - public String getOffsetCredit() { - return offsetCredit; + public Builder liquidityAddon(String liquidityAddon) { + this.liquidityAddon = liquidityAddon; + return this; } - public void setOffsetCredit(String offsetCredit) { - this.offsetCredit = offsetCredit; - } - public String getFuturesMargin() { - return futuresMargin; + public Builder offsetCredit(String offsetCredit) { + this.offsetCredit = offsetCredit; + return this; } - public void setFuturesMargin(String futuresMargin) { - this.futuresMargin = futuresMargin; + public Builder futuresMargin(String futuresMargin) { + this.futuresMargin = futuresMargin; + return this; } - 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); - } + 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 index f4315fc..afc3a5c 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMMarginThreshold.java @@ -17,85 +17,95 @@ */ 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") + /** + * - 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; - /** - * - 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 Builder marginLevel(XMMarginLevel marginLevel) { + this.marginLevel = marginLevel; + return this; } - public void setThresholdType(PrimeXMMarginThresholdType thresholdType) { - this.thresholdType = thresholdType; - } - public String getThresholdValue() { - return thresholdValue; + public Builder thresholdType(PrimeXMMarginThresholdType thresholdType) { + this.thresholdType = thresholdType; + return this; } - public void setThresholdValue(String thresholdValue) { - this.thresholdValue = thresholdValue; + public Builder thresholdValue(String thresholdValue) { + this.thresholdValue = thresholdValue; + return this; } - 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); - } + 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 index 0d483d2..55a2f2b 100644 --- a/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java +++ b/src/main/java/com/coinbase/prime/model/PrimeXMOffsetCreditBreakdown.java @@ -17,144 +17,138 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class PrimeXMOffsetCreditBreakdown { - /** - * Basis offset credit component. - */ - @JsonProperty("basis_credit") + /** 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; - /** - * 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 Builder basisCredit(String basisCredit) { + this.basisCredit = basisCredit; + return this; } - public void setBasisCredit(String basisCredit) { - this.basisCredit = basisCredit; - } - public String getLongShortCredit() { - return longShortCredit; + public Builder longShortCredit(String longShortCredit) { + this.longShortCredit = longShortCredit; + return this; } - public void setLongShortCredit(String longShortCredit) { - this.longShortCredit = longShortCredit; - } - public String getLongLongCredit() { - return longLongCredit; + public Builder longLongCredit(String longLongCredit) { + this.longLongCredit = longLongCredit; + return this; } - public void setLongLongCredit(String longLongCredit) { - this.longLongCredit = longLongCredit; - } - public String getShortShortCredit() { - return shortShortCredit; + public Builder shortShortCredit(String shortShortCredit) { + this.shortShortCredit = shortShortCredit; + return this; } - public void setShortShortCredit(String shortShortCredit) { - this.shortShortCredit = shortShortCredit; - } - public String getSameTierCredit() { - return sameTierCredit; + public Builder sameTierCredit(String sameTierCredit) { + this.sameTierCredit = sameTierCredit; + return this; } - public void setSameTierCredit(String sameTierCredit) { - this.sameTierCredit = sameTierCredit; - } - public String getTotalCredit() { - return totalCredit; + public Builder totalCredit(String totalCredit) { + this.totalCredit = totalCredit; + return this; } - 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); - } + public PrimeXMOffsetCreditBreakdown build() { + return new PrimeXMOffsetCreditBreakdown(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/ProcessRequirements.java b/src/main/java/com/coinbase/prime/model/ProcessRequirements.java index 81cd835..2021ef7 100644 --- a/src/main/java/com/coinbase/prime/model/ProcessRequirements.java +++ b/src/main/java/com/coinbase/prime/model/ProcessRequirements.java @@ -17,39 +17,40 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.TravelRuleStatus; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents the status of various process requirements for a transaction */ public class ProcessRequirements { - /** Travel rule compliance status for a transaction */ - @JsonProperty("travel_rule_status") - private TravelRuleStatus travelRuleStatus; + /** Travel rule compliance status for a transaction */ + @JsonProperty("travel_rule_status") + private TravelRuleStatus travelRuleStatus; - public ProcessRequirements() { - } + public ProcessRequirements() {} - public ProcessRequirements(Builder builder) { - this.travelRuleStatus = builder.travelRuleStatus; - } - public TravelRuleStatus getTravelRuleStatus() { - return travelRuleStatus; - } + public ProcessRequirements(Builder builder) { + this.travelRuleStatus = builder.travelRuleStatus; + } - public void setTravelRuleStatus(TravelRuleStatus travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - } - public static class Builder { - private TravelRuleStatus travelRuleStatus; + public TravelRuleStatus getTravelRuleStatus() { + return travelRuleStatus; + } - public Builder travelRuleStatus(TravelRuleStatus travelRuleStatus) { - this.travelRuleStatus = travelRuleStatus; - return this; - } + public void setTravelRuleStatus(TravelRuleStatus travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; + } - public ProcessRequirements build() { - return new ProcessRequirements(this); - } + public static class Builder { + private TravelRuleStatus travelRuleStatus; + + public Builder travelRuleStatus(TravelRuleStatus travelRuleStatus) { + this.travelRuleStatus = travelRuleStatus; + return this; } -} + public ProcessRequirements build() { + return new ProcessRequirements(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Product.java b/src/main/java/com/coinbase/prime/model/Product.java index ef248f9..a6a9fde 100644 --- a/src/main/java/com/coinbase/prime/model/Product.java +++ b/src/main/java/com/coinbase/prime/model/Product.java @@ -17,290 +17,278 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.FcmTradingSessionDetails; -import com.coinbase.prime.model.FutureProductDetails; + import com.coinbase.prime.model.enums.ProductPermissions; import com.coinbase.prime.model.enums.ProductType; -import com.coinbase.prime.model.RfqProductDetails; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class Product { - /** - * The product ID, written as `BASE-QUOTE` - */ + /** The product ID, written as `BASE-QUOTE` */ + private String id; + + /** The smallest permitted unit of denomination for the base asset (varies by product) */ + @JsonProperty("base_increment") + private String baseIncrement; + + /** The smallest permitted unit of denomination for the quote asset (varies by product) */ + @JsonProperty("quote_increment") + private String quoteIncrement; + + /** The minimum size (in base asset units) for which an order can be placed */ + @JsonProperty("base_min_size") + private String baseMinSize; + + /** The minimum size (in quote asset units) for which an order can be placed */ + @JsonProperty("quote_min_size") + private String quoteMinSize; + + /** The maximum size (in base asset units) for which an order can be placed */ + @JsonProperty("base_max_size") + private String baseMaxSize; + + /** The maximum size (in quote asset units) for which an order can be placed */ + @JsonProperty("quote_max_size") + private String quoteMaxSize; + + /** Permissions given to the user for a product */ + private List permissions; + + /** The smallest permitted price increment for the product */ + @JsonProperty("price_increment") + private String priceIncrement; + + @JsonProperty("rfq_product_details") + private RfqProductDetails rfqProductDetails; + + /** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ + @JsonProperty("product_type") + private ProductType productType; + + /** FcmTradingSessionDetails contains trading session details for FCM products */ + @JsonProperty("fcm_trading_session_details") + private FcmTradingSessionDetails fcmTradingSessionDetails; + + /** FutureProductDetails contains details specific to futures products */ + @JsonProperty("future_product_details") + private FutureProductDetails futureProductDetails; + + public Product() {} + + public Product(Builder builder) { + this.id = builder.id; + this.baseIncrement = builder.baseIncrement; + this.quoteIncrement = builder.quoteIncrement; + this.baseMinSize = builder.baseMinSize; + this.quoteMinSize = builder.quoteMinSize; + this.baseMaxSize = builder.baseMaxSize; + this.quoteMaxSize = builder.quoteMaxSize; + this.permissions = builder.permissions; + this.priceIncrement = builder.priceIncrement; + this.rfqProductDetails = builder.rfqProductDetails; + this.productType = builder.productType; + this.fcmTradingSessionDetails = builder.fcmTradingSessionDetails; + this.futureProductDetails = builder.futureProductDetails; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getBaseIncrement() { + return baseIncrement; + } + + public void setBaseIncrement(String baseIncrement) { + this.baseIncrement = baseIncrement; + } + + public String getQuoteIncrement() { + return quoteIncrement; + } + + public void setQuoteIncrement(String quoteIncrement) { + this.quoteIncrement = quoteIncrement; + } + + public String getBaseMinSize() { + return baseMinSize; + } + + public void setBaseMinSize(String baseMinSize) { + this.baseMinSize = baseMinSize; + } + + public String getQuoteMinSize() { + return quoteMinSize; + } + + public void setQuoteMinSize(String quoteMinSize) { + this.quoteMinSize = quoteMinSize; + } + + public String getBaseMaxSize() { + return baseMaxSize; + } + + public void setBaseMaxSize(String baseMaxSize) { + this.baseMaxSize = baseMaxSize; + } + + public String getQuoteMaxSize() { + return quoteMaxSize; + } + + public void setQuoteMaxSize(String quoteMaxSize) { + this.quoteMaxSize = quoteMaxSize; + } + + public List getPermissions() { + return permissions; + } + + public void setPermissions(List permissions) { + this.permissions = permissions; + } + + public String getPriceIncrement() { + return priceIncrement; + } + + public void setPriceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + } + + public RfqProductDetails getRfqProductDetails() { + return rfqProductDetails; + } + + public void setRfqProductDetails(RfqProductDetails rfqProductDetails) { + this.rfqProductDetails = rfqProductDetails; + } + + public ProductType getProductType() { + return productType; + } + + public void setProductType(ProductType productType) { + this.productType = productType; + } + + public FcmTradingSessionDetails getFcmTradingSessionDetails() { + return fcmTradingSessionDetails; + } + + public void setFcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + } + + public FutureProductDetails getFutureProductDetails() { + return futureProductDetails; + } + + public void setFutureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + } + + public static class Builder { private String id; - /** - * The smallest permitted unit of denomination for the base asset (varies by product) - */ - @JsonProperty("base_increment") private String baseIncrement; - /** - * The smallest permitted unit of denomination for the quote asset (varies by product) - */ - @JsonProperty("quote_increment") private String quoteIncrement; - /** - * The minimum size (in base asset units) for which an order can be placed - */ - @JsonProperty("base_min_size") private String baseMinSize; - /** - * The minimum size (in quote asset units) for which an order can be placed - */ - @JsonProperty("quote_min_size") private String quoteMinSize; - /** - * The maximum size (in base asset units) for which an order can be placed - */ - @JsonProperty("base_max_size") private String baseMaxSize; - /** - * The maximum size (in quote asset units) for which an order can be placed - */ - @JsonProperty("quote_max_size") private String quoteMaxSize; - /** - * Permissions given to the user for a product - */ private List permissions; - /** - * The smallest permitted price increment for the product - */ - @JsonProperty("price_increment") private String priceIncrement; - @JsonProperty("rfq_product_details") private RfqProductDetails rfqProductDetails; - /** - * - UNKNOWN_PRODUCT_TYPE: Unknown product type - * - SPOT: Spot product - * - FUTURE: Future product - */ - @JsonProperty("product_type") private ProductType productType; - /** FcmTradingSessionDetails contains trading session details for FCM products */ - @JsonProperty("fcm_trading_session_details") private FcmTradingSessionDetails fcmTradingSessionDetails; - /** FutureProductDetails contains details specific to futures products */ - @JsonProperty("future_product_details") private FutureProductDetails futureProductDetails; - public Product() { - } - - public Product(Builder builder) { - this.id = builder.id; - this.baseIncrement = builder.baseIncrement; - this.quoteIncrement = builder.quoteIncrement; - this.baseMinSize = builder.baseMinSize; - this.quoteMinSize = builder.quoteMinSize; - this.baseMaxSize = builder.baseMaxSize; - this.quoteMaxSize = builder.quoteMaxSize; - this.permissions = builder.permissions; - this.priceIncrement = builder.priceIncrement; - this.rfqProductDetails = builder.rfqProductDetails; - this.productType = builder.productType; - this.fcmTradingSessionDetails = builder.fcmTradingSessionDetails; - this.futureProductDetails = builder.futureProductDetails; - } - public String getId() { - return id; + public Builder id(String id) { + this.id = id; + return this; } - public void setId(String id) { - this.id = id; - } - public String getBaseIncrement() { - return baseIncrement; + public Builder baseIncrement(String baseIncrement) { + this.baseIncrement = baseIncrement; + return this; } - public void setBaseIncrement(String baseIncrement) { - this.baseIncrement = baseIncrement; - } - public String getQuoteIncrement() { - return quoteIncrement; + public Builder quoteIncrement(String quoteIncrement) { + this.quoteIncrement = quoteIncrement; + return this; } - public void setQuoteIncrement(String quoteIncrement) { - this.quoteIncrement = quoteIncrement; - } - public String getBaseMinSize() { - return baseMinSize; + public Builder baseMinSize(String baseMinSize) { + this.baseMinSize = baseMinSize; + return this; } - public void setBaseMinSize(String baseMinSize) { - this.baseMinSize = baseMinSize; - } - public String getQuoteMinSize() { - return quoteMinSize; + public Builder quoteMinSize(String quoteMinSize) { + this.quoteMinSize = quoteMinSize; + return this; } - public void setQuoteMinSize(String quoteMinSize) { - this.quoteMinSize = quoteMinSize; - } - public String getBaseMaxSize() { - return baseMaxSize; + public Builder baseMaxSize(String baseMaxSize) { + this.baseMaxSize = baseMaxSize; + return this; } - public void setBaseMaxSize(String baseMaxSize) { - this.baseMaxSize = baseMaxSize; - } - public String getQuoteMaxSize() { - return quoteMaxSize; + public Builder quoteMaxSize(String quoteMaxSize) { + this.quoteMaxSize = quoteMaxSize; + return this; } - public void setQuoteMaxSize(String quoteMaxSize) { - this.quoteMaxSize = quoteMaxSize; - } - public List getPermissions() { - return permissions; + public Builder permissions(List permissions) { + this.permissions = permissions; + return this; } - public void setPermissions(List permissions) { - this.permissions = permissions; - } - public String getPriceIncrement() { - return priceIncrement; + public Builder priceIncrement(String priceIncrement) { + this.priceIncrement = priceIncrement; + return this; } - public void setPriceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - } - public RfqProductDetails getRfqProductDetails() { - return rfqProductDetails; + public Builder rfqProductDetails(RfqProductDetails rfqProductDetails) { + this.rfqProductDetails = rfqProductDetails; + return this; } - public void setRfqProductDetails(RfqProductDetails rfqProductDetails) { - this.rfqProductDetails = rfqProductDetails; - } - public ProductType getProductType() { - return productType; + public Builder productType(ProductType productType) { + this.productType = productType; + return this; } - public void setProductType(ProductType productType) { - this.productType = productType; - } - public FcmTradingSessionDetails getFcmTradingSessionDetails() { - return fcmTradingSessionDetails; + public Builder fcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { + this.fcmTradingSessionDetails = fcmTradingSessionDetails; + return this; } - public void setFcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { - this.fcmTradingSessionDetails = fcmTradingSessionDetails; - } - public FutureProductDetails getFutureProductDetails() { - return futureProductDetails; + public Builder futureProductDetails(FutureProductDetails futureProductDetails) { + this.futureProductDetails = futureProductDetails; + return this; } - public void setFutureProductDetails(FutureProductDetails futureProductDetails) { - this.futureProductDetails = futureProductDetails; - } - public static class Builder { - private String id; - - private String baseIncrement; - - private String quoteIncrement; - - private String baseMinSize; - - private String quoteMinSize; - - private String baseMaxSize; - - private String quoteMaxSize; - - private List permissions; - - private String priceIncrement; - - private RfqProductDetails rfqProductDetails; - - private ProductType productType; - - private FcmTradingSessionDetails fcmTradingSessionDetails; - - private FutureProductDetails futureProductDetails; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder baseIncrement(String baseIncrement) { - this.baseIncrement = baseIncrement; - return this; - } - - public Builder quoteIncrement(String quoteIncrement) { - this.quoteIncrement = quoteIncrement; - return this; - } - - public Builder baseMinSize(String baseMinSize) { - this.baseMinSize = baseMinSize; - return this; - } - - public Builder quoteMinSize(String quoteMinSize) { - this.quoteMinSize = quoteMinSize; - return this; - } - - public Builder baseMaxSize(String baseMaxSize) { - this.baseMaxSize = baseMaxSize; - return this; - } - - public Builder quoteMaxSize(String quoteMaxSize) { - this.quoteMaxSize = quoteMaxSize; - return this; - } - - public Builder permissions(List permissions) { - this.permissions = permissions; - return this; - } - - public Builder priceIncrement(String priceIncrement) { - this.priceIncrement = priceIncrement; - return this; - } - - public Builder rfqProductDetails(RfqProductDetails rfqProductDetails) { - this.rfqProductDetails = rfqProductDetails; - return this; - } - - public Builder productType(ProductType productType) { - this.productType = productType; - return this; - } - - public Builder fcmTradingSessionDetails(FcmTradingSessionDetails fcmTradingSessionDetails) { - this.fcmTradingSessionDetails = fcmTradingSessionDetails; - return this; - } - - public Builder futureProductDetails(FutureProductDetails futureProductDetails) { - this.futureProductDetails = futureProductDetails; - return this; - } - - public Product build() { - return new Product(this); - } + public Product build() { + return new Product(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java index 6f8ec0a..1663fcc 100644 --- a/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java +++ b/src/main/java/com/coinbase/prime/model/RequestToSubmitTravelRuleDataForAnExistingDepositTransaction.java @@ -17,89 +17,92 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.TravelRuleParty; + import com.fasterxml.jackson.annotation.JsonProperty; public class RequestToSubmitTravelRuleDataForAnExistingDepositTransaction { - private TravelRuleParty originator; + private TravelRuleParty originator; - private TravelRuleParty beneficiary; + private TravelRuleParty beneficiary; - @JsonProperty("is_self") - private boolean isSelf; + @JsonProperty("is_self") + private boolean isSelf; - @JsonProperty("opt_out_of_ownership_verification") - private boolean optOutOfOwnershipVerification; + @JsonProperty("opt_out_of_ownership_verification") + private boolean optOutOfOwnershipVerification; - public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction() { - } + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction() {} - public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(Builder builder) { - this.originator = builder.originator; - this.beneficiary = builder.beneficiary; - this.isSelf = builder.isSelf; - this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; - } - public TravelRuleParty getOriginator() { - return originator; - } + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(Builder builder) { + this.originator = builder.originator; + this.beneficiary = builder.beneficiary; + this.isSelf = builder.isSelf; + this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; + } - public void setOriginator(TravelRuleParty originator) { - this.originator = originator; - } - public TravelRuleParty getBeneficiary() { - return beneficiary; - } + public TravelRuleParty getOriginator() { + return originator; + } - public void setBeneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - } - public boolean getIsSelf() { - return isSelf; - } + public void setOriginator(TravelRuleParty originator) { + this.originator = originator; + } - public void setIsSelf(boolean isSelf) { - this.isSelf = isSelf; - } - public boolean getOptOutOfOwnershipVerification() { - return optOutOfOwnershipVerification; - } + public TravelRuleParty getBeneficiary() { + return beneficiary; + } - public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - } - public static class Builder { - private TravelRuleParty originator; + public void setBeneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + } - private TravelRuleParty beneficiary; + public boolean getIsSelf() { + return isSelf; + } - private boolean isSelf; + public void setIsSelf(boolean isSelf) { + this.isSelf = isSelf; + } - private boolean optOutOfOwnershipVerification; + public boolean getOptOutOfOwnershipVerification() { + return optOutOfOwnershipVerification; + } - public Builder originator(TravelRuleParty originator) { - this.originator = originator; - return this; - } + public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + } - public Builder beneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - return this; - } + public static class Builder { + private TravelRuleParty originator; - public Builder isSelf(boolean isSelf) { - this.isSelf = isSelf; - return this; - } + private TravelRuleParty beneficiary; - public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - return this; - } + private boolean isSelf; - public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction build() { - return new RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(this); - } + private boolean optOutOfOwnershipVerification; + + public Builder originator(TravelRuleParty originator) { + this.originator = originator; + return this; + } + + public Builder beneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + return this; + } + + public Builder isSelf(boolean isSelf) { + this.isSelf = isSelf; + return this; } -} + public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + return this; + } + + public RequestToSubmitTravelRuleDataForAnExistingDepositTransaction build() { + return new RequestToSubmitTravelRuleDataForAnExistingDepositTransaction(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/RewardMetadata.java b/src/main/java/com/coinbase/prime/model/RewardMetadata.java index 95f2ee7..c5dc33a 100644 --- a/src/main/java/com/coinbase/prime/model/RewardMetadata.java +++ b/src/main/java/com/coinbase/prime/model/RewardMetadata.java @@ -17,75 +17,70 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.CustomStablecoinRewardDetails; + import com.coinbase.prime.model.enums.RewardSubtype; import com.fasterxml.jackson.annotation.JsonProperty; public class RewardMetadata { - /** - * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the API response yet - * - MEV_REWARD: A maximal extractable value reward - * i.e. sol mev rewards - * - INFLATION_REWARD: An inflationary reward - * i.e. solana inflationary rewards - * - BLOCK_REWARD: A block reward - * i.e. solana block rewards - * - VALIDATOR_REWARD: A validator reward - * i.e. ethereum 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 - * - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward - * i.e. USDC reward payouts - */ - private RewardSubtype subtype; + /** + * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the + * API response yet - MEV_REWARD: A maximal extractable value reward i.e. sol mev rewards - + * INFLATION_REWARD: An inflationary reward i.e. solana inflationary rewards - BLOCK_REWARD: A + * block reward i.e. solana block rewards - VALIDATOR_REWARD: A validator reward i.e. ethereum + * 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 - CUSTOM_STABLECOIN_REWARD: A custom + * stablecoin reward i.e. USDC reward payouts + */ + private RewardSubtype subtype; - /** Details for a custom stablecoin reward payout transaction */ - @JsonProperty("custom_stablecoin_reward_details") - private CustomStablecoinRewardDetails customStablecoinRewardDetails; + /** Details for a custom stablecoin reward payout transaction */ + @JsonProperty("custom_stablecoin_reward_details") + private CustomStablecoinRewardDetails customStablecoinRewardDetails; - public RewardMetadata() { - } + public RewardMetadata() {} - public RewardMetadata(Builder builder) { - this.subtype = builder.subtype; - this.customStablecoinRewardDetails = builder.customStablecoinRewardDetails; - } - public RewardSubtype getSubtype() { - return subtype; - } + public RewardMetadata(Builder builder) { + this.subtype = builder.subtype; + this.customStablecoinRewardDetails = builder.customStablecoinRewardDetails; + } - public void setSubtype(RewardSubtype subtype) { - this.subtype = subtype; - } - public CustomStablecoinRewardDetails getCustomStablecoinRewardDetails() { - return customStablecoinRewardDetails; - } + public RewardSubtype getSubtype() { + return subtype; + } - public void setCustomStablecoinRewardDetails(CustomStablecoinRewardDetails customStablecoinRewardDetails) { - this.customStablecoinRewardDetails = customStablecoinRewardDetails; - } - public static class Builder { - private RewardSubtype subtype; + public void setSubtype(RewardSubtype subtype) { + this.subtype = subtype; + } - private CustomStablecoinRewardDetails customStablecoinRewardDetails; + public CustomStablecoinRewardDetails getCustomStablecoinRewardDetails() { + return customStablecoinRewardDetails; + } - public Builder subtype(RewardSubtype subtype) { - this.subtype = subtype; - return this; - } + public void setCustomStablecoinRewardDetails( + CustomStablecoinRewardDetails customStablecoinRewardDetails) { + this.customStablecoinRewardDetails = customStablecoinRewardDetails; + } - public Builder customStablecoinRewardDetails(CustomStablecoinRewardDetails customStablecoinRewardDetails) { - this.customStablecoinRewardDetails = customStablecoinRewardDetails; - return this; - } + public static class Builder { + private RewardSubtype subtype; + + private CustomStablecoinRewardDetails customStablecoinRewardDetails; - public RewardMetadata build() { - return new RewardMetadata(this); - } + 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 78ae8c3..b164c2a 100644 --- a/src/main/java/com/coinbase/prime/model/RfqProductDetails.java +++ b/src/main/java/com/coinbase/prime/model/RfqProductDetails.java @@ -17,164 +17,157 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class RfqProductDetails { - /** - * Whether the product is tradable via RFQ - */ + /** Whether the product is tradable via RFQ */ + private boolean tradable; + + /** Deprecated: Value will be an empty string */ + @JsonProperty("min_notional_size") + private String minNotionalSize; + + /** Deprecated: Value will be an empty string */ + @JsonProperty("max_notional_size") + private String maxNotionalSize; + + /** Minimum base size for RFQ */ + @JsonProperty("min_base_size") + private String minBaseSize; + + /** Maximum base size for RFQ */ + @JsonProperty("max_base_size") + private String maxBaseSize; + + /** Minimum quote size for RFQ */ + @JsonProperty("min_quote_size") + private String minQuoteSize; + + /** Maximum quote size for RFQ */ + @JsonProperty("max_quote_size") + private String maxQuoteSize; + + public RfqProductDetails() {} + + public RfqProductDetails(Builder builder) { + this.tradable = builder.tradable; + this.minNotionalSize = builder.minNotionalSize; + this.maxNotionalSize = builder.maxNotionalSize; + this.minBaseSize = builder.minBaseSize; + this.maxBaseSize = builder.maxBaseSize; + this.minQuoteSize = builder.minQuoteSize; + this.maxQuoteSize = builder.maxQuoteSize; + } + + public boolean getTradable() { + return tradable; + } + + public void setTradable(boolean tradable) { + this.tradable = tradable; + } + + public String getMinNotionalSize() { + return minNotionalSize; + } + + public void setMinNotionalSize(String minNotionalSize) { + this.minNotionalSize = minNotionalSize; + } + + public String getMaxNotionalSize() { + return maxNotionalSize; + } + + public void setMaxNotionalSize(String maxNotionalSize) { + this.maxNotionalSize = maxNotionalSize; + } + + public String getMinBaseSize() { + return minBaseSize; + } + + public void setMinBaseSize(String minBaseSize) { + this.minBaseSize = minBaseSize; + } + + public String getMaxBaseSize() { + return maxBaseSize; + } + + public void setMaxBaseSize(String maxBaseSize) { + this.maxBaseSize = maxBaseSize; + } + + public String getMinQuoteSize() { + return minQuoteSize; + } + + public void setMinQuoteSize(String minQuoteSize) { + this.minQuoteSize = minQuoteSize; + } + + public String getMaxQuoteSize() { + return maxQuoteSize; + } + + public void setMaxQuoteSize(String maxQuoteSize) { + this.maxQuoteSize = maxQuoteSize; + } + + public static class Builder { private boolean tradable; - /** - * Deprecated: Value will be an empty string - */ - @JsonProperty("min_notional_size") private String minNotionalSize; - /** - * Deprecated: Value will be an empty string - */ - @JsonProperty("max_notional_size") private String maxNotionalSize; - /** - * Minimum base size for RFQ - */ - @JsonProperty("min_base_size") private String minBaseSize; - /** - * Maximum base size for RFQ - */ - @JsonProperty("max_base_size") private String maxBaseSize; - /** - * Minimum quote size for RFQ - */ - @JsonProperty("min_quote_size") private String minQuoteSize; - /** - * Maximum quote size for RFQ - */ - @JsonProperty("max_quote_size") private String maxQuoteSize; - public RfqProductDetails() { + public Builder tradable(boolean tradable) { + this.tradable = tradable; + return this; } - public RfqProductDetails(Builder builder) { - this.tradable = builder.tradable; - this.minNotionalSize = builder.minNotionalSize; - this.maxNotionalSize = builder.maxNotionalSize; - this.minBaseSize = builder.minBaseSize; - this.maxBaseSize = builder.maxBaseSize; - this.minQuoteSize = builder.minQuoteSize; - this.maxQuoteSize = builder.maxQuoteSize; - } - public boolean getTradable() { - return tradable; + public Builder minNotionalSize(String minNotionalSize) { + this.minNotionalSize = minNotionalSize; + return this; } - public void setTradable(boolean tradable) { - this.tradable = tradable; - } - public String getMinNotionalSize() { - return minNotionalSize; + public Builder maxNotionalSize(String maxNotionalSize) { + this.maxNotionalSize = maxNotionalSize; + return this; } - public void setMinNotionalSize(String minNotionalSize) { - this.minNotionalSize = minNotionalSize; - } - public String getMaxNotionalSize() { - return maxNotionalSize; + public Builder minBaseSize(String minBaseSize) { + this.minBaseSize = minBaseSize; + return this; } - public void setMaxNotionalSize(String maxNotionalSize) { - this.maxNotionalSize = maxNotionalSize; - } - public String getMinBaseSize() { - return minBaseSize; + public Builder maxBaseSize(String maxBaseSize) { + this.maxBaseSize = maxBaseSize; + return this; } - public void setMinBaseSize(String minBaseSize) { - this.minBaseSize = minBaseSize; - } - public String getMaxBaseSize() { - return maxBaseSize; + public Builder minQuoteSize(String minQuoteSize) { + this.minQuoteSize = minQuoteSize; + return this; } - public void setMaxBaseSize(String maxBaseSize) { - this.maxBaseSize = maxBaseSize; - } - public String getMinQuoteSize() { - return minQuoteSize; + public Builder maxQuoteSize(String maxQuoteSize) { + this.maxQuoteSize = maxQuoteSize; + return this; } - public void setMinQuoteSize(String minQuoteSize) { - this.minQuoteSize = minQuoteSize; - } - public String getMaxQuoteSize() { - return maxQuoteSize; - } - - public void setMaxQuoteSize(String maxQuoteSize) { - this.maxQuoteSize = maxQuoteSize; - } - public static class Builder { - private boolean tradable; - - private String minNotionalSize; - - private String maxNotionalSize; - - private String minBaseSize; - - private String maxBaseSize; - - private String minQuoteSize; - - private String maxQuoteSize; - - public Builder tradable(boolean tradable) { - this.tradable = tradable; - return this; - } - - public Builder minNotionalSize(String minNotionalSize) { - this.minNotionalSize = minNotionalSize; - return this; - } - - public Builder maxNotionalSize(String maxNotionalSize) { - this.maxNotionalSize = maxNotionalSize; - return this; - } - - public Builder minBaseSize(String minBaseSize) { - this.minBaseSize = minBaseSize; - return this; - } - - public Builder maxBaseSize(String maxBaseSize) { - this.maxBaseSize = maxBaseSize; - return this; - } - - public Builder minQuoteSize(String minQuoteSize) { - this.minQuoteSize = minQuoteSize; - return this; - } - - public Builder maxQuoteSize(String maxQuoteSize) { - this.maxQuoteSize = maxQuoteSize; - return this; - } - - public RfqProductDetails build() { - return new RfqProductDetails(this); - } + public RfqProductDetails build() { + return new RfqProductDetails(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/RiskAssessment.java b/src/main/java/com/coinbase/prime/model/RiskAssessment.java index fc50261..4779699 100644 --- a/src/main/java/com/coinbase/prime/model/RiskAssessment.java +++ b/src/main/java/com/coinbase/prime/model/RiskAssessment.java @@ -17,61 +17,59 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** New message for risk assessment details */ public class RiskAssessment { - /** - * Indicates if the transaction has been flagged for compliance concerns - */ - @JsonProperty("compliance_risk_detected") - private boolean complianceRiskDetected; + /** Indicates if the transaction has been flagged for compliance concerns */ + @JsonProperty("compliance_risk_detected") + private boolean complianceRiskDetected; - /** - * Indicates if the transaction has been flagged for security concerns - */ - @JsonProperty("security_risk_detected") - private boolean securityRiskDetected; + /** Indicates if the transaction has been flagged for security concerns */ + @JsonProperty("security_risk_detected") + private boolean securityRiskDetected; - public RiskAssessment() { - } + public RiskAssessment() {} - public RiskAssessment(Builder builder) { - this.complianceRiskDetected = builder.complianceRiskDetected; - this.securityRiskDetected = builder.securityRiskDetected; - } - public boolean getComplianceRiskDetected() { - return complianceRiskDetected; - } + public RiskAssessment(Builder builder) { + this.complianceRiskDetected = builder.complianceRiskDetected; + this.securityRiskDetected = builder.securityRiskDetected; + } - public void setComplianceRiskDetected(boolean complianceRiskDetected) { - this.complianceRiskDetected = complianceRiskDetected; - } - public boolean getSecurityRiskDetected() { - return securityRiskDetected; - } + public boolean getComplianceRiskDetected() { + return complianceRiskDetected; + } - public void setSecurityRiskDetected(boolean securityRiskDetected) { - this.securityRiskDetected = securityRiskDetected; - } - public static class Builder { - private boolean complianceRiskDetected; + public void setComplianceRiskDetected(boolean complianceRiskDetected) { + this.complianceRiskDetected = complianceRiskDetected; + } - private boolean securityRiskDetected; + public boolean getSecurityRiskDetected() { + return securityRiskDetected; + } - public Builder complianceRiskDetected(boolean complianceRiskDetected) { - this.complianceRiskDetected = complianceRiskDetected; - return this; - } + public void setSecurityRiskDetected(boolean securityRiskDetected) { + this.securityRiskDetected = securityRiskDetected; + } - public Builder securityRiskDetected(boolean securityRiskDetected) { - this.securityRiskDetected = securityRiskDetected; - return this; - } + public static class Builder { + private boolean complianceRiskDetected; + + private boolean securityRiskDetected; - public RiskAssessment build() { - return new RiskAssessment(this); - } + public Builder complianceRiskDetected(boolean complianceRiskDetected) { + this.complianceRiskDetected = complianceRiskDetected; + return this; } -} + public Builder securityRiskDetected(boolean securityRiskDetected) { + this.securityRiskDetected = securityRiskDetected; + return this; + } + + public RiskAssessment build() { + return new RiskAssessment(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/RpcConfig.java b/src/main/java/com/coinbase/prime/model/RpcConfig.java index f320bc0..a829249 100644 --- a/src/main/java/com/coinbase/prime/model/RpcConfig.java +++ b/src/main/java/com/coinbase/prime/model/RpcConfig.java @@ -17,59 +17,57 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class RpcConfig { - /** - * If true, transaction will not be broadcast to the network - */ - @JsonProperty("skip_broadcast") - private boolean skipBroadcast; + /** If true, transaction will not be broadcast to the network */ + @JsonProperty("skip_broadcast") + private boolean skipBroadcast; - /** - * Custom blockchain node RPC URL. (EVM-only) - */ - private String url; + /** Custom blockchain node RPC URL. (EVM-only) */ + private String url; - public RpcConfig() { - } + public RpcConfig() {} - public RpcConfig(Builder builder) { - this.skipBroadcast = builder.skipBroadcast; - this.url = builder.url; - } - public boolean getSkipBroadcast() { - return skipBroadcast; - } + public RpcConfig(Builder builder) { + this.skipBroadcast = builder.skipBroadcast; + this.url = builder.url; + } - public void setSkipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - } - public String getUrl() { - return url; - } + public boolean getSkipBroadcast() { + return skipBroadcast; + } - public void setUrl(String url) { - this.url = url; - } - public static class Builder { - private boolean skipBroadcast; + public void setSkipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + } - private String url; + public String getUrl() { + return url; + } - public Builder skipBroadcast(boolean skipBroadcast) { - this.skipBroadcast = skipBroadcast; - return this; - } + public void setUrl(String url) { + this.url = url; + } - public Builder url(String url) { - this.url = url; - return this; - } + public static class Builder { + private boolean skipBroadcast; + + private String url; - public RpcConfig build() { - return new RpcConfig(this); - } + public Builder skipBroadcast(boolean skipBroadcast) { + this.skipBroadcast = skipBroadcast; + return this; } -} + public Builder url(String url) { + this.url = url; + return this; + } + + public RpcConfig build() { + return new RpcConfig(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ShortCollateral.java b/src/main/java/com/coinbase/prime/model/ShortCollateral.java index d8641f1..4ac65a6 100644 --- a/src/main/java/com/coinbase/prime/model/ShortCollateral.java +++ b/src/main/java/com/coinbase/prime/model/ShortCollateral.java @@ -17,102 +17,98 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; public class ShortCollateral { - /** - * Existing short collateral balance - */ - @JsonProperty("old_balance") - private String oldBalance; + /** Existing short collateral balance */ + @JsonProperty("old_balance") + private String oldBalance; - /** - * New short collateral balance required - */ - @JsonProperty("new_balance") - private String newBalance; + /** New short collateral balance required */ + @JsonProperty("new_balance") + private String newBalance; - /** - * Loan interest rate - */ - @JsonProperty("loan_interest_rate") - private String loanInterestRate; + /** Loan interest rate */ + @JsonProperty("loan_interest_rate") + private String loanInterestRate; - /** - * Collateral interest rate - */ - @JsonProperty("collateral_interest_rate") - private String collateralInterestRate; + /** Collateral interest rate */ + @JsonProperty("collateral_interest_rate") + private String collateralInterestRate; - public ShortCollateral() { - } + public ShortCollateral() {} - public ShortCollateral(Builder builder) { - this.oldBalance = builder.oldBalance; - this.newBalance = builder.newBalance; - this.loanInterestRate = builder.loanInterestRate; - this.collateralInterestRate = builder.collateralInterestRate; - } - public String getOldBalance() { - return oldBalance; - } + public ShortCollateral(Builder builder) { + this.oldBalance = builder.oldBalance; + this.newBalance = builder.newBalance; + this.loanInterestRate = builder.loanInterestRate; + this.collateralInterestRate = builder.collateralInterestRate; + } - public void setOldBalance(String oldBalance) { - this.oldBalance = oldBalance; - } - public String getNewBalance() { - return newBalance; - } + public String getOldBalance() { + return oldBalance; + } - public void setNewBalance(String newBalance) { - this.newBalance = newBalance; - } - public String getLoanInterestRate() { - return loanInterestRate; - } + public void setOldBalance(String oldBalance) { + this.oldBalance = oldBalance; + } - public void setLoanInterestRate(String loanInterestRate) { - this.loanInterestRate = loanInterestRate; - } - public String getCollateralInterestRate() { - return collateralInterestRate; - } + public String getNewBalance() { + return newBalance; + } - public void setCollateralInterestRate(String collateralInterestRate) { - this.collateralInterestRate = collateralInterestRate; - } - public static class Builder { - private String oldBalance; + public void setNewBalance(String newBalance) { + this.newBalance = newBalance; + } - private String newBalance; + public String getLoanInterestRate() { + return loanInterestRate; + } - private String loanInterestRate; + public void setLoanInterestRate(String loanInterestRate) { + this.loanInterestRate = loanInterestRate; + } - private String collateralInterestRate; + public String getCollateralInterestRate() { + return collateralInterestRate; + } - public Builder oldBalance(String oldBalance) { - this.oldBalance = oldBalance; - return this; - } + public void setCollateralInterestRate(String collateralInterestRate) { + this.collateralInterestRate = collateralInterestRate; + } - public Builder newBalance(String newBalance) { - this.newBalance = newBalance; - return this; - } + public static class Builder { + private String oldBalance; - public Builder loanInterestRate(String loanInterestRate) { - this.loanInterestRate = loanInterestRate; - return this; - } + private String newBalance; - public Builder collateralInterestRate(String collateralInterestRate) { - this.collateralInterestRate = collateralInterestRate; - return this; - } + private String loanInterestRate; - public ShortCollateral build() { - return new ShortCollateral(this); - } + private String collateralInterestRate; + + public Builder oldBalance(String oldBalance) { + this.oldBalance = oldBalance; + return this; + } + + public Builder newBalance(String newBalance) { + this.newBalance = newBalance; + return this; + } + + public Builder loanInterestRate(String loanInterestRate) { + this.loanInterestRate = loanInterestRate; + return this; } -} + public Builder collateralInterestRate(String collateralInterestRate) { + this.collateralInterestRate = collateralInterestRate; + return this; + } + + public ShortCollateral build() { + return new ShortCollateral(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/StakingStatus.java b/src/main/java/com/coinbase/prime/model/StakingStatus.java index 3ed5451..9b0fff8 100644 --- a/src/main/java/com/coinbase/prime/model/StakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/StakingStatus.java @@ -17,121 +17,118 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.StakeType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class StakingStatus { - /** - * Amount being staked (whole amount, e.g., 16 ETH) - */ - private String amount; + /** Amount being staked (whole amount, e.g., 16 ETH) */ + private String amount; - @JsonProperty("stake_type") - private StakeType stakeType; + @JsonProperty("stake_type") + private StakeType stakeType; - /** - * Estimated date when staking will complete (ISO 8601 format) - */ - @JsonProperty("estimated_stake_date") - private OffsetDateTime estimatedStakeDate; + /** Estimated date when staking will complete (ISO 8601 format) */ + @JsonProperty("estimated_stake_date") + private OffsetDateTime estimatedStakeDate; - /** - * Estimated hours until this staking request completes - */ - @JsonProperty("estimated_hours_to_stake") - private Long estimatedHoursToStake; + /** Estimated hours until this staking request completes */ + @JsonProperty("estimated_hours_to_stake") + private Long estimatedHoursToStake; - /** - * Timestamp when the stake request was originally created - */ - @JsonProperty("requested_at") - private OffsetDateTime requestedAt; + /** Timestamp when the stake request was originally created */ + @JsonProperty("requested_at") + private OffsetDateTime requestedAt; - public StakingStatus() { - } + public StakingStatus() {} - public StakingStatus(Builder builder) { - this.amount = builder.amount; - this.stakeType = builder.stakeType; - this.estimatedStakeDate = builder.estimatedStakeDate; - this.estimatedHoursToStake = builder.estimatedHoursToStake; - this.requestedAt = builder.requestedAt; - } - public String getAmount() { - return amount; - } + public StakingStatus(Builder builder) { + this.amount = builder.amount; + this.stakeType = builder.stakeType; + this.estimatedStakeDate = builder.estimatedStakeDate; + this.estimatedHoursToStake = builder.estimatedHoursToStake; + this.requestedAt = builder.requestedAt; + } - public void setAmount(String amount) { - this.amount = amount; - } - public StakeType getStakeType() { - return stakeType; - } + public String getAmount() { + return amount; + } - public void setStakeType(StakeType stakeType) { - this.stakeType = stakeType; - } - public OffsetDateTime getEstimatedStakeDate() { - return estimatedStakeDate; - } + public void setAmount(String amount) { + this.amount = amount; + } - public void setEstimatedStakeDate(OffsetDateTime estimatedStakeDate) { - this.estimatedStakeDate = estimatedStakeDate; - } - public Long getEstimatedHoursToStake() { - return estimatedHoursToStake; - } + public StakeType getStakeType() { + return stakeType; + } - public void setEstimatedHoursToStake(Long estimatedHoursToStake) { - this.estimatedHoursToStake = estimatedHoursToStake; - } - public OffsetDateTime getRequestedAt() { - return requestedAt; - } + public void setStakeType(StakeType stakeType) { + this.stakeType = stakeType; + } - public void setRequestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - } - public static class Builder { - private String amount; + public OffsetDateTime getEstimatedStakeDate() { + return estimatedStakeDate; + } - private StakeType stakeType; + public void setEstimatedStakeDate(OffsetDateTime estimatedStakeDate) { + this.estimatedStakeDate = estimatedStakeDate; + } - private OffsetDateTime estimatedStakeDate; + public Long getEstimatedHoursToStake() { + return estimatedHoursToStake; + } - private Long estimatedHoursToStake; + public void setEstimatedHoursToStake(Long estimatedHoursToStake) { + this.estimatedHoursToStake = estimatedHoursToStake; + } - private OffsetDateTime requestedAt; + public OffsetDateTime getRequestedAt() { + return requestedAt; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public void setRequestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + } - public Builder stakeType(StakeType stakeType) { - this.stakeType = stakeType; - return this; - } + public static class Builder { + private String amount; - public Builder estimatedStakeDate(OffsetDateTime estimatedStakeDate) { - this.estimatedStakeDate = estimatedStakeDate; - return this; - } + private StakeType stakeType; - public Builder estimatedHoursToStake(Long estimatedHoursToStake) { - this.estimatedHoursToStake = estimatedHoursToStake; - return this; - } + private OffsetDateTime estimatedStakeDate; - public Builder requestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - return this; - } + private Long estimatedHoursToStake; - public StakingStatus build() { - return new StakingStatus(this); - } + private OffsetDateTime requestedAt; + + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public Builder stakeType(StakeType stakeType) { + this.stakeType = stakeType; + return this; } -} + public Builder estimatedStakeDate(OffsetDateTime estimatedStakeDate) { + this.estimatedStakeDate = estimatedStakeDate; + return this; + } + + public Builder estimatedHoursToStake(Long estimatedHoursToStake) { + this.estimatedHoursToStake = estimatedHoursToStake; + return this; + } + + public Builder requestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + return this; + } + + public StakingStatus build() { + return new StakingStatus(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/SweepAmount.java b/src/main/java/com/coinbase/prime/model/SweepAmount.java index 1d9b87b..9616df6 100644 --- a/src/main/java/com/coinbase/prime/model/SweepAmount.java +++ b/src/main/java/com/coinbase/prime/model/SweepAmount.java @@ -19,55 +19,52 @@ package com.coinbase.prime.model; public class SweepAmount { - /** - * Currency - */ - private String currency; + /** Currency */ + private String currency; - /** - * Amount - */ - private String amount; + /** Amount */ + private String amount; - public SweepAmount() { - } + public SweepAmount() {} - public SweepAmount(Builder builder) { - this.currency = builder.currency; - this.amount = builder.amount; - } - public String getCurrency() { - return currency; - } + public SweepAmount(Builder builder) { + this.currency = builder.currency; + this.amount = builder.amount; + } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getAmount() { - return amount; - } + public String getCurrency() { + return currency; + } - public void setAmount(String amount) { - this.amount = amount; - } - public static class Builder { - private String currency; + public void setCurrency(String currency) { + this.currency = currency; + } - private String amount; + public String getAmount() { + return amount; + } - public Builder currency(String currency) { - this.currency = currency; - return this; - } + public void setAmount(String amount) { + this.amount = amount; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public static class Builder { + private String currency; + + private String amount; - public SweepAmount build() { - return new SweepAmount(this); - } + public Builder currency(String currency) { + this.currency = currency; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public SweepAmount build() { + return new SweepAmount(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/TfAsset.java b/src/main/java/com/coinbase/prime/model/TfAsset.java index 507aafe..2cd8de5 100644 --- a/src/main/java/com/coinbase/prime/model/TfAsset.java +++ b/src/main/java/com/coinbase/prime/model/TfAsset.java @@ -17,81 +17,78 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** TFAsset represents an asset eligible for Trade Finance with adjustment factors */ public class TfAsset { - /** - * The asset symbol - */ - private String symbol; + /** The asset symbol */ + private String symbol; - /** - * The asset adjustment factor for Trade Finance - */ - @JsonProperty("asset_adjustment") - private String assetAdjustment; + /** The asset adjustment factor for Trade Finance */ + @JsonProperty("asset_adjustment") + private String assetAdjustment; - /** - * The liability adjustment factor for Trade Finance - */ - @JsonProperty("liability_adjustment") - private String liabilityAdjustment; + /** The liability adjustment factor for Trade Finance */ + @JsonProperty("liability_adjustment") + private String liabilityAdjustment; - public TfAsset() { - } + public TfAsset() {} - public TfAsset(Builder builder) { - this.symbol = builder.symbol; - this.assetAdjustment = builder.assetAdjustment; - this.liabilityAdjustment = builder.liabilityAdjustment; - } - public String getSymbol() { - return symbol; - } + public TfAsset(Builder builder) { + this.symbol = builder.symbol; + this.assetAdjustment = builder.assetAdjustment; + this.liabilityAdjustment = builder.liabilityAdjustment; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getAssetAdjustment() { - return assetAdjustment; - } + public String getSymbol() { + return symbol; + } - public void setAssetAdjustment(String assetAdjustment) { - this.assetAdjustment = assetAdjustment; - } - public String getLiabilityAdjustment() { - return liabilityAdjustment; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setLiabilityAdjustment(String liabilityAdjustment) { - this.liabilityAdjustment = liabilityAdjustment; - } - public static class Builder { - private String symbol; + public String getAssetAdjustment() { + return assetAdjustment; + } - private String assetAdjustment; + public void setAssetAdjustment(String assetAdjustment) { + this.assetAdjustment = assetAdjustment; + } - private String liabilityAdjustment; + public String getLiabilityAdjustment() { + return liabilityAdjustment; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setLiabilityAdjustment(String liabilityAdjustment) { + this.liabilityAdjustment = liabilityAdjustment; + } - public Builder assetAdjustment(String assetAdjustment) { - this.assetAdjustment = assetAdjustment; - return this; - } + public static class Builder { + private String symbol; + + private String assetAdjustment; - public Builder liabilityAdjustment(String liabilityAdjustment) { - this.liabilityAdjustment = liabilityAdjustment; - return this; - } + private String liabilityAdjustment; - public TfAsset build() { - return new TfAsset(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder assetAdjustment(String assetAdjustment) { + this.assetAdjustment = assetAdjustment; + return this; + } + + public Builder liabilityAdjustment(String liabilityAdjustment) { + this.liabilityAdjustment = liabilityAdjustment; + return this; + } + + public TfAsset build() { + return new TfAsset(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/TfObligation.java b/src/main/java/com/coinbase/prime/model/TfObligation.java index 73fa872..4ccb1c4 100644 --- a/src/main/java/com/coinbase/prime/model/TfObligation.java +++ b/src/main/java/com/coinbase/prime/model/TfObligation.java @@ -17,123 +17,118 @@ */ package com.coinbase.prime.model; + 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 unique ID of the portfolio */ + @JsonProperty("portfolio_id") + private String portfolioId; - /** - * The currency symbol - */ - private String symbol; + /** The currency symbol */ + private String symbol; - /** - * Current amount due - */ - @JsonProperty("amount_due") - private String amountDue; + /** Current amount due */ + @JsonProperty("amount_due") + private String amountDue; - /** - * Loan notional amount - */ - @JsonProperty("notional_amount") - private String notionalAmount; + /** Loan notional amount */ + @JsonProperty("notional_amount") + private String notionalAmount; - /** - * Settlement due date - */ - @JsonProperty("due_date") - private String dueDate; + /** Settlement due date */ + @JsonProperty("due_date") + private String dueDate; - public TfObligation() { - } + public TfObligation() {} - public TfObligation(Builder builder) { - this.portfolioId = builder.portfolioId; - this.symbol = builder.symbol; - this.amountDue = builder.amountDue; - this.notionalAmount = builder.notionalAmount; - this.dueDate = builder.dueDate; - } - public String getPortfolioId() { - return portfolioId; - } + public TfObligation(Builder builder) { + this.portfolioId = builder.portfolioId; + this.symbol = builder.symbol; + this.amountDue = builder.amountDue; + this.notionalAmount = builder.notionalAmount; + this.dueDate = builder.dueDate; + } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public String getSymbol() { - return symbol; - } + public String getPortfolioId() { + return portfolioId; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getAmountDue() { - return amountDue; - } + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } - public void setAmountDue(String amountDue) { - this.amountDue = amountDue; - } - public String getNotionalAmount() { - return notionalAmount; - } + public String getSymbol() { + return symbol; + } - public void setNotionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - } - public String getDueDate() { - return dueDate; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setDueDate(String dueDate) { - this.dueDate = dueDate; - } - public static class Builder { - private String portfolioId; + public String getAmountDue() { + return amountDue; + } - private String symbol; + public void setAmountDue(String amountDue) { + this.amountDue = amountDue; + } - private String amountDue; + public String getNotionalAmount() { + return notionalAmount; + } - private String notionalAmount; + public void setNotionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + } - private String dueDate; + public String getDueDate() { + return dueDate; + } - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public static class Builder { + private String portfolioId; - public Builder amountDue(String amountDue) { - this.amountDue = amountDue; - return this; - } + private String symbol; - public Builder notionalAmount(String notionalAmount) { - this.notionalAmount = notionalAmount; - return this; - } + private String amountDue; - public Builder dueDate(String dueDate) { - this.dueDate = dueDate; - return this; - } + private String notionalAmount; - public TfObligation build() { - return new TfObligation(this); - } + private String dueDate; + + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder amountDue(String amountDue) { + this.amountDue = amountDue; + return this; + } + + public Builder notionalAmount(String notionalAmount) { + this.notionalAmount = notionalAmount; + return this; + } + + public Builder dueDate(String dueDate) { + this.dueDate = dueDate; + return this; + } + + public TfObligation build() { + return new TfObligation(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java index e18b0f4..eb33282 100644 --- a/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java +++ b/src/main/java/com/coinbase/prime/model/TierPairRateEntry.java @@ -17,81 +17,80 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; -/** 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. - */ - @JsonProperty("tier_a") - private String tierA; + /** First tier in the pair. */ + @JsonProperty("tier_a") + private String tierA; - /** - * Second tier in the pair. - */ - @JsonProperty("tier_b") - private String tierB; + /** Second tier in the pair. */ + @JsonProperty("tier_b") + private String tierB; - /** - * Credit rate for this tier pair. - */ - private String rate; + /** Credit rate for this tier pair. */ + private String rate; - public TierPairRateEntry() { - } + public TierPairRateEntry() {} - public TierPairRateEntry(Builder builder) { - this.tierA = builder.tierA; - this.tierB = builder.tierB; - this.rate = builder.rate; - } - public String getTierA() { - return tierA; - } + public TierPairRateEntry(Builder builder) { + this.tierA = builder.tierA; + this.tierB = builder.tierB; + this.rate = builder.rate; + } - public void setTierA(String tierA) { - this.tierA = tierA; - } - public String getTierB() { - return tierB; - } + public String getTierA() { + return tierA; + } - public void setTierB(String tierB) { - this.tierB = tierB; - } - public String getRate() { - return rate; - } + public void setTierA(String tierA) { + this.tierA = tierA; + } - public void setRate(String rate) { - this.rate = rate; - } - public static class Builder { - private String tierA; + public String getTierB() { + return tierB; + } + + public void setTierB(String tierB) { + this.tierB = tierB; + } - private String tierB; + public String getRate() { + return rate; + } - private String rate; + public void setRate(String rate) { + this.rate = rate; + } - public Builder tierA(String tierA) { - this.tierA = tierA; - return this; - } + public static class Builder { + private String tierA; - public Builder tierB(String tierB) { - this.tierB = tierB; - return this; - } + private String tierB; - public Builder rate(String rate) { - this.rate = rate; - return this; - } + private String rate; - public TierPairRateEntry build() { - return new TierPairRateEntry(this); - } + 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 7ea7387..f8ad16a 100644 --- a/src/main/java/com/coinbase/prime/model/TieredPricingFee.java +++ b/src/main/java/com/coinbase/prime/model/TieredPricingFee.java @@ -19,55 +19,52 @@ package com.coinbase.prime.model; public class TieredPricingFee { - /** - * Asset symbol - */ - private String symbol; + /** Asset symbol */ + private String symbol; - /** - * The fee in bps - */ - private String fee; + /** The fee in bps */ + private String fee; - public TieredPricingFee() { - } + public TieredPricingFee() {} - public TieredPricingFee(Builder builder) { - this.symbol = builder.symbol; - this.fee = builder.fee; - } - public String getSymbol() { - return symbol; - } + public TieredPricingFee(Builder builder) { + this.symbol = builder.symbol; + this.fee = builder.fee; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getFee() { - return fee; - } + public String getSymbol() { + return symbol; + } - public void setFee(String fee) { - this.fee = fee; - } - public static class Builder { - private String symbol; + public void setSymbol(String symbol) { + this.symbol = symbol; + } - private String fee; + public String getFee() { + return fee; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setFee(String fee) { + this.fee = fee; + } - public Builder fee(String fee) { - this.fee = fee; - return this; - } + public static class Builder { + private String symbol; + + private String fee; - public TieredPricingFee build() { - return new TieredPricingFee(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder fee(String fee) { + this.fee = fee; + return this; + } + + public TieredPricingFee build() { + return new TieredPricingFee(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Transaction.java b/src/main/java/com/coinbase/prime/model/Transaction.java index ed19072..01d8cd4 100644 --- a/src/main/java/com/coinbase/prime/model/Transaction.java +++ b/src/main/java/com/coinbase/prime/model/Transaction.java @@ -17,604 +17,567 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.AssetChange; -import com.coinbase.prime.model.EstimatedNetworkFees; -import com.coinbase.prime.model.Network; -import com.coinbase.prime.model.OnchainTransactionDetails; -import com.coinbase.prime.model.ProcessRequirements; -import com.coinbase.prime.model.TransactionMetadata; + import com.coinbase.prime.model.enums.TransactionStatus; import com.coinbase.prime.model.enums.TransactionType; -import com.coinbase.prime.model.TransferLocation; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; public class Transaction { - /** - * The ID of the transaction - */ + /** The ID of the transaction */ + private String id; + + /** The wallet ID of the transaction */ + @JsonProperty("wallet_id") + private String walletId; + + /** The portfolio ID of the transaction */ + @JsonProperty("portfolio_id") + private String portfolioId; + + /** + * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type - DEPOSIT: A fiat or crypto deposit - + * WITHDRAWAL: A fiat or crypto withdrawal - INTERNAL_DEPOSIT: An internal fiat or crypto deposit + * - INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal - SWEEP_DEPOSIT: Internal + * automated deposit to a cold address from a restored address - SWEEP_WITHDRAWAL: Internal + * automated withdrawal from a restored address to a cold address - PROXY_DEPOSIT: On-chain + * deposit of funds into proxy contract from cold address - PROXY_WITHDRAWAL: On-chain withdrawal + * of funds from proxy contract to cold address - BILLING_WITHDRAWAL: Coinbase Prime automated + * invoice settlement payment - REWARD: Reward payment to an associated address for a staked asset + * - COINBASE_REFUND: Coinbase Prime refund for the leftover amount for a CPFP (child pays for + * parent) transaction - TRANSACTION_TYPE_OTHER: An OTHER type of transaction - + * WITHDRAWAL_ADJUSTMENT: A manual adjustment withdrawal transaction - DEPOSIT_ADJUSTMENT: A + * manual adjustment deposit transaction - KEY_REGISTRATION: An on-chain registration for an + * address - DELEGATION: An on-chain delegation transaction - UNDELEGATION: An on-chain + * undelegation transaction - RESTAKE: On-chain restaking transaction - COMPLETE_UNBONDING: + * On-chain unbonding event transaction - WITHDRAW_UNBONDED: On-chain event indicating unbonding + * period is over - STAKE_ACCOUNT_CREATE: On-chain transaction to begin staking from an address - + * CHANGE_VALIDATOR: On-chain transaction alter validator - STAKE: On-chain transaction to begin + * staking in Cryptocurrency network - UNSTAKE: On-chain transaction to stop staking in + * Cryptocurrency network - REMOVE_AUTHORIZED_PARTY: On-chain transaction to remove a party from a + * multi-signature wallet - STAKE_AUTHORIZE_WITH_SEED: On-chain transaction to begin staking from + * a seed account - SLASH: On-chain transaction indicating a slash event has occurred - + * COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of transaction operations - + * CONVERSION: Internal conversion between two assets - CLAIM_REWARDS: On-chain transaction to + * claim rewards from Vote Account - VOTE_AUTHORIZE: On-chain transaction to transfer the reward + * claiming permission to other pubkey - WEB3_TRANSACTION: On-chain transaction initiated with + * Prime Onchain Wallet Deprecated: Use ONCHAIN_TRANSACTION instead - ONCHAIN_TRANSACTION: + * On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: Portfolio-level + * staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation + */ + private TransactionType type; + + /** + * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status - TRANSACTION_CREATED: The + * Transaction has been created and is awaiting Consensus approval This is a non-terminal status - + * TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase + * Prime approval This is a non-terminal status - TRANSACTION_APPROVED: The Transaction has been + * authorized by Coinbase Prime This is a non-terminal status - TRANSACTION_GASSING: The + * transaction is awaiting blockchain resources for broadcast This is a non-terminal status - + * TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting This is + * a non-terminal status - TRANSACTION_PROVISIONED: The transaction has been provisioned and is + * awaiting planning This is a non-terminal status - TRANSACTION_PLANNED: The transaction has been + * constructed. This is a non-terminal status - TRANSACTION_PROCESSING: The transaction is + * currently processing and awaiting finalization This is a non-terminal status - + * TRANSACTION_RESTORED: The transaction has been broadcasted to the network. This is a + * non-terminal status - TRANSACTION_DONE: The transaction has confirmed on-chain and finished. + * This is a terminal status - TRANSACTION_IMPORT_PENDING: The transaction deposit has been + * detected and is awaiting finalization. This is a non-terminal status - TRANSACTION_IMPORTED: + * The transaction deposit and reward has been detected. This is a terminal status - + * TRANSACTION_CANCELLED: The transaction has been cancelled This is a terminal status - + * TRANSACTION_REJECTED: The transaction was rejected before construction and broadcasting. This + * is a terminal status - TRANSACTION_DELAYED: The transaction s taking longer than expected to + * confirm on-chain. This is a non-terminal status - TRANSACTION_RETRIED: The transaction has been + * recreated and retried, this occurs when network congestion results in transfers becoming + * extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET This + * is a terminal status - TRANSACTION_FAILED: The transaction failed on-chain (the fee was spent + * but the operation failed). This is a terminal status - TRANSACTION_EXPIRED: The transaction has + * expired. This is a terminal status - TRANSACTION_BROADCASTING: The transaction is currently + * broadcasting to the cryptocurrency network. This is a non-terminal status - + * OTHER_TRANSACTION_STATUS: The transaction has reached an OTHER status. This is a non-terminal + * status - TRANSACTION_CONSTRUCTED: The transaction bctx is constructed but not yet broadcasting + * on chain This is a non-terminal status + */ + private TransactionStatus status; + + /** The asset symbol */ + private String symbol; + + /** The transaction creation time (as a UTC timestamp) */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** The transaction completion time (as a UTC timestamp) */ + @JsonProperty("completed_at") + private OffsetDateTime completedAt; + + /** The transaction amount in whole units */ + private String amount; + + @JsonProperty("transfer_from") + private TransferLocation transferFrom; + + @JsonProperty("transfer_to") + private TransferLocation transferTo; + + /** The blockchain network fees (in whole units) required in order to broadcast the transaction */ + @JsonProperty("network_fees") + private String networkFees; + + /** The fees that the customer paid for the transaction (in whole units) */ + private String fees; + + /** The asset in which fees will be paid */ + @JsonProperty("fee_symbol") + private String feeSymbol; + + /** The cryptocurrency network transaction hashes/IDs generated upon broadcast */ + @JsonProperty("blockchain_ids") + private List blockchainIds; + + /** The 8 character alphanumeric short form id for the transaction */ + @JsonProperty("transaction_id") + private String transactionId; + + /** The destination asset symbol */ + @JsonProperty("destination_symbol") + private String destinationSymbol; + + @JsonProperty("estimated_network_fees") + private EstimatedNetworkFees estimatedNetworkFees; + + /** The network name specific to onchain/onchain wallet transactions */ + private String network; + + /** The estimated asset changes (onchain) */ + @JsonProperty("estimated_asset_changes") + private List estimatedAssetChanges; + + private TransactionMetadata metadata; + + /** The idempotency key associated with the transaction creation request */ + @JsonProperty("idempotency_key") + private String idempotencyKey; + + @JsonProperty("web3_details") + private OnchainTransactionDetails onchainDetails; + + @JsonProperty("network_info") + private Network networkInfo; + + /** Represents the status of various process requirements for a transaction */ + @JsonProperty("process_requirements") + private ProcessRequirements processRequirements; + + public Transaction() {} + + public Transaction(Builder builder) { + this.id = builder.id; + this.walletId = builder.walletId; + this.portfolioId = builder.portfolioId; + this.type = builder.type; + this.status = builder.status; + this.symbol = builder.symbol; + this.createdAt = builder.createdAt; + this.completedAt = builder.completedAt; + this.amount = builder.amount; + this.transferFrom = builder.transferFrom; + this.transferTo = builder.transferTo; + this.networkFees = builder.networkFees; + this.fees = builder.fees; + this.feeSymbol = builder.feeSymbol; + this.blockchainIds = builder.blockchainIds; + this.transactionId = builder.transactionId; + this.destinationSymbol = builder.destinationSymbol; + this.estimatedNetworkFees = builder.estimatedNetworkFees; + this.network = builder.network; + this.estimatedAssetChanges = builder.estimatedAssetChanges; + this.metadata = builder.metadata; + this.idempotencyKey = builder.idempotencyKey; + this.onchainDetails = builder.onchainDetails; + this.networkInfo = builder.networkInfo; + this.processRequirements = builder.processRequirements; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getWalletId() { + return walletId; + } + + public void setWalletId(String walletId) { + this.walletId = walletId; + } + + public String getPortfolioId() { + return portfolioId; + } + + public void setPortfolioId(String portfolioId) { + this.portfolioId = portfolioId; + } + + public TransactionType getType() { + return type; + } + + public void setType(TransactionType type) { + this.type = type; + } + + public TransactionStatus getStatus() { + return status; + } + + public void setStatus(TransactionStatus status) { + this.status = status; + } + + public String getSymbol() { + return symbol; + } + + public void setSymbol(String symbol) { + this.symbol = symbol; + } + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public OffsetDateTime getCompletedAt() { + return completedAt; + } + + public void setCompletedAt(OffsetDateTime completedAt) { + this.completedAt = completedAt; + } + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public TransferLocation getTransferFrom() { + return transferFrom; + } + + public void setTransferFrom(TransferLocation transferFrom) { + this.transferFrom = transferFrom; + } + + public TransferLocation getTransferTo() { + return transferTo; + } + + public void setTransferTo(TransferLocation transferTo) { + this.transferTo = transferTo; + } + + public String getNetworkFees() { + return networkFees; + } + + public void setNetworkFees(String networkFees) { + this.networkFees = networkFees; + } + + public String getFees() { + return fees; + } + + public void setFees(String fees) { + this.fees = fees; + } + + public String getFeeSymbol() { + return feeSymbol; + } + + public void setFeeSymbol(String feeSymbol) { + this.feeSymbol = feeSymbol; + } + + public List getBlockchainIds() { + return blockchainIds; + } + + public void setBlockchainIds(List blockchainIds) { + this.blockchainIds = blockchainIds; + } + + public String getTransactionId() { + return transactionId; + } + + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } + + public String getDestinationSymbol() { + return destinationSymbol; + } + + public void setDestinationSymbol(String destinationSymbol) { + this.destinationSymbol = destinationSymbol; + } + + public EstimatedNetworkFees getEstimatedNetworkFees() { + return estimatedNetworkFees; + } + + public void setEstimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { + this.estimatedNetworkFees = estimatedNetworkFees; + } + + public String getNetwork() { + return network; + } + + public void setNetwork(String network) { + this.network = network; + } + + public List getEstimatedAssetChanges() { + return estimatedAssetChanges; + } + + public void setEstimatedAssetChanges(List estimatedAssetChanges) { + this.estimatedAssetChanges = estimatedAssetChanges; + } + + public TransactionMetadata getMetadata() { + return metadata; + } + + public void setMetadata(TransactionMetadata metadata) { + this.metadata = metadata; + } + + public String getIdempotencyKey() { + return idempotencyKey; + } + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + public OnchainTransactionDetails getOnchainDetails() { + return onchainDetails; + } + + public void setOnchainDetails(OnchainTransactionDetails onchainDetails) { + this.onchainDetails = onchainDetails; + } + + public Network getNetworkInfo() { + return networkInfo; + } + + public void setNetworkInfo(Network networkInfo) { + this.networkInfo = networkInfo; + } + + public ProcessRequirements getProcessRequirements() { + return processRequirements; + } + + public void setProcessRequirements(ProcessRequirements processRequirements) { + this.processRequirements = processRequirements; + } + + public static class Builder { private String id; - /** - * The wallet ID of the transaction - */ - @JsonProperty("wallet_id") private String walletId; - /** - * The portfolio ID of the transaction - */ - @JsonProperty("portfolio_id") private String portfolioId; - /** - * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type - * - DEPOSIT: A fiat or crypto deposit - * - WITHDRAWAL: A fiat or crypto withdrawal - * - INTERNAL_DEPOSIT: An internal fiat or crypto deposit - * - INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal - * - SWEEP_DEPOSIT: Internal automated deposit to a cold address from a restored address - * - SWEEP_WITHDRAWAL: Internal automated withdrawal from a restored address to a cold address - * - PROXY_DEPOSIT: On-chain deposit of funds into proxy contract from cold address - * - PROXY_WITHDRAWAL: On-chain withdrawal of funds from proxy contract to cold address - * - BILLING_WITHDRAWAL: Coinbase Prime automated invoice settlement payment - * - REWARD: Reward payment to an associated address for a staked asset - * - COINBASE_REFUND: Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction - * - TRANSACTION_TYPE_OTHER: An OTHER type of transaction - * - WITHDRAWAL_ADJUSTMENT: A manual adjustment withdrawal transaction - * - DEPOSIT_ADJUSTMENT: A manual adjustment deposit transaction - * - KEY_REGISTRATION: An on-chain registration for an address - * - DELEGATION: An on-chain delegation transaction - * - UNDELEGATION: An on-chain undelegation transaction - * - RESTAKE: On-chain restaking transaction - * - COMPLETE_UNBONDING: On-chain unbonding event transaction - * - WITHDRAW_UNBONDED: On-chain event indicating unbonding period is over - * - STAKE_ACCOUNT_CREATE: On-chain transaction to begin staking from an address - * - CHANGE_VALIDATOR: On-chain transaction alter validator - * - STAKE: On-chain transaction to begin staking in Cryptocurrency network - * - UNSTAKE: On-chain transaction to stop staking in Cryptocurrency network - * - REMOVE_AUTHORIZED_PARTY: On-chain transaction to remove a party from a multi-signature wallet - * - STAKE_AUTHORIZE_WITH_SEED: On-chain transaction to begin staking from a seed account - * - SLASH: On-chain transaction indicating a slash event has occurred - * - COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of transaction operations - * - CONVERSION: Internal conversion between two assets - * - CLAIM_REWARDS: On-chain transaction to claim rewards from Vote Account - * - VOTE_AUTHORIZE: On-chain transaction to transfer the reward claiming permission to other pubkey - * - WEB3_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - * Deprecated: Use ONCHAIN_TRANSACTION instead - * - ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - * - PORTFOLIO_STAKE: Portfolio-level staking operation - * - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation - */ private TransactionType type; - /** - * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status - * - TRANSACTION_CREATED: The Transaction has been created and is awaiting Consensus approval - * This is a non-terminal status - * - TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase Prime approval - * This is a non-terminal status - * - TRANSACTION_APPROVED: The Transaction has been authorized by Coinbase Prime - * This is a non-terminal status - * - TRANSACTION_GASSING: The transaction is awaiting blockchain resources for broadcast - * This is a non-terminal status - * - TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting - * This is a non-terminal status - * - TRANSACTION_PROVISIONED: The transaction has been provisioned and is awaiting planning - * This is a non-terminal status - * - TRANSACTION_PLANNED: The transaction has been constructed. - * This is a non-terminal status - * - TRANSACTION_PROCESSING: The transaction is currently processing and awaiting finalization - * This is a non-terminal status - * - TRANSACTION_RESTORED: The transaction has been broadcasted to the network. - * This is a non-terminal status - * - TRANSACTION_DONE: The transaction has confirmed on-chain and finished. - * This is a terminal status - * - TRANSACTION_IMPORT_PENDING: The transaction deposit has been detected and is awaiting finalization. - * This is a non-terminal status - * - TRANSACTION_IMPORTED: The transaction deposit and reward has been detected. - * This is a terminal status - * - TRANSACTION_CANCELLED: The transaction has been cancelled - * This is a terminal status - * - TRANSACTION_REJECTED: The transaction was rejected before construction and broadcasting. - * This is a terminal status - * - TRANSACTION_DELAYED: The transaction s taking longer than expected to confirm on-chain. - * This is a non-terminal status - * - TRANSACTION_RETRIED: The transaction has been recreated and retried, this occurs when network congestion results in transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET - * This is a terminal status - * - TRANSACTION_FAILED: The transaction failed on-chain (the fee was spent but the operation failed). - * This is a terminal status - * - TRANSACTION_EXPIRED: The transaction has expired. - * This is a terminal status - * - TRANSACTION_BROADCASTING: The transaction is currently broadcasting to the cryptocurrency network. - * This is a non-terminal status - * - OTHER_TRANSACTION_STATUS: The transaction has reached an OTHER status. - * This is a non-terminal status - * - TRANSACTION_CONSTRUCTED: The transaction bctx is constructed but not yet broadcasting on chain - * This is a non-terminal status - */ private TransactionStatus status; - /** - * The asset symbol - */ private String symbol; - /** - * The transaction creation time (as a UTC timestamp) - */ - @JsonProperty("created_at") private OffsetDateTime createdAt; - /** - * The transaction completion time (as a UTC timestamp) - */ - @JsonProperty("completed_at") private OffsetDateTime completedAt; - /** - * The transaction amount in whole units - */ private String amount; - @JsonProperty("transfer_from") private TransferLocation transferFrom; - @JsonProperty("transfer_to") private TransferLocation transferTo; - /** - * The blockchain network fees (in whole units) required in order to broadcast the transaction - */ - @JsonProperty("network_fees") private String networkFees; - /** - * The fees that the customer paid for the transaction (in whole units) - */ private String fees; - /** - * The asset in which fees will be paid - */ - @JsonProperty("fee_symbol") private String feeSymbol; - /** - * The cryptocurrency network transaction hashes/IDs generated upon broadcast - */ - @JsonProperty("blockchain_ids") private List blockchainIds; - /** - * The 8 character alphanumeric short form id for the transaction - */ - @JsonProperty("transaction_id") private String transactionId; - /** - * The destination asset symbol - */ - @JsonProperty("destination_symbol") private String destinationSymbol; - @JsonProperty("estimated_network_fees") private EstimatedNetworkFees estimatedNetworkFees; - /** - * The network name specific to onchain/onchain wallet transactions - */ private String network; - /** - * The estimated asset changes (onchain) - */ - @JsonProperty("estimated_asset_changes") private List estimatedAssetChanges; private TransactionMetadata metadata; - /** - * The idempotency key associated with the transaction creation request - */ - @JsonProperty("idempotency_key") private String idempotencyKey; - @JsonProperty("web3_details") private OnchainTransactionDetails onchainDetails; - @JsonProperty("network_info") private Network networkInfo; - /** Represents the status of various process requirements for a transaction */ - @JsonProperty("process_requirements") private ProcessRequirements processRequirements; - public Transaction() { + public Builder id(String id) { + this.id = id; + return this; } - public Transaction(Builder builder) { - this.id = builder.id; - this.walletId = builder.walletId; - this.portfolioId = builder.portfolioId; - this.type = builder.type; - this.status = builder.status; - this.symbol = builder.symbol; - this.createdAt = builder.createdAt; - this.completedAt = builder.completedAt; - this.amount = builder.amount; - this.transferFrom = builder.transferFrom; - this.transferTo = builder.transferTo; - this.networkFees = builder.networkFees; - this.fees = builder.fees; - this.feeSymbol = builder.feeSymbol; - this.blockchainIds = builder.blockchainIds; - this.transactionId = builder.transactionId; - this.destinationSymbol = builder.destinationSymbol; - this.estimatedNetworkFees = builder.estimatedNetworkFees; - this.network = builder.network; - this.estimatedAssetChanges = builder.estimatedAssetChanges; - this.metadata = builder.metadata; - this.idempotencyKey = builder.idempotencyKey; - this.onchainDetails = builder.onchainDetails; - this.networkInfo = builder.networkInfo; - this.processRequirements = builder.processRequirements; - } - public String getId() { - return id; + public Builder walletId(String walletId) { + this.walletId = walletId; + return this; } - public void setId(String id) { - this.id = id; - } - public String getWalletId() { - return walletId; + public Builder portfolioId(String portfolioId) { + this.portfolioId = portfolioId; + return this; } - public void setWalletId(String walletId) { - this.walletId = walletId; - } - public String getPortfolioId() { - return portfolioId; + public Builder type(TransactionType type) { + this.type = type; + return this; } - public void setPortfolioId(String portfolioId) { - this.portfolioId = portfolioId; - } - public TransactionType getType() { - return type; + public Builder status(TransactionStatus status) { + this.status = status; + return this; } - public void setType(TransactionType type) { - this.type = type; - } - public TransactionStatus getStatus() { - return status; + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } - public void setStatus(TransactionStatus status) { - this.status = status; - } - public String getSymbol() { - return symbol; + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public OffsetDateTime getCreatedAt() { - return createdAt; + public Builder completedAt(OffsetDateTime completedAt) { + this.completedAt = completedAt; + return this; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - public OffsetDateTime getCompletedAt() { - return completedAt; + public Builder amount(String amount) { + this.amount = amount; + return this; } - public void setCompletedAt(OffsetDateTime completedAt) { - this.completedAt = completedAt; - } - public String getAmount() { - return amount; + public Builder transferFrom(TransferLocation transferFrom) { + this.transferFrom = transferFrom; + return this; } - public void setAmount(String amount) { - this.amount = amount; - } - public TransferLocation getTransferFrom() { - return transferFrom; + public Builder transferTo(TransferLocation transferTo) { + this.transferTo = transferTo; + return this; } - public void setTransferFrom(TransferLocation transferFrom) { - this.transferFrom = transferFrom; - } - public TransferLocation getTransferTo() { - return transferTo; + public Builder networkFees(String networkFees) { + this.networkFees = networkFees; + return this; } - public void setTransferTo(TransferLocation transferTo) { - this.transferTo = transferTo; - } - public String getNetworkFees() { - return networkFees; + public Builder fees(String fees) { + this.fees = fees; + return this; } - public void setNetworkFees(String networkFees) { - this.networkFees = networkFees; - } - public String getFees() { - return fees; + public Builder feeSymbol(String feeSymbol) { + this.feeSymbol = feeSymbol; + return this; } - public void setFees(String fees) { - this.fees = fees; - } - public String getFeeSymbol() { - return feeSymbol; + public Builder blockchainIds(List blockchainIds) { + this.blockchainIds = blockchainIds; + return this; } - public void setFeeSymbol(String feeSymbol) { - this.feeSymbol = feeSymbol; - } - public List getBlockchainIds() { - return blockchainIds; + public Builder transactionId(String transactionId) { + this.transactionId = transactionId; + return this; } - public void setBlockchainIds(List blockchainIds) { - this.blockchainIds = blockchainIds; - } - public String getTransactionId() { - return transactionId; + public Builder destinationSymbol(String destinationSymbol) { + this.destinationSymbol = destinationSymbol; + return this; } - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } - public String getDestinationSymbol() { - return destinationSymbol; + public Builder estimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { + this.estimatedNetworkFees = estimatedNetworkFees; + return this; } - public void setDestinationSymbol(String destinationSymbol) { - this.destinationSymbol = destinationSymbol; - } - public EstimatedNetworkFees getEstimatedNetworkFees() { - return estimatedNetworkFees; + public Builder network(String network) { + this.network = network; + return this; } - public void setEstimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { - this.estimatedNetworkFees = estimatedNetworkFees; - } - public String getNetwork() { - return network; + public Builder estimatedAssetChanges(List estimatedAssetChanges) { + this.estimatedAssetChanges = estimatedAssetChanges; + return this; } - public void setNetwork(String network) { - this.network = network; - } - public List getEstimatedAssetChanges() { - return estimatedAssetChanges; + public Builder metadata(TransactionMetadata metadata) { + this.metadata = metadata; + return this; } - public void setEstimatedAssetChanges(List estimatedAssetChanges) { - this.estimatedAssetChanges = estimatedAssetChanges; - } - public TransactionMetadata getMetadata() { - return metadata; + public Builder idempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; } - public void setMetadata(TransactionMetadata metadata) { - this.metadata = metadata; - } - public String getIdempotencyKey() { - return idempotencyKey; - } - - public void setIdempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - } - public OnchainTransactionDetails getOnchainDetails() { - return onchainDetails; - } - - public void setOnchainDetails(OnchainTransactionDetails onchainDetails) { - this.onchainDetails = onchainDetails; - } - public Network getNetworkInfo() { - return networkInfo; + public Builder onchainDetails(OnchainTransactionDetails onchainDetails) { + this.onchainDetails = onchainDetails; + return this; } - public void setNetworkInfo(Network networkInfo) { - this.networkInfo = networkInfo; - } - public ProcessRequirements getProcessRequirements() { - return processRequirements; + public Builder networkInfo(Network networkInfo) { + this.networkInfo = networkInfo; + return this; } - public void setProcessRequirements(ProcessRequirements processRequirements) { - this.processRequirements = processRequirements; + public Builder processRequirements(ProcessRequirements processRequirements) { + this.processRequirements = processRequirements; + return this; } - public static class Builder { - private String id; - - private String walletId; - - private String portfolioId; - - private TransactionType type; - - private TransactionStatus status; - - private String symbol; - - private OffsetDateTime createdAt; - - private OffsetDateTime completedAt; - - private String amount; - - private TransferLocation transferFrom; - - private TransferLocation transferTo; - - private String networkFees; - - private String fees; - - private String feeSymbol; - - private List blockchainIds; - - private String transactionId; - - private String destinationSymbol; - private EstimatedNetworkFees estimatedNetworkFees; - - private String network; - - private List estimatedAssetChanges; - - private TransactionMetadata metadata; - - private String idempotencyKey; - - private OnchainTransactionDetails onchainDetails; - - private Network networkInfo; - - private ProcessRequirements processRequirements; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder walletId(String walletId) { - this.walletId = walletId; - return this; - } - - public Builder portfolioId(String portfolioId) { - this.portfolioId = portfolioId; - return this; - } - - public Builder type(TransactionType type) { - this.type = type; - return this; - } - - public Builder status(TransactionStatus status) { - this.status = status; - return this; - } - - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } - - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder completedAt(OffsetDateTime completedAt) { - this.completedAt = completedAt; - return this; - } - - public Builder amount(String amount) { - this.amount = amount; - return this; - } - - public Builder transferFrom(TransferLocation transferFrom) { - this.transferFrom = transferFrom; - return this; - } - - public Builder transferTo(TransferLocation transferTo) { - this.transferTo = transferTo; - return this; - } - - public Builder networkFees(String networkFees) { - this.networkFees = networkFees; - return this; - } - - public Builder fees(String fees) { - this.fees = fees; - return this; - } - - public Builder feeSymbol(String feeSymbol) { - this.feeSymbol = feeSymbol; - return this; - } - - public Builder blockchainIds(List blockchainIds) { - this.blockchainIds = blockchainIds; - return this; - } - - public Builder transactionId(String transactionId) { - this.transactionId = transactionId; - return this; - } - - public Builder destinationSymbol(String destinationSymbol) { - this.destinationSymbol = destinationSymbol; - return this; - } - - public Builder estimatedNetworkFees(EstimatedNetworkFees estimatedNetworkFees) { - this.estimatedNetworkFees = estimatedNetworkFees; - return this; - } - - public Builder network(String network) { - this.network = network; - return this; - } - - public Builder estimatedAssetChanges(List estimatedAssetChanges) { - this.estimatedAssetChanges = estimatedAssetChanges; - return this; - } - - public Builder metadata(TransactionMetadata metadata) { - this.metadata = metadata; - return this; - } - - public Builder idempotencyKey(String idempotencyKey) { - this.idempotencyKey = idempotencyKey; - return this; - } - - public Builder onchainDetails(OnchainTransactionDetails onchainDetails) { - this.onchainDetails = onchainDetails; - return this; - } - - public Builder networkInfo(Network networkInfo) { - this.networkInfo = networkInfo; - return this; - } - - public Builder processRequirements(ProcessRequirements processRequirements) { - this.processRequirements = processRequirements; - return this; - } - - public Transaction build() { - return new Transaction(this); - } + public Transaction build() { + return new Transaction(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/TransactionMetadata.java b/src/main/java/com/coinbase/prime/model/TransactionMetadata.java index 46d2ced..d132085 100644 --- a/src/main/java/com/coinbase/prime/model/TransactionMetadata.java +++ b/src/main/java/com/coinbase/prime/model/TransactionMetadata.java @@ -17,75 +17,76 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.MatchMetadata; -import com.coinbase.prime.model.RewardMetadata; -import com.coinbase.prime.model.OnchainTransactionMetadata; + import com.fasterxml.jackson.annotation.JsonProperty; public class TransactionMetadata { - @JsonProperty("match_metadata") - private MatchMetadata matchMetadata; + @JsonProperty("match_metadata") + private MatchMetadata matchMetadata; - @JsonProperty("web3_transaction_metadata") - private OnchainTransactionMetadata onchainTransactionMetadata; + @JsonProperty("web3_transaction_metadata") + private OnchainTransactionMetadata onchainTransactionMetadata; - @JsonProperty("reward_metadata") - private RewardMetadata rewardMetadata; + @JsonProperty("reward_metadata") + private RewardMetadata rewardMetadata; - public TransactionMetadata() { - } + public TransactionMetadata() {} - public TransactionMetadata(Builder builder) { - this.matchMetadata = builder.matchMetadata; - this.onchainTransactionMetadata = builder.onchainTransactionMetadata; - this.rewardMetadata = builder.rewardMetadata; - } - public MatchMetadata getMatchMetadata() { - return matchMetadata; - } + public TransactionMetadata(Builder builder) { + this.matchMetadata = builder.matchMetadata; + this.onchainTransactionMetadata = builder.onchainTransactionMetadata; + this.rewardMetadata = builder.rewardMetadata; + } - public void setMatchMetadata(MatchMetadata matchMetadata) { - this.matchMetadata = matchMetadata; - } - public OnchainTransactionMetadata getWeb3TransactionMetadata() { - return onchainTransactionMetadata; - } + public MatchMetadata getMatchMetadata() { + return matchMetadata; + } - public void setWeb3TransactionMetadata(OnchainTransactionMetadata onchainTransactionMetadata) { - this.onchainTransactionMetadata = onchainTransactionMetadata; - } - public RewardMetadata getRewardMetadata() { - return rewardMetadata; - } + public void setMatchMetadata(MatchMetadata matchMetadata) { + this.matchMetadata = matchMetadata; + } - public void setRewardMetadata(RewardMetadata rewardMetadata) { - this.rewardMetadata = rewardMetadata; - } - public static class Builder { - private MatchMetadata matchMetadata; + public OnchainTransactionMetadata getWeb3TransactionMetadata() { + return onchainTransactionMetadata; + } - private OnchainTransactionMetadata onchainTransactionMetadata; + public void setWeb3TransactionMetadata(OnchainTransactionMetadata onchainTransactionMetadata) { + this.onchainTransactionMetadata = onchainTransactionMetadata; + } - private RewardMetadata rewardMetadata; + public RewardMetadata getRewardMetadata() { + return rewardMetadata; + } - public Builder matchMetadata(MatchMetadata matchMetadata) { - this.matchMetadata = matchMetadata; - return this; - } + public void setRewardMetadata(RewardMetadata rewardMetadata) { + this.rewardMetadata = rewardMetadata; + } - public Builder onchainTransactionMetadata(OnchainTransactionMetadata onchainTransactionMetadata) { - this.onchainTransactionMetadata = onchainTransactionMetadata; - return this; - } + public static class Builder { + private MatchMetadata matchMetadata; + + private OnchainTransactionMetadata onchainTransactionMetadata; - public Builder rewardMetadata(RewardMetadata rewardMetadata) { - this.rewardMetadata = rewardMetadata; - return this; - } + private RewardMetadata rewardMetadata; - public TransactionMetadata build() { - return new TransactionMetadata(this); - } + public Builder matchMetadata(MatchMetadata matchMetadata) { + this.matchMetadata = matchMetadata; + return this; } -} + public Builder onchainTransactionMetadata( + OnchainTransactionMetadata onchainTransactionMetadata) { + this.onchainTransactionMetadata = onchainTransactionMetadata; + return this; + } + + public Builder rewardMetadata(RewardMetadata rewardMetadata) { + this.rewardMetadata = rewardMetadata; + return this; + } + + public TransactionMetadata build() { + return new TransactionMetadata(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/TransactionValidator.java b/src/main/java/com/coinbase/prime/model/TransactionValidator.java index fa75726..93d2354 100644 --- a/src/main/java/com/coinbase/prime/model/TransactionValidator.java +++ b/src/main/java/com/coinbase/prime/model/TransactionValidator.java @@ -17,79 +17,78 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.ValidatorStatus; import com.fasterxml.jackson.annotation.JsonProperty; public class TransactionValidator { - /** - * The ID of the transaction which staked to this validator - */ - @JsonProperty("transaction_id") - private String transactionId; + /** The ID of the transaction which staked to this validator */ + @JsonProperty("transaction_id") + private String transactionId; - /** - * The address (public key) of the validator - */ - @JsonProperty("validator_address") - private String validatorAddress; + /** The address (public key) of the validator */ + @JsonProperty("validator_address") + private String validatorAddress; - @JsonProperty("validator_status") - private ValidatorStatus validatorStatus; + @JsonProperty("validator_status") + private ValidatorStatus validatorStatus; - public TransactionValidator() { - } + public TransactionValidator() {} - public TransactionValidator(Builder builder) { - this.transactionId = builder.transactionId; - this.validatorAddress = builder.validatorAddress; - this.validatorStatus = builder.validatorStatus; - } - public String getTransactionId() { - return transactionId; - } + public TransactionValidator(Builder builder) { + this.transactionId = builder.transactionId; + this.validatorAddress = builder.validatorAddress; + this.validatorStatus = builder.validatorStatus; + } - public void setTransactionId(String transactionId) { - this.transactionId = transactionId; - } - public String getValidatorAddress() { - return validatorAddress; - } + public String getTransactionId() { + return transactionId; + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - public ValidatorStatus getValidatorStatus() { - return validatorStatus; - } + public void setTransactionId(String transactionId) { + this.transactionId = transactionId; + } - public void setValidatorStatus(ValidatorStatus validatorStatus) { - this.validatorStatus = validatorStatus; - } - public static class Builder { - private String transactionId; + public String getValidatorAddress() { + return validatorAddress; + } - private String validatorAddress; + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } - private ValidatorStatus validatorStatus; + public ValidatorStatus getValidatorStatus() { + return validatorStatus; + } - public Builder transactionId(String transactionId) { - this.transactionId = transactionId; - return this; - } + public void setValidatorStatus(ValidatorStatus validatorStatus) { + this.validatorStatus = validatorStatus; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public static class Builder { + private String transactionId; + + private String validatorAddress; - public Builder validatorStatus(ValidatorStatus validatorStatus) { - this.validatorStatus = validatorStatus; - return this; - } + private ValidatorStatus validatorStatus; - public TransactionValidator build() { - return new TransactionValidator(this); - } + public Builder transactionId(String transactionId) { + this.transactionId = transactionId; + return this; } -} + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } + + public Builder validatorStatus(ValidatorStatus validatorStatus) { + this.validatorStatus = validatorStatus; + return this; + } + + public TransactionValidator build() { + return new TransactionValidator(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/TransferLocation.java b/src/main/java/com/coinbase/prime/model/TransferLocation.java index 59d11ae..5bcea1a 100644 --- a/src/main/java/com/coinbase/prime/model/TransferLocation.java +++ b/src/main/java/com/coinbase/prime/model/TransferLocation.java @@ -17,106 +17,103 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.TransferLocationType; import com.fasterxml.jackson.annotation.JsonProperty; public class TransferLocation { - /** - * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value - * - PAYMENT_METHOD: The ID of a fiat payment method - * - WALLET: The ID of a wallet - * - ADDRESS: A cryptocurrency address - * - OTHER: Another type of transfer location: Blockchain Network, Coinbase - * - MULTIPLE_ADDRESSES: Multiple cryptocurrency addresses - * - COUNTERPARTY_ID: Counterparty ID - */ + /** + * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value - PAYMENT_METHOD: The ID of a fiat payment + * method - WALLET: The ID of a wallet - ADDRESS: A cryptocurrency address - OTHER: Another type + * of transfer location: Blockchain Network, Coinbase - MULTIPLE_ADDRESSES: Multiple + * cryptocurrency addresses - COUNTERPARTY_ID: Counterparty ID + */ + private TransferLocationType type; + + /** The value of the transfer location: payment method ID, wallet ID or crypto address */ + private String value; + + /** The crypto address of the transfer location */ + private String address; + + /** + * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) + */ + @JsonProperty("account_identifier") + private String accountIdentifier; + + public TransferLocation() {} + + public TransferLocation(Builder builder) { + this.type = builder.type; + this.value = builder.value; + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + } + + public TransferLocationType getType() { + return type; + } + + public void setType(TransferLocationType type) { + this.type = type; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAccountIdentifier() { + return accountIdentifier; + } + + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } + + public static class Builder { private TransferLocationType type; - /** - * The value of the transfer location: payment method ID, wallet ID or crypto address - */ private String value; - /** - * The crypto address of the transfer location - */ private String address; - /** - * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) - */ - @JsonProperty("account_identifier") private String accountIdentifier; - public TransferLocation() { + public Builder type(TransferLocationType type) { + this.type = type; + return this; } - public TransferLocation(Builder builder) { - this.type = builder.type; - this.value = builder.value; - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - } - public TransferLocationType getType() { - return type; + public Builder value(String value) { + this.value = value; + return this; } - public void setType(TransferLocationType type) { - this.type = type; - } - public String getValue() { - return value; + public Builder address(String address) { + this.address = address; + return this; } - public void setValue(String value) { - this.value = value; - } - public String getAddress() { - return address; + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; } - public void setAddress(String address) { - this.address = address; - } - public String getAccountIdentifier() { - return accountIdentifier; - } - - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } - public static class Builder { - private TransferLocationType type; - - private String value; - - private String address; - - private String accountIdentifier; - - public Builder type(TransferLocationType type) { - this.type = type; - return this; - } - - public Builder value(String value) { - this.value = value; - return this; - } - - public Builder address(String address) { - this.address = address; - return this; - } - - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; - } - - public TransferLocation build() { - return new TransferLocation(this); - } + public TransferLocation build() { + return new TransferLocation(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleData.java b/src/main/java/com/coinbase/prime/model/TravelRuleData.java index 5ace1a6..6a7b8e7 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleData.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleData.java @@ -17,136 +17,140 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.TravelRuleParty; + import com.fasterxml.jackson.annotation.JsonProperty; /** Data object used for withdrawals. */ public class TravelRuleData { - /** Represents a party in a travel rule transfer (originator or beneficiary). */ + /** Represents a party in a travel rule transfer (originator or beneficiary). */ + private TravelRuleParty beneficiary; + + /** Represents a party in a travel rule transfer (originator or beneficiary). */ + private TravelRuleParty originator; + + /** True if user owns the counterparty address (self-transfer) */ + @JsonProperty("is_self") + private boolean isSelf; + + /** True if Coinbase is being used as an intermediary for a customer transfer. */ + @JsonProperty("is_intermediary") + private boolean isIntermediary; + + /** True to skip wallet ownership verification */ + @JsonProperty("opt_out_of_ownership_verification") + private boolean optOutOfOwnershipVerification; + + /** + * Whether the originating VASP attests to verified wallet ownership. When true with + * is_intermediary, enables automatic VASP data enrichment from the legal entity. + */ + @JsonProperty("attest_verified_wallet_ownership") + private boolean attestVerifiedWalletOwnership; + + public TravelRuleData() {} + + public TravelRuleData(Builder builder) { + this.beneficiary = builder.beneficiary; + this.originator = builder.originator; + this.isSelf = builder.isSelf; + this.isIntermediary = builder.isIntermediary; + this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; + this.attestVerifiedWalletOwnership = builder.attestVerifiedWalletOwnership; + } + + public TravelRuleParty getBeneficiary() { + return beneficiary; + } + + public void setBeneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + } + + public TravelRuleParty getOriginator() { + return originator; + } + + public void setOriginator(TravelRuleParty originator) { + this.originator = originator; + } + + public boolean getIsSelf() { + return isSelf; + } + + public void setIsSelf(boolean isSelf) { + this.isSelf = isSelf; + } + + public boolean getIsIntermediary() { + return isIntermediary; + } + + public void setIsIntermediary(boolean isIntermediary) { + this.isIntermediary = isIntermediary; + } + + public boolean getOptOutOfOwnershipVerification() { + return optOutOfOwnershipVerification; + } + + public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + } + + public boolean getAttestVerifiedWalletOwnership() { + return attestVerifiedWalletOwnership; + } + + public void setAttestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { + this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; + } + + public static class Builder { private TravelRuleParty beneficiary; - /** Represents a party in a travel rule transfer (originator or beneficiary). */ private TravelRuleParty originator; - /** True if user owns the counterparty address (self-transfer) */ - @JsonProperty("is_self") private boolean isSelf; - /** - * True if Coinbase is being used as an intermediary for a customer transfer. - */ - @JsonProperty("is_intermediary") private boolean isIntermediary; - /** True to skip wallet ownership verification */ - @JsonProperty("opt_out_of_ownership_verification") private boolean optOutOfOwnershipVerification; - /** - * Whether the originating VASP attests to verified wallet ownership. When true with is_intermediary, enables automatic VASP data enrichment from the legal entity. - */ - @JsonProperty("attest_verified_wallet_ownership") private boolean attestVerifiedWalletOwnership; - public TravelRuleData() { - } - - public TravelRuleData(Builder builder) { - this.beneficiary = builder.beneficiary; - this.originator = builder.originator; - this.isSelf = builder.isSelf; - this.isIntermediary = builder.isIntermediary; - this.optOutOfOwnershipVerification = builder.optOutOfOwnershipVerification; - this.attestVerifiedWalletOwnership = builder.attestVerifiedWalletOwnership; - } - public TravelRuleParty getBeneficiary() { - return beneficiary; + public Builder beneficiary(TravelRuleParty beneficiary) { + this.beneficiary = beneficiary; + return this; } - public void setBeneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - } - public TravelRuleParty getOriginator() { - return originator; + public Builder originator(TravelRuleParty originator) { + this.originator = originator; + return this; } - public void setOriginator(TravelRuleParty originator) { - this.originator = originator; - } - public boolean getIsSelf() { - return isSelf; + public Builder isSelf(boolean isSelf) { + this.isSelf = isSelf; + return this; } - public void setIsSelf(boolean isSelf) { - this.isSelf = isSelf; - } - public boolean getIsIntermediary() { - return isIntermediary; + public Builder isIntermediary(boolean isIntermediary) { + this.isIntermediary = isIntermediary; + return this; } - public void setIsIntermediary(boolean isIntermediary) { - this.isIntermediary = isIntermediary; - } - public boolean getOptOutOfOwnershipVerification() { - return optOutOfOwnershipVerification; + public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { + this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; + return this; } - public void setOptOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - } - public boolean getAttestVerifiedWalletOwnership() { - return attestVerifiedWalletOwnership; + public Builder attestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { + this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; + return this; } - public void setAttestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { - this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; - } - public static class Builder { - private TravelRuleParty beneficiary; - - private TravelRuleParty originator; - - private boolean isSelf; - - private boolean isIntermediary; - - private boolean optOutOfOwnershipVerification; - - private boolean attestVerifiedWalletOwnership; - - public Builder beneficiary(TravelRuleParty beneficiary) { - this.beneficiary = beneficiary; - return this; - } - - public Builder originator(TravelRuleParty originator) { - this.originator = originator; - return this; - } - - public Builder isSelf(boolean isSelf) { - this.isSelf = isSelf; - return this; - } - - public Builder isIntermediary(boolean isIntermediary) { - this.isIntermediary = isIntermediary; - return this; - } - - public Builder optOutOfOwnershipVerification(boolean optOutOfOwnershipVerification) { - this.optOutOfOwnershipVerification = optOutOfOwnershipVerification; - return this; - } - - public Builder attestVerifiedWalletOwnership(boolean attestVerifiedWalletOwnership) { - this.attestVerifiedWalletOwnership = attestVerifiedWalletOwnership; - return this; - } - - public TravelRuleData build() { - return new TravelRuleData(this); - } + public TravelRuleData build() { + return new TravelRuleData(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java index b1c956d..b401be3 100644 --- a/src/main/java/com/coinbase/prime/model/TravelRuleParty.java +++ b/src/main/java/com/coinbase/prime/model/TravelRuleParty.java @@ -17,231 +17,231 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.DetailedAddress; -import com.coinbase.prime.model.NaturalPersonName; + import com.coinbase.prime.model.enums.TravelRuleWalletType; -import com.coinbase.prime.model.DateOfBirth; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a party in a travel rule transfer (originator or beneficiary). */ public class TravelRuleParty { - /** Legal name (for entities or simple name format) */ + /** Legal name (for entities or simple name format) */ + private String name; + + /** Natural person name components */ + @JsonProperty("natural_person_name") + private NaturalPersonName naturalPersonName; + + /** Detailed address information */ + private DetailedAddress address; + + /** + * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type - + * TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet - + * TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet + */ + @JsonProperty("wallet_type") + private TravelRuleWalletType walletType; + + /** VASP identifier when wallet_type is VASP */ + @JsonProperty("vasp_id") + private String vaspId; + + /** VASP name fallback when vasp_id is unknown */ + @JsonProperty("vasp_name") + private String vaspName; + + /** + * Personal identifier for travel rule compliance. For individuals: passport number, national ID, + * driver's license. For institutions: LEI (Legal Entity Identifier). + */ + @JsonProperty("personal_id") + private String personalId; + + /** + * * 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; + + /** Telephone number for contact purposes. */ + @JsonProperty("telephone_number") + private String telephoneNumber; + + /** Account identifier for travel rule compliance. If not provided, defaults to portfolio ID. */ + @JsonProperty("account_id") + private String accountId; + + public TravelRuleParty() {} + + public TravelRuleParty(Builder builder) { + this.name = builder.name; + this.naturalPersonName = builder.naturalPersonName; + this.address = builder.address; + this.walletType = builder.walletType; + this.vaspId = builder.vaspId; + this.vaspName = builder.vaspName; + this.personalId = builder.personalId; + this.dateOfBirth = builder.dateOfBirth; + this.telephoneNumber = builder.telephoneNumber; + this.accountId = builder.accountId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public NaturalPersonName getNaturalPersonName() { + return naturalPersonName; + } + + public void setNaturalPersonName(NaturalPersonName naturalPersonName) { + this.naturalPersonName = naturalPersonName; + } + + public DetailedAddress getAddress() { + return address; + } + + public void setAddress(DetailedAddress address) { + this.address = address; + } + + public TravelRuleWalletType getWalletType() { + return walletType; + } + + public void setWalletType(TravelRuleWalletType walletType) { + this.walletType = walletType; + } + + public String getVaspId() { + return vaspId; + } + + public void setVaspId(String vaspId) { + this.vaspId = vaspId; + } + + public String getVaspName() { + return vaspName; + } + + public void setVaspName(String vaspName) { + this.vaspName = vaspName; + } + + public String getPersonalId() { + return personalId; + } + + public void setPersonalId(String personalId) { + this.personalId = personalId; + } + + public DateOfBirth getDateOfBirth() { + return dateOfBirth; + } + + public void setDateOfBirth(DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public String getTelephoneNumber() { + return telephoneNumber; + } + + public void setTelephoneNumber(String telephoneNumber) { + this.telephoneNumber = telephoneNumber; + } + + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } + + public static class Builder { private String name; - /** Natural person name components */ - @JsonProperty("natural_person_name") private NaturalPersonName naturalPersonName; - /** Detailed address information */ private DetailedAddress address; - /** - * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type - * - TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet - * - TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet - */ - @JsonProperty("wallet_type") private TravelRuleWalletType walletType; - /** VASP identifier when wallet_type is VASP */ - @JsonProperty("vasp_id") private String vaspId; - /** VASP name fallback when vasp_id is unknown */ - @JsonProperty("vasp_name") private String vaspName; - /** - * Personal identifier for travel rule compliance. For individuals: passport number, national ID, driver's license. For institutions: LEI (Legal Entity Identifier). - */ - @JsonProperty("personal_id") private String personalId; - /** - * * 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; - /** - * Telephone number for contact purposes. - */ - @JsonProperty("telephone_number") private String telephoneNumber; - /** - * Account identifier for travel rule compliance. If not provided, defaults to portfolio ID. - */ - @JsonProperty("account_id") private String accountId; - public TravelRuleParty() { + public Builder name(String name) { + this.name = name; + return this; } - public TravelRuleParty(Builder builder) { - this.name = builder.name; - this.naturalPersonName = builder.naturalPersonName; - this.address = builder.address; - this.walletType = builder.walletType; - this.vaspId = builder.vaspId; - this.vaspName = builder.vaspName; - this.personalId = builder.personalId; - this.dateOfBirth = builder.dateOfBirth; - this.telephoneNumber = builder.telephoneNumber; - this.accountId = builder.accountId; - } - public String getName() { - return name; + public Builder naturalPersonName(NaturalPersonName naturalPersonName) { + this.naturalPersonName = naturalPersonName; + return this; } - public void setName(String name) { - this.name = name; - } - public NaturalPersonName getNaturalPersonName() { - return naturalPersonName; + public Builder address(DetailedAddress address) { + this.address = address; + return this; } - public void setNaturalPersonName(NaturalPersonName naturalPersonName) { - this.naturalPersonName = naturalPersonName; - } - public DetailedAddress getAddress() { - return address; + public Builder walletType(TravelRuleWalletType walletType) { + this.walletType = walletType; + return this; } - public void setAddress(DetailedAddress address) { - this.address = address; - } - public TravelRuleWalletType getWalletType() { - return walletType; + public Builder vaspId(String vaspId) { + this.vaspId = vaspId; + return this; } - public void setWalletType(TravelRuleWalletType walletType) { - this.walletType = walletType; - } - public String getVaspId() { - return vaspId; - } - - public void setVaspId(String vaspId) { - this.vaspId = vaspId; - } - public String getVaspName() { - return vaspName; + public Builder vaspName(String vaspName) { + this.vaspName = vaspName; + return this; } - public void setVaspName(String vaspName) { - this.vaspName = vaspName; - } - public String getPersonalId() { - return personalId; + public Builder personalId(String personalId) { + this.personalId = personalId; + return this; } - public void setPersonalId(String personalId) { - this.personalId = personalId; - } - public DateOfBirth getDateOfBirth() { - return dateOfBirth; + public Builder dateOfBirth(DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; } - public void setDateOfBirth(DateOfBirth dateOfBirth) { - this.dateOfBirth = dateOfBirth; - } - public String getTelephoneNumber() { - return telephoneNumber; + public Builder telephoneNumber(String telephoneNumber) { + this.telephoneNumber = telephoneNumber; + return this; } - public void setTelephoneNumber(String telephoneNumber) { - this.telephoneNumber = telephoneNumber; - } - public String getAccountId() { - return accountId; + public Builder accountId(String accountId) { + this.accountId = accountId; + return this; } - public void setAccountId(String accountId) { - this.accountId = accountId; - } - public static class Builder { - private String name; - - private NaturalPersonName naturalPersonName; - - private DetailedAddress address; - - private TravelRuleWalletType walletType; - - private String vaspId; - - private String vaspName; - - private String personalId; - - private DateOfBirth dateOfBirth; - - private String telephoneNumber; - - private String accountId; - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder naturalPersonName(NaturalPersonName naturalPersonName) { - this.naturalPersonName = naturalPersonName; - return this; - } - - public Builder address(DetailedAddress address) { - this.address = address; - return this; - } - - public Builder walletType(TravelRuleWalletType walletType) { - this.walletType = walletType; - return this; - } - - public Builder vaspId(String vaspId) { - this.vaspId = vaspId; - return this; - } - - public Builder vaspName(String vaspName) { - this.vaspName = vaspName; - return this; - } - - public Builder personalId(String personalId) { - this.personalId = personalId; - return this; - } - - public Builder dateOfBirth(DateOfBirth dateOfBirth) { - this.dateOfBirth = dateOfBirth; - return this; - } - - public Builder telephoneNumber(String telephoneNumber) { - this.telephoneNumber = telephoneNumber; - return this; - } - - public Builder accountId(String accountId) { - this.accountId = accountId; - return this; - } - - public TravelRuleParty build() { - return new TravelRuleParty(this); - } + public TravelRuleParty build() { + return new TravelRuleParty(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java index b948ca7..e73f531 100644 --- a/src/main/java/com/coinbase/prime/model/UnstakingStatus.java +++ b/src/main/java/com/coinbase/prime/model/UnstakingStatus.java @@ -17,161 +17,158 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.EstimateType; import com.coinbase.prime.model.enums.UnstakeType; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class UnstakingStatus { - /** - * Amount being unstaked (whole amount, e.g., 16 ETH) - */ - private String amount; + /** Amount being unstaked (whole amount, e.g., 16 ETH) */ + private String amount; - @JsonProperty("unstake_type") - private UnstakeType unstakeType; + @JsonProperty("unstake_type") + private UnstakeType unstakeType; - /** - * Estimated date when unstaking will complete (ISO 8601 format) - */ - @JsonProperty("finishing_at") - private OffsetDateTime finishingAt; + /** Estimated date when unstaking will complete (ISO 8601 format) */ + @JsonProperty("finishing_at") + private OffsetDateTime finishingAt; - /** - * Estimated hours until this unstaking request completes - */ - @JsonProperty("remaining_hours") - private Long remainingHours; + /** Estimated hours until this unstaking request completes */ + @JsonProperty("remaining_hours") + private Long remainingHours; - /** - * Timestamp when the unstake request was originally created - */ - @JsonProperty("requested_at") - private OffsetDateTime requestedAt; + /** Timestamp when the unstake request was originally created */ + @JsonProperty("requested_at") + private OffsetDateTime requestedAt; - @JsonProperty("estimate_type") - private EstimateType estimateType; + @JsonProperty("estimate_type") + private EstimateType estimateType; - /** - * Detailed explanation of the estimate status for display to users. - */ - @JsonProperty("estimate_description") - private String estimateDescription; + /** Detailed explanation of the estimate status for display to users. */ + @JsonProperty("estimate_description") + private String estimateDescription; - public UnstakingStatus() { - } + public UnstakingStatus() {} - public UnstakingStatus(Builder builder) { - this.amount = builder.amount; - this.unstakeType = builder.unstakeType; - this.finishingAt = builder.finishingAt; - this.remainingHours = builder.remainingHours; - this.requestedAt = builder.requestedAt; - this.estimateType = builder.estimateType; - this.estimateDescription = builder.estimateDescription; - } - public String getAmount() { - return amount; - } + public UnstakingStatus(Builder builder) { + this.amount = builder.amount; + this.unstakeType = builder.unstakeType; + this.finishingAt = builder.finishingAt; + this.remainingHours = builder.remainingHours; + this.requestedAt = builder.requestedAt; + this.estimateType = builder.estimateType; + this.estimateDescription = builder.estimateDescription; + } - public void setAmount(String amount) { - this.amount = amount; - } - public UnstakeType getUnstakeType() { - return unstakeType; - } + public String getAmount() { + return amount; + } - public void setUnstakeType(UnstakeType unstakeType) { - this.unstakeType = unstakeType; - } - public OffsetDateTime getFinishingAt() { - return finishingAt; - } + public void setAmount(String amount) { + this.amount = amount; + } - public void setFinishingAt(OffsetDateTime finishingAt) { - this.finishingAt = finishingAt; - } - public Long getRemainingHours() { - return remainingHours; - } + public UnstakeType getUnstakeType() { + return unstakeType; + } - public void setRemainingHours(Long remainingHours) { - this.remainingHours = remainingHours; - } - public OffsetDateTime getRequestedAt() { - return requestedAt; - } + public void setUnstakeType(UnstakeType unstakeType) { + this.unstakeType = unstakeType; + } - public void setRequestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - } - public EstimateType getEstimateType() { - return estimateType; - } + public OffsetDateTime getFinishingAt() { + return finishingAt; + } - public void setEstimateType(EstimateType estimateType) { - this.estimateType = estimateType; - } - public String getEstimateDescription() { - return estimateDescription; - } + public void setFinishingAt(OffsetDateTime finishingAt) { + this.finishingAt = finishingAt; + } - public void setEstimateDescription(String estimateDescription) { - this.estimateDescription = estimateDescription; - } - public static class Builder { - private String amount; + public Long getRemainingHours() { + return remainingHours; + } - private UnstakeType unstakeType; + public void setRemainingHours(Long remainingHours) { + this.remainingHours = remainingHours; + } - private OffsetDateTime finishingAt; + public OffsetDateTime getRequestedAt() { + return requestedAt; + } - private Long remainingHours; + public void setRequestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + } - private OffsetDateTime requestedAt; + public EstimateType getEstimateType() { + return estimateType; + } - private EstimateType estimateType; + public void setEstimateType(EstimateType estimateType) { + this.estimateType = estimateType; + } - private String estimateDescription; + public String getEstimateDescription() { + return estimateDescription; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public void setEstimateDescription(String estimateDescription) { + this.estimateDescription = estimateDescription; + } - public Builder unstakeType(UnstakeType unstakeType) { - this.unstakeType = unstakeType; - return this; - } + public static class Builder { + private String amount; + + private UnstakeType unstakeType; - public Builder finishingAt(OffsetDateTime finishingAt) { - this.finishingAt = finishingAt; - return this; - } + private OffsetDateTime finishingAt; + + private Long remainingHours; - public Builder remainingHours(Long remainingHours) { - this.remainingHours = remainingHours; - return this; - } + private OffsetDateTime requestedAt; - public Builder requestedAt(OffsetDateTime requestedAt) { - this.requestedAt = requestedAt; - return this; - } + private EstimateType estimateType; - public Builder estimateType(EstimateType estimateType) { - this.estimateType = estimateType; - return this; - } + private String estimateDescription; - public Builder estimateDescription(String estimateDescription) { - this.estimateDescription = estimateDescription; - return this; - } + public Builder amount(String amount) { + this.amount = amount; + return this; + } - public UnstakingStatus build() { - return new UnstakingStatus(this); - } + public Builder unstakeType(UnstakeType unstakeType) { + this.unstakeType = unstakeType; + return this; } -} + public Builder finishingAt(OffsetDateTime finishingAt) { + this.finishingAt = finishingAt; + return this; + } + + public Builder remainingHours(Long remainingHours) { + this.remainingHours = remainingHours; + return this; + } + + public Builder requestedAt(OffsetDateTime requestedAt) { + this.requestedAt = requestedAt; + return this; + } + + public Builder estimateType(EstimateType estimateType) { + this.estimateType = estimateType; + return this; + } + + public Builder estimateDescription(String estimateDescription) { + this.estimateDescription = estimateDescription; + return this; + } + + public UnstakingStatus build() { + return new UnstakingStatus(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/UserAction.java b/src/main/java/com/coinbase/prime/model/UserAction.java index e86fbed..1df1943 100644 --- a/src/main/java/com/coinbase/prime/model/UserAction.java +++ b/src/main/java/com/coinbase/prime/model/UserAction.java @@ -17,78 +17,77 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.Action; import com.fasterxml.jackson.annotation.JsonProperty; public class UserAction { - /** Action is the available user action types */ - private Action action; + /** Action is the available user action types */ + private Action action; - /** - * Id of the user who executed the action - */ - @JsonProperty("user_id") - private String userId; + /** Id of the user who executed the action */ + @JsonProperty("user_id") + private String userId; - /** - * Time the action was taken - */ - private String timestamp; + /** Time the action was taken */ + private String timestamp; - public UserAction() { - } + public UserAction() {} - public UserAction(Builder builder) { - this.action = builder.action; - this.userId = builder.userId; - this.timestamp = builder.timestamp; - } - public Action getAction() { - return action; - } + public UserAction(Builder builder) { + this.action = builder.action; + this.userId = builder.userId; + this.timestamp = builder.timestamp; + } - public void setAction(Action action) { - this.action = action; - } - public String getUserId() { - return userId; - } + public Action getAction() { + return action; + } - public void setUserId(String userId) { - this.userId = userId; - } - public String getTimestamp() { - return timestamp; - } + public void setAction(Action action) { + this.action = action; + } - public void setTimestamp(String timestamp) { - this.timestamp = timestamp; - } - public static class Builder { - private Action action; + public String getUserId() { + return userId; + } - private String userId; + public void setUserId(String userId) { + this.userId = userId; + } - private String timestamp; + public String getTimestamp() { + return timestamp; + } - public Builder action(Action action) { - this.action = action; - return this; - } + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } - public Builder userId(String userId) { - this.userId = userId; - return this; - } + public static class Builder { + private Action action; + + private String userId; - public Builder timestamp(String timestamp) { - this.timestamp = timestamp; - return this; - } + private String timestamp; - public UserAction build() { - return new UserAction(this); - } + public Builder action(Action action) { + this.action = action; + return this; } -} + public Builder userId(String userId) { + this.userId = userId; + return this; + } + + public Builder timestamp(String timestamp) { + this.timestamp = timestamp; + return this; + } + + public UserAction build() { + return new UserAction(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java index f0d68e1..3c488fe 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorAllocation.java @@ -17,63 +17,61 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** - * ValidatorAllocation specifies the validator and amount for staking or unstaking. - * Used for granular ETH V2 validator-level staking or unstaking operations. + * ValidatorAllocation specifies the validator and amount for staking or unstaking. Used for + * granular ETH V2 validator-level staking or unstaking operations. */ public class ValidatorAllocation { - /** - * The validator address for performing staking operations - */ - @JsonProperty("validator_address") - private String validatorAddress; + /** The validator address for performing staking operations */ + @JsonProperty("validator_address") + private String validatorAddress; - /** - * Amount for performing staking operations with this validator - */ - private String amount; + /** Amount for performing staking operations with this validator */ + private String amount; - public ValidatorAllocation() { - } + public ValidatorAllocation() {} - public ValidatorAllocation(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.amount = builder.amount; - } - public String getValidatorAddress() { - return validatorAddress; - } + public ValidatorAllocation(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.amount = builder.amount; + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - public String getAmount() { - return amount; - } + public String getValidatorAddress() { + return validatorAddress; + } - public void setAmount(String amount) { - this.amount = amount; - } - public static class Builder { - private String validatorAddress; + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } - private String amount; + public String getAmount() { + return amount; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public void setAmount(String amount) { + this.amount = amount; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public static class Builder { + private String validatorAddress; + + private String amount; - public ValidatorAllocation build() { - return new ValidatorAllocation(this); - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public ValidatorAllocation build() { + return new ValidatorAllocation(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java index 7540329..448437d 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorStakingInfo.java @@ -17,61 +17,58 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.StakingStatus; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class ValidatorStakingInfo { - /** - * The validator address (public key) - */ - @JsonProperty("validator_address") - private String validatorAddress; + /** The validator address (public key) */ + @JsonProperty("validator_address") + private String validatorAddress; - /** - * List of active staking requests for this validator - */ - private List statuses; + /** List of active staking requests for this validator */ + private List statuses; - public ValidatorStakingInfo() { - } + public ValidatorStakingInfo() {} - public ValidatorStakingInfo(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.statuses = builder.statuses; - } - public String getValidatorAddress() { - return validatorAddress; - } + public ValidatorStakingInfo(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.statuses = builder.statuses; + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - public List getStatuses() { - return statuses; - } + public String getValidatorAddress() { + return validatorAddress; + } - public void setStatuses(List statuses) { - this.statuses = statuses; - } - public static class Builder { - private String validatorAddress; + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } - private List statuses; + public List getStatuses() { + return statuses; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public void setStatuses(List statuses) { + this.statuses = statuses; + } - public Builder statuses(List statuses) { - this.statuses = statuses; - return this; - } + public static class Builder { + private String validatorAddress; + + private List statuses; - public ValidatorStakingInfo build() { - return new ValidatorStakingInfo(this); - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; } -} + public Builder statuses(List statuses) { + this.statuses = statuses; + return this; + } + + public ValidatorStakingInfo build() { + return new ValidatorStakingInfo(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java b/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java index f610b1c..982a0d1 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorUnstakePreview.java @@ -17,103 +17,99 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** ValidatorUnstakePreview contains the per-validator breakdown for an unstake preview. */ public class ValidatorUnstakePreview { - /** - * Public address of the validator being unstaked from - */ - @JsonProperty("validator_address") - private String validatorAddress; + /** Public address of the validator being unstaked from */ + @JsonProperty("validator_address") + private String validatorAddress; - /** - * Estimated amount that would be unstaked from this validator (in ETH) - */ - @JsonProperty("estimated_unstaking_amount") - private String estimatedUnstakingAmount; + /** Estimated amount that would be unstaked from this validator (in ETH) */ + @JsonProperty("estimated_unstaking_amount") + private String estimatedUnstakingAmount; - /** - * Estimated time until this validator's unstake completes, in hours - */ - @JsonProperty("unstake_time_estimate_in_hours") - private Double unstakeTimeEstimateInHours; + /** Estimated time until this validator's unstake completes, in hours */ + @JsonProperty("unstake_time_estimate_in_hours") + private Double unstakeTimeEstimateInHours; - /** - * Estimated date when this validator's unstake will complete (ISO 8601) - */ - @JsonProperty("estimated_unstake_date") - private String estimatedUnstakeDate; + /** Estimated date when this validator's unstake will complete (ISO 8601) */ + @JsonProperty("estimated_unstake_date") + private String estimatedUnstakeDate; - public ValidatorUnstakePreview() { - } + public ValidatorUnstakePreview() {} - public ValidatorUnstakePreview(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.estimatedUnstakingAmount = builder.estimatedUnstakingAmount; - this.unstakeTimeEstimateInHours = builder.unstakeTimeEstimateInHours; - this.estimatedUnstakeDate = builder.estimatedUnstakeDate; - } - public String getValidatorAddress() { - return validatorAddress; - } + public ValidatorUnstakePreview(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.estimatedUnstakingAmount = builder.estimatedUnstakingAmount; + this.unstakeTimeEstimateInHours = builder.unstakeTimeEstimateInHours; + this.estimatedUnstakeDate = builder.estimatedUnstakeDate; + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - public String getEstimatedUnstakingAmount() { - return estimatedUnstakingAmount; - } + public String getValidatorAddress() { + return validatorAddress; + } - public void setEstimatedUnstakingAmount(String estimatedUnstakingAmount) { - this.estimatedUnstakingAmount = estimatedUnstakingAmount; - } - public Double getUnstakeTimeEstimateInHours() { - return unstakeTimeEstimateInHours; - } + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } - public void setUnstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { - this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; - } - public String getEstimatedUnstakeDate() { - return estimatedUnstakeDate; - } + public String getEstimatedUnstakingAmount() { + return estimatedUnstakingAmount; + } - public void setEstimatedUnstakeDate(String estimatedUnstakeDate) { - this.estimatedUnstakeDate = estimatedUnstakeDate; - } - public static class Builder { - private String validatorAddress; + public void setEstimatedUnstakingAmount(String estimatedUnstakingAmount) { + this.estimatedUnstakingAmount = estimatedUnstakingAmount; + } - private String estimatedUnstakingAmount; + public Double getUnstakeTimeEstimateInHours() { + return unstakeTimeEstimateInHours; + } - private Double unstakeTimeEstimateInHours; + public void setUnstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { + this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; + } - private String estimatedUnstakeDate; + public String getEstimatedUnstakeDate() { + return estimatedUnstakeDate; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public void setEstimatedUnstakeDate(String estimatedUnstakeDate) { + this.estimatedUnstakeDate = estimatedUnstakeDate; + } - public Builder estimatedUnstakingAmount(String estimatedUnstakingAmount) { - this.estimatedUnstakingAmount = estimatedUnstakingAmount; - return this; - } + public static class Builder { + private String validatorAddress; - public Builder unstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { - this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; - return this; - } + private String estimatedUnstakingAmount; - public Builder estimatedUnstakeDate(String estimatedUnstakeDate) { - this.estimatedUnstakeDate = estimatedUnstakeDate; - return this; - } + private Double unstakeTimeEstimateInHours; - public ValidatorUnstakePreview build() { - return new ValidatorUnstakePreview(this); - } + private String estimatedUnstakeDate; + + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } + + public Builder estimatedUnstakingAmount(String estimatedUnstakingAmount) { + this.estimatedUnstakingAmount = estimatedUnstakingAmount; + return this; + } + + public Builder unstakeTimeEstimateInHours(Double unstakeTimeEstimateInHours) { + this.unstakeTimeEstimateInHours = unstakeTimeEstimateInHours; + return this; } -} + public Builder estimatedUnstakeDate(String estimatedUnstakeDate) { + this.estimatedUnstakeDate = estimatedUnstakeDate; + return this; + } + + public ValidatorUnstakePreview build() { + return new ValidatorUnstakePreview(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java index 074da63..7a2698c 100644 --- a/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java +++ b/src/main/java/com/coinbase/prime/model/ValidatorUnstakingInfo.java @@ -17,61 +17,58 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.UnstakingStatus; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; public class ValidatorUnstakingInfo { - /** - * The validator address (public key) - */ - @JsonProperty("validator_address") - private String validatorAddress; + /** The validator address (public key) */ + @JsonProperty("validator_address") + private String validatorAddress; - /** - * List of active unstaking requests for this validator - */ - private List statuses; + /** List of active unstaking requests for this validator */ + private List statuses; - public ValidatorUnstakingInfo() { - } + public ValidatorUnstakingInfo() {} - public ValidatorUnstakingInfo(Builder builder) { - this.validatorAddress = builder.validatorAddress; - this.statuses = builder.statuses; - } - public String getValidatorAddress() { - return validatorAddress; - } + public ValidatorUnstakingInfo(Builder builder) { + this.validatorAddress = builder.validatorAddress; + this.statuses = builder.statuses; + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - public List getStatuses() { - return statuses; - } + public String getValidatorAddress() { + return validatorAddress; + } - public void setStatuses(List statuses) { - this.statuses = statuses; - } - public static class Builder { - private String validatorAddress; + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } - private List statuses; + public List getStatuses() { + return statuses; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public void setStatuses(List statuses) { + this.statuses = statuses; + } - public Builder statuses(List statuses) { - this.statuses = statuses; - return this; - } + public static class Builder { + private String validatorAddress; + + private List statuses; - public ValidatorUnstakingInfo build() { - return new ValidatorUnstakingInfo(this); - } + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; } -} + public Builder statuses(List statuses) { + this.statuses = statuses; + return this; + } + + public ValidatorUnstakingInfo build() { + return new ValidatorUnstakingInfo(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/Wallet.java b/src/main/java/com/coinbase/prime/model/Wallet.java index e0ec10f..3cb886e 100644 --- a/src/main/java/com/coinbase/prime/model/Wallet.java +++ b/src/main/java/com/coinbase/prime/model/Wallet.java @@ -17,171 +17,175 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.Network; + import com.coinbase.prime.model.enums.WalletType; import com.coinbase.prime.model.enums.WalletVisibility; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; public class Wallet { - /** The unique UUID for the wallet */ - private String id; + /** The unique UUID for the wallet */ + private String id; - /** The name of the wallet */ - private String name; + /** The name of the wallet */ + private String name; - /** The asset stored in the wallet */ - private String symbol; + /** The asset stored in the wallet */ + 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 - */ - private WalletType type; + /** + * - 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 + */ + private WalletType type; - /** The UTC timestamp when this wallet was created */ - @JsonProperty("created_at") - private OffsetDateTime createdAt; + /** The UTC timestamp when this wallet was created */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; - /** The active address of the wallet */ - private String address; + /** The active address of the wallet */ + private String address; - private WalletVisibility visibility; + private WalletVisibility visibility; - private Network network; + private Network network; - public Wallet() { - } + public Wallet() {} - public Wallet(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.symbol = builder.symbol; - this.type = builder.type; - this.createdAt = builder.createdAt; - this.address = builder.address; - this.visibility = builder.visibility; - this.network = builder.network; - } - public String getId() { - return id; - } + public Wallet(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.symbol = builder.symbol; + this.type = builder.type; + this.createdAt = builder.createdAt; + this.address = builder.address; + this.visibility = builder.visibility; + this.network = builder.network; + } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; - } + public String getId() { + return id; + } - public void setName(String name) { - this.name = name; - } - public String getSymbol() { - return symbol; - } + public void setId(String id) { + this.id = id; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public WalletType getType() { - return type; - } + public String getName() { + return name; + } - public void setType(WalletType type) { - this.type = type; - } - public OffsetDateTime getCreatedAt() { - return createdAt; - } + public void setName(String name) { + this.name = name; + } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - public String getAddress() { - return address; - } + public String getSymbol() { + return symbol; + } - public void setAddress(String address) { - this.address = address; - } - public WalletVisibility getVisibility() { - return visibility; - } + public void setSymbol(String symbol) { + this.symbol = symbol; + } - public void setVisibility(WalletVisibility visibility) { - this.visibility = visibility; - } - public Network getNetwork() { - return network; - } + public WalletType getType() { + return type; + } - public void setNetwork(Network network) { - this.network = network; - } - public static class Builder { - private String id; + public void setType(WalletType type) { + this.type = type; + } - private String name; + public OffsetDateTime getCreatedAt() { + return createdAt; + } - private String symbol; + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } - private WalletType type; + public String getAddress() { + return address; + } - private OffsetDateTime createdAt; + public void setAddress(String address) { + this.address = address; + } - private String address; + public WalletVisibility getVisibility() { + return visibility; + } - private WalletVisibility visibility; + public void setVisibility(WalletVisibility visibility) { + this.visibility = visibility; + } - private Network network; + public Network getNetwork() { + return network; + } - public Builder id(String id) { - this.id = id; - return this; - } + public void setNetwork(Network network) { + this.network = network; + } - public Builder name(String name) { - this.name = name; - return this; - } + public static class Builder { + private String id; - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + private String name; - public Builder type(WalletType type) { - this.type = type; - return this; - } + private String symbol; - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } + private WalletType type; - public Builder address(String address) { - this.address = address; - return this; - } + private OffsetDateTime createdAt; - public Builder visibility(WalletVisibility visibility) { - this.visibility = visibility; - return this; - } + private String address; - public Builder network(Network network) { - this.network = network; - return this; - } + private WalletVisibility visibility; - public Wallet build() { - return new Wallet(this); - } + private Network network; + + public Builder id(String id) { + this.id = id; + return this; + } + + public Builder name(String name) { + this.name = name; + return this; + } + + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; + } + + public Builder type(WalletType type) { + this.type = type; + return this; + } + + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + public Builder address(String address) { + this.address = address; + return this; } -} + public Builder visibility(WalletVisibility visibility) { + this.visibility = visibility; + return this; + } + + public Builder network(Network network) { + this.network = network; + return this; + } + + public Wallet build() { + return new Wallet(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java index 8919998..91898d1 100644 --- a/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletClaimRewardsInputs.java @@ -23,35 +23,36 @@ * Requirements and supported fields vary by asset type. */ public class WalletClaimRewardsInputs { - /** - * Optional amount to claim rewards (ETH only). If omitted, the wallet will claim the maximum amount available - */ - private String amount; + /** + * Optional amount to claim rewards (ETH only). If omitted, the wallet will claim the maximum + * amount available + */ + private String amount; - public WalletClaimRewardsInputs() { - } + public WalletClaimRewardsInputs() {} - public WalletClaimRewardsInputs(Builder builder) { - this.amount = builder.amount; - } - public String getAmount() { - return amount; - } + public WalletClaimRewardsInputs(Builder builder) { + this.amount = builder.amount; + } - public void setAmount(String amount) { - this.amount = amount; - } - public static class Builder { - private String amount; + public String getAmount() { + return amount; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public void setAmount(String amount) { + this.amount = amount; + } - public WalletClaimRewardsInputs build() { - return new WalletClaimRewardsInputs(this); - } + public static class Builder { + private String amount; + + public Builder amount(String amount) { + this.amount = amount; + return this; } -} + public WalletClaimRewardsInputs build() { + return new WalletClaimRewardsInputs(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java index 71f7ec1..5991653 100644 --- a/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletCryptoDepositInstructions.java @@ -17,164 +17,163 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.Network; + import com.coinbase.prime.model.enums.WalletDepositInstructionType; import com.fasterxml.jackson.annotation.JsonProperty; public class WalletCryptoDepositInstructions { - /** - * The ID of the wallet - */ + /** The ID of the wallet */ + private String id; + + /** The name of the wallet */ + private String name; + + /** + * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - CRYPTO: A cryptocurrency deposit - WIRE: A wire + * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - + * SEPA: A SEPA deposit (Single Euro Payments Area) + */ + private WalletDepositInstructionType type; + + /** The address of the wallet */ + private String address; + + /** + * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) + */ + @JsonProperty("account_identifier") + private String accountIdentifier; + + /** + * 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`) + */ + @JsonProperty("account_identifier_name") + private String accountIdentifierName; + + private Network network; + + public WalletCryptoDepositInstructions() {} + + public WalletCryptoDepositInstructions(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.type = builder.type; + this.address = builder.address; + this.accountIdentifier = builder.accountIdentifier; + this.accountIdentifierName = builder.accountIdentifierName; + this.network = builder.network; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public WalletDepositInstructionType getType() { + return type; + } + + public void setType(WalletDepositInstructionType type) { + this.type = type; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAccountIdentifier() { + return accountIdentifier; + } + + public void setAccountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + } + + public String getAccountIdentifierName() { + return accountIdentifierName; + } + + public void setAccountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + } + + public Network getNetwork() { + return network; + } + + public void setNetwork(Network network) { + this.network = network; + } + + public static class Builder { private String id; - /** - * The name of the wallet - */ private String name; - /** - * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - * - CRYPTO: A cryptocurrency deposit - * - WIRE: A wire deposit - * - SEN: DEPRECATED. A Silvergate Exchange Network deposit - * - SWIFT: A SWIFT deposit - * - SEPA: A SEPA deposit (Single Euro Payments Area) - */ private WalletDepositInstructionType type; - /** - * The address of the wallet - */ private String address; - /** - * The tag/memo of the address, if applicable -- required for certain assets (e.g. XRP, XLM, etc.) - */ - @JsonProperty("account_identifier") private String accountIdentifier; - /** - * 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`) - */ - @JsonProperty("account_identifier_name") private String accountIdentifierName; private Network network; - public WalletCryptoDepositInstructions() { + public Builder id(String id) { + this.id = id; + return this; } - public WalletCryptoDepositInstructions(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.type = builder.type; - this.address = builder.address; - this.accountIdentifier = builder.accountIdentifier; - this.accountIdentifierName = builder.accountIdentifierName; - this.network = builder.network; - } - public String getId() { - return id; + public Builder name(String name) { + this.name = name; + return this; } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; + public Builder type(WalletDepositInstructionType type) { + this.type = type; + return this; } - public void setName(String name) { - this.name = name; - } - public WalletDepositInstructionType getType() { - return type; + public Builder address(String address) { + this.address = address; + return this; } - public void setType(WalletDepositInstructionType type) { - this.type = type; - } - public String getAddress() { - return address; + public Builder accountIdentifier(String accountIdentifier) { + this.accountIdentifier = accountIdentifier; + return this; } - public void setAddress(String address) { - this.address = address; - } - public String getAccountIdentifier() { - return accountIdentifier; + public Builder accountIdentifierName(String accountIdentifierName) { + this.accountIdentifierName = accountIdentifierName; + return this; } - public void setAccountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - } - public String getAccountIdentifierName() { - return accountIdentifierName; + public Builder network(Network network) { + this.network = network; + return this; } - public void setAccountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - } - public Network getNetwork() { - return network; - } - - public void setNetwork(Network network) { - this.network = network; - } - public static class Builder { - private String id; - - private String name; - - private WalletDepositInstructionType type; - - private String address; - - private String accountIdentifier; - - private String accountIdentifierName; - - private Network network; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder type(WalletDepositInstructionType type) { - this.type = type; - return this; - } - - public Builder address(String address) { - this.address = address; - return this; - } - - public Builder accountIdentifier(String accountIdentifier) { - this.accountIdentifier = accountIdentifier; - return this; - } - - public Builder accountIdentifierName(String accountIdentifierName) { - this.accountIdentifierName = accountIdentifierName; - return this; - } - - public Builder network(Network network) { - this.network = network; - return this; - } - - public WalletCryptoDepositInstructions build() { - return new WalletCryptoDepositInstructions(this); - } + public WalletCryptoDepositInstructions build() { + return new WalletCryptoDepositInstructions(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java index 6ca843c..5b8e011 100644 --- a/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java +++ b/src/main/java/com/coinbase/prime/model/WalletFiatDepositInstructions.java @@ -17,137 +17,140 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.WalletDepositInstructionType; import com.fasterxml.jackson.annotation.JsonProperty; public class WalletFiatDepositInstructions { - /** The id of the wallet */ + /** The id of the wallet */ + private String id; + + /** The name of the wallet */ + private String name; + + /** + * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - CRYPTO: A cryptocurrency deposit - WIRE: A wire + * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - + * SEPA: A SEPA deposit (Single Euro Payments Area) + */ + private WalletDepositInstructionType type; + + /** The fiat account number */ + @JsonProperty("account_number") + private String accountNumber; + + /** The fiat routing number */ + @JsonProperty("routing_number") + private String routingNumber; + + /** Reference code to be used as a memo/description */ + @JsonProperty("reference_code") + private String referenceCode; + + public WalletFiatDepositInstructions() {} + + public WalletFiatDepositInstructions(Builder builder) { + this.id = builder.id; + this.name = builder.name; + this.type = builder.type; + this.accountNumber = builder.accountNumber; + this.routingNumber = builder.routingNumber; + this.referenceCode = builder.referenceCode; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public WalletDepositInstructionType getType() { + return type; + } + + public void setType(WalletDepositInstructionType type) { + this.type = type; + } + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + public String getRoutingNumber() { + return routingNumber; + } + + public void setRoutingNumber(String routingNumber) { + this.routingNumber = routingNumber; + } + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public static class Builder { private String id; - /** The name of the wallet */ private String name; - /** - * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - * - CRYPTO: A cryptocurrency deposit - * - WIRE: A wire deposit - * - SEN: DEPRECATED. A Silvergate Exchange Network deposit - * - SWIFT: A SWIFT deposit - * - SEPA: A SEPA deposit (Single Euro Payments Area) - */ private WalletDepositInstructionType type; - /** The fiat account number */ - @JsonProperty("account_number") private String accountNumber; - /** The fiat routing number */ - @JsonProperty("routing_number") private String routingNumber; - /** Reference code to be used as a memo/description */ - @JsonProperty("reference_code") private String referenceCode; - public WalletFiatDepositInstructions() { - } - - public WalletFiatDepositInstructions(Builder builder) { - this.id = builder.id; - this.name = builder.name; - this.type = builder.type; - this.accountNumber = builder.accountNumber; - this.routingNumber = builder.routingNumber; - this.referenceCode = builder.referenceCode; - } - public String getId() { - return id; + public Builder id(String id) { + this.id = id; + return this; } - public void setId(String id) { - this.id = id; - } - public String getName() { - return name; + public Builder name(String name) { + this.name = name; + return this; } - public void setName(String name) { - this.name = name; - } - public WalletDepositInstructionType getType() { - return type; + public Builder type(WalletDepositInstructionType type) { + this.type = type; + return this; } - public void setType(WalletDepositInstructionType type) { - this.type = type; - } - public String getAccountNumber() { - return accountNumber; + public Builder accountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; } - public void setAccountNumber(String accountNumber) { - this.accountNumber = accountNumber; - } - public String getRoutingNumber() { - return routingNumber; + public Builder routingNumber(String routingNumber) { + this.routingNumber = routingNumber; + return this; } - public void setRoutingNumber(String routingNumber) { - this.routingNumber = routingNumber; - } - public String getReferenceCode() { - return referenceCode; + public Builder referenceCode(String referenceCode) { + this.referenceCode = referenceCode; + return this; } - public void setReferenceCode(String referenceCode) { - this.referenceCode = referenceCode; - } - public static class Builder { - private String id; - - private String name; - - private WalletDepositInstructionType type; - - private String accountNumber; - - private String routingNumber; - - private String referenceCode; - - public Builder id(String id) { - this.id = id; - return this; - } - - public Builder name(String name) { - this.name = name; - return this; - } - - public Builder type(WalletDepositInstructionType type) { - this.type = type; - return this; - } - - public Builder accountNumber(String accountNumber) { - this.accountNumber = accountNumber; - return this; - } - - public Builder routingNumber(String routingNumber) { - this.routingNumber = routingNumber; - return this; - } - - public Builder referenceCode(String referenceCode) { - this.referenceCode = referenceCode; - return this; - } - - public WalletFiatDepositInstructions build() { - return new WalletFiatDepositInstructions(this); - } + public WalletFiatDepositInstructions build() { + return new WalletFiatDepositInstructions(this); } + } } - diff --git a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java index 4e8849a..58b080a 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakeInputs.java @@ -17,63 +17,67 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** - * WalletStakeInputs contains the custom inputs for staking operations on a wallet. - * Requirements and supported fields vary by asset type. + * WalletStakeInputs contains the custom inputs for staking operations on a wallet. Requirements and + * supported fields vary by asset type. */ public class WalletStakeInputs { - /** - * Optional amount to stake (ETH only). If omitted, the wallet will stake the maximum amount available - */ - private String amount; + /** + * Optional amount to stake (ETH only). If omitted, the wallet will stake the maximum amount + * available + */ + private String amount; - /** - * Optional validator address, defaults to Coinbase validator. For SOL, must be the vote account address. Ignored for ETH. - */ - @JsonProperty("validator_address") - private String validatorAddress; + /** + * Optional validator address, defaults to Coinbase validator. For SOL, must be the vote account + * address. Ignored for ETH. + */ + @JsonProperty("validator_address") + private String validatorAddress; - public WalletStakeInputs() { - } + public WalletStakeInputs() {} - public WalletStakeInputs(Builder builder) { - this.amount = builder.amount; - this.validatorAddress = builder.validatorAddress; - } - public String getAmount() { - return amount; - } + public WalletStakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAddress = builder.validatorAddress; + } - public void setAmount(String amount) { - this.amount = amount; - } - public String getValidatorAddress() { - return validatorAddress; - } + public String getAmount() { + return amount; + } - public void setValidatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - } - public static class Builder { - private String amount; + public void setAmount(String amount) { + this.amount = amount; + } - private String validatorAddress; + public String getValidatorAddress() { + return validatorAddress; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public void setValidatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + } - public Builder validatorAddress(String validatorAddress) { - this.validatorAddress = validatorAddress; - return this; - } + public static class Builder { + private String amount; + + private String validatorAddress; - public WalletStakeInputs build() { - return new WalletStakeInputs(this); - } + public Builder amount(String amount) { + this.amount = amount; + return this; } -} + public Builder validatorAddress(String validatorAddress) { + this.validatorAddress = validatorAddress; + return this; + } + + public WalletStakeInputs build() { + return new WalletStakeInputs(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java index da001ba..f703778 100644 --- a/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java +++ b/src/main/java/com/coinbase/prime/model/WalletStakingMetadata.java @@ -17,44 +17,49 @@ */ 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. + * 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; + /** + * 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() {} - public WalletStakingMetadata(Builder builder) { - this.externalId = builder.externalId; - } - public String getExternalId() { - return externalId; - } + public WalletStakingMetadata(Builder builder) { + this.externalId = builder.externalId; + } - public void setExternalId(String externalId) { - this.externalId = externalId; - } - public static class Builder { - private String externalId; + public String getExternalId() { + return externalId; + } - public Builder externalId(String externalId) { - this.externalId = externalId; - return this; - } + public void setExternalId(String externalId) { + this.externalId = externalId; + } - public WalletStakingMetadata build() { - return new WalletStakingMetadata(this); - } + 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 965b95b..4817ca7 100644 --- a/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java +++ b/src/main/java/com/coinbase/prime/model/WalletUnstakeInputs.java @@ -17,65 +17,69 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.ValidatorAllocation; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** - * WalletUnstakeInputs contains the custom inputs for unstaking operations on a wallet. - * Requirements and supported fields vary by asset type. + * WalletUnstakeInputs contains the custom inputs for unstaking operations on a wallet. Requirements + * and supported fields vary by asset type. */ public class WalletUnstakeInputs { - /** - * Optional amount to unstake (ETH only). If omitted, the wallet will unstake the maximum amount available - */ - private String amount; + /** + * Optional amount to unstake (ETH only). If omitted, the wallet will unstake the maximum amount + * available + */ + private String amount; - /** - * (Alpha) Optional validator-level allocations for ETH V2 unstaking. Allows specifying which validators to unstake from and how much. This feature is in alpha. Please reach out to your Coinbase Prime account manager for more information - */ - @JsonProperty("validator_allocations") - private List validatorAllocations; + /** + * (Alpha) Optional validator-level allocations for ETH V2 unstaking. Allows specifying which + * validators to unstake from and how much. This feature is in alpha. Please reach out to your + * Coinbase Prime account manager for more information + */ + @JsonProperty("validator_allocations") + private List validatorAllocations; - public WalletUnstakeInputs() { - } + public WalletUnstakeInputs() {} - public WalletUnstakeInputs(Builder builder) { - this.amount = builder.amount; - this.validatorAllocations = builder.validatorAllocations; - } - public String getAmount() { - return amount; - } + public WalletUnstakeInputs(Builder builder) { + this.amount = builder.amount; + this.validatorAllocations = builder.validatorAllocations; + } - public void setAmount(String amount) { - this.amount = amount; - } - public List getValidatorAllocations() { - return validatorAllocations; - } + public String getAmount() { + return amount; + } - public void setValidatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - } - public static class Builder { - private String amount; + public void setAmount(String amount) { + this.amount = amount; + } - private List validatorAllocations; + public List getValidatorAllocations() { + return validatorAllocations; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public void setValidatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + } - public Builder validatorAllocations(List validatorAllocations) { - this.validatorAllocations = validatorAllocations; - return this; - } + public static class Builder { + private String amount; + + private List validatorAllocations; - public WalletUnstakeInputs build() { - return new WalletUnstakeInputs(this); - } + public Builder amount(String amount) { + this.amount = amount; + return this; } -} + public Builder validatorAllocations(List validatorAllocations) { + this.validatorAllocations = validatorAllocations; + return this; + } + + public WalletUnstakeInputs build() { + return new WalletUnstakeInputs(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java index cd1950e..532669d 100644 --- a/src/main/java/com/coinbase/prime/model/WithdrawalPower.java +++ b/src/main/java/com/coinbase/prime/model/WithdrawalPower.java @@ -19,55 +19,52 @@ package com.coinbase.prime.model; public class WithdrawalPower { - /** - * The currency symbol - */ - private String symbol; + /** The currency symbol */ + private String symbol; - /** - * Withdrawal power - */ - private String amount; + /** Withdrawal power */ + private String amount; - public WithdrawalPower() { - } + public WithdrawalPower() {} - public WithdrawalPower(Builder builder) { - this.symbol = builder.symbol; - this.amount = builder.amount; - } - public String getSymbol() { - return symbol; - } + public WithdrawalPower(Builder builder) { + this.symbol = builder.symbol; + this.amount = builder.amount; + } - public void setSymbol(String symbol) { - this.symbol = symbol; - } - public String getAmount() { - return amount; - } + public String getSymbol() { + return symbol; + } - public void setAmount(String amount) { - this.amount = amount; - } - public static class Builder { - private String symbol; + public void setSymbol(String symbol) { + this.symbol = symbol; + } - private String amount; + public String getAmount() { + return amount; + } - public Builder symbol(String symbol) { - this.symbol = symbol; - return this; - } + public void setAmount(String amount) { + this.amount = amount; + } - public Builder amount(String amount) { - this.amount = amount; - return this; - } + public static class Builder { + private String symbol; + + private String amount; - public WithdrawalPower build() { - return new WithdrawalPower(this); - } + public Builder symbol(String symbol) { + this.symbol = symbol; + return this; } -} + public Builder amount(String amount) { + this.amount = amount; + return this; + } + + public WithdrawalPower build() { + return new WithdrawalPower(this); + } + } +} diff --git a/src/main/java/com/coinbase/prime/model/XMLoan.java b/src/main/java/com/coinbase/prime/model/XMLoan.java index b148d91..2ffa0d0 100644 --- a/src/main/java/com/coinbase/prime/model/XMLoan.java +++ b/src/main/java/com/coinbase/prime/model/XMLoan.java @@ -17,190 +17,184 @@ */ package com.coinbase.prime.model; + import com.coinbase.prime.model.enums.XMParty; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** XMLoan contains details about a Cross Margin loan */ public class XMLoan { - /** - * Financing loan UUID - */ - @JsonProperty("loan_id") + /** 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; + + /** Loan principal currency */ + @JsonProperty("principal_currency") + private String principalCurrency; + + /** Loan principal currency market price */ + @JsonProperty("principal_currency_market_price") + private String principalCurrencyMarketPrice; + + /** Principal amount (nominal) as of loan initiation */ + @JsonProperty("initial_principal_amount") + private String initialPrincipalAmount; + + /** Current outstanding amount (nominal) */ + @JsonProperty("outstanding_principal_amount") + private String outstandingPrincipalAmount; + + /** Timestamp when the loan was created / initiated */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** Timestamp when the loan was last updated */ + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + public XMLoan() {} + + public XMLoan(Builder builder) { + this.loanId = builder.loanId; + this.loanParty = builder.loanParty; + this.principalCurrency = builder.principalCurrency; + this.principalCurrencyMarketPrice = builder.principalCurrencyMarketPrice; + this.initialPrincipalAmount = builder.initialPrincipalAmount; + this.outstandingPrincipalAmount = builder.outstandingPrincipalAmount; + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + } + + public String getLoanId() { + return loanId; + } + + public void setLoanId(String loanId) { + this.loanId = loanId; + } + + public XMParty getLoanParty() { + return loanParty; + } + + public void setLoanParty(XMParty loanParty) { + this.loanParty = loanParty; + } + + public String getPrincipalCurrency() { + return principalCurrency; + } + + public void setPrincipalCurrency(String principalCurrency) { + this.principalCurrency = principalCurrency; + } + + public String getPrincipalCurrencyMarketPrice() { + return principalCurrencyMarketPrice; + } + + public void setPrincipalCurrencyMarketPrice(String principalCurrencyMarketPrice) { + this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; + } + + public String getInitialPrincipalAmount() { + return initialPrincipalAmount; + } + + public void setInitialPrincipalAmount(String initialPrincipalAmount) { + this.initialPrincipalAmount = initialPrincipalAmount; + } + + public String getOutstandingPrincipalAmount() { + return outstandingPrincipalAmount; + } + + public void setOutstandingPrincipalAmount(String outstandingPrincipalAmount) { + this.outstandingPrincipalAmount = outstandingPrincipalAmount; + } + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public static class Builder { 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; - /** - * Loan principal currency - */ - @JsonProperty("principal_currency") private String principalCurrency; - /** - * Loan principal currency market price - */ - @JsonProperty("principal_currency_market_price") private String principalCurrencyMarketPrice; - /** - * Principal amount (nominal) as of loan initiation - */ - @JsonProperty("initial_principal_amount") private String initialPrincipalAmount; - /** - * Current outstanding amount (nominal) - */ - @JsonProperty("outstanding_principal_amount") private String outstandingPrincipalAmount; - /** - * Timestamp when the loan was created / initiated - */ - @JsonProperty("created_at") private OffsetDateTime createdAt; - /** - * Timestamp when the loan was last updated - */ - @JsonProperty("updated_at") private OffsetDateTime updatedAt; - public XMLoan() { + public Builder loanId(String loanId) { + this.loanId = loanId; + return this; } - public XMLoan(Builder builder) { - this.loanId = builder.loanId; - this.loanParty = builder.loanParty; - this.principalCurrency = builder.principalCurrency; - this.principalCurrencyMarketPrice = builder.principalCurrencyMarketPrice; - this.initialPrincipalAmount = builder.initialPrincipalAmount; - this.outstandingPrincipalAmount = builder.outstandingPrincipalAmount; - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - } - public String getLoanId() { - return loanId; + public Builder loanParty(XMParty loanParty) { + this.loanParty = loanParty; + return this; } - public void setLoanId(String loanId) { - this.loanId = loanId; - } - public XMParty getLoanParty() { - return loanParty; + public Builder principalCurrency(String principalCurrency) { + this.principalCurrency = principalCurrency; + return this; } - public void setLoanParty(XMParty loanParty) { - this.loanParty = loanParty; - } - public String getPrincipalCurrency() { - return principalCurrency; + public Builder principalCurrencyMarketPrice(String principalCurrencyMarketPrice) { + this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; + return this; } - public void setPrincipalCurrency(String principalCurrency) { - this.principalCurrency = principalCurrency; - } - public String getPrincipalCurrencyMarketPrice() { - return principalCurrencyMarketPrice; + public Builder initialPrincipalAmount(String initialPrincipalAmount) { + this.initialPrincipalAmount = initialPrincipalAmount; + return this; } - public void setPrincipalCurrencyMarketPrice(String principalCurrencyMarketPrice) { - this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; - } - public String getInitialPrincipalAmount() { - return initialPrincipalAmount; + public Builder outstandingPrincipalAmount(String outstandingPrincipalAmount) { + this.outstandingPrincipalAmount = outstandingPrincipalAmount; + return this; } - public void setInitialPrincipalAmount(String initialPrincipalAmount) { - this.initialPrincipalAmount = initialPrincipalAmount; - } - public String getOutstandingPrincipalAmount() { - return outstandingPrincipalAmount; + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; } - public void setOutstandingPrincipalAmount(String outstandingPrincipalAmount) { - this.outstandingPrincipalAmount = outstandingPrincipalAmount; - } - public OffsetDateTime getCreatedAt() { - return createdAt; + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; } - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - public static class Builder { - private String loanId; - - private XMParty loanParty; - - private String principalCurrency; - - private String principalCurrencyMarketPrice; - - private String initialPrincipalAmount; - - private String outstandingPrincipalAmount; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - public Builder loanId(String loanId) { - this.loanId = loanId; - return this; - } - - public Builder loanParty(XMParty loanParty) { - this.loanParty = loanParty; - return this; - } - - public Builder principalCurrency(String principalCurrency) { - this.principalCurrency = principalCurrency; - return this; - } - - public Builder principalCurrencyMarketPrice(String principalCurrencyMarketPrice) { - this.principalCurrencyMarketPrice = principalCurrencyMarketPrice; - return this; - } - - public Builder initialPrincipalAmount(String initialPrincipalAmount) { - this.initialPrincipalAmount = initialPrincipalAmount; - return this; - } - - public Builder outstandingPrincipalAmount(String outstandingPrincipalAmount) { - this.outstandingPrincipalAmount = outstandingPrincipalAmount; - return this; - } - - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = 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 index fe5603f..31455a3 100644 --- a/src/main/java/com/coinbase/prime/model/XMMarginCall.java +++ b/src/main/java/com/coinbase/prime/model/XMMarginCall.java @@ -17,261 +17,261 @@ */ 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.XMSummary; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** XMMarginCall contains details about a margin call in Cross Margin */ public class XMMarginCall { - /** - * Financing margin call UUID - */ - @JsonProperty("margin_call_id") + /** Financing margin call UUID */ + @JsonProperty("margin_call_id") + private String marginCallId; + + /** Margin call currency */ + private String currency; + + /** Call amount (notional) as of the margin call creation */ + @JsonProperty("initial_notional_amount") + private String initialNotionalAmount; + + /** Current outstanding call amount (notional) */ + @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; + + /** + * - 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; + + /** + * - 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; + + /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ + @JsonProperty("called_with_margin_summary") + private XMSummary calledWithMarginSummary; + + /** Timestamp when the margin call settlement is due */ + @JsonProperty("due_at") + private OffsetDateTime dueAt; + + /** Timestamp when the margin call was created */ + @JsonProperty("created_at") + private OffsetDateTime createdAt; + + /** Timestamp when the margin call was last updated */ + @JsonProperty("updated_at") + private OffsetDateTime updatedAt; + + public XMMarginCall() {} + + public XMMarginCall(Builder builder) { + this.marginCallId = builder.marginCallId; + this.currency = builder.currency; + this.initialNotionalAmount = builder.initialNotionalAmount; + this.outstandingNotionalAmount = builder.outstandingNotionalAmount; + this.marginCallType = builder.marginCallType; + this.marginCallStatus = builder.marginCallStatus; + this.calledWithMarginLevel = builder.calledWithMarginLevel; + this.calledWithMarginSummary = builder.calledWithMarginSummary; + this.dueAt = builder.dueAt; + this.createdAt = builder.createdAt; + this.updatedAt = builder.updatedAt; + } + + public String getMarginCallId() { + return marginCallId; + } + + public void setMarginCallId(String marginCallId) { + this.marginCallId = marginCallId; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getInitialNotionalAmount() { + return initialNotionalAmount; + } + + public void setInitialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + } + + public String getOutstandingNotionalAmount() { + return outstandingNotionalAmount; + } + + public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + } + + public XMCallType getMarginCallType() { + return marginCallType; + } + + public void setMarginCallType(XMCallType marginCallType) { + this.marginCallType = marginCallType; + } + + public XMCallStatus getMarginCallStatus() { + return marginCallStatus; + } + + public void setMarginCallStatus(XMCallStatus marginCallStatus) { + this.marginCallStatus = marginCallStatus; + } + + public XMMarginLevel getCalledWithMarginLevel() { + return calledWithMarginLevel; + } + + public void setCalledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { + this.calledWithMarginLevel = calledWithMarginLevel; + } + + public XMSummary getCalledWithMarginSummary() { + return calledWithMarginSummary; + } + + public void setCalledWithMarginSummary(XMSummary calledWithMarginSummary) { + this.calledWithMarginSummary = calledWithMarginSummary; + } + + public OffsetDateTime getDueAt() { + return dueAt; + } + + public void setDueAt(OffsetDateTime dueAt) { + this.dueAt = dueAt; + } + + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + public static class Builder { private String marginCallId; - /** - * Margin call currency - */ private String currency; - /** - * Call amount (notional) as of the margin call creation - */ - @JsonProperty("initial_notional_amount") private String initialNotionalAmount; - /** - * Current outstanding call amount (notional) - */ - @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; - /** - * - 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; - /** - * - 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; - /** XMSummary is the realtime evaluated XM margin model, containing positions and netting info */ - @JsonProperty("called_with_margin_summary") private XMSummary calledWithMarginSummary; - /** - * Timestamp when the margin call settlement is due - */ - @JsonProperty("due_at") private OffsetDateTime dueAt; - /** - * Timestamp when the margin call was created - */ - @JsonProperty("created_at") private OffsetDateTime createdAt; - /** - * Timestamp when the margin call was last updated - */ - @JsonProperty("updated_at") private OffsetDateTime updatedAt; - public XMMarginCall() { + public Builder marginCallId(String marginCallId) { + this.marginCallId = marginCallId; + return this; } - public XMMarginCall(Builder builder) { - this.marginCallId = builder.marginCallId; - this.currency = builder.currency; - this.initialNotionalAmount = builder.initialNotionalAmount; - this.outstandingNotionalAmount = builder.outstandingNotionalAmount; - this.marginCallType = builder.marginCallType; - this.marginCallStatus = builder.marginCallStatus; - this.calledWithMarginLevel = builder.calledWithMarginLevel; - this.calledWithMarginSummary = builder.calledWithMarginSummary; - this.dueAt = builder.dueAt; - this.createdAt = builder.createdAt; - this.updatedAt = builder.updatedAt; - } - public String getMarginCallId() { - return marginCallId; + public Builder currency(String currency) { + this.currency = currency; + return this; } - public void setMarginCallId(String marginCallId) { - this.marginCallId = marginCallId; - } - public String getCurrency() { - return currency; + public Builder initialNotionalAmount(String initialNotionalAmount) { + this.initialNotionalAmount = initialNotionalAmount; + return this; } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getInitialNotionalAmount() { - return initialNotionalAmount; + public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { + this.outstandingNotionalAmount = outstandingNotionalAmount; + return this; } - public void setInitialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - } - public String getOutstandingNotionalAmount() { - return outstandingNotionalAmount; + public Builder marginCallType(XMCallType marginCallType) { + this.marginCallType = marginCallType; + return this; } - public void setOutstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - } - public XMCallType getMarginCallType() { - return marginCallType; + public Builder marginCallStatus(XMCallStatus marginCallStatus) { + this.marginCallStatus = marginCallStatus; + return this; } - public void setMarginCallType(XMCallType marginCallType) { - this.marginCallType = marginCallType; - } - public XMCallStatus getMarginCallStatus() { - return marginCallStatus; + public Builder calledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { + this.calledWithMarginLevel = calledWithMarginLevel; + return this; } - public void setMarginCallStatus(XMCallStatus marginCallStatus) { - this.marginCallStatus = marginCallStatus; - } - public XMMarginLevel getCalledWithMarginLevel() { - return calledWithMarginLevel; + public Builder calledWithMarginSummary(XMSummary calledWithMarginSummary) { + this.calledWithMarginSummary = calledWithMarginSummary; + return this; } - public void setCalledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { - this.calledWithMarginLevel = calledWithMarginLevel; - } - public XMSummary getCalledWithMarginSummary() { - return calledWithMarginSummary; + public Builder dueAt(OffsetDateTime dueAt) { + this.dueAt = dueAt; + return this; } - public void setCalledWithMarginSummary(XMSummary calledWithMarginSummary) { - this.calledWithMarginSummary = calledWithMarginSummary; - } - public OffsetDateTime getDueAt() { - return dueAt; + public Builder createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; } - public void setDueAt(OffsetDateTime dueAt) { - this.dueAt = dueAt; + public Builder updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; } - public OffsetDateTime getCreatedAt() { - return createdAt; - } - - public void setCreatedAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - } - public OffsetDateTime getUpdatedAt() { - return updatedAt; - } - - public void setUpdatedAt(OffsetDateTime updatedAt) { - this.updatedAt = updatedAt; - } - public static class Builder { - private String marginCallId; - - private String currency; - - private String initialNotionalAmount; - - private String outstandingNotionalAmount; - private XMCallType marginCallType; - - private XMCallStatus marginCallStatus; - - private XMMarginLevel calledWithMarginLevel; - - private XMSummary calledWithMarginSummary; - - private OffsetDateTime dueAt; - - private OffsetDateTime createdAt; - - private OffsetDateTime updatedAt; - - public Builder marginCallId(String marginCallId) { - this.marginCallId = marginCallId; - return this; - } - - public Builder currency(String currency) { - this.currency = currency; - return this; - } - - public Builder initialNotionalAmount(String initialNotionalAmount) { - this.initialNotionalAmount = initialNotionalAmount; - return this; - } - - public Builder outstandingNotionalAmount(String outstandingNotionalAmount) { - this.outstandingNotionalAmount = outstandingNotionalAmount; - return this; - } - - public Builder marginCallType(XMCallType marginCallType) { - this.marginCallType = marginCallType; - return this; - } - - public Builder marginCallStatus(XMCallStatus marginCallStatus) { - this.marginCallStatus = marginCallStatus; - return this; - } - - public Builder calledWithMarginLevel(XMMarginLevel calledWithMarginLevel) { - this.calledWithMarginLevel = calledWithMarginLevel; - return this; - } - - public Builder calledWithMarginSummary(XMSummary calledWithMarginSummary) { - this.calledWithMarginSummary = calledWithMarginSummary; - return this; - } - - public Builder dueAt(OffsetDateTime dueAt) { - this.dueAt = dueAt; - return this; - } - - public Builder createdAt(OffsetDateTime createdAt) { - this.createdAt = createdAt; - return this; - } - - public Builder updatedAt(OffsetDateTime updatedAt) { - this.updatedAt = 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 index 1f67ec5..89cc692 100644 --- a/src/main/java/com/coinbase/prime/model/XMPosition.java +++ b/src/main/java/com/coinbase/prime/model/XMPosition.java @@ -17,543 +17,518 @@ */ package com.coinbase.prime.model; + import com.fasterxml.jackson.annotation.JsonProperty; /** XMPosition */ public class XMPosition { - /** - * Position currency - */ + /** Position currency */ + private String currency; + + /** Current market price */ + @JsonProperty("market_price") + private String marketPrice; + + /** True if margin eligible, false otherwise */ + @JsonProperty("margin_eligible") + private boolean marginEligible; + + /** Total market capitalization */ + @JsonProperty("market_cap") + private String marketCap; + + /** Average daily volume calculated over a 30-day period */ + @JsonProperty("adv30_days") + private String adv30Days; + + /** Historic volatility calculated over a 5-day period */ + @JsonProperty("hist5d_vol") + private String hist5dVol; + + /** Historic volatility calculated over a 30-day period */ + @JsonProperty("hist30d_vol") + private String hist30dVol; + + /** Historic volatility calculated over a 90-day period */ + @JsonProperty("hist90d_vol") + private String hist90dVol; + + /** Base margin requirement for the specific asset */ + @JsonProperty("margin_requirement") + private String marginRequirement; + + /** XM spot balance nominal */ + @JsonProperty("spot_balance") + private String spotBalance; + + /** XM spot balance notional */ + @JsonProperty("spot_balance_notional") + private String spotBalanceNotional; + + /** Pre-netted spot total position margin */ + @JsonProperty("spot_total_position_margin") + private String spotTotalPositionMargin; + + /** XM futures balance nominal */ + @JsonProperty("futures_balance") + private String futuresBalance; + + /** XM futures balance notional */ + @JsonProperty("futures_balance_notional") + private String futuresBalanceNotional; + + /** Pre-netted futures total position margin */ + @JsonProperty("futures_total_position_margin") + private String futuresTotalPositionMargin; + + /** Basis GMV = |futures| + |spot| - |unnetted position| */ + @JsonProperty("gmv_basis") + private String gmvBasis; + + /** Base margin requirement notional */ + @JsonProperty("base_requirement") + private String baseRequirement; + + /** Effective liquidity add-on for the short positions */ + @JsonProperty("liq_shorts_add_on") + private String liqShortsAddOn; + + /** Effective liquidity add-on for the long positions */ + @JsonProperty("liq_longs_add_on") + private String liqLongsAddOn; + + /** Effective volatility add-on for the short positions */ + @JsonProperty("vol_shorts_add_on") + private String volShortsAddOn; + + /** Effective volatility add-on for the long positions */ + @JsonProperty("vol_longs_add_on") + private String volLongsAddOn; + + /** 5-day volatility add-on */ + @JsonProperty("vol5days_add_on") + private String vol5daysAddOn; + + /** 30-day volatility add-on */ + @JsonProperty("vol30days_add_on") + private String vol30daysAddOn; + + /** 90-day volatility add-on */ + @JsonProperty("vol90days_add_on") + private String vol90daysAddOn; + + /** Total margin required */ + @JsonProperty("total_position_margin") + private String totalPositionMargin; + + public XMPosition() {} + + public XMPosition(Builder builder) { + this.currency = builder.currency; + this.marketPrice = builder.marketPrice; + this.marginEligible = builder.marginEligible; + this.marketCap = builder.marketCap; + this.adv30Days = builder.adv30Days; + this.hist5dVol = builder.hist5dVol; + this.hist30dVol = builder.hist30dVol; + this.hist90dVol = builder.hist90dVol; + this.marginRequirement = builder.marginRequirement; + this.spotBalance = builder.spotBalance; + this.spotBalanceNotional = builder.spotBalanceNotional; + this.spotTotalPositionMargin = builder.spotTotalPositionMargin; + this.futuresBalance = builder.futuresBalance; + this.futuresBalanceNotional = builder.futuresBalanceNotional; + this.futuresTotalPositionMargin = builder.futuresTotalPositionMargin; + this.gmvBasis = builder.gmvBasis; + this.baseRequirement = builder.baseRequirement; + this.liqShortsAddOn = builder.liqShortsAddOn; + this.liqLongsAddOn = builder.liqLongsAddOn; + this.volShortsAddOn = builder.volShortsAddOn; + this.volLongsAddOn = builder.volLongsAddOn; + this.vol5daysAddOn = builder.vol5daysAddOn; + this.vol30daysAddOn = builder.vol30daysAddOn; + this.vol90daysAddOn = builder.vol90daysAddOn; + this.totalPositionMargin = builder.totalPositionMargin; + } + + 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 boolean getMarginEligible() { + return marginEligible; + } + + public void setMarginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + } + + public String getMarketCap() { + return marketCap; + } + + public void setMarketCap(String marketCap) { + this.marketCap = marketCap; + } + + public String getAdv30Days() { + return adv30Days; + } + + public void setAdv30Days(String adv30Days) { + this.adv30Days = adv30Days; + } + + public String getHist5dVol() { + return hist5dVol; + } + + public void setHist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + } + + public String getHist30dVol() { + return hist30dVol; + } + + public void setHist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + } + + public String getHist90dVol() { + return hist90dVol; + } + + public void setHist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + } + + public String getMarginRequirement() { + return marginRequirement; + } + + public void setMarginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + } + + 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 getSpotTotalPositionMargin() { + return spotTotalPositionMargin; + } + + public void setSpotTotalPositionMargin(String spotTotalPositionMargin) { + this.spotTotalPositionMargin = spotTotalPositionMargin; + } + + 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 getFuturesTotalPositionMargin() { + return futuresTotalPositionMargin; + } + + public void setFuturesTotalPositionMargin(String futuresTotalPositionMargin) { + this.futuresTotalPositionMargin = futuresTotalPositionMargin; + } + + public String getGmvBasis() { + return gmvBasis; + } + + public void setGmvBasis(String gmvBasis) { + this.gmvBasis = gmvBasis; + } + + public String getBaseRequirement() { + return baseRequirement; + } + + public void setBaseRequirement(String baseRequirement) { + this.baseRequirement = baseRequirement; + } + + public String getLiqShortsAddOn() { + return liqShortsAddOn; + } + + public void setLiqShortsAddOn(String liqShortsAddOn) { + this.liqShortsAddOn = liqShortsAddOn; + } + + public String getLiqLongsAddOn() { + return liqLongsAddOn; + } + + public void setLiqLongsAddOn(String liqLongsAddOn) { + this.liqLongsAddOn = liqLongsAddOn; + } + + public String getVolShortsAddOn() { + return volShortsAddOn; + } + + public void setVolShortsAddOn(String volShortsAddOn) { + this.volShortsAddOn = volShortsAddOn; + } + + public String getVolLongsAddOn() { + return volLongsAddOn; + } + + public void setVolLongsAddOn(String volLongsAddOn) { + this.volLongsAddOn = volLongsAddOn; + } + + public String getVol5daysAddOn() { + return vol5daysAddOn; + } + + public void setVol5daysAddOn(String vol5daysAddOn) { + this.vol5daysAddOn = vol5daysAddOn; + } + + public String getVol30daysAddOn() { + return vol30daysAddOn; + } + + public void setVol30daysAddOn(String vol30daysAddOn) { + this.vol30daysAddOn = vol30daysAddOn; + } + + public String getVol90daysAddOn() { + return vol90daysAddOn; + } + + public void setVol90daysAddOn(String vol90daysAddOn) { + this.vol90daysAddOn = vol90daysAddOn; + } + + public String getTotalPositionMargin() { + return totalPositionMargin; + } + + public void setTotalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + } + + public static class Builder { private String currency; - /** - * Current market price - */ - @JsonProperty("market_price") private String marketPrice; - /** - * True if margin eligible, false otherwise - */ - @JsonProperty("margin_eligible") private boolean marginEligible; - /** - * Total market capitalization - */ - @JsonProperty("market_cap") private String marketCap; - /** - * Average daily volume calculated over a 30-day period - */ - @JsonProperty("adv30_days") private String adv30Days; - /** - * Historic volatility calculated over a 5-day period - */ - @JsonProperty("hist5d_vol") private String hist5dVol; - /** - * Historic volatility calculated over a 30-day period - */ - @JsonProperty("hist30d_vol") private String hist30dVol; - /** - * Historic volatility calculated over a 90-day period - */ - @JsonProperty("hist90d_vol") private String hist90dVol; - /** - * Base margin requirement for the specific asset - */ - @JsonProperty("margin_requirement") private String marginRequirement; - /** - * XM spot balance nominal - */ - @JsonProperty("spot_balance") private String spotBalance; - /** - * XM spot balance notional - */ - @JsonProperty("spot_balance_notional") private String spotBalanceNotional; - /** - * Pre-netted spot total position margin - */ - @JsonProperty("spot_total_position_margin") private String spotTotalPositionMargin; - /** - * XM futures balance nominal - */ - @JsonProperty("futures_balance") private String futuresBalance; - /** - * XM futures balance notional - */ - @JsonProperty("futures_balance_notional") private String futuresBalanceNotional; - /** - * Pre-netted futures total position margin - */ - @JsonProperty("futures_total_position_margin") private String futuresTotalPositionMargin; - /** - * Basis GMV = |futures| + |spot| - |unnetted position| - */ - @JsonProperty("gmv_basis") private String gmvBasis; - /** - * Base margin requirement notional - */ - @JsonProperty("base_requirement") private String baseRequirement; - /** - * Effective liquidity add-on for the short positions - */ - @JsonProperty("liq_shorts_add_on") private String liqShortsAddOn; - /** - * Effective liquidity add-on for the long positions - */ - @JsonProperty("liq_longs_add_on") private String liqLongsAddOn; - /** - * Effective volatility add-on for the short positions - */ - @JsonProperty("vol_shorts_add_on") private String volShortsAddOn; - /** - * Effective volatility add-on for the long positions - */ - @JsonProperty("vol_longs_add_on") private String volLongsAddOn; - /** - * 5-day volatility add-on - */ - @JsonProperty("vol5days_add_on") private String vol5daysAddOn; - /** - * 30-day volatility add-on - */ - @JsonProperty("vol30days_add_on") private String vol30daysAddOn; - /** - * 90-day volatility add-on - */ - @JsonProperty("vol90days_add_on") private String vol90daysAddOn; - /** - * Total margin required - */ - @JsonProperty("total_position_margin") private String totalPositionMargin; - public XMPosition() { + public Builder currency(String currency) { + this.currency = currency; + return this; } - public XMPosition(Builder builder) { - this.currency = builder.currency; - this.marketPrice = builder.marketPrice; - this.marginEligible = builder.marginEligible; - this.marketCap = builder.marketCap; - this.adv30Days = builder.adv30Days; - this.hist5dVol = builder.hist5dVol; - this.hist30dVol = builder.hist30dVol; - this.hist90dVol = builder.hist90dVol; - this.marginRequirement = builder.marginRequirement; - this.spotBalance = builder.spotBalance; - this.spotBalanceNotional = builder.spotBalanceNotional; - this.spotTotalPositionMargin = builder.spotTotalPositionMargin; - this.futuresBalance = builder.futuresBalance; - this.futuresBalanceNotional = builder.futuresBalanceNotional; - this.futuresTotalPositionMargin = builder.futuresTotalPositionMargin; - this.gmvBasis = builder.gmvBasis; - this.baseRequirement = builder.baseRequirement; - this.liqShortsAddOn = builder.liqShortsAddOn; - this.liqLongsAddOn = builder.liqLongsAddOn; - this.volShortsAddOn = builder.volShortsAddOn; - this.volLongsAddOn = builder.volLongsAddOn; - this.vol5daysAddOn = builder.vol5daysAddOn; - this.vol30daysAddOn = builder.vol30daysAddOn; - this.vol90daysAddOn = builder.vol90daysAddOn; - this.totalPositionMargin = builder.totalPositionMargin; - } - public String getCurrency() { - return currency; + public Builder marketPrice(String marketPrice) { + this.marketPrice = marketPrice; + return this; } - public void setCurrency(String currency) { - this.currency = currency; - } - public String getMarketPrice() { - return marketPrice; + public Builder marginEligible(boolean marginEligible) { + this.marginEligible = marginEligible; + return this; } - public void setMarketPrice(String marketPrice) { - this.marketPrice = marketPrice; - } - public boolean getMarginEligible() { - return marginEligible; + public Builder marketCap(String marketCap) { + this.marketCap = marketCap; + return this; } - public void setMarginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - } - public String getMarketCap() { - return marketCap; + public Builder adv30Days(String adv30Days) { + this.adv30Days = adv30Days; + return this; } - public void setMarketCap(String marketCap) { - this.marketCap = marketCap; - } - public String getAdv30Days() { - return adv30Days; + public Builder hist5dVol(String hist5dVol) { + this.hist5dVol = hist5dVol; + return this; } - public void setAdv30Days(String adv30Days) { - this.adv30Days = adv30Days; - } - public String getHist5dVol() { - return hist5dVol; + public Builder hist30dVol(String hist30dVol) { + this.hist30dVol = hist30dVol; + return this; } - public void setHist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - } - public String getHist30dVol() { - return hist30dVol; + public Builder hist90dVol(String hist90dVol) { + this.hist90dVol = hist90dVol; + return this; } - public void setHist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - } - public String getHist90dVol() { - return hist90dVol; + public Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + return this; } - public void setHist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - } - public String getMarginRequirement() { - return marginRequirement; + public Builder spotBalance(String spotBalance) { + this.spotBalance = spotBalance; + return this; } - public void setMarginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - } - public String getSpotBalance() { - return spotBalance; + public Builder spotBalanceNotional(String spotBalanceNotional) { + this.spotBalanceNotional = spotBalanceNotional; + return this; } - public void setSpotBalance(String spotBalance) { - this.spotBalance = spotBalance; - } - public String getSpotBalanceNotional() { - return spotBalanceNotional; + public Builder spotTotalPositionMargin(String spotTotalPositionMargin) { + this.spotTotalPositionMargin = spotTotalPositionMargin; + return this; } - public void setSpotBalanceNotional(String spotBalanceNotional) { - this.spotBalanceNotional = spotBalanceNotional; - } - public String getSpotTotalPositionMargin() { - return spotTotalPositionMargin; + public Builder futuresBalance(String futuresBalance) { + this.futuresBalance = futuresBalance; + return this; } - public void setSpotTotalPositionMargin(String spotTotalPositionMargin) { - this.spotTotalPositionMargin = spotTotalPositionMargin; - } - public String getFuturesBalance() { - return futuresBalance; + public Builder futuresBalanceNotional(String futuresBalanceNotional) { + this.futuresBalanceNotional = futuresBalanceNotional; + return this; } - public void setFuturesBalance(String futuresBalance) { - this.futuresBalance = futuresBalance; - } - public String getFuturesBalanceNotional() { - return futuresBalanceNotional; + public Builder futuresTotalPositionMargin(String futuresTotalPositionMargin) { + this.futuresTotalPositionMargin = futuresTotalPositionMargin; + return this; } - public void setFuturesBalanceNotional(String futuresBalanceNotional) { - this.futuresBalanceNotional = futuresBalanceNotional; - } - public String getFuturesTotalPositionMargin() { - return futuresTotalPositionMargin; + public Builder gmvBasis(String gmvBasis) { + this.gmvBasis = gmvBasis; + return this; } - public void setFuturesTotalPositionMargin(String futuresTotalPositionMargin) { - this.futuresTotalPositionMargin = futuresTotalPositionMargin; - } - public String getGmvBasis() { - return gmvBasis; + public Builder baseRequirement(String baseRequirement) { + this.baseRequirement = baseRequirement; + return this; } - public void setGmvBasis(String gmvBasis) { - this.gmvBasis = gmvBasis; - } - public String getBaseRequirement() { - return baseRequirement; + public Builder liqShortsAddOn(String liqShortsAddOn) { + this.liqShortsAddOn = liqShortsAddOn; + return this; } - public void setBaseRequirement(String baseRequirement) { - this.baseRequirement = baseRequirement; - } - public String getLiqShortsAddOn() { - return liqShortsAddOn; + public Builder liqLongsAddOn(String liqLongsAddOn) { + this.liqLongsAddOn = liqLongsAddOn; + return this; } - public void setLiqShortsAddOn(String liqShortsAddOn) { - this.liqShortsAddOn = liqShortsAddOn; - } - public String getLiqLongsAddOn() { - return liqLongsAddOn; + public Builder volShortsAddOn(String volShortsAddOn) { + this.volShortsAddOn = volShortsAddOn; + return this; } - public void setLiqLongsAddOn(String liqLongsAddOn) { - this.liqLongsAddOn = liqLongsAddOn; - } - public String getVolShortsAddOn() { - return volShortsAddOn; + public Builder volLongsAddOn(String volLongsAddOn) { + this.volLongsAddOn = volLongsAddOn; + return this; } - public void setVolShortsAddOn(String volShortsAddOn) { - this.volShortsAddOn = volShortsAddOn; - } - public String getVolLongsAddOn() { - return volLongsAddOn; + public Builder vol5daysAddOn(String vol5daysAddOn) { + this.vol5daysAddOn = vol5daysAddOn; + return this; } - public void setVolLongsAddOn(String volLongsAddOn) { - this.volLongsAddOn = volLongsAddOn; - } - public String getVol5daysAddOn() { - return vol5daysAddOn; + public Builder vol30daysAddOn(String vol30daysAddOn) { + this.vol30daysAddOn = vol30daysAddOn; + return this; } - public void setVol5daysAddOn(String vol5daysAddOn) { - this.vol5daysAddOn = vol5daysAddOn; - } - public String getVol30daysAddOn() { - return vol30daysAddOn; + public Builder vol90daysAddOn(String vol90daysAddOn) { + this.vol90daysAddOn = vol90daysAddOn; + return this; } - public void setVol30daysAddOn(String vol30daysAddOn) { - this.vol30daysAddOn = vol30daysAddOn; - } - public String getVol90daysAddOn() { - return vol90daysAddOn; - } - - public void setVol90daysAddOn(String vol90daysAddOn) { - this.vol90daysAddOn = vol90daysAddOn; - } - public String getTotalPositionMargin() { - return totalPositionMargin; + public Builder totalPositionMargin(String totalPositionMargin) { + this.totalPositionMargin = totalPositionMargin; + return this; } - public void setTotalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = totalPositionMargin; - } - public static class Builder { - private String currency; - - private String marketPrice; - - private boolean marginEligible; - - private String marketCap; - - private String adv30Days; - - private String hist5dVol; - - private String hist30dVol; - - private String hist90dVol; - - private String marginRequirement; - - private String spotBalance; - - private String spotBalanceNotional; - - private String spotTotalPositionMargin; - - private String futuresBalance; - - private String futuresBalanceNotional; - - private String futuresTotalPositionMargin; - - private String gmvBasis; - - private String baseRequirement; - - private String liqShortsAddOn; - - private String liqLongsAddOn; - - private String volShortsAddOn; - - private String volLongsAddOn; - - private String vol5daysAddOn; - - private String vol30daysAddOn; - - private String vol90daysAddOn; - - private String totalPositionMargin; - - public Builder currency(String currency) { - this.currency = currency; - return this; - } - - public Builder marketPrice(String marketPrice) { - this.marketPrice = marketPrice; - return this; - } - - public Builder marginEligible(boolean marginEligible) { - this.marginEligible = marginEligible; - return this; - } - - public Builder marketCap(String marketCap) { - this.marketCap = marketCap; - return this; - } - - public Builder adv30Days(String adv30Days) { - this.adv30Days = adv30Days; - return this; - } - - public Builder hist5dVol(String hist5dVol) { - this.hist5dVol = hist5dVol; - return this; - } - - public Builder hist30dVol(String hist30dVol) { - this.hist30dVol = hist30dVol; - return this; - } - - public Builder hist90dVol(String hist90dVol) { - this.hist90dVol = hist90dVol; - return this; - } - - public Builder marginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - return this; - } - - public Builder spotBalance(String spotBalance) { - this.spotBalance = spotBalance; - return this; - } - - public Builder spotBalanceNotional(String spotBalanceNotional) { - this.spotBalanceNotional = spotBalanceNotional; - return this; - } - - public Builder spotTotalPositionMargin(String spotTotalPositionMargin) { - this.spotTotalPositionMargin = spotTotalPositionMargin; - return this; - } - - public Builder futuresBalance(String futuresBalance) { - this.futuresBalance = futuresBalance; - return this; - } - - public Builder futuresBalanceNotional(String futuresBalanceNotional) { - this.futuresBalanceNotional = futuresBalanceNotional; - return this; - } - - public Builder futuresTotalPositionMargin(String futuresTotalPositionMargin) { - this.futuresTotalPositionMargin = futuresTotalPositionMargin; - return this; - } - - public Builder gmvBasis(String gmvBasis) { - this.gmvBasis = gmvBasis; - return this; - } - - public Builder baseRequirement(String baseRequirement) { - this.baseRequirement = baseRequirement; - return this; - } - - public Builder liqShortsAddOn(String liqShortsAddOn) { - this.liqShortsAddOn = liqShortsAddOn; - return this; - } - - public Builder liqLongsAddOn(String liqLongsAddOn) { - this.liqLongsAddOn = liqLongsAddOn; - return this; - } - - public Builder volShortsAddOn(String volShortsAddOn) { - this.volShortsAddOn = volShortsAddOn; - return this; - } - - public Builder volLongsAddOn(String volLongsAddOn) { - this.volLongsAddOn = volLongsAddOn; - return this; - } - - public Builder vol5daysAddOn(String vol5daysAddOn) { - this.vol5daysAddOn = vol5daysAddOn; - return this; - } - - public Builder vol30daysAddOn(String vol30daysAddOn) { - this.vol30daysAddOn = vol30daysAddOn; - return this; - } - - public Builder vol90daysAddOn(String vol90daysAddOn) { - this.vol90daysAddOn = vol90daysAddOn; - return this; - } - - public Builder totalPositionMargin(String totalPositionMargin) { - this.totalPositionMargin = 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 index 5005a1b..4c7069e 100644 --- a/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java +++ b/src/main/java/com/coinbase/prime/model/XMRiskNettingInfo.java @@ -17,312 +17,312 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.MarginAddOn; -import com.coinbase.prime.model.XMPosition; + import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; 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("dco_margin_requirement") + /** + * 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, via the XM model with + * one-leg netting + */ + @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; + + /** Position margin requirement for all spot positions */ + @JsonProperty("position_margin_requirement") + private String positionMarginRequirement; + + /** Portfolio margin addon for all spot positions */ + @JsonProperty("portfolio_margin_addon") + private String portfolioMarginAddon; + + /** Position margin requirement for spot + futures positions */ + @JsonProperty("integrated_position_margin_requirement") + private String integratedPositionMarginRequirement; + + /** Portfolio margin addon for spot + futures positions */ + @JsonProperty("integrated_portfolio_margin_addon") + private String integratedPortfolioMarginAddon; + + /** Post-netting USD notional for all futures positions */ + @JsonProperty("netted_futures_notional") + private String nettedFuturesNotional; + + /** Total basis gross market value of all XM-eligible positions (i.e. crypto underliers) */ + @JsonProperty("total_gmv_basis") + private String totalGmvBasis; + + /** Integrated Portfolio Margin cash balance */ + @JsonProperty("ipm_cash_balance") + private String ipmCashBalance; + + @JsonProperty("integrated_scenario_addon") + private MarginAddOn integratedScenarioAddon; + + /** All integrated scenario add-ons */ + @JsonProperty("all_integrated_scenario_addons") + private List allIntegratedScenarioAddons; + + /** Netted positions used in the model calculation */ + @JsonProperty("xm_positions") + private List xmPositions; + + public XMRiskNettingInfo() {} + + public XMRiskNettingInfo(Builder builder) { + this.dcoMarginRequirement = builder.dcoMarginRequirement; + this.portfolioMarginRequirement = builder.portfolioMarginRequirement; + this.integratedPortfolioMarginRequirement = builder.integratedPortfolioMarginRequirement; + this.ineligibleFuturesMarginRequirement = builder.ineligibleFuturesMarginRequirement; + this.positionMarginRequirement = builder.positionMarginRequirement; + this.portfolioMarginAddon = builder.portfolioMarginAddon; + this.integratedPositionMarginRequirement = builder.integratedPositionMarginRequirement; + this.integratedPortfolioMarginAddon = builder.integratedPortfolioMarginAddon; + this.nettedFuturesNotional = builder.nettedFuturesNotional; + this.totalGmvBasis = builder.totalGmvBasis; + this.ipmCashBalance = builder.ipmCashBalance; + this.integratedScenarioAddon = builder.integratedScenarioAddon; + this.allIntegratedScenarioAddons = builder.allIntegratedScenarioAddons; + 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 String getPositionMarginRequirement() { + return positionMarginRequirement; + } + + public void setPositionMarginRequirement(String positionMarginRequirement) { + this.positionMarginRequirement = positionMarginRequirement; + } + + public String getPortfolioMarginAddon() { + return portfolioMarginAddon; + } + + public void setPortfolioMarginAddon(String portfolioMarginAddon) { + this.portfolioMarginAddon = portfolioMarginAddon; + } + + public String getIntegratedPositionMarginRequirement() { + return integratedPositionMarginRequirement; + } + + public void setIntegratedPositionMarginRequirement(String integratedPositionMarginRequirement) { + this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; + } + + public String getIntegratedPortfolioMarginAddon() { + return integratedPortfolioMarginAddon; + } + + public void setIntegratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { + this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; + } + + public String getNettedFuturesNotional() { + return nettedFuturesNotional; + } + + public void setNettedFuturesNotional(String nettedFuturesNotional) { + this.nettedFuturesNotional = nettedFuturesNotional; + } + + public String getTotalGmvBasis() { + return totalGmvBasis; + } + + public void setTotalGmvBasis(String totalGmvBasis) { + this.totalGmvBasis = totalGmvBasis; + } + + public String getIpmCashBalance() { + return ipmCashBalance; + } + + public void setIpmCashBalance(String ipmCashBalance) { + this.ipmCashBalance = ipmCashBalance; + } + + public MarginAddOn getIntegratedScenarioAddon() { + return integratedScenarioAddon; + } + + public void setIntegratedScenarioAddon(MarginAddOn integratedScenarioAddon) { + this.integratedScenarioAddon = integratedScenarioAddon; + } + + public List getAllIntegratedScenarioAddons() { + return allIntegratedScenarioAddons; + } + + public void setAllIntegratedScenarioAddons(List allIntegratedScenarioAddons) { + this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; + } + + public List getXMPositions() { + return xmPositions; + } + + public void setXMPositions(List xmPositions) { + this.xmPositions = xmPositions; + } + + public static class Builder { 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, via the XM model with one-leg netting - */ - @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; - /** - * Position margin requirement for all spot positions - */ - @JsonProperty("position_margin_requirement") private String positionMarginRequirement; - /** - * Portfolio margin addon for all spot positions - */ - @JsonProperty("portfolio_margin_addon") private String portfolioMarginAddon; - /** - * Position margin requirement for spot + futures positions - */ - @JsonProperty("integrated_position_margin_requirement") private String integratedPositionMarginRequirement; - /** - * Portfolio margin addon for spot + futures positions - */ - @JsonProperty("integrated_portfolio_margin_addon") private String integratedPortfolioMarginAddon; - /** - * Post-netting USD notional for all futures positions - */ - @JsonProperty("netted_futures_notional") private String nettedFuturesNotional; - /** - * Total basis gross market value of all XM-eligible positions (i.e. crypto underliers) - */ - @JsonProperty("total_gmv_basis") private String totalGmvBasis; - /** - * Integrated Portfolio Margin cash balance - */ - @JsonProperty("ipm_cash_balance") private String ipmCashBalance; - @JsonProperty("integrated_scenario_addon") private MarginAddOn integratedScenarioAddon; - /** - * All integrated scenario add-ons - */ - @JsonProperty("all_integrated_scenario_addons") private List allIntegratedScenarioAddons; - /** - * Netted positions used in the model calculation - */ - @JsonProperty("xm_positions") private List xmPositions; - public XMRiskNettingInfo() { + public Builder dcoMarginRequirement(String dcoMarginRequirement) { + this.dcoMarginRequirement = dcoMarginRequirement; + return this; } - public XMRiskNettingInfo(Builder builder) { - this.dcoMarginRequirement = builder.dcoMarginRequirement; - this.portfolioMarginRequirement = builder.portfolioMarginRequirement; - this.integratedPortfolioMarginRequirement = builder.integratedPortfolioMarginRequirement; - this.ineligibleFuturesMarginRequirement = builder.ineligibleFuturesMarginRequirement; - this.positionMarginRequirement = builder.positionMarginRequirement; - this.portfolioMarginAddon = builder.portfolioMarginAddon; - this.integratedPositionMarginRequirement = builder.integratedPositionMarginRequirement; - this.integratedPortfolioMarginAddon = builder.integratedPortfolioMarginAddon; - this.nettedFuturesNotional = builder.nettedFuturesNotional; - this.totalGmvBasis = builder.totalGmvBasis; - this.ipmCashBalance = builder.ipmCashBalance; - this.integratedScenarioAddon = builder.integratedScenarioAddon; - this.allIntegratedScenarioAddons = builder.allIntegratedScenarioAddons; - 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 Builder portfolioMarginRequirement(String portfolioMarginRequirement) { + this.portfolioMarginRequirement = portfolioMarginRequirement; + return this; } - public void setIntegratedPortfolioMarginRequirement(String integratedPortfolioMarginRequirement) { - this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; - } - public String getIneligibleFuturesMarginRequirement() { - return ineligibleFuturesMarginRequirement; + public Builder integratedPortfolioMarginRequirement( + String integratedPortfolioMarginRequirement) { + this.integratedPortfolioMarginRequirement = integratedPortfolioMarginRequirement; + return this; } - public void setIneligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { - this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; - } - public String getPositionMarginRequirement() { - return positionMarginRequirement; + public Builder ineligibleFuturesMarginRequirement(String ineligibleFuturesMarginRequirement) { + this.ineligibleFuturesMarginRequirement = ineligibleFuturesMarginRequirement; + return this; } - public void setPositionMarginRequirement(String positionMarginRequirement) { - this.positionMarginRequirement = positionMarginRequirement; - } - public String getPortfolioMarginAddon() { - return portfolioMarginAddon; + public Builder positionMarginRequirement(String positionMarginRequirement) { + this.positionMarginRequirement = positionMarginRequirement; + return this; } - public void setPortfolioMarginAddon(String portfolioMarginAddon) { - this.portfolioMarginAddon = portfolioMarginAddon; - } - public String getIntegratedPositionMarginRequirement() { - return integratedPositionMarginRequirement; + public Builder portfolioMarginAddon(String portfolioMarginAddon) { + this.portfolioMarginAddon = portfolioMarginAddon; + return this; } - public void setIntegratedPositionMarginRequirement(String integratedPositionMarginRequirement) { - this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; - } - public String getIntegratedPortfolioMarginAddon() { - return integratedPortfolioMarginAddon; + public Builder integratedPositionMarginRequirement(String integratedPositionMarginRequirement) { + this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; + return this; } - public void setIntegratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { - this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; - } - public String getNettedFuturesNotional() { - return nettedFuturesNotional; + public Builder integratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { + this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; + return this; } - public void setNettedFuturesNotional(String nettedFuturesNotional) { - this.nettedFuturesNotional = nettedFuturesNotional; - } - public String getTotalGmvBasis() { - return totalGmvBasis; + public Builder nettedFuturesNotional(String nettedFuturesNotional) { + this.nettedFuturesNotional = nettedFuturesNotional; + return this; } - public void setTotalGmvBasis(String totalGmvBasis) { - this.totalGmvBasis = totalGmvBasis; - } - public String getIpmCashBalance() { - return ipmCashBalance; + public Builder totalGmvBasis(String totalGmvBasis) { + this.totalGmvBasis = totalGmvBasis; + return this; } - public void setIpmCashBalance(String ipmCashBalance) { - this.ipmCashBalance = ipmCashBalance; - } - public MarginAddOn getIntegratedScenarioAddon() { - return integratedScenarioAddon; + public Builder ipmCashBalance(String ipmCashBalance) { + this.ipmCashBalance = ipmCashBalance; + return this; } - public void setIntegratedScenarioAddon(MarginAddOn integratedScenarioAddon) { - this.integratedScenarioAddon = integratedScenarioAddon; - } - public List getAllIntegratedScenarioAddons() { - return allIntegratedScenarioAddons; + public Builder integratedScenarioAddon(MarginAddOn integratedScenarioAddon) { + this.integratedScenarioAddon = integratedScenarioAddon; + return this; } - public void setAllIntegratedScenarioAddons(List allIntegratedScenarioAddons) { - this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; - } - public List getXMPositions() { - return xmPositions; + public Builder allIntegratedScenarioAddons(List allIntegratedScenarioAddons) { + this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; + return this; } - public void setXMPositions(List xmPositions) { - this.xmPositions = xmPositions; + public Builder xmPositions(List xmPositions) { + this.xmPositions = xmPositions; + return this; } - public static class Builder { - private String dcoMarginRequirement; - - private String portfolioMarginRequirement; - - private String integratedPortfolioMarginRequirement; - private String ineligibleFuturesMarginRequirement; - - private String positionMarginRequirement; - - private String portfolioMarginAddon; - - private String integratedPositionMarginRequirement; - - private String integratedPortfolioMarginAddon; - - private String nettedFuturesNotional; - - private String totalGmvBasis; - - private String ipmCashBalance; - - private MarginAddOn integratedScenarioAddon; - - private List allIntegratedScenarioAddons; - - 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 positionMarginRequirement(String positionMarginRequirement) { - this.positionMarginRequirement = positionMarginRequirement; - return this; - } - - public Builder portfolioMarginAddon(String portfolioMarginAddon) { - this.portfolioMarginAddon = portfolioMarginAddon; - return this; - } - - public Builder integratedPositionMarginRequirement(String integratedPositionMarginRequirement) { - this.integratedPositionMarginRequirement = integratedPositionMarginRequirement; - return this; - } - - public Builder integratedPortfolioMarginAddon(String integratedPortfolioMarginAddon) { - this.integratedPortfolioMarginAddon = integratedPortfolioMarginAddon; - return this; - } - - public Builder nettedFuturesNotional(String nettedFuturesNotional) { - this.nettedFuturesNotional = nettedFuturesNotional; - return this; - } - - public Builder totalGmvBasis(String totalGmvBasis) { - this.totalGmvBasis = totalGmvBasis; - return this; - } - - public Builder ipmCashBalance(String ipmCashBalance) { - this.ipmCashBalance = ipmCashBalance; - return this; - } - - public Builder integratedScenarioAddon(MarginAddOn integratedScenarioAddon) { - this.integratedScenarioAddon = integratedScenarioAddon; - return this; - } - - public Builder allIntegratedScenarioAddons(List allIntegratedScenarioAddons) { - this.allIntegratedScenarioAddons = allIntegratedScenarioAddons; - return this; - } - - 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 index fe66290..36d60ea 100644 --- a/src/main/java/com/coinbase/prime/model/XMSummary.java +++ b/src/main/java/com/coinbase/prime/model/XMSummary.java @@ -17,206 +17,198 @@ */ package com.coinbase.prime.model; -import com.coinbase.prime.model.XMRiskNettingInfo; + import com.fasterxml.jackson.annotation.JsonProperty; /** 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") + /** Cross Margin Margin Requirement (XMMR) notional */ + @JsonProperty("margin_requirement") + private String marginRequirement; + + /** Equity notional */ + @JsonProperty("account_equity") + private String accountEquity; + + /** Equity - XMMR (margin excess is > 0) */ + @JsonProperty("margin_excess_shortfall") + private String marginExcessShortfall; + + /** Credit consumed from Cross Margin Credit Limit (XMCL) */ + @JsonProperty("consumed_credit") + private String consumedCredit; + + /** XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans */ + @JsonProperty("xm_credit_limit") + private String xmCreditLimit; + + /** XM Margin Limit (XMML) is the maximum notional USD deficit */ + @JsonProperty("xm_margin_limit") + private String xmMarginLimit; + + /** Equity attributed by spot */ + @JsonProperty("spot_equity") + private String spotEquity; + + /** Equity attributed by futures */ + @JsonProperty("futures_equity") + private String futuresEquity; + + @JsonProperty("risk_netting_info") + private XMRiskNettingInfo riskNettingInfo; + + public XMSummary() {} + + public XMSummary(Builder builder) { + this.marginRequirement = builder.marginRequirement; + this.accountEquity = builder.accountEquity; + this.marginExcessShortfall = builder.marginExcessShortfall; + this.consumedCredit = builder.consumedCredit; + this.xmCreditLimit = builder.xmCreditLimit; + this.xmMarginLimit = builder.xmMarginLimit; + this.spotEquity = builder.spotEquity; + this.futuresEquity = builder.futuresEquity; + this.riskNettingInfo = builder.riskNettingInfo; + } + + public String getMarginRequirement() { + return marginRequirement; + } + + public void setMarginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + } + + public String getAccountEquity() { + return accountEquity; + } + + public void setAccountEquity(String accountEquity) { + this.accountEquity = accountEquity; + } + + public String getMarginExcessShortfall() { + return marginExcessShortfall; + } + + public void setMarginExcessShortfall(String marginExcessShortfall) { + this.marginExcessShortfall = marginExcessShortfall; + } + + public String getConsumedCredit() { + return consumedCredit; + } + + public void setConsumedCredit(String consumedCredit) { + this.consumedCredit = consumedCredit; + } + + public String getXMCreditLimit() { + return xmCreditLimit; + } + + public void setXMCreditLimit(String xmCreditLimit) { + this.xmCreditLimit = xmCreditLimit; + } + + public String getXMMarginLimit() { + return xmMarginLimit; + } + + public void setXMMarginLimit(String xmMarginLimit) { + this.xmMarginLimit = xmMarginLimit; + } + + public String getSpotEquity() { + return spotEquity; + } + + public void setSpotEquity(String spotEquity) { + this.spotEquity = spotEquity; + } + + public String getFuturesEquity() { + return futuresEquity; + } + + public void setFuturesEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + } + + public XMRiskNettingInfo getRiskNettingInfo() { + return riskNettingInfo; + } + + public void setRiskNettingInfo(XMRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; + } + + public static class Builder { private String marginRequirement; - /** - * Equity notional - */ - @JsonProperty("account_equity") private String accountEquity; - /** - * Equity - XMMR (margin excess is > 0) - */ - @JsonProperty("margin_excess_shortfall") private String marginExcessShortfall; - /** - * Credit consumed from Cross Margin Credit Limit (XMCL) - */ - @JsonProperty("consumed_credit") private String consumedCredit; - /** - * XM Credit Limit (XMCL) is the maximum notional USD of total fiat and digital asset loans - */ - @JsonProperty("xm_credit_limit") private String xmCreditLimit; - /** - * XM Margin Limit (XMML) is the maximum notional USD deficit - */ - @JsonProperty("xm_margin_limit") private String xmMarginLimit; - /** - * Equity attributed by spot - */ - @JsonProperty("spot_equity") private String spotEquity; - /** - * Equity attributed by futures - */ - @JsonProperty("futures_equity") private String futuresEquity; - @JsonProperty("risk_netting_info") private XMRiskNettingInfo riskNettingInfo; - public XMSummary() { - } - - public XMSummary(Builder builder) { - this.marginRequirement = builder.marginRequirement; - this.accountEquity = builder.accountEquity; - this.marginExcessShortfall = builder.marginExcessShortfall; - this.consumedCredit = builder.consumedCredit; - this.xmCreditLimit = builder.xmCreditLimit; - this.xmMarginLimit = builder.xmMarginLimit; - this.spotEquity = builder.spotEquity; - this.futuresEquity = builder.futuresEquity; - this.riskNettingInfo = builder.riskNettingInfo; - } - public String getMarginRequirement() { - return marginRequirement; - } - - public void setMarginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - } - public String getAccountEquity() { - return accountEquity; + public Builder marginRequirement(String marginRequirement) { + this.marginRequirement = marginRequirement; + return this; } - public void setAccountEquity(String accountEquity) { - this.accountEquity = accountEquity; - } - public String getMarginExcessShortfall() { - return marginExcessShortfall; + public Builder accountEquity(String accountEquity) { + this.accountEquity = accountEquity; + return this; } - public void setMarginExcessShortfall(String marginExcessShortfall) { - this.marginExcessShortfall = marginExcessShortfall; - } - public String getConsumedCredit() { - return consumedCredit; + public Builder marginExcessShortfall(String marginExcessShortfall) { + this.marginExcessShortfall = marginExcessShortfall; + return this; } - public void setConsumedCredit(String consumedCredit) { - this.consumedCredit = consumedCredit; - } - public String getXMCreditLimit() { - return xmCreditLimit; + public Builder consumedCredit(String consumedCredit) { + this.consumedCredit = consumedCredit; + return this; } - public void setXMCreditLimit(String xmCreditLimit) { - this.xmCreditLimit = xmCreditLimit; - } - public String getXMMarginLimit() { - return xmMarginLimit; + public Builder xmCreditLimit(String xmCreditLimit) { + this.xmCreditLimit = xmCreditLimit; + return this; } - public void setXMMarginLimit(String xmMarginLimit) { - this.xmMarginLimit = xmMarginLimit; - } - public String getSpotEquity() { - return spotEquity; + public Builder xmMarginLimit(String xmMarginLimit) { + this.xmMarginLimit = xmMarginLimit; + return this; } - public void setSpotEquity(String spotEquity) { - this.spotEquity = spotEquity; - } - public String getFuturesEquity() { - return futuresEquity; + public Builder spotEquity(String spotEquity) { + this.spotEquity = spotEquity; + return this; } - public void setFuturesEquity(String futuresEquity) { - this.futuresEquity = futuresEquity; - } - public XMRiskNettingInfo getRiskNettingInfo() { - return riskNettingInfo; + public Builder futuresEquity(String futuresEquity) { + this.futuresEquity = futuresEquity; + return this; } - public void setRiskNettingInfo(XMRiskNettingInfo riskNettingInfo) { - this.riskNettingInfo = riskNettingInfo; + public Builder riskNettingInfo(XMRiskNettingInfo riskNettingInfo) { + this.riskNettingInfo = riskNettingInfo; + return this; } - public static class Builder { - private String marginRequirement; - - private String accountEquity; - - private String marginExcessShortfall; - private String consumedCredit; - - private String xmCreditLimit; - - private String xmMarginLimit; - - private String spotEquity; - - private String futuresEquity; - - private XMRiskNettingInfo riskNettingInfo; - - public Builder marginRequirement(String marginRequirement) { - this.marginRequirement = marginRequirement; - 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 spotEquity(String spotEquity) { - this.spotEquity = spotEquity; - return this; - } - - public Builder futuresEquity(String futuresEquity) { - this.futuresEquity = futuresEquity; - return this; - } - - 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/Action.java b/src/main/java/com/coinbase/prime/model/enums/Action.java index 0d3244b..2815e30 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Action.java +++ b/src/main/java/com/coinbase/prime/model/enums/Action.java @@ -18,9 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * Action is the available user action types - */ +/** Action is the available user action types */ public enum Action { OTHER_ACTION, ACTION_APPROVE, @@ -28,4 +26,3 @@ public enum Action { ACTION_INITIATE, ACTION_CANCEL } - 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 5f542ed..26d8ee7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityCategory.java @@ -26,4 +26,3 @@ public enum ActivityCategory { ACTIVITY_CATEGORY_ALLOCATION, ACTIVITY_CATEGORY_LENDING } - 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 a26ab85..8206e0a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityLevel.java @@ -23,4 +23,3 @@ public enum ActivityLevel { ACTIVITY_LEVEL_PORTFOLIO, ACTIVITY_LEVEL_ENTITY } - 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 78f58ff..db7f5fd 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivitySecondaryType.java @@ -19,26 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types - * - ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: Transaction secondary types - * - ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types + * - ACTIVITY_SECONDARY_TYPE_BUY: Order secondary types - ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER: + * Transaction secondary types - ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER: Onchain secondary types */ public enum ActivitySecondaryType { NO_SECONDARY_TYPE, - /** - * Order secondary types - */ + /** Order secondary types */ ACTIVITY_SECONDARY_TYPE_BUY, ACTIVITY_SECONDARY_TYPE_SELL, - /** - * Transaction secondary types - */ + /** Transaction secondary types */ ACTIVITY_SECONDARY_TYPE_INTERNAL_TRANSFER, ACTIVITY_SECONDARY_TYPE_SWEEP_TRANSFER_TYPE, - /** - * Onchain secondary types - */ + /** Onchain secondary types */ ACTIVITY_SECONDARY_TYPE_WEB3_SIGNER, ACTIVITY_SECONDARY_TYPE_WEB3_WALLET } - 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 4dc402a..0ed4689 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ActivityStatus.java @@ -27,4 +27,3 @@ public enum ActivityStatus { ACTIVITY_STATUS_REJECTED, ACTIVITY_STATUS_FAILED } - 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 0d4b9db..07b0e26 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AddressBookType.java @@ -23,4 +23,3 @@ public enum AddressBookType { ADDRESS_BOOK_TYPE_ADDRESS, ADDRESS_BOOK_TYPE_COUNTERPARTY_ID } - 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 c4f17a6..f1240a2 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferState.java @@ -18,9 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * AdvancedTransferState represents the lifecycle state of an advanced transfer. - */ +/** AdvancedTransferState represents the lifecycle state of an advanced transfer. */ public enum AdvancedTransferState { ADVANCED_TRANSFER_STATE_CREATED, ADVANCED_TRANSFER_STATE_PROCESSING, @@ -29,4 +27,3 @@ public enum AdvancedTransferState { ADVANCED_TRANSFER_STATE_FAILED, ADVANCED_TRANSFER_STATE_EXPIRED } - diff --git a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java index c7e1523..6004744 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AdvancedTransferType.java @@ -18,10 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * AdvancedTransferType specifies the type of advanced transfer. - */ +/** AdvancedTransferType specifies the type of advanced transfer. */ public enum AdvancedTransferType { ADVANCED_TRANSFER_TYPE_BLIND_MATCH } - 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 dd15581..d4a71e8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationSizeType.java @@ -23,4 +23,3 @@ public enum AllocationSizeType { QUOTE, PERCENT } - 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 b8b21d2..7e6c6a6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/AllocationStatus.java @@ -25,4 +25,3 @@ public enum AllocationStatus { ALLOCATION_STATUS_ALLOCATION_ALLOCATED, ALLOCATION_STATUS_ALLOCATION_REJECTED } - 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 16b287d..5c2b2e1 100644 --- a/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/AssetChangeType.java @@ -18,9 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * AssetChangeType identifies the type of asset change - */ +/** AssetChangeType identifies the type of asset change */ public enum AssetChangeType { BALANCE_TRANSFER, BALANCE_APPROVAL, @@ -28,4 +26,3 @@ public enum AssetChangeType { ITEM_APPROVAL, ITEM_APPROVAL_ALL } - 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 0a5f886..ac8a646 100644 --- a/src/main/java/com/coinbase/prime/model/enums/Benchmark.java +++ b/src/main/java/com/coinbase/prime/model/enums/Benchmark.java @@ -25,4 +25,3 @@ public enum Benchmark { SOFR_365, CRYPTO_RFR } - 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 410cd25..1d33cdc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java +++ b/src/main/java/com/coinbase/prime/model/enums/CandlesGranularity.java @@ -18,9 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * Enum for candle granularity (time intervals) - */ +/** Enum for candle granularity (time intervals) */ public enum CandlesGranularity { ONE_MINUTE, FIVE_MINUTES, @@ -32,4 +30,3 @@ public enum CandlesGranularity { TWO_HOURS, FOUR_HOURS } - 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 b5cecd3..d38db0b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ContractExpiryType.java @@ -19,22 +19,15 @@ package com.coinbase.prime.model.enums; /** - * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type - * - CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract - * - CONTRACT_EXPIRY_TYPE_PERPETUAL: Perpetual futures contract (no expiry) + * - CONTRACT_EXPIRY_TYPE_UNSPECIFIED: Unspecified contract expiry type - + * CONTRACT_EXPIRY_TYPE_EXPIRING: Expiring futures contract - CONTRACT_EXPIRY_TYPE_PERPETUAL: + * Perpetual futures contract (no expiry) */ public enum ContractExpiryType { - /** - * Unspecified contract expiry type - */ + /** Unspecified contract expiry type */ CONTRACT_EXPIRY_TYPE_UNSPECIFIED, - /** - * Expiring futures contract - */ + /** Expiring futures contract */ CONTRACT_EXPIRY_TYPE_EXPIRING, - /** - * Perpetual futures contract (no expiry) - */ + /** Perpetual futures contract (no expiry) */ CONTRACT_EXPIRY_TYPE_PERPETUAL } - 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 d0e100c..b9c04f5 100644 --- a/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java +++ b/src/main/java/com/coinbase/prime/model/enums/CustodyActivityType.java @@ -49,4 +49,3 @@ public enum CustodyActivityType { ACTIVITY_TYPE_WEB3_MESSAGE, ACTIVITY_TYPE_CLAIM_REWARDS } - 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 a51dd3d..a3f4223 100644 --- a/src/main/java/com/coinbase/prime/model/enums/DestinationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/DestinationType.java @@ -19,30 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_DESTINATION: nil value - * - DESTINATION_PAYMENT_METHOD: A fiat bank account linked to a payment method id via Payment Method Service - * - DESTINATION_BLOCKCHAIN: A blockchain network address - * - DESTINATION_WALLET: An on platform wallet UUID - * NOTE: this is not usable in the withdrawals endpoint - * only transfers - * - DESTINATION_COUNTERPARTY: Counterparty ID + * - UNKNOWN_DESTINATION: nil value - DESTINATION_PAYMENT_METHOD: A fiat bank account linked to a + * payment method id via Payment Method Service - DESTINATION_BLOCKCHAIN: A blockchain network + * address - DESTINATION_WALLET: An on platform wallet UUID NOTE: this is not usable in the + * 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 - */ + /** A fiat bank account linked to a payment method id via Payment Method Service */ DESTINATION_PAYMENT_METHOD, - /** - * A blockchain network address - */ + /** A blockchain network address */ DESTINATION_BLOCKCHAIN, - /** - * An on platform wallet UUID - */ + /** An on platform wallet UUID */ DESTINATION_WALLET, - /** - * Counterparty ID - */ + /** Counterparty ID */ DESTINATION_COUNTERPARTY } - 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 60f328e..5f22984 100644 --- a/src/main/java/com/coinbase/prime/model/enums/EstimateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/EstimateType.java @@ -23,4 +23,3 @@ public enum EstimateType { LIVE, INTERIM } - 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 b9a787d..0d6ad82 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ExpiringContractStatus.java @@ -19,23 +19,17 @@ package com.coinbase.prime.model.enums; /** - * - EXPIRING_CONTRACT_STATUS_UNKNOWN: Unknown/unset — returns all expiring contracts (backward compatible default) - * - EXPIRING_CONTRACT_STATUS_UNEXPIRED: Only unexpired contracts (contract_expiry is in the future) - * - EXPIRING_CONTRACT_STATUS_EXPIRED: Only expired contracts (contract_expiry is in the past) - * - EXPIRING_CONTRACT_STATUS_ALL: All contracts regardless of expiry status + * - EXPIRING_CONTRACT_STATUS_UNKNOWN: Unknown/unset — returns all expiring contracts (backward + * compatible default) - EXPIRING_CONTRACT_STATUS_UNEXPIRED: Only unexpired contracts + * (contract_expiry is in the future) - EXPIRING_CONTRACT_STATUS_EXPIRED: Only expired contracts + * (contract_expiry is in the past) - EXPIRING_CONTRACT_STATUS_ALL: All contracts regardless of + * expiry status */ public enum ExpiringContractStatus { - /** - * Only unexpired contracts (contract_expiry is in the future) - */ + /** Only unexpired contracts (contract_expiry is in the future) */ EXPIRING_CONTRACT_STATUS_UNEXPIRED, - /** - * Only expired contracts (contract_expiry is in the past) - */ + /** Only expired contracts (contract_expiry is in the past) */ EXPIRING_CONTRACT_STATUS_EXPIRED, - /** - * All contracts regardless of expiry status - */ + /** All contracts regardless of expiry status */ EXPIRING_CONTRACT_STATUS_ALL } - 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 41de29e..0899ba4 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallState.java @@ -25,4 +25,3 @@ public enum FcmMarginCallState { FCM_MARGIN_CALL_STATE_DEFAULT, FCM_MARGIN_CALL_STATE_OFFICIAL } - 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 a9e18bb..faf6005 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginCallType.java @@ -23,4 +23,3 @@ public enum FcmMarginCallType { FCM_MARGIN_CALL_TYPE_URGENT, FCM_MARGIN_CALL_TYPE_REGULAR } - 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 7ba3c94..8a79aa6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmMarginHealthState.java @@ -19,33 +19,21 @@ package com.coinbase.prime.model.enums; /** - * The margin health state of an FCM account. - * - FCM_MARGIN_HEALTH_STATE_UNSPECIFIED: Unspecified margin health state. - * - FCM_MARGIN_HEALTH_STATE_HEALTHY: Account margin is healthy. - * - FCM_MARGIN_HEALTH_STATE_RESTRICTED: Account margin is restricted. - * - FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION: Account is approaching liquidation. - * - FCM_MARGIN_HEALTH_STATE_LIQUIDATION: Account is in liquidation. + * The margin health state of an FCM account. - FCM_MARGIN_HEALTH_STATE_UNSPECIFIED: Unspecified + * margin health state. - FCM_MARGIN_HEALTH_STATE_HEALTHY: Account margin is healthy. - + * FCM_MARGIN_HEALTH_STATE_RESTRICTED: Account margin is restricted. - + * FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION: Account is approaching liquidation. - + * FCM_MARGIN_HEALTH_STATE_LIQUIDATION: Account is in liquidation. */ public enum FcmMarginHealthState { - /** - * Unspecified margin health state. - */ + /** Unspecified margin health state. */ FCM_MARGIN_HEALTH_STATE_UNSPECIFIED, - /** - * Account margin is healthy. - */ + /** Account margin is healthy. */ FCM_MARGIN_HEALTH_STATE_HEALTHY, - /** - * Account margin is restricted. - */ + /** Account margin is restricted. */ FCM_MARGIN_HEALTH_STATE_RESTRICTED, - /** - * Account is approaching liquidation. - */ + /** Account is approaching liquidation. */ FCM_MARGIN_HEALTH_STATE_PRE_LIQUIDATION, - /** - * Account is in liquidation. - */ + /** Account is in liquidation. */ FCM_MARGIN_HEALTH_STATE_LIQUIDATION } - 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 a8dce00..5e6cb96 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmPositionSide.java @@ -23,4 +23,3 @@ public enum FcmPositionSide { LONG, SHORT } - 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 d477a29..9055adc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionClosedReason.java @@ -19,27 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason - * - FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close - * - FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance - * - FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance + * - FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED: Undefined closed reason - + * FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE: Regular market close - + * FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE: Exchange maintenance - + * FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE: Vendor maintenance */ public enum FcmTradingSessionClosedReason { - /** - * Undefined closed reason - */ + /** Undefined closed reason */ FCM_TRADING_SESSION_CLOSED_REASON_UNDEFINED, - /** - * Regular market close - */ + /** Regular market close */ FCM_TRADING_SESSION_CLOSED_REASON_REGULAR_MARKET_CLOSE, - /** - * Exchange maintenance - */ + /** Exchange maintenance */ FCM_TRADING_SESSION_CLOSED_REASON_EXCHANGE_MAINTENANCE, - /** - * Vendor maintenance - */ + /** Vendor maintenance */ FCM_TRADING_SESSION_CLOSED_REASON_VENDOR_MAINTENANCE } - 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 70b4623..727051c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java +++ b/src/main/java/com/coinbase/prime/model/enums/FcmTradingSessionState.java @@ -19,37 +19,23 @@ package com.coinbase.prime.model.enums; /** - * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state - * - FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled - * - FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled - * - FCM_TRADING_SESSION_STATE_OPEN: Trading session is open - * - FCM_TRADING_SESSION_STATE_CLOSE: Trading session is closed - * - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted + * - FCM_TRADING_SESSION_STATE_UNDEFINED: Undefined session state - + * FCM_TRADING_SESSION_STATE_PRE_OPEN: Pre-open state, orders can be placed and cancelled - + * FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL: Pre-open state, orders cannot be cancelled - + * FCM_TRADING_SESSION_STATE_OPEN: Trading session is open - FCM_TRADING_SESSION_STATE_CLOSE: + * Trading session is closed - FCM_TRADING_SESSION_STATE_HALTED: Trading session is halted */ public enum FcmTradingSessionState { - /** - * Undefined session state - */ + /** Undefined session state */ FCM_TRADING_SESSION_STATE_UNDEFINED, - /** - * Pre-open state, orders can be placed and cancelled - */ + /** Pre-open state, orders can be placed and cancelled */ FCM_TRADING_SESSION_STATE_PRE_OPEN, - /** - * Pre-open state, orders cannot be cancelled - */ + /** Pre-open state, orders cannot be cancelled */ FCM_TRADING_SESSION_STATE_PRE_OPEN_NO_CANCEL, - /** - * Trading session is open - */ + /** Trading session is open */ FCM_TRADING_SESSION_STATE_OPEN, - /** - * Trading session is closed - */ + /** Trading session is closed */ FCM_TRADING_SESSION_STATE_CLOSE, - /** - * Trading session is halted - */ + /** Trading session is halted */ FCM_TRADING_SESSION_STATE_HALTED } - 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 667d7a6..49152e0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/FuturesSweepStatus.java @@ -25,4 +25,3 @@ public enum FuturesSweepStatus { FCM_FUTURES_SWEEP_STATUS_CANCELED, FCM_FUTURES_SWEEP_STATUS_PROCESSING } - 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 a316d21..80af7a6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java +++ b/src/main/java/com/coinbase/prime/model/enums/HierarchyType.java @@ -19,11 +19,11 @@ package com.coinbase.prime.model.enums; /** - * HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, Portfolio + * HierarchyType are the enums for various hierarchies within Prime, ex Entity, Organization, + * Portfolio */ public enum HierarchyType { HIERARCHY_TYPE_UNSPECIFIED, HIERARCHY_TYPE_PORTFOLIO, HIERARCHY_TYPE_ENTITY } - 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 987d053..a4f1490 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceState.java @@ -18,9 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * States - */ +/** States */ public enum InvoiceState { INVOICE_STATE_UNSPECIFIED, INVOICE_STATE_IMPORTED, @@ -28,4 +26,3 @@ public enum InvoiceState { INVOICE_STATE_PARTIALLY_PAID, INVOICE_STATE_PAID } - 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 fe18bb6..f69fc41 100644 --- a/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/InvoiceType.java @@ -18,9 +18,7 @@ package com.coinbase.prime.model.enums; -/** - * Types - */ +/** Types */ public enum InvoiceType { INVOICE_TYPE_UNSPECIFIED, INVOICE_TYPE_AUC_FEE, @@ -29,4 +27,3 @@ public enum InvoiceType { INVOICE_TYPE_NEW_WALLET_FEE, INVOICE_TYPE_STAKING_FEE } - 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 bf76f86..b93f60e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/LoanType.java +++ b/src/main/java/com/coinbase/prime/model/enums/LoanType.java @@ -27,4 +27,3 @@ public enum LoanType { SHORT_COLLATERAL, CROSS_MARGIN } - 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 10116a8..691d526 100644 --- a/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java +++ b/src/main/java/com/coinbase/prime/model/enums/MarginAddOnType.java @@ -25,4 +25,3 @@ public enum MarginAddOnType { MACRO_STRESS, SHORT_BIASED_STRESS } - 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 5258e7a..929cad8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkFamily.java @@ -23,4 +23,3 @@ public enum NetworkFamily { NETWORK_FAMILY_EVM, NETWORK_FAMILY_SOLANA } - 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 2df5d21..6480120 100644 --- a/src/main/java/com/coinbase/prime/model/enums/NetworkType.java +++ b/src/main/java/com/coinbase/prime/model/enums/NetworkType.java @@ -23,4 +23,3 @@ public enum NetworkType { NETWORK_TYPE_EVM, NETWORK_TYPE_SOLANA } - 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 e68e939..54b9891 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderSide.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderSide.java @@ -18,19 +18,10 @@ package com.coinbase.prime.model.enums; -/** - * - UNKNOWN_ORDER_SIDE: nil value - * - BUY: Buy order - * - SELL: Sell order - */ +/** - UNKNOWN_ORDER_SIDE: nil value - BUY: Buy order - SELL: Sell order */ public enum OrderSide { - /** - * Buy order - */ + /** Buy order */ BUY, - /** - * Sell order - */ + /** Sell order */ SELL } - 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 14f4d8d..2417a3e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderStatus.java @@ -19,38 +19,21 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_ORDER_STATUS: nil value - * - OPEN: The order is open but unfilled - * - FILLED: The 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 + * - UNKNOWN_ORDER_STATUS: nil value - OPEN: The order is open but unfilled - FILLED: The 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 */ public enum OrderStatus { - /** - * The order is open but unfilled - */ + /** The order is open but unfilled */ OPEN, - /** - * The order was filled - */ + /** The order was filled */ FILLED, - /** - * The order was cancelled - */ + /** The order was cancelled */ CANCELLED, - /** - * The order has expired - */ + /** The order has expired */ EXPIRED, - /** - * Order submission failed - */ + /** Order submission failed */ FAILED, - /** - * The order has been sent but is not yet confirmed - */ + /** The order has been sent but is not yet confirmed */ PENDING } - 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 78268a6..2550fa9 100644 --- a/src/main/java/com/coinbase/prime/model/enums/OrderType.java +++ b/src/main/java/com/coinbase/prime/model/enums/OrderType.java @@ -19,48 +19,45 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_ORDER_TYPE: nil value - * - MARKET: A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) - * - LIMIT: A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) - * - TWAP: A [time-weighted average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) - * - BLOCK: A [block trade](https://en.wikipedia.org/wiki/Block_trade) - * - VWAP: A [volume-weighted average price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) - * - STOP_LIMIT: A [conditional order combined of stop order and limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) - * - RFQ: A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) - * - PEG: A pegged order that dynamically adjust based on market conditions while maintaining execution discretion and avoiding adverse selection + * - UNKNOWN_ORDER_TYPE: nil value - MARKET: A [market + * order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) - LIMIT: A [limit + * order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) - TWAP: A [time-weighted + * average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) - BLOCK: A [block + * trade](https://en.wikipedia.org/wiki/Block_trade) - VWAP: A [volume-weighted average price + * order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) - STOP_LIMIT: A [conditional + * order combined of stop order and limit + * order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) - RFQ: A [request for + * quote](https://en.wikipedia.org/wiki/Request_for_quote) - PEG: A pegged order that dynamically + * adjust based on market conditions while maintaining execution discretion and avoiding adverse + * selection */ public enum OrderType { - /** - * A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) - */ + /** A [market order](https://en.wikipedia.org/wiki/Order_(exchange)#Market_order) */ MARKET, - /** - * A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) - */ + /** A [limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Limit_order) */ LIMIT, /** - * A [time-weighted average price order](https://en.wikipedia.org/wiki/Time-weighted_average_price) + * A [time-weighted average price + * order](https://en.wikipedia.org/wiki/Time-weighted_average_price) */ TWAP, - /** - * A [block trade](https://en.wikipedia.org/wiki/Block_trade) - */ + /** A [block trade](https://en.wikipedia.org/wiki/Block_trade) */ BLOCK, /** - * A [volume-weighted average price order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) + * A [volume-weighted average price + * order](https://en.wikipedia.org/wiki/Volume-weighted_average_price) */ VWAP, /** - * A [conditional order combined of stop order and limit order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) + * A [conditional order combined of stop order and limit + * order](https://en.wikipedia.org/wiki/Order_(exchange)#Stop-limit_order) */ STOP_LIMIT, - /** - * A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) - */ + /** A [request for quote](https://en.wikipedia.org/wiki/Request_for_quote) */ RFQ, /** - * A pegged order that dynamically adjust based on market conditions while maintaining execution discretion and avoiding adverse selection + * A pegged order that dynamically adjust based on market conditions while maintaining execution + * discretion and avoiding adverse selection */ PEG } - 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 f95388d..2e558cd 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PaymentMethodType.java @@ -19,23 +19,14 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - * - METHOD_WIRE: Wire transfer - * - METHOD_SEN: Silvergate exchange network - * - METHOD_SWIFT: Swift + * - UNKNOWN_PAYMENT_METHOD_TYPE: nil value - METHOD_WIRE: Wire transfer - METHOD_SEN: Silvergate + * exchange network - METHOD_SWIFT: Swift */ public enum PaymentMethodType { - /** - * Wire transfer - */ + /** Wire transfer */ METHOD_WIRE, - /** - * Silvergate exchange network - */ + /** Silvergate exchange network */ METHOD_SEN, - /** - * Swift - */ + /** Swift */ METHOD_SWIFT } - 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 fa23d08..7b7404d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PegOffsetType.java @@ -19,23 +19,15 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_PEG_OFFSET_TYPE: nil value - * - PEG_OFFSET_TYPE_PRICE: Offset specified in price units - * - PEG_OFFSET_TYPE_BPS: Offset specified in basis points (BPS) - * - PEG_OFFSET_TYPE_DEPTH: Offset specified in depth + * - UNKNOWN_PEG_OFFSET_TYPE: nil value - PEG_OFFSET_TYPE_PRICE: Offset specified in price units - + * PEG_OFFSET_TYPE_BPS: Offset specified in basis points (BPS) - PEG_OFFSET_TYPE_DEPTH: Offset + * specified in depth */ public enum PegOffsetType { - /** - * Offset specified in price units - */ + /** Offset specified in price units */ PEG_OFFSET_TYPE_PRICE, - /** - * Offset specified in basis points (BPS) - */ + /** Offset specified in basis points (BPS) */ PEG_OFFSET_TYPE_BPS, - /** - * Offset specified in depth - */ + /** Offset specified in depth */ PEG_OFFSET_TYPE_DEPTH } - 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 b1a24dd..9f71124 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PortfolioBalanceType.java @@ -19,33 +19,20 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_BALANCE_TYPE: nil - * - TRADING_BALANCES: Trading balances - * - VAULT_BALANCES: Vault balances - * - TOTAL_BALANCES: Total balances (The sum of vault and trading + prime custody) - * - PRIME_CUSTODY_BALANCES: Prime custody balances - * - UNIFIED_TOTAL_BALANCES: Unified total balance across networks and wallet types (vault + trading + prime custody) + * - UNKNOWN_BALANCE_TYPE: nil - TRADING_BALANCES: Trading balances - VAULT_BALANCES: Vault balances + * - TOTAL_BALANCES: Total balances (The sum of vault and trading + prime custody) - + * PRIME_CUSTODY_BALANCES: Prime custody balances - UNIFIED_TOTAL_BALANCES: Unified total balance + * across networks and wallet types (vault + trading + prime custody) */ public enum PortfolioBalanceType { - /** - * Trading balances - */ + /** Trading balances */ TRADING_BALANCES, - /** - * Vault balances - */ + /** Vault balances */ VAULT_BALANCES, - /** - * Total balances (The sum of vault and trading + prime custody) - */ + /** Total balances (The sum of vault and trading + prime custody) */ TOTAL_BALANCES, - /** - * Prime custody balances - */ + /** Prime custody balances */ PRIME_CUSTODY_BALANCES, - /** - * Unified total balance across networks and wallet types (vault + trading + prime custody) - */ + /** 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/PositionReferenceType.java b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java index 1586fc0..5cecbb6 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PositionReferenceType.java @@ -23,4 +23,3 @@ public enum PositionReferenceType { ENTITY, PORTFOLIO } - 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 4a4f05b..735a272 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeActivityType.java @@ -62,4 +62,3 @@ public enum PrimeActivityType { ACTIVITY_TYPE_WEB3_RECREATE_BACKUP, ACTIVITY_TYPE_WEB3_ONBOARDING } - 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 cd747df..84ce0ea 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMControlStatus.java @@ -19,23 +19,27 @@ 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. + * - 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. + * 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. + * 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. + * 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 index 9644380..3f1d78e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMHealthStatus.java @@ -19,47 +19,50 @@ 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). + * - 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. - */ + /** 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. + * 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. + * 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. - */ + /** Trading and withdrawals are suspended per XM margin methodology. */ HEALTH_STATUS_SUSPENDED, - /** - * Account is in a restricted state per XM margin methodology. - */ + /** 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. + * 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. - */ + /** 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). + * 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 55e12b7..f154024 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginLevel.java @@ -19,33 +19,43 @@ 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. + * - 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 - */ + /** 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) + * 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 + * 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 + * 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. + * 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 index 91be3a2..bb8f79c 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginRequirementType.java @@ -19,18 +19,18 @@ 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). + * - 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. - */ + /** 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). + * 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/PrimeXMMarginThresholdType.java b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java index 4981bbe..28dfd3e 100644 --- a/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java +++ b/src/main/java/com/coinbase/prime/model/enums/PrimeXMMarginThresholdType.java @@ -19,19 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - 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. + * - 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. - */ + /** 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. + * 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/ProductPermissions.java b/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java index f54d3ee..6c76a1d 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java +++ b/src/main/java/com/coinbase/prime/model/enums/ProductPermissions.java @@ -23,4 +23,3 @@ public enum ProductPermissions { PRODUCT_PERMISSION_TRADE, PRODUCT_PERMISSION_LENDING } - 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 6a91423..4a3a454 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ProductType.java +++ b/src/main/java/com/coinbase/prime/model/enums/ProductType.java @@ -18,19 +18,10 @@ package com.coinbase.prime.model.enums; -/** - * - UNKNOWN_PRODUCT_TYPE: Unknown product type - * - SPOT: Spot product - * - FUTURE: Future product - */ +/** - UNKNOWN_PRODUCT_TYPE: Unknown product type - SPOT: Spot product - FUTURE: Future product */ public enum ProductType { - /** - * Spot product - */ + /** Spot product */ SPOT, - /** - * Future product - */ + /** Future product */ FUTURE } - 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 ce2decc..4def497 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RateType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RateType.java @@ -25,4 +25,3 @@ public enum RateType { APR_365, APR } - 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 9f84323..40e2176 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java +++ b/src/main/java/com/coinbase/prime/model/enums/RewardSubtype.java @@ -19,56 +19,31 @@ package com.coinbase.prime.model.enums; /** - * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the API response yet - * - MEV_REWARD: A maximal extractable value reward - * i.e. sol mev rewards - * - INFLATION_REWARD: An inflationary reward - * i.e. solana inflationary rewards - * - BLOCK_REWARD: A block reward - * i.e. solana block rewards - * - VALIDATOR_REWARD: A validator reward - * i.e. ethereum 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 - * - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward + * - REWARD_SUBTYPE_UNKNOWN: An unknown reward subtype, reward subtype may not be supported in the + * API response yet - MEV_REWARD: A maximal extractable value reward i.e. sol mev rewards - + * INFLATION_REWARD: An inflationary reward i.e. solana inflationary rewards - BLOCK_REWARD: A block + * reward i.e. solana block rewards - VALIDATOR_REWARD: A validator reward i.e. ethereum 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 - CUSTOM_STABLECOIN_REWARD: A custom stablecoin reward * i.e. USDC reward payouts */ public enum RewardSubtype { - /** - * A maximal extractable value reward - */ + /** A maximal extractable value reward */ MEV_REWARD, - /** - * An inflationary reward - */ + /** An inflationary reward */ INFLATION_REWARD, - /** - * A block reward - */ + /** A block reward */ BLOCK_REWARD, - /** - * A validator reward - */ + /** A validator reward */ VALIDATOR_REWARD, - /** - * A transaction reward - */ + /** A transaction reward */ TRANSACTION_REWARD, - /** - * A staking fee rebate reward - */ + /** A staking fee rebate reward */ STAKING_FEE_REBATE_REWARD, - /** - * A BUIDL dividend reward - */ + /** A BUIDL dividend reward */ BUIDL_DIVIDEND, - /** - * A custom stablecoin reward - */ + /** A custom stablecoin reward */ CUSTOM_STABLECOIN_REWARD } - 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 c970fbf..15d8f96 100644 --- a/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java +++ b/src/main/java/com/coinbase/prime/model/enums/RiskManagementType.java @@ -19,22 +19,15 @@ package com.coinbase.prime.model.enums; /** - * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type - * - RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) - * - RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue + * - RISK_MANAGEMENT_TYPE_UNSPECIFIED: Unspecified risk management type - + * RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM: Risk is managed by FCM (Futures Commission Merchant) - + * RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE: Risk is managed by the venue */ public enum RiskManagementType { - /** - * Unspecified risk management type - */ + /** Unspecified risk management type */ RISK_MANAGEMENT_TYPE_UNSPECIFIED, - /** - * Risk is managed by FCM (Futures Commission Merchant) - */ + /** Risk is managed by FCM (Futures Commission Merchant) */ RISK_MANAGEMENT_TYPE_MANAGED_BY_FCM, - /** - * Risk is managed by the venue - */ + /** Risk is managed by the venue */ RISK_MANAGEMENT_TYPE_MANAGED_BY_VENUE } - 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 7c10474..5eb5ca0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java +++ b/src/main/java/com/coinbase/prime/model/enums/SecondaryPermission.java @@ -19,23 +19,14 @@ package com.coinbase.prime.model.enums; /** - * - SECONDARY_PERMISSION_UNKNOWN: nil value - * - VIDEO_APPROVER: A video approver - * - TEAM_APPROVER: A team approver - * - WEB3_SIGNER: A web3 signer + * - SECONDARY_PERMISSION_UNKNOWN: nil value - VIDEO_APPROVER: A video approver - TEAM_APPROVER: A + * team approver - WEB3_SIGNER: A web3 signer */ public enum SecondaryPermission { - /** - * A video approver - */ + /** A video approver */ VIDEO_APPROVER, - /** - * A team approver - */ + /** A team approver */ TEAM_APPROVER, - /** - * A web3 signer - */ + /** A web3 signer */ WEB3_SIGNER } - 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 48abbe1..3a120f8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/SigningStatus.java @@ -19,18 +19,12 @@ package com.coinbase.prime.model.enums; /** - * - SIGNING_STATUS_UNKNOWN: Unknown signing status - * - SIGNED: Transaction has been signed - * - UNSIGNED: Transaction is unsigned + * - SIGNING_STATUS_UNKNOWN: Unknown signing status - SIGNED: Transaction has been signed - + * UNSIGNED: Transaction is unsigned */ public enum SigningStatus { - /** - * Transaction has been signed - */ + /** Transaction has been signed */ SIGNED, - /** - * Transaction is unsigned - */ + /** Transaction is unsigned */ UNSIGNED } - 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 0d644b6..37697a0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/SortDirection.java +++ b/src/main/java/com/coinbase/prime/model/enums/SortDirection.java @@ -22,4 +22,3 @@ public enum SortDirection { DESC, ASC } - 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 97ebbbb..7b557a7 100644 --- a/src/main/java/com/coinbase/prime/model/enums/StakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/StakeType.java @@ -23,4 +23,3 @@ public enum StakeType { STAKE_TYPE_INITIAL_DEPOSIT, STAKE_TYPE_TOP_UP } - 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 333a575..a1b3807 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TimeInForceType.java @@ -19,28 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_TIME_IN_FORCE: nil value - * - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time - * - GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled - * - IMMEDIATE_OR_CANCEL: Order is executed immediately at submission or is cancelled - * - FILL_OR_KILL: Order is executed immediately and fully at submission or is cancelled + * - UNKNOWN_TIME_IN_FORCE: nil value - GOOD_UNTIL_DATE_TIME: Expires at a certain date/time - + * GOOD_UNTIL_CANCELLED: Order stays on the books until cancelled - IMMEDIATE_OR_CANCEL: Order is + * executed immediately at submission or is cancelled - FILL_OR_KILL: Order is executed immediately + * and fully at submission or is cancelled */ public enum TimeInForceType { - /** - * Expires at a certain date/time - */ + /** Expires at a certain date/time */ GOOD_UNTIL_DATE_TIME, - /** - * Order stays on the books until cancelled - */ + /** Order stays on the books until cancelled */ GOOD_UNTIL_CANCELLED, - /** - * Order is executed immediately at submission or is cancelled - */ + /** Order is executed immediately at submission or is cancelled */ IMMEDIATE_OR_CANCEL, - /** - * Order is executed immediately and fully at submission or is cancelled - */ + /** Order is executed immediately and fully at submission or is cancelled */ FILL_OR_KILL } - 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 c5f18fc..29c1e28 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransactionStatus.java @@ -19,134 +19,80 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status - * - TRANSACTION_CREATED: The Transaction has been created and is awaiting Consensus approval - * This is a non-terminal status - * - TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase Prime approval - * This is a non-terminal status - * - TRANSACTION_APPROVED: The Transaction has been authorized by Coinbase Prime - * This is a non-terminal status - * - TRANSACTION_GASSING: The transaction is awaiting blockchain resources for broadcast - * This is a non-terminal status - * - TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting - * This is a non-terminal status - * - TRANSACTION_PROVISIONED: The transaction has been provisioned and is awaiting planning - * This is a non-terminal status - * - TRANSACTION_PLANNED: The transaction has been constructed. - * This is a non-terminal status - * - TRANSACTION_PROCESSING: The transaction is currently processing and awaiting finalization - * This is a non-terminal status - * - TRANSACTION_RESTORED: The transaction has been broadcasted to the network. - * This is a non-terminal status - * - TRANSACTION_DONE: The transaction has confirmed on-chain and finished. - * This is a terminal status - * - TRANSACTION_IMPORT_PENDING: The transaction deposit has been detected and is awaiting finalization. - * This is a non-terminal status - * - TRANSACTION_IMPORTED: The transaction deposit and reward has been detected. - * This is a terminal status - * - TRANSACTION_CANCELLED: The transaction has been cancelled - * This is a terminal status - * - TRANSACTION_REJECTED: The transaction was rejected before construction and broadcasting. - * This is a terminal status - * - TRANSACTION_DELAYED: The transaction s taking longer than expected to confirm on-chain. - * This is a non-terminal status - * - TRANSACTION_RETRIED: The transaction has been recreated and retried, this occurs when network congestion results in transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET - * This is a terminal status - * - TRANSACTION_FAILED: The transaction failed on-chain (the fee was spent but the operation failed). - * This is a terminal status - * - TRANSACTION_EXPIRED: The transaction has expired. - * This is a terminal status - * - TRANSACTION_BROADCASTING: The transaction is currently broadcasting to the cryptocurrency network. - * This is a non-terminal status - * - OTHER_TRANSACTION_STATUS: The transaction has reached an OTHER status. - * This is a non-terminal status - * - TRANSACTION_CONSTRUCTED: The transaction bctx is constructed but not yet broadcasting on chain - * This is a non-terminal status + * - UNKNOWN_TRANSACTION_STATUS: An Unknown Transaction status - TRANSACTION_CREATED: The + * Transaction has been created and is awaiting Consensus approval This is a non-terminal status - + * TRANSACTION_REQUESTED: The Transaction has reached User Consensus and is awaiting Coinbase Prime + * approval This is a non-terminal status - TRANSACTION_APPROVED: The Transaction has been + * authorized by Coinbase Prime This is a non-terminal status - TRANSACTION_GASSING: The transaction + * is awaiting blockchain resources for broadcast This is a non-terminal status - + * TRANSACTION_GASSED: The transaction has received blockchain resources for broadcasting This is a + * non-terminal status - TRANSACTION_PROVISIONED: The transaction has been provisioned and is + * awaiting planning This is a non-terminal status - TRANSACTION_PLANNED: The transaction has been + * constructed. This is a non-terminal status - TRANSACTION_PROCESSING: The transaction is currently + * processing and awaiting finalization This is a non-terminal status - TRANSACTION_RESTORED: The + * transaction has been broadcasted to the network. This is a non-terminal status - + * TRANSACTION_DONE: The transaction has confirmed on-chain and finished. This is a terminal status + * - TRANSACTION_IMPORT_PENDING: The transaction deposit has been detected and is awaiting + * finalization. This is a non-terminal status - TRANSACTION_IMPORTED: The transaction deposit and + * reward has been detected. This is a terminal status - TRANSACTION_CANCELLED: The transaction has + * been cancelled This is a terminal status - TRANSACTION_REJECTED: The transaction was rejected + * before construction and broadcasting. This is a terminal status - TRANSACTION_DELAYED: The + * transaction s taking longer than expected to confirm on-chain. This is a non-terminal status - + * TRANSACTION_RETRIED: The transaction has been recreated and retried, this occurs when network + * congestion results in transfers becoming extremely delayed due to insufficient fees or network + * resources such as CPU, RAM, or NET This is a terminal status - TRANSACTION_FAILED: The + * transaction failed on-chain (the fee was spent but the operation failed). This is a terminal + * status - TRANSACTION_EXPIRED: The transaction has expired. This is a terminal status - + * TRANSACTION_BROADCASTING: The transaction is currently broadcasting to the cryptocurrency + * network. This is a non-terminal status - OTHER_TRANSACTION_STATUS: The transaction has reached an + * OTHER status. This is a non-terminal status - TRANSACTION_CONSTRUCTED: The transaction bctx is + * constructed but not yet broadcasting on chain This is a non-terminal status */ public enum TransactionStatus { - /** - * The Transaction has been created and is awaiting Consensus approval - */ + /** The Transaction has been created and is awaiting Consensus approval */ TRANSACTION_CREATED, - /** - * The Transaction has reached User Consensus and is awaiting Coinbase Prime approval - */ + /** The Transaction has reached User Consensus and is awaiting Coinbase Prime approval */ TRANSACTION_REQUESTED, - /** - * The Transaction has been authorized by Coinbase Prime - */ + /** The Transaction has been authorized by Coinbase Prime */ TRANSACTION_APPROVED, - /** - * The transaction is awaiting blockchain resources for broadcast - */ + /** The transaction is awaiting blockchain resources for broadcast */ TRANSACTION_GASSING, - /** - * The transaction has received blockchain resources for broadcasting - */ + /** The transaction has received blockchain resources for broadcasting */ TRANSACTION_GASSED, - /** - * The transaction has been provisioned and is awaiting planning - */ + /** The transaction has been provisioned and is awaiting planning */ TRANSACTION_PROVISIONED, - /** - * The transaction has been constructed. - */ + /** The transaction has been constructed. */ TRANSACTION_PLANNED, - /** - * The transaction is currently processing and awaiting finalization - */ + /** The transaction is currently processing and awaiting finalization */ TRANSACTION_PROCESSING, - /** - * The transaction has been broadcasted to the network. - */ + /** The transaction has been broadcasted to the network. */ TRANSACTION_RESTORED, - /** - * The transaction has confirmed on-chain and finished. - */ + /** The transaction has confirmed on-chain and finished. */ TRANSACTION_DONE, - /** - * The transaction deposit has been detected and is awaiting finalization. - */ + /** The transaction deposit has been detected and is awaiting finalization. */ TRANSACTION_IMPORT_PENDING, - /** - * The transaction deposit and reward has been detected. - */ + /** The transaction deposit and reward has been detected. */ TRANSACTION_IMPORTED, - /** - * The transaction has been cancelled - */ + /** The transaction has been cancelled */ TRANSACTION_CANCELLED, - /** - * The transaction was rejected before construction and broadcasting. - */ + /** The transaction was rejected before construction and broadcasting. */ TRANSACTION_REJECTED, - /** - * The transaction s taking longer than expected to confirm on-chain. - */ + /** The transaction s taking longer than expected to confirm on-chain. */ TRANSACTION_DELAYED, /** - * The transaction has been recreated and retried, this occurs when network congestion results in transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, RAM, or NET + * The transaction has been recreated and retried, this occurs when network congestion results in + * transfers becoming extremely delayed due to insufficient fees or network resources such as CPU, + * RAM, or NET */ TRANSACTION_RETRIED, - /** - * The transaction failed on-chain (the fee was spent but the operation failed). - */ + /** The transaction failed on-chain (the fee was spent but the operation failed). */ TRANSACTION_FAILED, - /** - * The transaction has expired. - */ + /** The transaction has expired. */ TRANSACTION_EXPIRED, - /** - * The transaction is currently broadcasting to the cryptocurrency network. - */ + /** The transaction is currently broadcasting to the cryptocurrency network. */ TRANSACTION_BROADCASTING, - /** - * The transaction has reached an OTHER status. - */ + /** The transaction has reached an OTHER status. */ OTHER_TRANSACTION_STATUS, - /** - * The transaction bctx is constructed but not yet broadcasting on chain - */ + /** The transaction bctx is constructed but not yet broadcasting on chain */ TRANSACTION_CONSTRUCTED } - 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 d17860a..33446ae 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransactionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransactionType.java @@ -19,184 +19,105 @@ package com.coinbase.prime.model.enums; /** - * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type - * - DEPOSIT: A fiat or crypto deposit - * - WITHDRAWAL: A fiat or crypto withdrawal - * - INTERNAL_DEPOSIT: An internal fiat or crypto deposit - * - INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal - * - SWEEP_DEPOSIT: Internal automated deposit to a cold address from a restored address - * - SWEEP_WITHDRAWAL: Internal automated withdrawal from a restored address to a cold address - * - PROXY_DEPOSIT: On-chain deposit of funds into proxy contract from cold address - * - PROXY_WITHDRAWAL: On-chain withdrawal of funds from proxy contract to cold address - * - BILLING_WITHDRAWAL: Coinbase Prime automated invoice settlement payment - * - REWARD: Reward payment to an associated address for a staked asset - * - COINBASE_REFUND: Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction - * - TRANSACTION_TYPE_OTHER: An OTHER type of transaction - * - WITHDRAWAL_ADJUSTMENT: A manual adjustment withdrawal transaction - * - DEPOSIT_ADJUSTMENT: A manual adjustment deposit transaction - * - KEY_REGISTRATION: An on-chain registration for an address - * - DELEGATION: An on-chain delegation transaction - * - UNDELEGATION: An on-chain undelegation transaction - * - RESTAKE: On-chain restaking transaction - * - COMPLETE_UNBONDING: On-chain unbonding event transaction - * - WITHDRAW_UNBONDED: On-chain event indicating unbonding period is over - * - STAKE_ACCOUNT_CREATE: On-chain transaction to begin staking from an address - * - CHANGE_VALIDATOR: On-chain transaction alter validator - * - STAKE: On-chain transaction to begin staking in Cryptocurrency network - * - UNSTAKE: On-chain transaction to stop staking in Cryptocurrency network - * - REMOVE_AUTHORIZED_PARTY: On-chain transaction to remove a party from a multi-signature wallet - * - STAKE_AUTHORIZE_WITH_SEED: On-chain transaction to begin staking from a seed account - * - SLASH: On-chain transaction indicating a slash event has occurred - * - COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of transaction operations - * - CONVERSION: Internal conversion between two assets - * - CLAIM_REWARDS: On-chain transaction to claim rewards from Vote Account - * - VOTE_AUTHORIZE: On-chain transaction to transfer the reward claiming permission to other pubkey - * - WEB3_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - * Deprecated: Use ONCHAIN_TRANSACTION instead - * - ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - * - PORTFOLIO_STAKE: Portfolio-level staking operation - * - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation + * - TRANSACTION_TYPE_UNKNOWN: An unknown transaction type - DEPOSIT: A fiat or crypto deposit - + * WITHDRAWAL: A fiat or crypto withdrawal - INTERNAL_DEPOSIT: An internal fiat or crypto deposit - + * INTERNAL_WITHDRAWAL: An internal fiat or crypto withdrawal - SWEEP_DEPOSIT: Internal automated + * deposit to a cold address from a restored address - SWEEP_WITHDRAWAL: Internal automated + * withdrawal from a restored address to a cold address - PROXY_DEPOSIT: On-chain deposit of funds + * into proxy contract from cold address - PROXY_WITHDRAWAL: On-chain withdrawal of funds from proxy + * contract to cold address - BILLING_WITHDRAWAL: Coinbase Prime automated invoice settlement + * payment - REWARD: Reward payment to an associated address for a staked asset - COINBASE_REFUND: + * Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction - + * TRANSACTION_TYPE_OTHER: An OTHER type of transaction - WITHDRAWAL_ADJUSTMENT: A manual adjustment + * withdrawal transaction - DEPOSIT_ADJUSTMENT: A manual adjustment deposit transaction - + * KEY_REGISTRATION: An on-chain registration for an address - DELEGATION: An on-chain delegation + * transaction - UNDELEGATION: An on-chain undelegation transaction - RESTAKE: On-chain restaking + * transaction - COMPLETE_UNBONDING: On-chain unbonding event transaction - WITHDRAW_UNBONDED: + * On-chain event indicating unbonding period is over - STAKE_ACCOUNT_CREATE: On-chain transaction + * to begin staking from an address - CHANGE_VALIDATOR: On-chain transaction alter validator - + * STAKE: On-chain transaction to begin staking in Cryptocurrency network - UNSTAKE: On-chain + * transaction to stop staking in Cryptocurrency network - REMOVE_AUTHORIZED_PARTY: On-chain + * transaction to remove a party from a multi-signature wallet - STAKE_AUTHORIZE_WITH_SEED: On-chain + * transaction to begin staking from a seed account - SLASH: On-chain transaction indicating a slash + * event has occurred - COINBASE_DEPOSIT: On-chain transaction deposit for the purpose of + * transaction operations - CONVERSION: Internal conversion between two assets - CLAIM_REWARDS: + * On-chain transaction to claim rewards from Vote Account - VOTE_AUTHORIZE: On-chain transaction to + * transfer the reward claiming permission to other pubkey - WEB3_TRANSACTION: On-chain transaction + * initiated with Prime Onchain Wallet Deprecated: Use ONCHAIN_TRANSACTION instead - + * ONCHAIN_TRANSACTION: On-chain transaction initiated with Prime Onchain Wallet - PORTFOLIO_STAKE: + * Portfolio-level staking operation - PORTFOLIO_UNSTAKE: Portfolio-level unstaking operation */ public enum TransactionType { - /** - * A fiat or crypto deposit - */ + /** A fiat or crypto deposit */ DEPOSIT, - /** - * A fiat or crypto withdrawal - */ + /** A fiat or crypto withdrawal */ WITHDRAWAL, - /** - * An internal fiat or crypto deposit - */ + /** An internal fiat or crypto deposit */ INTERNAL_DEPOSIT, - /** - * An internal fiat or crypto withdrawal - */ + /** An internal fiat or crypto withdrawal */ INTERNAL_WITHDRAWAL, - /** - * Internal automated deposit to a cold address from a restored address - */ + /** Internal automated deposit to a cold address from a restored address */ SWEEP_DEPOSIT, - /** - * Internal automated withdrawal from a restored address to a cold address - */ + /** Internal automated withdrawal from a restored address to a cold address */ SWEEP_WITHDRAWAL, - /** - * On-chain deposit of funds into proxy contract from cold address - */ + /** On-chain deposit of funds into proxy contract from cold address */ PROXY_DEPOSIT, - /** - * On-chain withdrawal of funds from proxy contract to cold address - */ + /** On-chain withdrawal of funds from proxy contract to cold address */ PROXY_WITHDRAWAL, - /** - * Coinbase Prime automated invoice settlement payment - */ + /** Coinbase Prime automated invoice settlement payment */ BILLING_WITHDRAWAL, - /** - * Reward payment to an associated address for a staked asset - */ + /** Reward payment to an associated address for a staked asset */ REWARD, /** * Coinbase Prime refund for the leftover amount for a CPFP (child pays for parent) transaction */ COINBASE_REFUND, - /** - * An OTHER type of transaction - */ + /** An OTHER type of transaction */ TRANSACTION_TYPE_OTHER, - /** - * A manual adjustment withdrawal transaction - */ + /** A manual adjustment withdrawal transaction */ WITHDRAWAL_ADJUSTMENT, - /** - * A manual adjustment deposit transaction - */ + /** A manual adjustment deposit transaction */ DEPOSIT_ADJUSTMENT, - /** - * An on-chain registration for an address - */ + /** An on-chain registration for an address */ KEY_REGISTRATION, - /** - * An on-chain delegation transaction - */ + /** An on-chain delegation transaction */ DELEGATION, - /** - * An on-chain undelegation transaction - */ + /** An on-chain undelegation transaction */ UNDELEGATION, - /** - * On-chain restaking transaction - */ + /** On-chain restaking transaction */ RESTAKE, - /** - * On-chain unbonding event transaction - */ + /** On-chain unbonding event transaction */ COMPLETE_UNBONDING, - /** - * On-chain event indicating unbonding period is over - */ + /** On-chain event indicating unbonding period is over */ WITHDRAW_UNBONDED, - /** - * On-chain transaction to begin staking from an address - */ + /** On-chain transaction to begin staking from an address */ STAKE_ACCOUNT_CREATE, - /** - * On-chain transaction alter validator - */ + /** On-chain transaction alter validator */ CHANGE_VALIDATOR, - /** - * On-chain transaction to begin staking in Cryptocurrency network - */ + /** On-chain transaction to begin staking in Cryptocurrency network */ STAKE, - /** - * On-chain transaction to stop staking in Cryptocurrency network - */ + /** On-chain transaction to stop staking in Cryptocurrency network */ UNSTAKE, - /** - * On-chain transaction to remove a party from a multi-signature wallet - */ + /** On-chain transaction to remove a party from a multi-signature wallet */ REMOVE_AUTHORIZED_PARTY, - /** - * On-chain transaction to begin staking from a seed account - */ + /** On-chain transaction to begin staking from a seed account */ STAKE_AUTHORIZE_WITH_SEED, - /** - * On-chain transaction indicating a slash event has occurred - */ + /** On-chain transaction indicating a slash event has occurred */ SLASH, - /** - * On-chain transaction deposit for the purpose of transaction operations - */ + /** On-chain transaction deposit for the purpose of transaction operations */ COINBASE_DEPOSIT, - /** - * Internal conversion between two assets - */ + /** Internal conversion between two assets */ CONVERSION, - /** - * On-chain transaction to claim rewards from Vote Account - */ + /** On-chain transaction to claim rewards from Vote Account */ CLAIM_REWARDS, - /** - * On-chain transaction to transfer the reward claiming permission to other pubkey - */ + /** On-chain transaction to transfer the reward claiming permission to other pubkey */ VOTE_AUTHORIZE, - /** - * On-chain transaction initiated with Prime Onchain Wallet - */ + /** On-chain transaction initiated with Prime Onchain Wallet */ WEB3_TRANSACTION, - /** - * On-chain transaction initiated with Prime Onchain Wallet - */ + /** On-chain transaction initiated with Prime Onchain Wallet */ ONCHAIN_TRANSACTION, - /** - * Portfolio-level staking operation - */ + /** Portfolio-level staking operation */ PORTFOLIO_STAKE, - /** - * Portfolio-level unstaking operation - */ + /** Portfolio-level unstaking operation */ PORTFOLIO_UNSTAKE } - 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 28d2e56..7dfe4c1 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TransferLocationType.java @@ -19,38 +19,22 @@ package com.coinbase.prime.model.enums; /** - * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value - * - PAYMENT_METHOD: The ID of a fiat payment method - * - WALLET: The ID of a wallet - * - ADDRESS: A cryptocurrency address - * - OTHER: Another type of transfer location: Blockchain Network, Coinbase - * - MULTIPLE_ADDRESSES: Multiple cryptocurrency addresses - * - COUNTERPARTY_ID: Counterparty ID + * - TRANSFER_LOCATION_TYPE_UNKNOWN: The nil value - PAYMENT_METHOD: The ID of a fiat payment method + * - WALLET: The ID of a wallet - ADDRESS: A cryptocurrency address - OTHER: Another type of + * transfer location: Blockchain Network, Coinbase - MULTIPLE_ADDRESSES: Multiple cryptocurrency + * addresses - COUNTERPARTY_ID: Counterparty ID */ public enum TransferLocationType { - /** - * The ID of a fiat payment method - */ + /** The ID of a fiat payment method */ PAYMENT_METHOD, - /** - * The ID of a wallet - */ + /** The ID of a wallet */ WALLET, - /** - * A cryptocurrency address - */ + /** A cryptocurrency address */ ADDRESS, - /** - * Another type of transfer location: Blockchain Network, Coinbase - */ + /** Another type of transfer location: Blockchain Network, Coinbase */ OTHER, - /** - * Multiple cryptocurrency addresses - */ + /** Multiple cryptocurrency addresses */ MULTIPLE_ADDRESSES, - /** - * Counterparty ID - */ + /** Counterparty ID */ COUNTERPARTY_ID } - 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 ec46b02..f5cdd05 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleStatus.java @@ -18,12 +18,9 @@ package com.coinbase.prime.model.enums; -/** - * Travel rule compliance status for a transaction - */ +/** Travel rule compliance status for a transaction */ public enum TravelRuleStatus { TRAVEL_RULE_STATUS_UNSPECIFIED, TRAVEL_RULE_STATUS_PENDING, TRAVEL_RULE_STATUS_SUBMITTED } - 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 13b3c7c..3cebb9f 100644 --- a/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java +++ b/src/main/java/com/coinbase/prime/model/enums/TravelRuleWalletType.java @@ -19,22 +19,15 @@ package com.coinbase.prime.model.enums; /** - * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type - * - TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet - * - TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet + * - TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED: Default unspecified wallet type - + * TRAVEL_RULE_WALLET_TYPE_VASP: Centralized exchange wallet - + * TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED: Self-hosted/custodial wallet */ public enum TravelRuleWalletType { - /** - * Default unspecified wallet type - */ + /** Default unspecified wallet type */ TRAVEL_RULE_WALLET_TYPE_UNSPECIFIED, - /** - * Centralized exchange wallet - */ + /** Centralized exchange wallet */ TRAVEL_RULE_WALLET_TYPE_VASP, - /** - * Self-hosted/custodial wallet - */ + /** Self-hosted/custodial wallet */ TRAVEL_RULE_WALLET_TYPE_SELF_CUSTODIED } - 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 c1a89a9..02b315a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java +++ b/src/main/java/com/coinbase/prime/model/enums/UnstakeType.java @@ -23,4 +23,3 @@ public enum UnstakeType { UNSTAKE_TYPE_PARTIAL, UNSTAKE_TYPE_FULL } - 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 e319477..30945e8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/UserRole.java +++ b/src/main/java/com/coinbase/prime/model/enums/UserRole.java @@ -19,63 +19,32 @@ package com.coinbase.prime.model.enums; /** - * - USER_ROLE_UNKNOWN: nil value - * - AUDITOR: An auditor - * - SIGNATORY: A signatory - * - ADMIN: An admin - * - INITIATOR: An initiator - * - REVIEWER: A reviewer - * - TRADER: A trader - * - FULL_TRADER: A trader with full permissions - * - TEAM_MANAGER: A team manager - * - APPROVER: An approver - * - TAX_MANAGER: A tax manager - * - BUSINESS_MANAGER: A business manager + * - USER_ROLE_UNKNOWN: nil value - AUDITOR: An auditor - SIGNATORY: A signatory - ADMIN: An admin - + * INITIATOR: An initiator - REVIEWER: A reviewer - TRADER: A trader - FULL_TRADER: A trader with + * full permissions - TEAM_MANAGER: A team manager - APPROVER: An approver - TAX_MANAGER: A tax + * manager - BUSINESS_MANAGER: A business manager */ public enum UserRole { - /** - * An auditor - */ + /** An auditor */ AUDITOR, - /** - * A signatory - */ + /** A signatory */ SIGNATORY, - /** - * An admin - */ + /** An admin */ ADMIN, - /** - * An initiator - */ + /** An initiator */ INITIATOR, - /** - * A reviewer - */ + /** A reviewer */ REVIEWER, - /** - * A trader - */ + /** A trader */ TRADER, - /** - * A trader with full permissions - */ + /** A trader with full permissions */ FULL_TRADER, - /** - * A team manager - */ + /** A team manager */ TEAM_MANAGER, - /** - * An approver - */ + /** An approver */ APPROVER, - /** - * A tax manager - */ + /** A tax manager */ TAX_MANAGER, - /** - * A business manager - */ + /** A business manager */ BUSINESS_MANAGER } - 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 383ac78..c1c1468 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorProvider.java @@ -20,9 +20,9 @@ /** * 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. + * 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, @@ -33,4 +33,3 @@ public enum ValidatorProvider { VALIDATOR_PROVIDER_ATTESTANT, VALIDATOR_PROVIDER_GALAXY } - 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 382d0d5..ca90685 100644 --- a/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/ValidatorStatus.java @@ -26,4 +26,3 @@ public enum ValidatorStatus { VALIDATOR_STATUS_EXITED, VALIDATOR_STATUS_WITHDRAWN } - 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 06a66e1..7511547 100644 --- a/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/VisibilityStatus.java @@ -18,24 +18,12 @@ package com.coinbase.prime.model.enums; -/** - * - UNKNOWN_VISIBILITY_STATUS: nil - * - VISIBLE: Visible - * - HIDDEN: Hidden - * - SPAM: Spam - */ +/** - UNKNOWN_VISIBILITY_STATUS: nil - VISIBLE: Visible - HIDDEN: Hidden - SPAM: Spam */ public enum VisibilityStatus { - /** - * Visible - */ + /** Visible */ VISIBLE, - /** - * Hidden - */ + /** Hidden */ HIDDEN, - /** - * Spam - */ + /** Spam */ SPAM } - 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 b6e849d..04d7749 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletDepositInstructionType.java @@ -19,33 +19,19 @@ package com.coinbase.prime.model.enums; /** - * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - * - CRYPTO: A cryptocurrency deposit - * - WIRE: A wire deposit - * - SEN: DEPRECATED. A Silvergate Exchange Network deposit - * - SWIFT: A SWIFT deposit - * - SEPA: A SEPA deposit (Single Euro Payments Area) + * - UNKNOWN_WALLET_DEPOSIT_TYPE: nil value - CRYPTO: A cryptocurrency deposit - WIRE: A wire + * deposit - SEN: DEPRECATED. A Silvergate Exchange Network deposit - SWIFT: A SWIFT deposit - SEPA: + * A SEPA deposit (Single Euro Payments Area) */ public enum WalletDepositInstructionType { - /** - * A cryptocurrency deposit - */ + /** A cryptocurrency deposit */ CRYPTO, - /** - * A wire deposit - */ + /** A wire deposit */ WIRE, - /** - * DEPRECATED. A Silvergate Exchange Network deposit - */ + /** DEPRECATED. A Silvergate Exchange Network deposit */ SEN, - /** - * A SWIFT deposit - */ + /** A SWIFT deposit */ SWIFT, - /** - * A SEPA deposit (Single Euro Payments Area) - */ + /** A SEPA deposit (Single Euro Payments Area) */ SEPA } - 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 481e8b2..71f277a 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletType.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletType.java @@ -19,32 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 */ public enum WalletType { - /** - * A crypto vault - */ + /** A crypto vault */ VAULT, - /** - * A trading wallet - */ + /** A trading wallet */ TRADING, - /** - * Other wallet types (like consumer, etc) - */ + /** Other wallet types (like consumer, etc) */ WALLET_TYPE_OTHER, - /** - * A QC Wallet - */ + /** A QC Wallet */ QC, - /** - * An Onchain wallet - */ + /** An Onchain wallet */ ONCHAIN } - 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 0476f0f..1b3ac96 100644 --- a/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java +++ b/src/main/java/com/coinbase/prime/model/enums/WalletVisibility.java @@ -23,4 +23,3 @@ public enum WalletVisibility { WALLET_VISIBILITY_VISIBLE, WALLET_VISIBILITY_HIDDEN } - 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 30b10d4..2882aed 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallStatus.java @@ -19,28 +19,18 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 - */ + /** Margin call is open and not expired */ CALL_STATUS_OPEN, - /** - * Margin call is open and it is expired - */ + /** Margin call is open and it is expired */ CALL_STATUS_AGED, - /** - * Margin call is fully settled - */ + /** Margin call is fully settled */ CALL_STATUS_SETTLED, - /** - * Margin call was canceled by Credit Risk - */ + /** 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 index 60205d4..90b01c8 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMCallType.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMCallType.java @@ -19,23 +19,15 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 - */ + /** Evaluated at standard margin call evaluation time */ CALL_TYPE_STANDARD, - /** - * Evaluated in realtime - */ + /** Evaluated in realtime */ CALL_TYPE_URGENT, - /** - * Evaluated at debit call evaluation time - */ + /** 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 index 8d1229e..cb90db0 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMControlStatus.java @@ -19,23 +19,27 @@ 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. + * - 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. + * 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. + * 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. + * 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 index f3ced3d..5e9b304 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMEntityCallStatus.java @@ -19,35 +19,38 @@ 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. + * 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. - */ + /** 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.. + * 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. + * 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. + * 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. + * 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 index 00e7966..d4286ce 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMLiquidationStatus.java @@ -19,33 +19,22 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 - */ + /** Liquidation is in the pre-liquidation phase */ XM_LIQUIDATION_STATUS_PRE_LIQUIDATION, - /** - * Liquidation is actively in progress - */ + /** Liquidation is actively in progress */ XM_LIQUIDATION_STATUS_LIQUIDATING, - /** - * Liquidation has completed successfully - */ + /** Liquidation has completed successfully */ XM_LIQUIDATION_STATUS_LIQUIDATED, - /** - * Liquidation was canceled - */ + /** Liquidation was canceled */ XM_LIQUIDATION_STATUS_CANCELED, - /** - * Liquidation failed - */ + /** 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 index 571d718..76d25bc 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMMarginLevel.java @@ -19,33 +19,43 @@ 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. + * - 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 - */ + /** 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) + * 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 + * 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 + * 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. + * 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 index f5369c9..1155e6b 100644 --- a/src/main/java/com/coinbase/prime/model/enums/XMParty.java +++ b/src/main/java/com/coinbase/prime/model/enums/XMParty.java @@ -19,18 +19,13 @@ package com.coinbase.prime.model.enums; /** - * - 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 + * - 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 - */ + /** Coinbase Exchange, trading venue that can receive the XM loan */ CBE, - /** - * Coinbase’s Futures Commission Merchant, trading venue that can receive the XM loan - */ + /** Coinbase’s Futures Commission Merchant, trading venue that can receive the XM loan */ FCM } - From 1b7cafefec9cafcfff2cefb5ff589e47f4f35142 Mon Sep 17 00:00:00 2001 From: Nick Morgan Date: Wed, 17 Jun 2026 12:45:00 -0700 Subject: [PATCH 11/11] update changelog date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dc29f2..6c7cc80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [1.10.0] - 2026-JUN-08 +## [1.10.0] - 2026-JUN-17 ### Added